From 38728d9cc8d956d6a1c391a2a0e99a8236923699 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomek=20=C5=81aziuk?= Date: Tue, 16 Oct 2018 13:57:01 +0200 Subject: [PATCH 001/608] description --- types/range-parser/index.d.ts | 4 ++-- types/range-parser/tsconfig.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/types/range-parser/index.d.ts b/types/range-parser/index.d.ts index a1bcf4c9dc..13d331041a 100644 --- a/types/range-parser/index.d.ts +++ b/types/range-parser/index.d.ts @@ -4,11 +4,11 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /** - * Returns `-1` when unsatisfiable and `-2` when syntactically invalid. - * * When ranges are returned, the array has a "type" property which is the type of * range that is required (most commonly, "bytes"). Each array element is an object * with a "start" and "end" property for the portion of the range. + * + * @returns `-1` when unsatisfiable and `-2` when syntactically invalid, ranges otherwise. */ declare function RangeParser(size: number, str: string, options?: RangeParser.Options): RangeParser.Result | RangeParser.Ranges; diff --git a/types/range-parser/tsconfig.json b/types/range-parser/tsconfig.json index 15585886a9..dc6de494bf 100644 --- a/types/range-parser/tsconfig.json +++ b/types/range-parser/tsconfig.json @@ -20,4 +20,4 @@ "index.d.ts", "range-parser-tests.ts" ] -} \ No newline at end of file +} From 6d51909cafaad3b3634ad057bfeb2f7eac011872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomek=20=C5=81aziuk?= Date: Tue, 16 Oct 2018 14:10:42 +0200 Subject: [PATCH 002/608] --isolatedModules fix --- types/range-parser/index.d.ts | 7 +++---- types/range-parser/range-parser-tests.ts | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/types/range-parser/index.d.ts b/types/range-parser/index.d.ts index 13d331041a..e8e6ae4451 100644 --- a/types/range-parser/index.d.ts +++ b/types/range-parser/index.d.ts @@ -27,10 +27,9 @@ declare namespace RangeParser { */ combine?: boolean; } - const enum Result { - invaild = -2, - unsatisifiable = -1, - } + type ResultUnsatisfiable = -1; + type ResultInvalid = -2; + type Result = ResultUnsatisfiable | ResultInvalid; } export = RangeParser; diff --git a/types/range-parser/range-parser-tests.ts b/types/range-parser/range-parser-tests.ts index ec1ffa6e4e..2c18e3f9dc 100644 --- a/types/range-parser/range-parser-tests.ts +++ b/types/range-parser/range-parser-tests.ts @@ -2,8 +2,8 @@ import RangeParser = require('range-parser'); declare var console: { assert(b: boolean): void }; -console.assert(RangeParser(200, `malformed`) === RangeParser.Result.invaild); -console.assert(RangeParser(200, `bytes=500-20`) === RangeParser.Result.unsatisifiable); +console.assert(RangeParser(200, `malformed`) === -2); +console.assert(RangeParser(200, `bytes=500-20`) === -1); const range = RangeParser(1000, `bytes=0-499`); From 202f4ee2dd0603bc665629d5f6c1c37ae3868dd6 Mon Sep 17 00:00:00 2001 From: Jeff Held Date: Thu, 8 Nov 2018 16:49:37 -0600 Subject: [PATCH 003/608] detox: create tests folder, add test for importing Detox module --- types/detox/detox-tests.ts | 31 -------------- types/detox/tests/detox-globals-tests.ts | 40 ++++++++++++++++++ .../detox/tests/detox-import-modules-tests.ts | 42 +++++++++++++++++++ types/detox/tsconfig.json | 11 ++--- 4 files changed, 86 insertions(+), 38 deletions(-) delete mode 100644 types/detox/detox-tests.ts create mode 100644 types/detox/tests/detox-globals-tests.ts create mode 100644 types/detox/tests/detox-import-modules-tests.ts diff --git a/types/detox/detox-tests.ts b/types/detox/detox-tests.ts deleted file mode 100644 index 58fe5c1912..0000000000 --- a/types/detox/detox-tests.ts +++ /dev/null @@ -1,31 +0,0 @@ -declare var describe: (test: string, callback: () => void) => void; -declare var beforeAll: (callback: () => void) => void; -declare var afterAll: (callback: () => void) => void; -declare var test: (test: string, callback: () => void) => void; - -describe('Test', () => { - beforeAll(async () => { - await device.reloadReactNative(); - }); - - afterAll(async () => { - await element(by.id('element')).clearText(); - }); - - test('Test', async () => { - await element(by.id('element')).replaceText('text'); - await element(by.id('element')).tap(); - await element(by.id('element')).scroll(50, 'down'); - await element(by.id('scrollView')).scrollTo('bottom'); - await expect(element(by.id('element')).atIndex(0)).toNotExist(); - await element(by.id('scrollView')).swipe('down', 'fast'); - await element(by.type('UIPickerView')).setColumnToValue(1, "6"); - - await expect(element(by.id('element').withAncestor(by.id('parent_element')))).toNotExist(); - await expect(element(by.id('element').withDescendant(by.id('child_element')))).toNotExist(); - - await waitFor(element(by.id('element'))).toBeVisible().withTimeout(2000); - await device.pressBack(); - await waitFor(element(by.text('Text5'))).toBeVisible().whileElement(by.id('ScrollView630')).scroll(50, 'down'); - }); -}); diff --git a/types/detox/tests/detox-globals-tests.ts b/types/detox/tests/detox-globals-tests.ts new file mode 100644 index 0000000000..42415c548d --- /dev/null +++ b/types/detox/tests/detox-globals-tests.ts @@ -0,0 +1,40 @@ +declare var describe: (test: string, callback: () => void) => void; +declare var beforeAll: (callback: () => void) => void; +declare var afterAll: (callback: () => void) => void; +declare var test: (test: string, callback: () => void) => void; + +describe("Test", () => { + beforeAll(async () => { + await device.reloadReactNative(); + }); + + afterAll(async () => { + await element(by.id("element")).clearText(); + }); + + test("Test", async () => { + await element(by.id("element")).replaceText("text"); + await element(by.id("element")).tap(); + await element(by.id("element")).scroll(50, "down"); + await element(by.id("scrollView")).scrollTo("bottom"); + await expect(element(by.id("element")).atIndex(0)).toNotExist(); + await element(by.id("scrollView")).swipe("down", "fast"); + await element(by.type("UIPickerView")).setColumnToValue(1, "6"); + + await expect( + element(by.id("element").withAncestor(by.id("parent_element"))) + ).toNotExist(); + await expect( + element(by.id("element").withDescendant(by.id("child_element"))) + ).toNotExist(); + + await waitFor(element(by.id("element"))) + .toBeVisible() + .withTimeout(2000); + await device.pressBack(); + await waitFor(element(by.text("Text5"))) + .toBeVisible() + .whileElement(by.id("ScrollView630")) + .scroll(50, "down"); + }); +}); diff --git a/types/detox/tests/detox-import-modules-tests.ts b/types/detox/tests/detox-import-modules-tests.ts new file mode 100644 index 0000000000..318569c03d --- /dev/null +++ b/types/detox/tests/detox-import-modules-tests.ts @@ -0,0 +1,42 @@ +declare var describe: (test: string, callback: () => void) => void; +declare var beforeAll: (callback: () => void) => void; +declare var afterAll: (callback: () => void) => void; +declare var test: (test: string, callback: () => void) => void; + +import { by, device, element, expect, waitFor } from "detox"; + +describe("Test", () => { + beforeAll(async () => { + await device.reloadReactNative(); + }); + + afterAll(async () => { + await element(by.id("element")).clearText(); + }); + + test("Test", async () => { + await element(by.id("element")).replaceText("text"); + await element(by.id("element")).tap(); + await element(by.id("element")).scroll(50, "down"); + await element(by.id("scrollView")).scrollTo("bottom"); + await expect(element(by.id("element")).atIndex(0)).toNotExist(); + await element(by.id("scrollView")).swipe("down", "fast"); + await element(by.type("UIPickerView")).setColumnToValue(1, "6"); + + await expect( + element(by.id("element").withAncestor(by.id("parent_element"))) + ).toNotExist(); + await expect( + element(by.id("element").withDescendant(by.id("child_element"))) + ).toNotExist(); + + await waitFor(element(by.id("element"))) + .toBeVisible() + .withTimeout(2000); + await device.pressBack(); + await waitFor(element(by.text("Text5"))) + .toBeVisible() + .whileElement(by.id("ScrollView630")) + .scroll(50, "down"); + }); +}); diff --git a/types/detox/tsconfig.json b/types/detox/tsconfig.json index 2d1a22fb79..3eb7524be2 100644 --- a/types/detox/tsconfig.json +++ b/types/detox/tsconfig.json @@ -1,24 +1,21 @@ { "compilerOptions": { "module": "commonjs", - "lib": [ - "es6" - ], + "lib": ["es6"], "target": "ES2015", "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", - "typeRoots": [ - "../" - ], + "typeRoots": ["../"], "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true }, "files": [ "index.d.ts", - "detox-tests.ts" + "tests/detox-globals-tests.ts", + "tests/detox-import-modules-tests.ts" ] } From 45a0c57ef040ed95fa5994b05a2a5c32778706fc Mon Sep 17 00:00:00 2001 From: Jeff Held Date: Thu, 8 Nov 2018 16:49:42 -0600 Subject: [PATCH 004/608] detox: follow global-modifying dts example --- types/detox/index.d.ts | 821 +++++++++++++++++++++-------------------- 1 file changed, 416 insertions(+), 405 deletions(-) diff --git a/types/detox/index.d.ts b/types/detox/index.d.ts index 7ef085e25d..f9baa99f6e 100644 --- a/types/detox/index.d.ts +++ b/types/detox/index.d.ts @@ -3,418 +3,429 @@ // Definitions by: Tareq El-Masri , Steve Chun // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare const detox: Detox.Detox; -declare const device: Detox.Device; -declare const element: Detox.Element; -declare const waitFor: Detox.WaitFor; -declare const expect: Detox.Expect>; -declare const by: Detox.Matchers; +declare global { + const detox: Detox.Detox; + const device: Detox.Device; + const element: Detox.Element; + const waitFor: Detox.WaitFor; + const expect: Detox.Expect>; + const by: Detox.Matchers; -declare namespace Detox { - interface Detox { - /** - * The setup phase happens inside detox.init(). This is the phase where detox reads its configuration, starts a server, loads its expection library and starts a simulator - * @param config - * @param options - * @example const config = require('../package.json').detox; - * - * before(async () => { - * await detox.init(config); - * }); - */ - init(config: any, options?: DetoxInitOptions): Promise; - /** - * Artifacts currently include only logs from the app process before each task - * @param args - */ - beforeEach(...args: any[]): Promise; - /** - * Artifacts currently include only logs from the app process after each task - * @param args - */ - afterEach(...args: any[]): Promise; - /** - * The cleanup phase should happen after all the tests have finished. This is the phase where detox-server shuts down. - * @example after(async () => { - * await detox.cleanup(); - * }); - */ - cleanup(): Promise; - } - interface Device { - /** - * Launch the app - * @param config - * @example // Terminate the app and launch it again. If set to false, the simulator will try to bring app from background, - * // if the app isn't running, it will launch a new instance. default is false - * await device.launchApp({newInstance: true}); - * // Grant or deny runtime permissions for your application. - * await device.launchApp({permissions: {calendar: 'YES'}}); - * // Mock opening the app from URL to test your app's deep link handling mechanism. - * await device.launchApp({url: url}); - */ - launchApp(config: DeviceLanchAppConfig): Promise; - /** - * By default, terminateApp() with no params will terminate the app - * To terminate another app, specify its bundle id - * @param bundle - * @example await device.terminateApp('other.bundle.id'); - */ - terminateApp(bundle?: string): Promise; - /** - * Send application to background by bringing com.apple.springboard to the foreground. - * Combining sendToHome() with launchApp({newInstance: false}) will simulate app coming back from background. - * @example await device.sendToHome(); - * await device.launchApp({newInstance: false}); - */ - sendToHome(): Promise; - /** - * If this is a React Native app, reload the React Native JS bundle. This action is much faster than device.launchApp(), and can be used if you just need to reset your React Native logic. - * @example await device.reloadReactNative() - */ - reloadReactNative(): Promise; - /** - * By default, installApp() with no params will install the app file defined in the current configuration. - * To install another app, specify its path - * @param path - * @example await device.installApp('path/to/other/app'); - */ - installApp(path?: any): Promise; - /** - * By default, uninstallApp() with no params will uninstall the app defined in the current configuration. - * To uninstall another app, specify its bundle id - * @param bundle - * @example await device.installApp('other.bundle.id'); - */ - uninstallApp(bundle?: string): Promise; - /** - * Mock opening the app from URL. sourceApp is an optional parameter to specify source application bundle id. - * @param url - */ - openURL(url: {url: string, sourceApp?: string}): Promise; - /** - * Mock handling of received user notification when app is in foreground. - * @param params - */ - sendUserNotification(...params: any[]): Promise; - /** - * Mock handling of received user activity when app is in foreground. - * @param params - */ - sendUserActivity(...params: any[]): Promise; - /** - * Takes "portrait" or "landscape" and rotates the device to the given orientation. Currently only available in the iOS Simulator. - * @param orientation - */ - setOrientation(orientation: Orientation): Promise; - /** - * Note: setLocation is dependent on fbsimctl. if fbsimctl is not installed, the command will fail, it must be installed. Sets the simulator location to the given latitude and longitude. - * @param lat - * @param lon - * @example await device.setLocation(32.0853, 34.7818); - */ - setLocation(lat: number, lon: number): Promise; - /** - * Disable EarlGrey's network synchronization mechanism on preffered endpoints. Usful if you want to on skip over synchronizing on certain URLs. - * @param urls - * @example await device.setURLBlacklist(['.*127.0.0.1.*']); - */ - setURLBlacklist(urls: string[]): Promise; - /** - * Enable EarlGrey's synchronization mechanism (enabled by default). This is being reset on every new instance of the app. - * @example await device.enableSynchronization(); - */ - enableSynchronization(): Promise; - /** - * Disable EarlGrey's synchronization mechanism (enabled by default) This is being reset on every new instance of the app. - * @example await device.disableSynchronization(); - */ - disableSynchronization(): Promise; - /** - * Resets the Simulator to clean state (like the Simulator > Reset Content and Settings... menu item), especially removing previously set permissions. - * @example await device.resetContentAndSettings(); - */ - resetContentAndSettings(): Promise; - /** - * Returns the current device, ios or android. - * @example if (device.getPlatform() === 'ios') { - * await expect(loopSwitch).toHaveValue('1'); - * } - */ - getPlatform(): "ios" | "android"; - /** - * Simulate press back button (Android Only) - */ - pressBack(): Promise; - /** - * Simulate shake (iOS Only) - */ - shake(): Promise; - } + namespace Detox { + interface Detox { + /** + * The setup phase happens inside detox.init(). This is the phase where detox reads its configuration, starts a server, loads its expection library and starts a simulator + * @param config + * @param options + * @example const config = require('../package.json').detox; + * + * before(async () => { + * await detox.init(config); + * }); + */ + init(config: any, options?: DetoxInitOptions): Promise; + /** + * Artifacts currently include only logs from the app process before each task + * @param args + */ + beforeEach(...args: any[]): Promise; + /** + * Artifacts currently include only logs from the app process after each task + * @param args + */ + afterEach(...args: any[]): Promise; + /** + * The cleanup phase should happen after all the tests have finished. This is the phase where detox-server shuts down. + * @example after(async () => { + * await detox.cleanup(); + * }); + */ + cleanup(): Promise; + } + interface Device { + /** + * Launch the app + * @param config + * @example // Terminate the app and launch it again. If set to false, the simulator will try to bring app from background, + * // if the app isn't running, it will launch a new instance. default is false + * await device.launchApp({newInstance: true}); + * // Grant or deny runtime permissions for your application. + * await device.launchApp({permissions: {calendar: 'YES'}}); + * // Mock opening the app from URL to test your app's deep link handling mechanism. + * await device.launchApp({url: url}); + */ + launchApp(config: DeviceLanchAppConfig): Promise; + /** + * By default, terminateApp() with no params will terminate the app + * To terminate another app, specify its bundle id + * @param bundle + * @example await device.terminateApp('other.bundle.id'); + */ + terminateApp(bundle?: string): Promise; + /** + * Send application to background by bringing com.apple.springboard to the foreground. + * Combining sendToHome() with launchApp({newInstance: false}) will simulate app coming back from background. + * @example await device.sendToHome(); + * await device.launchApp({newInstance: false}); + */ + sendToHome(): Promise; + /** + * If this is a React Native app, reload the React Native JS bundle. This action is much faster than device.launchApp(), and can be used if you just need to reset your React Native logic. + * @example await device.reloadReactNative() + */ + reloadReactNative(): Promise; + /** + * By default, installApp() with no params will install the app file defined in the current configuration. + * To install another app, specify its path + * @param path + * @example await device.installApp('path/to/other/app'); + */ + installApp(path?: any): Promise; + /** + * By default, uninstallApp() with no params will uninstall the app defined in the current configuration. + * To uninstall another app, specify its bundle id + * @param bundle + * @example await device.installApp('other.bundle.id'); + */ + uninstallApp(bundle?: string): Promise; + /** + * Mock opening the app from URL. sourceApp is an optional parameter to specify source application bundle id. + * @param url + */ + openURL(url: { url: string; sourceApp?: string }): Promise; + /** + * Mock handling of received user notification when app is in foreground. + * @param params + */ + sendUserNotification(...params: any[]): Promise; + /** + * Mock handling of received user activity when app is in foreground. + * @param params + */ + sendUserActivity(...params: any[]): Promise; + /** + * Takes "portrait" or "landscape" and rotates the device to the given orientation. Currently only available in the iOS Simulator. + * @param orientation + */ + setOrientation(orientation: Orientation): Promise; + /** + * Note: setLocation is dependent on fbsimctl. if fbsimctl is not installed, the command will fail, it must be installed. Sets the simulator location to the given latitude and longitude. + * @param lat + * @param lon + * @example await device.setLocation(32.0853, 34.7818); + */ + setLocation(lat: number, lon: number): Promise; + /** + * Disable EarlGrey's network synchronization mechanism on preffered endpoints. Usful if you want to on skip over synchronizing on certain URLs. + * @param urls + * @example await device.setURLBlacklist(['.*127.0.0.1.*']); + */ + setURLBlacklist(urls: string[]): Promise; + /** + * Enable EarlGrey's synchronization mechanism (enabled by default). This is being reset on every new instance of the app. + * @example await device.enableSynchronization(); + */ + enableSynchronization(): Promise; + /** + * Disable EarlGrey's synchronization mechanism (enabled by default) This is being reset on every new instance of the app. + * @example await device.disableSynchronization(); + */ + disableSynchronization(): Promise; + /** + * Resets the Simulator to clean state (like the Simulator > Reset Content and Settings... menu item), especially removing previously set permissions. + * @example await device.resetContentAndSettings(); + */ + resetContentAndSettings(): Promise; + /** + * Returns the current device, ios or android. + * @example if (device.getPlatform() === 'ios') { + * await expect(loopSwitch).toHaveValue('1'); + * } + */ + getPlatform(): "ios" | "android"; + /** + * Simulate press back button (Android Only) + */ + pressBack(): Promise; + /** + * Simulate shake (iOS Only) + */ + shake(): Promise; + } - type DetoxAny = Element & Actions & WaitFor; + type DetoxAny = Element & Actions & WaitFor; - interface Element { - (by: Matchers): DetoxAny; + interface Element { + (by: Matchers): DetoxAny; - /** - * Choose from multiple elements matching the same matcher using index - * @param index - * @example await element(by.text('Product')).atIndex(2); - */ - atIndex(index: number): DetoxAny; - } - interface Matchers { - (by: Matchers): Matchers; + /** + * Choose from multiple elements matching the same matcher using index + * @param index + * @example await element(by.text('Product')).atIndex(2); + */ + atIndex(index: number): DetoxAny; + } + interface Matchers { + (by: Matchers): Matchers; - /** - * by.id will match an id that is given to the view via testID prop. - * @param id - * @example // In a React Native component add testID like so: - * - * // Then match with by.id: - * await element(by.id('tap_me')); - */ - id(id: string): Matchers; - /** - * Find an element by text, useful for text fields, buttons. - * @param text - * @example await element(by.text('Tap Me')); - */ - text(text: string): Matchers; - /** - * Find an element by accessibilityLabel on iOS, or by contentDescription on Android. - * @param label - * @example await element(by.label('Welcome')); - */ - label(label: string): Matchers; - /** - * Find an element by native view type. - * @param nativeViewType - * @example await element(by.type('RCTImageView')); - */ - type(nativeViewType: string): Matchers; - /** - * Find an element with an accessibility trait. (iOS only) - * @example await element(by.traits(['button'])); - */ - traits(traits: string[]): Matchers; - /** - * Find an element by a matcher with a parent matcher - * @param parentBy - * @example await element(by.id('Grandson883').withAncestor(by.id('Son883'))); - */ - withAncestor(parentBy: Matchers): Matchers; - /** - * Find an element by a matcher with a child matcher - * @param childBy - * @example await element(by.id('Son883').withDescendant(by.id('Grandson883'))); - */ - withDescendant(childBy: Matchers): Matchers; - /** - * Find an element by multiple matchers - * @param by - * @example await element(by.text('Product').and(by.id('product_name')); - */ - and(by: Matchers): Matchers; - } - interface Expect { - (element: Element): Expect; - /** - * Expect the view to be at least 75% visible. - * @example await expect(element(by.id('UniqueId204'))).toBeVisible(); - */ - toBeVisible(): R; - /** - * Expect the view to not be visible. - * @example await expect(element(by.id('UniqueId205'))).toBeNotVisible(); - */ - toBeNotVisible(): R; - /** - * Expect the view to exist in the UI hierarchy. - * @example await expect(element(by.id('UniqueId205'))).toExist(); - */ - toExist(): R; - /** - * Expect the view to not exist in the UI hierarchy. - * @example await expect(element(by.id('RandomJunk959'))).toNotExist(); - */ - toNotExist(): R; - /** - * In React Native apps, expect UI component of type to have text. - * In native iOS apps, expect UI elements of type UIButton, UILabel, UITextField or UITextViewIn to have inputText with text. - * @param text - * @example await expect(element(by.id('UniqueId204'))).toHaveText('I contain some text'); - */ - toHaveText(text: string): R; - /** - * It searches by accessibilityLabel on iOS, or by contentDescription on Android. - * In React Native it can be set for both platforms by defining an accessibilityLabel on the view. - * @param label - * @example await expect(element(by.id('UniqueId204'))).toHaveLabel('Done'); - */ - toHaveLabel(label: string): R; - /** - * In React Native apps, expect UI component to have testID with that id. - * In native iOS apps, expect UI element to have accesibilityIdentifier with that id. - * @param id - * @example await expect(element(by.text('I contain some text'))).toHaveId('UniqueId204'); - */ - toHaveId(id: string): R; - /** - * Expect components like a Switch to have a value ('0' for off, '1' for on). - * @param value - * @example await expect(element(by.id('UniqueId533'))).toHaveValue('0'); - */ - toHaveValue(value: any): R; - } - interface WaitFor { - /** - * This API polls using the given expectation continuously until the expectation is met. Use manual synchronization with waitFor only as a last resort. - * NOTE: Every waitFor call must set a timeout using withTimeout(). Calling waitFor without setting a timeout will do nothing. - * @example await waitFor(element(by.id('UniqueId336'))).toExist().withTimeout(2000); - */ - (element: Element): Expect; - /** - * Waits for the condition to be met until the specified time (millis) have elapsed. - * @param millis number - * @example await waitFor(element(by.id('UniqueId336'))).toExist().withTimeout(2000); - */ - withTimeout(millis: number): Promise; - /** - * Performs the action repeatedly on the element until an expectation is met - * @param by - * @example await waitFor(element(by.text('Text5'))).toBeVisible().whileElement(by.id('ScrollView630')).scroll(50, 'down'); - */ - whileElement(by: Matchers): DetoxAny; - } - interface Actions { - /** - * Simulate tap on an element - * @example await element(by.id('tappable')).tap(); - */ - tap(): Promise>; - /** - * Simulate long press on an element - * @example await element(by.id('tappable')).longPress(); - */ - longPress(): Promise>; - /** - * Simulate multiple taps on an element. - * @param times number - * @example await element(by.id('tappable')).multiTap(3); - */ - multiTap(times: number): Promise>; - /** - * Simulate tap at a specific point on an element. - * Note: The point coordinates are relative to the matched element and the element size could changes on different devices or even when changing the device font size. - * @param point - * @example await element(by.id('tappable')).tapAtPoint({ x:5, y:10 }); - */ - tapAtPoint(point: { x: number, y: number }): Promise>; - /** - * Use the builtin keyboard to type text into a text field. - * @param text - * @example await element(by.id('textField')).typeText('passcode'); - */ - typeText(text: string): Promise>; - /** - * Paste text into a text field. - * @param text - * @example await element(by.id('textField')).replaceText('passcode again'); - */ - replaceText(text: string): Promise>; - /** - * Clear text from a text field. - * @example await element(by.id('textField')).clearText(); - */ - clearText(): Promise>; - /** - * - * @param pixels - * @param direction - * @example - * await element(by.id('scrollView')).scroll(100, 'down'); - * await element(by.id('scrollView')).scroll(100, 'up'); - */ - scroll(pixels: number, direction: Direction): Promise>; - /** - * Scroll to edge. - * @param edge - * @example await element(by.id('scrollView')).scrollTo('bottom'); - * await element(by.id('scrollView')).scrollTo('top'); - */ - scrollTo(edge: Direction): Promise>; - /** - * - * @param direction - * @param speed - * @param percentage - * @example await element(by.id('scrollView')).swipe('down'); - * await element(by.id('scrollView')).swipe('down', 'fast'); - * await element(by.id('scrollView')).swipe('down', 'fast', 0.5); - */ - swipe(direction: Direction, speed?: Speed, percentage?: number): Promise>; - /** - * (iOS Only) column - number of datepicker column (starts from 0) value - string value in setted column (must be correct) - * @param column - * @param value - * @example await expect(element(by.type('UIPickerView'))).toBeVisible(); - * await element(by.type('UIPickerView')).setColumnToValue(1,"6"); - * await element(by.type('UIPickerView')).setColumnToValue(2,"34"); - */ - setColumnToValue(column: number, value: string): Promise>; - } + /** + * by.id will match an id that is given to the view via testID prop. + * @param id + * @example // In a React Native component add testID like so: + * + * // Then match with by.id: + * await element(by.id('tap_me')); + */ + id(id: string): Matchers; + /** + * Find an element by text, useful for text fields, buttons. + * @param text + * @example await element(by.text('Tap Me')); + */ + text(text: string): Matchers; + /** + * Find an element by accessibilityLabel on iOS, or by contentDescription on Android. + * @param label + * @example await element(by.label('Welcome')); + */ + label(label: string): Matchers; + /** + * Find an element by native view type. + * @param nativeViewType + * @example await element(by.type('RCTImageView')); + */ + type(nativeViewType: string): Matchers; + /** + * Find an element with an accessibility trait. (iOS only) + * @example await element(by.traits(['button'])); + */ + traits(traits: string[]): Matchers; + /** + * Find an element by a matcher with a parent matcher + * @param parentBy + * @example await element(by.id('Grandson883').withAncestor(by.id('Son883'))); + */ + withAncestor(parentBy: Matchers): Matchers; + /** + * Find an element by a matcher with a child matcher + * @param childBy + * @example await element(by.id('Son883').withDescendant(by.id('Grandson883'))); + */ + withDescendant(childBy: Matchers): Matchers; + /** + * Find an element by multiple matchers + * @param by + * @example await element(by.text('Product').and(by.id('product_name')); + */ + and(by: Matchers): Matchers; + } + interface Expect { + (element: Element): Expect; + /** + * Expect the view to be at least 75% visible. + * @example await expect(element(by.id('UniqueId204'))).toBeVisible(); + */ + toBeVisible(): R; + /** + * Expect the view to not be visible. + * @example await expect(element(by.id('UniqueId205'))).toBeNotVisible(); + */ + toBeNotVisible(): R; + /** + * Expect the view to exist in the UI hierarchy. + * @example await expect(element(by.id('UniqueId205'))).toExist(); + */ + toExist(): R; + /** + * Expect the view to not exist in the UI hierarchy. + * @example await expect(element(by.id('RandomJunk959'))).toNotExist(); + */ + toNotExist(): R; + /** + * In React Native apps, expect UI component of type to have text. + * In native iOS apps, expect UI elements of type UIButton, UILabel, UITextField or UITextViewIn to have inputText with text. + * @param text + * @example await expect(element(by.id('UniqueId204'))).toHaveText('I contain some text'); + */ + toHaveText(text: string): R; + /** + * It searches by accessibilityLabel on iOS, or by contentDescription on Android. + * In React Native it can be set for both platforms by defining an accessibilityLabel on the view. + * @param label + * @example await expect(element(by.id('UniqueId204'))).toHaveLabel('Done'); + */ + toHaveLabel(label: string): R; + /** + * In React Native apps, expect UI component to have testID with that id. + * In native iOS apps, expect UI element to have accesibilityIdentifier with that id. + * @param id + * @example await expect(element(by.text('I contain some text'))).toHaveId('UniqueId204'); + */ + toHaveId(id: string): R; + /** + * Expect components like a Switch to have a value ('0' for off, '1' for on). + * @param value + * @example await expect(element(by.id('UniqueId533'))).toHaveValue('0'); + */ + toHaveValue(value: any): R; + } + interface WaitFor { + /** + * This API polls using the given expectation continuously until the expectation is met. Use manual synchronization with waitFor only as a last resort. + * NOTE: Every waitFor call must set a timeout using withTimeout(). Calling waitFor without setting a timeout will do nothing. + * @example await waitFor(element(by.id('UniqueId336'))).toExist().withTimeout(2000); + */ + (element: Element): Expect; + /** + * Waits for the condition to be met until the specified time (millis) have elapsed. + * @param millis number + * @example await waitFor(element(by.id('UniqueId336'))).toExist().withTimeout(2000); + */ + withTimeout(millis: number): Promise; + /** + * Performs the action repeatedly on the element until an expectation is met + * @param by + * @example await waitFor(element(by.text('Text5'))).toBeVisible().whileElement(by.id('ScrollView630')).scroll(50, 'down'); + */ + whileElement(by: Matchers): DetoxAny; + } + interface Actions { + /** + * Simulate tap on an element + * @example await element(by.id('tappable')).tap(); + */ + tap(): Promise>; + /** + * Simulate long press on an element + * @example await element(by.id('tappable')).longPress(); + */ + longPress(): Promise>; + /** + * Simulate multiple taps on an element. + * @param times number + * @example await element(by.id('tappable')).multiTap(3); + */ + multiTap(times: number): Promise>; + /** + * Simulate tap at a specific point on an element. + * Note: The point coordinates are relative to the matched element and the element size could changes on different devices or even when changing the device font size. + * @param point + * @example await element(by.id('tappable')).tapAtPoint({ x:5, y:10 }); + */ + tapAtPoint(point: { x: number; y: number }): Promise>; + /** + * Use the builtin keyboard to type text into a text field. + * @param text + * @example await element(by.id('textField')).typeText('passcode'); + */ + typeText(text: string): Promise>; + /** + * Paste text into a text field. + * @param text + * @example await element(by.id('textField')).replaceText('passcode again'); + */ + replaceText(text: string): Promise>; + /** + * Clear text from a text field. + * @example await element(by.id('textField')).clearText(); + */ + clearText(): Promise>; + /** + * + * @param pixels + * @param direction + * @example + * await element(by.id('scrollView')).scroll(100, 'down'); + * await element(by.id('scrollView')).scroll(100, 'up'); + */ + scroll(pixels: number, direction: Direction): Promise>; + /** + * Scroll to edge. + * @param edge + * @example await element(by.id('scrollView')).scrollTo('bottom'); + * await element(by.id('scrollView')).scrollTo('top'); + */ + scrollTo(edge: Direction): Promise>; + /** + * + * @param direction + * @param speed + * @param percentage + * @example await element(by.id('scrollView')).swipe('down'); + * await element(by.id('scrollView')).swipe('down', 'fast'); + * await element(by.id('scrollView')).swipe('down', 'fast', 0.5); + */ + swipe( + direction: Direction, + speed?: Speed, + percentage?: number + ): Promise>; + /** + * (iOS Only) column - number of datepicker column (starts from 0) value - string value in setted column (must be correct) + * @param column + * @param value + * @example await expect(element(by.type('UIPickerView'))).toBeVisible(); + * await element(by.type('UIPickerView')).setColumnToValue(1,"6"); + * await element(by.type('UIPickerView')).setColumnToValue(2,"34"); + */ + setColumnToValue( + column: number, + value: string + ): Promise>; + } - type Direction = "left" | "right" | "top" | "bottom" | "up" | "down"; - type Orientation = "portrait" | "landscape"; - type Speed = "fast" | "slow"; + type Direction = "left" | "right" | "top" | "bottom" | "up" | "down"; + type Orientation = "portrait" | "landscape"; + type Speed = "fast" | "slow"; - interface DetoxInitOptions { - /** - * Detox exports device, expect, element, by and waitFor as globals by default, if you want to control their initialization manually, set init detox with initGlobals set to false. - * This is useful when during E2E tests you also need to run regular expectations in node. jest Expect for instance, will not be overriden by Detox when this option is used. - */ - initGlobals?: boolean; - /** - * By default await detox.init(config); will launch the installed app. If you wish to control when your app is launched, add {launchApp: false} param to your init. - */ - launchApp?: boolean; - } + interface DetoxInitOptions { + /** + * Detox exports device, expect, element, by and waitFor as globals by default, if you want to control their initialization manually, set init detox with initGlobals set to false. + * This is useful when during E2E tests you also need to run regular expectations in node. jest Expect for instance, will not be overriden by Detox when this option is used. + */ + initGlobals?: boolean; + /** + * By default await detox.init(config); will launch the installed app. If you wish to control when your app is launched, add {launchApp: false} param to your init. + */ + launchApp?: boolean; + } - interface DeviceLanchAppConfig { - /** - * Restart the app - * Terminate the app and launch it again. If set to false, the simulator will try to bring app from background, if the app isn't running, it will launch a new instance. default is false - */ - newInstance?: boolean; - /** - * Set runtime permissions - * Grant or deny runtime permissions for your application. - */ - permissions?: any; - /** - * Launch from URL - * Mock opening the app from URL to test your app's deep link handling mechanism. - */ - url?: any; - /** - * Launch with user notifications - */ - userNotification?: any; - /** - * Launch with user activity - */ - userActivity?: any; - /** - * Launch into a fresh installation - * A flag that enables relaunching into a fresh installation of the app (it will uninstall and install the binary again), default is false. - */ - delete?: boolean; - /** - * Detox can start the app with additional launch arguments - * The added launchArgs will be passed through the launch command to the device and be accessible via [[NSProcessInfo processInfo] arguments] - */ - launchArgs?: any; + interface DeviceLanchAppConfig { + /** + * Restart the app + * Terminate the app and launch it again. If set to false, the simulator will try to bring app from background, if the app isn't running, it will launch a new instance. default is false + */ + newInstance?: boolean; + /** + * Set runtime permissions + * Grant or deny runtime permissions for your application. + */ + permissions?: any; + /** + * Launch from URL + * Mock opening the app from URL to test your app's deep link handling mechanism. + */ + url?: any; + /** + * Launch with user notifications + */ + userNotification?: any; + /** + * Launch with user activity + */ + userActivity?: any; + /** + * Launch into a fresh installation + * A flag that enables relaunching into a fresh installation of the app (it will uninstall and install the binary again), default is false. + */ + delete?: boolean; + /** + * Detox can start the app with additional launch arguments + * The added launchArgs will be passed through the launch command to the device and be accessible via [[NSProcessInfo processInfo] arguments] + */ + launchArgs?: any; + } } } + +export { by, detox, device, element, expect, waitFor }; From 700298f03a177fd488245bd0d0a77212085cb0d3 Mon Sep 17 00:00:00 2001 From: Jeff Held Date: Thu, 8 Nov 2018 17:11:01 -0600 Subject: [PATCH 005/608] detox: add jest adapter definitions --- types/detox/runners/jest/adapters/index.d.ts | 9 +++++++ types/detox/tests/detox-jest-setup-tests.ts | 28 ++++++++++++++++++++ types/detox/tsconfig.json | 4 ++- 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 types/detox/runners/jest/adapters/index.d.ts create mode 100644 types/detox/tests/detox-jest-setup-tests.ts diff --git a/types/detox/runners/jest/adapters/index.d.ts b/types/detox/runners/jest/adapters/index.d.ts new file mode 100644 index 0000000000..ca195ae744 --- /dev/null +++ b/types/detox/runners/jest/adapters/index.d.ts @@ -0,0 +1,9 @@ +interface DetoxJestAdapter { + detox: Detox.Detox; + beforeEach: () => Promise; + afterAll: () => Promise; +} + +declare const adapter: DetoxJestAdapter; + +export default adapter; diff --git a/types/detox/tests/detox-jest-setup-tests.ts b/types/detox/tests/detox-jest-setup-tests.ts new file mode 100644 index 0000000000..002b5605bb --- /dev/null +++ b/types/detox/tests/detox-jest-setup-tests.ts @@ -0,0 +1,28 @@ +declare var beforeAll: (callback: () => void) => void; +declare var beforeEach: (callback: () => void) => void; +declare var afterAll: (callback: () => void) => void; + +import adapter from "detox/runners/jest/adapters"; + +// Normally the Detox configuration from the project's package.json like so: +// const config = require("./package.json").detox; +declare const config: any; + +beforeAll(async () => { + await detox.init(config); + + const initOptions: Detox.DetoxInitOptions = { + initGlobals: false, + launchApp: false, + }; + await detox.init(config, initOptions); +}); + +beforeEach(async () => { + await adapter.beforeEach(); +}); + +afterAll(async () => { + await adapter.afterAll(); + await detox.cleanup(); +}); diff --git a/types/detox/tsconfig.json b/types/detox/tsconfig.json index 3eb7524be2..9440443222 100644 --- a/types/detox/tsconfig.json +++ b/types/detox/tsconfig.json @@ -15,7 +15,9 @@ }, "files": [ "index.d.ts", + "runners/jest/adapters/index.d.ts", "tests/detox-globals-tests.ts", - "tests/detox-import-modules-tests.ts" + "tests/detox-import-modules-tests.ts", + "tests/detox-jest-setup-tests.ts" ] } From f627c9caf605e2c6bd920b79d87b17fd34a21c0b Mon Sep 17 00:00:00 2001 From: Jeff Held Date: Thu, 8 Nov 2018 17:11:13 -0600 Subject: [PATCH 006/608] detox: add mocha adapter definitions --- types/detox/runners/mocha/adapters/index.d.ts | 9 ++++++ .../detox-global-tests.ts} | 0 .../{tests => test}/detox-jest-setup-tests.ts | 0 types/detox/test/detox-mocha-setup-tests.ts | 32 +++++++++++++++++++ .../detox-module-tests.ts} | 0 types/detox/tsconfig.json | 8 +++-- 6 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 types/detox/runners/mocha/adapters/index.d.ts rename types/detox/{tests/detox-globals-tests.ts => test/detox-global-tests.ts} (100%) rename types/detox/{tests => test}/detox-jest-setup-tests.ts (100%) create mode 100644 types/detox/test/detox-mocha-setup-tests.ts rename types/detox/{tests/detox-import-modules-tests.ts => test/detox-module-tests.ts} (100%) diff --git a/types/detox/runners/mocha/adapters/index.d.ts b/types/detox/runners/mocha/adapters/index.d.ts new file mode 100644 index 0000000000..8e13b3bc01 --- /dev/null +++ b/types/detox/runners/mocha/adapters/index.d.ts @@ -0,0 +1,9 @@ +interface DetoxMochaAdapter { + detox: Detox.Detox; + beforeEach: (context: any) => Promise; + afterEach: (context: any) => Promise; +} + +declare const adapter: DetoxMochaAdapter; + +export default adapter; diff --git a/types/detox/tests/detox-globals-tests.ts b/types/detox/test/detox-global-tests.ts similarity index 100% rename from types/detox/tests/detox-globals-tests.ts rename to types/detox/test/detox-global-tests.ts diff --git a/types/detox/tests/detox-jest-setup-tests.ts b/types/detox/test/detox-jest-setup-tests.ts similarity index 100% rename from types/detox/tests/detox-jest-setup-tests.ts rename to types/detox/test/detox-jest-setup-tests.ts diff --git a/types/detox/test/detox-mocha-setup-tests.ts b/types/detox/test/detox-mocha-setup-tests.ts new file mode 100644 index 0000000000..3f502d1391 --- /dev/null +++ b/types/detox/test/detox-mocha-setup-tests.ts @@ -0,0 +1,32 @@ +// tslint:disable:only-arrow-functions + +declare var before: (callback: () => void) => void; +declare var beforeEach: (callback: () => void) => void; +declare var after: (callback: () => void) => void; +declare var afterEach: (callback: () => void) => void; + +import adapter from "detox/runners/mocha/adapters"; + +// Normally the Detox configuration from the project's package.json like so: +// const config = require("./package.json").detox; +declare const config: any; + +// Normally, the beforeEach and afterEach function should take `this` as its argument, +// but `this` cannot be used since it doesn't have a type signature (and therefore always implicltly any) +declare const context: any; + +before(async function() { + await detox.init(config); +}); + +beforeEach(async function() { + await adapter.beforeEach(context); +}); + +afterEach(async function() { + await adapter.afterEach(context); +}); + +after(async function() { + await detox.cleanup(); +}); diff --git a/types/detox/tests/detox-import-modules-tests.ts b/types/detox/test/detox-module-tests.ts similarity index 100% rename from types/detox/tests/detox-import-modules-tests.ts rename to types/detox/test/detox-module-tests.ts diff --git a/types/detox/tsconfig.json b/types/detox/tsconfig.json index 9440443222..7be4d3bb9e 100644 --- a/types/detox/tsconfig.json +++ b/types/detox/tsconfig.json @@ -16,8 +16,10 @@ "files": [ "index.d.ts", "runners/jest/adapters/index.d.ts", - "tests/detox-globals-tests.ts", - "tests/detox-import-modules-tests.ts", - "tests/detox-jest-setup-tests.ts" + "runners/mocha/adapters/index.d.ts", + "test/detox-global-tests.ts", + "test/detox-module-tests.ts", + "test/detox-jest-setup-tests.ts", + "test/detox-mocha-setup-tests.ts" ] } From 53db0897816810df904fbbbbda46fef65a1c1e1a Mon Sep 17 00:00:00 2001 From: Yann Normand Date: Fri, 9 Nov 2018 15:14:19 +1000 Subject: [PATCH 007/608] add a new generic for resource type --- types/react-big-calendar/index.d.ts | 28 +++++++-------- .../react-big-calendar-tests.tsx | 35 ++++++++++++++++--- 2 files changed, 44 insertions(+), 19 deletions(-) diff --git a/types/react-big-calendar/index.d.ts b/types/react-big-calendar/index.d.ts index bbfd7047ec..eba901bfc9 100644 --- a/types/react-big-calendar/index.d.ts +++ b/types/react-big-calendar/index.d.ts @@ -171,19 +171,19 @@ export class DateLocalizer { format(value: FormatInput, format: string, culture: Culture): string; } -export interface BigCalendarProps extends React.Props> { +export interface BigCalendarProps extends React.Props> { localizer: DateLocalizer; date?: stringOrDate; now?: Date; view?: View; - events?: T[]; + events?: TEvent[]; onNavigate?: (newDate: Date, action: Navigate) => void; onView?: (view: View) => void; onDrillDown?: (date: Date, view: View) => void; onSelectSlot?: (slotInfo: { start: stringOrDate, end: stringOrDate, slots: Date[] | string[], action: 'select' | 'click' | 'doubleClick' }) => void; - onDoubleClickEvent?: (event: T, e: React.SyntheticEvent) => void; - onSelectEvent?: (event: T, e: React.SyntheticEvent) => void; + onDoubleClickEvent?: (event: TEvent, e: React.SyntheticEvent) => void; + onSelectEvent?: (event: TEvent, e: React.SyntheticEvent) => void; onSelecting?: (range: { start: stringOrDate, end: stringOrDate }) => boolean | undefined | null; selected?: any; views?: View[] | { @@ -202,7 +202,7 @@ export interface BigCalendarProps extends React.Props { className?: string, style?: React.CSSProperties }; + eventPropGetter?: (event: TEvent, start: stringOrDate, end: stringOrDate, isSelected: boolean) => { className?: string, style?: React.CSSProperties }; slotPropGetter?: (date: Date) => { className?: string, style?: object }; dayPropGetter?: (date: Date) => { className?: string, style?: object }; showMultiDayTimes?: boolean; @@ -213,14 +213,14 @@ export interface BigCalendarProps extends React.Props string); - allDayAccessor?: keyof T | ((event: T) => boolean); - startAccessor?: keyof T | ((event: T) => Date); - endAccessor?: keyof T | ((event: T) => Date); - resourceAccessor?: keyof T | ((event: T) => any); - resources?: any[]; - resourceIdAccessor?: keyof T | ((event: T) => any); - resourceTitleAccessor?: keyof T | ((event: T) => string); + titleAccessor?: keyof TEvent | ((event: TEvent) => string); + allDayAccessor?: keyof TEvent | ((event: TEvent) => boolean); + startAccessor?: keyof TEvent | ((event: TEvent) => Date); + endAccessor?: keyof TEvent | ((event: TEvent) => Date); + resourceAccessor?: keyof TEvent | ((event: TEvent) => any); + resources?: TResource[]; + resourceIdAccessor?: keyof TResource | ((resource: TResource) => any); + resourceTitleAccessor?: keyof TResource | ((resource: TResource) => string); defaultView?: View; defaultDate?: Date; className?: string; @@ -237,7 +237,7 @@ export interface MoveOptions { today: Date; } -export default class BigCalendar extends React.Component> { +export default class BigCalendar extends React.Component> { components: { dateCellWrapper: React.ComponentType, dayWrapper: React.ComponentType, diff --git a/types/react-big-calendar/react-big-calendar-tests.tsx b/types/react-big-calendar/react-big-calendar-tests.tsx index e1b561901e..e50858c546 100644 --- a/types/react-big-calendar/react-big-calendar-tests.tsx +++ b/types/react-big-calendar/react-big-calendar-tests.tsx @@ -17,13 +17,25 @@ class CalendarEvent { start: Date; end: Date; desc: string; + resourceId?: string; - constructor(_title: string, _start: Date, _end: Date, _allDay?: boolean, _desc?: string) { + constructor(_title: string, _start: Date, _end: Date, _allDay?: boolean, _desc?: string, _resourceId?: string) { this.title = _title; this.allDay = _allDay || false; this.start = _start; this.end = _end; this.desc = _desc || ''; + this.resourceId = _resourceId; + } +} + +class CalendarResource { + title: string; + id: string; + + constructor(id: string, title: string) { + this.id = id; + this.title = title; } } @@ -51,10 +63,10 @@ class CalendarEvent { { // Full API Example Test - based on API Documentation // http://intljusticemission.github.io/react-big-calendar/examples/index.html#api - class FullAPIExample extends React.Component> { + class FullAPIExample extends React.Component> { render() { return ( - {...this.props} date={new Date()} view={'day'} @@ -81,9 +93,9 @@ class CalendarEvent { rtl={true} eventPropGetter={(event, start, end, isSelected) => ({ className: 'some-class' })} titleAccessor={'title'} - allDayAccessor={(event: any) => !!event.allDay} + allDayAccessor={(event: CalendarEvent) => !!event.allDay} startAccessor={'start'} - endAccessor={(event: any) => event.end || event.start} + endAccessor={(event: CalendarEvent) => event.end || event.start} min={new Date()} max={new Date()} scrollToTime={new Date()} @@ -106,6 +118,10 @@ class CalendarEvent { dayPropGetter={customDayPropGetter} slotPropGetter={customSlotPropGetter} defaultDate={new Date()} + resources={getResources()} + resourceAccessor={event => event.resourceId} + resourceIdAccessor={resource => resource.id} + resourceTitleAccessor={resource => resource.title} /> ); } @@ -130,10 +146,19 @@ function getEvents(): CalendarEvent[] { new CalendarEvent('Happy Hour', new Date(2015, 3, 12, 17, 0, 0, 0), new Date(2015, 3, 12, 17, 30, 0, 0), undefined, 'Most important meal of the day'), new CalendarEvent('Dinner', new Date(2015, 3, 12, 20, 0, 0, 0), new Date(2015, 3, 12, 21, 0, 0, 0)), new CalendarEvent('Birthday Party', new Date(2015, 3, 13, 7, 0, 0), new Date(2015, 3, 13, 10, 30, 0)), + new CalendarEvent('Alice\'s break', new Date(2015, 3, 14, 20, 0, 0, 0), new Date(2015, 3, 14, 21, 0, 0, 0), undefined, undefined, "alice"), + new CalendarEvent('Bob\'s break', new Date(2015, 3, 15, 7, 0, 0), new Date(2015, 3, 15, 10, 30, 0), undefined, undefined, "bob"), ]; return events; } +function getResources(): CalendarResource[] { + return [ + new CalendarResource('alice', 'Alice'), + new CalendarResource('bob', 'Bob') + ]; +} + class EventAgenda extends React.Component { render() { // const { label } = this.props; From fe1169f35d5b0b9f577674f6c1ea0e34f58871af Mon Sep 17 00:00:00 2001 From: Yann Normand Date: Fri, 9 Nov 2018 16:30:58 +1000 Subject: [PATCH 008/608] upgrade to TypeScript Version 2.9 --- types/react-big-calendar/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-big-calendar/index.d.ts b/types/react-big-calendar/index.d.ts index eba901bfc9..e7faf76ff4 100644 --- a/types/react-big-calendar/index.d.ts +++ b/types/react-big-calendar/index.d.ts @@ -6,7 +6,7 @@ // Sebastian Silbermann // Paul Potsides // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 +// TypeScript Version: 2.9 import { Validator } from 'prop-types'; import * as React from 'react'; From 6ffd9f2bc60165a597b34cc1ea55ee823fccc851 Mon Sep 17 00:00:00 2001 From: Yann Normand Date: Fri, 9 Nov 2018 16:33:24 +1000 Subject: [PATCH 009/608] fix onNavigate function --- types/react-big-calendar/index.d.ts | 2 +- types/react-big-calendar/react-big-calendar-tests.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/types/react-big-calendar/index.d.ts b/types/react-big-calendar/index.d.ts index e7faf76ff4..0e7da106c2 100644 --- a/types/react-big-calendar/index.d.ts +++ b/types/react-big-calendar/index.d.ts @@ -178,7 +178,7 @@ export interface BigCalendarProps void; + onNavigate?: (newDate: Date, view: View, action: Navigate) => void; onView?: (view: View) => void; onDrillDown?: (date: Date, view: View) => void; onSelectSlot?: (slotInfo: { start: stringOrDate, end: stringOrDate, slots: Date[] | string[], action: 'select' | 'click' | 'doubleClick' }) => void; diff --git a/types/react-big-calendar/react-big-calendar-tests.tsx b/types/react-big-calendar/react-big-calendar-tests.tsx index e50858c546..4b80e8a72c 100644 --- a/types/react-big-calendar/react-big-calendar-tests.tsx +++ b/types/react-big-calendar/react-big-calendar-tests.tsx @@ -71,7 +71,7 @@ class CalendarResource { date={new Date()} view={'day'} events={getEvents()} - onNavigate={(newDate: Date, action: Navigate) => { }} + onNavigate={(newDate: Date, view: View, action: Navigate) => { }} onView={(view: View) => { }} onSelectSlot={(slotInfo) => { const start = slotInfo.start; From f18851bea8e67645232633c8c88321add78a1822 Mon Sep 17 00:00:00 2001 From: Bryan Smith Date: Fri, 16 Nov 2018 10:35:29 -0800 Subject: [PATCH 010/608] Add onBeforeInput form events. --- types/react/index.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/types/react/index.d.ts b/types/react/index.d.ts index 332d3ac640..2a1c7baf7b 100644 --- a/types/react/index.d.ts +++ b/types/react/index.d.ts @@ -808,6 +808,8 @@ declare namespace React { // Form Events onChange?: FormEventHandler; onChangeCapture?: FormEventHandler; + onBeforeInput?: FormEventHandler; + onBeforeInputCapture?: FormEventHandler; onInput?: FormEventHandler; onInputCapture?: FormEventHandler; onReset?: FormEventHandler; From 7364d8937f28c0460ff0eefd3ee1a3e7bd6393e3 Mon Sep 17 00:00:00 2001 From: HokieGeek Date: Fri, 16 Nov 2018 15:30:20 -0500 Subject: [PATCH 011/608] @types/lunr: Updated Builder functions to add new optional arguments --- types/lunr/index.d.ts | 17 +++++++++++++---- types/lunr/lunr-tests.ts | 7 +++++++ 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/types/lunr/index.d.ts b/types/lunr/index.d.ts index da87ae95d8..415c7c1d8f 100644 --- a/types/lunr/index.d.ts +++ b/types/lunr/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for lunr.js 2.1 +// Type definitions for lunr.js 2.3 // Project: https://github.com/olivernn/lunr.js -// Definitions by: Sean Tan +// Definitions by: Sean Tan , Andrés Pérez // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -127,9 +127,14 @@ declare namespace lunr { * All fields should be added before adding documents to the index. Adding fields after * a document has been indexed will have no effect on already indexed documents. * + * Fields can be boosted at build time. This allows terms within that field to have more + * importance when ranking search results. Use a field boost to specify that matches + * within one field are more important than other fields. + * * @param field - The name of a field to index in all documents. + * @param attributes - Optional attributes associated with this field. */ - field(field: string): void; + field(field: string, attributes?: object): void; /** * A parameter to tune the amount of field length normalisation that is applied when @@ -160,9 +165,13 @@ declare namespace lunr { * it should have all fields defined for indexing, though null or undefined values will not * cause errors. * + * Entire documents can be boosted at build time. Applying a boost to a document indicates that + * this document should rank higher in search results than other documents. + * * @param doc - The document to add to the index. + * @param attributes - Optional attributes associated with this document. */ - add(doc: object): void; + add(doc: object, attributes?: object): void; /** * Builds the index, creating an instance of lunr.Index. diff --git a/types/lunr/lunr-tests.ts b/types/lunr/lunr-tests.ts index ade45cae64..a14fd1947f 100644 --- a/types/lunr/lunr-tests.ts +++ b/types/lunr/lunr-tests.ts @@ -4,11 +4,18 @@ function basic_test() { const index = lunr(function() { this.field("title"); this.field("body"); + this.field("content", { + boost: 2, + extractor: (doc: object) => "oof" + }); this.ref("id"); this.add({ id: 1, title: "Foo", body: "Foo foo foo!" + }, + { + boost: 2 }); this.add({ id: 2, From a7e72529b207c1529dd2ad7707f154ac0e359b86 Mon Sep 17 00:00:00 2001 From: robbywashere Date: Fri, 16 Nov 2018 22:16:01 -0500 Subject: [PATCH 012/608] Update to types/recompose package withStateHandler to give stateUpdaters typed arguments rather than --- types/recompose/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/recompose/index.d.ts b/types/recompose/index.d.ts index 6f61888954..edb8ef9415 100644 --- a/types/recompose/index.d.ts +++ b/types/recompose/index.d.ts @@ -151,7 +151,7 @@ declare module 'recompose' { [updaterName: string]: StateHandler; }; type StateUpdaters = { - [updaterName in keyof TUpdaters]: (state: TState, props: TOutter) => StateHandler; + [updaterName in keyof TUpdaters]: (state: TState, props: TOutter) => TUpdaters[updaterName]; }; export function withStateHandlers, TOutter = {}>( createProps: TState | mapper, From 8e0be6712ba2c19b495ffc32b8ffb37ff8eb21f6 Mon Sep 17 00:00:00 2001 From: denis Date: Sat, 17 Nov 2018 11:05:38 +0100 Subject: [PATCH 013/608] Fix no-angle-bracket-type-assertion --- types/d3-brush/d3-brush-tests.ts | 2 +- types/d3-drag/d3-drag-tests.ts | 6 +++--- types/d3-selection/d3-selection-tests.ts | 2 +- types/d3-selection/tslint.json | 1 - types/d3-zoom/d3-zoom-tests.ts | 8 ++++---- types/d3-zoom/tslint.json | 1 - types/d3kit/d3kit-tests.ts | 4 ++-- 7 files changed, 11 insertions(+), 13 deletions(-) diff --git a/types/d3-brush/d3-brush-tests.ts b/types/d3-brush/d3-brush-tests.ts index dc2c9a0dc8..c5a287b562 100644 --- a/types/d3-brush/d3-brush-tests.ts +++ b/types/d3-brush/d3-brush-tests.ts @@ -48,7 +48,7 @@ brush = brush.extent(function(d, i, group) { // chainable brush = brush.filter(function(d, i, group) { // Cast d3 event to D3ZoomEvent to be used in filter logic - const e = > event; + const e = event as d3Brush.D3BrushEvent; console.log('Owner SVG Element of svg group: ', this.ownerSVGElement); // this is of type SVGGElement return e.sourceEvent.type !== 'zoom' || !d.filterZoomEvent; // datum type is BrushDatum (as propagated to SVGGElement with brush event attached) diff --git a/types/d3-drag/d3-drag-tests.ts b/types/d3-drag/d3-drag-tests.ts index cf5428e7e2..5e376c003b 100644 --- a/types/d3-drag/d3-drag-tests.ts +++ b/types/d3-drag/d3-drag-tests.ts @@ -134,7 +134,7 @@ touchableFn = circleDrag.touchable(); circleCustomDrag.subject(function(d, i, g) { // Cast event type for completeness, otherwise event is of type any. - const e = > event; + const e = event as d3Drag.D3DragEvent; const that: SVGCircleElement = this; const datum: CircleDatum = d; const index: number = i; @@ -163,14 +163,14 @@ subjectAccessor = circleCustomDrag.subject(); function dragstarted(this: SVGCircleElement, d: CircleDatum) { // cast d3 event to drag event. Otherwise, d3 event is currently defined as type 'any' - const e = > event; + const e = event as d3Drag.D3DragEvent; e.sourceEvent.stopPropagation(); select(this).classed('dragging', true); } function dragged(this: SVGCircleElement, d: CircleDatum) { // cast d3 event to drag event. Otherwise, d3 event is currently defined as type 'any' - const e = > event; + const e = event as d3Drag.D3DragEvent; select(this).attr('cx', d.x = e.x).attr('cy', d.y = e.y); } diff --git a/types/d3-selection/d3-selection-tests.ts b/types/d3-selection/d3-selection-tests.ts index bafc1aeb11..092e8bfa5a 100644 --- a/types/d3-selection/d3-selection-tests.ts +++ b/types/d3-selection/d3-selection-tests.ts @@ -1060,7 +1060,7 @@ interface SuccessEvent { const successEvent = { type: 'wonEuro2016', team: 'Island' }; function customListener(this: HTMLBodyElement | null, finalOpponent: string): string { - const e = d3Selection.event; + const e = d3Selection.event as SuccessEvent; return `${e.team} defeated ${finalOpponent} in the EURO 2016 Cup. Who would have thought!!!`; } diff --git a/types/d3-selection/tslint.json b/types/d3-selection/tslint.json index c89636b4b7..26ee29cf50 100644 --- a/types/d3-selection/tslint.json +++ b/types/d3-selection/tslint.json @@ -2,7 +2,6 @@ "extends": "dtslint/dt.json", "rules": { // TODO - "no-angle-bracket-type-assertion": false, "no-this-assignment": false, "unified-signatures": false, "no-unnecessary-generics": false diff --git a/types/d3-zoom/d3-zoom-tests.ts b/types/d3-zoom/d3-zoom-tests.ts index 19a16930d6..c758e83448 100644 --- a/types/d3-zoom/d3-zoom-tests.ts +++ b/types/d3-zoom/d3-zoom-tests.ts @@ -91,7 +91,7 @@ interface GroupDatum { function zoomedCanvas(this: HTMLCanvasElement, d: CanvasDatum) { // Cast d3 event to D3ZoomEvent to be used in zoom event handler - const e = > event; + const e = event as d3Zoom.D3ZoomEvent; if (context) { context.save(); context.clearRect(0, 0, this.width, this.height); // this element @@ -112,7 +112,7 @@ canvasZoom = d3Zoom.zoom() function zoomedSVGOverlay(this: SVGRectElement) { // Cast d3 event to D3ZoomEvent to be used in zoom event handler - const e = > event; + const e = event as d3Zoom.D3ZoomEvent; g.attr('transform', e.transform.toString()); } @@ -146,7 +146,7 @@ constraintFn = svgZoom.constrain(); // chainable svgZoom = svgZoom.filter(function(d, i, group) { // Cast d3 event to D3ZoomEvent to be used in filter logic - const e = > event; + const e = event as d3Zoom.D3ZoomEvent; console.log('Overlay Rectangle width: ', this.width.baseVal.value); // this typing is SVGRectElement return e.sourceEvent.type !== 'brush' || !d.filterBrushEvent; // datum type is SVGDatum (as propagated to SVGRectElement with zoom event attached) @@ -178,7 +178,7 @@ touchableFn = svgZoom.touchable(); // chainable svgZoom = svgZoom.wheelDelta(function(d, i, group) { // Cast d3 event to D3ZoomEvent to be used in filter logic - const e = event; + const e = event as WheelEvent; const that: SVGRectElement = this; const datum: SVGDatum = d; const index: number = i; diff --git a/types/d3-zoom/tslint.json b/types/d3-zoom/tslint.json index c89636b4b7..26ee29cf50 100644 --- a/types/d3-zoom/tslint.json +++ b/types/d3-zoom/tslint.json @@ -2,7 +2,6 @@ "extends": "dtslint/dt.json", "rules": { // TODO - "no-angle-bracket-type-assertion": false, "no-this-assignment": false, "unified-signatures": false, "no-unnecessary-generics": false diff --git a/types/d3kit/d3kit-tests.ts b/types/d3kit/d3kit-tests.ts index ec3b2de1ce..705b9fcc59 100644 --- a/types/d3kit/d3kit-tests.ts +++ b/types/d3kit/d3kit-tests.ts @@ -304,7 +304,7 @@ function test_svg_chart() { * Test plate functions */ plate = new d3kit.SvgPlate(); - plate = chart.addPlate('a-plate', plate, true); // with doNotAppend + plate = chart.addPlate('a-plate', plate, true) as d3kit.SvgPlate; // with doNotAppend chart = chart.addPlate('a-plate', plate); // without doNotAppend chart = chart.removePlate('a-plate'); @@ -381,7 +381,7 @@ function test_hybrid_chart() { * Test plate functions */ plate = new d3kit.SvgPlate(); - plate = chart.addPlate('a-plate', plate, true); // with doNotAppend + plate = chart.addPlate('a-plate', plate, true) as d3kit.SvgPlate; // with doNotAppend chart = chart.addPlate('a-plate', plate); // without doNotAppend chart = chart.removePlate('a-plate'); From 55f32e23822c29c4fb3c46bba5357f8585a2a0f1 Mon Sep 17 00:00:00 2001 From: Rhys van der Waerden Date: Mon, 19 Nov 2018 10:59:20 +1100 Subject: [PATCH 014/608] Remove zopfli options https://github.com/webpack-contrib/compression-webpack-plugin/pull/65 --- types/compression-webpack-plugin/index.d.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/types/compression-webpack-plugin/index.d.ts b/types/compression-webpack-plugin/index.d.ts index a7b38383ef..b0416ca8b0 100644 --- a/types/compression-webpack-plugin/index.d.ts +++ b/types/compression-webpack-plugin/index.d.ts @@ -22,14 +22,6 @@ declare namespace CompressionPlugin { threshold?: number; minRatio?: number; - // zopfli options - verbose?: boolean; - verbose_more?: boolean; - numiterations?: number; - blocksplitting?: boolean; - blocksplittinglast?: boolean; - blocksplittingmax?: number; - // zlib options level?: number; flush?: number; From ceee1391c7e05e2c46eaef0deedfb8febe3ba432 Mon Sep 17 00:00:00 2001 From: Rhys van der Waerden Date: Mon, 19 Nov 2018 11:51:13 +1100 Subject: [PATCH 015/608] compression-webpack-plugin: Support custom algorithm Had to bump the TypeScript version to detect correct option type based on `algorithm` argument. --- .../compression-webpack-plugin-tests.ts | 53 ++++++++++++++++++- types/compression-webpack-plugin/index.d.ts | 37 ++++++++----- 2 files changed, 75 insertions(+), 15 deletions(-) diff --git a/types/compression-webpack-plugin/compression-webpack-plugin-tests.ts b/types/compression-webpack-plugin/compression-webpack-plugin-tests.ts index 423ca4cea7..e162a6bcb2 100644 --- a/types/compression-webpack-plugin/compression-webpack-plugin-tests.ts +++ b/types/compression-webpack-plugin/compression-webpack-plugin-tests.ts @@ -1,7 +1,9 @@ import { Configuration } from 'webpack'; import CompressionPlugin = require('compression-webpack-plugin'); -const c: Configuration = { +new CompressionPlugin(); + +const config: Configuration = { plugins: [ new CompressionPlugin({ asset: "[path].gz[query]", @@ -13,3 +15,52 @@ const c: Configuration = { }) ] }; + +const configDefaultAlgo = new CompressionPlugin({ + compressionOptions: { level: 7 } +}); + +const zlib: Configuration = { + plugins: [ + new CompressionPlugin({ + algorithm: "deflate", + compressionOptions: { + flush: 5, + windowBits: 20, + level: 7 + } + }) + ] +}; + +const badZlib: Configuration = { + plugins: [ + // $ExpectError + new CompressionPlugin({ + algorithm: "deflate", + compressionOptions: 5 + }) + ] +}; + +function customAlgorithm(input: string, options: number, callback: (err: Error, result: Buffer) => void) { +} + +const custom: Configuration = { + plugins: [ + new CompressionPlugin({ + algorithm: customAlgorithm, + compressionOptions: 5 + }) + ] +}; + +const badCustom: Configuration = { + plugins: [ + // $ExpectError + new CompressionPlugin({ + algorithm: customAlgorithm, + compressionOptions: { flush: 5 } + }) + ] +}; diff --git a/types/compression-webpack-plugin/index.d.ts b/types/compression-webpack-plugin/index.d.ts index b0416ca8b0..9c66248776 100644 --- a/types/compression-webpack-plugin/index.d.ts +++ b/types/compression-webpack-plugin/index.d.ts @@ -2,33 +2,42 @@ // Project: https://github.com/webpack-contrib/compression-webpack-plugin // Definitions by: Anton Kandybo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.4 import { Plugin } from 'webpack'; +import { ZlibOptions as ZlibCompressionOptions } from 'zlib'; export = CompressionPlugin; -declare class CompressionPlugin extends Plugin { - constructor(options?: CompressionPlugin.Options); +declare class CompressionPlugin extends Plugin { + constructor(options?: CompressionPlugin.Options); } declare namespace CompressionPlugin { - interface Options { + type AlgorithmCallback = (error: Error | null, result: Buffer) => void; + type Algorithm = (source: string, options: O, callback: AlgorithmCallback) => void; + + // NOTE: These are the compression algorithms exported by zlib. + type ZlibAlgorithm = 'deflate' | 'deflateRaw' | 'gzip'; + + interface BaseOptions { asset?: string; - algorithm?: string; cache?: boolean | string; test?: RegExp | RegExp[]; regExp?: RegExp | RegExp[]; threshold?: number; minRatio?: number; - - // zlib options - level?: number; - flush?: number; - chunkSize?: number; - windowBits?: number; - memLevel?: number; - strategy?: number; - dictionary?: any; } + + interface ZlibOptions extends BaseOptions { + algorithm?: ZlibAlgorithm; + compressionOptions?: ZlibCompressionOptions; + } + + interface CustomOptions extends BaseOptions { + algorithm: Algorithm; + compressionOptions?: O; + } + + type Options = ZlibOptions | CustomOptions; } From 3fc7e124637a16d269db2640fe40e9c4ddbc024a Mon Sep 17 00:00:00 2001 From: Rhys van der Waerden Date: Mon, 19 Nov 2018 11:56:16 +1100 Subject: [PATCH 016/608] compression-webpack-plugin: asset -> filename --- .../compression-webpack-plugin-tests.ts | 5 ++++- types/compression-webpack-plugin/index.d.ts | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/types/compression-webpack-plugin/compression-webpack-plugin-tests.ts b/types/compression-webpack-plugin/compression-webpack-plugin-tests.ts index e162a6bcb2..44662c4177 100644 --- a/types/compression-webpack-plugin/compression-webpack-plugin-tests.ts +++ b/types/compression-webpack-plugin/compression-webpack-plugin-tests.ts @@ -6,7 +6,7 @@ new CompressionPlugin(); const config: Configuration = { plugins: [ new CompressionPlugin({ - asset: "[path].gz[query]", + filename: "[path].gz[query]", algorithm: "gzip", cache: true, test: /\.js$|\.html$/, @@ -20,6 +20,9 @@ const configDefaultAlgo = new CompressionPlugin({ compressionOptions: { level: 7 } }); +// $ExpectError +new CompressionPlugin({ asset: "[path].gz[query]" }); + const zlib: Configuration = { plugins: [ new CompressionPlugin({ diff --git a/types/compression-webpack-plugin/index.d.ts b/types/compression-webpack-plugin/index.d.ts index 9c66248776..4a6ccd290e 100644 --- a/types/compression-webpack-plugin/index.d.ts +++ b/types/compression-webpack-plugin/index.d.ts @@ -21,7 +21,7 @@ declare namespace CompressionPlugin { type ZlibAlgorithm = 'deflate' | 'deflateRaw' | 'gzip'; interface BaseOptions { - asset?: string; + filename?: string; cache?: boolean | string; test?: RegExp | RegExp[]; regExp?: RegExp | RegExp[]; From d74799987561f76db932b4bc40cfb814289101dc Mon Sep 17 00:00:00 2001 From: Rhys van der Waerden Date: Mon, 19 Nov 2018 12:08:39 +1100 Subject: [PATCH 017/608] compression-webpack-plugin: Update options - Add `include`/`exclude` - Remove `regExp` which was undocumented (possibly always wrong?) - Add `deleteOriginalAssets` - Prefer `ReadonlyArray` for string/regex options --- .../compression-webpack-plugin-tests.ts | 11 +++++++++-- types/compression-webpack-plugin/index.d.ts | 13 ++++++++----- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/types/compression-webpack-plugin/compression-webpack-plugin-tests.ts b/types/compression-webpack-plugin/compression-webpack-plugin-tests.ts index 44662c4177..a679b7f599 100644 --- a/types/compression-webpack-plugin/compression-webpack-plugin-tests.ts +++ b/types/compression-webpack-plugin/compression-webpack-plugin-tests.ts @@ -3,15 +3,22 @@ import CompressionPlugin = require('compression-webpack-plugin'); new CompressionPlugin(); +new CompressionPlugin({ + include: ["a"] as ReadonlyArray, + exclude: [/a/g] as ReadonlyArray, + test: "a", +}); + const config: Configuration = { plugins: [ new CompressionPlugin({ - filename: "[path].gz[query]", algorithm: "gzip", cache: true, + filename: "[path].gz[query]", + minRatio: 0.8, test: /\.js$|\.html$/, threshold: 10240, - minRatio: 0.8 + deleteOriginalAssets: true }) ] }; diff --git a/types/compression-webpack-plugin/index.d.ts b/types/compression-webpack-plugin/index.d.ts index 4a6ccd290e..8c399bbdd5 100644 --- a/types/compression-webpack-plugin/index.d.ts +++ b/types/compression-webpack-plugin/index.d.ts @@ -17,16 +17,19 @@ declare namespace CompressionPlugin { type AlgorithmCallback = (error: Error | null, result: Buffer) => void; type Algorithm = (source: string, options: O, callback: AlgorithmCallback) => void; - // NOTE: These are the compression algorithms exported by zlib. + // NOTE: These are the async compression algorithms on the zlib object. type ZlibAlgorithm = 'deflate' | 'deflateRaw' | 'gzip'; + type Pattern = string | RegExp | ReadonlyArray | ReadonlyArray; interface BaseOptions { - filename?: string; cache?: boolean | string; - test?: RegExp | RegExp[]; - regExp?: RegExp | RegExp[]; - threshold?: number; + deleteOriginalAssets?: boolean; + exclude?: Pattern; + filename?: string; + include?: Pattern; minRatio?: number; + test?: Pattern; + threshold?: number; } interface ZlibOptions extends BaseOptions { From 2087e1b9f13248e441fc923ab638a23bec69255c Mon Sep 17 00:00:00 2001 From: Rhys van der Waerden Date: Mon, 19 Nov 2018 12:09:14 +1100 Subject: [PATCH 018/608] compression-webpack-plugin: Add myself --- types/compression-webpack-plugin/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/compression-webpack-plugin/index.d.ts b/types/compression-webpack-plugin/index.d.ts index 8c399bbdd5..b03b655c69 100644 --- a/types/compression-webpack-plugin/index.d.ts +++ b/types/compression-webpack-plugin/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for compression-webpack-plugin 0.4 // Project: https://github.com/webpack-contrib/compression-webpack-plugin // Definitions by: Anton Kandybo +// Rhys van der Waerden // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.4 From f69b9883f0ab04fdb4c2d057f8a3b16ec288782e Mon Sep 17 00:00:00 2001 From: Rhys van der Waerden Date: Mon, 19 Nov 2018 12:13:49 +1100 Subject: [PATCH 019/608] compression-webpack-plugin: Bump version number --- types/compression-webpack-plugin/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/compression-webpack-plugin/index.d.ts b/types/compression-webpack-plugin/index.d.ts index b03b655c69..5d72f1fca8 100644 --- a/types/compression-webpack-plugin/index.d.ts +++ b/types/compression-webpack-plugin/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for compression-webpack-plugin 0.4 +// Type definitions for compression-webpack-plugin 2.0 // Project: https://github.com/webpack-contrib/compression-webpack-plugin // Definitions by: Anton Kandybo // Rhys van der Waerden From ead05a22eb89d1a00082c4eb62e8f6393c58399c Mon Sep 17 00:00:00 2001 From: Esteban Ibarra Date: Mon, 19 Nov 2018 08:19:12 -0500 Subject: [PATCH 020/608] Fix children type for react-native-dialog (#1) * Fix children type for react-native-dialog --- types/react-native-dialog/index.d.ts | 4 +++- .../react-native-dialog-tests.tsx | 20 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/types/react-native-dialog/index.d.ts b/types/react-native-dialog/index.d.ts index 10e977f420..14d7458140 100644 --- a/types/react-native-dialog/index.d.ts +++ b/types/react-native-dialog/index.d.ts @@ -1,6 +1,8 @@ // Type definitions for react-native-dialog 4.0 // Project: https://github.com/mmazzarolo/react-native-dialog // Definitions by: MrLuje +// Stack Builders +// Esteban Ibarra // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -32,7 +34,7 @@ interface ButtonProps { interface ContainerProps { blurComponentIOS?: ReactNode; - children: JSX.Element[]; + children: React.ReactNode[]; /** * default: false */ diff --git a/types/react-native-dialog/react-native-dialog-tests.tsx b/types/react-native-dialog/react-native-dialog-tests.tsx index 151ee14af5..544025051c 100644 --- a/types/react-native-dialog/react-native-dialog-tests.tsx +++ b/types/react-native-dialog/react-native-dialog-tests.tsx @@ -2,6 +2,24 @@ import Dialog from "react-native-dialog"; import { createRef, Component } from "react"; class Example extends Component { + dynamicButtons() { + const buttonFunc = () => console.log('click'); + const buttons = [ + { label: 'Button 1', action: buttonFunc }, + { label: 'Button 2', action: buttonFunc }, + ]; + return buttons.map(({ label , action }) => + + ); + } + + singleButton() { + return ( null} />); + } + render() { const ref = createRef(); @@ -23,6 +41,8 @@ class Example extends Component { label="Validate" onPress={() => console.log("test")} /> + {this.dynamicButtons()} + {this.singleButton()} ); } From 2437acbc1cad793b1596fc0e3e5ed5318b0a8da9 Mon Sep 17 00:00:00 2001 From: IanStorm Date: Mon, 19 Nov 2018 19:33:40 +0100 Subject: [PATCH 021/608] Generated required package structure by running `dts-gen --dt` --- types/list-stream/index.d.ts | 39 ++++++++++++++++++++++++++ types/list-stream/list-stream-tests.ts | 0 types/list-stream/tsconfig.json | 22 +++++++++++++++ types/list-stream/tslint.json | 1 + 4 files changed, 62 insertions(+) create mode 100644 types/list-stream/index.d.ts create mode 100644 types/list-stream/list-stream-tests.ts create mode 100644 types/list-stream/tsconfig.json create mode 100644 types/list-stream/tslint.json diff --git a/types/list-stream/index.d.ts b/types/list-stream/index.d.ts new file mode 100644 index 0000000000..f331fcf838 --- /dev/null +++ b/types/list-stream/index.d.ts @@ -0,0 +1,39 @@ +// Type definitions for list-stream 1.0 +// Project: https://github.com/rvagg/list-stream +// Definitions by: My Self +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/*~ If this module is a UMD module that exposes a global variable 'myLib' when + *~ loaded outside a module loader environment, declare that global here. + *~ Otherwise, delete this declaration. + */ +export as namespace myLib; + +/*~ If this module has methods, declare them as functions like so. + */ +export function myMethod(a: string): string; +export function myOtherMethod(a: number): number; + +/*~ You can declare types that are available via importing the module */ +export interface someType { + name: string; + length: number; + extras?: string[]; +} + +/*~ You can declare properties of the module using const, let, or var */ +export const myField: number; + +/*~ If there are types, properties, or methods inside dotted names + *~ of the module, declare them inside a 'namespace'. + */ +export namespace subProp { + /*~ For example, given this definition, someone could write: + *~ import { subProp } from 'yourModule'; + *~ subProp.foo(); + *~ or + *~ import * as yourMod from 'yourModule'; + *~ yourMod.subProp.foo(); + */ + export function foo(): void; +} \ No newline at end of file diff --git a/types/list-stream/list-stream-tests.ts b/types/list-stream/list-stream-tests.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/types/list-stream/tsconfig.json b/types/list-stream/tsconfig.json new file mode 100644 index 0000000000..ce92e0529c --- /dev/null +++ b/types/list-stream/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", + "list-stream-tests.ts" + ] +} diff --git a/types/list-stream/tslint.json b/types/list-stream/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/list-stream/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 4b09a1e10024bbf4852f6b210066dae080fc39f8 Mon Sep 17 00:00:00 2001 From: IanStorm Date: Mon, 19 Nov 2018 19:35:07 +0100 Subject: [PATCH 022/608] Editing author information --- types/list-stream/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/list-stream/index.d.ts b/types/list-stream/index.d.ts index f331fcf838..4024bd51ee 100644 --- a/types/list-stream/index.d.ts +++ b/types/list-stream/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for list-stream 1.0 // Project: https://github.com/rvagg/list-stream -// Definitions by: My Self +// Definitions by: IanStorm // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /*~ If this module is a UMD module that exposes a global variable 'myLib' when From 1074143fd85b1e4e1cc17b8ace89cf2c9c8a5b07 Mon Sep 17 00:00:00 2001 From: IanStorm Date: Mon, 19 Nov 2018 20:34:19 +0100 Subject: [PATCH 023/608] Added actual type definition and tests --- types/list-stream/index.d.ts | 47 ++++++++++---------------- types/list-stream/list-stream-tests.ts | 37 ++++++++++++++++++++ 2 files changed, 55 insertions(+), 29 deletions(-) diff --git a/types/list-stream/index.d.ts b/types/list-stream/index.d.ts index 4024bd51ee..8b97483cdb 100644 --- a/types/list-stream/index.d.ts +++ b/types/list-stream/index.d.ts @@ -3,37 +3,26 @@ // Definitions by: IanStorm // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/*~ If this module is a UMD module that exposes a global variable 'myLib' when - *~ loaded outside a module loader environment, declare that global here. - *~ Otherwise, delete this declaration. - */ -export as namespace myLib; +/// -/*~ If this module has methods, declare them as functions like so. - */ -export function myMethod(a: string): string; -export function myOtherMethod(a: number): number; -/*~ You can declare types that are available via importing the module */ -export interface someType { - name: string; - length: number; - extras?: string[]; +import { Duplex, DuplexOptions } from "stream"; + +declare namespace ListStream { } -/*~ You can declare properties of the module using const, let, or var */ -export const myField: number; +declare class ListStream extends Duplex { + constructor(callback?: (err: Error, data: any[]) => void); + constructor(options?: DuplexOptions, callback?: (err: Error, data: any[]) => void); -/*~ If there are types, properties, or methods inside dotted names - *~ of the module, declare them inside a 'namespace'. - */ -export namespace subProp { - /*~ For example, given this definition, someone could write: - *~ import { subProp } from 'yourModule'; - *~ subProp.foo(); - *~ or - *~ import * as yourMod from 'yourModule'; - *~ yourMod.subProp.foo(); - */ - export function foo(): void; -} \ No newline at end of file + static obj(callback?: (err: Error, data: any[]) => void): ListStream; + static obj(options?: DuplexOptions, callback?: (err: Error, data: any[]) => void): ListStream; + + append(chunk: any): void; + duplicate(): ListStream; + end(): void; + get(index: number): any; + length: number; +} + +export = ListStream; diff --git a/types/list-stream/list-stream-tests.ts b/types/list-stream/list-stream-tests.ts index e69de29bb2..aefb41bf0c 100644 --- a/types/list-stream/list-stream-tests.ts +++ b/types/list-stream/list-stream-tests.ts @@ -0,0 +1,37 @@ +import * as ListStream from "list-stream"; + +let chunk: any = "chunk"; +let listStream: ListStream; +let num: number = 1; + +listStream = new ListStream((err: Error, data: any[]) => { + if (err) { throw err; } + console.log(data.length); + for (const date of data) { + console.log(date); + } +}); +listStream = new ListStream({ objectMode: true }, (err: Error, data: any[]) => { + if (err) { throw err; } + console.log(data.length); + for (const date of data) { + console.log(date); + } +}); +listStream = ListStream.obj((err: Error, data: any[]) => { + if (err) { throw err; } + console.log(data.length); + for (const date of data) { + console.log(date); + } +}); + +listStream.append(chunk); + +listStream = listStream.duplicate(); + +listStream.end(); + +chunk = listStream.get(num); + +num = listStream.length; From 8bd0adc2267e15543719193222ccf5d202234646 Mon Sep 17 00:00:00 2001 From: IanStorm Date: Mon, 19 Nov 2018 20:46:35 +0100 Subject: [PATCH 024/608] Added `strictFunctionTypes` inside `tsconfig.json` as required for Merge Request --- types/list-stream/tsconfig.json | 1 + 1 file changed, 1 insertion(+) diff --git a/types/list-stream/tsconfig.json b/types/list-stream/tsconfig.json index ce92e0529c..52ec1c73e1 100644 --- a/types/list-stream/tsconfig.json +++ b/types/list-stream/tsconfig.json @@ -7,6 +7,7 @@ "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, + "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ "../" From 0ee6ec5d83ce1b1be83a95f67674afc39998d871 Mon Sep 17 00:00:00 2001 From: IanStorm Date: Mon, 19 Nov 2018 21:04:02 +0100 Subject: [PATCH 025/608] Fixed issues raised by `npm test`: * `no-consecutive-blank-lines` * `no-inferrable-types` --- types/list-stream/index.d.ts | 1 - types/list-stream/list-stream-tests.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/types/list-stream/index.d.ts b/types/list-stream/index.d.ts index 8b97483cdb..226d4c09ab 100644 --- a/types/list-stream/index.d.ts +++ b/types/list-stream/index.d.ts @@ -5,7 +5,6 @@ /// - import { Duplex, DuplexOptions } from "stream"; declare namespace ListStream { diff --git a/types/list-stream/list-stream-tests.ts b/types/list-stream/list-stream-tests.ts index aefb41bf0c..4b7fc2a6ab 100644 --- a/types/list-stream/list-stream-tests.ts +++ b/types/list-stream/list-stream-tests.ts @@ -2,7 +2,7 @@ import * as ListStream from "list-stream"; let chunk: any = "chunk"; let listStream: ListStream; -let num: number = 1; +let num = 1; listStream = new ListStream((err: Error, data: any[]) => { if (err) { throw err; } From a185047e8e2de73610c42992170ab0e2bb5b2118 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Tue, 20 Nov 2018 09:09:00 -0800 Subject: [PATCH 026/608] Update match-media-mock tests --- types/match-media-mock/match-media-mock-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/match-media-mock/match-media-mock-tests.ts b/types/match-media-mock/match-media-mock-tests.ts index dc35cff40b..6aa36407a9 100644 --- a/types/match-media-mock/match-media-mock-tests.ts +++ b/types/match-media-mock/match-media-mock-tests.ts @@ -7,7 +7,7 @@ matchMediaMock('(max-width: 991px)').matches // false matchMediaMock('(max-width: 1240px)').matches // true const mediaQueryList = matchMediaMock('(max-width: 991px)'); -const listener = (mql: MediaQueryList) => { }; +const listener = (mqle: MediaQueryListEvent) => { }; mediaQueryList.addListener(listener) mediaQueryList.removeListener(listener) From 4d019f2ef8d52b646c4e974fca498ecbd450335f Mon Sep 17 00:00:00 2001 From: Marko K Date: Tue, 20 Nov 2018 20:51:17 +0200 Subject: [PATCH 027/608] fix: allow StyleFunction for heatmap paint properties --- types/mapbox-gl/index.d.ts | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/types/mapbox-gl/index.d.ts b/types/mapbox-gl/index.d.ts index 91fb68cd96..b45e1e8746 100644 --- a/types/mapbox-gl/index.d.ts +++ b/types/mapbox-gl/index.d.ts @@ -232,7 +232,7 @@ declare namespace mapboxgl { /** * The max number of pixels a user can shift the mouse pointer during a click for it to be * considered a valid click (as opposed to a mouse drag). - * + * * @default 3 */ clickTolerance?: number; @@ -242,7 +242,7 @@ declare namespace mapboxgl { * and Vector Tile web workers (this information is normally inaccessible from the main * Javascript thread). Information will be returned in a `resourceTiming` property of * relevant `data` events. - * + * * @default false */ collectResourceTiming?: boolean; @@ -250,7 +250,7 @@ declare namespace mapboxgl { /** * If `true`, symbols from multiple sources can collide with each other during collision * detection. If `false`, collision detection is run separately for the symbols in each source. - * + * * @default true */ crossSourceCollisions?: boolean; @@ -278,7 +278,7 @@ declare namespace mapboxgl { * Controls the duration of the fade-in/fade-out animation for label collisions, in milliseconds. * This setting affects all symbol layers. This setting does not affect the duration of runtime * styling transitions or raster tile cross-fading. - * + * * @default 300 */ fadeDuration?: number; @@ -297,14 +297,14 @@ declare namespace mapboxgl { * 'CJK Unified Ideographs' and 'Hangul Syllables' ranges. In these ranges, font settings from * the map's style will be ignored, except for font-weight keywords (light/regular/medium/bold). * The purpose of this option is to avoid bandwidth-intensive glyph server requests. - * + * * @default null */ localIdeographFontFamily?: string; /** * A string representing the position of the Mapbox wordmark on the map. - * + * * @default "bottom-left" */ logoPosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'; @@ -324,14 +324,14 @@ declare namespace mapboxgl { /** * The initial pitch (tilt) of the map, measured in degrees away from the plane of the * screen (0-60). - * + * * @default 0 */ pitch?: number; /** * If `false`, the map's pitch (tilt) control with "drag to rotate" interaction will be disabled. - * + * * @default true */ pitchWithRotate?: boolean; @@ -339,14 +339,14 @@ declare namespace mapboxgl { /** * If `false`, the map won't attempt to re-request tiles once they expire per their HTTP * `cacheControl`/`expires` headers. - * + * * @default true */ refreshExpiredTiles?: boolean; /** * If `true`, multiple copies of the world will be rendered, when zoomed out. - * + * * @default true */ renderWorldCopies?: boolean; @@ -363,7 +363,7 @@ declare namespace mapboxgl { /** * A callback run before the Map makes a request for an external URL. The callback can be * used to modify the url, set headers, or set the credentials property for cross-origin requests. - * + * * @default null */ transformRequest?: TransformRequestFunction; @@ -377,13 +377,13 @@ declare namespace mapboxgl { /** * The maximum number of tiles stored in the tile cache for a given source. If omitted, the * cache will be dynamically sized based on the current viewport. - * + * * @default null */ maxTileCacheSize?: number; } - export type ResourceType = + export type ResourceType = | 'Unknown' | 'Style' | 'Source' @@ -692,7 +692,7 @@ declare namespace mapboxgl { clusterMaxZoom?: number; lineMetrics?: boolean; - + generateId?: boolean; } @@ -1476,13 +1476,13 @@ declare namespace mapboxgl { } export interface HeatmapPaint { - 'heatmap-radius'?: number | Expression; + 'heatmap-radius'?: number | StyleFunction | Expression; 'heatmap-radius-transition'?: Transition; 'heatmap-weight'?: number | StyleFunction | Expression; - 'heatmap-intensity'?: number | Expression; + 'heatmap-intensity'?: number | StyleFunction | Expression; 'heatmap-intensity-transition'?: Transition; - 'heatmap-color'?: string | Expression; - 'heatmap-opacity'?: number | Expression; + 'heatmap-color'?: string | StyleFunction | Expression; + 'heatmap-opacity'?: number | StyleFunction | Expression; 'heatmap-opacity-transition'?: Transition; } From 845918b6a86a6190c23da22b4d8def7ac9adeffb Mon Sep 17 00:00:00 2001 From: Esteban Ibarra Date: Tue, 20 Nov 2018 12:15:15 -0500 Subject: [PATCH 028/608] Add types for react-native-draggable-flatlist --- .../index.d.ts | 59 +++++++++++++++++++ .../react-native-draggable-flatlist-tests.tsx | 44 ++++++++++++++ .../tsconfig.json | 24 ++++++++ .../tslint.json | 1 + 4 files changed, 128 insertions(+) create mode 100644 types/react-native-draggable-flatlist/index.d.ts create mode 100644 types/react-native-draggable-flatlist/react-native-draggable-flatlist-tests.tsx create mode 100644 types/react-native-draggable-flatlist/tsconfig.json create mode 100644 types/react-native-draggable-flatlist/tslint.json diff --git a/types/react-native-draggable-flatlist/index.d.ts b/types/react-native-draggable-flatlist/index.d.ts new file mode 100644 index 0000000000..0b96f0b3cd --- /dev/null +++ b/types/react-native-draggable-flatlist/index.d.ts @@ -0,0 +1,59 @@ +// Type definitions for react-native-draggable-flatlist 1.1 +// Project: https://github.com/computerjazz/react-native-draggable-flatlist#readme +// Definitions by: Stack Builders +// Esteban Ibarra +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +import { VirtualizedListWithoutRenderItemProps } from "react-native"; +import { Component } from "react"; + +export interface RenderItemInfo { + item: ItemR; + index: number; + move: () => void; + moveEnd: () => void; + isActive: boolean; +} + +export interface OnMoveEndInfo { + data: ReadonlyArray | null; + to: number; + from: number; + row: ItemM; +} + +interface DraggableFlatListProps extends VirtualizedListWithoutRenderItemProps { + /** + * Items to be rendered. + */ + data: ReadonlyArray | null; + + /** + * Function that returns updated ordering of data + */ + onMoveEnd?: (info: OnMoveEndInfo) => void; + + /** + * Function that is called when row becomes active. + */ + onMoveBegin?: (index: number) => void; + + /** + * Sets where scrolling begins. + * + * Default is 5 + */ + scrollPercent?: number; + + /** + * Function that calls move when the row should become active (in an onPress, onLongPress, etc). Calls moveEnd when the gesture is complete (in onPressOut). + */ + renderItem: (info: RenderItemInfo) => React.ReactElement | null; +} + +declare class DraggableFlatList extends Component> { + constructor(props: DraggableFlatListProps); +} + +export default DraggableFlatList; diff --git a/types/react-native-draggable-flatlist/react-native-draggable-flatlist-tests.tsx b/types/react-native-draggable-flatlist/react-native-draggable-flatlist-tests.tsx new file mode 100644 index 0000000000..40d613e4ea --- /dev/null +++ b/types/react-native-draggable-flatlist/react-native-draggable-flatlist-tests.tsx @@ -0,0 +1,44 @@ +import * as React from 'react'; +import { TouchableOpacity, Text } from 'react-native'; +import DraggableFlatList, { RenderItemInfo } from 'react-native-draggable-flatlist'; + +interface Item { + name: string; + mail: string; +} + +class Example extends React.Component { + state = { + data: [ + { name: 'Esteban', mail: 'foo@foo.com' }, + { name: 'Xavier', mail: 'foo2@foo.com' }, + ] + }; + + renderItem({ item, index, move, moveEnd, isActive }: RenderItemInfo) { + return ( + + {index} + {item.name} + {item.mail} + + ); + } + + render() { + const { data } = this.state; + return ( + `draggable-item-${index}`} + scrollPercent={10} + onMoveEnd={({ data }) => this.setState({ data })} + ListFooterComponent={{'Hello'}} + /> + ); + } +} diff --git a/types/react-native-draggable-flatlist/tsconfig.json b/types/react-native-draggable-flatlist/tsconfig.json new file mode 100644 index 0000000000..b3c009feac --- /dev/null +++ b/types/react-native-draggable-flatlist/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "jsx": "react-native" + }, + "files": [ + "index.d.ts", + "react-native-draggable-flatlist-tests.tsx" + ] +} diff --git a/types/react-native-draggable-flatlist/tslint.json b/types/react-native-draggable-flatlist/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/react-native-draggable-flatlist/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 9e68f23ebb215d1d2cda8ff25652d79dddada69c Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Tue, 20 Nov 2018 11:17:42 -0800 Subject: [PATCH 029/608] Update redux-action with redux 4.0 API --- types/redux-action/package.json | 3 +-- types/redux-action/redux-action-tests.ts | 17 ++++++++--------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/types/redux-action/package.json b/types/redux-action/package.json index 0a14f5edc6..7cc600c266 100644 --- a/types/redux-action/package.json +++ b/types/redux-action/package.json @@ -1,7 +1,6 @@ { "private": true, "dependencies": { - "redux": "^3.6.0", - "redux-thunk": "^2.2.0" + "redux": "^4.0.1" } } diff --git a/types/redux-action/redux-action-tests.ts b/types/redux-action/redux-action-tests.ts index 2290ed9a3f..d1b065c08f 100644 --- a/types/redux-action/redux-action-tests.ts +++ b/types/redux-action/redux-action-tests.ts @@ -1,5 +1,4 @@ import * as ReduxAction from 'redux-action'; -import * as ReduxThunk from 'redux-thunk'; import * as Redux from 'redux'; interface Payload { @@ -11,7 +10,7 @@ const dispatch: Redux.Dispatch = (...args: any[]): any => { }; const actionCreator0 = ReduxAction.createAction('get items'); -dispatch(actionCreator0(1)) +actionCreator0(1)(dispatch, () => { }) .then(action => { const type: string = action.type; const payload: Payload = action.payload; @@ -19,7 +18,7 @@ dispatch(actionCreator0(1)) const actionCreator1 = ReduxAction.createAction(); -dispatch(actionCreator1(1)) +actionCreator1(1)(dispatch, () => { }) .then(action => { const type: string = action.type; const payload: Payload = action.payload; @@ -27,7 +26,7 @@ dispatch(actionCreator1(1)) const actionCreator2 = ReduxAction.createAction('get items', (name: string) => name); -dispatch(actionCreator2(1)) +actionCreator2(1)(dispatch, () => { }) .then(action => { const type: string = action.type; const payload: string = action.payload; @@ -35,7 +34,7 @@ dispatch(actionCreator2(1)) const actionCreator3 = ReduxAction.createAction('get items', (name: string) => Promise.resolve(name)); -dispatch(actionCreator3(1)) +actionCreator3(1)(dispatch, () => { }) .then(action => { const type: string = action.type; const payload: string = action.payload; @@ -43,7 +42,7 @@ dispatch(actionCreator3(1)) const actionCreator4 = ReduxAction.createAction((name: string) => name); -dispatch(actionCreator4(1)) +actionCreator4(1)(dispatch, () => { }) .then(action => { const type: string = action.type; const payload: string = action.payload; @@ -51,7 +50,7 @@ dispatch(actionCreator4(1)) const actionCreator5 = ReduxAction.createAction((name: string) => 1); -dispatch(actionCreator5('items')) +actionCreator5('items')(dispatch, () => { }) .then(action => { const type: string = action.type; const payload: number = action.payload; @@ -59,7 +58,7 @@ dispatch(actionCreator5('items')) const actionCreator6 = ReduxAction.createAction((name: string) => 1); -dispatch(actionCreator6('items', false)) +actionCreator6('items', false)(dispatch, () => { }) .then(action => { const type: string = action.type; const payload: number = action.payload; @@ -80,4 +79,4 @@ const reducer = ReduxAction.createReducer({ name: 'name' }, { } }); -const combinedReducer: Redux.Reducer = Redux.combineReducers({ reducer }); +const combinedReducer: Redux.Reducer<{ reducer: State }> = Redux.combineReducers<{ reducer: State }>({ reducer }); From fd052a6b5a37f5125f2f0b750090902ec41908fa Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Tue, 20 Nov 2018 11:31:32 -0800 Subject: [PATCH 030/608] Downcast Error types to ignore call signature This helps type inference work correctly. --- types/bluebird/bluebird-tests.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/types/bluebird/bluebird-tests.ts b/types/bluebird/bluebird-tests.ts index 05ac5cc19c..8fe5db7538 100644 --- a/types/bluebird/bluebird-tests.ts +++ b/types/bluebird/bluebird-tests.ts @@ -313,7 +313,7 @@ fooOrBarProm = fooProm.caught((error: any) => { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // $ExpectType Bluebird -fooProm.catch(Error, (reason: any) => { +fooProm.catch(Error as { new(message?: string): Error }, (reason: any) => { return; }); // $ExpectType Bluebird @@ -321,7 +321,7 @@ fooProm.catch(Promise.CancellationError, (reason: any) => { return; }); // $ExpectType Bluebird -fooProm.caught(Error, (reason: any) => { +fooProm.caught(Error as { new(message?: string): Error }, (reason: any) => { return; }); // $ExpectType Bluebird @@ -329,13 +329,13 @@ fooProm.caught(Promise.CancellationError, (reason: any) => { return; }); -fooOrBarProm = fooProm.catch(Error, (reason: any) => { +fooOrBarProm = fooProm.catch(Error as { new(message?: string): Error }, (reason: any) => { return bar; }); fooOrBarProm = fooProm.catch(Promise.CancellationError, (reason: any) => { return bar; }); -fooOrBarProm = fooProm.caught(Error, (reason: any) => { +fooOrBarProm = fooProm.caught(Error as { new(message?: string): Error }, (reason: any) => { return bar; }); fooOrBarProm = fooProm.caught(Promise.CancellationError, (reason: any) => { From f1d0311b61d2efdd39e82369b40906d39a7f4a13 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Tue, 20 Nov 2018 11:42:19 -0800 Subject: [PATCH 031/608] Fix unrelated lints --- types/db-migrate-base/db-migrate-base-tests.ts | 4 ++-- types/db-migrate-pg/db-migrate-pg-tests.ts | 2 +- types/project-oxford/project-oxford-tests.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/types/db-migrate-base/db-migrate-base-tests.ts b/types/db-migrate-base/db-migrate-base-tests.ts index 79d81a75f9..b094be1280 100644 --- a/types/db-migrate-base/db-migrate-base-tests.ts +++ b/types/db-migrate-base/db-migrate-base-tests.ts @@ -3,7 +3,7 @@ import * as DbMigrateBase from "db-migrate-base"; // Throw together a dummy driver -let db = {}; +let db = {} as DbMigrateBase.Base; let callback = (err: any, response: any) => { // Do nothing. @@ -318,4 +318,4 @@ db.runSqlAsync('DROP TABLE `pets`').then(onResolve); /// allAsync(sql, [params]) db.allAsync('SELECT * FROM `module_user` WHERE `?` = \'?\'', ['first_name', 'Test']).then(onResolve); -db.allAsync('SELECT * FROM `module_user`').then(onResolve); \ No newline at end of file +db.allAsync('SELECT * FROM `module_user`').then(onResolve); diff --git a/types/db-migrate-pg/db-migrate-pg-tests.ts b/types/db-migrate-pg/db-migrate-pg-tests.ts index adf2716074..b31d88e37d 100644 --- a/types/db-migrate-pg/db-migrate-pg-tests.ts +++ b/types/db-migrate-pg/db-migrate-pg-tests.ts @@ -3,7 +3,7 @@ import * as DbMigratePg from "db-migrate-pg"; // Throw together a dummy driver -let db = {}; +let db = {} as DbMigratePg.PgDriver; let callback = (err: any, response: any) => { // Do nothing. diff --git a/types/project-oxford/project-oxford-tests.ts b/types/project-oxford/project-oxford-tests.ts index d4c59de109..8b1dbec466 100644 --- a/types/project-oxford/project-oxford-tests.ts +++ b/types/project-oxford/project-oxford-tests.ts @@ -12,7 +12,7 @@ const {describe, it, before, after, beforeEach, afterEach} = null as any as { var client = new oxford.Client(process.env.OXFORD_KEY); // Store variables, no point in calling the api too often -var billFaces = []; +var billFaces = [] as string[]; var personGroupId = "uuid.v4()"; var personGroupId2 = "uuid.v4()"; var billPersonId: string; @@ -113,7 +113,7 @@ describe('Project Oxford Face API Test', function () { describe('#grouping()', function () { it('detects groups faces', function (done) { - var faceIds = []; + var faceIds = [] as string[]; this.timeout(10000); From ca53c065a52c288b7d8d3fb3bde5709c6d496f7c Mon Sep 17 00:00:00 2001 From: Esteban Ibarra Date: Tue, 20 Nov 2018 15:18:30 -0500 Subject: [PATCH 032/608] Revert changes of react-native-draggable-flatlist --- .../index.d.ts | 59 ------------------- .../react-native-draggable-flatlist-tests.tsx | 44 -------------- .../tsconfig.json | 24 -------- .../tslint.json | 1 - 4 files changed, 128 deletions(-) delete mode 100644 types/react-native-draggable-flatlist/index.d.ts delete mode 100644 types/react-native-draggable-flatlist/react-native-draggable-flatlist-tests.tsx delete mode 100644 types/react-native-draggable-flatlist/tsconfig.json delete mode 100644 types/react-native-draggable-flatlist/tslint.json diff --git a/types/react-native-draggable-flatlist/index.d.ts b/types/react-native-draggable-flatlist/index.d.ts deleted file mode 100644 index 0b96f0b3cd..0000000000 --- a/types/react-native-draggable-flatlist/index.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -// Type definitions for react-native-draggable-flatlist 1.1 -// Project: https://github.com/computerjazz/react-native-draggable-flatlist#readme -// Definitions by: Stack Builders -// Esteban Ibarra -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 - -import { VirtualizedListWithoutRenderItemProps } from "react-native"; -import { Component } from "react"; - -export interface RenderItemInfo { - item: ItemR; - index: number; - move: () => void; - moveEnd: () => void; - isActive: boolean; -} - -export interface OnMoveEndInfo { - data: ReadonlyArray | null; - to: number; - from: number; - row: ItemM; -} - -interface DraggableFlatListProps extends VirtualizedListWithoutRenderItemProps { - /** - * Items to be rendered. - */ - data: ReadonlyArray | null; - - /** - * Function that returns updated ordering of data - */ - onMoveEnd?: (info: OnMoveEndInfo) => void; - - /** - * Function that is called when row becomes active. - */ - onMoveBegin?: (index: number) => void; - - /** - * Sets where scrolling begins. - * - * Default is 5 - */ - scrollPercent?: number; - - /** - * Function that calls move when the row should become active (in an onPress, onLongPress, etc). Calls moveEnd when the gesture is complete (in onPressOut). - */ - renderItem: (info: RenderItemInfo) => React.ReactElement | null; -} - -declare class DraggableFlatList extends Component> { - constructor(props: DraggableFlatListProps); -} - -export default DraggableFlatList; diff --git a/types/react-native-draggable-flatlist/react-native-draggable-flatlist-tests.tsx b/types/react-native-draggable-flatlist/react-native-draggable-flatlist-tests.tsx deleted file mode 100644 index 40d613e4ea..0000000000 --- a/types/react-native-draggable-flatlist/react-native-draggable-flatlist-tests.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import * as React from 'react'; -import { TouchableOpacity, Text } from 'react-native'; -import DraggableFlatList, { RenderItemInfo } from 'react-native-draggable-flatlist'; - -interface Item { - name: string; - mail: string; -} - -class Example extends React.Component { - state = { - data: [ - { name: 'Esteban', mail: 'foo@foo.com' }, - { name: 'Xavier', mail: 'foo2@foo.com' }, - ] - }; - - renderItem({ item, index, move, moveEnd, isActive }: RenderItemInfo) { - return ( - - {index} - {item.name} - {item.mail} - - ); - } - - render() { - const { data } = this.state; - return ( - `draggable-item-${index}`} - scrollPercent={10} - onMoveEnd={({ data }) => this.setState({ data })} - ListFooterComponent={{'Hello'}} - /> - ); - } -} diff --git a/types/react-native-draggable-flatlist/tsconfig.json b/types/react-native-draggable-flatlist/tsconfig.json deleted file mode 100644 index b3c009feac..0000000000 --- a/types/react-native-draggable-flatlist/tsconfig.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true, - "jsx": "react-native" - }, - "files": [ - "index.d.ts", - "react-native-draggable-flatlist-tests.tsx" - ] -} diff --git a/types/react-native-draggable-flatlist/tslint.json b/types/react-native-draggable-flatlist/tslint.json deleted file mode 100644 index 3db14f85ea..0000000000 --- a/types/react-native-draggable-flatlist/tslint.json +++ /dev/null @@ -1 +0,0 @@ -{ "extends": "dtslint/dt.json" } From dc6cea2e1ed814f51b9211f2a31bf752666a3890 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Tue, 20 Nov 2018 12:36:47 -0800 Subject: [PATCH 033/608] Fix CI failure 1. Use 3.1 and 3.2-compatible fix for match-media-mock. Specify a this-parameter. 2. redux-action requires TS 2.3 so that type parameter defaults and mapped types from redux 4.0 work. --- types/match-media-mock/match-media-mock-tests.ts | 2 +- types/redux-action/index.d.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/types/match-media-mock/match-media-mock-tests.ts b/types/match-media-mock/match-media-mock-tests.ts index 6aa36407a9..25fe411dd1 100644 --- a/types/match-media-mock/match-media-mock-tests.ts +++ b/types/match-media-mock/match-media-mock-tests.ts @@ -7,7 +7,7 @@ matchMediaMock('(max-width: 991px)').matches // false matchMediaMock('(max-width: 1240px)').matches // true const mediaQueryList = matchMediaMock('(max-width: 991px)'); -const listener = (mqle: MediaQueryListEvent) => { }; +const listener = function (this: MediaQueryList) { }; mediaQueryList.addListener(listener) mediaQueryList.removeListener(listener) diff --git a/types/redux-action/index.d.ts b/types/redux-action/index.d.ts index dc5b9e5229..51c3cc3b61 100644 --- a/types/redux-action/index.d.ts +++ b/types/redux-action/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/coderhaoxin/redux-action // Definitions by: newraina // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /** * inspired by @types/redux-actions, thanks. From ebbf64f76b0b702ca0591ffa43c3586f994c9e43 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Tue, 20 Nov 2018 15:56:58 -0800 Subject: [PATCH 034/608] Work around 3.2 inference change using overloads Notes: 1. I only duplicated overloads to get 2 * n instead of 2 * n overloads needed to support every combination of constructor function/other. 2. I deleted the duplicate R vs U | R overloads for `catch` since they were equivalent; I don't think the R overloads were ever used. 3. The original overload is now Constructor | CatchFilter; I haven't figured out why yet, but normal classes don't use the new Constructor-only overload. Only constructor functions do. --- types/bluebird/bluebird-tests.ts | 8 +- types/bluebird/index.d.ts | 277 +++++++++++++++++++++---------- 2 files changed, 190 insertions(+), 95 deletions(-) diff --git a/types/bluebird/bluebird-tests.ts b/types/bluebird/bluebird-tests.ts index 8fe5db7538..05ac5cc19c 100644 --- a/types/bluebird/bluebird-tests.ts +++ b/types/bluebird/bluebird-tests.ts @@ -313,7 +313,7 @@ fooOrBarProm = fooProm.caught((error: any) => { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // $ExpectType Bluebird -fooProm.catch(Error as { new(message?: string): Error }, (reason: any) => { +fooProm.catch(Error, (reason: any) => { return; }); // $ExpectType Bluebird @@ -321,7 +321,7 @@ fooProm.catch(Promise.CancellationError, (reason: any) => { return; }); // $ExpectType Bluebird -fooProm.caught(Error as { new(message?: string): Error }, (reason: any) => { +fooProm.caught(Error, (reason: any) => { return; }); // $ExpectType Bluebird @@ -329,13 +329,13 @@ fooProm.caught(Promise.CancellationError, (reason: any) => { return; }); -fooOrBarProm = fooProm.catch(Error as { new(message?: string): Error }, (reason: any) => { +fooOrBarProm = fooProm.catch(Error, (reason: any) => { return bar; }); fooOrBarProm = fooProm.catch(Promise.CancellationError, (reason: any) => { return bar; }); -fooOrBarProm = fooProm.caught(Error as { new(message?: string): Error }, (reason: any) => { +fooOrBarProm = fooProm.caught(Error, (reason: any) => { return bar; }); fooOrBarProm = fooProm.caught(Promise.CancellationError, (reason: any) => { diff --git a/types/bluebird/index.d.ts b/types/bluebird/index.d.ts index 091dbe6e7a..1f8768498a 100644 --- a/types/bluebird/index.d.ts +++ b/types/bluebird/index.d.ts @@ -35,7 +35,8 @@ * THE SOFTWARE. */ -type CatchFilter = (new (...args: any[]) => E) | ((error: E) => boolean) | (object & E); +type Constructor = new (...args: any[]) => E +type CatchFilter = ((error: E) => boolean) | (object & E); type IterableItem = R extends Iterable ? U : never; type IterableOrNever = Extract>; type Resolvable = R | PromiseLike; @@ -85,69 +86,73 @@ declare class Bluebird implements PromiseLike, Bluebird.Inspection { * * Alias `.caught();` for compatibility with earlier ECMAScript version. */ - catch( - filter1: CatchFilter, - filter2: CatchFilter, - filter3: CatchFilter, - filter4: CatchFilter, - filter5: CatchFilter, - onReject: (error: E1 | E2 | E3 | E4 | E5) => Resolvable, - ): Bluebird; catch( - filter1: CatchFilter, - filter2: CatchFilter, - filter3: CatchFilter, - filter4: CatchFilter, - filter5: CatchFilter, + filter1: Constructor, + filter2: Constructor, + filter3: Constructor, + filter4: Constructor, + filter5: Constructor, onReject: (error: E1 | E2 | E3 | E4 | E5) => Resolvable, ): Bluebird; - catch( - filter1: CatchFilter, - filter2: CatchFilter, - filter3: CatchFilter, - filter4: CatchFilter, - onReject: (error: E1 | E2 | E3 | E4) => Resolvable, - ): Bluebird; + catch( + filter1: Constructor | CatchFilter, + filter2: Constructor | CatchFilter, + filter3: Constructor | CatchFilter, + filter4: Constructor | CatchFilter, + filter5: Constructor | CatchFilter, + onReject: (error: E1 | E2 | E3 | E4 | E5) => Resolvable, + ): Bluebird; catch( - filter1: CatchFilter, - filter2: CatchFilter, - filter3: CatchFilter, - filter4: CatchFilter, + filter1: Constructor, + filter2: Constructor, + filter3: Constructor, + filter4: Constructor, + onReject: (error: E1 | E2 | E3 | E4) => Resolvable, + ): Bluebird; + + catch( + filter1: Constructor | CatchFilter, + filter2: Constructor | CatchFilter, + filter3: Constructor | CatchFilter, + filter4: Constructor | CatchFilter, onReject: (error: E1 | E2 | E3 | E4) => Resolvable, ): Bluebird; - catch( - filter1: CatchFilter, - filter2: CatchFilter, - filter3: CatchFilter, - onReject: (error: E1 | E2 | E3) => Resolvable, - ): Bluebird; catch( - filter1: CatchFilter, - filter2: CatchFilter, - filter3: CatchFilter, + filter1: Constructor, + filter2: Constructor, + filter3: Constructor, + onReject: (error: E1 | E2 | E3) => Resolvable, + ): Bluebird; + + catch( + filter1: Constructor | CatchFilter, + filter2: Constructor | CatchFilter, + filter3: Constructor | CatchFilter, onReject: (error: E1 | E2 | E3) => Resolvable, ): Bluebird; - catch( - filter1: CatchFilter, - filter2: CatchFilter, - onReject: (error: E1 | E2) => Resolvable, - ): Bluebird; catch( - filter1: CatchFilter, - filter2: CatchFilter, + filter1: Constructor, + filter2: Constructor, + onReject: (error: E1 | E2) => Resolvable, + ): Bluebird; + + catch( + filter1: Constructor | CatchFilter, + filter2: Constructor | CatchFilter, onReject: (error: E1 | E2) => Resolvable, ): Bluebird; - catch( - filter1: CatchFilter, - onReject: (error: E1) => Resolvable, - ): Bluebird; catch( - filter1: CatchFilter, + filter1: Constructor, + onReject: (error: E1) => Resolvable, + ): Bluebird; + + catch( + filter1: Constructor | CatchFilter, onReject: (error: E1) => Resolvable, ): Bluebird; @@ -201,33 +206,63 @@ declare class Bluebird implements PromiseLike, Bluebird.Inspection { tapCatch(onReject: (error?: any) => Resolvable): Bluebird; tapCatch( - filter1: CatchFilter, - filter2: CatchFilter, - filter3: CatchFilter, - filter4: CatchFilter, - filter5: CatchFilter, + filter1: Constructor, + filter2: Constructor, + filter3: Constructor, + filter4: Constructor, + filter5: Constructor, + onReject: (error: E1 | E2 | E3 | E4 | E5) => Resolvable, + ): Bluebird; + tapCatch( + filter1: Constructor | CatchFilter, + filter2: Constructor | CatchFilter, + filter3: Constructor | CatchFilter, + filter4: Constructor | CatchFilter, + filter5: Constructor | CatchFilter, onReject: (error: E1 | E2 | E3 | E4 | E5) => Resolvable, ): Bluebird; tapCatch( - filter1: CatchFilter, - filter2: CatchFilter, - filter3: CatchFilter, - filter4: CatchFilter, + filter1: Constructor, + filter2: Constructor, + filter3: Constructor, + filter4: Constructor, + onReject: (error: E1 | E2 | E3 | E4) => Resolvable, + ): Bluebird; + tapCatch( + filter1: Constructor | CatchFilter, + filter2: Constructor | CatchFilter, + filter3: Constructor | CatchFilter, + filter4: Constructor | CatchFilter, onReject: (error: E1 | E2 | E3 | E4) => Resolvable, ): Bluebird; tapCatch( - filter1: CatchFilter, - filter2: CatchFilter, - filter3: CatchFilter, + filter1: Constructor, + filter2: Constructor, + filter3: Constructor, + onReject: (error: E1 | E2 | E3) => Resolvable, + ): Bluebird; + tapCatch( + filter1: Constructor | CatchFilter, + filter2: Constructor | CatchFilter, + filter3: Constructor | CatchFilter, onReject: (error: E1 | E2 | E3) => Resolvable, ): Bluebird; tapCatch( - filter1: CatchFilter, - filter2: CatchFilter, + filter1: Constructor, + filter2: Constructor, + onReject: (error: E1 | E2) => Resolvable, + ): Bluebird; + tapCatch( + filter1: Constructor | CatchFilter, + filter2: Constructor | CatchFilter, onReject: (error: E1 | E2) => Resolvable, ): Bluebird; tapCatch( - filter1: CatchFilter, + filter1: Constructor, + onReject: (error: E1) => Resolvable, + ): Bluebird; + tapCatch( + filter1: Constructor | CatchFilter, onReject: (error: E1) => Resolvable, ): Bluebird; @@ -376,33 +411,63 @@ declare class Bluebird implements PromiseLike, Bluebird.Inspection { // No need to be specific about Error types in these overrides, since there's no handler function catchReturn( - filter1: CatchFilter, - filter2: CatchFilter, - filter3: CatchFilter, - filter4: CatchFilter, - filter5: CatchFilter, + filter1: Constructor, + filter2: Constructor, + filter3: Constructor, + filter4: Constructor, + filter5: Constructor, value: U, ): Bluebird; catchReturn( - filter1: CatchFilter, - filter2: CatchFilter, - filter3: CatchFilter, - filter4: CatchFilter, + filter1: Constructor | CatchFilter, + filter2: Constructor | CatchFilter, + filter3: Constructor | CatchFilter, + filter4: Constructor | CatchFilter, + filter5: Constructor | CatchFilter, value: U, ): Bluebird; catchReturn( - filter1: CatchFilter, - filter2: CatchFilter, - filter3: CatchFilter, + filter1: Constructor, + filter2: Constructor, + filter3: Constructor, + filter4: Constructor, value: U, ): Bluebird; catchReturn( - filter1: CatchFilter, - filter2: CatchFilter, + filter1: Constructor | CatchFilter, + filter2: Constructor | CatchFilter, + filter3: Constructor | CatchFilter, + filter4: Constructor | CatchFilter, value: U, ): Bluebird; catchReturn( - filter1: CatchFilter, + filter1: Constructor, + filter2: Constructor, + filter3: Constructor, + value: U, + ): Bluebird; + catchReturn( + filter1: Constructor | CatchFilter, + filter2: Constructor | CatchFilter, + filter3: Constructor | CatchFilter, + value: U, + ): Bluebird; + catchReturn( + filter1: Constructor, + filter2: Constructor, + value: U, + ): Bluebird; + catchReturn( + filter1: Constructor | CatchFilter, + filter2: Constructor | CatchFilter, + value: U, + ): Bluebird; + catchReturn( + filter1: Constructor, + value: U, + ): Bluebird; + catchReturn( + filter1: Constructor | CatchFilter, value: U, ): Bluebird; @@ -420,33 +485,63 @@ declare class Bluebird implements PromiseLike, Bluebird.Inspection { // No need to be specific about Error types in these overrides, since there's no handler function catchThrow( - filter1: CatchFilter, - filter2: CatchFilter, - filter3: CatchFilter, - filter4: CatchFilter, - filter5: CatchFilter, + filter1: Constructor, + filter2: Constructor, + filter3: Constructor, + filter4: Constructor, + filter5: Constructor, reason: Error, ): Bluebird; catchThrow( - filter1: CatchFilter, - filter2: CatchFilter, - filter3: CatchFilter, - filter4: CatchFilter, + filter1: Constructor | CatchFilter, + filter2: Constructor | CatchFilter, + filter3: Constructor | CatchFilter, + filter4: Constructor | CatchFilter, + filter5: Constructor | CatchFilter, reason: Error, ): Bluebird; catchThrow( - filter1: CatchFilter, - filter2: CatchFilter, - filter3: CatchFilter, + filter1: Constructor, + filter2: Constructor, + filter3: Constructor, + filter4: Constructor, reason: Error, ): Bluebird; catchThrow( - filter1: CatchFilter, - filter2: CatchFilter, + filter1: Constructor | CatchFilter, + filter2: Constructor | CatchFilter, + filter3: Constructor | CatchFilter, + filter4: Constructor | CatchFilter, reason: Error, ): Bluebird; catchThrow( - filter1: CatchFilter, + filter1: Constructor, + filter2: Constructor, + filter3: Constructor, + reason: Error, + ): Bluebird; + catchThrow( + filter1: Constructor | CatchFilter, + filter2: Constructor | CatchFilter, + filter3: Constructor | CatchFilter, + reason: Error, + ): Bluebird; + catchThrow( + filter1: Constructor, + filter2: Constructor, + reason: Error, + ): Bluebird; + catchThrow( + filter1: Constructor | CatchFilter, + filter2: Constructor | CatchFilter, + reason: Error, + ): Bluebird; + catchThrow( + filter1: Constructor, + reason: Error, + ): Bluebird; + catchThrow( + filter1: Constructor | CatchFilter, reason: Error, ): Bluebird; From d2dd41340a12ebef17e104a61309611a51cf1183 Mon Sep 17 00:00:00 2001 From: Yann Normand Date: Wed, 21 Nov 2018 10:25:41 +1000 Subject: [PATCH 035/608] downgrade to Typescript 2.8 --- types/react-big-calendar/index.d.ts | 2 +- .../react-big-calendar-tests.tsx | 118 +++++++++--------- 2 files changed, 60 insertions(+), 60 deletions(-) diff --git a/types/react-big-calendar/index.d.ts b/types/react-big-calendar/index.d.ts index 0d4da60aa4..89e6f0eead 100644 --- a/types/react-big-calendar/index.d.ts +++ b/types/react-big-calendar/index.d.ts @@ -7,7 +7,7 @@ // Paul Potsides // janb87 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.9 +// TypeScript Version: 2.8 import { Validator } from 'prop-types'; import * as React from 'react'; diff --git a/types/react-big-calendar/react-big-calendar-tests.tsx b/types/react-big-calendar/react-big-calendar-tests.tsx index 918c352e0c..fd1e70f929 100644 --- a/types/react-big-calendar/react-big-calendar-tests.tsx +++ b/types/react-big-calendar/react-big-calendar-tests.tsx @@ -61,70 +61,70 @@ class CalendarResource { } { + class MyCalendar extends BigCalendar {} + // Full API Example Test - based on API Documentation // http://intljusticemission.github.io/react-big-calendar/examples/index.html#api class FullAPIExample extends React.Component> { render() { return ( - - {...this.props} - date={new Date()} - view={'day'} - events={getEvents()} - onNavigate={(newDate: Date, view: View, action: Navigate) => { }} - onView={(view: View) => { }} - onSelectSlot={(slotInfo) => { - const start = slotInfo.start; - const end = slotInfo.end; - const slots = slotInfo.slots; - }} - onSelectEvent={(event) => { }} - onSelecting={(slotInfo) => { - const start = slotInfo.start; - const end = slotInfo.end; - return true; - }} - views={['day']} - toolbar={true} - popup={true} - popupOffset={20} - selectable={true} - step={20} - rtl={true} - eventPropGetter={(event, start, end, isSelected) => ({ className: 'some-class' })} - titleAccessor={'title'} - allDayAccessor={(event: CalendarEvent) => !!event.allDay} - startAccessor={'start'} - endAccessor={(event: CalendarEvent) => event.end || event.start} - min={new Date()} - max={new Date()} - scrollToTime={new Date()} - formats={{ - dateFormat: "h a", - agendaDateFormat: (date: Date, culture?: string, localizer?: object) => "some-format", - dayRangeHeaderFormat: (range: DateRange, culture?: string, localizer?: object) => "some-format" - }} - messages={{}} - timeslots={24} - defaultView={'month'} - className={'my-calendar'} - elementProps={{ id: 'myCalendar' }} - components={{ - event: Event, - agenda: { - event: EventAgenda - }, - toolbar: Toolbar, - eventWrapper: EventWrapper, - }} - dayPropGetter={customDayPropGetter} - slotPropGetter={customSlotPropGetter} - defaultDate={new Date()} - resources={getResources()} - resourceAccessor={event => event.resourceId} - resourceIdAccessor={resource => resource.id} - resourceTitleAccessor={resource => resource.title} - /> + { }} + onView={(view: View) => { }} + onSelectSlot={(slotInfo) => { + const start = slotInfo.start; + const end = slotInfo.end; + const slots = slotInfo.slots; + }} + onSelectEvent={(event) => { }} + onSelecting={(slotInfo) => { + const start = slotInfo.start; + const end = slotInfo.end; + return true; + }} + views={['day']} + toolbar={true} + popup={true} + popupOffset={20} + selectable={true} + step={20} + rtl={true} + eventPropGetter={(event, start, end, isSelected) => ({ className: 'some-class' })} + titleAccessor={'title'} + allDayAccessor={(event: CalendarEvent) => !!event.allDay} + startAccessor={'start'} + endAccessor={(event: CalendarEvent) => event.end || event.start} + min={new Date()} + max={new Date()} + scrollToTime={new Date()} + formats={{ + dateFormat: "h a", + agendaDateFormat: (date: Date, culture?: string, localizer?: object) => "some-format", + dayRangeHeaderFormat: (range: DateRange, culture?: string, localizer?: object) => "some-format" + }} + messages={{}} + timeslots={24} + defaultView={'month'} + className={'my-calendar'} + elementProps={{ id: 'myCalendar' }} + components={{ + event: Event, + agenda: { + event: EventAgenda + }, + toolbar: Toolbar, + eventWrapper: EventWrapper, + }} + dayPropGetter={customDayPropGetter} + slotPropGetter={customSlotPropGetter} + defaultDate={new Date()} + resources={getResources()} + resourceAccessor={event => event.resourceId} + resourceIdAccessor={resource => resource.id} + resourceTitleAccessor={resource => resource.title} /> ); } } From 6187a17f6d944d1c7b57bb8c3b2ee472fe3cc9ee Mon Sep 17 00:00:00 2001 From: Alexandre Parent Date: Tue, 20 Nov 2018 19:25:52 -0500 Subject: [PATCH 036/608] Added a use for expect 'checker' with a callback I often use expect(Object, CallbackHandler) because expect((Response) => any, CallbackHandler) doesn't exist. On the other hand, making callback nullable will allow those using it without callback to keep doing it. --- types/supertest/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/supertest/index.d.ts b/types/supertest/index.d.ts index 77418352f9..5ac03df42d 100644 --- a/types/supertest/index.d.ts +++ b/types/supertest/index.d.ts @@ -24,7 +24,7 @@ declare namespace supertest { serverAddress(app: any, path: string): string; expect(status: number, callback?: CallbackHandler): this; expect(status: number, body: any, callback?: CallbackHandler): this; - expect(checker: (res: Response) => any): this; + expect(checker: (res: Response) => any, callback?: CallbackHandler): this; expect(body: string, callback?: CallbackHandler): this; expect(body: RegExp, callback?: CallbackHandler): this; expect(body: Object, callback?: CallbackHandler): this; From 3daac759f4ce410664691073d7a16f735e5fe66a Mon Sep 17 00:00:00 2001 From: Benjamin Lupton Date: Wed, 21 Nov 2018 21:46:45 +1100 Subject: [PATCH 037/608] ansicolors: accurate types with recursion support --- types/ansicolors/index.d.ts | 44 +++++++++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/types/ansicolors/index.d.ts b/types/ansicolors/index.d.ts index 6750283895..e82fb47dd7 100644 --- a/types/ansicolors/index.d.ts +++ b/types/ansicolors/index.d.ts @@ -1,8 +1,44 @@ // Type definitions for ansicolors // Project: https://github.com/thlorenz/ansicolors -// Definitions by: rogierschouten +// Definitions by: Benjamin Arthur Lupton // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -declare var colors: { [index: string]: (s: string) => string; }; -export = colors; +interface Colors extends String { + white: Colors + black: Colors + blue: Colors + cyan: Colors + green: Colors + magenta: Colors + red: Colors + yellow: Colors + brightBlack: Colors + brightRed: Colors + brightGreen: Colors + brightYellow: Colors + brightBlue: Colors + brightMagenta: Colors + brightCyan: Colors + brightWhite: Colors + bgBlack: Colors + bgRed: Colors + bgGreen: Colors + bgYellow: Colors + bgBlue: Colors + bgMagenta: Colors + bgCyan: Colors + bgWhite: Colors + bgBrightBlack: Colors + bgBrightRed: Colors + bgBrightGreen: Colors + bgBrightYellow: Colors + bgBrightBlue: Colors + bgBrightMagenta: Colors + bgBrightCyan: Colors + bgBrightWhite: Colors + open: Colors + close: Colors + colors: Colors +} +declare var colors: Colors +export default colors From cb3647d767af0964db8616dda47adc4ac0a90f5c Mon Sep 17 00:00:00 2001 From: Erik Christensen Date: Wed, 21 Nov 2018 14:30:25 -0500 Subject: [PATCH 038/608] Added missing methods and properties along with result type for CommandCursor --- types/mongodb/index.d.ts | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/types/mongodb/index.d.ts b/types/mongodb/index.d.ts index ab4d2f4c02..458aef1fc5 100644 --- a/types/mongodb/index.d.ts +++ b/types/mongodb/index.d.ts @@ -19,6 +19,7 @@ // Mikael Lirbank // Hector Ribes // Florian Richter +// Erik Christensen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -450,7 +451,7 @@ export class Db extends EventEmitter { indexInformation(name: string, options?: { full?: boolean, readPreference?: ReadPreference | string }): Promise; indexInformation(name: string, options: { full?: boolean, readPreference?: ReadPreference | string }, callback: MongoCallback): void; /** http://mongodb.github.io/node-mongodb-native/3.1/api/Db.html#listCollections */ - listCollections(filter?: Object, options?: { batchSize?: number, readPreference?: ReadPreference | string }): CommandCursor; + listCollections(filter?: Object, options?: { nameOnly?: boolean, batchSize?: number, readPreference?: ReadPreference | string, session?: ClientSession }): CommandCursor; /** http://mongodb.github.io/node-mongodb-native/3.1/api/Db.html#profilingInfo */ /** @deprecated Query the system.profile collection directly. */ profilingInfo(callback: MongoCallback): void; @@ -1578,24 +1579,30 @@ export class AggregationCursor extends Readable { unwind(field: string): AggregationCursor; } +/** http://mongodb.github.io/node-mongodb-native/3.1/api/CommandCursor.html#~resultCallback */ +export type CommandCursorResult = any | void; /** http://mongodb.github.io/node-mongodb-native/3.1/api/CommandCursor.html */ export class CommandCursor extends Readable { + /** http://mongodb.github.io/node-mongodb-native/3.1/api/CommandCursor.html#hasNext */ + hasNext(): Promise; + /** http://mongodb.github.io/node-mongodb-native/3.1/api/CommandCursor.html#hasNext */ + hasNext(callback: MongoCallback): void; /** http://mongodb.github.io/node-mongodb-native/3.1/api/CommandCursor.html#batchSize */ batchSize(value: number): CommandCursor; /** http://mongodb.github.io/node-mongodb-native/3.1/api/CommandCursor.html#clone */ clone(): CommandCursor; /** http://mongodb.github.io/node-mongodb-native/3.1/api/CommandCursor.html#close */ - close(): Promise; - close(callback: MongoCallback): void; + close(): Promise; + close(callback: MongoCallback): void; /** http://mongodb.github.io/node-mongodb-native/3.1/api/CommandCursor.html#each */ - each(callback: MongoCallback): void; + each(callback: MongoCallback): void; /** http://mongodb.github.io/node-mongodb-native/3.1/api/CommandCursor.html#isClosed */ isClosed(): boolean; /** http://mongodb.github.io/node-mongodb-native/3.1/api/CommandCursor.html#maxTimeMS */ maxTimeMS(value: number): CommandCursor; /** http://mongodb.github.io/node-mongodb-native/3.1/api/CommandCursor.html#next */ - next(): Promise; - next(callback: MongoCallback): void; + next(): Promise; + next(callback: MongoCallback): void; /** http://mongodb.github.io/node-mongodb-native/3.1/api/CommandCursor.html#read */ read(size: number): string | Buffer | void; /** http://mongodb.github.io/node-mongodb-native/3.1/api/CommandCursor.html#rewind */ From 17af5405cbaa196d9f0766d3eda0374604fc0fda Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Wed, 21 Nov 2018 11:34:35 -0800 Subject: [PATCH 039/608] More TS 3.2 DOM updates Unlike the other PR, these updates should not go in until 3.2 is out, since they rely on the following additions: 1. webrtc 2. web-animations 3. geometry-dom I left these packages in to make it easier to upgrade and edited them where needed, but I removed the dependencies on them in other Definitely Typed packages. --- types/peerjs/index.d.ts | 6 +- types/skyway/index.d.ts | 6 +- types/w3c-generic-sensor/index.d.ts | 6 +- types/w3c-screen-orientation/index.d.ts | 2 +- types/web-animations-js/index.d.ts | 25 +++------ types/webrtc/RTCPeerConnection.d.ts | 75 +++++++++++++------------ 6 files changed, 53 insertions(+), 67 deletions(-) diff --git a/types/peerjs/index.d.ts b/types/peerjs/index.d.ts index 4ca88fd50b..faf99dc9b3 100644 --- a/types/peerjs/index.d.ts +++ b/types/peerjs/index.d.ts @@ -2,9 +2,7 @@ // Project: http://peerjs.com/ // Definitions by: Toshiya Nakakura // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 - -/// +// TypeScript Version: 3.2 declare namespace PeerJs{ interface PeerJSOption{ @@ -13,7 +11,7 @@ declare namespace PeerJs{ port?: number; path?: string; secure?: boolean; - config?: RTCPeerConnectionConfig; + config?: RTCConfiguration; debug?: number; } diff --git a/types/skyway/index.d.ts b/types/skyway/index.d.ts index eb73937178..e396f8cff0 100644 --- a/types/skyway/index.d.ts +++ b/types/skyway/index.d.ts @@ -2,9 +2,7 @@ // Project: http://nttcom.github.io/skyway/ // Definitions by: Toshiya Nakakura // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 - -/// +// TypeScript Version: 3.2 declare namespace PeerJs{ interface PeerJSOption{ @@ -14,7 +12,7 @@ declare namespace PeerJs{ path?: string; secure?: boolean; turn?: boolean; - config?: RTCPeerConnectionConfig; + config?: RTCConfiguration; debug?: number; } diff --git a/types/w3c-generic-sensor/index.d.ts b/types/w3c-generic-sensor/index.d.ts index 40f6db6301..bec987d04f 100644 --- a/types/w3c-generic-sensor/index.d.ts +++ b/types/w3c-generic-sensor/index.d.ts @@ -2,12 +2,10 @@ // Project: https://www.w3.org/TR/generic-sensor/ // Definitions by: Kenneth Rohde Christiansen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 +// TypeScript Version: 3.2 // Explainer: https://www.w3.org/TR/motion-sensors/ -/// - declare class SensorErrorEvent extends Event { constructor(type: string, errorEventInitDict: SensorErrorEventInit); readonly error: Error; @@ -82,7 +80,7 @@ declare class UncalibratedMagnetometer extends Sensor { // Orientation Sensor: https://www.w3.org/TR/orientation-sensor/ -type RotationMatrixType = Float32Array | Float64Array | GeometryDom.DOMMatrix; +type RotationMatrixType = Float32Array | Float64Array | DOMMatrix; declare class OrientationSensor extends Sensor { readonly quaternion?: number[]; diff --git a/types/w3c-screen-orientation/index.d.ts b/types/w3c-screen-orientation/index.d.ts index 7cac6c33f3..74fee2ecb6 100644 --- a/types/w3c-screen-orientation/index.d.ts +++ b/types/w3c-screen-orientation/index.d.ts @@ -2,8 +2,8 @@ // Project: https://www.w3.org/TR/screen-orientation/ // Definitions by: Kenneth Rohde Christiansen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.2 -type OrientationType = "portrait-primary" | "portrait-secondary" | "landscape-primary" | "landscape-secondary"; type ScreenOrientationLockType = "any" | "natural" | "landscape" | "portrait" | "portrait-primary" | "portrait-secondary" | "landscape-primary" | "landscape-secondary"; interface ScreenOrientation extends EventTarget { diff --git a/types/web-animations-js/index.d.ts b/types/web-animations-js/index.d.ts index 54c0b8c01b..c317675727 100644 --- a/types/web-animations-js/index.d.ts +++ b/types/web-animations-js/index.d.ts @@ -2,10 +2,10 @@ // Project: https://github.com/web-animations/web-animations-js // Definitions by: Kristian Moerch // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.2 type AnimationEffectTimingFillMode = "none" | "forwards" | "backwards" | "both" | "auto"; type AnimationEffectTimingPlaybackDirection = "normal" | "reverse" | "alternate" | "alternate-reverse"; -type AnimationPlayState = "idle" | "running" | "paused" | "finished"; interface AnimationPlaybackEvent { target: Animation; @@ -68,18 +68,7 @@ interface ComputedTimingProperties { currentIteration: number | null; } -declare class KeyframeEffect implements AnimationEffectReadOnly { - constructor(target: HTMLElement, effect: AnimationKeyFrame | AnimationKeyFrame[], timing: number | AnimationEffectTiming, id?: string); - activeDuration: number; - onsample: (timeFraction: number | null, effect: KeyframeEffect, animation: Animation) => void | undefined; - parent: KeyframeEffect | null; - target: HTMLElement; - timing: number; - getComputedTiming(): ComputedTimingProperties; - getFrames(): AnimationKeyFrame[]; - remove(): void; -} -type AnimationEventListener = (this: Animation, evt: AnimationPlaybackEvent) => any; +type AnimationEventListener = ((this: Animation, evt: AnimationPlaybackEvent) => any) | null; interface Animation extends EventTarget { currentTime: number | null; @@ -88,7 +77,7 @@ interface Animation extends EventTarget { onfinish: AnimationEventListener; readonly playState: AnimationPlayState; playbackRate: number; - startTime: number; + startTime: number | null; cancel(): void; finish(): void; pause(): void; @@ -96,15 +85,15 @@ interface Animation extends EventTarget { reverse(): void; addEventListener(type: "finish" | "cancel", handler: EventListener): void; removeEventListener(type: "finish" | "cancel", handler: EventListener): void; - effect: AnimationEffectReadOnly; + effect: AnimationEffect | null; readonly finished: Promise; readonly ready: Promise; - timeline: AnimationTimeline; + timeline: AnimationTimeline | null; } declare var Animation: { prototype: Animation; - new(effect?: AnimationEffectReadOnly, timeline?: AnimationTimeline): Animation; + new(effect?: AnimationEffect | null, timeline?: AnimationTimeline | null): Animation; }; declare class SequenceEffect extends KeyframeEffect { @@ -118,5 +107,5 @@ interface Element { getAnimations(): Animation[]; } interface Document { - timeline: AnimationTimeline; + readonly timeline: AnimationTimeline; } diff --git a/types/webrtc/RTCPeerConnection.d.ts b/types/webrtc/RTCPeerConnection.d.ts index 210ab66ddd..4b5c1cea53 100644 --- a/types/webrtc/RTCPeerConnection.d.ts +++ b/types/webrtc/RTCPeerConnection.d.ts @@ -2,6 +2,7 @@ // Project: https://www.w3.org/TR/webrtc/ // Definitions by: Danilo Bargen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.2 // // W3 Spec: https://www.w3.org/TR/webrtc/ // @@ -11,8 +12,6 @@ /// -type EventHandler = (event: Event) => void; - // https://www.w3.org/TR/webrtc/#idl-def-rtcofferansweroptions interface RTCOfferAnswerOptions { voiceActivityDetection?: boolean; // default = true @@ -28,10 +27,10 @@ interface RTCAnswerOptions extends RTCOfferAnswerOptions { } // https://www.w3.org/TR/webrtc/#idl-def-rtcpeerconnectionstate -type RTCPeerConnectionState = 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed'; +// type RTCPeerConnectionState = 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed'; // https://www.w3.org/TR/webrtc/#idl-def-rtcicecredentialtype -type RTCIceCredentialType = 'password' | 'token'; +// type RTCIceCredentialType = 'password' | 'token'; // https://www.w3.org/TR/webrtc/#idl-def-rtciceserver interface RTCIceServer { @@ -40,7 +39,7 @@ interface RTCIceServer { } // https://www.w3.org/TR/webrtc/#idl-def-rtcrtcpmuxpolicy -type RTCRtcpMuxPolicy = 'negotiate' | 'require'; +// type RTCRtcpMuxPolicy = 'negotiate' | 'require'; // https://www.w3.org/TR/webrtc/#idl-def-rtciceparameters interface RTCIceParameters { @@ -49,6 +48,7 @@ interface RTCIceParameters { } // https://www.w3.org/TR/webrtc/#idl-def-rtcicetransport +type IceTransportEventHandler = ((this: RTCIceTransport, ev: Event) => any) | null; interface RTCIceTransport { //readonly role: RTCIceRole; //readonly component: RTCIceComponent; @@ -59,17 +59,18 @@ interface RTCIceTransport { getSelectedCandidatePair(): RTCIceCandidatePair | null; getLocalParameters(): RTCIceParameters | null; getRemoteParameters(): RTCIceParameters | null; - onstatechange: EventHandler; - ongatheringstatechange: EventHandler; - onselectedcandidatepairchange: EventHandler; + onstatechange: IceTransportEventHandler; + ongatheringstatechange: IceTransportEventHandler; + onselectedcandidatepairchange: IceTransportEventHandler; } // https://www.w3.org/TR/webrtc/#idl-def-rtcdtlstransport +type DtlsTransportEventHandler = ((this: RTCDtlsTransport, ev: Event) => any) | null; interface RTCDtlsTransport { readonly transport: RTCIceTransport; //readonly state: RTCDtlsTransportState; getRemoteCertificates(): ArrayBuffer[]; - onstatechange: EventHandler; + onstatechange: DtlsTransportEventHandler; } // https://www.w3.org/TR/webrtc/#idl-def-rtcrtpcodeccapability @@ -79,7 +80,7 @@ interface RTCRtpCodecCapability { // https://www.w3.org/TR/webrtc/#idl-def-rtcrtpheaderextensioncapability interface RTCRtpHeaderExtensionCapability { - uri: string; + uri?: string; } // https://www.w3.org/TR/webrtc/#idl-def-rtcrtpcapabilities @@ -99,17 +100,17 @@ interface RTCRtpFecParameters { } // https://www.w3.org/TR/webrtc/#idl-def-rtcdtxstatus -type RTCDtxStatus = 'disabled' | 'enabled'; +// type RTCDtxStatus = 'disabled' | 'enabled'; // https://www.w3.org/TR/webrtc/#idl-def-rtcprioritytype -type RTCPriorityType = 'very-low' | 'low' | 'medium' | 'high'; +// type RTCPriorityType = 'very-low' | 'low' | 'medium' | 'high'; // https://www.w3.org/TR/webrtc/#idl-def-rtcrtpencodingparameters interface RTCRtpEncodingParameters { //ssrc: number; //rtx: RTCRtpRtxParameters; //fec: RTCRtpFecParameters; - dtx: RTCDtxStatus; + dtx?: RTCDtxStatus; //active: boolean; //priority: RTCPriorityType; //maxBitrate: number; @@ -121,7 +122,7 @@ interface RTCRtpEncodingParameters { interface RTCRtpHeaderExtensionParameters { //uri: string; //id: number; - encrypted: boolean; + encrypted?: boolean; } // https://www.w3.org/TR/webrtc/#idl-def-rtcrtcpparameters @@ -136,7 +137,7 @@ interface RTCRtpCodecParameters { mimeType: string; //clockRate: number; channels?: number; // default = 1 - sdpFmtpLine: string; + sdpFmtpLine?: string; } // https://www.w3.org/TR/webrtc/#idl-def-rtcrtpparameters @@ -152,9 +153,9 @@ interface RTCRtpParameters { // https://www.w3.org/TR/webrtc/#dom-rtcrtpcontributingsource interface RTCRtpContributingSource { //readonly timestamp: number; - readonly source: number; + source: number; //readonly audioLevel: number | null; - readonly voiceActivityFlag: boolean | null; + readonly voiceActivityFlag?: boolean | undefined; } // https://www.w3.org/TR/webrtc/#idl-def-rtcrtpcapabilities @@ -183,7 +184,7 @@ interface RTCRtpReceiver { } // https://www.w3.org/TR/webrtc/#idl-def-rtcrtptransceiverdirection -type RTCRtpTransceiverDirection = 'sendrecv' | 'sendonly' | 'recvonly' | 'inactive'; +// type RTCRtpTransceiverDirection = 'sendrecv' | 'sendonly' | 'recvonly' | 'inactive'; // https://www.w3.org/TR/webrtc/#idl-def-rtcrtptransceiver interface RTCRtpTransceiver { @@ -191,7 +192,7 @@ interface RTCRtpTransceiver { readonly sender: RTCRtpSender; readonly receiver: RTCRtpReceiver; readonly stopped: boolean; - readonly direction: RTCRtpTransceiverDirection; + direction: RTCRtpTransceiverDirection; setDirection(direction: RTCRtpTransceiverDirection): void; stop(): void; setCodecPreferences(codecs: RTCRtpCodecCapability[]): void; @@ -200,8 +201,8 @@ interface RTCRtpTransceiver { // https://www.w3.org/TR/webrtc/#idl-def-rtcrtptransceiverinit interface RTCRtpTransceiverInit { direction?: RTCRtpTransceiverDirection; // default = 'sendrecv' - streams: MediaStream[]; - sendEncodings: RTCRtpEncodingParameters[]; + streams?: MediaStream[]; + sendEncodings?: RTCRtpEncodingParameters[]; } // https://www.w3.org/TR/webrtc/#dom-rtccertificate @@ -241,12 +242,13 @@ interface RTCDataChannelInit { } // https://www.w3.org/TR/webrtc/#idl-def-rtcdatachannelstate -type RTCDataChannelState = 'connecting' | 'open' | 'closing' | 'closed'; +// type RTCDataChannelState = 'connecting' | 'open' | 'closing' | 'closed'; // https://www.w3.org/TR/websockets/#dom-websocket-binarytype -type RTCBinaryType = 'blob' | 'arraybuffer'; +// type RTCBinaryType = 'blob' | 'arraybuffer'; // https://www.w3.org/TR/webrtc/#idl-def-rtcdatachannel +type DataChannelEventHandler = ((this: RTCDataChannel, ev: E) => any) | null; interface RTCDataChannel extends EventTarget { readonly label: string; readonly ordered: boolean; @@ -254,33 +256,33 @@ interface RTCDataChannel extends EventTarget { readonly maxRetransmits: number | null; readonly protocol: string; readonly negotiated: boolean; - readonly id: number; + readonly id: number | null; readonly readyState: RTCDataChannelState; readonly bufferedAmount: number; bufferedAmountLowThreshold: number; - binaryType: RTCBinaryType; + binaryType: string; close(): void; send(data: string | Blob | ArrayBuffer | ArrayBufferView): void; - onopen: EventHandler; - onmessage: (event: MessageEvent) => void; - onbufferedamountlow: EventHandler; - onerror: (event: ErrorEvent) => void; - onclose: EventHandler; + onopen: DataChannelEventHandler; + onmessage: DataChannelEventHandler; + onbufferedamountlow: DataChannelEventHandler; + onerror: DataChannelEventHandler; + onclose: DataChannelEventHandler; } // https://www.w3.org/TR/webrtc/#h-rtctrackevent interface RTCTrackEvent extends Event { readonly receiver: RTCRtpReceiver; readonly track: MediaStreamTrack; - readonly streams: MediaStream[]; + readonly streams: ReadonlyArray; readonly transceiver: RTCRtpTransceiver; } // https://www.w3.org/TR/webrtc/#h-rtcpeerconnectioniceevent interface RTCPeerConnectionIceEvent extends Event { - readonly url: string; + readonly url: string | null; } // https://www.w3.org/TR/webrtc/#h-rtcpeerconnectioniceerrorevent @@ -297,6 +299,7 @@ interface RTCDataChannelEvent { } // https://www.w3.org/TR/webrtc/#idl-def-rtcpeerconnection +type PeerConnectionEventHandler = ((this: RTCPeerConnection, ev: E) => any) | null; interface RTCPeerConnection extends EventTarget { createOffer(options?: RTCOfferOptions): Promise; createAnswer(options?: RTCAnswerOptions): Promise; @@ -320,8 +323,8 @@ interface RTCPeerConnection extends EventTarget { setConfiguration(configuration: RTCConfiguration): void; close(): void; - onicecandidateerror: (event: RTCPeerConnectionIceErrorEvent) => void; - onconnectionstatechange: EventHandler; + onicecandidateerror: PeerConnectionEventHandler; + onconnectionstatechange: PeerConnectionEventHandler; // Extension: https://www.w3.org/TR/webrtc/#h-rtcpeerconnection-interface-extensions getSenders(): RTCRtpSender[]; @@ -330,12 +333,12 @@ interface RTCPeerConnection extends EventTarget { addTrack(track: MediaStreamTrack, ...streams: MediaStream[]): RTCRtpSender; removeTrack(sender: RTCRtpSender): void; addTransceiver(trackOrKind: MediaStreamTrack | string, init?: RTCRtpTransceiverInit): RTCRtpTransceiver; - ontrack: (event: RTCTrackEvent) => void; + ontrack: PeerConnectionEventHandler; // Extension: https://www.w3.org/TR/webrtc/#h-rtcpeerconnection-interface-extensions-1 readonly sctp: RTCSctpTransport | null; createDataChannel(label: string | null, dataChannelDict?: RTCDataChannelInit): RTCDataChannel; - ondatachannel: (event: RTCDataChannelEvent) => void; + ondatachannel: PeerConnectionEventHandler; // Extension: https://www.w3.org/TR/webrtc/#h-rtcpeerconnection-interface-extensions-2 getStats(selector?: MediaStreamTrack | null): Promise; From 398bd65886d481fdc91a49591a5b18ceab699569 Mon Sep 17 00:00:00 2001 From: Erik Christensen Date: Wed, 21 Nov 2018 14:43:15 -0500 Subject: [PATCH 040/608] Remove inaccurate deprecation warning --- types/mongodb/index.d.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/types/mongodb/index.d.ts b/types/mongodb/index.d.ts index 458aef1fc5..ca7b331f5b 100644 --- a/types/mongodb/index.d.ts +++ b/types/mongodb/index.d.ts @@ -45,10 +45,7 @@ export class MongoClient extends EventEmitter { static connect(uri: string, callback: MongoCallback): void; static connect(uri: string, options?: MongoClientOptions): Promise; static connect(uri: string, options: MongoClientOptions, callback: MongoCallback): void; - /** - * @deprecated - * http://mongodb.github.io/node-mongodb-native/3.1/api/MongoClient.html#connect - */ + /** http://mongodb.github.io/node-mongodb-native/3.1/api/MongoClient.html#connect */ connect(): Promise; connect(callback: MongoCallback): void; /** http://mongodb.github.io/node-mongodb-native/3.1/api/MongoClient.html#close */ From a57ef63d3cb13e22b83b61784a7e35e0702863dd Mon Sep 17 00:00:00 2001 From: Erik Christensen Date: Wed, 21 Nov 2018 15:21:03 -0500 Subject: [PATCH 041/608] Added missing index spec and collation document interfaces --- types/mongodb/index.d.ts | 50 ++++++++++++++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 7 deletions(-) diff --git a/types/mongodb/index.d.ts b/types/mongodb/index.d.ts index ca7b331f5b..a217b0a605 100644 --- a/types/mongodb/index.d.ts +++ b/types/mongodb/index.d.ts @@ -655,9 +655,9 @@ export interface Collection { createIndex(fieldOrSpec: string | any, options?: IndexOptions): Promise; createIndex(fieldOrSpec: string | any, options: IndexOptions, callback: MongoCallback): void; /** http://mongodb.github.io/node-mongodb-native/3.1/api/Collection.html#createIndexes and http://docs.mongodb.org/manual/reference/command/createIndexes/ */ - createIndexes(indexSpecs: Object[], callback: MongoCallback): void; - createIndexes(indexSpecs: Object[], options?: { session?: ClientSession }): Promise; - createIndexes(indexSpecs: Object[], options: { session?: ClientSession }, callback: MongoCallback): void; + createIndexes(indexSpecs: IndexSpecification[], callback: MongoCallback): void; + createIndexes(indexSpecs: IndexSpecification[], options?: { session?: ClientSession }): Promise; + createIndexes(indexSpecs: IndexSpecification[], options: { session?: ClientSession }, callback: MongoCallback): void; /** http://mongodb.github.io/node-mongodb-native/3.1/api/Collection.html#deleteMany */ deleteMany(filter: FilterQuery, callback: MongoCallback): void; deleteMany(filter: FilterQuery, options?: CommonOptions): Promise; @@ -1074,7 +1074,7 @@ export interface CollectionAggregationOptions { promoteLongs?: boolean; promoteValues?: boolean; promoteBuffers?: boolean; - collation?: Object; + collation?: CollationDocument; comment?: string session?: ClientSession; @@ -1311,7 +1311,7 @@ export interface FindOneOptions { readPreference?: ReadPreference | string; partial?: boolean; maxTimeMs?: number; - collation?: Object; + collation?: CollationDocument; session?: ClientSession; } @@ -1430,7 +1430,7 @@ export class Cursor extends Readable { close(): Promise; close(callback: MongoCallback): void; /** http://mongodb.github.io/node-mongodb-native/3.1/api/Cursor.html#collation */ - collation(value: Object): Cursor; + collation(value: CollationDocument): Cursor; /** http://mongodb.github.io/node-mongodb-native/3.1/api/Cursor.html#comment */ comment(value: string): Cursor; /** http://mongodb.github.io/node-mongodb-native/3.1/api/Cursor.html#count */ @@ -1729,7 +1729,7 @@ export interface ChangeStreamOptions { maxAwaitTimeMS?: number; resumeAfter?: Object; batchSize?: number; - collation?: Object; + collation?: CollationDocument; readPreference?: ReadPreference; } @@ -1780,3 +1780,39 @@ export class Logger { // Set the current log level static setLevel(level: string): void } + +/** https://docs.mongodb.com/manual/reference/collation/#collation-document-fields */ +export interface CollationDocument { + locale: string; + strength?: number; + caseLevel?: boolean; + caseFirst?: boolean; + numericOrdering?: boolean; + alternate?: string; + maxVariable?: string; + backwards?: boolean; + normalization?: boolean; + +} + +/** https://docs.mongodb.com/manual/reference/command/createIndexes/ */ +export interface IndexSpecification { + key: object; + name?: string; + background?: boolean; + unique?: boolean; + partialFilterExpression?: object; + sparse?: boolean; + expireAfterSeconds?: number; + storageEngine?: object; + weights?: object; + default_language?: string; + language_override?: string; + textIndexVersion?: number; + '2dsphereIndexVersion'?: number; + bits?: number; + min?: number; + max?: number; + bucketSize?: number; + collation?: CollationDocument; +} From 289d09cce48cbd9faf698fa59864a5aef463dbe1 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Wed, 21 Nov 2018 12:41:56 -0800 Subject: [PATCH 042/608] Remove code instead of commenting it out --- types/webrtc/RTCPeerConnection.d.ts | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/types/webrtc/RTCPeerConnection.d.ts b/types/webrtc/RTCPeerConnection.d.ts index 4b5c1cea53..e5dfd79be9 100644 --- a/types/webrtc/RTCPeerConnection.d.ts +++ b/types/webrtc/RTCPeerConnection.d.ts @@ -26,21 +26,12 @@ interface RTCOfferOptions extends RTCOfferAnswerOptions { interface RTCAnswerOptions extends RTCOfferAnswerOptions { } -// https://www.w3.org/TR/webrtc/#idl-def-rtcpeerconnectionstate -// type RTCPeerConnectionState = 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed'; - -// https://www.w3.org/TR/webrtc/#idl-def-rtcicecredentialtype -// type RTCIceCredentialType = 'password' | 'token'; - // https://www.w3.org/TR/webrtc/#idl-def-rtciceserver interface RTCIceServer { //urls: string | string[]; credentialType?: RTCIceCredentialType; // default = 'password' } -// https://www.w3.org/TR/webrtc/#idl-def-rtcrtcpmuxpolicy -// type RTCRtcpMuxPolicy = 'negotiate' | 'require'; - // https://www.w3.org/TR/webrtc/#idl-def-rtciceparameters interface RTCIceParameters { //usernameFragment: string; @@ -99,12 +90,6 @@ interface RTCRtpFecParameters { //ssrc: number; } -// https://www.w3.org/TR/webrtc/#idl-def-rtcdtxstatus -// type RTCDtxStatus = 'disabled' | 'enabled'; - -// https://www.w3.org/TR/webrtc/#idl-def-rtcprioritytype -// type RTCPriorityType = 'very-low' | 'low' | 'medium' | 'high'; - // https://www.w3.org/TR/webrtc/#idl-def-rtcrtpencodingparameters interface RTCRtpEncodingParameters { //ssrc: number; @@ -183,9 +168,6 @@ interface RTCRtpReceiver { getContributingSources(): RTCRtpContributingSource[]; } -// https://www.w3.org/TR/webrtc/#idl-def-rtcrtptransceiverdirection -// type RTCRtpTransceiverDirection = 'sendrecv' | 'sendonly' | 'recvonly' | 'inactive'; - // https://www.w3.org/TR/webrtc/#idl-def-rtcrtptransceiver interface RTCRtpTransceiver { readonly mid: string | null; @@ -241,12 +223,6 @@ interface RTCDataChannelInit { id?: number; } -// https://www.w3.org/TR/webrtc/#idl-def-rtcdatachannelstate -// type RTCDataChannelState = 'connecting' | 'open' | 'closing' | 'closed'; - -// https://www.w3.org/TR/websockets/#dom-websocket-binarytype -// type RTCBinaryType = 'blob' | 'arraybuffer'; - // https://www.w3.org/TR/webrtc/#idl-def-rtcdatachannel type DataChannelEventHandler = ((this: RTCDataChannel, ev: E) => any) | null; interface RTCDataChannel extends EventTarget { From f6a44f54c73a0b255e7b36a1953824e518165996 Mon Sep 17 00:00:00 2001 From: IanStorm Date: Wed, 21 Nov 2018 22:04:54 +0100 Subject: [PATCH 043/608] * Added "test" for instantiating `ListStream` without `new` * Added "test" for using `write` on a `ListStream` instance --- types/list-stream/index.d.ts | 17 +++++++++++------ types/list-stream/list-stream-tests.ts | 17 +++++++++++++++++ 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/types/list-stream/index.d.ts b/types/list-stream/index.d.ts index 226d4c09ab..b51c9bacb0 100644 --- a/types/list-stream/index.d.ts +++ b/types/list-stream/index.d.ts @@ -7,16 +7,21 @@ import { Duplex, DuplexOptions } from "stream"; -declare namespace ListStream { +interface ListStreamMethod { + (callback?: (err: Error, data: any[]) => void): ListStream; + (options?: DuplexOptions, callback?: (err: Error, data: any[]) => void): ListStream; } -declare class ListStream extends Duplex { - constructor(callback?: (err: Error, data: any[]) => void); - constructor(options?: DuplexOptions, callback?: (err: Error, data: any[]) => void); +interface ListStreamConstructor extends ListStreamMethod { + new(callback?: (err: Error, data: any[]) => void): ListStream; + new(options?: DuplexOptions, callback?: (err: Error, data: any[]) => void): ListStream; - static obj(callback?: (err: Error, data: any[]) => void): ListStream; - static obj(options?: DuplexOptions, callback?: (err: Error, data: any[]) => void): ListStream; + obj: ListStreamMethod; +} +declare let ListStream: ListStreamConstructor; + +interface ListStream extends Duplex { append(chunk: any): void; duplicate(): ListStream; end(): void; diff --git a/types/list-stream/list-stream-tests.ts b/types/list-stream/list-stream-tests.ts index 4b7fc2a6ab..5f04626b31 100644 --- a/types/list-stream/list-stream-tests.ts +++ b/types/list-stream/list-stream-tests.ts @@ -4,6 +4,20 @@ let chunk: any = "chunk"; let listStream: ListStream; let num = 1; +listStream = ListStream((err: Error, data: any[]) => { + if (err) { throw err; } + console.log(data.length); + for (const date of data) { + console.log(date); + } +}); +listStream = ListStream({ objectMode: true }, (err: Error, data: any[]) => { + if (err) { throw err; } + console.log(data.length); + for (const date of data) { + console.log(date); + } +}); listStream = new ListStream((err: Error, data: any[]) => { if (err) { throw err; } console.log(data.length); @@ -26,6 +40,9 @@ listStream = ListStream.obj((err: Error, data: any[]) => { } }); +listStream = ListStream.obj(); +listStream.write({ key: "value" }); + listStream.append(chunk); listStream = listStream.duplicate(); From 60d9095e61563415668e240eadfa8d2469548bf7 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Wed, 21 Nov 2018 13:27:18 -0800 Subject: [PATCH 044/608] Seems like webrtc was added in 3.0 --- types/webrtc/RTCPeerConnection.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/webrtc/RTCPeerConnection.d.ts b/types/webrtc/RTCPeerConnection.d.ts index e5dfd79be9..9dc2faae12 100644 --- a/types/webrtc/RTCPeerConnection.d.ts +++ b/types/webrtc/RTCPeerConnection.d.ts @@ -2,7 +2,7 @@ // Project: https://www.w3.org/TR/webrtc/ // Definitions by: Danilo Bargen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3.2 +// TypeScript Version: 3.0 // // W3 Spec: https://www.w3.org/TR/webrtc/ // @@ -140,7 +140,7 @@ interface RTCRtpContributingSource { //readonly timestamp: number; source: number; //readonly audioLevel: number | null; - readonly voiceActivityFlag?: boolean | undefined; + readonly voiceActivityFlag?: boolean; } // https://www.w3.org/TR/webrtc/#idl-def-rtcrtpcapabilities From 089442e1a9440bf89474edf2d81d13c3bd96226e Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Wed, 21 Nov 2018 13:33:21 -0800 Subject: [PATCH 045/608] Put version header in index.d.ts --- types/webrtc/RTCPeerConnection.d.ts | 1 - types/webrtc/index.d.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/types/webrtc/RTCPeerConnection.d.ts b/types/webrtc/RTCPeerConnection.d.ts index 9dc2faae12..3df7999212 100644 --- a/types/webrtc/RTCPeerConnection.d.ts +++ b/types/webrtc/RTCPeerConnection.d.ts @@ -2,7 +2,6 @@ // Project: https://www.w3.org/TR/webrtc/ // Definitions by: Danilo Bargen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3.0 // // W3 Spec: https://www.w3.org/TR/webrtc/ // diff --git a/types/webrtc/index.d.ts b/types/webrtc/index.d.ts index 4a16860637..e087a03f4e 100644 --- a/types/webrtc/index.d.ts +++ b/types/webrtc/index.d.ts @@ -2,7 +2,7 @@ // Project: https://webrtc.org/ // Definitions by: Toshiya Nakakura // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 3.0 /// /// From 588718bc304d4b577457032f8348decfce16b5cb Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Wed, 21 Nov 2018 13:38:02 -0800 Subject: [PATCH 046/608] Update w3c-image-capture's dependencies too --- types/w3c-image-capture/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/w3c-image-capture/index.d.ts b/types/w3c-image-capture/index.d.ts index 8f04fad534..24a7d917c4 100644 --- a/types/w3c-image-capture/index.d.ts +++ b/types/w3c-image-capture/index.d.ts @@ -2,7 +2,7 @@ // Project: https://www.w3.org/TR/image-capture/ // Definitions by: Cosium // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 3.0 /// From a72081e2b5cdc37d2e47acec4b1526250093575a Mon Sep 17 00:00:00 2001 From: Peter Safranek Date: Wed, 21 Nov 2018 15:07:50 -0800 Subject: [PATCH 047/608] [gulp-json-validator] Introduce typings for gulp-json-validator --- .../gulp-json-validator-tests.ts | 6 +++++ types/gulp-json-validator/index.d.ts | 14 +++++++++++ types/gulp-json-validator/tsconfig.json | 23 +++++++++++++++++++ types/gulp-json-validator/tslint.json | 6 +++++ 4 files changed, 49 insertions(+) create mode 100644 types/gulp-json-validator/gulp-json-validator-tests.ts create mode 100644 types/gulp-json-validator/index.d.ts create mode 100644 types/gulp-json-validator/tsconfig.json create mode 100644 types/gulp-json-validator/tslint.json diff --git a/types/gulp-json-validator/gulp-json-validator-tests.ts b/types/gulp-json-validator/gulp-json-validator-tests.ts new file mode 100644 index 0000000000..74a00f03da --- /dev/null +++ b/types/gulp-json-validator/gulp-json-validator-tests.ts @@ -0,0 +1,6 @@ +import gulpJsonValidator = require("gulp-json-validator"); + +gulpJsonValidator(); // $ExpectType ReadWriteStream +gulpJsonValidator({}); // $ExpectType ReadWriteStream +gulpJsonValidator({ allowDuplicatedKeys: true }); // $ExpectType ReadWriteStream +gulpJsonValidator({ allowDuplicatedKeys: false }); // $ExpectType ReadWriteStream diff --git a/types/gulp-json-validator/index.d.ts b/types/gulp-json-validator/index.d.ts new file mode 100644 index 0000000000..26e31d8b43 --- /dev/null +++ b/types/gulp-json-validator/index.d.ts @@ -0,0 +1,14 @@ +// Type definitions for gulp-json-validator 1.2 +// Project: https://github.com/jackyjieliu/gulp-json-validator +// Definitions by: Peter Safranek +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +interface GulpJsonValidatorOptions { + allowDuplicatedKeys?: boolean; +} + +declare function gulpJsonValidator(option?: GulpJsonValidatorOptions): NodeJS.ReadWriteStream; + +export = gulpJsonValidator; diff --git a/types/gulp-json-validator/tsconfig.json b/types/gulp-json-validator/tsconfig.json new file mode 100644 index 0000000000..76ee50c184 --- /dev/null +++ b/types/gulp-json-validator/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "gulp-json-validator-tests.ts" + ] +} diff --git a/types/gulp-json-validator/tslint.json b/types/gulp-json-validator/tslint.json new file mode 100644 index 0000000000..702f9354fc --- /dev/null +++ b/types/gulp-json-validator/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "file-name-casing": false + } +} From 4d312320c106bc1a3af3fb1cf88bd0fd11ad3757 Mon Sep 17 00:00:00 2001 From: danford Date: Thu, 22 Nov 2018 11:13:10 +1100 Subject: [PATCH 048/608] react-css-collapse --- types/react-css-collapse/index.d.ts | 18 +++++ .../react-css-collapse-tests.tsx | 14 ++++ types/react-css-collapse/tsconfig.json | 25 ++++++ types/react-css-collapse/tslint.json | 79 +++++++++++++++++++ 4 files changed, 136 insertions(+) create mode 100644 types/react-css-collapse/index.d.ts create mode 100644 types/react-css-collapse/react-css-collapse-tests.tsx create mode 100644 types/react-css-collapse/tsconfig.json create mode 100644 types/react-css-collapse/tslint.json diff --git a/types/react-css-collapse/index.d.ts b/types/react-css-collapse/index.d.ts new file mode 100644 index 0000000000..aa17200367 --- /dev/null +++ b/types/react-css-collapse/index.d.ts @@ -0,0 +1,18 @@ +// Type definitions for react-css-collapse 3.6.0 +// Project: https://github.com/SparebankenVest/react-css-collapse; +// Definitions by: Daniel Ford +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +declare module 'react-css-collapse' { + interface Props { + isOpen: boolean; + className?: string | null; + onRest?: () => void; + transition?: string | null; + } + class Collapse extends React.Component { + public render(): React.ReactElement; + } + export default Collapse; +} diff --git a/types/react-css-collapse/react-css-collapse-tests.tsx b/types/react-css-collapse/react-css-collapse-tests.tsx new file mode 100644 index 0000000000..3b699b530d --- /dev/null +++ b/types/react-css-collapse/react-css-collapse-tests.tsx @@ -0,0 +1,14 @@ +import * as React from "react"; +import { SFC } from "react"; +import { render } from "react-dom"; +import Collapse from "react-css-collapse"; + +const TestOpen: SFC = () => ( + +
+ i am open +
+
+); + +render(, document.getElementById("main")); diff --git a/types/react-css-collapse/tsconfig.json b/types/react-css-collapse/tsconfig.json new file mode 100644 index 0000000000..4af49b9769 --- /dev/null +++ b/types/react-css-collapse/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "jsx": "react" + }, + "files": [ + "index.d.ts", + "react-css-collapse-tests.tsx" + ] +} diff --git a/types/react-css-collapse/tslint.json b/types/react-css-collapse/tslint.json new file mode 100644 index 0000000000..a41bf5d19a --- /dev/null +++ b/types/react-css-collapse/tslint.json @@ -0,0 +1,79 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "adjacent-overload-signatures": false, + "array-type": false, + "arrow-return-shorthand": false, + "ban-types": false, + "callable-types": false, + "comment-format": false, + "dt-header": false, + "eofline": false, + "export-just-namespace": false, + "import-spacing": false, + "interface-name": false, + "interface-over-type-literal": false, + "jsdoc-format": false, + "max-line-length": false, + "member-access": false, + "new-parens": false, + "no-any-union": false, + "no-boolean-literal-compare": false, + "no-conditional-assignment": false, + "no-consecutive-blank-lines": false, + "no-construct": false, + "no-declare-current-package": false, + "no-duplicate-imports": false, + "no-duplicate-variable": false, + "no-empty-interface": false, + "no-for-in-array": false, + "no-inferrable-types": false, + "no-internal-module": false, + "no-irregular-whitespace": false, + "no-mergeable-namespace": false, + "no-misused-new": false, + "no-namespace": false, + "no-object-literal-type-assertion": false, + "no-padding": false, + "no-redundant-jsdoc": false, + "no-redundant-jsdoc-2": false, + "no-redundant-undefined": false, + "no-reference-import": false, + "no-relative-import-in-test": false, + "no-self-import": false, + "no-single-declare-module": false, + "no-string-throw": false, + "no-unnecessary-callback-wrapper": false, + "no-unnecessary-class": false, + "no-unnecessary-generics": false, + "no-unnecessary-qualifier": false, + "no-unnecessary-type-assertion": false, + "no-useless-files": false, + "no-var-keyword": false, + "no-var-requires": false, + "no-void-expression": false, + "no-trailing-whitespace": false, + "object-literal-key-quotes": false, + "object-literal-shorthand": false, + "one-line": false, + "one-variable-per-declaration": false, + "only-arrow-functions": false, + "prefer-conditional-expression": false, + "prefer-const": false, + "prefer-declare-function": false, + "prefer-for-of": false, + "prefer-method-signature": false, + "prefer-template": false, + "radix": false, + "semicolon": false, + "space-before-function-paren": false, + "space-within-parens": false, + "strict-export-declare-modifiers": false, + "trim-file": false, + "triple-equals": false, + "typedef-whitespace": false, + "unified-signatures": false, + "void-return": false, + "whitespace": false + } +} From 809fc1d291a42de5da96d6fa03796452bcde1c82 Mon Sep 17 00:00:00 2001 From: feinoujc Date: Wed, 21 Nov 2018 21:33:29 -0500 Subject: [PATCH 049/608] add graphql-fields typings --- types/graphql-fields/graphql-fields-tests.ts | 8 +++++++ types/graphql-fields/index.d.ts | 18 +++++++++++++++ types/graphql-fields/tsconfig.json | 24 ++++++++++++++++++++ types/graphql-fields/tslint.json | 1 + 4 files changed, 51 insertions(+) create mode 100644 types/graphql-fields/graphql-fields-tests.ts create mode 100644 types/graphql-fields/index.d.ts create mode 100644 types/graphql-fields/tsconfig.json create mode 100644 types/graphql-fields/tslint.json diff --git a/types/graphql-fields/graphql-fields-tests.ts b/types/graphql-fields/graphql-fields-tests.ts new file mode 100644 index 0000000000..811fe25ab2 --- /dev/null +++ b/types/graphql-fields/graphql-fields-tests.ts @@ -0,0 +1,8 @@ +import { GraphQLResolveInfo } from 'graphql'; +import graphqlFields = require('graphql-fields'); + +const info = ({} as any) as GraphQLResolveInfo; + +const fieldsWithSubFieldsArgs = graphqlFields(info, {}, { processArguments: true }); +const fieldsWithoutTypeName = graphqlFields(info, {}, { excludedFields: ['__typename'] }); +graphqlFields(info); diff --git a/types/graphql-fields/index.d.ts b/types/graphql-fields/index.d.ts new file mode 100644 index 0000000000..19e7f21dc4 --- /dev/null +++ b/types/graphql-fields/index.d.ts @@ -0,0 +1,18 @@ +// Type definitions for graphql-fields 1.3 +// Project: https://github.com/robrichard/graphql-fields#readme +// Definitions by: feinoujc +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +import { GraphQLResolveInfo } from 'graphql'; + +declare function graphqlFields(info: GraphQLResolveInfo, obj?: object, opts?: graphqlFields.Options): any; + +declare namespace graphqlFields { + interface Options { + processArguments?: boolean; + excludedFields?: string[]; + } +} + +export = graphqlFields; diff --git a/types/graphql-fields/tsconfig.json b/types/graphql-fields/tsconfig.json new file mode 100644 index 0000000000..826e200b41 --- /dev/null +++ b/types/graphql-fields/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "esnext.asynciterable" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "graphql-fields-tests.ts" + ] +} diff --git a/types/graphql-fields/tslint.json b/types/graphql-fields/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/graphql-fields/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 4af88ab850423bf48f34057d0009d0dc786e0d23 Mon Sep 17 00:00:00 2001 From: Ben Frengley Date: Thu, 22 Nov 2018 16:24:15 +1300 Subject: [PATCH 050/608] [@types/mapbox-gl] Fix source type in source events + indentation fix --- types/mapbox-gl/index.d.ts | 2 +- types/mapbox-gl/mapbox-gl-tests.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/types/mapbox-gl/index.d.ts b/types/mapbox-gl/index.d.ts index 91fb68cd96..f3389876b9 100644 --- a/types/mapbox-gl/index.d.ts +++ b/types/mapbox-gl/index.d.ts @@ -1071,7 +1071,7 @@ declare namespace mapboxgl { export interface MapSourceDataEvent extends MapboxEvent { dataType: 'source'; isSourceLoaded: boolean; - source: Style; + source: Source; sourceId: string; sourceDataType: 'metadata' | 'content'; tile: any; diff --git a/types/mapbox-gl/mapbox-gl-tests.ts b/types/mapbox-gl/mapbox-gl-tests.ts index 422b255900..d119c76bd5 100644 --- a/types/mapbox-gl/mapbox-gl-tests.ts +++ b/types/mapbox-gl/mapbox-gl-tests.ts @@ -465,10 +465,10 @@ expectType(mapboxgl.Point.convert(pointlike)); expectType((url: string) => ({ url })); expectType((url: string, resourceType: mapboxgl.ResourceType) => ({ - url, - credentials: 'same-origin', - headers: { 'Accept-Encoding': 'compress' }, - method: 'POST', + url, + credentials: 'same-origin', + headers: { 'Accept-Encoding': 'compress' }, + method: 'POST', collectResourceTiming: true, })); From 75dc5a9ca427435bf3d0b79a4fd6910f6a1b7b80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dennis=20M=C3=BCnch?= Date: Thu, 22 Nov 2018 09:33:58 +0100 Subject: [PATCH 051/608] add parameter [decapitalize=false] to camelize https://github.com/epeli/underscore.string#camelizestring-decapitalizefalse--string --- types/underscore.string/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/underscore.string/index.d.ts b/types/underscore.string/index.d.ts index 2d067679d5..eb0774b49a 100644 --- a/types/underscore.string/index.d.ts +++ b/types/underscore.string/index.d.ts @@ -207,7 +207,7 @@ declare module 'underscore' { * ('-moz-transform') => 'MozTransform' * @param str */ - camelize(str: string): string; + camelize(str: string, decapitalize?: boolean): string; /** * Converts a camelized or dasherized string into an underscored one. From b4a016ba645a65f8e16dcefdfcb260d1ce2e238d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dennis=20M=C3=BCnch?= Date: Thu, 22 Nov 2018 09:44:42 +0100 Subject: [PATCH 052/608] [@types/underscore.string] reflect change within test _.camelize('-moz-transform'); _.camelize('-moz-transform', true); --- types/underscore.string/underscore.string-tests.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/underscore.string/underscore.string-tests.ts b/types/underscore.string/underscore.string-tests.ts index 545f6362d6..5b827cd880 100644 --- a/types/underscore.string/underscore.string-tests.ts +++ b/types/underscore.string/underscore.string-tests.ts @@ -52,6 +52,7 @@ _.succ('A'); _.titleize('my name is epeli'); _.camelize('-moz-transform'); +_.camelize('-moz-transform', true); _.classify('some_class_name'); From 6922a35f4b9905b7a75a94859ffab134565a6378 Mon Sep 17 00:00:00 2001 From: Jussi Kinnula Date: Thu, 22 Nov 2018 10:25:50 +0200 Subject: [PATCH 053/608] Change gl-react subpackages callback props & gl-react Node "uniforms" prop optional & add tests for subpackages --- types/gl-react-dom/GLViewDOM.d.ts | 8 +++--- types/gl-react-dom/gl-react-dom-tests.tsx | 27 +++++++++++++++++++ types/gl-react-dom/tsconfig.json | 3 ++- types/gl-react-expo/GLViewNative.d.ts | 2 +- types/gl-react-expo/gl-react-expo-tests.tsx | 27 +++++++++++++++++++ types/gl-react-expo/tsconfig.json | 3 ++- types/gl-react-headless/GLViewHeadless.d.ts | 8 +++--- .../gl-react-headless-tests.tsx | 27 +++++++++++++++++++ types/gl-react-headless/tsconfig.json | 3 ++- types/gl-react-native/GLViewNative.d.ts | 4 +-- .../gl-react-native/gl-react-native-tests.tsx | 27 +++++++++++++++++++ types/gl-react-native/tsconfig.json | 3 ++- types/gl-react/index.d.ts | 2 +- 13 files changed, 128 insertions(+), 16 deletions(-) create mode 100644 types/gl-react-dom/gl-react-dom-tests.tsx create mode 100644 types/gl-react-expo/gl-react-expo-tests.tsx create mode 100644 types/gl-react-headless/gl-react-headless-tests.tsx create mode 100644 types/gl-react-native/gl-react-native-tests.tsx diff --git a/types/gl-react-dom/GLViewDOM.d.ts b/types/gl-react-dom/GLViewDOM.d.ts index 8450a16a00..5ceef51ec8 100644 --- a/types/gl-react-dom/GLViewDOM.d.ts +++ b/types/gl-react-dom/GLViewDOM.d.ts @@ -4,10 +4,10 @@ export type SupportedImage = 'image/png' | 'image/jpeg' | 'image/bmp' | 'image/w export type ValidQuality = 0.0 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | 1.0; export interface GLViewDOMProps { - onContextCreate: (gl: WebGLRenderingContext) => void; - onContextFailure: (e: Error) => void; - onContextLost: () => void; - onContextRestored: (gl: WebGLRenderingContext) => void; + onContextCreate?: (gl: WebGLRenderingContext) => void; + onContextFailure?: (e: Error) => void; + onContextLost?: () => void; + onContextRestored?: (gl: WebGLRenderingContext) => void; webglContextAttributes?: WebGLContextAttributes; pixelRatio?: number; width: number; diff --git a/types/gl-react-dom/gl-react-dom-tests.tsx b/types/gl-react-dom/gl-react-dom-tests.tsx new file mode 100644 index 0000000000..6d3852a156 --- /dev/null +++ b/types/gl-react-dom/gl-react-dom-tests.tsx @@ -0,0 +1,27 @@ +import * as React from 'react'; +import * as ReactDOM from 'react-dom'; +import { Surface } from 'gl-react-dom'; +import { Shaders, GLSL, Node } from 'gl-react'; + +const shaders = Shaders.create({ + Test: { + frag: GLSL` + precision highp float; + varying vec2 uv; + void main() { + gl_FragColor = vec4(uv.x, uv.y, 0.5, 1.0); + }` + } +}); + +const App = () => ( +
+ + + +
+); + +const element = document.createElement('div'); +document.body.appendChild(element); +ReactDOM.render(, element); diff --git a/types/gl-react-dom/tsconfig.json b/types/gl-react-dom/tsconfig.json index 9c4d38ca44..49a1ee91ff 100644 --- a/types/gl-react-dom/tsconfig.json +++ b/types/gl-react-dom/tsconfig.json @@ -1,6 +1,7 @@ { "files": [ - "index.d.ts" + "index.d.ts", + "gl-react-dom-tests.tsx" ], "compilerOptions": { "module": "commonjs", diff --git a/types/gl-react-expo/GLViewNative.d.ts b/types/gl-react-expo/GLViewNative.d.ts index 4f0270dd68..5320ccaaa2 100644 --- a/types/gl-react-expo/GLViewNative.d.ts +++ b/types/gl-react-expo/GLViewNative.d.ts @@ -3,7 +3,7 @@ import * as React from 'react'; // import { GLView as EXGLView } from 'expo'; export interface GLViewNativeProps { - onContextCreate: (gl: WebGLRenderingContext) => void; + onContextCreate?: (gl: WebGLRenderingContext) => void; style?: any; children?: any; } diff --git a/types/gl-react-expo/gl-react-expo-tests.tsx b/types/gl-react-expo/gl-react-expo-tests.tsx new file mode 100644 index 0000000000..2eb1fee9a9 --- /dev/null +++ b/types/gl-react-expo/gl-react-expo-tests.tsx @@ -0,0 +1,27 @@ +import * as React from 'react'; +import * as ReactDOM from 'react-dom'; +import { Surface } from 'gl-react-expo'; +import { Shaders, GLSL, Node } from 'gl-react'; + +const shaders = Shaders.create({ + Test: { + frag: GLSL` + precision highp float; + varying vec2 uv; + void main() { + gl_FragColor = vec4(uv.x, uv.y, 0.5, 1.0); + }` + } +}); + +const App = () => ( +
+ + + +
+); + +const element = document.createElement('div'); +document.body.appendChild(element); +ReactDOM.render(, element); diff --git a/types/gl-react-expo/tsconfig.json b/types/gl-react-expo/tsconfig.json index 9c4d38ca44..95487128f4 100644 --- a/types/gl-react-expo/tsconfig.json +++ b/types/gl-react-expo/tsconfig.json @@ -1,6 +1,7 @@ { "files": [ - "index.d.ts" + "index.d.ts", + "gl-react-expo-tests.tsx" ], "compilerOptions": { "module": "commonjs", diff --git a/types/gl-react-headless/GLViewHeadless.d.ts b/types/gl-react-headless/GLViewHeadless.d.ts index a94c1f9769..9b90b25958 100644 --- a/types/gl-react-headless/GLViewHeadless.d.ts +++ b/types/gl-react-headless/GLViewHeadless.d.ts @@ -1,10 +1,10 @@ import * as React from 'react'; export interface GLViewHeadlessProps { - onContextCreate: (gl: WebGLRenderingContext) => void; - onContextFailure: (e: Error) => void; - onContextLost: () => void; - onContextRestored: (gl: WebGLRenderingContext) => void; + onContextCreate?: (gl: WebGLRenderingContext) => void; + onContextFailure?: (e: Error) => void; + onContextLost?: () => void; + onContextRestored?: (gl: WebGLRenderingContext) => void; webglContextAttributes?: WebGLContextAttributes; pixelRatio?: number; width: number; diff --git a/types/gl-react-headless/gl-react-headless-tests.tsx b/types/gl-react-headless/gl-react-headless-tests.tsx new file mode 100644 index 0000000000..58f0cbc13b --- /dev/null +++ b/types/gl-react-headless/gl-react-headless-tests.tsx @@ -0,0 +1,27 @@ +import * as React from 'react'; +import * as ReactDOM from 'react-dom'; +import { Surface } from 'gl-react-headless'; +import { Shaders, GLSL, Node } from 'gl-react'; + +const shaders = Shaders.create({ + Test: { + frag: GLSL` + precision highp float; + varying vec2 uv; + void main() { + gl_FragColor = vec4(uv.x, uv.y, 0.5, 1.0); + }` + } +}); + +const App = () => ( +
+ + + +
+); + +const element = document.createElement('div'); +document.body.appendChild(element); +ReactDOM.render(, element); diff --git a/types/gl-react-headless/tsconfig.json b/types/gl-react-headless/tsconfig.json index 9c4d38ca44..8a7f2a4b22 100644 --- a/types/gl-react-headless/tsconfig.json +++ b/types/gl-react-headless/tsconfig.json @@ -1,6 +1,7 @@ { "files": [ - "index.d.ts" + "index.d.ts", + "gl-react-headless-tests.tsx" ], "compilerOptions": { "module": "commonjs", diff --git a/types/gl-react-native/GLViewNative.d.ts b/types/gl-react-native/GLViewNative.d.ts index 0a780d3aa7..b4a4c75bc1 100644 --- a/types/gl-react-native/GLViewNative.d.ts +++ b/types/gl-react-native/GLViewNative.d.ts @@ -1,8 +1,8 @@ import * as React from 'react'; export interface GLViewNativeProps { - onContextCreate: (gl: WebGLRenderingContext) => void; - onContextFailure: (e: Error) => void; + onContextCreate?: (gl: WebGLRenderingContext) => void; + onContextFailure?: (e: Error) => void; style?: any; children?: any; } diff --git a/types/gl-react-native/gl-react-native-tests.tsx b/types/gl-react-native/gl-react-native-tests.tsx new file mode 100644 index 0000000000..f74c9dc926 --- /dev/null +++ b/types/gl-react-native/gl-react-native-tests.tsx @@ -0,0 +1,27 @@ +import * as React from 'react'; +import * as ReactDOM from 'react-dom'; +import { Surface } from 'gl-react-native'; +import { Shaders, GLSL, Node } from 'gl-react'; + +const shaders = Shaders.create({ + Test: { + frag: GLSL` + precision highp float; + varying vec2 uv; + void main() { + gl_FragColor = vec4(uv.x, uv.y, 0.5, 1.0); + }` + } +}); + +const App = () => ( +
+ + + +
+); + +const element = document.createElement('div'); +document.body.appendChild(element); +ReactDOM.render(, element); diff --git a/types/gl-react-native/tsconfig.json b/types/gl-react-native/tsconfig.json index 9c4d38ca44..0ffab2bab3 100644 --- a/types/gl-react-native/tsconfig.json +++ b/types/gl-react-native/tsconfig.json @@ -1,6 +1,7 @@ { "files": [ - "index.d.ts" + "index.d.ts", + "gl-react-native-tests.tsx" ], "compilerOptions": { "module": "commonjs", diff --git a/types/gl-react/index.d.ts b/types/gl-react/index.d.ts index e1332fd964..84b82ddd2d 100644 --- a/types/gl-react/index.d.ts +++ b/types/gl-react/index.d.ts @@ -124,7 +124,7 @@ export interface Framebuffer { export interface NodeProps { shader: ShaderIdentifier | ShaderDefinition; uniformsOptions?: any; - uniforms: { [key: string]: any }; + uniforms?: { [key: string]: any }; ignoreUnusedUniforms?: string[] | boolean; sync?: boolean; width?: number; From 860b409ed936cf7e1dce27a6f9e000cae751e82f Mon Sep 17 00:00:00 2001 From: Adam <23192421+shenphen@users.noreply.github.com> Date: Thu, 22 Nov 2018 15:51:55 +0100 Subject: [PATCH 054/608] Update index.d.ts with replace function overload Change due to the documentation of cropperjs (https://www.npmjs.com/package/cropperjs#replaceurl-hassamesize). --- types/cropperjs/index.d.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/types/cropperjs/index.d.ts b/types/cropperjs/index.d.ts index 30556e11fc..6e48bdae49 100644 --- a/types/cropperjs/index.d.ts +++ b/types/cropperjs/index.d.ts @@ -428,6 +428,13 @@ declare class cropperjs { * @param url A new image url */ replace(url: string): void; + + /** + * Replace the image's src and rebuild the cropper. If the new image has the same size with the old one, then it will not rebuilt the cropper and only update the urls of all related images. This can be used for applying filters. + * @param url A new image url + * @param hasSameSize (Default: false) + */ + replace(url: string, hasSameSize: boolean): void; /** * Enable (unfreeze) the cropper. From 5d4421790f435864c13dde0750333c6818de7db4 Mon Sep 17 00:00:00 2001 From: Alex Deas Date: Thu, 22 Nov 2018 16:30:31 +0000 Subject: [PATCH 055/608] Allow type parameters for cond --- types/ramda/index.d.ts | 2 +- types/ramda/ramda-tests.ts | 19 ++++++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/types/ramda/index.d.ts b/types/ramda/index.d.ts index a3bc51c8ca..77dcdb05a0 100644 --- a/types/ramda/index.d.ts +++ b/types/ramda/index.d.ts @@ -776,7 +776,7 @@ declare namespace R { * point fn returns the result of applying its arguments to the corresponding transformer. If none of the predicates * matches, fn returns undefined. */ - cond(fns: ReadonlyArray<[Pred, (...a: any[]) => any]>): (...a: any[]) => any; + cond(fns: ReadonlyArray<[SafePred, (a: A) => B]>): (a: A) => B; /** * Wraps a constructor function inside a curried function that can be called with the same arguments and returns the same type. diff --git a/types/ramda/ramda-tests.ts b/types/ramda/ramda-tests.ts index 2f68808d17..61f09c1f40 100644 --- a/types/ramda/ramda-tests.ts +++ b/types/ramda/ramda-tests.ts @@ -1306,14 +1306,19 @@ type Pair = KeyValuePair; }; () => { - const fn = R.cond([ - [R.equals(0), R.always("water freezes at 0°C")], - [R.equals(100), R.always("water boils at 100°C")], - [R.T, (temp: number) => `nothing special happens at ${temp}°C`] + const f = R.cond([ + [x => x === 0, () => "a"], + [() => true, () => "b"], ]); - const a: string = fn(0); // => 'water freezes at 0°C' - const b: string = fn(50); // => 'nothing special happens at 50°C' - const c: string = fn(100); // => 'water boils at 100°C' + f(0); // $ExpectType string + f(""); // $ExpectError + + const g = R.cond([ + [x => x === 0, () => "a"], + [() => true, () => "b"], + ]); + g(0); + g(""); }; () => { From bd6515d5871238514dab001bcf0c062f0f25d721 Mon Sep 17 00:00:00 2001 From: TeamworkGuy2 Date: Thu, 22 Nov 2018 16:34:26 +0000 Subject: [PATCH 056/608] [cached-path-relative] Add cached-path-relative@1.0.2 definition --- .../cached-path-relative-tests.ts | 7 ++++++ types/cached-path-relative/index.d.ts | 8 +++++++ types/cached-path-relative/tsconfig.json | 23 +++++++++++++++++++ types/cached-path-relative/tslint.json | 1 + 4 files changed, 39 insertions(+) create mode 100644 types/cached-path-relative/cached-path-relative-tests.ts create mode 100644 types/cached-path-relative/index.d.ts create mode 100644 types/cached-path-relative/tsconfig.json create mode 100644 types/cached-path-relative/tslint.json diff --git a/types/cached-path-relative/cached-path-relative-tests.ts b/types/cached-path-relative/cached-path-relative-tests.ts new file mode 100644 index 0000000000..22e6af97df --- /dev/null +++ b/types/cached-path-relative/cached-path-relative-tests.ts @@ -0,0 +1,7 @@ +import cachedPathRelative = require("cached-path-relative"); + +function browserifyTest() { + const file = "file.txt"; + const m1: string = cachedPathRelative("./", file).replace(/\\/g, '/'); + return m1; +} diff --git a/types/cached-path-relative/index.d.ts b/types/cached-path-relative/index.d.ts new file mode 100644 index 0000000000..56076870bc --- /dev/null +++ b/types/cached-path-relative/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for cached-path-relative 1.0 +// Project: https://github.com/ashaffer/cached-path-relative +// Definitions by: TeamworkGuy2 +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function cachedPathRelative(from: string, to: string): string; + +export = cachedPathRelative; diff --git a/types/cached-path-relative/tsconfig.json b/types/cached-path-relative/tsconfig.json new file mode 100644 index 0000000000..e69970c325 --- /dev/null +++ b/types/cached-path-relative/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "cached-path-relative-tests.ts" + ] +} \ No newline at end of file diff --git a/types/cached-path-relative/tslint.json b/types/cached-path-relative/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/cached-path-relative/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From a133ea37430313b85c65bbc775ba909c58e40a30 Mon Sep 17 00:00:00 2001 From: Markus Lasermann Date: Thu, 22 Nov 2018 17:56:50 +0100 Subject: [PATCH 057/608] add types for https://github.com/zesik/react-splitter-layout --- types/react-splitter-layout/index.d.ts | 100 ++++++++++++++++++ .../react-splitter-layout-tests.tsx | 17 +++ types/react-splitter-layout/tsconfig.json | 25 +++++ types/react-splitter-layout/tslint.json | 1 + 4 files changed, 143 insertions(+) create mode 100644 types/react-splitter-layout/index.d.ts create mode 100644 types/react-splitter-layout/react-splitter-layout-tests.tsx create mode 100644 types/react-splitter-layout/tsconfig.json create mode 100644 types/react-splitter-layout/tslint.json diff --git a/types/react-splitter-layout/index.d.ts b/types/react-splitter-layout/index.d.ts new file mode 100644 index 0000000000..ec25b5fe1a --- /dev/null +++ b/types/react-splitter-layout/index.d.ts @@ -0,0 +1,100 @@ +// Type definitions for react-splitter-layout v3.0.1 +// Project: https://github.com/zesik/react-splitter-layout#readme +// Definitions by: Markus Lasermann +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.1.6 + +import * as React from "react"; + +export default SplitterLayout; + +declare class SplitterLayout extends React.PureComponent { +} + +type TPrimaryIndex = 0|1; + +export interface SplitterLayoutProps { + /** + * Custom CSS class name applied to the layout div. + * You can use this to customize layout style. + * Refers to the original stylesheet to see what you can customize. + */ + customClassName?: string; + + /** + * Determine whether the layout should be a horizontal split or a vertical split. + * + * @default false + */ + vertical?: boolean; + + /** + * Determine whether the width of each pane should be calculated in percentage or by pixels. + * The default value is false, which means width is calculated in pixels. + * + * @default false + */ + percentage?: boolean; + + /** + * Index of the primary pane. + * Since SplitterLayout supports at most 2 children, only 0 or 1 is allowed. + * + * A primary pane is used to show users primary content, while a secondary pane is the other pane. + * When window size changes and percentage is set to false, primary pane's size is flexible + * and secondary pane's size is kept unchanged. However, when the window size is not enough + * for showing both minimal primary pane and minimal secondary pane, + * the primary pane's size is served first. + * + * @default 0 + */ + primaryIndex?: TPrimaryIndex; + + /** + * Minimal size of primary pane. + * When percentage is set to false, this value is pixel size (25 means 25px). + * When percentage is set to true, this value is percentage (25 means 25%). + * + * @default 0 + */ + primaryMinSize?: number; + + /** + * Minimal size of secondary pane. + */ + secondaryMinSize?: number; + + /** + * Initial size of secondary pane when page loads. + * If this prop is not defined, SplitterLayout tries to split the layout with equal sizes. + * (Note: equal size may not apply when there are nested layouts.) + * + * @default undefined + */ + secondaryInitialSize?: number; + + /** + * Called when dragging is started. + * + * No parameter will be passed to event handlers. + */ + onDragStart?: () => void; + + /** + * Called when dragging finishes. + * + * No parameter will be passed to event handlers. + */ + onDragEnd?: () => void; + + /** + * Called when the size of secondary pane is changed. + * + * Event handlers will be passed with a single parameter of number type representing + * new size of secondary pane. + * When percentage is set to false, the value is in pixel size. + * When percentage is set to true, the value is in percentage. + */ + onSecondaryPaneSizeChange?: (value: number) => void; +} + diff --git a/types/react-splitter-layout/react-splitter-layout-tests.tsx b/types/react-splitter-layout/react-splitter-layout-tests.tsx new file mode 100644 index 0000000000..1f97db7077 --- /dev/null +++ b/types/react-splitter-layout/react-splitter-layout-tests.tsx @@ -0,0 +1,17 @@ +import * as React from "react"; +import SplitterLayout, {SplitterLayoutProps} from "react-splitter-layout"; + +export class SplitterLayoutTest extends React.PureComponent<{}> { + render(): JSX.Element { + const props: SplitterLayoutProps = { + percentage: true, + secondaryInitialSize: 30, + }; + return ( + +
1st
+
2nd
+
+ ); + } +} diff --git a/types/react-splitter-layout/tsconfig.json b/types/react-splitter-layout/tsconfig.json new file mode 100644 index 0000000000..e268261ea1 --- /dev/null +++ b/types/react-splitter-layout/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "jsx": "react", + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "react-splitter-layout-tests.tsx" + ] +} diff --git a/types/react-splitter-layout/tslint.json b/types/react-splitter-layout/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/react-splitter-layout/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 756349c67c53c76888b575abe1c7e545378b72fe Mon Sep 17 00:00:00 2001 From: Boris Sergeyev Date: Thu, 22 Nov 2018 21:43:51 +0100 Subject: [PATCH 058/608] [react-redux] fixed mistreating of action thunk creator parameters --- types/react-redux/index.d.ts | 11 +++++++--- types/react-redux/react-redux-tests.tsx | 27 ++++++++++++++++--------- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/types/react-redux/index.d.ts b/types/react-redux/index.d.ts index 2f919581f4..1cccae6d01 100644 --- a/types/react-redux/index.d.ts +++ b/types/react-redux/index.d.ts @@ -13,7 +13,7 @@ // Anatoli Papirovski // Boris Sergeyev // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 +// TypeScript Version: 3.0 // Known Issue: // There is a known issue in TypeScript, which doesn't allow decorators to change the signature of the classes @@ -112,9 +112,14 @@ export type InferableComponentEnhancerWithProps = export type InferableComponentEnhancer = InferableComponentEnhancerWithProps; +export type WrappedThunkActionCreator any> = + TActionCreator extends (...args: infer TParams) => (...args: any[]) => infer TReturn + ? (...args: TParams) => TReturn + : TActionCreator; + export type HandleThunkActionCreator = - TActionCreator extends (...args: any[]) => (...args: any[]) => any - ? ReturnType + TActionCreator extends (...args: any[]) => any + ? WrappedThunkActionCreator : TActionCreator; // redux-thunk middleware returns thunk's return value from dispatch call diff --git a/types/react-redux/react-redux-tests.tsx b/types/react-redux/react-redux-tests.tsx index aff8515e87..f47683047e 100644 --- a/types/react-redux/react-redux-tests.tsx +++ b/types/react-redux/react-redux-tests.tsx @@ -102,20 +102,27 @@ function MapDispatch() { } function MapDispatchWithThunkActionCreators() { - class TestComponent extends React.Component<{ - foo: string, - onClick(): void, - thunkAction(): Promise - }> {} - - const mapDispatchToProps = () => ({ - onClick: () => {}, - thunkAction: () => async () => {} + const simpleAction = (payload: boolean) => ({ + type: 'SIMPLE_ACTION', + payload, }); + const thunkAction = (param1: number, param2: string) => ( + async (dispatch: Dispatch, { foo }: OwnProps) => { + return foo; + } + ); + interface OwnProps { + foo: string; + } + interface TestComponentProps extends OwnProps { + simpleAction: typeof simpleAction; + thunkAction(param1: number, param2: string): Promise; + } + class TestComponent extends React.Component {} const Test = connect( null, - mapDispatchToProps, + ({ simpleAction, thunkAction }), )(TestComponent); const verify = ; From 35d989dce077cdd42be9943a53895eeebf569fb8 Mon Sep 17 00:00:00 2001 From: Boris Sergeyev Date: Thu, 22 Nov 2018 22:16:23 +0100 Subject: [PATCH 059/608] [react-redux] bumped TS versions of packages dependent on react-redux --- types/mirrorx/index.d.ts | 2 +- types/next-redux-saga/index.d.ts | 2 +- types/next-redux-wrapper/index.d.ts | 2 +- types/react-intl-redux/index.d.ts | 2 +- types/react-lifecycle-component/index.d.ts | 2 +- types/react-redux-toastr/index.d.ts | 2 +- types/react-router-redux/index.d.ts | 2 +- types/redux-auth-wrapper/index.d.ts | 2 +- types/redux-devtools/index.d.ts | 2 +- types/redux-form/index.d.ts | 2 +- types/redux-form/v6/index.d.ts | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/types/mirrorx/index.d.ts b/types/mirrorx/index.d.ts index 443712c325..e2fa0ee465 100644 --- a/types/mirrorx/index.d.ts +++ b/types/mirrorx/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/mirrorjs/mirror // Definitions by: Aaronphy // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 +// TypeScript Version: 3.0 import * as H from 'history'; diff --git a/types/next-redux-saga/index.d.ts b/types/next-redux-saga/index.d.ts index b7575fba16..0366868d97 100644 --- a/types/next-redux-saga/index.d.ts +++ b/types/next-redux-saga/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/bmealhouse/next-redux-saga // Definitions by: Leo Cavalcante // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 +// TypeScript Version: 3.0 import { ComponentType } from "react"; diff --git a/types/next-redux-wrapper/index.d.ts b/types/next-redux-wrapper/index.d.ts index 16af858743..cbf56579d5 100644 --- a/types/next-redux-wrapper/index.d.ts +++ b/types/next-redux-wrapper/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Steve // Jungwoo-An // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 +// TypeScript Version: 3.0 /// diff --git a/types/react-intl-redux/index.d.ts b/types/react-intl-redux/index.d.ts index 9d9e805df9..4410e7c019 100644 --- a/types/react-intl-redux/index.d.ts +++ b/types/react-intl-redux/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/ratson/react-intl-redux // Definitions by: Karol Janyst // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 +// TypeScript Version: 3.0 import { Action, AnyAction } from "redux" import { Provider as ReduxProvider } from "react-redux" diff --git a/types/react-lifecycle-component/index.d.ts b/types/react-lifecycle-component/index.d.ts index 315d04f7fb..bb6dc65dd8 100644 --- a/types/react-lifecycle-component/index.d.ts +++ b/types/react-lifecycle-component/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/JamieDixon/react-lifecycle-component // Definitions by: Alexander Fisher // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 +// TypeScript Version: 3.0 import { ComponentLifecycle, Component, ComponentClass } from 'react'; import { Connect } from 'react-redux'; diff --git a/types/react-redux-toastr/index.d.ts b/types/react-redux-toastr/index.d.ts index fc11da9c43..9a7a115725 100644 --- a/types/react-redux-toastr/index.d.ts +++ b/types/react-redux-toastr/index.d.ts @@ -4,7 +4,7 @@ // Artyom Stukans // Mika Kuitunen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 +// TypeScript Version: 3.0 import { Component } from 'react'; import { Action, Reducer } from 'redux'; diff --git a/types/react-router-redux/index.d.ts b/types/react-router-redux/index.d.ts index 9dfbd58c11..7abdc88505 100644 --- a/types/react-router-redux/index.d.ts +++ b/types/react-router-redux/index.d.ts @@ -4,7 +4,7 @@ // Shoya Tanaka // Mykolas // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 +// TypeScript Version: 3.0 import { Store, diff --git a/types/redux-auth-wrapper/index.d.ts b/types/redux-auth-wrapper/index.d.ts index 728be4a54b..3ec88b50dc 100644 --- a/types/redux-auth-wrapper/index.d.ts +++ b/types/redux-auth-wrapper/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/mjrussell/redux-auth-wrapper // Definitions by: Karol Janyst // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 +// TypeScript Version: 3.0 import { ComponentClass, StatelessComponent, ComponentType, ReactType } from "react"; diff --git a/types/redux-devtools/index.d.ts b/types/redux-devtools/index.d.ts index 234fb9a4bb..ddead025ff 100644 --- a/types/redux-devtools/index.d.ts +++ b/types/redux-devtools/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/gaearon/redux-devtools // Definitions by: Petryshyn Sergii // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 +// TypeScript Version: 3.0 import * as React from 'react'; import { GenericStoreEnhancer } from 'redux'; diff --git a/types/redux-form/index.d.ts b/types/redux-form/index.d.ts index e80c196c0a..5851728369 100644 --- a/types/redux-form/index.d.ts +++ b/types/redux-form/index.d.ts @@ -12,7 +12,7 @@ // Maddi Joyce // Kamil Wojcik // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.9 +// TypeScript Version: 3.0 import { ComponentClass, StatelessComponent, diff --git a/types/redux-form/v6/index.d.ts b/types/redux-form/v6/index.d.ts index a8209a7643..5127457884 100644 --- a/types/redux-form/v6/index.d.ts +++ b/types/redux-form/v6/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/erikras/redux-form // Definitions by: Carson Full , Daniel Lytkin , Karol Janyst , Luka Zakrajsek // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 +// TypeScript Version: 3.0 import { ComponentClass, From 2d5a8af9f819fad592387f8b4ce3731643125b05 Mon Sep 17 00:00:00 2001 From: Boris Sergeyev Date: Thu, 22 Nov 2018 22:18:01 +0100 Subject: [PATCH 060/608] [react-redux] used whitespace consistently (no tabs) --- types/react-redux/index.d.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/types/react-redux/index.d.ts b/types/react-redux/index.d.ts index 1cccae6d01..bf65d89fd5 100644 --- a/types/react-redux/index.d.ts +++ b/types/react-redux/index.d.ts @@ -65,11 +65,11 @@ export type AdvancedComponentDecorator = * DecorationTargetProps[P] definition, its definition will be that of InjectedProps[P] */ export type Matching = { - [P in keyof DecorationTargetProps]: P extends keyof InjectedProps - ? InjectedProps[P] extends DecorationTargetProps[P] - ? DecorationTargetProps[P] - : InjectedProps[P] - : DecorationTargetProps[P]; + [P in keyof DecorationTargetProps]: P extends keyof InjectedProps + ? InjectedProps[P] extends DecorationTargetProps[P] + ? DecorationTargetProps[P] + : InjectedProps[P] + : DecorationTargetProps[P]; }; /** @@ -95,16 +95,16 @@ export type GetProps = C extends ComponentType ? P : never; // Applies LibraryManagedAttributes (proper handling of defaultProps // and propTypes), as well as defines WrappedComponent. export type ConnectedComponentClass = ComponentClass> & { - WrappedComponent: C; + WrappedComponent: C; }; // Injects props and removes them from the prop requirements. // Will not pass through the injected props if they are passed in during // render. Also adds new prop requirements from TNeedsProps. export type InferableComponentEnhancerWithProps = - >>>( - component: C - ) => ConnectedComponentClass, keyof Shared>> & TNeedsProps>; + >>>( + component: C + ) => ConnectedComponentClass, keyof Shared>> & TNeedsProps>; // Injects props and removes them from the prop requirements. // Will not pass through the injected props if they are passed in during From 3667c06d4542fdc415e5b43accf66c5a44cde4d6 Mon Sep 17 00:00:00 2001 From: Markus Lasermann Date: Fri, 23 Nov 2018 10:05:15 +0100 Subject: [PATCH 061/608] travis build could not parse version --- types/react-splitter-layout/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-splitter-layout/index.d.ts b/types/react-splitter-layout/index.d.ts index ec25b5fe1a..4ee438e983 100644 --- a/types/react-splitter-layout/index.d.ts +++ b/types/react-splitter-layout/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/zesik/react-splitter-layout#readme // Definitions by: Markus Lasermann // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3.1.6 +// TypeScript Version: 2.8 import * as React from "react"; From 63e3bac336f8fcccf25224f77202a6a88f5e041c Mon Sep 17 00:00:00 2001 From: Markus Lasermann Date: Fri, 23 Nov 2018 10:33:36 +0100 Subject: [PATCH 062/608] tslint --- types/react-splitter-layout/index.d.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/types/react-splitter-layout/index.d.ts b/types/react-splitter-layout/index.d.ts index 4ee438e983..29273e87ef 100644 --- a/types/react-splitter-layout/index.d.ts +++ b/types/react-splitter-layout/index.d.ts @@ -1,17 +1,15 @@ -// Type definitions for react-splitter-layout v3.0.1 -// Project: https://github.com/zesik/react-splitter-layout#readme -// Definitions by: Markus Lasermann +// Type definitions for react-splitter-layout 3.0 +// Project: https://github.com/zesik/react-splitter-layout +// Definitions by: Markus Lasermann // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 import * as React from "react"; -export default SplitterLayout; - -declare class SplitterLayout extends React.PureComponent { +export default class SplitterLayout extends React.PureComponent { } -type TPrimaryIndex = 0|1; +export type TPrimaryIndex = 0|1; export interface SplitterLayoutProps { /** @@ -97,4 +95,3 @@ export interface SplitterLayoutProps { */ onSecondaryPaneSizeChange?: (value: number) => void; } - From e547598a4f1c96bf1bff1774d0fc173b977ecb8d Mon Sep 17 00:00:00 2001 From: Markus Lasermann Date: Fri, 23 Nov 2018 11:34:42 +0100 Subject: [PATCH 063/608] fix tests --- types/react-splitter-layout/react-splitter-layout-tests.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/react-splitter-layout/react-splitter-layout-tests.tsx b/types/react-splitter-layout/react-splitter-layout-tests.tsx index 1f97db7077..fa9860a2b7 100644 --- a/types/react-splitter-layout/react-splitter-layout-tests.tsx +++ b/types/react-splitter-layout/react-splitter-layout-tests.tsx @@ -1,11 +1,11 @@ import * as React from "react"; -import SplitterLayout, {SplitterLayoutProps} from "react-splitter-layout"; +import SplitterLayout, { SplitterLayoutProps } from "react-splitter-layout"; -export class SplitterLayoutTest extends React.PureComponent<{}> { +export class SplitterLayoutTest extends React.PureComponent { render(): JSX.Element { const props: SplitterLayoutProps = { percentage: true, - secondaryInitialSize: 30, + secondaryInitialSize: 40, }; return ( From f03ea514f73de0a92337a3ccfabf18559ff6a432 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Wed, 21 Nov 2018 16:49:40 +0100 Subject: [PATCH 064/608] Update types for ltx --- types/ltx/index.d.ts | 26 +++--- types/ltx/lib/Element.d.ts | 97 ++++++++++---------- types/ltx/lib/Parser.d.ts | 14 ++- types/ltx/lib/clone.d.ts | 4 +- types/ltx/lib/createElement.d.ts | 8 +- types/ltx/lib/equal.d.ts | 10 ++- types/ltx/lib/escape.d.ts | 8 +- types/ltx/lib/is.d.ts | 8 +- types/ltx/lib/parse.d.ts | 5 +- types/ltx/lib/stringify.d.ts | 4 +- types/ltx/lib/tag.d.ts | 4 +- types/ltx/lib/tagString.d.ts | 2 +- types/ltx/ltx-tests.ts | 148 ++++++++++++++++++++++++++++--- types/ltx/tslint.json | 8 +- 14 files changed, 250 insertions(+), 96 deletions(-) diff --git a/types/ltx/index.d.ts b/types/ltx/index.d.ts index 33311a3175..1c313c5541 100644 --- a/types/ltx/index.d.ts +++ b/types/ltx/index.d.ts @@ -1,17 +1,17 @@ -// Type definitions for ltx 2.6 +// Type definitions for ltx 2.8 // Project: github.com/node-xmpp/ltx/ // Definitions by: PJakcson +// BendingBender // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 -export {Element } from './lib/Element'; -export {nameEqual, attrsEqual, childrenEqual, equal} from './lib/equal'; -export {isNode, isElement, isText} from './lib/is'; -export {clone} from './lib/clone'; -export {createElement} from './lib/createElement'; -export {escapeXML, unescapeXML, escapeXMLText, unescapeXMLText} from './lib/escape'; -export {Parser} from './lib/Parser'; -export {parse} from './lib/parse'; -export {tag} from './lib/tag'; -export {tagString} from './lib/tagString'; -export {stringify} from './lib/stringify'; +export * from './lib/Element'; +export * from './lib/equal'; +export * from './lib/is'; +export * from './lib/clone'; +export * from './lib/createElement'; +export * from './lib/escape'; +export * from './lib/Parser'; +export * from './lib/parse'; +export * from './lib/tag'; +export * from './lib/tagString'; +export * from './lib/stringify'; diff --git a/types/ltx/lib/Element.d.ts b/types/ltx/lib/Element.d.ts index 203eaa93b6..7f0d3de62e 100644 --- a/types/ltx/lib/Element.d.ts +++ b/types/ltx/lib/Element.d.ts @@ -1,21 +1,26 @@ +import { clone } from './clone'; + +export type Node = Element | TextNode; +export type TextNode = string | number; + /** * Element * * Attributes are in the element.attrs object. Children is a list of * either other Elements or Strings for text content. - **/ -export declare class Element { + */ +export class Element { name: string; - parent: Element; + parent: Element | null; children: Element[]; - attrs: any; + attrs: { [attrName: string]: any }; - constructor(name: string, attrs?: any); + constructor(name: string, attrs?: string | { [attrName: string]: any }); /** * if (element.is('message', 'jabber:client')) ... - **/ - is(name: string, xmlns?: any): boolean; + */ + is(name: string, xmlns?: string): boolean; /** * without prefix. @@ -24,50 +29,44 @@ export declare class Element { /** * retrieves the namespace of the current element, upwards recursively - **/ - getNS(): any; + */ + getNS(): string | undefined; /** * find the namespace to the given prefix, upwards recursively - **/ - findNS(prefix: string): any; + */ + findNS(prefix: string): string | undefined; /** * Recursiverly gets all xmlns defined, in the form of {url:prefix} - **/ - getXmlns(): any; + */ + getXmlns(): { [key: string]: string }; - setAttrs(attrs: any): void; + setAttrs(attrs: string | { [attrName: string]: any }): void; /** - * xmlns can be null, returns the matching attribute. - **/ - getAttr(name: string, xmlns?: any): any; + * returns the matching attribute. + */ + getAttr(name: string, xmlns?: string): any; - /** - * xmlns can be null - **/ - getChild(name: string, xmlns?: any): Element; + getChild(name: string, xmlns?: string): Element | undefined; - /** - * xmlns can be null - **/ - getChildren(name: string, xmlns?: any): Element[]; + getChildren(name: string, xmlns?: string): Element[]; - /** - * xmlns and recursive can be null - **/ - getChildByAttr(attr: any, val: any, xmlns?: any, recursive?: any): Element; + getChildByAttr( + attr: string, + val: any, + xmlns?: string, + recursive?: boolean + ): Element | undefined; + getChildrenByAttr(attr: string, val: any, xmlns?: string, recursive?: boolean): Element[]; - /** - * xmlns and recursive can be null - **/ - getChildrenByAttr(attr: any, val: any, xmlns?: any, recursive?: any): Element[]; + getChildrenByFilter(filter: (child: Node) => boolean, recursive?: boolean): Element[]; getText(): string; - getChildText(name: string, xmlns?: any): string; + getChildText(name: string, xmlns?: string): string | null; /** * Return all direct descendents that are Elements. @@ -77,37 +76,39 @@ export declare class Element { getChildElements(): Element[]; /** returns uppermost parent */ - root(): Element; + root(): Element | this; - tree(): Element; + tree(): Element | this; /** just parent or itself */ - up(): Element; + up(): Element | this; /** create child node and return it */ - c(name: string, attrs?: any): Element; + c(name: string, attrs?: { [key: string]: any }): Element; + + cnode(child: T): T; /** add text node and return element */ - t(text: string): Element; + t(text: TextNode): this; /** * Either: * el.remove(childEl) * el.remove('author', 'urn:...') */ - remove(el: Element, xmlns?: any): Element; + remove(el: Element | string, xmlns?: string): this; - clone(): Element; + clone: typeof clone; - text(val: string): string; + text(val?: string): string; - attr(attr: any, val: any): any; + attr(attr: string, val?: any): any; toString(): string; - toJSON(): any; + toJSON(): ElementJson; - write(writer: any): void; + write(writer: (part: string) => void): void; nameEquals(el: Element): boolean; @@ -117,3 +118,9 @@ export declare class Element { equals(el: Element): boolean; } + +export interface ElementJson { + name: string; + attrs: { [attrName: string]: any }; + children: Array; +} diff --git a/types/ltx/lib/Parser.d.ts b/types/ltx/lib/Parser.d.ts index 083e3ace66..463029286f 100644 --- a/types/ltx/lib/Parser.d.ts +++ b/types/ltx/lib/Parser.d.ts @@ -1,5 +1,15 @@ /// import { EventEmitter } from 'events'; -export declare class Parser extends EventEmitter { - constructor(options?: any); +import { Element } from './Element'; + +export class Parser extends EventEmitter { + constructor(options?: ParserOptions); + + write(data: string): void; + end(data: string): void; +} + +export interface ParserOptions { + Parser?: typeof Parser; + Element?: typeof Element; } diff --git a/types/ltx/lib/clone.d.ts b/types/ltx/lib/clone.d.ts index 41193a3f40..15369e00d5 100644 --- a/types/ltx/lib/clone.d.ts +++ b/types/ltx/lib/clone.d.ts @@ -1 +1,3 @@ -export declare function clone(el: any): any; +import { Element } from './Element'; + +export function clone(el: T): T; diff --git a/types/ltx/lib/createElement.d.ts b/types/ltx/lib/createElement.d.ts index c372f11150..21527ae1b6 100644 --- a/types/ltx/lib/createElement.d.ts +++ b/types/ltx/lib/createElement.d.ts @@ -1,2 +1,6 @@ -import { Element } from './Element'; -export declare function createElement(name: string, attrs: any): Element; +import { Element, Node } from './Element'; +export function createElement( + name: string, + attrs?: string | { [attrName: string]: any }, + ...children: Node[] +): Element; diff --git a/types/ltx/lib/equal.d.ts b/types/ltx/lib/equal.d.ts index 520555e098..f7548c526b 100644 --- a/types/ltx/lib/equal.d.ts +++ b/types/ltx/lib/equal.d.ts @@ -1,4 +1,6 @@ -export declare function nameEqual(a: any, b: any): boolean; -export declare function attrsEqual(a: any, b: any): boolean; -export declare function childrenEqual(a: any, b: any): boolean; -export declare function equal(a: any, b: any): boolean; +import { Element } from './Element'; + +export function nameEqual(a: Element, b: Element): boolean; +export function attrsEqual(a: Element, b: Element): boolean; +export function childrenEqual(a: Element, b: Element): boolean; +export function equal(a: Element, b: Element): boolean; diff --git a/types/ltx/lib/escape.d.ts b/types/ltx/lib/escape.d.ts index 4bc45c223a..d390e860ed 100644 --- a/types/ltx/lib/escape.d.ts +++ b/types/ltx/lib/escape.d.ts @@ -1,4 +1,4 @@ -export declare function escapeXML(s: string): string; -export declare function unescapeXML(s: string): string; -export declare function escapeXMLText(s: string): string; -export declare function unescapeXMLText(s: string): string; +export function escapeXML(s: string): string; +export function unescapeXML(s: string): string; +export function escapeXMLText(s: string): string; +export function unescapeXMLText(s: string): string; diff --git a/types/ltx/lib/is.d.ts b/types/ltx/lib/is.d.ts index 6515d23f80..e62d919267 100644 --- a/types/ltx/lib/is.d.ts +++ b/types/ltx/lib/is.d.ts @@ -1,3 +1,5 @@ -export declare function isNode(el: any): boolean; -export declare function isElement(el: any): boolean; -export declare function isText(el: any): boolean; +import { Element, Node } from './Element'; + +export function isNode(el: any): el is Node; +export function isElement(el: any): el is Element; +export function isText(el: any): el is string; diff --git a/types/ltx/lib/parse.d.ts b/types/ltx/lib/parse.d.ts index cc4073113a..0e0a9b17cb 100644 --- a/types/ltx/lib/parse.d.ts +++ b/types/ltx/lib/parse.d.ts @@ -1 +1,4 @@ -export declare function parse(data: any, options?: any): any; +import { ParserOptions, Parser } from './Parser'; +import { Element } from './Element'; + +export function parse(data: string, options?: ParserOptions | Parser): Element; diff --git a/types/ltx/lib/stringify.d.ts b/types/ltx/lib/stringify.d.ts index 770f7d324f..9913f2318c 100644 --- a/types/ltx/lib/stringify.d.ts +++ b/types/ltx/lib/stringify.d.ts @@ -1 +1,3 @@ -export declare function stringify(el: any, indent: any, level: any): string; +import { Element } from './Element'; + +export function stringify(el: Element, indent?: number, level?: number): string; diff --git a/types/ltx/lib/tag.d.ts b/types/ltx/lib/tag.d.ts index 8bbcb6fe7b..11a9784bf0 100644 --- a/types/ltx/lib/tag.d.ts +++ b/types/ltx/lib/tag.d.ts @@ -1 +1,3 @@ -export declare function tag(d: any): any; +import { Element } from './Element'; + +export function tag(literals: string[], ...substitutions: string[]): Element; diff --git a/types/ltx/lib/tagString.d.ts b/types/ltx/lib/tagString.d.ts index 44036ce037..619ccbdb23 100644 --- a/types/ltx/lib/tagString.d.ts +++ b/types/ltx/lib/tagString.d.ts @@ -1 +1 @@ -export declare function tagString(d: any): string; +export function tagString(literals: string[], ...substitutions: string[]): string; diff --git a/types/ltx/ltx-tests.ts b/types/ltx/ltx-tests.ts index 522b7673c8..a7342ef54b 100644 --- a/types/ltx/ltx-tests.ts +++ b/types/ltx/ltx-tests.ts @@ -1,21 +1,147 @@ import * as ltx from 'ltx'; -ltx.parse(''); +let el: ltx.Element = null as any; +let maybeEl: ltx.Element | undefined = null as any; +let els: ltx.Element[] = []; +let bool: boolean; +const any: any = null; +let str: string = null as any; -const getChildTextElement = ltx.parse('body text') as ltx.Element; -if (getChildTextElement.getChildText('child') !== 'body text') { - throw new Error("body does not match"); +el = ltx.clone(el); + +bool = ltx.nameEqual(el, el); +bool = ltx.attrsEqual(el, el); +bool = ltx.childrenEqual(el, el); +bool = ltx.equal(el, el); + +el = ltx.createElement('el'); +el = ltx.createElement('el', 'xml'); +el = ltx.createElement('el', { foo: 'bar' }); +el = ltx.createElement('el', { foo: 'bar' }, el); +el = ltx.createElement('el', { foo: 'bar' }, 'hi'); + +if (ltx.isNode(any)) { + // $ExpectType Node + any; +} +if (ltx.isElement(any)) { + // $ExpectType Element + any; +} +if (ltx.isText(any)) { + // $ExpectType string + any; } -const p = new ltx.Parser(); +str = ltx.escapeXML(str); +str = ltx.unescapeXML(str); +str = ltx.escapeXMLText(str); +str = ltx.unescapeXMLText(str); + +el = ltx.parse(''); +el = ltx.parse('', (null as any) as ltx.Parser); +el = ltx.parse('', { Parser: (null as any) as typeof ltx.Parser }); +el = ltx.parse('', { Element: (null as any) as typeof ltx.Element }); + +el = ltx.tag(['document'], 'foo'); +str = ltx.tagString(['document'], 'foo'); + +str = ltx.stringify(el); +str = ltx.stringify(el, 1); +str = ltx.stringify(el, 1, 1); + +const getChildTextElement = ltx.parse('body text'); +if (getChildTextElement.getChildText('child') !== 'body text') { + throw new Error('body does not match'); +} + +let p: ltx.Parser; +p = new ltx.Parser(); +p = new ltx.Parser({ Parser: (null as any) as typeof ltx.Parser }); +p = new ltx.Parser({ Element: (null as any) as typeof ltx.Element }); p.on('tree', (ignored: any) => {}); - p.on('error', (ignored: any) => {}); -const el = new ltx.Element('root').c('children'); -el.c('child', {age: 5}).t('Hello').up() - .c('child', {age: 7}).t('Hello').up() - .c('child', {age: 99}).t('Hello').up(); +el = new ltx.Element('root').c('children'); -el.root().toString(); +bool = el.is('el'); +bool = el.is('el', 'ns'); +str = el.getName(); +let s: string | undefined = el.getNS(); +s = el.findNS('ns'); +const xmlns: { [key: string]: string } = el.getXmlns(); +el.setAttrs('ho'); +el.setAttrs({ my: 'attr' }); +el.getAttr('ho'); +el.getAttr('ho', 'ns'); +maybeEl = el.getChild('el'); +maybeEl = el.getChild('el', 'ns'); +els = el.getChildren('el'); +els = el.getChildren('el', 'ns'); +maybeEl = el.getChildByAttr('my', 'attr'); +maybeEl = el.getChildByAttr('my', 'attr', 'ns'); +maybeEl = el.getChildByAttr('my', 'attr', 'ns', true); +els = el.getChildrenByAttr('my', 'attr'); +els = el.getChildrenByAttr('my', 'attr', 'ns'); +els = el.getChildrenByAttr('my', 'attr', 'ns', true); +els = el.getChildrenByFilter(child => { + // $ExpectType Node + child; + return true; +}); +els = el.getChildrenByFilter(child => { + // $ExpectType Node + child; + return true; +}, true); +str = el.getText(); +let maybeS: string | null = el.getChildText('hi'); +maybeS = el.getChildText('hi', 'ns'); +els = el.getChildElements(); + +class MyEl extends ltx.Element { + foo: 'bar'; +} +let myEl = new MyEl('el'); + +// $ExpectType Element | MyEl +myEl.root(); +// $ExpectType Element | MyEl +myEl.tree(); +// $ExpectType Element | MyEl +myEl.up(); + +el = el.c('hi'); +el = el.c('hi', { my: 'attr' }); +myEl = myEl.cnode(myEl); +myEl = myEl.t('hi'); +myEl = myEl.t(1); +myEl = myEl.remove(el); +myEl = myEl.remove('el'); +myEl = myEl.remove('el', 'ns'); +myEl = myEl.clone(myEl); +str = el.text(); +str = el.text('val'); +el.attr('my'); +el.attr('my', 'attr'); +str = el.toString(); +const json: ltx.ElementJson = el.toJSON(); +el.write(part => { + // $ExpectType string + part; +}); +bool = el.nameEquals(el); +bool = el.attrsEquals(el); +bool = el.childrenEquals(el); +bool = el.equals(el); + +el.c('child', { age: 5 }) + .t('Hello') + .up() + .c('child', { age: 7 }) + .t('Hello') + .up() + .c('child', { age: 99 }) + .t('Hello') + .up(); diff --git a/types/ltx/tslint.json b/types/ltx/tslint.json index 5bb1e8735d..f93cf8562a 100644 --- a/types/ltx/tslint.json +++ b/types/ltx/tslint.json @@ -1,9 +1,3 @@ { - "extends": "dtslint/dt.json", - "rules": { - // All are TODOs - "jsdoc-format": false, - "no-consecutive-blank-lines": false, - "strict-export-declare-modifiers": false - } + "extends": "dtslint/dt.json" } From 16033f3b89831cdd6f23c1236ed8a0b741ca522e Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Mon, 19 Nov 2018 21:43:50 +0100 Subject: [PATCH 065/608] Correct return types for p-defer --- types/p-defer/index.d.ts | 17 +++++++++-------- types/p-defer/p-defer-tests.ts | 12 ++++++------ 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/types/p-defer/index.d.ts b/types/p-defer/index.d.ts index 7eff607e7d..8386706d89 100644 --- a/types/p-defer/index.d.ts +++ b/types/p-defer/index.d.ts @@ -1,16 +1,17 @@ // Type definitions for p-defer 1.0 // Project: https://github.com/sindresorhus/p-defer // Definitions by: Sam Verschueren +// BendingBender // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare namespace pDefer { - interface DeferredPromise { - resolve(value?: U | PromiseLike): Promise; - reject(reason: any): Promise; - promise: Promise; - } -} +export = pDefer; declare function pDefer(): pDefer.DeferredPromise; -export = pDefer; +declare namespace pDefer { + interface DeferredPromise { + resolve(value?: T | PromiseLike): void; + reject(reason: any): void; + promise: Promise; + } +} diff --git a/types/p-defer/p-defer-tests.ts b/types/p-defer/p-defer-tests.ts index 9ea4647620..f61bce624b 100644 --- a/types/p-defer/p-defer-tests.ts +++ b/types/p-defer/p-defer-tests.ts @@ -1,13 +1,13 @@ import pDefer = require('p-defer'); -function delay(deferred: pDefer.DeferredPromise, ms: number) { +function delay(deferred: pDefer.DeferredPromise, ms: number) { setTimeout(deferred.resolve, ms, '🦄'); return deferred.promise; } -let s: string; -async function f() { s = await delay(pDefer(), 100); } +const s: Promise = delay(pDefer(), 100); -async function u() { - const u: Promise = pDefer().resolve(); -} +// $ExpectType void +pDefer().resolve(); +// $ExpectType void +pDefer().reject('oh no'); From 64df3bfb11d384c4d404c71e05ff47aea9b7e8cb Mon Sep 17 00:00:00 2001 From: Alan Plum Date: Fri, 23 Nov 2018 17:53:22 +0100 Subject: [PATCH 066/608] Add mcrypt@0.1 --- types/mcrypt/index.d.ts | 31 ++++++++++++++++++++++ types/mcrypt/mcrypt-tests.ts | 51 ++++++++++++++++++++++++++++++++++++ types/mcrypt/tsconfig.json | 16 +++++++++++ types/mcrypt/tslint.json | 1 + 4 files changed, 99 insertions(+) create mode 100644 types/mcrypt/index.d.ts create mode 100644 types/mcrypt/mcrypt-tests.ts create mode 100644 types/mcrypt/tsconfig.json create mode 100644 types/mcrypt/tslint.json diff --git a/types/mcrypt/index.d.ts b/types/mcrypt/index.d.ts new file mode 100644 index 0000000000..945cb88e59 --- /dev/null +++ b/types/mcrypt/index.d.ts @@ -0,0 +1,31 @@ +// Type definitions for mcrypt 0.1 +// Project: https://github.com/tugrul/node-mcrypt +// Definitions by: Alan Plum +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +/// + +export function getAlgorithmNames(): string[]; +export function getModeNames(): string[]; + +export class MCrypt { + constructor(algorithm: string, mode: string); + open(key: string | Buffer, iv?: string | Buffer): void; + encrypt(plaintext: string | Buffer): Buffer; + decrypt(ciphertext: Buffer): Buffer; + generateIv(): Buffer; + validateKeySize(validate: boolean): void; + validateIvSize(validate: boolean): void; + selfTest(): boolean; + isBlockAlgorithmMode(): boolean; + isBlockAlgorithm(): boolean; + isBlockMode(): boolean; + getBlockSize(): number; + getKeySize(): number; + getSupportedKeySizes(): number[]; + getIvSize(): number; + hasIv(): boolean; + getAlgorithmName(): string; + getModeName(): string; +} diff --git a/types/mcrypt/mcrypt-tests.ts b/types/mcrypt/mcrypt-tests.ts new file mode 100644 index 0000000000..66614e08e3 --- /dev/null +++ b/types/mcrypt/mcrypt-tests.ts @@ -0,0 +1,51 @@ +import { getAlgorithmNames, getModeNames, MCrypt } from "mcrypt"; + +let plaintext: Buffer; +let ciphertext: Buffer; + +for (const algo of getAlgorithmNames()) { + console.log(algo.toUpperCase()); +} +for (const mode of getModeNames()) { + console.log(mode.toUpperCase()); +} + +const desEcb = new MCrypt("des", "ecb"); +desEcb.open("madepass"); + +ciphertext = desEcb.encrypt("too many secrets"); +console.log(ciphertext.toString("base64")); + +plaintext = desEcb.decrypt(ciphertext); +console.log(plaintext.toString()); + +const blowfishCfb = new MCrypt("blowfish", "cfb"); +const iv = blowfishCfb.generateIv(); +blowfishCfb.open("somekey", iv); +ciphertext = blowfishCfb.encrypt("sometext"); +console.log(Buffer.concat([iv, ciphertext]).toString("base64")); + +const bfEcb = new MCrypt("blowfish", "ecb"); +bfEcb.validateKeySize(false); +bfEcb.open("typeconfig.sys^_-"); + +const rjCbc = new MCrypt("rijndael-256", "cbc"); +rjCbc.validateIvSize(false); +rjCbc.open("$verysec$retkey$", "foobar"); + +console.log(blowfishCfb.getBlockSize() * 8); +console.log(blowfishCfb.getKeySize() * 8); +console.log(blowfishCfb.getSupportedKeySizes().map(v => v * 8)); +console.log(blowfishCfb.getIvSize() * 8); +console.log(blowfishCfb.getAlgorithmName().toUpperCase()); +console.log(blowfishCfb.getModeName().toUpperCase()); + +function assertBool(value: boolean) { + return value; +} + +assertBool(blowfishCfb.selfTest()); +assertBool(blowfishCfb.isBlockAlgorithmMode()); +assertBool(blowfishCfb.isBlockAlgorithm()); +assertBool(blowfishCfb.isBlockMode()); +assertBool(blowfishCfb.hasIv()); diff --git a/types/mcrypt/tsconfig.json b/types/mcrypt/tsconfig.json new file mode 100644 index 0000000000..1bb1454ce5 --- /dev/null +++ b/types/mcrypt/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "mcrypt-tests.ts"] +} diff --git a/types/mcrypt/tslint.json b/types/mcrypt/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/mcrypt/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 3df7d2836e432e949b26de57741265aad9cf1e8d Mon Sep 17 00:00:00 2001 From: Alan Plum Date: Fri, 23 Nov 2018 23:45:29 +0100 Subject: [PATCH 067/608] Add promised-ldap@0.3 --- types/promised-ldap/index.d.ts | 95 ++++++++++++++++++++++ types/promised-ldap/promised-ldap-tests.ts | 39 +++++++++ types/promised-ldap/tsconfig.json | 16 ++++ types/promised-ldap/tslint.json | 1 + 4 files changed, 151 insertions(+) create mode 100644 types/promised-ldap/index.d.ts create mode 100644 types/promised-ldap/promised-ldap-tests.ts create mode 100644 types/promised-ldap/tsconfig.json create mode 100644 types/promised-ldap/tslint.json diff --git a/types/promised-ldap/index.d.ts b/types/promised-ldap/index.d.ts new file mode 100644 index 0000000000..53f215b2b8 --- /dev/null +++ b/types/promised-ldap/index.d.ts @@ -0,0 +1,95 @@ +// Type definitions for promised-ldap 0.3 +// Project: https://github.com/stewartml/promised-ldap#readme +// Definitions by: My Self +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +import { EventEmitter } from "events"; +import * as ldap from "ldapjs"; + +declare class Client extends EventEmitter { + constructor({ url }: { url: string }); + + search( + base: string, + options: ldap.SearchOptions, + controls?: ldap.Control | ldap.Control[] + ): Promise<{ + entries: any[]; + references: any[]; + }>; + + authenticate(base: string, dn: string, password: string): Promise; + authenticateUser( + base: string, + dn: string, + password: string + ): Promise<{ name: string; email: string; groups: string[] } | null>; + + bind( + dn: string, + password: string, + controls?: ldap.Control | ldap.Control[] + ): Promise; + + add( + name: string, + entry: object, + controls?: ldap.Control | ldap.Control[] + ): Promise; + + compare( + name: string, + attr: string, + value: string, + controls?: ldap.Control | ldap.Control[] + ): Promise; + + del(name: string, controls?: ldap.Control | ldap.Control[]): Promise; + + exop( + name: string, + value: string, + controls?: ldap.Control | ldap.Control[] + ): Promise; + + modify( + name: string, + change: ldap.Change | ldap.Change[], + controls?: ldap.Control | ldap.Control[] + ): Promise; + + modifyDN( + name: string, + newName: string, + controls?: ldap.Control | ldap.Control[] + ): Promise; + + _search( + base: string, + options: ldap.SearchOptions, + controls?: ldap.Control | ldap.Control[], + _bypass?: boolean + ): Promise; + _search( + base: string, + options: ldap.SearchOptions, + _bypass: boolean + ): Promise; + + starttls( + options: object, + controls: ldap.Control | ldap.Control[], + _bypass?: boolean + ): Promise; + + unbind(): Promise; + + destroy(err?: any): void; +} + +declare namespace Client { + type SearchOptions = ldap.SearchOptions; +} + +export = Client; diff --git a/types/promised-ldap/promised-ldap-tests.ts b/types/promised-ldap/promised-ldap-tests.ts new file mode 100644 index 0000000000..b61f7ef6fc --- /dev/null +++ b/types/promised-ldap/promised-ldap-tests.ts @@ -0,0 +1,39 @@ +import ldap = require("promised-ldap"); +import ldapjs = require("ldapjs"); + +const client = new ldap({ + url: "ldap://127.0.0.1:1389" +}); + +client.authenticate("test", "cn=root", "secret").then((res: any) => { + console.log(res); +}); + +client.authenticateUser("test", "cn=root", "secret").then((res: any) => { + console.log(res); +}); + +client.bind("cn=root", "secret").catch((err: Error) => { + console.error(err); +}); + +const opts: ldap.SearchOptions = { + filter: "(&(l=Seattle)(email=*@foo.com))", + scope: "sub", + attributes: ["dn", "sn", "cn"] +}; + +client._search("o=example", opts).then((res: NodeJS.EventEmitter) => { + console.log(res); +}); + +const change = new ldapjs.Change({ + operation: "add", + modification: { + pets: ["cat", "dog"] + } +}); + +client.modify("cn=foo, o=example", change).catch((err: Error) => { + console.error(err); +}); diff --git a/types/promised-ldap/tsconfig.json b/types/promised-ldap/tsconfig.json new file mode 100644 index 0000000000..89b60715eb --- /dev/null +++ b/types/promised-ldap/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "promised-ldap-tests.ts"] +} diff --git a/types/promised-ldap/tslint.json b/types/promised-ldap/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/promised-ldap/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 1cef81059eccb564654a9942955300c2073bb3f3 Mon Sep 17 00:00:00 2001 From: Alan Plum Date: Sat, 24 Nov 2018 01:45:43 +0100 Subject: [PATCH 068/608] Update index.d.ts --- types/promised-ldap/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/promised-ldap/index.d.ts b/types/promised-ldap/index.d.ts index 53f215b2b8..8b0182bea6 100644 --- a/types/promised-ldap/index.d.ts +++ b/types/promised-ldap/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for promised-ldap 0.3 -// Project: https://github.com/stewartml/promised-ldap#readme -// Definitions by: My Self +// Project: https://github.com/stewartml/promised-ldap +// Definitions by: Alan Plum // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 From c0df17945ec4488f75c6eb4cc121926601e901fc Mon Sep 17 00:00:00 2001 From: Alan Plum Date: Sat, 24 Nov 2018 02:11:50 +0100 Subject: [PATCH 069/608] Added ldap-filters@2.2 --- types/ldap-filters/index.d.ts | 60 ++++++++++++++++++++++++ types/ldap-filters/ldap-filters-tests.ts | 28 +++++++++++ types/ldap-filters/tsconfig.json | 16 +++++++ types/ldap-filters/tslint.json | 1 + 4 files changed, 105 insertions(+) create mode 100644 types/ldap-filters/index.d.ts create mode 100644 types/ldap-filters/ldap-filters-tests.ts create mode 100644 types/ldap-filters/tsconfig.json create mode 100644 types/ldap-filters/tslint.json diff --git a/types/ldap-filters/index.d.ts b/types/ldap-filters/index.d.ts new file mode 100644 index 0000000000..46e1c24fa8 --- /dev/null +++ b/types/ldap-filters/index.d.ts @@ -0,0 +1,60 @@ +// Type definitions for ldap-filters 2.2 +// Project: https://github.com/tapmodo/node-ldap-filters +// Definitions by: Alan Plum +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +interface Filter { + toString(indent?: boolean | number): string; + simplify(): Filter; + match(data: object): boolean; +} + +declare namespace Filter { + let escape_chars: string[]; + let indent: number; + let indent_char: string; + let collapse_not: boolean; + + function escape(value: string): string; + function unescape(value: string): string; + function parse(input: string): Filter; + function matchString(data: string | string[], filter: Filter): boolean; + function matchSubstring(data: string | string[], filter: Filter): boolean; + function matchApprox(data: string | string[], filter: Filter): boolean; + function matchGTE(data: string | string[], filter: Filter): boolean; + function matchLTE(data: string | string[], filter: Filter): boolean; + function attribute(name: string): Attribute; + function AND(filters: Filter[]): Group; + function OR(filters: Filter[]): Group; + function NOT(filter: Filter): GroupNot; + + interface Group { + type: string; + comp: string; + filters: Filter[]; + toString(indent?: boolean | number): string; + match(data: object): boolean; + } + + interface GroupNot extends Group { + simplify(): Filter; + } + + interface Attribute { + name: string; + escapeChars: string[]; + escape(value: string): string; + present(): Filter; + raw(value: string): Filter; + equalTo(value: string): Filter; + endsWith(value: string): Filter; + startsWith(value: string): Filter; + contains(value: string): Filter; + approx(value: string): Filter; + lte(value: string): Filter; + gte(value: string): Filter; + } +} + +export = Filter; diff --git a/types/ldap-filters/ldap-filters-tests.ts b/types/ldap-filters/ldap-filters-tests.ts new file mode 100644 index 0000000000..5111af785e --- /dev/null +++ b/types/ldap-filters/ldap-filters-tests.ts @@ -0,0 +1,28 @@ +/// + +import Filter = require("ldap-filters"); + +Filter.collapse_not = false; + +const output = Filter.AND([ + Filter.attribute("givenName").equalTo("jenny"), + Filter.attribute("sn").equalTo("jensen") +]); + +console.log(output.toString()); + +Filter.parse("(&(givenName=jenny)(sn=jensen))"); + +Filter.parse("(&(uid=jenny))").simplify(); + +const filter = Filter.parse( + "(&(givenName=jenny)(sn=jensen)(|(c=us)(st=ontario)))" +); + +filter.toString(); +filter.toString(true); +filter.toString(2); + +const parsed = Filter.parse("(&(givenName~=jeni)(sn=jensen))"); +const data = { givenName: "Jenny", sn: "Jensen" }; +console.log(parsed.match(data)); diff --git a/types/ldap-filters/tsconfig.json b/types/ldap-filters/tsconfig.json new file mode 100644 index 0000000000..9d4f5aa560 --- /dev/null +++ b/types/ldap-filters/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "ldap-filters-tests.ts"] +} diff --git a/types/ldap-filters/tslint.json b/types/ldap-filters/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/ldap-filters/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From da0630fa320071bbd5713ea86c11de6a50725b43 Mon Sep 17 00:00:00 2001 From: Hiroshi Ioka Date: Sat, 24 Nov 2018 13:51:49 +0900 Subject: [PATCH 070/608] @types/mockingoose: add new package --- types/mockingoose/index.d.ts | 40 ++++++++++++++++++++++++++ types/mockingoose/mockingoose-tests.ts | 9 ++++++ types/mockingoose/tsconfig.json | 23 +++++++++++++++ types/mockingoose/tslint.json | 1 + 4 files changed, 73 insertions(+) create mode 100644 types/mockingoose/index.d.ts create mode 100644 types/mockingoose/mockingoose-tests.ts create mode 100644 types/mockingoose/tsconfig.json create mode 100644 types/mockingoose/tslint.json diff --git a/types/mockingoose/index.d.ts b/types/mockingoose/index.d.ts new file mode 100644 index 0000000000..a1597bd4e5 --- /dev/null +++ b/types/mockingoose/index.d.ts @@ -0,0 +1,40 @@ +// Type definitions for mockingoose 2.11 +// Project: https://github.com/alonronin/mockingoose#readme +// Definitions by: Hiroshi Ioka +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +type Op = + | 'find' + | 'findOne' + | 'count' + | 'countDocuments' + | 'estimatedDocumentCount' + | 'distinct' + | 'findOneAndUpdate' + | 'findOneAndRemove' + | 'remove' + | 'update' + | 'deleteOne' + | 'deleteMany' + | 'save'; + +declare class Mock { + toReturn(expected: any, op?: Op): this; + reset(op: Op): this; + toJSON(): any; +} + +interface Target { + __mocks: any; + resetAll(): void; + toJSON(): any; +} + +type Proxy = Target & { + [index: string]: Mock; +}; + +declare const mockingoose: Proxy; + +export default mockingoose; diff --git a/types/mockingoose/mockingoose-tests.ts b/types/mockingoose/mockingoose-tests.ts new file mode 100644 index 0000000000..09a00ad274 --- /dev/null +++ b/types/mockingoose/mockingoose-tests.ts @@ -0,0 +1,9 @@ +import mockingoose from 'mockingoose'; + +mockingoose.User + .toReturn({ name: 'name' }) + .toReturn({ name: 'a name too' }, 'findOne') + .toReturn({ name: 'another name' }, 'save') + .reset('find'); + +mockingoose.resetAll(); diff --git a/types/mockingoose/tsconfig.json b/types/mockingoose/tsconfig.json new file mode 100644 index 0000000000..a6f171944a --- /dev/null +++ b/types/mockingoose/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "mockingoose-tests.ts" + ] +} diff --git a/types/mockingoose/tslint.json b/types/mockingoose/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/mockingoose/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From a169bc5dda5c595439062712c4d0429b4def512d Mon Sep 17 00:00:00 2001 From: TeamworkGuy2 Date: Sat, 24 Nov 2018 14:26:28 +0000 Subject: [PATCH 071/608] [cached-path-relative] Add documentation to new definition --- types/cached-path-relative/index.d.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/types/cached-path-relative/index.d.ts b/types/cached-path-relative/index.d.ts index 56076870bc..b2af5ea81c 100644 --- a/types/cached-path-relative/index.d.ts +++ b/types/cached-path-relative/index.d.ts @@ -3,6 +3,11 @@ // Definitions by: TeamworkGuy2 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +/** + * Memoize the results of the path.relative function. path.relative can be an expensive operation + * if it happens a lot, and its results shouldn't change for the same arguments. + * Use it just like your normal path.relative, but it's memoized. + */ declare function cachedPathRelative(from: string, to: string): string; export = cachedPathRelative; From 16770fa6e199f01f83957339c25bc9ce1095329c Mon Sep 17 00:00:00 2001 From: Leonard Thieu Date: Wed, 24 Oct 2018 08:11:51 -0400 Subject: [PATCH 072/608] [jquery] Add deprecation notice for `Event.which`. --- types/jquery/misc.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/jquery/misc.d.ts b/types/jquery/misc.d.ts index 7b09b6a4dc..8488d49f00 100644 --- a/types/jquery/misc.d.ts +++ b/types/jquery/misc.d.ts @@ -4305,6 +4305,7 @@ $( "a" ).click(function( event ) { * For key or mouse events, this property indicates the specific key or button that was pressed. * @see \`{@link https://api.jquery.com/event.which/ }\` * @since 1.1.3 + * @deprecated ​ Deprecated since 3.3. See \`{@link https://github.com/jquery/api.jquery.com/issues/821 }\`. * @example ​ ````Log which key was depressed. ```html From e64bea6d884096561c30e067804e9d58afde5926 Mon Sep 17 00:00:00 2001 From: Leonard Thieu Date: Fri, 26 Oct 2018 09:17:54 -0400 Subject: [PATCH 073/608] [jquery] Remove `jQuery.event.fixHooks`. See https://jquery.com/upgrade-guide/3.0/#breaking-change-jquery-event-props-and-jquery-event-fixhooks-removed. --- types/jquery/jquery-tests.ts | 16 ------- types/jquery/misc.d.ts | 74 -------------------------------- types/jquery/test/learn-tests.ts | 18 -------- 3 files changed, 108 deletions(-) diff --git a/types/jquery/jquery-tests.ts b/types/jquery/jquery-tests.ts index 515715bf14..21b4f8fdef 100644 --- a/types/jquery/jquery-tests.ts +++ b/types/jquery/jquery-tests.ts @@ -8427,22 +8427,6 @@ function JQuery_Event() { } function JQuery_EventExtensions() { - function fixHooks() { - jQuery.event.fixHooks.drop = { - props: ['dataTransfer'], - filter(event, originalEvent) { - // $ExpectType Event - event; - // $ExpectType Event - originalEvent; - }, - }; - - // Weak type test. This may be removed if the TypeScript requirement is increased to 2.4+. - // $ExpectError - jQuery.event.fixHooks.drop = ['dataTransfer']; - } - function special() { jQuery.event.special.multiclick = { noBubble: true, diff --git a/types/jquery/misc.d.ts b/types/jquery/misc.d.ts index 8488d49f00..c466004c58 100644 --- a/types/jquery/misc.d.ts +++ b/types/jquery/misc.d.ts @@ -4734,11 +4734,6 @@ $( "ul" ).click( handler ).find( "ul" ).hide(); * @see \`{@link https://learn.jquery.com/events/event-extensions/#jquery-event-props-array }\` */ props: string[]; - /** - * The `fixHooks` interface provides a per-event-type way to extend or normalize the event object that jQuery creates when it processes a _native_ browser event. - * @see \`{@link https://learn.jquery.com/events/event-extensions/#jquery-event-fixhooks-object }\` - */ - fixHooks: FixHooks; /** * The jQuery special event hooks are a set of per-event-name functions and properties that allow code to control the behavior of event processing within jQuery. The mechanism is similar to `fixHooks` in that the special event information is stored in `jQuery.event.special.NAME`, where `NAME` is the name of the special event. Event names are case sensitive. * @@ -4748,75 +4743,6 @@ $( "ul" ).click( handler ).find( "ul" ).hide(); special: SpecialEventHooks; } - // region Fix hooks - // #region Fix hooks - - // Workaround for TypeScript 2.3 which does not have support for weak types handling. - type FixHook = { - /** - * Strings representing properties that should be copied from the browser's event object to the jQuery event object. If omitted, no additional properties are copied beyond the standard ones that jQuery copies and normalizes (e.g. `event.target` and `event.relatedTarget`). - */ - props: string[]; - } | { - /** - * jQuery calls this function after it constructs the `jQuery.Event` object, copies standard properties from `jQuery.event.props`, and copies the `fixHooks`-specific props (if any) specified above. The function can create new properties on the event object or modify existing ones. The second argument is the browser's native event object, which is also available in `event.originalEvent`. - * - * Note that for all events, the browser's native event object is available in `event.originalEvent`; if the jQuery event handler examines the properties there instead of jQuery's normalized `event` object, there is no need to create a `fixHooks` entry to copy or modify the properties. - * @example ​ ````For example, to set a hook for the "drop" event that copies the `dataTransfer` property, assign an object to `jQuery.event.fixHooks.drop`: -```javascript -jQuery.event.fixHooks.drop = { - props: [ "dataTransfer" ] -}; -``` - -Since fixHooks is an advanced feature and rarely used externally, jQuery does not include code or -interfaces to deal with conflict resolution. If there is a chance that some other code may be assigning -`fixHooks` to the same events, the code should check for an existing hook and take appropriate measures. -A simple solution might look like this: - -```javascript -if ( jQuery.event.fixHooks.drop ) { - throw new Error( "Someone else took the jQuery.event.fixHooks.drop hook!" ); -} - -jQuery.event.fixHooks.drop = { - props: [ "dataTransfer" ] -}; -``` - -When there are known cases of different plugins wanting to attach to the drop hook, this solution might be more appropriate: - -```javascript -var existingHook = jQuery.event.fixHooks.drop; - -if ( !existingHook ) { - jQuery.event.fixHooks.drop = { - props: [ "dataTransfer" ] - }; -} else { - if ( existingHook.props ) { - existingHook.props.push( "dataTransfer" ); - } else { - existingHook.props = [ "dataTransfer" ]; - } -} -``` - */ - filter(event: Event, originalEvent: _Event): void; - } | { - [key: string]: never; - }; - - /** - * The `fixHooks` interface provides a per-event-type way to extend or normalize the event object that jQuery creates when it processes a _native_ browser event. - * @see \`{@link https://learn.jquery.com/events/event-extensions/#jquery-event-fixhooks-object }\` - */ - interface FixHooks { - [event: string]: FixHook; - } - - // #endregion - // region Special event hooks // #region Special event hooks diff --git a/types/jquery/test/learn-tests.ts b/types/jquery/test/learn-tests.ts index 8ef5eb2cfa..523385b644 100644 --- a/types/jquery/test/learn-tests.ts +++ b/types/jquery/test/learn-tests.ts @@ -21,24 +21,6 @@ jQuery("a").greenify(); // Makes all the links green. // Events -function fixHooks() { - function setHook() { - jQuery.event.fixHooks.drop = { - props: ["dataTransfer"] - }; - } - - function conflictResolution() { - if (jQuery.event.fixHooks.drop) { - throw new Error("Someone else took the jQuery.event.fixHooks.drop hook!"); - } - - jQuery.event.fixHooks.drop = { - props: ["dataTransfer"] - }; - } -} - function special() { function defineSpecialEvent() { jQuery.event.special.pushy = { From 50b56a19ce4cb93b1de1f87ef029938068f0198c Mon Sep 17 00:00:00 2001 From: Leonard Thieu Date: Fri, 26 Oct 2018 09:18:35 -0400 Subject: [PATCH 074/608] [jquery] Remove `jQuery.event.props`. See https://jquery.com/upgrade-guide/3.0/#breaking-change-jquery-event-props-and-jquery-event-fixhooks-removed. --- types/jquery/misc.d.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/types/jquery/misc.d.ts b/types/jquery/misc.d.ts index c466004c58..5aa957f4c5 100644 --- a/types/jquery/misc.d.ts +++ b/types/jquery/misc.d.ts @@ -4727,13 +4727,6 @@ $( "ul" ).click( handler ).find( "ul" ).hide(); // #region Event extensions interface EventExtensions { - /** - * jQuery defines an \`{@link https://api.jquery.com/category/events/event-object/ Event object}\` that represents a cross-browser subset of the information available when an event occurs. The `jQuery.event.props` property is an array of string names for properties that are always copied when jQuery processes a native browser event. (Events fired in code by `.trigger()` do not use this list, since the code can construct a `jQuery.Event` object with the needed values and trigger using that object.) - * - * To add a property name to this list, use `jQuery.event.props.push( "newPropertyName" )`. However, be aware that every event processed by jQuery will now attempt to copy this property name from the native browser event to jQuery's constructed event. If the property does not exist for that event type, it will get an undefined value. Adding many properties to this list can significantly reduce event delivery performance, so for infrequently-needed properties it is more efficient to use the value directly from `event.originalEvent` instead. If properties must be copied, you are strongly advised to use `jQuery.event.fixHooks` as of version 1.7. - * @see \`{@link https://learn.jquery.com/events/event-extensions/#jquery-event-props-array }\` - */ - props: string[]; /** * The jQuery special event hooks are a set of per-event-name functions and properties that allow code to control the behavior of event processing within jQuery. The mechanism is similar to `fixHooks` in that the special event information is stored in `jQuery.event.special.NAME`, where `NAME` is the name of the special event. Event names are case sensitive. * From 32e0482fb5df663b228e8eb7de1cde1c5b41f9b0 Mon Sep 17 00:00:00 2001 From: Leonard Thieu Date: Sun, 21 Oct 2018 09:54:12 -0400 Subject: [PATCH 075/608] [jquery] Remove `jQuery.Event(EventLike)` signatures and `EventLike` interface. These are undocumented and don't appear to be intended to be public. --- types/jquery/jquery-tests.ts | 10 ---------- types/jquery/misc.d.ts | 8 -------- 2 files changed, 18 deletions(-) diff --git a/types/jquery/jquery-tests.ts b/types/jquery/jquery-tests.ts index 21b4f8fdef..eba206f323 100644 --- a/types/jquery/jquery-tests.ts +++ b/types/jquery/jquery-tests.ts @@ -8400,21 +8400,11 @@ function JQuery_Event() { function call_signature() { // $ExpectType Event & Coordinates $.Event('keydown', $('p').offset()); - - // $ExpectType Event & { type: string; } - $.Event({ - type: 'keydown' - }); } function constructor() { // $ExpectType Event & Coordinates new $.Event('keydown', $('p').offset()); - - // $ExpectType Event & { type: string; } - new $.Event({ - type: 'keydown' - }); } // https://stackoverflow.com/questions/49892574/trigger-a-jquery-3-event-with-ctrlkey-set diff --git a/types/jquery/misc.d.ts b/types/jquery/misc.d.ts index 5aa957f4c5..94f7279e63 100644 --- a/types/jquery/misc.d.ts +++ b/types/jquery/misc.d.ts @@ -3986,11 +3986,7 @@ $( "input" ).click(function() { // tslint:disable-next-line:no-unnecessary-generics (event: string, properties?: T): Event & T; // tslint:disable-next-line:no-unnecessary-generics - (properties: T): Event & T; - // tslint:disable-next-line:no-unnecessary-generics new (event: string, properties?: T): Event & T; - // tslint:disable-next-line:no-unnecessary-generics - new (properties: T): Event & T; } // Instance members @@ -4712,10 +4708,6 @@ $( "ul" ).click( handler ).find( "ul" ).hide(); target: TTarget; } - interface EventLike { - type: string; - } - // #endregion interface EventHandler extends EventHandlerBase> { } From c1ec1c28e5c9f6e6f0cb16b37de27d7c66c5a513 Mon Sep 17 00:00:00 2001 From: Leonard Thieu Date: Fri, 26 Oct 2018 10:43:45 -0400 Subject: [PATCH 076/608] [jquery] Remove `JQuery.EventHandlerBase` from handler types. Handler types previously included `JQuery.EventHandlerBase`. This was a fix to what turned out to be a problem with `jQuery.proxy`. That issue was properly fixed by https://github.com/DefinitelyTyped/DefinitelyTyped/pull/29930. --- types/jquery/JQuery.d.ts | 136 +++---- types/jquery/jquery-tests.ts | 744 +---------------------------------- 2 files changed, 89 insertions(+), 791 deletions(-) diff --git a/types/jquery/JQuery.d.ts b/types/jquery/JQuery.d.ts index 7453457953..70cfaa0e03 100644 --- a/types/jquery/JQuery.d.ts +++ b/types/jquery/JQuery.d.ts @@ -1331,7 +1331,7 @@ $( "p" ).before( $( "b" ) ); */ bind(eventType: string, eventData: TData, - handler: JQuery.EventHandler | JQuery.EventHandlerBase>): this; + handler: JQuery.EventHandler): this; /** * Attach a handler to an event for the elements. * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names. @@ -1459,7 +1459,7 @@ $( "button" ).click(function() { ``` */ bind(eventType: string, - handler_preventBubble: JQuery.EventHandler | JQuery.EventHandlerBase> | false | null | undefined): this; + handler_preventBubble: JQuery.EventHandler | false | null | undefined): this; /** * Attach a handler to an event for the elements. * @param events An object containing one or more DOM event types and functions to execute for them. @@ -1485,7 +1485,7 @@ $( "div.test" ).bind({ }); ``` */ - bind(events: JQuery.PlainObject | JQuery.EventHandlerBase> | false>): this; + bind(events: JQuery.PlainObject | false>): this; /** * Bind an event handler to the "blur" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. @@ -1499,7 +1499,7 @@ $( "div.test" ).bind({ * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ blur(eventData: TData, - handler: JQuery.EventHandler | JQuery.EventHandlerBase>): this; + handler: JQuery.EventHandler): this; /** * Bind an event handler to the "blur" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -1515,7 +1515,7 @@ $( "div.test" ).bind({ $( "p" ).blur(); ``` */ - blur(handler?: JQuery.EventHandler | JQuery.EventHandlerBase> | false): this; + blur(handler?: JQuery.EventHandler | false): this; /** * Bind an event handler to the "change" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. @@ -1529,7 +1529,7 @@ $( "p" ).blur(); * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ change(eventData: TData, - handler: JQuery.EventHandler | JQuery.EventHandlerBase>): this; + handler: JQuery.EventHandler): this; /** * Bind an event handler to the "change" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -1588,7 +1588,7 @@ $( "input[type='text']" ).change(function() { }); ``` */ - change(handler?: JQuery.EventHandler | JQuery.EventHandlerBase> | false): this; + change(handler?: JQuery.EventHandler | false): this; /** * Get the children of each element in the set of matched elements, optionally filtered by a selector. * @param selector A string containing a selector expression to match elements against. @@ -1841,7 +1841,7 @@ $( "#stop" ).click(function() { * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ click(eventData: TData, - handler: JQuery.EventHandler | JQuery.EventHandlerBase>): this; + handler: JQuery.EventHandler): this; /** * Bind an event handler to the "click" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -1891,7 +1891,7 @@ $( "p" ).click(function() { $( "p" ).click(); ``` */ - click(handler?: JQuery.EventHandler | JQuery.EventHandlerBase> | false): this; + click(handler?: JQuery.EventHandler | false): this; /** * Create a deep copy of the set of matched elements. * @param withDataAndEvents A Boolean indicating whether event handlers and data should be copied along with the elements. The @@ -2079,7 +2079,7 @@ $( "#frameDemo" ).contents().find( "a" ).css( "background-color", "#BADA55" ); * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ contextmenu(eventData: TData, - handler: JQuery.EventHandler | JQuery.EventHandlerBase>): this; + handler: JQuery.EventHandler): this; /** * Bind an event handler to the "contextmenu" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -2133,7 +2133,7 @@ div.contextmenu(function() { ``` */ - contextmenu(handler?: JQuery.EventHandler | JQuery.EventHandlerBase> | false): this; + contextmenu(handler?: JQuery.EventHandler | false): this; /** * Set one or more CSS properties for the set of matched elements. * @param propertyName A CSS property name. @@ -2594,7 +2594,7 @@ $( "button" ).click(function() { * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ dblclick(eventData: TData, - handler: JQuery.EventHandler | JQuery.EventHandlerBase>): this; + handler: JQuery.EventHandler): this; /** * Bind an event handler to the "dblclick" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -2648,7 +2648,7 @@ divdbl.dblclick(function() { ``` */ - dblclick(handler?: JQuery.EventHandler | JQuery.EventHandlerBase> | false): this; + dblclick(handler?: JQuery.EventHandler | false): this; /** * Set a timer to delay execution of subsequent items in the queue. * @param duration An integer indicating the number of milliseconds to delay execution of the next item in the queue. @@ -2716,7 +2716,7 @@ $( "button" ).click(function() { delegate(selector: JQuery.Selector, eventType: string, eventData: TData, - handler: JQuery.EventHandler | JQuery.EventHandlerBase>): this; + handler: JQuery.EventHandler): this; /** * Attach a handler to one or more events for all elements that match the selector, now or in the future, based on a specific set of root elements. * @param selector A selector to filter the elements that trigger the event. @@ -2830,7 +2830,7 @@ $( "button" ).click(function() { */ delegate(selector: JQuery.Selector, eventType: string, - handler: JQuery.EventHandler | JQuery.EventHandlerBase> | false): this; + handler: JQuery.EventHandler | false): this; /** * Attach a handler to one or more events for all elements that match the selector, now or in the future, based on a specific set of root elements. * @param selector A selector to filter the elements that trigger the event. @@ -2844,7 +2844,7 @@ $( "button" ).click(function() { * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. */ delegate(selector: JQuery.Selector, - events: JQuery.PlainObject | JQuery.EventHandlerBase> | false>): this; + events: JQuery.PlainObject | false>): this; /** * Execute the next function on the queue for the matched elements. * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. @@ -4264,7 +4264,7 @@ $( "p span" ).first().addClass( "highlight" ); * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ focus(eventData: TData, - handler: JQuery.EventHandler | JQuery.EventHandlerBase>): this; + handler: JQuery.EventHandler): this; /** * Bind an event handler to the "focus" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -4316,7 +4316,7 @@ $( document ).ready(function() { }); ``` */ - focus(handler?: JQuery.EventHandler | JQuery.EventHandlerBase> | false): this; + focus(handler?: JQuery.EventHandler | false): this; /** * Bind an event handler to the "focusin" event. * @param eventData An object containing data that will be passed to the event handler. @@ -4330,7 +4330,7 @@ $( document ).ready(function() { * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ focusin(eventData: TData, - handler: JQuery.EventHandler | JQuery.EventHandlerBase>): this; + handler: JQuery.EventHandler): this; /** * Bind an event handler to the "focusin" event. * @param handler A function to execute each time the event is triggered. @@ -4370,7 +4370,7 @@ $( "p" ).focusin(function() { ``` */ - focusin(handler?: JQuery.EventHandler | JQuery.EventHandlerBase> | false): this; + focusin(handler?: JQuery.EventHandler | false): this; /** * Bind an event handler to the "focusout" JavaScript event. * @param eventData An object containing data that will be passed to the event handler. @@ -4384,7 +4384,7 @@ $( "p" ).focusin(function() { * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ focusout(eventData: TData, - handler: JQuery.EventHandler | JQuery.EventHandlerBase>): this; + handler: JQuery.EventHandler): this; /** * Bind an event handler to the "focusout" JavaScript event. * @param handler A function to execute each time the event is triggered. @@ -4445,7 +4445,7 @@ $( "p" ) ``` */ - focusout(handler?: JQuery.EventHandler | JQuery.EventHandlerBase> | false): this; + focusout(handler?: JQuery.EventHandler | false): this; /** * Retrieve one of the elements matched by the jQuery object. * @param index A zero-based integer indicating which element to retrieve. @@ -5018,8 +5018,8 @@ $( "li" ) */ // HACK: The type parameter T is not used but ensures the 'event' callback parameter is typed correctly. // tslint:disable-next-line:no-unnecessary-generics - hover(handlerInOut: JQuery.EventHandler | JQuery.EventHandlerBase> | false, - handlerOut?: JQuery.EventHandler | JQuery.EventHandlerBase> | false): this; + hover(handlerInOut: JQuery.EventHandler | false, + handlerOut?: JQuery.EventHandler | false): this; /** * Set the HTML contents of each element in the set of matched elements. * @param htmlString_function _@param_ `htmlString_function` @@ -5833,7 +5833,7 @@ $( "li" ).click(function() { * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ keydown(eventData: TData, - handler: JQuery.EventHandler | JQuery.EventHandlerBase>): this; + handler: JQuery.EventHandler): this; /** * Bind an event handler to the "keydown" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -5905,7 +5905,7 @@ $( "#other" ).click(function() { ``` */ - keydown(handler?: JQuery.EventHandler | JQuery.EventHandlerBase> | false): this; + keydown(handler?: JQuery.EventHandler | false): this; /** * Bind an event handler to the "keypress" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. @@ -5919,7 +5919,7 @@ $( "#other" ).click(function() { * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ keypress(eventData: TData, - handler: JQuery.EventHandler | JQuery.EventHandlerBase>): this; + handler: JQuery.EventHandler): this; /** * Bind an event handler to the "keypress" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -5991,7 +5991,7 @@ $( "#other" ).click(function() { ``` */ - keypress(handler?: JQuery.EventHandler | JQuery.EventHandlerBase> | false): this; + keypress(handler?: JQuery.EventHandler | false): this; /** * Bind an event handler to the "keyup" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. @@ -6005,7 +6005,7 @@ $( "#other" ).click(function() { * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ keyup(eventData: TData, - handler: JQuery.EventHandler | JQuery.EventHandlerBase>): this; + handler: JQuery.EventHandler): this; /** * Bind an event handler to the "keyup" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -6078,7 +6078,7 @@ $( "#other").click(function() { ``` */ - keyup(handler?: JQuery.EventHandler | JQuery.EventHandlerBase> | false): this; + keyup(handler?: JQuery.EventHandler | false): this; /** * Reduce the set of matched elements to the final one in the set. * @see \`{@link https://api.jquery.com/last/ }\` @@ -6367,7 +6367,7 @@ $( "input" ).click(function() { * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ mousedown(eventData: TData, - handler: JQuery.EventHandler | JQuery.EventHandlerBase>): this; + handler: JQuery.EventHandler): this; /** * Bind an event handler to the "mousedown" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -6405,7 +6405,7 @@ $( "p" ) ``` */ - mousedown(handler?: JQuery.EventHandler | JQuery.EventHandlerBase> | false): this; + mousedown(handler?: JQuery.EventHandler | false): this; /** * Bind an event handler to be fired when the mouse enters an element, or trigger that handler on an element. * @param eventData An object containing data that will be passed to the event handler. @@ -6419,7 +6419,7 @@ $( "p" ) * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ mouseenter(eventData: TData, - handler: JQuery.EventHandler | JQuery.EventHandlerBase>): this; + handler: JQuery.EventHandler): this; /** * Bind an event handler to be fired when the mouse enters an element, or trigger that handler on an element. * @param handler A function to execute each time the event is triggered. @@ -6500,7 +6500,7 @@ $( "div.enterleave" ) ``` */ - mouseenter(handler?: JQuery.EventHandler | JQuery.EventHandlerBase> | false): this; + mouseenter(handler?: JQuery.EventHandler | false): this; /** * Bind an event handler to be fired when the mouse leaves an element, or trigger that handler on an element. * @param eventData An object containing data that will be passed to the event handler. @@ -6514,7 +6514,7 @@ $( "div.enterleave" ) * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ mouseleave(eventData: TData, - handler: JQuery.EventHandler | JQuery.EventHandlerBase>): this; + handler: JQuery.EventHandler): this; /** * Bind an event handler to be fired when the mouse leaves an element, or trigger that handler on an element. * @param handler A function to execute each time the event is triggered. @@ -6593,7 +6593,7 @@ $( "div.enterleave" ) ``` */ - mouseleave(handler?: JQuery.EventHandler | JQuery.EventHandlerBase> | false): this; + mouseleave(handler?: JQuery.EventHandler | false): this; /** * Bind an event handler to the "mousemove" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. @@ -6607,7 +6607,7 @@ $( "div.enterleave" ) * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ mousemove(eventData: TData, - handler: JQuery.EventHandler | JQuery.EventHandlerBase>): this; + handler: JQuery.EventHandler): this; /** * Bind an event handler to the "mousemove" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -6671,7 +6671,7 @@ $( "div" ).mousemove(function( event ) { ``` */ - mousemove(handler?: JQuery.EventHandler | JQuery.EventHandlerBase> | false): this; + mousemove(handler?: JQuery.EventHandler | false): this; /** * Bind an event handler to the "mouseout" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. @@ -6685,7 +6685,7 @@ $( "div" ).mousemove(function( event ) { * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ mouseout(eventData: TData, - handler: JQuery.EventHandler | JQuery.EventHandlerBase>): this; + handler: JQuery.EventHandler): this; /** * Bind an event handler to the "mouseout" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -6766,7 +6766,7 @@ $( "div.enterleave" ) ``` */ - mouseout(handler?: JQuery.EventHandler | JQuery.EventHandlerBase> | false): this; + mouseout(handler?: JQuery.EventHandler | false): this; /** * Bind an event handler to the "mouseover" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. @@ -6780,7 +6780,7 @@ $( "div.enterleave" ) * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ mouseover(eventData: TData, - handler: JQuery.EventHandler | JQuery.EventHandlerBase>): this; + handler: JQuery.EventHandler): this; /** * Bind an event handler to the "mouseover" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -6861,7 +6861,7 @@ $( "div.enterleave" ) ``` */ - mouseover(handler?: JQuery.EventHandler | JQuery.EventHandlerBase> | false): this; + mouseover(handler?: JQuery.EventHandler | false): this; /** * Bind an event handler to the "mouseup" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. @@ -6875,7 +6875,7 @@ $( "div.enterleave" ) * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ mouseup(eventData: TData, - handler: JQuery.EventHandler | JQuery.EventHandlerBase>): this; + handler: JQuery.EventHandler): this; /** * Bind an event handler to the "mouseup" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -6913,7 +6913,7 @@ $( "p" ) ``` */ - mouseup(handler?: JQuery.EventHandler | JQuery.EventHandlerBase> | false): this; + mouseup(handler?: JQuery.EventHandler | false): this; /** * Get the immediately following sibling of each element in the set of matched elements. If a selector is provided, it retrieves the next sibling only if it matches that selector. * @param selector A string containing a selector expression to match elements against. @@ -7471,7 +7471,7 @@ $( "*", document.body ).click(function( event ) { on(events: string, selector: JQuery.Selector | null, data: TData, - handler: JQuery.EventHandler | JQuery.EventHandlerBase>): this; + handler: JQuery.EventHandler): this; /** * Attach an event handler function for one or more events to the selected elements. * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". @@ -7549,7 +7549,7 @@ $( "body" ).on( "click", "a", function( event ) { */ on(events: string, selector: JQuery.Selector, - handler: JQuery.EventHandler | JQuery.EventHandlerBase> | false): this; + handler: JQuery.EventHandler | false): this; /** * Attach an event handler function for one or more events to the selected elements. * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". @@ -7631,7 +7631,7 @@ $( "p" ).on( "click", { foo: "bar" }, myHandler ); */ on(events: string, data: TData, - handler: JQuery.EventHandler | JQuery.EventHandlerBase>): this; + handler: JQuery.EventHandler): this; /** * Attach an event handler function for one or more events to the selected elements. * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". @@ -7744,7 +7744,7 @@ $( "#cart" ).on( "mouseenter mouseleave", function( event ) { ``` */ on(events: string, - handler: JQuery.EventHandler | JQuery.EventHandlerBase> | false): this; + handler: JQuery.EventHandler | false): this; /** * Attach an event handler function for one or more events to the selected elements. * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". @@ -7849,7 +7849,7 @@ $( "#cart" ).on( "mouseenter mouseleave", function( event ) { * @see \`{@link https://api.jquery.com/on/ }\` * @since 1.7 */ - on(events: JQuery.PlainObject | JQuery.EventHandlerBase> | false>, + on(events: JQuery.PlainObject | false>, selector: JQuery.Selector | null, data: TData): this; /** @@ -7861,7 +7861,7 @@ $( "#cart" ).on( "mouseenter mouseleave", function( event ) { * @see \`{@link https://api.jquery.com/on/ }\` * @since 1.7 */ - on(events: JQuery.PlainObject | JQuery.EventHandlerBase> | false>, + on(events: JQuery.PlainObject | false>, // tslint:disable-next-line:unified-signatures selector: JQuery.Selector): this; /** @@ -7872,7 +7872,7 @@ $( "#cart" ).on( "mouseenter mouseleave", function( event ) { * @see \`{@link https://api.jquery.com/on/ }\` * @since 1.7 */ - on(events: JQuery.PlainObject | JQuery.EventHandlerBase> | false>, + on(events: JQuery.PlainObject | false>, data: TData): this; /** * Attach an event handler function for one or more events to the selected elements. @@ -7922,7 +7922,7 @@ $( "div.test" ).on({ ``` */ - on(events: JQuery.PlainObject | JQuery.EventHandlerBase> | false>): this; + on(events: JQuery.PlainObject | false>): this; /** * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". @@ -7936,7 +7936,7 @@ $( "div.test" ).on({ one(events: string, selector: JQuery.Selector | null, data: TData, - handler: JQuery.EventHandler | JQuery.EventHandlerBase>): this; + handler: JQuery.EventHandler): this; /** * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". @@ -7949,7 +7949,7 @@ $( "div.test" ).on({ */ one(events: string, selector: JQuery.Selector, - handler: JQuery.EventHandler | JQuery.EventHandlerBase> | false): this; + handler: JQuery.EventHandler | false): this; /** * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". @@ -7960,7 +7960,7 @@ $( "div.test" ).on({ */ one(events: string, data: TData, - handler: JQuery.EventHandler | JQuery.EventHandlerBase>): this; + handler: JQuery.EventHandler): this; /** * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". @@ -8050,7 +8050,7 @@ $(".target").one("click mouseenter", function() { ``` */ one(events: string, - handler: JQuery.EventHandler | JQuery.EventHandlerBase> | false): this; + handler: JQuery.EventHandler | false): this; /** * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. * @param events An object in which the string keys represent one or more space-separated event types and optional @@ -8061,7 +8061,7 @@ $(".target").one("click mouseenter", function() { * @see \`{@link https://api.jquery.com/one/ }\` * @since 1.7 */ - one(events: JQuery.PlainObject | JQuery.EventHandlerBase> | false>, + one(events: JQuery.PlainObject | false>, selector: JQuery.Selector | null, data: TData): this; /** @@ -8073,7 +8073,7 @@ $(".target").one("click mouseenter", function() { * @see \`{@link https://api.jquery.com/one/ }\` * @since 1.7 */ - one(events: JQuery.PlainObject | JQuery.EventHandlerBase> | false>, + one(events: JQuery.PlainObject | false>, // tslint:disable-next-line:unified-signatures selector: JQuery.Selector): this; /** @@ -8084,7 +8084,7 @@ $(".target").one("click mouseenter", function() { * @see \`{@link https://api.jquery.com/one/ }\` * @since 1.7 */ - one(events: JQuery.PlainObject | JQuery.EventHandlerBase> | false>, + one(events: JQuery.PlainObject | false>, data: TData): this; /** * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. @@ -8093,7 +8093,7 @@ $(".target").one("click mouseenter", function() { * @see \`{@link https://api.jquery.com/one/ }\` * @since 1.7 */ - one(events: JQuery.PlainObject | JQuery.EventHandlerBase> | false>): this; + one(events: JQuery.PlainObject | false>): this; /** * Set the CSS outer height of each element in the set of matched elements. * @param value_function _@param_ `value_function` @@ -9851,7 +9851,7 @@ $( "button" ).on( "click", function() { * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ resize(eventData: TData, - handler: JQuery.EventHandler | JQuery.EventHandlerBase>): this; + handler: JQuery.EventHandler): this; /** * Bind an event handler to the "resize" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -9869,7 +9869,7 @@ $( window ).resize(function() { }); ``` */ - resize(handler?: JQuery.EventHandler | JQuery.EventHandlerBase> | false): this; + resize(handler?: JQuery.EventHandler | false): this; /** * Bind an event handler to the "scroll" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. @@ -9883,7 +9883,7 @@ $( window ).resize(function() { * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ scroll(eventData: TData, - handler: JQuery.EventHandler | JQuery.EventHandlerBase>): this; + handler: JQuery.EventHandler): this; /** * Bind an event handler to the "scroll" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -9933,7 +9933,7 @@ $( window ).scroll(function() { ``` */ - scroll(handler?: JQuery.EventHandler | JQuery.EventHandlerBase> | false): this; + scroll(handler?: JQuery.EventHandler | false): this; /** * Set the current horizontal position of the scroll bar for each of the set of matched elements. * @param value An integer indicating the new position to set the scroll bar to. @@ -10107,7 +10107,7 @@ $( "p:last" ).text( "scrollTop:" + p.scrollTop() ); * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ select(eventData: TData, - handler: JQuery.EventHandler | JQuery.EventHandlerBase>): this; + handler: JQuery.EventHandler): this; /** * Bind an event handler to the "select" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -10156,7 +10156,7 @@ $( ":input" ).select(function() { $( "input" ).select(); ``` */ - select(handler?: JQuery.EventHandler | JQuery.EventHandlerBase> | false): this; + select(handler?: JQuery.EventHandler | false): this; /** * Encode a set of form elements as a string for submission. * @see \`{@link https://api.jquery.com/serialize/ }\` @@ -11127,7 +11127,7 @@ $( "#toggle" ).on( "click", function() { * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ submit(eventData: TData, - handler: JQuery.EventHandler | JQuery.EventHandlerBase>): this; + handler: JQuery.EventHandler): this; /** * Bind an event handler to the "submit" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -11196,7 +11196,7 @@ $( "form" ).submit(function() { $( "form:first" ).submit(); ``` */ - submit(handler?: JQuery.EventHandler | JQuery.EventHandlerBase> | false): this; + submit(handler?: JQuery.EventHandler | false): this; /** * Set the content of each element in the set of matched elements to the specified text. * @param text_function _@param_ `text_function` diff --git a/types/jquery/jquery-tests.ts b/types/jquery/jquery-tests.ts index eba206f323..4f848cc7bb 100644 --- a/types/jquery/jquery-tests.ts +++ b/types/jquery/jquery-tests.ts @@ -3883,8 +3883,6 @@ function JQuery() { function events() { // [bind() overloads] https://github.com/jquery/api.jquery.com/issues/1048 function bind() { - interface J1 { kind: 'J1'; } - // $ExpectType JQuery $('p').bind('myEvent', 'myData', function(event) { // $ExpectType HTMLElement @@ -3893,14 +3891,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').bind('myEvent', 'myData', function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').bind('myEvent', function(event) { // $ExpectType HTMLElement @@ -3909,14 +3899,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').bind('myEvent', function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').bind('myEvent', false); @@ -3928,12 +3910,6 @@ function JQuery() { this; // $ExpectType Event event; - }, - myEvent3(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; } }); @@ -3945,8 +3921,6 @@ function JQuery() { } function delegate() { - interface J1 { kind: 'J1'; } - // $ExpectType JQuery $('table').delegate('td', 'myEvent', 'myData', function(event) { // $ExpectType HTMLElement @@ -3955,14 +3929,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('table').delegate('td', 'myEvent', 'myData', function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('table').delegate('td', 'myEvent', function(event) { // $ExpectType HTMLElement @@ -3971,14 +3937,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('table').delegate('td', 'myEvent', function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('table').delegate('td', 'myEvent', false); @@ -3990,38 +3948,20 @@ function JQuery() { // $ExpectType Event event; }, - myEvent2: false, - myEvent3(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - } + myEvent2: false }); } function off() { - function defaultContext_defaultData(this: HTMLElement, event: JQuery.Event) { } + function defaultData(this: HTMLElement, event: JQuery.Event) { } - function defaultContext_customData(this: HTMLElement, event: JQuery.Event) { } - - function customContext_defaultData(this: J1, event: JQuery.Event) { } - - function customContext_customData(this: J1, event: JQuery.Event) { } - - interface J1 { kind: 'J1'; } + function customData(this: HTMLElement, event: JQuery.Event) { } // $ExpectType JQuery - $('table').off('myEvent', 'td', defaultContext_defaultData); + $('table').off('myEvent', 'td', defaultData); // $ExpectType JQuery - $('table').off('myEvent', 'td', defaultContext_customData); - - // $ExpectType JQuery - $('table').off('myEvent', 'td', customContext_defaultData); - - // $ExpectType JQuery - $('table').off('myEvent', 'td', customContext_customData); + $('table').off('myEvent', 'td', customData); // $ExpectType JQuery $('table').off('myEvent', 'td', false); @@ -4030,16 +3970,10 @@ function JQuery() { $('table').off('myEvent', 'td'); // $ExpectType JQuery - $('table').off('myEvent', defaultContext_defaultData); + $('table').off('myEvent', defaultData); // $ExpectType JQuery - $('table').off('myEvent', defaultContext_customData); - - // $ExpectType JQuery - $('table').off('myEvent', customContext_defaultData); - - // $ExpectType JQuery - $('table').off('myEvent', customContext_customData); + $('table').off('myEvent', customData); // $ExpectType JQuery $('table').off('myEvent', false); @@ -4050,19 +3984,15 @@ function JQuery() { // $ExpectType JQuery $('table').off({ myEvent1: false, - defaultContext_defaultData, - defaultContext_customData, - customContext_defaultData, - customContext_customData + defaultData, + customData }, 'td'); // $ExpectType JQuery $('table').off({ myEvent1: false, - defaultContext_defaultData, - defaultContext_customData, - customContext_defaultData, - customContext_customData + defaultData, + customData }); // $ExpectType JQuery @@ -4073,8 +4003,6 @@ function JQuery() { } function on() { - interface J1 { kind: 'J1'; } - // $ExpectType JQuery $('table').on('myEvent', 'td', 'myData', function(event) { // $ExpectType HTMLElement @@ -4091,14 +4019,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('table').on('myEvent', 'td', 'myData', function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('table').on('myEvent', null, 'myData', function(event) { // $ExpectType HTMLElement @@ -4115,14 +4035,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('table').on('myEvent', null, 'myData', function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('table').on('myEvent', 'td', function(event) { // $ExpectType HTMLElement @@ -4139,14 +4051,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('table').on('myEvent', 'td', function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('table').on('myEvent', 'td', false); @@ -4166,14 +4070,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('table').on('myEvent', 3, function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('table').on('myEvent', function(event) { // $ExpectType HTMLElement @@ -4214,14 +4110,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('table').on('myEvent', function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('table').on('myEvent', false); @@ -4233,12 +4121,6 @@ function JQuery() { this; // $ExpectType Event event; - }, - myEvent3(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; } }, 'td', 'myData'); @@ -4250,12 +4132,6 @@ function JQuery() { this; // $ExpectType Event event; - }, - myEvent3(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; } }, null, 'myData'); @@ -4267,12 +4143,6 @@ function JQuery() { this; // $ExpectType Event event; - }, - myEvent3(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; } }, 'td'); @@ -4284,12 +4154,6 @@ function JQuery() { this; // $ExpectType Event event; - }, - myEvent3(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; } }, 3); @@ -4301,19 +4165,11 @@ function JQuery() { this; // $ExpectType Event event; - }, - myEvent3(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; } }); } function one() { - interface J1 { kind: 'J1'; } - // $ExpectType JQuery $('table').one('myEvent', 'td', 'myData', function(event) { // $ExpectType HTMLElement @@ -4322,14 +4178,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('table').one('myEvent', 'td', 'myData', function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('table').one('myEvent', null, 'myData', function(event) { // $ExpectType HTMLElement @@ -4338,14 +4186,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('table').one('myEvent', null, 'myData', function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('table').one('myEvent', 'td', function(event) { // $ExpectType HTMLElement @@ -4354,14 +4194,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('table').one('myEvent', 'td', function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('table').one('myEvent', 'td', false); @@ -4373,14 +4205,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('table').one('myEvent', 3, function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('table').one('myEvent', function(event) { // $ExpectType HTMLElement @@ -4389,14 +4213,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('table').one('myEvent', function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('table').one('myEvent', false); @@ -4408,12 +4224,6 @@ function JQuery() { this; // $ExpectType Event event; - }, - myEvent3(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; } }, 'td', 'myData'); @@ -4425,12 +4235,6 @@ function JQuery() { this; // $ExpectType Event event; - }, - myEvent3(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; } }, null, 'myData'); @@ -4442,12 +4246,6 @@ function JQuery() { this; // $ExpectType Event event; - }, - myEvent3(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; } }, 'td'); @@ -4459,12 +4257,6 @@ function JQuery() { this; // $ExpectType Event event; - }, - myEvent3(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; } }, 3); @@ -4476,12 +4268,6 @@ function JQuery() { this; // $ExpectType Event event; - }, - myEvent3(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; } }); } @@ -4551,27 +4337,15 @@ function JQuery() { } function unbind() { - function defaultContext_defaultData(this: HTMLElement, event: JQuery.Event) { } + function defaultData(this: HTMLElement, event: JQuery.Event) { } - function defaultContext_customData(this: HTMLElement, event: JQuery.Event) { } - - function customContext_defaultData(this: J1, event: JQuery.Event) { } - - function customContext_customData(this: J1, event: JQuery.Event) { } - - interface J1 { kind: 'J1'; } + function customData(this: HTMLElement, event: JQuery.Event) { } // $ExpectType JQuery - $('p').unbind('myEvent', defaultContext_defaultData); + $('p').unbind('myEvent', defaultData); // $ExpectType JQuery - $('p').unbind('myEvent', defaultContext_customData); - - // $ExpectType JQuery - $('p').unbind('myEvent', customContext_defaultData); - - // $ExpectType JQuery - $('p').unbind('myEvent', customContext_customData); + $('p').unbind('myEvent', customData); // $ExpectType JQuery $('p').unbind('myEvent', false); @@ -4587,27 +4361,15 @@ function JQuery() { } function undelegate() { - function defaultContext_defaultData(this: HTMLElement, event: JQuery.Event) { } + function defaultData(this: HTMLElement, event: JQuery.Event) { } - function defaultContext_customData(this: HTMLElement, event: JQuery.Event) { } - - function customContext_defaultData(this: J1, event: JQuery.Event) { } - - function customContext_customData(this: J1, event: JQuery.Event) { } - - interface J1 { kind: 'J1'; } + function customData(this: HTMLElement, event: JQuery.Event) { } // $ExpectType JQuery - $('table').undelegate('td', 'click', defaultContext_defaultData); + $('table').undelegate('td', 'click', defaultData); // $ExpectType JQuery - $('table').undelegate('td', 'click', defaultContext_customData); - - // $ExpectType JQuery - $('table').undelegate('td', 'click', customContext_defaultData); - - // $ExpectType JQuery - $('table').undelegate('td', 'click', customContext_customData); + $('table').undelegate('td', 'click', customData); // $ExpectType JQuery $('table').undelegate('td', 'click', false); @@ -4618,10 +4380,8 @@ function JQuery() { // $ExpectType JQuery $('table').undelegate('td', { myEvent1: false, - defaultContext_defaultData, - defaultContext_customData, - customContext_defaultData, - customContext_customData + defaultData, + customData }); // $ExpectType JQuery @@ -4632,8 +4392,6 @@ function JQuery() { } function blur() { - interface J1 { kind: 'J1'; } - // $ExpectType JQuery $('p').blur('myData', function(event) { // $ExpectType HTMLElement @@ -4642,14 +4400,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').blur('myData', function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').blur(function(event) { // $ExpectType HTMLElement @@ -4658,14 +4408,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').blur(function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').blur(false); @@ -4674,8 +4416,6 @@ function JQuery() { } function change() { - interface J1 { kind: 'J1'; } - // $ExpectType JQuery $('p').change('myData', function(event) { // $ExpectType HTMLElement @@ -4684,14 +4424,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').change('myData', function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').change(function(event) { // $ExpectType HTMLElement @@ -4700,14 +4432,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').change(function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').change(false); @@ -4716,8 +4440,6 @@ function JQuery() { } function click() { - interface J1 { kind: 'J1'; } - // $ExpectType JQuery $('p').click('myData', function(event) { // $ExpectType HTMLElement @@ -4726,14 +4448,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').click('myData', function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').click(function(event) { // $ExpectType HTMLElement @@ -4742,14 +4456,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').click(function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').click(false); @@ -4758,8 +4464,6 @@ function JQuery() { } function contextmenu() { - interface J1 { kind: 'J1'; } - // $ExpectType JQuery $('p').contextmenu('myData', function(event) { // $ExpectType HTMLElement @@ -4768,14 +4472,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').contextmenu('myData', function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').contextmenu(function(event) { // $ExpectType HTMLElement @@ -4784,14 +4480,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').contextmenu(function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').contextmenu(false); @@ -4800,8 +4488,6 @@ function JQuery() { } function dblclick() { - interface J1 { kind: 'J1'; } - // $ExpectType JQuery $('p').dblclick('myData', function(event) { // $ExpectType HTMLElement @@ -4810,14 +4496,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').dblclick('myData', function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').dblclick(function(event) { // $ExpectType HTMLElement @@ -4826,14 +4504,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').dblclick(function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').dblclick(false); @@ -4842,8 +4512,6 @@ function JQuery() { } function focus() { - interface J1 { kind: 'J1'; } - // $ExpectType JQuery $('p').focus('myData', function(event) { // $ExpectType HTMLElement @@ -4852,14 +4520,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').focus('myData', function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').focus(function(event) { // $ExpectType HTMLElement @@ -4868,14 +4528,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').focus(function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').focus(false); @@ -4884,8 +4536,6 @@ function JQuery() { } function focusin() { - interface J1 { kind: 'J1'; } - // $ExpectType JQuery $('p').focusin('myData', function(event) { // $ExpectType HTMLElement @@ -4894,14 +4544,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').focusin('myData', function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').focusin(function(event) { // $ExpectType HTMLElement @@ -4910,14 +4552,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').focusin(function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').focusin(false); @@ -4926,8 +4560,6 @@ function JQuery() { } function focusout() { - interface J1 { kind: 'J1'; } - // $ExpectType JQuery $('p').focusout('myData', function(event) { // $ExpectType HTMLElement @@ -4936,14 +4568,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').focusout('myData', function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').focusout(function(event) { // $ExpectType HTMLElement @@ -4952,14 +4576,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').focusout(function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').focusout(false); @@ -4968,8 +4584,6 @@ function JQuery() { } function keydown() { - interface J1 { kind: 'J1'; } - // $ExpectType JQuery $('p').keydown('myData', function(event) { // $ExpectType HTMLElement @@ -4978,14 +4592,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').keydown('myData', function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').keydown(function(event) { // $ExpectType HTMLElement @@ -4994,14 +4600,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').keydown(function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').keydown(false); @@ -5010,8 +4608,6 @@ function JQuery() { } function keypress() { - interface J1 { kind: 'J1'; } - // $ExpectType JQuery $('p').keypress('myData', function(event) { // $ExpectType HTMLElement @@ -5020,14 +4616,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').keypress('myData', function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').keypress(function(event) { // $ExpectType HTMLElement @@ -5036,14 +4624,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').keypress(function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').keypress(false); @@ -5052,8 +4632,6 @@ function JQuery() { } function keyup() { - interface J1 { kind: 'J1'; } - // $ExpectType JQuery $('p').keyup('myData', function(event) { // $ExpectType HTMLElement @@ -5062,14 +4640,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').keyup('myData', function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').keyup(function(event) { // $ExpectType HTMLElement @@ -5078,14 +4648,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').keyup(function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').keyup(false); @@ -5094,8 +4656,6 @@ function JQuery() { } function mousedown() { - interface J1 { kind: 'J1'; } - // $ExpectType JQuery $('p').mousedown('myData', function(event) { // $ExpectType HTMLElement @@ -5104,14 +4664,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').mousedown('myData', function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').mousedown(function(event) { // $ExpectType HTMLElement @@ -5120,14 +4672,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').mousedown(function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').mousedown(false); @@ -5136,8 +4680,6 @@ function JQuery() { } function mouseenter() { - interface J1 { kind: 'J1'; } - // $ExpectType JQuery $('p').mouseenter('myData', function(event) { // $ExpectType HTMLElement @@ -5146,14 +4688,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').mouseenter('myData', function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').mouseenter(function(event) { // $ExpectType HTMLElement @@ -5162,14 +4696,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').mouseenter(function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').mouseenter(false); @@ -5178,8 +4704,6 @@ function JQuery() { } function mouseleave() { - interface J1 { kind: 'J1'; } - // $ExpectType JQuery $('p').mouseleave('myData', function(event) { // $ExpectType HTMLElement @@ -5188,14 +4712,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').mouseleave('myData', function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').mouseleave(function(event) { // $ExpectType HTMLElement @@ -5204,14 +4720,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').mouseleave(function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').mouseleave(false); @@ -5220,8 +4728,6 @@ function JQuery() { } function mousemove() { - interface J1 { kind: 'J1'; } - // $ExpectType JQuery $('p').mousemove('myData', function(event) { // $ExpectType HTMLElement @@ -5230,14 +4736,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').mousemove('myData', function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').mousemove(function(event) { // $ExpectType HTMLElement @@ -5246,14 +4744,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').mousemove(function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').mousemove(false); @@ -5262,8 +4752,6 @@ function JQuery() { } function mouseout() { - interface J1 { kind: 'J1'; } - // $ExpectType JQuery $('p').mouseout('myData', function(event) { // $ExpectType HTMLElement @@ -5272,14 +4760,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').mouseout('myData', function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').mouseout(function(event) { // $ExpectType HTMLElement @@ -5288,14 +4768,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').mouseout(function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').mouseout(false); @@ -5304,8 +4776,6 @@ function JQuery() { } function mouseover() { - interface J1 { kind: 'J1'; } - // $ExpectType JQuery $('p').mouseover('myData', function(event) { // $ExpectType HTMLElement @@ -5314,14 +4784,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').mouseover('myData', function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').mouseover(function(event) { // $ExpectType HTMLElement @@ -5330,14 +4792,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').mouseover(function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').mouseover(false); @@ -5346,8 +4800,6 @@ function JQuery() { } function mouseup() { - interface J1 { kind: 'J1'; } - // $ExpectType JQuery $('p').mouseup('myData', function(event) { // $ExpectType HTMLElement @@ -5356,14 +4808,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').mouseup('myData', function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').mouseup(function(event) { // $ExpectType HTMLElement @@ -5372,14 +4816,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').mouseup(function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').mouseup(false); @@ -5388,8 +4824,6 @@ function JQuery() { } function resize() { - interface J1 { kind: 'J1'; } - // $ExpectType JQuery $('p').resize('myData', function(event) { // $ExpectType HTMLElement @@ -5398,14 +4832,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').resize('myData', function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').resize(function(event) { // $ExpectType HTMLElement @@ -5414,14 +4840,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').resize(function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').resize(false); @@ -5430,8 +4848,6 @@ function JQuery() { } function scroll() { - interface J1 { kind: 'J1'; } - // $ExpectType JQuery $('p').scroll('myData', function(event) { // $ExpectType HTMLElement @@ -5440,14 +4856,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').scroll('myData', function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').scroll(function(event) { // $ExpectType HTMLElement @@ -5456,14 +4864,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').scroll(function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').scroll(false); @@ -5472,8 +4872,6 @@ function JQuery() { } function select() { - interface J1 { kind: 'J1'; } - // $ExpectType JQuery $('p').select('myData', function(event) { // $ExpectType HTMLElement @@ -5482,14 +4880,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').select('myData', function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').select(function(event) { // $ExpectType HTMLElement @@ -5498,14 +4888,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').select(function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').select(false); @@ -5514,8 +4896,6 @@ function JQuery() { } function submit() { - interface J1 { kind: 'J1'; } - // $ExpectType JQuery $('p').submit('myData', function(event) { // $ExpectType HTMLElement @@ -5524,14 +4904,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').submit('myData', function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').submit(function(event) { // $ExpectType HTMLElement @@ -5540,14 +4912,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').submit(function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').submit(false); @@ -5556,9 +4920,6 @@ function JQuery() { } function hover() { - interface J1 { kind: 'J1'; } - interface J2 { kind: 'J2'; } - // $ExpectType JQuery $('p').hover(function(event) { // $ExpectType HTMLElement @@ -5572,59 +4933,12 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').hover(function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }, function(event) { - // $ExpectType HTMLElement - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').hover(function(event) { // $ExpectType HTMLElement this; // $ExpectType Event event; - }, function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - - // $ExpectType JQuery - $('p').hover(function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }, function(this: J2, event) { - // $ExpectType J2 - this; - // $ExpectType Event - event; - }); - - // $ExpectType JQuery - $('p').hover(function(event) { - // $ExpectType HTMLElement - this; - // $ExpectType Event - event; - }, false); - - // $ExpectType JQuery - $('p').hover(function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; }, false); // $ExpectType JQuery @@ -5635,14 +4949,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').hover(false, function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').hover(false, false); @@ -5654,14 +4960,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').hover(function(this: J1, event) { - // $ExpectType J1 - this; - // $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').hover(false); } From f13af8beb0b54f71d8a070c99fdf76cf5601433b Mon Sep 17 00:00:00 2001 From: Leonard Thieu Date: Wed, 24 Oct 2018 08:38:23 -0400 Subject: [PATCH 077/608] [jquery] Improve declaration of Events API. * Introduced the concept of a triggered event. A triggered event is a jQuery event that has been triggered (either manually by `.trigger()` or `.triggerHandler()`, or automatically by the user agent). Many properties on an event are not set until it has been triggered. Triggered events are now represented by `JQuery.TriggeredEvent`. `JQuery.Event` represents the object returned from the `jQuery.Event` constructor and serves as the base type for all jQuery events. * Added a type parameter for `currentTarget` (`TCurrentTarget`). Previously, `currentTarget` was set to the type of `delegateTarget`. This was only correct for events received from directly bound event handlers. This allows delegate bound event handlers to specify the correct type of `currentTarget`. * Added a type parameter for `target` (`TTarget`). Previously, `target` was set to the type of `delegateTarget`. This was not always correct. For delegate bound event handlers, `target` can be `delegateTarget` or any of its descendents. The exact type of `target` cannot be known until run time, so consumers should use a type assertion. * Changed methods that bind event handlers to more accurately reflect the event object received through the callback. Both direct and delegate binding are now properly handled. This also includes a framework for providing more specific events for known event types. --- types/jquery/JQuery.d.ts | 338 +++++++++++----- types/jquery/jquery-tests.ts | 221 +++++++---- types/jquery/misc.d.ts | 588 ++++++++++++++++------------ types/jquery/test/example-tests.ts | 18 +- types/jquery/test/learn-tests.ts | 2 +- types/jquery/test/longdesc-tests.ts | 4 +- 6 files changed, 716 insertions(+), 455 deletions(-) diff --git a/types/jquery/JQuery.d.ts b/types/jquery/JQuery.d.ts index 70cfaa0e03..f9a06328e7 100644 --- a/types/jquery/JQuery.d.ts +++ b/types/jquery/JQuery.d.ts @@ -530,7 +530,10 @@ $( document ).ajaxComplete(function( event, request, settings ) { }); ``` */ - ajaxComplete(handler: (this: Document, event: JQuery.Event, jqXHR: JQuery.jqXHR, ajaxOptions: JQuery.AjaxSettings) => void | false): this; + ajaxComplete(handler: (this: Document, + event: JQuery.TriggeredEvent, + jqXHR: JQuery.jqXHR, + ajaxOptions: JQuery.AjaxSettings) => void | false): this; /** * Register a handler to be called when Ajax requests complete with an error. This is an Ajax Event. * @param handler The function to be invoked. @@ -543,7 +546,11 @@ $( document ).ajaxError(function( event, request, settings ) { }); ``` */ - ajaxError(handler: (this: Document, event: JQuery.Event, jqXHR: JQuery.jqXHR, ajaxSettings: JQuery.AjaxSettings, thrownError: string) => void | false): this; + ajaxError(handler: (this: Document, + event: JQuery.TriggeredEvent, + jqXHR: JQuery.jqXHR, + ajaxSettings: JQuery.AjaxSettings, + thrownError: string) => void | false): this; /** * Attach a function to be executed before an Ajax request is sent. This is an Ajax Event. * @param handler The function to be invoked. @@ -556,7 +563,10 @@ $( document ).ajaxSend(function( event, request, settings ) { }); ``` */ - ajaxSend(handler: (this: Document, event: JQuery.Event, jqXHR: JQuery.jqXHR, ajaxOptions: JQuery.AjaxSettings) => void | false): this; + ajaxSend(handler: (this: Document, + event: JQuery.TriggeredEvent, + jqXHR: JQuery.jqXHR, + ajaxOptions: JQuery.AjaxSettings) => void | false): this; /** * Register a handler to be called when the first Ajax request begins. This is an Ajax Event. * @param handler The function to be invoked. @@ -595,7 +605,11 @@ $( document ).ajaxSuccess(function( event, request, settings ) { }); ``` */ - ajaxSuccess(handler: (this: Document, event: JQuery.Event, jqXHR: JQuery.jqXHR, ajaxOptions: JQuery.AjaxSettings, data: JQuery.PlainObject) => void | false): this; + ajaxSuccess(handler: (this: Document, + event: JQuery.TriggeredEvent, + jqXHR: JQuery.jqXHR, + ajaxOptions: JQuery.AjaxSettings, + data: JQuery.PlainObject) => void | false): this; /** * Perform a custom animation of a set of CSS properties. * @param properties An object of CSS properties and values that the animation will move toward. @@ -1329,9 +1343,12 @@ $( "p" ).before( $( "b" ) ); * * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. */ - bind(eventType: string, - eventData: TData, - handler: JQuery.EventHandler): this; + bind( + eventType: TType, + eventData: TData, + handler: JQuery.TypeEventHandler + ): this; /** * Attach a handler to an event for the elements. * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names. @@ -1458,8 +1475,13 @@ $( "button" ).click(function() { ``` */ - bind(eventType: string, - handler_preventBubble: JQuery.EventHandler | false | null | undefined): this; + bind( + eventType: TType, + handler_preventBubble: JQuery.TypeEventHandler | + false | + null | + undefined + ): this; /** * Attach a handler to an event for the elements. * @param events An object containing one or more DOM event types and functions to execute for them. @@ -1485,7 +1507,7 @@ $( "div.test" ).bind({ }); ``` */ - bind(events: JQuery.PlainObject | false>): this; + bind(events: JQuery.TypeEventHandlers): this; /** * Bind an event handler to the "blur" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. @@ -2713,10 +2735,13 @@ $( "button" ).click(function() { * * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. */ - delegate(selector: JQuery.Selector, - eventType: string, - eventData: TData, - handler: JQuery.EventHandler): this; + delegate( + selector: JQuery.Selector, + eventType: TType, + eventData: TData, + handler: JQuery.TypeEventHandler + ): this; /** * Attach a handler to one or more events for all elements that match the selector, now or in the future, based on a specific set of root elements. * @param selector A selector to filter the elements that trigger the event. @@ -2828,9 +2853,12 @@ $( "button" ).click(function() { ``` */ - delegate(selector: JQuery.Selector, - eventType: string, - handler: JQuery.EventHandler | false): this; + delegate( + selector: JQuery.Selector, + eventType: TType, + handler: JQuery.TypeEventHandler | + false + ): this; /** * Attach a handler to one or more events for all elements that match the selector, now or in the future, based on a specific set of root elements. * @param selector A selector to filter the elements that trigger the event. @@ -2844,7 +2872,8 @@ $( "button" ).click(function() { * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. */ delegate(selector: JQuery.Selector, - events: JQuery.PlainObject | false>): this; + events: JQuery.TypeEventHandlers + ): this; /** * Execute the next function on the queue for the matched elements. * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. @@ -7245,7 +7274,10 @@ $( "body" ).on( "click", "p", foo ); $( "body" ).off( "click", "p", foo ); ``` */ - off(events: string, selector: JQuery.Selector, handler: JQuery.EventHandlerBase> | false): this; + off(events: string, + selector: JQuery.Selector, + handler: JQuery.TypeEventHandler | + false): this; /** * Remove an event handler. * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as @@ -7275,7 +7307,10 @@ $( "form" ).on( "keypress.validator", "input[type='text']", validate ); $( "form" ).off( ".validator" ); ``` */ - off(events: string, selector_handler?: JQuery.Selector | JQuery.EventHandlerBase> | false): this; + off(events: string, + selector_handler?: JQuery.Selector | + JQuery.TypeEventHandler | + false): this; /** * Remove an event handler. * @param events An object where the string keys represent one or more space-separated event types and optional @@ -7284,7 +7319,8 @@ $( "form" ).off( ".validator" ); * @see \`{@link https://api.jquery.com/off/ }\` * @since 1.7 */ - off(events: JQuery.PlainObject> | false>, selector?: JQuery.Selector): this; + off(events: JQuery.TypeEventHandlers, + selector?: JQuery.Selector): this; /** * Remove an event handler. * @param event A jQuery.Event object. @@ -7295,7 +7331,7 @@ $( "form" ).off( ".validator" ); $( "p" ).off(); ``` */ - off(event?: JQuery.Event): this; + off(event?: JQuery.TriggeredEvent): this; /** * Set the current coordinates of every element in the set of matched elements, relative to the document. * @param coordinates_function _@param_ `coordinates_function` @@ -7468,10 +7504,30 @@ $( "*", document.body ).click(function( event ) { * @see \`{@link https://api.jquery.com/on/ }\` * @since 1.7 */ - on(events: string, - selector: JQuery.Selector | null, - data: TData, - handler: JQuery.EventHandler): this; + on( + events: TType, + selector: JQuery.Selector, + data: TData, + handler: JQuery.TypeEventHandler + ): this; + /** + * Attach an event handler function for one or more events to the selected elements. + * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". + * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the + * selector is null or omitted, the event is always triggered when it reaches the selected element. + * @param data Data to be passed to the handler in event.data when an event is triggered. + * @param handler A function to execute when the event is triggered. + * @see \`{@link https://api.jquery.com/on/ }\` + * @since 1.7 + */ + on( + events: TType, + selector: null | undefined, + data: TData, + handler: JQuery.TypeEventHandler + ): this; /** * Attach an event handler function for one or more events to the selected elements. * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". @@ -7484,7 +7540,7 @@ $( "*", document.body ).click(function( event ) { * @deprecated ​ Deprecated. Use \`{@link JQuery.Event }\` in place of \`{@link JQueryEventObject }\`. */ on(events: string, - selector: JQuery.Selector | null, + selector: JQuery.Selector | null | undefined, data: any, handler: ((event: JQueryEventObject) => void)): this; /** @@ -7547,14 +7603,41 @@ $( "body" ).on( "click", "a", function( event ) { }); ``` */ - on(events: string, - selector: JQuery.Selector, - handler: JQuery.EventHandler | false): this; + on( + events: TType, + selector: JQuery.Selector, + handler: JQuery.TypeEventHandler | + false + ): this; /** * Attach an event handler function for one or more events to the selected elements. * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". - * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the - * selector is null or omitted, the event is always triggered when it reaches the selected element. + * @param data Data to be passed to the handler in event.data when an event is triggered. + * @param handler A function to execute when the event is triggered. + * @see \`{@link https://api.jquery.com/on/ }\` + * @since 1.7 + * @example ​ ````Pass data to the event handler, which is specified here by name: +```javascript +function myHandler( event ) { + alert( event.data.foo ); +} +$( "p" ).on( "click", { foo: "bar" }, myHandler ); +``` + */ + on( + events: TType, + data: TData, + handler: JQuery.TypeEventHandler + ): this; + /** + * Attach an event handler function for one or more events to the selected elements. + * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". + * @param selector_data _@param_ `selector_data` + *
+ * * `selector` — A selector string to filter the descendants of the selected elements that trigger the event. If the + * selector is null or omitted, the event is always triggered when it reaches the selected element.
+ * * `data` — Data to be passed to the handler in event.data when an event is triggered. * @param handler A function to execute when the event is triggered. * @see \`{@link https://api.jquery.com/on/ }\` * @since 1.7 @@ -7609,37 +7692,6 @@ $( "body" ).on( "click", "a", function( event ) { event.preventDefault(); }); ``` - */ - on(events: string, - selector: JQuery.Selector, - // tslint:disable-next-line:unified-signatures - handler: ((event: JQueryEventObject) => void)): this; - /** - * Attach an event handler function for one or more events to the selected elements. - * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". - * @param data Data to be passed to the handler in event.data when an event is triggered. - * @param handler A function to execute when the event is triggered. - * @see \`{@link https://api.jquery.com/on/ }\` - * @since 1.7 - * @example ​ ````Pass data to the event handler, which is specified here by name: -```javascript -function myHandler( event ) { - alert( event.data.foo ); -} -$( "p" ).on( "click", { foo: "bar" }, myHandler ); -``` - */ - on(events: string, - data: TData, - handler: JQuery.EventHandler): this; - /** - * Attach an event handler function for one or more events to the selected elements. - * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". - * @param data Data to be passed to the handler in event.data when an event is triggered. - * @param handler A function to execute when the event is triggered. - * @see \`{@link https://api.jquery.com/on/ }\` - * @since 1.7 - * @deprecated ​ Deprecated. Use \`{@link JQuery.Event }\` in place of \`{@link JQueryEventObject }\`. * @example ​ ````Pass data to the event handler, which is specified here by name: ```javascript function myHandler( event ) { @@ -7649,8 +7701,7 @@ $( "p" ).on( "click", { foo: "bar" }, myHandler ); ``` */ on(events: string, - // tslint:disable-next-line:unified-signatures - data: any, + selector_data: any, handler: ((event: JQueryEventObject) => void)): this; /** * Attach an event handler function for one or more events to the selected elements. @@ -7743,8 +7794,11 @@ $( "#cart" ).on( "mouseenter mouseleave", function( event ) { }); ``` */ - on(events: string, - handler: JQuery.EventHandler | false): this; + on( + events: TType, + handler: JQuery.TypeEventHandler | + false + ): this; /** * Attach an event handler function for one or more events to the selected elements. * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". @@ -7837,7 +7891,6 @@ $( "#cart" ).on( "mouseenter mouseleave", function( event ) { ``` */ on(events: string, - // tslint:disable-next-line:unified-signatures handler: ((event: JQueryEventObject) => void)): this; /** * Attach an event handler function for one or more events to the selected elements. @@ -7849,9 +7902,26 @@ $( "#cart" ).on( "mouseenter mouseleave", function( event ) { * @see \`{@link https://api.jquery.com/on/ }\` * @since 1.7 */ - on(events: JQuery.PlainObject | false>, - selector: JQuery.Selector | null, - data: TData): this; + on( + events: JQuery.TypeEventHandlers, + selector: JQuery.Selector, + data: TData + ): this; + /** + * Attach an event handler function for one or more events to the selected elements. + * @param events An object in which the string keys represent one or more space-separated event types and optional + * namespaces, and the values represent a handler function to be called for the event(s). + * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If + * the selector is null or omitted, the handler is always called when it reaches the selected element. + * @param data Data to be passed to the handler in event.data when an event occurs. + * @see \`{@link https://api.jquery.com/on/ }\` + * @since 1.7 + */ + on( + events: JQuery.TypeEventHandlers, + selector: null | undefined, + data: TData + ): this; /** * Attach an event handler function for one or more events to the selected elements. * @param events An object in which the string keys represent one or more space-separated event types and optional @@ -7861,9 +7931,9 @@ $( "#cart" ).on( "mouseenter mouseleave", function( event ) { * @see \`{@link https://api.jquery.com/on/ }\` * @since 1.7 */ - on(events: JQuery.PlainObject | false>, - // tslint:disable-next-line:unified-signatures - selector: JQuery.Selector): this; + on(events: JQuery.TypeEventHandlers, + selector: JQuery.Selector + ): this; /** * Attach an event handler function for one or more events to the selected elements. * @param events An object in which the string keys represent one or more space-separated event types and optional @@ -7872,8 +7942,10 @@ $( "#cart" ).on( "mouseenter mouseleave", function( event ) { * @see \`{@link https://api.jquery.com/on/ }\` * @since 1.7 */ - on(events: JQuery.PlainObject | false>, - data: TData): this; + on( + events: JQuery.TypeEventHandlers, + data: TData + ): this; /** * Attach an event handler function for one or more events to the selected elements. * @param events An object in which the string keys represent one or more space-separated event types and optional @@ -7922,7 +7994,7 @@ $( "div.test" ).on({ ``` */ - on(events: JQuery.PlainObject | false>): this; + on(events: JQuery.TypeEventHandlers): this; /** * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". @@ -7933,10 +8005,30 @@ $( "div.test" ).on({ * @see \`{@link https://api.jquery.com/one/ }\` * @since 1.7 */ - one(events: string, - selector: JQuery.Selector | null, - data: TData, - handler: JQuery.EventHandler): this; + one( + events: TType, + selector: JQuery.Selector, + data: TData, + handler: JQuery.TypeEventHandler + ): this; + /** + * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. + * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". + * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the + * selector is null or omitted, the event is always triggered when it reaches the selected element. + * @param data Data to be passed to the handler in event.data when an event is triggered. + * @param handler A function to execute when the event is triggered. + * @see \`{@link https://api.jquery.com/one/ }\` + * @since 1.7 + */ + one( + events: TType, + selector: null | undefined, + data: TData, + handler: JQuery.TypeEventHandler + ): this; /** * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". @@ -7947,9 +8039,12 @@ $( "div.test" ).on({ * @see \`{@link https://api.jquery.com/one/ }\` * @since 1.7 */ - one(events: string, + one( + events: TType, selector: JQuery.Selector, - handler: JQuery.EventHandler | false): this; + handler: JQuery.TypeEventHandler | + false + ): this; /** * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". @@ -7958,9 +8053,12 @@ $( "div.test" ).on({ * @see \`{@link https://api.jquery.com/one/ }\` * @since 1.7 */ - one(events: string, - data: TData, - handler: JQuery.EventHandler): this; + one( + events: TType, + data: TData, + handler: JQuery.TypeEventHandler + ): this; /** * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". @@ -8049,8 +8147,11 @@ $(".target").one("click mouseenter", function() { ``` */ - one(events: string, - handler: JQuery.EventHandler | false): this; + one( + events: TType, + handler: JQuery.TypeEventHandler| + false + ): this; /** * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. * @param events An object in which the string keys represent one or more space-separated event types and optional @@ -8061,9 +8162,26 @@ $(".target").one("click mouseenter", function() { * @see \`{@link https://api.jquery.com/one/ }\` * @since 1.7 */ - one(events: JQuery.PlainObject | false>, - selector: JQuery.Selector | null, - data: TData): this; + one( + events: JQuery.TypeEventHandlers, + selector: JQuery.Selector, + data: TData + ): this; + /** + * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. + * @param events An object in which the string keys represent one or more space-separated event types and optional + * namespaces, and the values represent a handler function to be called for the event(s). + * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If + * the selector is null or omitted, the handler is always called when it reaches the selected element. + * @param data Data to be passed to the handler in event.data when an event occurs. + * @see \`{@link https://api.jquery.com/one/ }\` + * @since 1.7 + */ + one( + events: JQuery.TypeEventHandlers, + selector: null | undefined, + data: TData + ): this; /** * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. * @param events An object in which the string keys represent one or more space-separated event types and optional @@ -8073,8 +8191,7 @@ $(".target").one("click mouseenter", function() { * @see \`{@link https://api.jquery.com/one/ }\` * @since 1.7 */ - one(events: JQuery.PlainObject | false>, - // tslint:disable-next-line:unified-signatures + one(events: JQuery.TypeEventHandlers, selector: JQuery.Selector): this; /** * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. @@ -8084,8 +8201,10 @@ $(".target").one("click mouseenter", function() { * @see \`{@link https://api.jquery.com/one/ }\` * @since 1.7 */ - one(events: JQuery.PlainObject | false>, - data: TData): this; + one( + events: JQuery.TypeEventHandlers, + data: TData + ): this; /** * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. * @param events An object in which the string keys represent one or more space-separated event types and optional @@ -8093,7 +8212,7 @@ $(".target").one("click mouseenter", function() { * @see \`{@link https://api.jquery.com/one/ }\` * @since 1.7 */ - one(events: JQuery.PlainObject | false>): this; + one(events: JQuery.TypeEventHandlers): this; /** * Set the CSS outer height of each element in the set of matched elements. * @param value_function _@param_ `value_function` @@ -11704,7 +11823,7 @@ $( "body" ).trigger({ }); ``` */ - trigger(eventType_event: string | JQuery.Event, extraParameters?: any[] | JQuery.PlainObject | string | number | boolean): this; + trigger(eventType_event: string | JQuery.Event, extraParameters?: any[] | JQuery.PlainObject | string | number | boolean): this; /** * Execute all handlers attached to an element for an event. * @param eventType_event _@param_ `eventType_event` @@ -11747,7 +11866,7 @@ $( "input" ).focus(function() { ``` */ - triggerHandler(eventType_event: string | JQuery.Event, extraParameters?: any[] | JQuery.PlainObject | string | number | boolean): any; + triggerHandler(eventType_event: string | JQuery.Event, extraParameters?: any[] | JQuery.PlainObject | string | number | boolean): any; /** * Remove a previously-attached event handler from the elements. * @param event A string containing one or more DOM event types, such as "click" or "submit," or custom event names. @@ -11815,7 +11934,10 @@ $( "p" ).bind( "click", foo ); // ... Now foo will be called when paragraphs are $( "p" ).unbind( "click", foo ); // ... foo will no longer be called. ``` */ - unbind(event: string, handler: JQuery.EventHandlerBase> | false): this; + unbind(event: string, + handler: JQuery.TypeEventHandler | + false + ): this; /** * Remove a previously-attached event handler from the elements. * @param event A string containing one or more DOM event types, such as "click" or "submit," or custom event names. @@ -11836,7 +11958,7 @@ $( "p" ).unbind(); $( "p" ).unbind( "click" ); ``` */ - unbind(event?: string | JQuery.Event): this; + unbind(event?: string | JQuery.TriggeredEvent): this; /** * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements. * @param selector A selector which will be used to filter the event results. @@ -11906,12 +12028,18 @@ $( "body" ).delegate( "p", "click", foo ); $( "body" ).undelegate( "p", "click", foo ); ``` */ - undelegate(selector: JQuery.Selector, eventType: string, handler: JQuery.EventHandlerBase> | false): this; + undelegate(selector: JQuery.Selector, + eventType: string, + handler: JQuery.TypeEventHandler | + false + ): this; /** * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements. * @param selector A selector which will be used to filter the event results. - * @param eventTypes A string containing a JavaScript event type, such as "click" or "keydown" - * An object of one or more event types and previously bound functions to unbind from them. + * @param eventType_events _@param_ `eventType_events` + *
+ * * `eventType` — A string containing a JavaScript event type, such as "click" or "keydown"
+ * * `events` — An object of one or more event types and previously bound functions to unbind from them. * @see \`{@link https://api.jquery.com/undelegate/ }\` * @since 1.4.2 * @since 1.4.3 @@ -11921,7 +12049,9 @@ $( "body" ).undelegate( "p", "click", foo ); * * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. */ - undelegate(selector: JQuery.Selector, eventTypes: string | JQuery.PlainObject> | false>): this; + undelegate(selector: JQuery.Selector, + eventType_events: string | + JQuery.TypeEventHandlers): this; /** * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements. * @param namespace A selector which will be used to filter the event results. diff --git a/types/jquery/jquery-tests.ts b/types/jquery/jquery-tests.ts index 4f848cc7bb..b08b48d0b0 100644 --- a/types/jquery/jquery-tests.ts +++ b/types/jquery/jquery-tests.ts @@ -2430,7 +2430,7 @@ function JQuery() { $(document).ajaxComplete(function(event, jqXHR, ajaxOptions) { // $ExpectType Document this; - // $ExpectType Event + // $ExpectType TriggeredEvent event; // $ExpectType jqXHR jqXHR; @@ -2446,7 +2446,7 @@ function JQuery() { $(document).ajaxError(function(event, jqXHR, ajaxSettings, thrownError) { // $ExpectType Document this; - // $ExpectType Event + // $ExpectType TriggeredEvent event; // $ExpectType jqXHR jqXHR; @@ -2464,7 +2464,7 @@ function JQuery() { $(document).ajaxSend(function(event, jqXHR, ajaxOptions) { // $ExpectType Document this; - // $ExpectType Event + // $ExpectType TriggeredEvent event; // $ExpectType jqXHR jqXHR; @@ -2500,7 +2500,7 @@ function JQuery() { $(document).ajaxSuccess(function(event, jqXHR, ajaxOptions, data) { // $ExpectType Document this; - // $ExpectType Event + // $ExpectType TriggeredEvent event; // $ExpectType jqXHR jqXHR; @@ -3887,7 +3887,7 @@ function JQuery() { $('p').bind('myEvent', 'myData', function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType TriggeredEvent event; }); @@ -3895,45 +3895,45 @@ function JQuery() { $('p').bind('myEvent', function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType TriggeredEvent event; }); // $ExpectType JQuery $('p').bind('myEvent', false); + // $ExpectType JQuery + $('p').bind('myEvent', null); + + // $ExpectType JQuery + $('p').bind('myEvent', undefined); + // $ExpectType JQuery $('p').bind({ myEvent1: false, myEvent2(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType TriggeredEvent event; } }); - - // $ExpectType JQuery - $('p').bind('myEvent', null); - - // $ExpectType JQuery - $('p').bind('myEvent', undefined); - } + } function delegate() { // $ExpectType JQuery $('table').delegate('td', 'myEvent', 'myData', function(event) { - // $ExpectType HTMLElement + // $ExpectType any this; - // $ExpectType Event + // $ExpectType TriggeredEvent event; }); // $ExpectType JQuery $('table').delegate('td', 'myEvent', function(event) { - // $ExpectType HTMLElement + // $ExpectType any this; - // $ExpectType Event + // $ExpectType TriggeredEvent event; }); @@ -3942,20 +3942,20 @@ function JQuery() { // $ExpectType JQuery $('table').delegate('td', { - myEvent1(event) { - // $ExpectType HTMLElement + myEvent1: false, + myEvent2(event) { + // $ExpectType any this; - // $ExpectType Event + // $ExpectType TriggeredEvent event; - }, - myEvent2: false + } }); } function off() { - function defaultData(this: HTMLElement, event: JQuery.Event) { } + function defaultData(this: HTMLElement, event: JQuery.TriggeredEvent) { } - function customData(this: HTMLElement, event: JQuery.Event) { } + function customData(this: HTMLElement, event: JQuery.TriggeredEvent) { } // $ExpectType JQuery $('table').off('myEvent', 'td', defaultData); @@ -3995,27 +3995,19 @@ function JQuery() { customData }); + const ev: JQuery.TriggeredEvent = undefined!; // $ExpectType JQuery - $('table').off($.Event('myEvent')); + $('table').off(ev); // $ExpectType JQuery $('table').off(); } function on() { - // $ExpectType JQuery $('table').on('myEvent', 'td', 'myData', function(event) { - // $ExpectType HTMLElement + // $ExpectType any this; - // $ExpectType Event - event; - }); - - // $ExpectType JQuery - $('table').on('myEvent', 'td', 'myData', function(event: JQueryEventObject) { - // $ExpectType HTMLElement - this; - // $ExpectType JQueryEventObject + // $ExpectType TriggeredEvent event; }); @@ -4023,12 +4015,38 @@ function JQuery() { $('table').on('myEvent', null, 'myData', function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType TriggeredEvent + event; + }); + + // $ExpectType JQuery + $('table').on('myEvent', undefined, 'myData', function(event) { + // $ExpectType HTMLElement + this; + // $ExpectType TriggeredEvent + event; + }); + + // $ExpectType JQuery + $('table').on('myEvent', 'td', 'myData', function(event: JQueryEventObject) { + // $ExpectType any + this; + // $ExpectType JQueryEventObject event; }); // $ExpectType JQuery $('table').on('myEvent', null, 'myData', function(event: JQueryEventObject) { + // TODO: Why is this HTMLElement? The callback signature doesn't even have `this` declared. + // $ExpectType HTMLElement + this; + // $ExpectType JQueryEventObject + event; + }); + + // $ExpectType JQuery + $('table').on('myEvent', undefined, 'myData', function(event: JQueryEventObject) { + // TODO: Why is this HTMLElement? The callback signature doesn't even have `this` declared. // $ExpectType HTMLElement this; // $ExpectType JQueryEventObject @@ -4037,17 +4055,9 @@ function JQuery() { // $ExpectType JQuery $('table').on('myEvent', 'td', function(event) { - // $ExpectType HTMLElement + // $ExpectType any this; - // $ExpectType Event - event; - }); - - // $ExpectType JQuery - $('table').on('myEvent', 'td', function(event: JQueryEventObject) { - // $ExpectType HTMLElement - this; - // $ExpectType JQueryEventObject + // $ExpectType TriggeredEvent event; }); @@ -4058,7 +4068,15 @@ function JQuery() { $('table').on('myEvent', 3, function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType TriggeredEvent + event; + }); + + // $ExpectType JQuery + $('table').on('myEvent', 'td', function(event: JQueryEventObject) { + // $ExpectType any + this; + // $ExpectType JQueryEventObject event; }); @@ -4074,10 +4092,13 @@ function JQuery() { $('table').on('myEvent', function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType TriggeredEvent event; }); + // $ExpectType JQuery + $('table').on('myEvent', false); + // $ExpectType JQuery $('table').on('myEvent', function(event: JQueryEventObject) { // $ExpectType HTMLElement @@ -4110,16 +4131,13 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('table').on('myEvent', false); - // $ExpectType JQuery $('table').on({ myEvent1: false, myEvent2(event) { - // $ExpectType HTMLElement + // $ExpectType any this; - // $ExpectType Event + // $ExpectType TriggeredEvent event; } }, 'td', 'myData'); @@ -4130,7 +4148,7 @@ function JQuery() { myEvent2(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType TriggeredEvent event; } }, null, 'myData'); @@ -4141,7 +4159,18 @@ function JQuery() { myEvent2(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType TriggeredEvent + event; + } + }, undefined, 'myData'); + + // $ExpectType JQuery + $('table').on({ + myEvent1: false, + myEvent2(event) { + // $ExpectType any + this; + // $ExpectType TriggeredEvent event; } }, 'td'); @@ -4152,7 +4181,7 @@ function JQuery() { myEvent2(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType TriggeredEvent event; } }, 3); @@ -4163,7 +4192,7 @@ function JQuery() { myEvent2(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType TriggeredEvent event; } }); @@ -4172,9 +4201,9 @@ function JQuery() { function one() { // $ExpectType JQuery $('table').one('myEvent', 'td', 'myData', function(event) { - // $ExpectType HTMLElement + // $ExpectType any this; - // $ExpectType Event + // $ExpectType TriggeredEvent event; }); @@ -4182,15 +4211,23 @@ function JQuery() { $('table').one('myEvent', null, 'myData', function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType TriggeredEvent + event; + }); + + // $ExpectType JQuery + $('table').one('myEvent', undefined, 'myData', function(event) { + // $ExpectType HTMLElement + this; + // $ExpectType TriggeredEvent event; }); // $ExpectType JQuery $('table').one('myEvent', 'td', function(event) { - // $ExpectType HTMLElement + // $ExpectType any this; - // $ExpectType Event + // $ExpectType TriggeredEvent event; }); @@ -4201,7 +4238,7 @@ function JQuery() { $('table').one('myEvent', 3, function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType TriggeredEvent event; }); @@ -4209,7 +4246,7 @@ function JQuery() { $('table').one('myEvent', function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType TriggeredEvent event; }); @@ -4220,9 +4257,9 @@ function JQuery() { $('table').one({ myEvent1: false, myEvent2(event) { - // $ExpectType HTMLElement + // $ExpectType any this; - // $ExpectType Event + // $ExpectType TriggeredEvent event; } }, 'td', 'myData'); @@ -4233,7 +4270,7 @@ function JQuery() { myEvent2(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType TriggeredEvent event; } }, null, 'myData'); @@ -4244,7 +4281,18 @@ function JQuery() { myEvent2(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType TriggeredEvent + event; + } + }, undefined, 'myData'); + + // $ExpectType JQuery + $('table').one({ + myEvent1: false, + myEvent2(event) { + // $ExpectType any + this; + // $ExpectType TriggeredEvent event; } }, 'td'); @@ -4255,7 +4303,7 @@ function JQuery() { myEvent2(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType TriggeredEvent event; } }, 3); @@ -4266,7 +4314,7 @@ function JQuery() { myEvent2(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType TriggeredEvent event; } }); @@ -4337,9 +4385,9 @@ function JQuery() { } function unbind() { - function defaultData(this: HTMLElement, event: JQuery.Event) { } + function defaultData(this: HTMLElement, event: JQuery.TriggeredEvent) { } - function customData(this: HTMLElement, event: JQuery.Event) { } + function customData(this: HTMLElement, event: JQuery.TriggeredEvent) { } // $ExpectType JQuery $('p').unbind('myEvent', defaultData); @@ -4353,17 +4401,18 @@ function JQuery() { // $ExpectType JQuery $('p').unbind('myEvent'); + const ev: JQuery.TriggeredEvent = undefined!; // $ExpectType JQuery - $('p').unbind($.Event('myEvent')); + $('p').unbind(ev); // $ExpectType JQuery $('p').unbind(); } function undelegate() { - function defaultData(this: HTMLElement, event: JQuery.Event) { } + function defaultData(this: HTMLElement, event: JQuery.TriggeredEvent) { } - function customData(this: HTMLElement, event: JQuery.Event) { } + function customData(this: HTMLElement, event: JQuery.TriggeredEvent) { } // $ExpectType JQuery $('table').undelegate('td', 'click', defaultData); @@ -7696,18 +7745,18 @@ function JQuery_Effects() { function JQuery_Event() { function call_signature() { - // $ExpectType Event & Coordinates + // $ExpectType Event & Coordinates $.Event('keydown', $('p').offset()); } function constructor() { - // $ExpectType Event & Coordinates + // $ExpectType Event & Coordinates new $.Event('keydown', $('p').offset()); } // https://stackoverflow.com/questions/49892574/trigger-a-jquery-3-event-with-ctrlkey-set function stackoverflow_49892574() { - const event = $.Event("keydown"); + const event = $.Event("keydown"); event.which = 77; event.ctrlKey = true; $(window).trigger(event); @@ -7727,7 +7776,7 @@ function JQuery_EventExtensions() { data; // $ExpectType string namespaces; - // $ExpectType EventHandler + // $ExpectType EventHandlerBase> eventHandle; return false; @@ -7753,7 +7802,7 @@ function JQuery_EventExtensions() { trigger(event, data) { // $ExpectType EventTarget this; - // $ExpectType Event + // $ExpectType Event event; // $ExpectType any data; @@ -7761,7 +7810,7 @@ function JQuery_EventExtensions() { return false; }, _default(event, data) { - // $ExpectType Event + // $ExpectType TriggeredEvent event; // $ExpectType any data; @@ -7769,7 +7818,7 @@ function JQuery_EventExtensions() { return false; }, handle(event, data) { - // $ExpectType Event & { handleObj: HandleObject; } + // $ExpectType TriggeredEvent & { handleObj: HandleObject; } event; // $ExpectType any data; @@ -7777,7 +7826,7 @@ function JQuery_EventExtensions() { preDispatch(event) { // $ExpectType EventTarget this; - // $ExpectType Event + // $ExpectType Event event; return false; @@ -7785,7 +7834,7 @@ function JQuery_EventExtensions() { postDispatch(event) { // $ExpectType EventTarget this; - // $ExpectType Event + // $ExpectType Event event; } }; diff --git a/types/jquery/misc.d.ts b/types/jquery/misc.d.ts index 94f7279e63..d966f1b787 100644 --- a/types/jquery/misc.d.ts +++ b/types/jquery/misc.d.ts @@ -3981,45 +3981,97 @@ $( "input" ).click(function() { // This should be a class but doesn't work correctly under the JQuery namespace. Event should be an inner class of jQuery. - // Static members + /** + * jQuery's event system normalizes the event object according to W3C standards. The event object is guaranteed to be passed to the event handler (no checks for window.event required). It normalizes the target, relatedTarget, which, metaKey and pageX/Y properties and provides both stopPropagation() and preventDefault() methods. + * + * Those properties are all documented, and accompanied by examples, on the \`{@link http://api.jquery.com/category/events/event-object/ Event object}\` page. + * + * The standard events in the Document Object Model are: `blur`, `focus`, `load`, `resize`, `scroll`, `unload`, `beforeunload`, `click`, `dblclick`, `mousedown`, `mouseup`, `mousemove`, `mouseover`, `mouseout`, `mouseenter`, `mouseleave`, `change`, `select`, `submit`, `keydown`, `keypress`, and `keyup`. Since the DOM event names have predefined meanings for some elements, using them for other purposes is not recommended. jQuery's event model can trigger an event by any name on an element, and it is propagated up the DOM tree to which that element belongs, if any. + * @see \`{@link https://api.jquery.com/category/events/event-object/ }\` + */ interface EventStatic { - // tslint:disable-next-line:no-unnecessary-generics - (event: string, properties?: T): Event & T; - // tslint:disable-next-line:no-unnecessary-generics - new (event: string, properties?: T): Event & T; + /** + * The jQuery.Event constructor is exposed and can be used when calling trigger. The new operator is optional. + * + * Check \`{@link https://api.jquery.com/trigger/ trigger}\`'s documentation to see how to combine it with your own event object. + * @see \`{@link https://api.jquery.com/category/events/event-object/ }\` + * @since 1.6 + * @example +```javascript +//Create a new jQuery.Event object without the "new" operator. +var e = jQuery.Event( "click" ); +​ +// trigger an artificial click event +jQuery( "body" ).trigger( e ); +``` + * @example +```javascript +// Create a new jQuery.Event object with specified event properties. +var e = jQuery.Event( "keydown", { keyCode: 64 } ); +​ +// trigger an artificial keydown event with keyCode 64 +jQuery( "body" ).trigger( e ); +``` + */ + (event: string, properties?: T): Event & T; + /** + * The jQuery.Event constructor is exposed and can be used when calling trigger. The new operator is optional. + * + * Check \`{@link https://api.jquery.com/trigger/ trigger}\`'s documentation to see how to combine it with your own event object. + * @see \`{@link https://api.jquery.com/category/events/event-object/ }\` + * @since 1.6 + * @example +```javascript +//Create a new jQuery.Event object without the "new" operator. +var e = jQuery.Event( "click" ); +​ +// trigger an artificial click event +jQuery( "body" ).trigger( e ); +``` + * @example +```javascript +// Create a new jQuery.Event object with specified event properties. +var e = jQuery.Event( "keydown", { keyCode: 64 } ); +​ +// trigger an artificial keydown event with keyCode 64 +jQuery( "body" ).trigger( e ); +``` + */ + new (event: string, properties?: T): Event & T; } - // Instance members + /** + * jQuery's event system normalizes the event object according to W3C standards. The event object is guaranteed to be passed to the event handler (no checks for window.event required). It normalizes the target, relatedTarget, which, metaKey and pageX/Y properties and provides both stopPropagation() and preventDefault() methods. + * + * Those properties are all documented, and accompanied by examples, on the \`{@link http://api.jquery.com/category/events/event-object/ Event object}\` page. + * + * The standard events in the Document Object Model are: `blur`, `focus`, `load`, `resize`, `scroll`, `unload`, `beforeunload`, `click`, `dblclick`, `mousedown`, `mouseup`, `mousemove`, `mouseover`, `mouseout`, `mouseenter`, `mouseleave`, `change`, `select`, `submit`, `keydown`, `keypress`, and `keyup`. Since the DOM event names have predefined meanings for some elements, using them for other purposes is not recommended. jQuery's event model can trigger an event by any name on an element, and it is propagated up the DOM tree to which that element belongs, if any. + * @see \`{@link https://api.jquery.com/category/events/event-object/ }\` + * @see \`{@link TriggeredEvent }\` + */ interface Event { // region Copied properties // #region Copied properties - // region Event - // #region Event + // Event - bubbles?: boolean; - cancelable?: boolean; - eventPhase?: number; + bubbles: boolean | undefined; + cancelable: boolean | undefined; + eventPhase: number | undefined; - // #endregion + // UIEvent - // region UIEvent - // #region UIEvent + detail: number | undefined; + view: Window | undefined; - detail?: number; - view?: Window; + // MouseEvent - // #endregion - - // region MouseEvent - // #region MouseEvent - - button?: number; - buttons?: number; - clientX?: number; - clientY?: number; - offsetX?: number; - offsetY?: number; + button: number | undefined; + buttons: number | undefined; + clientX: number | undefined; + clientY: number | undefined; + offsetX: number | undefined; + offsetY: number | undefined; /** * The mouse position relative to the left edge of the document. * @see \`{@link https://api.jquery.com/event.pageX/ }\` @@ -4055,7 +4107,7 @@ $( document ).on( "mousemove", function( event ) { ``` */ - pageX: number; + pageX: number | undefined; /** * The mouse position relative to the top edge of the document. * @see \`{@link https://api.jquery.com/event.pageY/ }\` @@ -4091,49 +4143,93 @@ $( document ).on( "mousemove", function( event ) { ``` */ - pageY: number; - screenX?: number; - screenY?: number; + pageY: number | undefined; + screenX: number | undefined; + screenY: number | undefined; /** @deprecated */ - toElement?: Element; + toElement: Element | undefined; - // #endregion + // PointerEvent - // region PointerEvent - // #region PointerEvent + pointerId: number | undefined; + pointerType: string | undefined; - pointerId?: number; - pointerType?: string; - - // #endregion - - // region KeyboardEvent - // #region KeyboardEvent + // KeyboardEvent /** @deprecated */ - char?: string; + char: string | undefined; /** @deprecated */ - charCode?: number; - key?: string; + charCode: number | undefined; + key: string | undefined; /** @deprecated */ - keyCode?: number; + keyCode: number | undefined; - // #endregion + // TouchEvent - // region TouchEvent - // #region TouchEvent + changedTouches: TouchList | undefined; + targetTouches: TouchList | undefined; + touches: TouchList | undefined; - changedTouches?: TouchList; - targetTouches?: TouchList; - touches?: TouchList; + // MouseEvent, KeyboardEvent - // #endregion + /** + * For key or mouse events, this property indicates the specific key or button that was pressed. + * @see \`{@link https://api.jquery.com/event.which/ }\` + * @since 1.1.3 + * @deprecated ​ Deprecated since 3.3. See \`{@link https://github.com/jquery/api.jquery.com/issues/821 }\`. + * @example ​ ````Log which key was depressed. +```html + + + + + event.which demo + + + +​ + +
+​ + +​ + + +``` + * @example ​ ````Log which mouse button was depressed. +```html + + + + + event.which demo + + + +​ + +
+​ + +​ + + +``` + */ + which: number | undefined; - // region MouseEvent, KeyboardEvent, TouchEvent - // #region MouseEvent, KeyboardEvent, TouchEvent + // MouseEvent, KeyboardEvent, TouchEvent - altKey?: boolean; - ctrlKey?: boolean; + altKey: boolean | undefined; + ctrlKey: boolean | undefined; /** * Indicates whether the META key was pressed when the event fired. * @see \`{@link https://api.jquery.com/event.metaKey/ }\` @@ -4170,77 +4266,11 @@ $( "#checkMetaKey" ).click(function( event ) { ``` */ - metaKey: boolean; - shiftKey?: boolean; + metaKey: boolean | undefined; + shiftKey: boolean | undefined; // #endregion - // #endregion - - /** - * The namespace specified when the event was triggered. - * @see \`{@link https://api.jquery.com/event.namespace/ }\` - * @since 1.4.3 - * @example ​ ````Determine the event namespace used. -```html - - - - - event.namespace demo - - - -​ - -

-​ - -​ - - -``` - */ - namespace: string; - /** - * The last value returned by an event handler that was triggered by this event, unless the value was undefined. - * @see \`{@link https://api.jquery.com/event.result/ }\` - * @since 1.3 - * @example ​ ````Display previous handler's return value -```html - - - - - event.result demo - - - -​ - -

-​ - -​ - - -``` - */ - result: any; /** * The difference in milliseconds between the time the browser created the event and January 1, 1970. * @see \`{@link https://api.jquery.com/event.timeStamp/ }\` @@ -4297,59 +4327,6 @@ $( "a" ).click(function( event ) { ``` */ type: string; - /** - * For key or mouse events, this property indicates the specific key or button that was pressed. - * @see \`{@link https://api.jquery.com/event.which/ }\` - * @since 1.1.3 - * @deprecated ​ Deprecated since 3.3. See \`{@link https://github.com/jquery/api.jquery.com/issues/821 }\`. - * @example ​ ````Log which key was depressed. -```html - - - - - event.which demo - - - -​ - -
-​ - -​ - - -``` - * @example ​ ````Log which mouse button was depressed. -```html - - - - - event.which demo - - - -​ - -
-​ - -​ - - -``` - */ - which: number; /** * Returns whether event.preventDefault() was ever called on this event object. * @see \`{@link https://api.jquery.com/event.isDefaultPrevented/ }\` @@ -4542,11 +4519,17 @@ $( "p" ).click(function( event ) { stopPropagation(): void; } - // Generic members - interface Event< - TTarget = EventTarget, - TData = null - > { + // #endregion + + /** + * Base type for jQuery events that have been triggered (including events triggered on plain objects). + */ + interface TriggeredEvent< + TDelegateTarget = any, + TData = any, + TCurrentTarget = any, + TTarget = any + > extends Event { /** * The current DOM element within the event bubbling phase. * @see \`{@link https://api.jquery.com/event.currentTarget/ }\` @@ -4557,51 +4540,8 @@ $( "p" ).click(function( event ) { alert( event.currentTarget === this ); // true }); ``` - */ - currentTarget: TTarget; - /** - * An optional object of data passed to an event method when the current executing handler is bound. - * @see \`{@link https://api.jquery.com/event.data/ }\` - * @since 1.1 - * @example ​ ````Within a for loop, pass the value of i to the .on() method so that the current iteration's value is preserved. -```html - - - - - event.data demo - - - -​ - - - - - -​ -
-​ - -​ - - -``` - */ - data: TData; + */ + currentTarget: TCurrentTarget; /** * The element where the currently-called jQuery event handler was attached. * @see \`{@link https://api.jquery.com/event.delegateTarget/ }\` @@ -4612,21 +4552,8 @@ $( ".box" ).on( "click", "button", function( event ) { $( event.delegateTarget ).css( "background-color", "red" ); }); ``` - */ - delegateTarget: TTarget; - originalEvent: _Event; - /** - * The other DOM element involved in the event, if any. - * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\` - * @since 1.1.4 - * @example ​ ````On mouseout of anchors, alert the element type being entered. -```javascript -$( "a" ).mouseout(function( event ) { - alert( event.relatedTarget.nodeName ); // "DIV" -}); -``` - */ - relatedTarget: TTarget | null; + */ + delegateTarget: TDelegateTarget; /** * The DOM element that initiated the event. * @see \`{@link https://api.jquery.com/event.target/ }\` @@ -4704,17 +4631,173 @@ $( "ul" ).click( handler ).find( "ul" ).hide(); ``` - */ + */ target: TTarget; + + /** + * An optional object of data passed to an event method when the current executing handler is bound. + * @see \`{@link https://api.jquery.com/event.data/ }\` + * @since 1.1 + * @example ​ ````Within a for loop, pass the value of i to the .on() method so that the current iteration's value is preserved. +```html + + + + + event.data demo + + + +​ + + + + + +​ +
+​ + +​ + + +``` + */ + data: TData; + + /** + * The namespace specified when the event was triggered. + * @see \`{@link https://api.jquery.com/event.namespace/ }\` + * @since 1.4.3 + * @example ​ ````Determine the event namespace used. +```html + + + + + event.namespace demo + + + +​ + +

+​ + +​ + + +``` + */ + namespace?: string; + /** + * The last value returned by an event handler that was triggered by this event, unless the value was undefined. + * @see \`{@link https://api.jquery.com/event.result/ }\` + * @since 1.3 + * @example ​ ````Display previous handler's return value +```html + + + + + event.result demo + + + +​ + +

+​ + +​ + + +``` + */ + result?: any; } - // #endregion - - interface EventHandler extends EventHandlerBase> { } + interface TypeToTriggeredEventMap< + TDelegateTarget, + TData, + TCurrentTarget, + TTarget + > { + [type: string]: TriggeredEvent; + } // Extra parameters can be passed from trigger() type EventHandlerBase = (this: TContext, t: T, ...args: any[]) => any; + type EventHandler< + TCurrentTarget, + TData = undefined + > = EventHandlerBase>; + + type TypeEventHandler< + TDelegateTarget, + TData, + TCurrentTarget, + TTarget, + TContext, + TType extends keyof TypeToTriggeredEventMap + > = EventHandlerBase[TType]>; + + interface TypeEventHandlers< + TDelegateTarget, + TData, + TCurrentTarget, + TTarget, + TContext + > extends _TypeEventHandlers { + // No idea why it's necessary to include `object` in the union but otherwise TypeScript complains that + // derived types of Event are not assignable to Event. + [type: string]: TypeEventHandler | + false | + undefined | + object; + } + + type _TypeEventHandlers< + TDelegateTarget, + TData, + TCurrentTarget, + TTarget, + TContext + > = { + [TType in keyof TypeToTriggeredEventMap]?: + TypeEventHandler | + false | + object; + }; + // region Event extensions // #region Event extensions @@ -4791,13 +4874,13 @@ $( "ul" ).click( handler ).find( "ul" ).hide(); * The trigger hook is called early in the process of triggering an event, just after the `jQuery.Event` object is constructed and before any handlers have been called. It can process the triggered event in any way, for example by calling `event.stopPropagation()` or `event.preventDefault()` before returning. If the hook returns `false`, jQuery does not perform any further event triggering actions and returns immediately. Otherwise, it performs the normal trigger processing, calling any event handlers for the element and bubbling the event (unless propagation is stopped in advance or `noBubble` was specified for the special event) to call event handlers attached to parent elements. * @see \`{@link https://learn.jquery.com/events/event-extensions/#trigger-function-event-jquery-event-data-object }\` */ - trigger(this: TTarget, event: Event, data: TData): void | false; + trigger(this: TTarget, event: Event, data: TData): void | false; } | { /** * When the `.trigger()` method finishes running all the event handlers for an event, it also looks for and runs any method on the target object by the same name unless of the handlers called `event.preventDefault()`. So, `.trigger( "submit" )` will execute the `submit()` method on the element if one exists. When a `_default` hook is specified, the hook is called just prior to checking for and executing the element's default method. If this hook returns the value `false` the element's default method will be called; otherwise it is not. * @see \`{@link https://learn.jquery.com/events/event-extensions/#_default-function-event-jquery-event-data-object }\` */ - _default(event: Event, data: TData): void | false; + _default(event: TriggeredEvent, data: TData): void | false; } | { /** * jQuery calls a handle hook when the event has occurred and jQuery would normally call the user's event handler specified by `.on()` or another event binding method. If the hook exists, jQuery calls it _instead_ of that event handler, passing it the event and any data passed from `.trigger()` if it was not a native event. The `this` keyword is the DOM element being handled, and `event.handleObj` property has the detailed event information. @@ -4805,11 +4888,11 @@ $( "ul" ).click( handler ).find( "ul" ).hide(); * Based in the information it has, the handle hook should decide whether to call the original handler function which is in `event.handleObj.handler`. It can modify information in the event object before calling the original handler, but _must restore_ that data before returning or subsequent unrelated event handlers may act unpredictably. In most cases, the handle hook should return the result of the original handler, but that is at the discretion of the hook. The handle hook is unique in that it is the only special event function hook that is called under its original special event name when the type is mapped using `bindType` and `delegateType`. For that reason, it is almost always an error to have anything other than a handle hook present if the special event defines a `bindType` and `delegateType`, since those other hooks will never be called. * @see \`{@link https://learn.jquery.com/events/event-extensions/#handle-function-event-jquery-event-data-object }\` */ - handle(this: TTarget, event: Event & { handleObj: HandleObject; }, ...data: TData[]): void; + handle(this: TTarget, event: TriggeredEvent & { handleObj: HandleObject; }, ...data: TData[]): void; } | { - preDispatch(this: TTarget, event: Event): false | void; + preDispatch(this: TTarget, event: Event): false | void; } | { - postDispatch(this: TTarget, event: Event): void; + postDispatch(this: TTarget, event: Event): void; } | { [key: string]: never; }; @@ -4901,7 +4984,6 @@ $( "ul" ).click( handler ).find( "ul" ).hide(); declare const jQuery: JQueryStatic; declare const $: JQueryStatic; -// Used by JQuery.Event type _Event = Event; // region ES5 compatibility diff --git a/types/jquery/test/example-tests.ts b/types/jquery/test/example-tests.ts index 7ecb1733a7..673e549c31 100644 --- a/types/jquery/test/example-tests.ts +++ b/types/jquery/test/example-tests.ts @@ -384,7 +384,7 @@ function examples() { } function bind_2() { - function handler(event: JQuery.Event) { + function handler(event: JQuery.TriggeredEvent) { alert(event.data.foo); } @@ -830,7 +830,7 @@ function examples() { var len = kids.addClass('hilite').length; $('#results span:first').text(len); - $('#results span:last').text(event.target.tagName); + $('#results span:last').text((event.target as Element).tagName); event.preventDefault(); }); @@ -1614,12 +1614,12 @@ function examples() { function event_target_0() { $('body').click(function(event) { - $('#log').html('clicked: ' + event.target.nodeName); + $('#log').html('clicked: ' + (event.target as Node).nodeName); }); } function event_target_1() { - function handler(event: JQuery.Event) { + function handler(event: JQuery.TriggeredEvent) { var target = $(event.target); if (target.is('li')) { target.children().toggle(); @@ -3018,10 +3018,10 @@ function examples() { function jQuery_proxy_0() { var me = { type: 'zombie', - test: function(event: JQuery.Event) { + test: function(event: JQuery.TriggeredEvent) { // Without proxy, `this` would refer to the event target // use event.target to reference that element. - var element = event.target; + var element = event.target as Element; $(element).css('background-color', 'red'); // With proxy, `this` refers to the me object encapsulating @@ -3033,7 +3033,7 @@ function examples() { var you = { type: 'person', - test: function(event: JQuery.Event) { + test: function(event: JQuery.TriggeredEvent) { $('#log').append(this.type + ' '); }, }; @@ -3075,7 +3075,7 @@ function examples() { type: 'dog', // Note that event comes *after* one and two - test: function(one: typeof you, two: typeof they, event: JQuery.Event) { + test: function(one: typeof you, two: typeof they, event: JQuery.TriggeredEvent) { $('#log') // `one` maps to `you`, the 1st additional @@ -3796,7 +3796,7 @@ function examples() { } function on_1() { - function myHandler(event: JQuery.Event) { + function myHandler(event: JQuery.TriggeredEvent) { alert(event.data.foo); } diff --git a/types/jquery/test/learn-tests.ts b/types/jquery/test/learn-tests.ts index 523385b644..b1a0353b4e 100644 --- a/types/jquery/test/learn-tests.ts +++ b/types/jquery/test/learn-tests.ts @@ -35,7 +35,7 @@ function special() { bindType: "click", handle(event) { const handleObj = event.handleObj; - const targetData = jQuery.data(event.target); + const targetData = jQuery.data(event.target as Element); let ret = null; // If a multiple of the click count, run the handler diff --git a/types/jquery/test/longdesc-tests.ts b/types/jquery/test/longdesc-tests.ts index bb3bb4c83c..f3cf559638 100644 --- a/types/jquery/test/longdesc-tests.ts +++ b/types/jquery/test/longdesc-tests.ts @@ -538,7 +538,7 @@ function longdesc() { $('#foo').slideUp(300).delay(800).fadeIn(400); } - function delegate_0(elements: HTMLElement[], selector: string, events: any, data: any, handler: JQuery.EventHandler) { + function delegate_0(elements: HTMLElement[], selector: string, events: string, data: any, handler: JQuery.TypeEventHandler) { // jQuery 1.4.3+ $(elements).delegate(selector, events, data, handler); // jQuery 1.7+ @@ -2016,7 +2016,7 @@ function longdesc() { } function on_3() { - function greet(event: JQuery.Event) { + function greet(event: JQuery.TriggeredEvent) { alert('Hello ' + event.data.name); } From 00c546398c4d3d98655a4bce525a077dd52c83c1 Mon Sep 17 00:00:00 2001 From: Leonard Thieu Date: Wed, 24 Oct 2018 10:26:51 -0400 Subject: [PATCH 078/608] [jquery] Add support for event types that have shorthand methods. --- types/jquery/JQuery.d.ts | 136 ++-- types/jquery/jquery-tests.ts | 197 ++++-- types/jquery/misc.d.ts | 1282 ++++++++++++++++++++++++++++++++++ 3 files changed, 1515 insertions(+), 100 deletions(-) diff --git a/types/jquery/JQuery.d.ts b/types/jquery/JQuery.d.ts index f9a06328e7..83e27c6754 100644 --- a/types/jquery/JQuery.d.ts +++ b/types/jquery/JQuery.d.ts @@ -1521,7 +1521,7 @@ $( "div.test" ).bind({ * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ blur(eventData: TData, - handler: JQuery.EventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "blur" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -1537,7 +1537,8 @@ $( "div.test" ).bind({ $( "p" ).blur(); ``` */ - blur(handler?: JQuery.EventHandler | false): this; + blur(handler?: JQuery.TypeEventHandler | + false): this; /** * Bind an event handler to the "change" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. @@ -1551,7 +1552,7 @@ $( "p" ).blur(); * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ change(eventData: TData, - handler: JQuery.EventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "change" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -1610,7 +1611,8 @@ $( "input[type='text']" ).change(function() { }); ``` */ - change(handler?: JQuery.EventHandler | false): this; + change(handler?: JQuery.TypeEventHandler | + false): this; /** * Get the children of each element in the set of matched elements, optionally filtered by a selector. * @param selector A string containing a selector expression to match elements against. @@ -1863,7 +1865,7 @@ $( "#stop" ).click(function() { * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ click(eventData: TData, - handler: JQuery.EventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "click" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -1913,7 +1915,8 @@ $( "p" ).click(function() { $( "p" ).click(); ``` */ - click(handler?: JQuery.EventHandler | false): this; + click(handler?: JQuery.TypeEventHandler | + false): this; /** * Create a deep copy of the set of matched elements. * @param withDataAndEvents A Boolean indicating whether event handlers and data should be copied along with the elements. The @@ -2101,7 +2104,7 @@ $( "#frameDemo" ).contents().find( "a" ).css( "background-color", "#BADA55" ); * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ contextmenu(eventData: TData, - handler: JQuery.EventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "contextmenu" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -2155,7 +2158,8 @@ div.contextmenu(function() { ``` */ - contextmenu(handler?: JQuery.EventHandler | false): this; + contextmenu(handler?: JQuery.TypeEventHandler | + false): this; /** * Set one or more CSS properties for the set of matched elements. * @param propertyName A CSS property name. @@ -2616,7 +2620,7 @@ $( "button" ).click(function() { * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ dblclick(eventData: TData, - handler: JQuery.EventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "dblclick" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -2670,7 +2674,8 @@ divdbl.dblclick(function() { ``` */ - dblclick(handler?: JQuery.EventHandler | false): this; + dblclick(handler?: JQuery.TypeEventHandler | + false): this; /** * Set a timer to delay execution of subsequent items in the queue. * @param duration An integer indicating the number of milliseconds to delay execution of the next item in the queue. @@ -4293,7 +4298,7 @@ $( "p span" ).first().addClass( "highlight" ); * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ focus(eventData: TData, - handler: JQuery.EventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "focus" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -4345,7 +4350,8 @@ $( document ).ready(function() { }); ``` */ - focus(handler?: JQuery.EventHandler | false): this; + focus(handler?: JQuery.TypeEventHandler | + false): this; /** * Bind an event handler to the "focusin" event. * @param eventData An object containing data that will be passed to the event handler. @@ -4359,7 +4365,7 @@ $( document ).ready(function() { * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ focusin(eventData: TData, - handler: JQuery.EventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "focusin" event. * @param handler A function to execute each time the event is triggered. @@ -4399,7 +4405,8 @@ $( "p" ).focusin(function() { ``` */ - focusin(handler?: JQuery.EventHandler | false): this; + focusin(handler?: JQuery.TypeEventHandler | + false): this; /** * Bind an event handler to the "focusout" JavaScript event. * @param eventData An object containing data that will be passed to the event handler. @@ -4413,7 +4420,7 @@ $( "p" ).focusin(function() { * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ focusout(eventData: TData, - handler: JQuery.EventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "focusout" JavaScript event. * @param handler A function to execute each time the event is triggered. @@ -4474,7 +4481,8 @@ $( "p" ) ``` */ - focusout(handler?: JQuery.EventHandler | false): this; + focusout(handler?: JQuery.TypeEventHandler | + false): this; /** * Retrieve one of the elements matched by the jQuery object. * @param index A zero-based integer indicating which element to retrieve. @@ -4917,12 +4925,11 @@ $( "button" ).click(function() { */ hide(duration_complete_options?: JQuery.Duration | ((this: TElement) => void) | JQuery.EffectsOptions): this; /** - * Bind one or two handlers to the matched elements, to be executed when the mouse pointer enters and leaves the elements. - * @param handlerInOut A function to execute when the mouse pointer enters or leaves the element. + * Bind two handlers to the matched elements, to be executed when the mouse pointer enters and leaves the elements. + * @param handlerIn A function to execute when the mouse pointer enters the element. * @param handlerOut A function to execute when the mouse pointer leaves the element. * @see \`{@link https://api.jquery.com/hover/ }\` * @since 1.0 - * @since 1.4 * @deprecated ​ Deprecated. * * **Cause**: The `.hover()` method is a shorthand for the use of the `mouseover`/`mouseout` events. It is often a poor user interface choice because it does not allow for any small amounts of delay between when the mouse enters or exits an area and when the event fires. This can make it quite difficult to use with UI widgets such as drop-down menus. For more information on the problems of hovering, see the \`{@link http://cherne.net/brian/resources/jquery.hoverIntent.html hoverIntent plugin}\`. @@ -4990,6 +4997,21 @@ $( "td" ).hover( ```javascript $( "td" ).off( "mouseenter mouseleave" ); ``` + */ + hover(handlerIn: JQuery.TypeEventHandler | + false, + handlerOut: JQuery.TypeEventHandler | + false): this; + /** + * Bind a single handler to the matched elements, to be executed when the mouse pointer enters or leaves the elements. + * @param handlerInOut A function to execute when the mouse pointer enters or leaves the element. + * @see \`{@link https://api.jquery.com/hover/ }\` + * @since 1.4 + * @deprecated ​ Deprecated. + * + * **Cause**: The `.hover()` method is a shorthand for the use of the `mouseover`/`mouseout` events. It is often a poor user interface choice because it does not allow for any small amounts of delay between when the mouse enters or exits an area and when the event fires. This can make it quite difficult to use with UI widgets such as drop-down menus. For more information on the problems of hovering, see the \`{@link http://cherne.net/brian/resources/jquery.hoverIntent.html hoverIntent plugin}\`. + * + * **Solution**: Review uses of `.hover()` to determine if they are appropriate, and consider use of plugins such as `hoverIntent` as an alternative. The direct replacement for `.hover(fn1, fn2)`, is `.on("mouseenter", fn1).on("mouseleave", fn2)`. * @example ​ ````Slide the next sibling LI up or down on hover, and toggle a class. ```html @@ -5045,10 +5067,8 @@ $( "li" ) ``` */ - // HACK: The type parameter T is not used but ensures the 'event' callback parameter is typed correctly. - // tslint:disable-next-line:no-unnecessary-generics - hover(handlerInOut: JQuery.EventHandler | false, - handlerOut?: JQuery.EventHandler | false): this; + hover(handlerInOut: JQuery.TypeEventHandler | + false): this; /** * Set the HTML contents of each element in the set of matched elements. * @param htmlString_function _@param_ `htmlString_function` @@ -5862,7 +5882,7 @@ $( "li" ).click(function() { * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ keydown(eventData: TData, - handler: JQuery.EventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "keydown" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -5934,7 +5954,8 @@ $( "#other" ).click(function() { ``` */ - keydown(handler?: JQuery.EventHandler | false): this; + keydown(handler?: JQuery.TypeEventHandler | + false): this; /** * Bind an event handler to the "keypress" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. @@ -5948,7 +5969,7 @@ $( "#other" ).click(function() { * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ keypress(eventData: TData, - handler: JQuery.EventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "keypress" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -6020,7 +6041,8 @@ $( "#other" ).click(function() { ``` */ - keypress(handler?: JQuery.EventHandler | false): this; + keypress(handler?: JQuery.TypeEventHandler | + false): this; /** * Bind an event handler to the "keyup" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. @@ -6034,7 +6056,7 @@ $( "#other" ).click(function() { * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ keyup(eventData: TData, - handler: JQuery.EventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "keyup" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -6107,7 +6129,8 @@ $( "#other").click(function() { ``` */ - keyup(handler?: JQuery.EventHandler | false): this; + keyup(handler?: JQuery.TypeEventHandler | + false): this; /** * Reduce the set of matched elements to the final one in the set. * @see \`{@link https://api.jquery.com/last/ }\` @@ -6396,7 +6419,7 @@ $( "input" ).click(function() { * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ mousedown(eventData: TData, - handler: JQuery.EventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "mousedown" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -6434,7 +6457,8 @@ $( "p" ) ``` */ - mousedown(handler?: JQuery.EventHandler | false): this; + mousedown(handler?: JQuery.TypeEventHandler | + false): this; /** * Bind an event handler to be fired when the mouse enters an element, or trigger that handler on an element. * @param eventData An object containing data that will be passed to the event handler. @@ -6448,7 +6472,7 @@ $( "p" ) * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ mouseenter(eventData: TData, - handler: JQuery.EventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to be fired when the mouse enters an element, or trigger that handler on an element. * @param handler A function to execute each time the event is triggered. @@ -6529,7 +6553,8 @@ $( "div.enterleave" ) ``` */ - mouseenter(handler?: JQuery.EventHandler | false): this; + mouseenter(handler?: JQuery.TypeEventHandler | + false): this; /** * Bind an event handler to be fired when the mouse leaves an element, or trigger that handler on an element. * @param eventData An object containing data that will be passed to the event handler. @@ -6543,7 +6568,7 @@ $( "div.enterleave" ) * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ mouseleave(eventData: TData, - handler: JQuery.EventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to be fired when the mouse leaves an element, or trigger that handler on an element. * @param handler A function to execute each time the event is triggered. @@ -6622,7 +6647,8 @@ $( "div.enterleave" ) ``` */ - mouseleave(handler?: JQuery.EventHandler | false): this; + mouseleave(handler?: JQuery.TypeEventHandler | + false): this; /** * Bind an event handler to the "mousemove" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. @@ -6636,7 +6662,7 @@ $( "div.enterleave" ) * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ mousemove(eventData: TData, - handler: JQuery.EventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "mousemove" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -6700,7 +6726,8 @@ $( "div" ).mousemove(function( event ) { ``` */ - mousemove(handler?: JQuery.EventHandler | false): this; + mousemove(handler?: JQuery.TypeEventHandler | + false): this; /** * Bind an event handler to the "mouseout" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. @@ -6714,7 +6741,7 @@ $( "div" ).mousemove(function( event ) { * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ mouseout(eventData: TData, - handler: JQuery.EventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "mouseout" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -6795,7 +6822,8 @@ $( "div.enterleave" ) ``` */ - mouseout(handler?: JQuery.EventHandler | false): this; + mouseout(handler?: JQuery.TypeEventHandler | + false): this; /** * Bind an event handler to the "mouseover" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. @@ -6809,7 +6837,7 @@ $( "div.enterleave" ) * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ mouseover(eventData: TData, - handler: JQuery.EventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "mouseover" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -6890,7 +6918,8 @@ $( "div.enterleave" ) ``` */ - mouseover(handler?: JQuery.EventHandler | false): this; + mouseover(handler?: JQuery.TypeEventHandler | + false): this; /** * Bind an event handler to the "mouseup" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. @@ -6904,7 +6933,7 @@ $( "div.enterleave" ) * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ mouseup(eventData: TData, - handler: JQuery.EventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "mouseup" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -6942,7 +6971,8 @@ $( "p" ) ``` */ - mouseup(handler?: JQuery.EventHandler | false): this; + mouseup(handler?: JQuery.TypeEventHandler | + false): this; /** * Get the immediately following sibling of each element in the set of matched elements. If a selector is provided, it retrieves the next sibling only if it matches that selector. * @param selector A string containing a selector expression to match elements against. @@ -9970,7 +10000,7 @@ $( "button" ).on( "click", function() { * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ resize(eventData: TData, - handler: JQuery.EventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "resize" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -9988,7 +10018,8 @@ $( window ).resize(function() { }); ``` */ - resize(handler?: JQuery.EventHandler | false): this; + resize(handler?: JQuery.TypeEventHandler | + false): this; /** * Bind an event handler to the "scroll" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. @@ -10002,7 +10033,7 @@ $( window ).resize(function() { * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ scroll(eventData: TData, - handler: JQuery.EventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "scroll" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -10052,7 +10083,8 @@ $( window ).scroll(function() { ``` */ - scroll(handler?: JQuery.EventHandler | false): this; + scroll(handler?: JQuery.TypeEventHandler | + false): this; /** * Set the current horizontal position of the scroll bar for each of the set of matched elements. * @param value An integer indicating the new position to set the scroll bar to. @@ -10226,7 +10258,7 @@ $( "p:last" ).text( "scrollTop:" + p.scrollTop() ); * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ select(eventData: TData, - handler: JQuery.EventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "select" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -10275,7 +10307,8 @@ $( ":input" ).select(function() { $( "input" ).select(); ``` */ - select(handler?: JQuery.EventHandler | false): this; + select(handler?: JQuery.TypeEventHandler | + false): this; /** * Encode a set of form elements as a string for submission. * @see \`{@link https://api.jquery.com/serialize/ }\` @@ -11246,7 +11279,7 @@ $( "#toggle" ).on( "click", function() { * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ submit(eventData: TData, - handler: JQuery.EventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "submit" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -11315,7 +11348,8 @@ $( "form" ).submit(function() { $( "form:first" ).submit(); ``` */ - submit(handler?: JQuery.EventHandler | false): this; + submit(handler?: JQuery.TypeEventHandler | + false): this; /** * Set the content of each element in the set of matched elements to the specified text. * @param text_function _@param_ `text_function` diff --git a/types/jquery/jquery-tests.ts b/types/jquery/jquery-tests.ts index b08b48d0b0..069e8613d6 100644 --- a/types/jquery/jquery-tests.ts +++ b/types/jquery/jquery-tests.ts @@ -3916,6 +3916,12 @@ function JQuery() { this; // $ExpectType TriggeredEvent event; + }, + click(event) { + // $ExpectType HTMLElement + this; + // $ExpectType ClickEvent + event; } }); } @@ -3948,6 +3954,12 @@ function JQuery() { this; // $ExpectType TriggeredEvent event; + }, + click(event) { + // $ExpectType any + this; + // $ExpectType ClickEvent + event; } }); } @@ -4139,6 +4151,12 @@ function JQuery() { this; // $ExpectType TriggeredEvent event; + }, + click(event) { + // $ExpectType any + this; + // $ExpectType ClickEvent + event; } }, 'td', 'myData'); @@ -4150,6 +4168,12 @@ function JQuery() { this; // $ExpectType TriggeredEvent event; + }, + click(event) { + // $ExpectType HTMLElement + this; + // $ExpectType ClickEvent + event; } }, null, 'myData'); @@ -4161,6 +4185,12 @@ function JQuery() { this; // $ExpectType TriggeredEvent event; + }, + click(event) { + // $ExpectType HTMLElement + this; + // $ExpectType ClickEvent + event; } }, undefined, 'myData'); @@ -4172,6 +4202,12 @@ function JQuery() { this; // $ExpectType TriggeredEvent event; + }, + click(event) { + // $ExpectType any + this; + // $ExpectType ClickEvent + event; } }, 'td'); @@ -4183,6 +4219,12 @@ function JQuery() { this; // $ExpectType TriggeredEvent event; + }, + click(event) { + // $ExpectType HTMLElement + this; + // $ExpectType ClickEvent + event; } }, 3); @@ -4194,6 +4236,12 @@ function JQuery() { this; // $ExpectType TriggeredEvent event; + }, + click(event) { + // $ExpectType HTMLElement + this; + // $ExpectType ClickEvent + event; } }); } @@ -4261,6 +4309,12 @@ function JQuery() { this; // $ExpectType TriggeredEvent event; + }, + click(event) { + // $ExpectType any + this; + // $ExpectType ClickEvent + event; } }, 'td', 'myData'); @@ -4272,6 +4326,12 @@ function JQuery() { this; // $ExpectType TriggeredEvent event; + }, + click(event) { + // $ExpectType HTMLElement + this; + // $ExpectType ClickEvent + event; } }, null, 'myData'); @@ -4283,6 +4343,12 @@ function JQuery() { this; // $ExpectType TriggeredEvent event; + }, + click(event) { + // $ExpectType HTMLElement + this; + // $ExpectType ClickEvent + event; } }, undefined, 'myData'); @@ -4294,6 +4360,12 @@ function JQuery() { this; // $ExpectType TriggeredEvent event; + }, + click(event) { + // $ExpectType any + this; + // $ExpectType ClickEvent + event; } }, 'td'); @@ -4305,6 +4377,12 @@ function JQuery() { this; // $ExpectType TriggeredEvent event; + }, + click(event) { + // $ExpectType HTMLElement + this; + // $ExpectType ClickEvent + event; } }, 3); @@ -4316,6 +4394,12 @@ function JQuery() { this; // $ExpectType TriggeredEvent event; + }, + click(event) { + // $ExpectType HTMLElement + this; + // $ExpectType ClickEvent + event; } }); } @@ -4445,7 +4529,7 @@ function JQuery() { $('p').blur('myData', function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType BlurEvent event; }); @@ -4453,7 +4537,7 @@ function JQuery() { $('p').blur(function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType BlurEvent event; }); @@ -4469,7 +4553,7 @@ function JQuery() { $('p').change('myData', function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType ChangeEvent event; }); @@ -4477,7 +4561,7 @@ function JQuery() { $('p').change(function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType ChangeEvent event; }); @@ -4493,7 +4577,7 @@ function JQuery() { $('p').click('myData', function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType ClickEvent event; }); @@ -4501,7 +4585,7 @@ function JQuery() { $('p').click(function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType ClickEvent event; }); @@ -4517,7 +4601,7 @@ function JQuery() { $('p').contextmenu('myData', function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType ContextMenuEvent event; }); @@ -4525,7 +4609,7 @@ function JQuery() { $('p').contextmenu(function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType ContextMenuEvent event; }); @@ -4541,7 +4625,7 @@ function JQuery() { $('p').dblclick('myData', function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType DoubleClickEvent event; }); @@ -4549,7 +4633,7 @@ function JQuery() { $('p').dblclick(function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType DoubleClickEvent event; }); @@ -4565,7 +4649,7 @@ function JQuery() { $('p').focus('myData', function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType FocusEvent event; }); @@ -4573,7 +4657,7 @@ function JQuery() { $('p').focus(function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType FocusEvent event; }); @@ -4589,7 +4673,7 @@ function JQuery() { $('p').focusin('myData', function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType FocusInEvent event; }); @@ -4597,7 +4681,7 @@ function JQuery() { $('p').focusin(function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType FocusInEvent event; }); @@ -4613,7 +4697,7 @@ function JQuery() { $('p').focusout('myData', function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType FocusOutEvent event; }); @@ -4621,7 +4705,7 @@ function JQuery() { $('p').focusout(function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType FocusOutEvent event; }); @@ -4637,7 +4721,7 @@ function JQuery() { $('p').keydown('myData', function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType KeyDownEvent event; }); @@ -4645,7 +4729,7 @@ function JQuery() { $('p').keydown(function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType KeyDownEvent event; }); @@ -4661,7 +4745,7 @@ function JQuery() { $('p').keypress('myData', function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType KeyPressEvent event; }); @@ -4669,7 +4753,7 @@ function JQuery() { $('p').keypress(function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType KeyPressEvent event; }); @@ -4685,7 +4769,7 @@ function JQuery() { $('p').keyup('myData', function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType KeyUpEvent event; }); @@ -4693,7 +4777,7 @@ function JQuery() { $('p').keyup(function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType KeyUpEvent event; }); @@ -4709,7 +4793,7 @@ function JQuery() { $('p').mousedown('myData', function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType MouseDownEvent event; }); @@ -4717,7 +4801,7 @@ function JQuery() { $('p').mousedown(function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType MouseDownEvent event; }); @@ -4733,7 +4817,7 @@ function JQuery() { $('p').mouseenter('myData', function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType MouseEnterEvent event; }); @@ -4741,7 +4825,7 @@ function JQuery() { $('p').mouseenter(function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType MouseEnterEvent event; }); @@ -4757,7 +4841,7 @@ function JQuery() { $('p').mouseleave('myData', function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType MouseLeaveEvent event; }); @@ -4765,7 +4849,7 @@ function JQuery() { $('p').mouseleave(function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType MouseLeaveEvent event; }); @@ -4781,7 +4865,7 @@ function JQuery() { $('p').mousemove('myData', function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType MouseMoveEvent event; }); @@ -4789,7 +4873,7 @@ function JQuery() { $('p').mousemove(function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType MouseMoveEvent event; }); @@ -4805,7 +4889,7 @@ function JQuery() { $('p').mouseout('myData', function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType MouseOutEvent event; }); @@ -4813,7 +4897,7 @@ function JQuery() { $('p').mouseout(function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType MouseOutEvent event; }); @@ -4829,7 +4913,7 @@ function JQuery() { $('p').mouseover('myData', function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType MouseOverEvent event; }); @@ -4837,7 +4921,7 @@ function JQuery() { $('p').mouseover(function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType MouseOverEvent event; }); @@ -4853,7 +4937,7 @@ function JQuery() { $('p').mouseup('myData', function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType MouseUpEvent event; }); @@ -4861,7 +4945,7 @@ function JQuery() { $('p').mouseup(function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType MouseUpEvent event; }); @@ -4877,7 +4961,7 @@ function JQuery() { $('p').resize('myData', function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType ResizeEvent event; }); @@ -4885,7 +4969,7 @@ function JQuery() { $('p').resize(function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType ResizeEvent event; }); @@ -4901,7 +4985,7 @@ function JQuery() { $('p').scroll('myData', function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType ScrollEvent event; }); @@ -4909,7 +4993,7 @@ function JQuery() { $('p').scroll(function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType ScrollEvent event; }); @@ -4925,7 +5009,7 @@ function JQuery() { $('p').select('myData', function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType SelectEvent event; }); @@ -4933,7 +5017,7 @@ function JQuery() { $('p').select(function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType SelectEvent event; }); @@ -4949,7 +5033,7 @@ function JQuery() { $('p').submit('myData', function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType SubmitEvent event; }); @@ -4957,7 +5041,7 @@ function JQuery() { $('p').submit(function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType SubmitEvent event; }); @@ -4973,12 +5057,12 @@ function JQuery() { $('p').hover(function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType MouseEnterEvent event; }, function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType MouseLeaveEvent event; }); @@ -4986,7 +5070,7 @@ function JQuery() { $('p').hover(function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType MouseEnterEvent event; }, false); @@ -4994,7 +5078,7 @@ function JQuery() { $('p').hover(false, function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType MouseLeaveEvent event; }); @@ -5005,8 +5089,23 @@ function JQuery() { $('p').hover(function(event) { // $ExpectType HTMLElement this; - // $ExpectType Event + // $ExpectType MouseEnterEvent | MouseLeaveEvent event; + + switch (event.type) { + case 'mouseover': + // $ExpectType MouseEnterEvent + event; + break; + case 'mouseout': + // $ExpectType MouseLeaveEvent + event; + break; + default: + // $ExpectType never + event; + break; + } }); // $ExpectType JQuery diff --git a/types/jquery/misc.d.ts b/types/jquery/misc.d.ts index d966f1b787..24979fb620 100644 --- a/types/jquery/misc.d.ts +++ b/types/jquery/misc.d.ts @@ -4744,12 +4744,1290 @@ $( "button" ).click(function( event ) { result?: any; } + // region Event + // #region Event + + interface EventBase< + TDelegateTarget = any, + TData = any, + TCurrentTarget = any, + TTarget = any + > extends TriggeredEvent { + /** + * The other DOM element involved in the event, if any. + * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\` + * @since 1.1.4 + * @example ​ ````On mouseout of anchors, alert the element type being entered. +```javascript +$( "a" ).mouseout(function( event ) { + alert( event.relatedTarget.nodeName ); // "DIV" +}); +``` + */ + relatedTarget?: undefined; + + // Event + + bubbles: boolean; + cancelable: boolean; + eventPhase: number; + + // UIEvent + + detail: undefined; + view: undefined; + + // MouseEvent + + button: undefined; + buttons: undefined; + clientX: undefined; + clientY: undefined; + offsetX: undefined; + offsetY: undefined; + /** + * The mouse position relative to the left edge of the document. + * @see \`{@link https://api.jquery.com/event.pageX/ }\` + * @since 1.0.4 + * @example ​ ````Show the mouse position relative to the left and top edges of the document (within this iframe). +```html + + + + + event.pageX demo + + + + +​ +
+​ + +​ + + +``` + */ + pageX: undefined; + /** + * The mouse position relative to the top edge of the document. + * @see \`{@link https://api.jquery.com/event.pageY/ }\` + * @since 1.0.4 + * @example ​ ````Show the mouse position relative to the left and top edges of the document (within this iframe). +```html + + + + + event.pageY demo + + + + +​ +
+​ + +​ + + +``` + */ + pageY: undefined; + screenX: undefined; + screenY: undefined; + /** @deprecated */ + toElement: undefined; + + // PointerEvent + + pointerId: undefined; + pointerType: undefined; + + // KeyboardEvent + + /** @deprecated */ + char: undefined; + /** @deprecated */ + charCode: undefined; + key: undefined; + /** @deprecated */ + keyCode: undefined; + + // TouchEvent + + changedTouches: undefined; + targetTouches: undefined; + touches: undefined; + + // MouseEvent, KeyboardEvent + + /** + * For key or mouse events, this property indicates the specific key or button that was pressed. + * @see \`{@link https://api.jquery.com/event.which/ }\` + * @since 1.1.3 + * @deprecated ​ Deprecated since 3.3. See \`{@link https://github.com/jquery/api.jquery.com/issues/821 }\`. + * @example ​ ````Log which key was depressed. +```html + + + + + event.which demo + + + +​ + +
+​ + +​ + + +``` + * @example ​ ````Log which mouse button was depressed. +```html + + + + + event.which demo + + + +​ + +
+​ + +​ + + +``` + */ + which: undefined; + + // MouseEvent, KeyboardEvent, TouchEvent + + altKey: undefined; + ctrlKey: undefined; + /** + * Indicates whether the META key was pressed when the event fired. + * @see \`{@link https://api.jquery.com/event.metaKey/ }\` + * @since 1.0.4 + * @example ​ ````Determine whether the META key was pressed when the event fired. +```html + + + + + event.metaKey demo + + + + +​ + +
+​ + +​ + + +``` + */ + metaKey: undefined; + shiftKey: undefined; + + originalEvent?: _Event; + } + + interface ChangeEvent< + TDelegateTarget = any, + TData = any, + TCurrentTarget = any, + TTarget = any + > extends EventBase { + type: 'change'; + } + + interface ResizeEvent< + TDelegateTarget = any, + TData = any, + TCurrentTarget = any, + TTarget = any + > extends EventBase { + type: 'resize'; + } + + interface ScrollEvent< + TDelegateTarget = any, + TData = any, + TCurrentTarget = any, + TTarget = any + > extends EventBase { + type: 'scroll'; + } + + interface SelectEvent< + TDelegateTarget = any, + TData = any, + TCurrentTarget = any, + TTarget = any + > extends EventBase { + type: 'select'; + } + + interface SubmitEvent< + TDelegateTarget = any, + TData = any, + TCurrentTarget = any, + TTarget = any + > extends EventBase { + type: 'submit'; + } + + // #endregion + + // region UIEvent + // #region UIEvent + + interface UIEventBase< + TDelegateTarget = any, + TData = any, + TCurrentTarget = any, + TTarget = any + > extends TriggeredEvent { + // Event + + bubbles: boolean; + cancelable: boolean; + eventPhase: number; + + // UIEvent + + detail: number; + view: Window; + + originalEvent?: _UIEvent; + } + + // region MouseEvent + // #region MouseEvent + + interface MouseEventBase< + TDelegateTarget = any, + TData = any, + TCurrentTarget = any, + TTarget = any + > extends UIEventBase { + /** + * The other DOM element involved in the event, if any. + * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\` + * @since 1.1.4 + * @example ​ ````On mouseout of anchors, alert the element type being entered. +```javascript +$( "a" ).mouseout(function( event ) { + alert( event.relatedTarget.nodeName ); // "DIV" +}); +``` + */ + relatedTarget?: EventTarget | null; + + // MouseEvent + + button: number; + buttons: number; + clientX: number; + clientY: number; + offsetX: number; + offsetY: number; + /** + * The mouse position relative to the left edge of the document. + * @see \`{@link https://api.jquery.com/event.pageX/ }\` + * @since 1.0.4 + * @example ​ ````Show the mouse position relative to the left and top edges of the document (within this iframe). +```html + + + + + event.pageX demo + + + + +​ +
+​ + +​ + + +``` + */ + pageX: number; + /** + * The mouse position relative to the top edge of the document. + * @see \`{@link https://api.jquery.com/event.pageY/ }\` + * @since 1.0.4 + * @example ​ ````Show the mouse position relative to the left and top edges of the document (within this iframe). +```html + + + + + event.pageY demo + + + + +​ +
+​ + +​ + + +``` + */ + pageY: number; + screenX: number; + screenY: number; + /** @deprecated */ + toElement: Element; + + // PointerEvent + + pointerId: undefined; + pointerType: undefined; + + // KeyboardEvent + + /** @deprecated */ + char: undefined; + /** @deprecated */ + charCode: undefined; + key: undefined; + /** @deprecated */ + keyCode: undefined; + + // TouchEvent + + changedTouches: undefined; + targetTouches: undefined; + touches: undefined; + + // MouseEvent, KeyboardEvent + + /** + * For key or mouse events, this property indicates the specific key or button that was pressed. + * @see \`{@link https://api.jquery.com/event.which/ }\` + * @since 1.1.3 + * @deprecated ​ Deprecated since 3.3. See \`{@link https://github.com/jquery/api.jquery.com/issues/821 }\`. + * @example ​ ````Log which key was depressed. +```html + + + + + event.which demo + + + +​ + +
+​ + +​ + + +``` + * @example ​ ````Log which mouse button was depressed. +```html + + + + + event.which demo + + + +​ + +
+​ + +​ + + +``` + */ + which: number; + + // MouseEvent, KeyboardEvent, TouchEvent + + altKey: boolean; + ctrlKey: boolean; + /** + * Indicates whether the META key was pressed when the event fired. + * @see \`{@link https://api.jquery.com/event.metaKey/ }\` + * @since 1.0.4 + * @example ​ ````Determine whether the META key was pressed when the event fired. +```html + + + + + event.metaKey demo + + + + +​ + +
+​ + +​ + + +``` + */ + metaKey: boolean; + shiftKey: boolean; + + originalEvent?: _MouseEvent; + } + + interface ClickEvent< + TDelegateTarget = any, + TData = any, + TCurrentTarget = any, + TTarget = any + > extends MouseEventBase { + /** + * The other DOM element involved in the event, if any. + * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\` + * @since 1.1.4 + * @example ​ ````On mouseout of anchors, alert the element type being entered. + ```javascript + $( "a" ).mouseout(function( event ) { + alert( event.relatedTarget.nodeName ); // "DIV" + }); + ``` + */ + relatedTarget?: null; + + type: 'click'; + } + + interface ContextMenuEvent< + TDelegateTarget = any, + TData = any, + TCurrentTarget = any, + TTarget = any + > extends MouseEventBase { + /** + * The other DOM element involved in the event, if any. + * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\` + * @since 1.1.4 + * @example ​ ````On mouseout of anchors, alert the element type being entered. + ```javascript + $( "a" ).mouseout(function( event ) { + alert( event.relatedTarget.nodeName ); // "DIV" + }); + ``` + */ + relatedTarget?: null; + + type: 'contextmenu'; + } + + interface DoubleClickEvent< + TDelegateTarget = any, + TData = any, + TCurrentTarget = any, + TTarget = any + > extends MouseEventBase { + /** + * The other DOM element involved in the event, if any. + * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\` + * @since 1.1.4 + * @example ​ ````On mouseout of anchors, alert the element type being entered. + ```javascript + $( "a" ).mouseout(function( event ) { + alert( event.relatedTarget.nodeName ); // "DIV" + }); + ``` + */ + relatedTarget?: null; + + type: 'dblclick'; + } + + interface MouseDownEvent< + TDelegateTarget = any, + TData = any, + TCurrentTarget = any, + TTarget = any + > extends MouseEventBase { + /** + * The other DOM element involved in the event, if any. + * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\` + * @since 1.1.4 + * @example ​ ````On mouseout of anchors, alert the element type being entered. + ```javascript + $( "a" ).mouseout(function( event ) { + alert( event.relatedTarget.nodeName ); // "DIV" + }); + ``` + */ + relatedTarget?: null; + + type: 'mousedown'; + } + + interface MouseEnterEvent< + TDelegateTarget = any, + TData = any, + TCurrentTarget = any, + TTarget = any + > extends MouseEventBase { + // Special handling by jQuery. + type: 'mouseover'; + } + + interface MouseLeaveEvent< + TDelegateTarget = any, + TData = any, + TCurrentTarget = any, + TTarget = any + > extends MouseEventBase { + // Special handling by jQuery. + type: 'mouseout'; + } + + interface MouseMoveEvent< + TDelegateTarget = any, + TData = any, + TCurrentTarget = any, + TTarget = any + > extends MouseEventBase { + /** + * The other DOM element involved in the event, if any. + * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\` + * @since 1.1.4 + * @example ​ ````On mouseout of anchors, alert the element type being entered. + ```javascript + $( "a" ).mouseout(function( event ) { + alert( event.relatedTarget.nodeName ); // "DIV" + }); + ``` + */ + relatedTarget?: null; + + type: 'mousemove'; + } + + interface MouseOutEvent< + TDelegateTarget = any, + TData = any, + TCurrentTarget = any, + TTarget = any + > extends MouseEventBase { + type: 'mouseout'; + } + + interface MouseOverEvent< + TDelegateTarget = any, + TData = any, + TCurrentTarget = any, + TTarget = any + > extends MouseEventBase { + type: 'mouseover'; + } + + interface MouseUpEvent< + TDelegateTarget = any, + TData = any, + TCurrentTarget = any, + TTarget = any + > extends MouseEventBase { + /** + * The other DOM element involved in the event, if any. + * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\` + * @since 1.1.4 + * @example ​ ````On mouseout of anchors, alert the element type being entered. + ```javascript + $( "a" ).mouseout(function( event ) { + alert( event.relatedTarget.nodeName ); // "DIV" + }); + ``` + */ + relatedTarget?: null; + + type: 'mouseup'; + } + + // #endregion + + // region KeyboardEvent + // #region KeyboardEvent + + interface KeyboardEventBase< + TDelegateTarget = any, + TData = any, + TCurrentTarget = any, + TTarget = any + > extends UIEventBase { + /** + * The other DOM element involved in the event, if any. + * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\` + * @since 1.1.4 + * @example ​ ````On mouseout of anchors, alert the element type being entered. +```javascript +$( "a" ).mouseout(function( event ) { + alert( event.relatedTarget.nodeName ); // "DIV" +}); +``` + */ + relatedTarget?: undefined; + + // MouseEvent + + button: undefined; + buttons: undefined; + clientX: undefined; + clientY: undefined; + offsetX: undefined; + offsetY: undefined; + /** + * The mouse position relative to the left edge of the document. + * @see \`{@link https://api.jquery.com/event.pageX/ }\` + * @since 1.0.4 + * @example ​ ````Show the mouse position relative to the left and top edges of the document (within this iframe). +```html + + + + + event.pageX demo + + + + +​ +
+​ + +​ + + +``` + */ + pageX: undefined; + /** + * The mouse position relative to the top edge of the document. + * @see \`{@link https://api.jquery.com/event.pageY/ }\` + * @since 1.0.4 + * @example ​ ````Show the mouse position relative to the left and top edges of the document (within this iframe). +```html + + + + + event.pageY demo + + + + +​ +
+​ + +​ + + +``` + */ + pageY: undefined; + screenX: undefined; + screenY: undefined; + /** @deprecated */ + toElement: undefined; + + // PointerEvent + + pointerId: undefined; + pointerType: undefined; + + // KeyboardEvent + + /** @deprecated */ + char: string | undefined; + /** @deprecated */ + charCode: number; + key: string; + /** @deprecated */ + keyCode: number; + + // TouchEvent + + changedTouches: undefined; + targetTouches: undefined; + touches: undefined; + + // MouseEvent, KeyboardEvent + + /** + * For key or mouse events, this property indicates the specific key or button that was pressed. + * @see \`{@link https://api.jquery.com/event.which/ }\` + * @since 1.1.3 + * @deprecated ​ Deprecated since 3.3. See \`{@link https://github.com/jquery/api.jquery.com/issues/821 }\`. + * @example ​ ````Log which key was depressed. +```html + + + + + event.which demo + + + +​ + +
+​ + +​ + + +``` + * @example ​ ````Log which mouse button was depressed. +```html + + + + + event.which demo + + + +​ + +
+​ + +​ + + +``` + */ + which: number; + + // MouseEvent, KeyboardEvent, TouchEvent + + altKey: boolean; + ctrlKey: boolean; + /** + * Indicates whether the META key was pressed when the event fired. + * @see \`{@link https://api.jquery.com/event.metaKey/ }\` + * @since 1.0.4 + * @example ​ ````Determine whether the META key was pressed when the event fired. +```html + + + + + event.metaKey demo + + + + +​ + +
+​ + +​ + + +``` + */ + metaKey: boolean; + shiftKey: boolean; + + originalEvent?: _KeyboardEvent; + } + + interface KeyDownEvent< + TDelegateTarget = any, + TData = any, + TCurrentTarget = any, + TTarget = any + > extends KeyboardEventBase { + type: 'keydown'; + } + + interface KeyPressEvent< + TDelegateTarget = any, + TData = any, + TCurrentTarget = any, + TTarget = any + > extends KeyboardEventBase { + type: 'keypress'; + } + + interface KeyUpEvent< + TDelegateTarget = any, + TData = any, + TCurrentTarget = any, + TTarget = any + > extends KeyboardEventBase { + type: 'keyup'; + } + + // #endregion + + // region FocusEvent + // #region FocusEvent + + interface FocusEventBase< + TDelegateTarget = any, + TData = any, + TCurrentTarget = any, + TTarget = any + > extends UIEventBase { + /** + * The other DOM element involved in the event, if any. + * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\` + * @since 1.1.4 + * @example ​ ````On mouseout of anchors, alert the element type being entered. +```javascript +$( "a" ).mouseout(function( event ) { + alert( event.relatedTarget.nodeName ); // "DIV" +}); +``` + */ + relatedTarget?: EventTarget | null; + + // MouseEvent + + button: undefined; + buttons: undefined; + clientX: undefined; + clientY: undefined; + offsetX: undefined; + offsetY: undefined; + /** + * The mouse position relative to the left edge of the document. + * @see \`{@link https://api.jquery.com/event.pageX/ }\` + * @since 1.0.4 + * @example ​ ````Show the mouse position relative to the left and top edges of the document (within this iframe). +```html + + + + + event.pageX demo + + + + +​ +
+​ + +​ + + +``` + */ + pageX: undefined; + /** + * The mouse position relative to the top edge of the document. + * @see \`{@link https://api.jquery.com/event.pageY/ }\` + * @since 1.0.4 + * @example ​ ````Show the mouse position relative to the left and top edges of the document (within this iframe). +```html + + + + + event.pageY demo + + + + +​ +
+​ + +​ + + +``` + */ + pageY: undefined; + screenX: undefined; + screenY: undefined; + /** @deprecated */ + toElement: undefined; + + // PointerEvent + + pointerId: undefined; + pointerType: undefined; + + // KeyboardEvent + + /** @deprecated */ + char: undefined; + /** @deprecated */ + charCode: undefined; + key: undefined; + /** @deprecated */ + keyCode: undefined; + + // TouchEvent + + changedTouches: undefined; + targetTouches: undefined; + touches: undefined; + + // MouseEvent, KeyboardEvent + + /** + * For key or mouse events, this property indicates the specific key or button that was pressed. + * @see \`{@link https://api.jquery.com/event.which/ }\` + * @since 1.1.3 + * @deprecated ​ Deprecated since 3.3. See \`{@link https://github.com/jquery/api.jquery.com/issues/821 }\`. + * @example ​ ````Log which key was depressed. +```html + + + + + event.which demo + + + +​ + +
+​ + +​ + + +``` + * @example ​ ````Log which mouse button was depressed. +```html + + + + + event.which demo + + + +​ + +
+​ + +​ + + +``` + */ + which: undefined; + + // MouseEvent, KeyboardEvent, TouchEvent + + altKey: undefined; + ctrlKey: undefined; + /** + * Indicates whether the META key was pressed when the event fired. + * @see \`{@link https://api.jquery.com/event.metaKey/ }\` + * @since 1.0.4 + * @example ​ ````Determine whether the META key was pressed when the event fired. +```html + + + + + event.metaKey demo + + + + +​ + +
+​ + +​ + + +``` + */ + metaKey: undefined; + shiftKey: undefined; + + originalEvent?: _FocusEvent; + } + + interface BlurEvent< + TDelegateTarget = any, + TData = any, + TCurrentTarget = any, + TTarget = any + > extends FocusEventBase { + type: 'blur'; + } + + interface FocusEvent< + TDelegateTarget = any, + TData = any, + TCurrentTarget = any, + TTarget = any + > extends FocusEventBase { + type: 'focus'; + } + + interface FocusInEvent< + TDelegateTarget = any, + TData = any, + TCurrentTarget = any, + TTarget = any + > extends FocusEventBase { + type: 'focusin'; + } + + interface FocusOutEvent< + TDelegateTarget = any, + TData = any, + TCurrentTarget = any, + TTarget = any + > extends FocusEventBase { + type: 'focusout'; + } + + // #endregion + + // #endregion + interface TypeToTriggeredEventMap< TDelegateTarget, TData, TCurrentTarget, TTarget > { + // Event + + change: ChangeEvent; + resize: ResizeEvent; + scroll: ScrollEvent; + select: SelectEvent; + submit: SubmitEvent; + + // UIEvent + + // MouseEvent + + click: ClickEvent; + contextmenu: ContextMenuEvent; + dblclick: DoubleClickEvent; + mousedown: MouseDownEvent; + mouseenter: MouseEnterEvent; + mouseleave: MouseLeaveEvent; + mousemove: MouseMoveEvent; + mouseout: MouseOutEvent; + mouseover: MouseOverEvent; + mouseup: MouseUpEvent; + + // KeyboardEvent + + keydown: KeyDownEvent; + keypress: KeyPressEvent; + keyup: KeyUpEvent; + + // FocusEvent + + blur: BlurEvent; + focus: FocusEvent; + focusin: FocusInEvent; + focusout: FocusOutEvent; + [type: string]: TriggeredEvent; } @@ -4985,6 +6263,10 @@ declare const jQuery: JQueryStatic; declare const $: JQueryStatic; type _Event = Event; +type _UIEvent = UIEvent; +type _MouseEvent = MouseEvent; +type _KeyboardEvent = KeyboardEvent; +type _FocusEvent = FocusEvent; // region ES5 compatibility // #region ES5 compatibility From acc34c5a2347ae1d58bda9dd72fe22c9f56ad959 Mon Sep 17 00:00:00 2001 From: Leonard Thieu Date: Sun, 28 Oct 2018 10:50:28 -0400 Subject: [PATCH 079/608] [angular] Update merging tests for jQuery Events API changes. --- types/angular/test/jquery3-merging-tests.ts | 210 +------------------- 1 file changed, 10 insertions(+), 200 deletions(-) diff --git a/types/angular/test/jquery3-merging-tests.ts b/types/angular/test/jquery3-merging-tests.ts index 507c58b67e..da61a6f0bc 100644 --- a/types/angular/test/jquery3-merging-tests.ts +++ b/types/angular/test/jquery3-merging-tests.ts @@ -94,8 +94,6 @@ function JQuery() { } function bind() { - interface I1 { kind: 'I1'; } - // $ExpectType JQuery $('p').bind('myEvent', 'myData', function(event) { // TODO: $ExpectType HTMLElement @@ -104,14 +102,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').bind('myEvent', 'myData', function(this: I1, event) { - // $ExpectType I1 - this; - // TODO: $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').bind('myEvent', function(event) { // TODO: $ExpectType HTMLElement @@ -120,14 +110,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('p').bind('myEvent', function(this: I1, event) { - // $ExpectType I1 - this; - // TODO: $ExpectType Event - event; - }); - // $ExpectType JQuery $('p').bind('myEvent', false); @@ -139,12 +121,6 @@ function JQuery() { this; // TODO: $ExpectType Event event; - }, - myEvent3(this: I1, event) { - // $ExpectType I1 - this; - // TODO: $ExpectType Event - event; } }); @@ -164,27 +140,15 @@ function JQuery() { } function off() { - function defaultContext_defaultData(this: HTMLElement, event: JQueryEventObject) { } + function defaultData(this: HTMLElement, event: JQueryEventObject) { } - function defaultContext_customData(this: HTMLElement, event: JQueryEventObject) { } - - function customContext_defaultData(this: I1, event: JQueryEventObject) { } - - function customContext_customData(this: I1, event: JQueryEventObject) { } - - interface I1 { kind: 'I1'; } + function customData(this: HTMLElement, event: JQueryEventObject) { } // $ExpectType JQuery - $('table').off('myEvent', 'td', defaultContext_defaultData); + $('table').off('myEvent', 'td', defaultData); // $ExpectType JQuery - $('table').off('myEvent', 'td', defaultContext_customData); - - // $ExpectType JQuery - $('table').off('myEvent', 'td', customContext_defaultData); - - // $ExpectType JQuery - $('table').off('myEvent', 'td', customContext_customData); + $('table').off('myEvent', 'td', customData); // $ExpectType JQuery $('table').off('myEvent', 'td', false); @@ -193,16 +157,10 @@ function JQuery() { $('table').off('myEvent', 'td'); // $ExpectType JQuery - $('table').off('myEvent', defaultContext_defaultData); + $('table').off('myEvent', defaultData); // $ExpectType JQuery - $('table').off('myEvent', defaultContext_customData); - - // $ExpectType JQuery - $('table').off('myEvent', customContext_defaultData); - - // $ExpectType JQuery - $('table').off('myEvent', customContext_customData); + $('table').off('myEvent', customData); // $ExpectType JQuery $('table').off('myEvent', false); @@ -213,19 +171,15 @@ function JQuery() { // $ExpectType JQuery $('table').off({ myEvent1: false, - defaultContext_defaultData, - defaultContext_customData, - customContext_defaultData, - customContext_customData + defaultData, + customData }, 'td'); // $ExpectType JQuery $('table').off({ myEvent1: false, - defaultContext_defaultData, - defaultContext_customData, - customContext_defaultData, - customContext_customData + defaultData, + customData }); // $ExpectType JQuery @@ -236,8 +190,6 @@ function JQuery() { } function on() { - interface I1 { kind: 'I1'; } - // $ExpectType JQuery $('table').on('myEvent', 'td', 'myData', function(event) { // TODO: $ExpectType HTMLElement @@ -246,14 +198,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('table').on('myEvent', 'td', 'myData', function(this: I1, event) { - // $ExpectType I1 - this; - // TODO: $ExpectType Event - event; - }); - // $ExpectType JQuery $('table').on('myEvent', null, 'myData', function(event) { // TODO: $ExpectType HTMLElement @@ -262,14 +206,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('table').on('myEvent', null, 'myData', function(this: I1, event) { - // $ExpectType I1 - this; - // TODO: $ExpectType Event - event; - }); - // $ExpectType JQuery $('table').on('myEvent', 'td', function(event) { // TODO: $ExpectType HTMLElement @@ -278,14 +214,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('table').on('myEvent', 'td', function(this: I1, event) { - // $ExpectType I1 - this; - // TODO: $ExpectType Event - event; - }); - // $ExpectType JQuery $('table').on('myEvent', 'td', false); @@ -297,14 +225,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('table').on('myEvent', 3, function(this: I1, event) { - // $ExpectType I1 - this; - // TODO: $ExpectType Event - event; - }); - // $ExpectType JQuery $('table').on('myEvent', function(event) { // TODO: $ExpectType HTMLElement @@ -313,14 +233,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('table').on('myEvent', function(this: I1, event) { - // $ExpectType I1 - this; - // TODO: $ExpectType Event - event; - }); - // $ExpectType JQuery $('table').on('myEvent', false); @@ -332,12 +244,6 @@ function JQuery() { this; // TODO: $ExpectType Event event; - }, - myEvent3(this: I1, event) { - // $ExpectType I1 - this; - // TODO: $ExpectType Event - event; } }, 'td', 'myData'); @@ -349,12 +255,6 @@ function JQuery() { this; // TODO: $ExpectType Event event; - }, - myEvent3(this: I1, event) { - // $ExpectType I1 - this; - // TODO: $ExpectType Event - event; } }, null, 'myData'); @@ -366,12 +266,6 @@ function JQuery() { this; // TODO: $ExpectType Event event; - }, - myEvent3(this: I1, event) { - // $ExpectType I1 - this; - // TODO: $ExpectType Event - event; } }, 'td'); @@ -383,12 +277,6 @@ function JQuery() { this; // TODO: $ExpectType Event event; - }, - myEvent3(this: I1, event) { - // $ExpectType I1 - this; - // TODO: $ExpectType Event - event; } }, 3); @@ -400,19 +288,11 @@ function JQuery() { this; // TODO: $ExpectType Event event; - }, - myEvent3(this: I1, event) { - // $ExpectType I1 - this; - // TODO: $ExpectType Event - event; } }); } function one() { - interface I1 { kind: 'I1'; } - // $ExpectType JQuery $('table').one('myEvent', 'td', 'myData', function(event) { // TODO: $ExpectType HTMLElement @@ -421,14 +301,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('table').one('myEvent', 'td', 'myData', function(this: I1, event) { - // $ExpectType I1 - this; - // TODO: $ExpectType Event - event; - }); - // $ExpectType JQuery $('table').one('myEvent', null, 'myData', function(event) { // TODO: $ExpectType HTMLElement @@ -437,14 +309,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('table').one('myEvent', null, 'myData', function(this: I1, event) { - // $ExpectType I1 - this; - // TODO: $ExpectType Event - event; - }); - // $ExpectType JQuery $('table').one('myEvent', 'td', function(event) { // TODO: $ExpectType HTMLElement @@ -453,14 +317,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('table').one('myEvent', 'td', function(this: I1, event) { - // $ExpectType I1 - this; - // TODO: $ExpectType Event - event; - }); - // $ExpectType JQuery $('table').one('myEvent', 'td', false); @@ -472,14 +328,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('table').one('myEvent', 3, function(this: I1, event) { - // $ExpectType I1 - this; - // TODO: $ExpectType Event - event; - }); - // $ExpectType JQuery $('table').one('myEvent', function(event) { // TODO: $ExpectType HTMLElement @@ -488,14 +336,6 @@ function JQuery() { event; }); - // $ExpectType JQuery - $('table').one('myEvent', function(this: I1, event) { - // $ExpectType I1 - this; - // TODO: $ExpectType Event - event; - }); - // $ExpectType JQuery $('table').one('myEvent', false); @@ -507,12 +347,6 @@ function JQuery() { this; // TODO: $ExpectType Event event; - }, - myEvent3(this: I1, event) { - // $ExpectType I1 - this; - // TODO: $ExpectType Event - event; } }, 'td', 'myData'); @@ -524,12 +358,6 @@ function JQuery() { this; // TODO: $ExpectType Event event; - }, - myEvent3(this: I1, event) { - // $ExpectType I1 - this; - // TODO: $ExpectType Event - event; } }, null, 'myData'); @@ -541,12 +369,6 @@ function JQuery() { this; // TODO: $ExpectType Event event; - }, - myEvent3(this: I1, event) { - // $ExpectType I1 - this; - // TODO: $ExpectType Event - event; } }, 'td'); @@ -558,12 +380,6 @@ function JQuery() { this; // TODO: $ExpectType Event event; - }, - myEvent3(this: I1, event) { - // $ExpectType I1 - this; - // TODO: $ExpectType Event - event; } }, 3); @@ -575,12 +391,6 @@ function JQuery() { this; // TODO: $ExpectType Event event; - }, - myEvent3(this: I1, event) { - // $ExpectType I1 - this; - // TODO: $ExpectType Event - event; } }); } From 68c38a850c846788505bc8fd34398e19136983e0 Mon Sep 17 00:00:00 2001 From: Leonard Thieu Date: Sun, 28 Oct 2018 11:45:11 -0400 Subject: [PATCH 080/608] [backbone] Fix test failure in `backbone.marionette` due to changes in jQuery Events API. --- types/backbone/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/backbone/index.d.ts b/types/backbone/index.d.ts index ca36541735..a881284c8f 100644 --- a/types/backbone/index.d.ts +++ b/types/backbone/index.d.ts @@ -92,7 +92,7 @@ declare namespace Backbone { } interface EventsHash { - [selector: string]: string | {(eventObject: JQueryEventObject): void}; + [selector: string]: string | {(eventObject: JQuery.TriggeredEvent): void}; } export const Events: Events; From b6bb6a64fd214d0f25711c6e79572cf35ad1f07c Mon Sep 17 00:00:00 2001 From: Leonard Thieu Date: Sun, 28 Oct 2018 11:01:29 -0400 Subject: [PATCH 081/608] [bootstrap] Update API for jQuery Events API changes. --- types/bootstrap/index.d.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/types/bootstrap/index.d.ts b/types/bootstrap/index.d.ts index 8a815bccd5..9744731237 100755 --- a/types/bootstrap/index.d.ts +++ b/types/bootstrap/index.d.ts @@ -322,7 +322,7 @@ export interface TooltipOption { // Events // -------------------------------------------------------------------------------------- -export interface CarouselEventHandler extends JQuery.Event { +export interface CarouselEventHandler extends JQuery.TriggeredEvent { /** * The direction in which the carousel is sliding. */ @@ -339,6 +339,10 @@ export interface CarouselEventHandler extends JQuery.Event extends JQuery.TriggeredEvent { + relatedTarget: HTMLElement; +} + export type AlertEvent = "close.bs.alert" | "closed.bs.alert"; export type CarouselEvent = "slide.bs.carousel" | "slid.bs.carousel"; export type CollapseEvent = "show.bs.collapse" | "shown.bs.collapse" | "hide.bs.collapse" | "hidden.bs.collapse"; @@ -383,9 +387,10 @@ declare global { tooltip(options?: TooltipOption): this; on(events: CarouselEvent, handler: JQuery.EventHandlerBase>): this; + on(events: TapEvent, handler: JQuery.EventHandlerBase>): this; on(events: AlertEvent | CollapseEvent | DropdownEvent | ModalEvent | - PopoverEvent | ScrollspyEvent | TapEvent | TooltipEvent, + PopoverEvent | ScrollspyEvent | TooltipEvent, handler: JQuery.EventHandler): this; } } From 5f6b28023b302f089330ef5bb86ac8d805df5b75 Mon Sep 17 00:00:00 2001 From: Leonard Thieu Date: Sun, 28 Oct 2018 11:03:13 -0400 Subject: [PATCH 082/608] [bootstrap-slider] Fix test failure due to jQuery Events API changes. --- types/bootstrap-slider/bootstrap-slider-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/bootstrap-slider/bootstrap-slider-tests.ts b/types/bootstrap-slider/bootstrap-slider-tests.ts index 9b2a1a2014..d3ffdeedeb 100644 --- a/types/bootstrap-slider/bootstrap-slider-tests.ts +++ b/types/bootstrap-slider/bootstrap-slider-tests.ts @@ -42,7 +42,7 @@ $(() => { $('#ex7').slider(); - $('#ex7-enabled').click(function(this: HTMLInputElement) { + $('#ex7-enabled').click(function() { if (this.checked) { // With JQuery $('#ex7').slider('enable'); From c1ce5ef2c241a4fdcfc4b181428a1f6500dcaa0d Mon Sep 17 00:00:00 2001 From: Leonard Thieu Date: Sun, 28 Oct 2018 11:04:44 -0400 Subject: [PATCH 083/608] [jquery-focus-exit] Update API for jQuery Events API changes. --- types/jquery-focus-exit/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/jquery-focus-exit/index.d.ts b/types/jquery-focus-exit/index.d.ts index 8787136a4e..d4da0a1f18 100644 --- a/types/jquery-focus-exit/index.d.ts +++ b/types/jquery-focus-exit/index.d.ts @@ -14,7 +14,7 @@ export interface FocusElements { declare global { interface JQuery { focusExit(options?: { debug: boolean }): JQuery; - on(event: 'focusExit', handler: ((event: JQuery.Event, data: FocusElements) => void)): JQuery; - one(event: 'focusin', handler: ((event: JQuery.Event) => void)): JQuery; + on(event: 'focusExit', handler: ((event: JQuery.TriggeredEvent, data: FocusElements) => void)): JQuery; + one(event: 'focusin', handler: ((event: JQuery.TriggeredEvent) => void)): JQuery; } } From 8914a468a462141bd3817bbbccaa2f0ecb947436 Mon Sep 17 00:00:00 2001 From: Leonard Thieu Date: Sun, 28 Oct 2018 11:05:22 -0400 Subject: [PATCH 084/608] [jquery-mouse-exit] Update API for jQuery Events API changes. --- types/jquery-mouse-exit/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/jquery-mouse-exit/index.d.ts b/types/jquery-mouse-exit/index.d.ts index f0ba17996e..651a7b3f85 100644 --- a/types/jquery-mouse-exit/index.d.ts +++ b/types/jquery-mouse-exit/index.d.ts @@ -18,6 +18,6 @@ export type FocusElements = Partial<{ declare global { interface JQuery { mouseExit(options?: Options): JQuery; - on(event: 'mouseExit', handler: ((event: JQuery.Event, data: FocusElements) => void)): JQuery; + on(event: 'mouseExit', handler: ((event: JQuery.TriggeredEvent, data: FocusElements) => void)): JQuery; } } From e1d3c4aba92261ee7d9090f713524243fa5433b6 Mon Sep 17 00:00:00 2001 From: Leonard Thieu Date: Sun, 28 Oct 2018 11:07:58 -0400 Subject: [PATCH 085/608] [semantic-ui-form] Update API for jQuery Events API changes. --- types/semantic-ui-form/global.d.ts | 2 +- types/semantic-ui-form/semantic-ui-form-tests.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/types/semantic-ui-form/global.d.ts b/types/semantic-ui-form/global.d.ts index 8e5b2c20b8..1f3294c8d6 100644 --- a/types/semantic-ui-form/global.d.ts +++ b/types/semantic-ui-form/global.d.ts @@ -212,7 +212,7 @@ declare namespace SemanticUI { /** * Callback if a form is all valid */ - onSuccess(this: JQuery, event: JQuery.Event, fields: any): void; + onSuccess(this: JQuery, event: JQuery.TriggeredEvent, fields: any): void; /** * Callback if any form field is invalid */ diff --git a/types/semantic-ui-form/semantic-ui-form-tests.ts b/types/semantic-ui-form/semantic-ui-form-tests.ts index f17ca33112..d481cb00ad 100644 --- a/types/semantic-ui-form/semantic-ui-form-tests.ts +++ b/types/semantic-ui-form/semantic-ui-form-tests.ts @@ -144,7 +144,7 @@ function test_form() { }, onSuccess(event, fields) { this; // $ExpectType JQuery - event; // $ExpectType Event + event; // $ExpectType TriggeredEvent fields; // $ExpectType any }, onFailure(formErrors, fields) { From 8f46997efa62f7e42f8c87a3efde06e7ec69ec7e Mon Sep 17 00:00:00 2001 From: Leonard Thieu Date: Sun, 28 Oct 2018 11:28:43 -0400 Subject: [PATCH 086/608] [sharepoint] Fix test failure due to jQuery Events API changes. --- types/sharepoint/sharepoint-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/sharepoint/sharepoint-tests.ts b/types/sharepoint/sharepoint-tests.ts index e76536cd18..d3bbe1f808 100644 --- a/types/sharepoint/sharepoint-tests.ts +++ b/types/sharepoint/sharepoint-tests.ts @@ -2038,7 +2038,7 @@ namespace _ { // do is retrieve a reference to the term set with the same ID as the div, and // then add the term that belong to that term set under the div that was clicked. - function showTerms(event: JQuery.Event, groupID: SP.Guid, termSetID: SP.Guid) { + function showTerms(event: JQuery.ClickEvent, groupID: SP.Guid, termSetID: SP.Guid) { // First, cancel the bubble so that the group div click handler does not also fire // because that removes all term set divs and we don't want that here. event.originalEvent.cancelBubble = true; From 3a54bad0684cc88f91cfeac115d57554fc494c62 Mon Sep 17 00:00:00 2001 From: Leonard Thieu Date: Sun, 28 Oct 2018 11:26:51 -0400 Subject: [PATCH 087/608] [jquery] Add support for touch events. Fixes test failures in `viewporter` due to changes in jQuery Events API. --- types/jquery/misc.d.ts | 271 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 271 insertions(+) diff --git a/types/jquery/misc.d.ts b/types/jquery/misc.d.ts index 24979fb620..dd05435043 100644 --- a/types/jquery/misc.d.ts +++ b/types/jquery/misc.d.ts @@ -5716,6 +5716,269 @@ $( "#checkMetaKey" ).click(function( event ) { // #endregion + // region TouchEvent + // #region TouchEvent + + interface TouchEventBase< + TDelegateTarget = any, + TData = any, + TCurrentTarget = any + > extends UIEventBase { + /** + * The other DOM element involved in the event, if any. + * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\` + * @since 1.1.4 + * @example ​ ````On mouseout of anchors, alert the element type being entered. +```javascript +$( "a" ).mouseout(function( event ) { + alert( event.relatedTarget.nodeName ); // "DIV" +}); +``` + */ + relatedTarget?: undefined; + + // MouseEvent + + button: undefined; + buttons: undefined; + clientX: undefined; + clientY: undefined; + offsetX: undefined; + offsetY: undefined; + /** + * The mouse position relative to the left edge of the document. + * @see \`{@link https://api.jquery.com/event.pageX/ }\` + * @since 1.0.4 + * @example ​ ````Show the mouse position relative to the left and top edges of the document (within this iframe). +```html + + + + + event.pageX demo + + + + +​ +
+​ + +​ + + +``` + */ + pageX: undefined; + /** + * The mouse position relative to the top edge of the document. + * @see \`{@link https://api.jquery.com/event.pageY/ }\` + * @since 1.0.4 + * @example ​ ````Show the mouse position relative to the left and top edges of the document (within this iframe). +```html + + + + + event.pageY demo + + + + +​ +
+​ + +​ + + +``` + */ + pageY: undefined; + screenX: undefined; + screenY: undefined; + /** @deprecated */ + toElement: undefined; + + // PointerEvent + + pointerId: undefined; + pointerType: undefined; + + // KeyboardEvent + + /** @deprecated */ + char: undefined; + /** @deprecated */ + charCode: undefined; + key: undefined; + /** @deprecated */ + keyCode: undefined; + + // TouchEvent + + changedTouches: TouchList; + targetTouches: TouchList; + touches: TouchList; + + // MouseEvent, KeyboardEvent + + /** + * For key or mouse events, this property indicates the specific key or button that was pressed. + * @see \`{@link https://api.jquery.com/event.which/ }\` + * @since 1.1.3 + * @deprecated ​ Deprecated since 3.3. See \`{@link https://github.com/jquery/api.jquery.com/issues/821 }\`. + * @example ​ ````Log which key was depressed. +```html + + + + + event.which demo + + + +​ + +
+​ + +​ + + +``` + * @example ​ ````Log which mouse button was depressed. +```html + + + + + event.which demo + + + +​ + +
+​ + +​ + + +``` + */ + which: undefined; + + // MouseEvent, KeyboardEvent, TouchEvent + + altKey: boolean; + ctrlKey: boolean; + /** + * Indicates whether the META key was pressed when the event fired. + * @see \`{@link https://api.jquery.com/event.metaKey/ }\` + * @since 1.0.4 + * @example ​ ````Determine whether the META key was pressed when the event fired. +```html + + + + + event.metaKey demo + + + + +​ + +
+​ + +​ + + +``` + */ + metaKey: boolean; + shiftKey: boolean; + + originalEvent?: _TouchEvent; + } + + interface TouchCancelEvent< + TDelegateTarget = any, + TData = any, + TCurrentTarget = any + > extends TouchEventBase { + type: 'touchcancel'; + } + + interface TouchEndEvent< + TDelegateTarget = any, + TData = any, + TCurrentTarget = any + > extends TouchEventBase { + type: 'touchend'; + } + + interface TouchMoveEvent< + TDelegateTarget = any, + TData = any, + TCurrentTarget = any + > extends TouchEventBase { + type: 'touchmove'; + } + + interface TouchStartEvent< + TDelegateTarget = any, + TData = any, + TCurrentTarget = any + > extends TouchEventBase { + type: 'touchstart'; + } + + // #endregion + // region FocusEvent // #region FocusEvent @@ -6021,6 +6284,13 @@ $( "#checkMetaKey" ).click(function( event ) { keypress: KeyPressEvent; keyup: KeyUpEvent; + // TouchEvent + + touchcancel: TouchCancelEvent; + touchend: TouchEndEvent; + touchmove: TouchMoveEvent; + touchstart: TouchStartEvent; + // FocusEvent blur: BlurEvent; @@ -6266,6 +6536,7 @@ type _Event = Event; type _UIEvent = UIEvent; type _MouseEvent = MouseEvent; type _KeyboardEvent = KeyboardEvent; +type _TouchEvent = TouchEvent; type _FocusEvent = FocusEvent; // region ES5 compatibility From db83bc720086e202f8b24e37a71cab14a65db456 Mon Sep 17 00:00:00 2001 From: Leonard Thieu Date: Wed, 31 Oct 2018 11:38:35 -0400 Subject: [PATCH 088/608] [jquery] Don't use a separate type parameter for the type of `this` in event handlers. A separate type parameter is unnecessary as `this` and `currentTarget` reference the same object. --- types/jquery/JQuery.d.ts | 158 ++++++++++++++-------------- types/jquery/misc.d.ts | 15 ++- types/jquery/test/longdesc-tests.ts | 2 +- 3 files changed, 86 insertions(+), 89 deletions(-) diff --git a/types/jquery/JQuery.d.ts b/types/jquery/JQuery.d.ts index 83e27c6754..123fad3b34 100644 --- a/types/jquery/JQuery.d.ts +++ b/types/jquery/JQuery.d.ts @@ -1347,7 +1347,7 @@ $( "p" ).before( $( "b" ) ); TData>( eventType: TType, eventData: TData, - handler: JQuery.TypeEventHandler + handler: JQuery.TypeEventHandler ): this; /** * Attach a handler to an event for the elements. @@ -1477,7 +1477,7 @@ $( "button" ).click(function() { */ bind( eventType: TType, - handler_preventBubble: JQuery.TypeEventHandler | + handler_preventBubble: JQuery.TypeEventHandler | false | null | undefined @@ -1507,7 +1507,7 @@ $( "div.test" ).bind({ }); ``` */ - bind(events: JQuery.TypeEventHandlers): this; + bind(events: JQuery.TypeEventHandlers): this; /** * Bind an event handler to the "blur" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. @@ -1521,7 +1521,7 @@ $( "div.test" ).bind({ * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ blur(eventData: TData, - handler: JQuery.TypeEventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "blur" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -1537,7 +1537,7 @@ $( "div.test" ).bind({ $( "p" ).blur(); ``` */ - blur(handler?: JQuery.TypeEventHandler | + blur(handler?: JQuery.TypeEventHandler | false): this; /** * Bind an event handler to the "change" JavaScript event, or trigger that event on an element. @@ -1552,7 +1552,7 @@ $( "p" ).blur(); * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ change(eventData: TData, - handler: JQuery.TypeEventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "change" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -1611,7 +1611,7 @@ $( "input[type='text']" ).change(function() { }); ``` */ - change(handler?: JQuery.TypeEventHandler | + change(handler?: JQuery.TypeEventHandler | false): this; /** * Get the children of each element in the set of matched elements, optionally filtered by a selector. @@ -1865,7 +1865,7 @@ $( "#stop" ).click(function() { * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ click(eventData: TData, - handler: JQuery.TypeEventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "click" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -1915,7 +1915,7 @@ $( "p" ).click(function() { $( "p" ).click(); ``` */ - click(handler?: JQuery.TypeEventHandler | + click(handler?: JQuery.TypeEventHandler | false): this; /** * Create a deep copy of the set of matched elements. @@ -2104,7 +2104,7 @@ $( "#frameDemo" ).contents().find( "a" ).css( "background-color", "#BADA55" ); * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ contextmenu(eventData: TData, - handler: JQuery.TypeEventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "contextmenu" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -2158,7 +2158,7 @@ div.contextmenu(function() { ``` */ - contextmenu(handler?: JQuery.TypeEventHandler | + contextmenu(handler?: JQuery.TypeEventHandler | false): this; /** * Set one or more CSS properties for the set of matched elements. @@ -2620,7 +2620,7 @@ $( "button" ).click(function() { * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ dblclick(eventData: TData, - handler: JQuery.TypeEventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "dblclick" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -2674,7 +2674,7 @@ divdbl.dblclick(function() { ``` */ - dblclick(handler?: JQuery.TypeEventHandler | + dblclick(handler?: JQuery.TypeEventHandler | false): this; /** * Set a timer to delay execution of subsequent items in the queue. @@ -2745,7 +2745,7 @@ $( "button" ).click(function() { selector: JQuery.Selector, eventType: TType, eventData: TData, - handler: JQuery.TypeEventHandler + handler: JQuery.TypeEventHandler ): this; /** * Attach a handler to one or more events for all elements that match the selector, now or in the future, based on a specific set of root elements. @@ -2861,7 +2861,7 @@ $( "button" ).click(function() { delegate( selector: JQuery.Selector, eventType: TType, - handler: JQuery.TypeEventHandler | + handler: JQuery.TypeEventHandler | false ): this; /** @@ -2877,7 +2877,7 @@ $( "button" ).click(function() { * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. */ delegate(selector: JQuery.Selector, - events: JQuery.TypeEventHandlers + events: JQuery.TypeEventHandlers ): this; /** * Execute the next function on the queue for the matched elements. @@ -4298,7 +4298,7 @@ $( "p span" ).first().addClass( "highlight" ); * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ focus(eventData: TData, - handler: JQuery.TypeEventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "focus" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -4350,7 +4350,7 @@ $( document ).ready(function() { }); ``` */ - focus(handler?: JQuery.TypeEventHandler | + focus(handler?: JQuery.TypeEventHandler | false): this; /** * Bind an event handler to the "focusin" event. @@ -4365,7 +4365,7 @@ $( document ).ready(function() { * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ focusin(eventData: TData, - handler: JQuery.TypeEventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "focusin" event. * @param handler A function to execute each time the event is triggered. @@ -4405,7 +4405,7 @@ $( "p" ).focusin(function() { ``` */ - focusin(handler?: JQuery.TypeEventHandler | + focusin(handler?: JQuery.TypeEventHandler | false): this; /** * Bind an event handler to the "focusout" JavaScript event. @@ -4420,7 +4420,7 @@ $( "p" ).focusin(function() { * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ focusout(eventData: TData, - handler: JQuery.TypeEventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "focusout" JavaScript event. * @param handler A function to execute each time the event is triggered. @@ -4481,7 +4481,7 @@ $( "p" ) ``` */ - focusout(handler?: JQuery.TypeEventHandler | + focusout(handler?: JQuery.TypeEventHandler | false): this; /** * Retrieve one of the elements matched by the jQuery object. @@ -4998,9 +4998,9 @@ $( "td" ).hover( $( "td" ).off( "mouseenter mouseleave" ); ``` */ - hover(handlerIn: JQuery.TypeEventHandler | + hover(handlerIn: JQuery.TypeEventHandler | false, - handlerOut: JQuery.TypeEventHandler | + handlerOut: JQuery.TypeEventHandler | false): this; /** * Bind a single handler to the matched elements, to be executed when the mouse pointer enters or leaves the elements. @@ -5067,7 +5067,7 @@ $( "li" ) ``` */ - hover(handlerInOut: JQuery.TypeEventHandler | + hover(handlerInOut: JQuery.TypeEventHandler | false): this; /** * Set the HTML contents of each element in the set of matched elements. @@ -5882,7 +5882,7 @@ $( "li" ).click(function() { * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ keydown(eventData: TData, - handler: JQuery.TypeEventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "keydown" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -5954,7 +5954,7 @@ $( "#other" ).click(function() { ``` */ - keydown(handler?: JQuery.TypeEventHandler | + keydown(handler?: JQuery.TypeEventHandler | false): this; /** * Bind an event handler to the "keypress" JavaScript event, or trigger that event on an element. @@ -5969,7 +5969,7 @@ $( "#other" ).click(function() { * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ keypress(eventData: TData, - handler: JQuery.TypeEventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "keypress" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -6041,7 +6041,7 @@ $( "#other" ).click(function() { ``` */ - keypress(handler?: JQuery.TypeEventHandler | + keypress(handler?: JQuery.TypeEventHandler | false): this; /** * Bind an event handler to the "keyup" JavaScript event, or trigger that event on an element. @@ -6056,7 +6056,7 @@ $( "#other" ).click(function() { * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ keyup(eventData: TData, - handler: JQuery.TypeEventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "keyup" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -6129,7 +6129,7 @@ $( "#other").click(function() { ``` */ - keyup(handler?: JQuery.TypeEventHandler | + keyup(handler?: JQuery.TypeEventHandler | false): this; /** * Reduce the set of matched elements to the final one in the set. @@ -6419,7 +6419,7 @@ $( "input" ).click(function() { * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ mousedown(eventData: TData, - handler: JQuery.TypeEventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "mousedown" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -6457,7 +6457,7 @@ $( "p" ) ``` */ - mousedown(handler?: JQuery.TypeEventHandler | + mousedown(handler?: JQuery.TypeEventHandler | false): this; /** * Bind an event handler to be fired when the mouse enters an element, or trigger that handler on an element. @@ -6472,7 +6472,7 @@ $( "p" ) * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ mouseenter(eventData: TData, - handler: JQuery.TypeEventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to be fired when the mouse enters an element, or trigger that handler on an element. * @param handler A function to execute each time the event is triggered. @@ -6553,7 +6553,7 @@ $( "div.enterleave" ) ``` */ - mouseenter(handler?: JQuery.TypeEventHandler | + mouseenter(handler?: JQuery.TypeEventHandler | false): this; /** * Bind an event handler to be fired when the mouse leaves an element, or trigger that handler on an element. @@ -6568,7 +6568,7 @@ $( "div.enterleave" ) * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ mouseleave(eventData: TData, - handler: JQuery.TypeEventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to be fired when the mouse leaves an element, or trigger that handler on an element. * @param handler A function to execute each time the event is triggered. @@ -6647,7 +6647,7 @@ $( "div.enterleave" ) ``` */ - mouseleave(handler?: JQuery.TypeEventHandler | + mouseleave(handler?: JQuery.TypeEventHandler | false): this; /** * Bind an event handler to the "mousemove" JavaScript event, or trigger that event on an element. @@ -6662,7 +6662,7 @@ $( "div.enterleave" ) * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ mousemove(eventData: TData, - handler: JQuery.TypeEventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "mousemove" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -6726,7 +6726,7 @@ $( "div" ).mousemove(function( event ) { ``` */ - mousemove(handler?: JQuery.TypeEventHandler | + mousemove(handler?: JQuery.TypeEventHandler | false): this; /** * Bind an event handler to the "mouseout" JavaScript event, or trigger that event on an element. @@ -6741,7 +6741,7 @@ $( "div" ).mousemove(function( event ) { * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ mouseout(eventData: TData, - handler: JQuery.TypeEventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "mouseout" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -6822,7 +6822,7 @@ $( "div.enterleave" ) ``` */ - mouseout(handler?: JQuery.TypeEventHandler | + mouseout(handler?: JQuery.TypeEventHandler | false): this; /** * Bind an event handler to the "mouseover" JavaScript event, or trigger that event on an element. @@ -6837,7 +6837,7 @@ $( "div.enterleave" ) * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ mouseover(eventData: TData, - handler: JQuery.TypeEventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "mouseover" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -6918,7 +6918,7 @@ $( "div.enterleave" ) ``` */ - mouseover(handler?: JQuery.TypeEventHandler | + mouseover(handler?: JQuery.TypeEventHandler | false): this; /** * Bind an event handler to the "mouseup" JavaScript event, or trigger that event on an element. @@ -6933,7 +6933,7 @@ $( "div.enterleave" ) * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ mouseup(eventData: TData, - handler: JQuery.TypeEventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "mouseup" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -6971,7 +6971,7 @@ $( "p" ) ``` */ - mouseup(handler?: JQuery.TypeEventHandler | + mouseup(handler?: JQuery.TypeEventHandler | false): this; /** * Get the immediately following sibling of each element in the set of matched elements. If a selector is provided, it retrieves the next sibling only if it matches that selector. @@ -7306,7 +7306,7 @@ $( "body" ).off( "click", "p", foo ); */ off(events: string, selector: JQuery.Selector, - handler: JQuery.TypeEventHandler | + handler: JQuery.TypeEventHandler | false): this; /** * Remove an event handler. @@ -7339,7 +7339,7 @@ $( "form" ).off( ".validator" ); */ off(events: string, selector_handler?: JQuery.Selector | - JQuery.TypeEventHandler | + JQuery.TypeEventHandler | false): this; /** * Remove an event handler. @@ -7349,7 +7349,7 @@ $( "form" ).off( ".validator" ); * @see \`{@link https://api.jquery.com/off/ }\` * @since 1.7 */ - off(events: JQuery.TypeEventHandlers, + off(events: JQuery.TypeEventHandlers, selector?: JQuery.Selector): this; /** * Remove an event handler. @@ -7539,7 +7539,7 @@ $( "*", document.body ).click(function( event ) { events: TType, selector: JQuery.Selector, data: TData, - handler: JQuery.TypeEventHandler + handler: JQuery.TypeEventHandler ): this; /** * Attach an event handler function for one or more events to the selected elements. @@ -7556,7 +7556,7 @@ $( "*", document.body ).click(function( event ) { events: TType, selector: null | undefined, data: TData, - handler: JQuery.TypeEventHandler + handler: JQuery.TypeEventHandler ): this; /** * Attach an event handler function for one or more events to the selected elements. @@ -7636,7 +7636,7 @@ $( "body" ).on( "click", "a", function( event ) { on( events: TType, selector: JQuery.Selector, - handler: JQuery.TypeEventHandler | + handler: JQuery.TypeEventHandler | false ): this; /** @@ -7658,7 +7658,7 @@ $( "p" ).on( "click", { foo: "bar" }, myHandler ); TData>( events: TType, data: TData, - handler: JQuery.TypeEventHandler + handler: JQuery.TypeEventHandler ): this; /** * Attach an event handler function for one or more events to the selected elements. @@ -7826,7 +7826,7 @@ $( "#cart" ).on( "mouseenter mouseleave", function( event ) { */ on( events: TType, - handler: JQuery.TypeEventHandler | + handler: JQuery.TypeEventHandler | false ): this; /** @@ -7933,7 +7933,7 @@ $( "#cart" ).on( "mouseenter mouseleave", function( event ) { * @since 1.7 */ on( - events: JQuery.TypeEventHandlers, + events: JQuery.TypeEventHandlers, selector: JQuery.Selector, data: TData ): this; @@ -7948,7 +7948,7 @@ $( "#cart" ).on( "mouseenter mouseleave", function( event ) { * @since 1.7 */ on( - events: JQuery.TypeEventHandlers, + events: JQuery.TypeEventHandlers, selector: null | undefined, data: TData ): this; @@ -7961,7 +7961,7 @@ $( "#cart" ).on( "mouseenter mouseleave", function( event ) { * @see \`{@link https://api.jquery.com/on/ }\` * @since 1.7 */ - on(events: JQuery.TypeEventHandlers, + on(events: JQuery.TypeEventHandlers, selector: JQuery.Selector ): this; /** @@ -7973,7 +7973,7 @@ $( "#cart" ).on( "mouseenter mouseleave", function( event ) { * @since 1.7 */ on( - events: JQuery.TypeEventHandlers, + events: JQuery.TypeEventHandlers, data: TData ): this; /** @@ -8024,7 +8024,7 @@ $( "div.test" ).on({ ``` */ - on(events: JQuery.TypeEventHandlers): this; + on(events: JQuery.TypeEventHandlers): this; /** * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". @@ -8040,7 +8040,7 @@ $( "div.test" ).on({ events: TType, selector: JQuery.Selector, data: TData, - handler: JQuery.TypeEventHandler + handler: JQuery.TypeEventHandler ): this; /** * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. @@ -8057,7 +8057,7 @@ $( "div.test" ).on({ events: TType, selector: null | undefined, data: TData, - handler: JQuery.TypeEventHandler + handler: JQuery.TypeEventHandler ): this; /** * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. @@ -8072,7 +8072,7 @@ $( "div.test" ).on({ one( events: TType, selector: JQuery.Selector, - handler: JQuery.TypeEventHandler | + handler: JQuery.TypeEventHandler | false ): this; /** @@ -8087,7 +8087,7 @@ $( "div.test" ).on({ TData>( events: TType, data: TData, - handler: JQuery.TypeEventHandler + handler: JQuery.TypeEventHandler ): this; /** * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. @@ -8179,7 +8179,7 @@ $(".target").one("click mouseenter", function() { */ one( events: TType, - handler: JQuery.TypeEventHandler| + handler: JQuery.TypeEventHandler| false ): this; /** @@ -8193,7 +8193,7 @@ $(".target").one("click mouseenter", function() { * @since 1.7 */ one( - events: JQuery.TypeEventHandlers, + events: JQuery.TypeEventHandlers, selector: JQuery.Selector, data: TData ): this; @@ -8208,7 +8208,7 @@ $(".target").one("click mouseenter", function() { * @since 1.7 */ one( - events: JQuery.TypeEventHandlers, + events: JQuery.TypeEventHandlers, selector: null | undefined, data: TData ): this; @@ -8221,7 +8221,7 @@ $(".target").one("click mouseenter", function() { * @see \`{@link https://api.jquery.com/one/ }\` * @since 1.7 */ - one(events: JQuery.TypeEventHandlers, + one(events: JQuery.TypeEventHandlers, selector: JQuery.Selector): this; /** * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. @@ -8232,7 +8232,7 @@ $(".target").one("click mouseenter", function() { * @since 1.7 */ one( - events: JQuery.TypeEventHandlers, + events: JQuery.TypeEventHandlers, data: TData ): this; /** @@ -8242,7 +8242,7 @@ $(".target").one("click mouseenter", function() { * @see \`{@link https://api.jquery.com/one/ }\` * @since 1.7 */ - one(events: JQuery.TypeEventHandlers): this; + one(events: JQuery.TypeEventHandlers): this; /** * Set the CSS outer height of each element in the set of matched elements. * @param value_function _@param_ `value_function` @@ -10000,7 +10000,7 @@ $( "button" ).on( "click", function() { * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ resize(eventData: TData, - handler: JQuery.TypeEventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "resize" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -10018,7 +10018,7 @@ $( window ).resize(function() { }); ``` */ - resize(handler?: JQuery.TypeEventHandler | + resize(handler?: JQuery.TypeEventHandler | false): this; /** * Bind an event handler to the "scroll" JavaScript event, or trigger that event on an element. @@ -10033,7 +10033,7 @@ $( window ).resize(function() { * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ scroll(eventData: TData, - handler: JQuery.TypeEventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "scroll" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -10083,7 +10083,7 @@ $( window ).scroll(function() { ``` */ - scroll(handler?: JQuery.TypeEventHandler | + scroll(handler?: JQuery.TypeEventHandler | false): this; /** * Set the current horizontal position of the scroll bar for each of the set of matched elements. @@ -10258,7 +10258,7 @@ $( "p:last" ).text( "scrollTop:" + p.scrollTop() ); * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ select(eventData: TData, - handler: JQuery.TypeEventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "select" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -10307,7 +10307,7 @@ $( ":input" ).select(function() { $( "input" ).select(); ``` */ - select(handler?: JQuery.TypeEventHandler | + select(handler?: JQuery.TypeEventHandler | false): this; /** * Encode a set of form elements as a string for submission. @@ -11279,7 +11279,7 @@ $( "#toggle" ).on( "click", function() { * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ submit(eventData: TData, - handler: JQuery.TypeEventHandler): this; + handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "submit" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. @@ -11348,7 +11348,7 @@ $( "form" ).submit(function() { $( "form:first" ).submit(); ``` */ - submit(handler?: JQuery.TypeEventHandler | + submit(handler?: JQuery.TypeEventHandler | false): this; /** * Set the content of each element in the set of matched elements to the specified text. @@ -11969,7 +11969,7 @@ $( "p" ).unbind( "click", foo ); // ... foo will no longer be called. ``` */ unbind(event: string, - handler: JQuery.TypeEventHandler | + handler: JQuery.TypeEventHandler | false ): this; /** @@ -12064,7 +12064,7 @@ $( "body" ).undelegate( "p", "click", foo ); */ undelegate(selector: JQuery.Selector, eventType: string, - handler: JQuery.TypeEventHandler | + handler: JQuery.TypeEventHandler | false ): this; /** @@ -12085,7 +12085,7 @@ $( "body" ).undelegate( "p", "click", foo ); */ undelegate(selector: JQuery.Selector, eventType_events: string | - JQuery.TypeEventHandlers): this; + JQuery.TypeEventHandlers): this; /** * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements. * @param namespace A selector which will be used to filter the event results. diff --git a/types/jquery/misc.d.ts b/types/jquery/misc.d.ts index dd05435043..553f3a58ed 100644 --- a/types/jquery/misc.d.ts +++ b/types/jquery/misc.d.ts @@ -6314,20 +6314,18 @@ $( "#checkMetaKey" ).click(function( event ) { TData, TCurrentTarget, TTarget, - TContext, TType extends keyof TypeToTriggeredEventMap - > = EventHandlerBase[TType]>; + > = EventHandlerBase[TType]>; interface TypeEventHandlers< TDelegateTarget, TData, TCurrentTarget, - TTarget, - TContext - > extends _TypeEventHandlers { + TTarget + > extends _TypeEventHandlers { // No idea why it's necessary to include `object` in the union but otherwise TypeScript complains that // derived types of Event are not assignable to Event. - [type: string]: TypeEventHandler | + [type: string]: TypeEventHandler | false | undefined | object; @@ -6337,11 +6335,10 @@ $( "#checkMetaKey" ).click(function( event ) { TDelegateTarget, TData, TCurrentTarget, - TTarget, - TContext + TTarget > = { [TType in keyof TypeToTriggeredEventMap]?: - TypeEventHandler | + TypeEventHandler | false | object; }; diff --git a/types/jquery/test/longdesc-tests.ts b/types/jquery/test/longdesc-tests.ts index f3cf559638..8c5382f904 100644 --- a/types/jquery/test/longdesc-tests.ts +++ b/types/jquery/test/longdesc-tests.ts @@ -538,7 +538,7 @@ function longdesc() { $('#foo').slideUp(300).delay(800).fadeIn(400); } - function delegate_0(elements: HTMLElement[], selector: string, events: string, data: any, handler: JQuery.TypeEventHandler) { + function delegate_0(elements: HTMLElement[], selector: string, events: string, data: any, handler: JQuery.TypeEventHandler) { // jQuery 1.4.3+ $(elements).delegate(selector, events, data, handler); // jQuery 1.7+ From 33c6e58f6e3d5d1bcc9d02710d7f7d634645337e Mon Sep 17 00:00:00 2001 From: Leonard Thieu Date: Thu, 1 Nov 2018 10:01:29 -0400 Subject: [PATCH 089/608] [jquery] Add missing `TTarget` type parameter to touch events. --- types/jquery/misc.d.ts | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/types/jquery/misc.d.ts b/types/jquery/misc.d.ts index 553f3a58ed..481b79e037 100644 --- a/types/jquery/misc.d.ts +++ b/types/jquery/misc.d.ts @@ -5722,8 +5722,9 @@ $( "#checkMetaKey" ).click(function( event ) { interface TouchEventBase< TDelegateTarget = any, TData = any, - TCurrentTarget = any - > extends UIEventBase { + TCurrentTarget = any, + TTarget = any + > extends UIEventBase { /** * The other DOM element involved in the event, if any. * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\` @@ -5948,32 +5949,36 @@ $( "#checkMetaKey" ).click(function( event ) { interface TouchCancelEvent< TDelegateTarget = any, TData = any, - TCurrentTarget = any - > extends TouchEventBase { + TCurrentTarget = any, + TTarget = any + > extends TouchEventBase { type: 'touchcancel'; } interface TouchEndEvent< TDelegateTarget = any, TData = any, - TCurrentTarget = any - > extends TouchEventBase { + TCurrentTarget = any, + TTarget = any + > extends TouchEventBase { type: 'touchend'; } interface TouchMoveEvent< TDelegateTarget = any, TData = any, - TCurrentTarget = any - > extends TouchEventBase { + TCurrentTarget = any, + TTarget = any + > extends TouchEventBase { type: 'touchmove'; } interface TouchStartEvent< TDelegateTarget = any, TData = any, - TCurrentTarget = any - > extends TouchEventBase { + TCurrentTarget = any, + TTarget = any + > extends TouchEventBase { type: 'touchstart'; } @@ -6286,10 +6291,10 @@ $( "#checkMetaKey" ).click(function( event ) { // TouchEvent - touchcancel: TouchCancelEvent; - touchend: TouchEndEvent; - touchmove: TouchMoveEvent; - touchstart: TouchStartEvent; + touchcancel: TouchCancelEvent; + touchend: TouchEndEvent; + touchmove: TouchMoveEvent; + touchstart: TouchStartEvent; // FocusEvent From e573d98516efcf5da8773cc97d337475405dc291 Mon Sep 17 00:00:00 2001 From: Leonard Thieu Date: Thu, 1 Nov 2018 10:39:42 -0400 Subject: [PATCH 090/608] [jquery] Add tests for `JQuery.TypeEventHandlers`. --- types/jquery/jquery-tests.ts | 161 +++++++++++++++++++++++++++++++++++ 1 file changed, 161 insertions(+) diff --git a/types/jquery/jquery-tests.ts b/types/jquery/jquery-tests.ts index 069e8613d6..c533f1b235 100644 --- a/types/jquery/jquery-tests.ts +++ b/types/jquery/jquery-tests.ts @@ -7862,6 +7862,167 @@ function JQuery_Event() { } } +function JQuery_TypeEventHandlers() { + const events: JQuery.TypeEventHandlers = { + change(event) { + // $ExpectType HTMLElement + this; + // $ExpectType ChangeEvent + event; + }, + resize(event) { + // $ExpectType HTMLElement + this; + // $ExpectType ResizeEvent + event; + }, + scroll(event) { + // $ExpectType HTMLElement + this; + // $ExpectType ScrollEvent + event; + }, + select(event) { + // $ExpectType HTMLElement + this; + // $ExpectType SelectEvent + event; + }, + submit(event) { + // $ExpectType HTMLElement + this; + // $ExpectType SubmitEvent + event; + }, + click(event) { + // $ExpectType HTMLElement + this; + // $ExpectType ClickEvent + event; + }, + contextmenu(event) { + // $ExpectType HTMLElement + this; + // $ExpectType ContextMenuEvent + event; + }, + dblclick(event) { + // $ExpectType HTMLElement + this; + // $ExpectType DoubleClickEvent + event; + }, + mousedown(event) { + // $ExpectType HTMLElement + this; + // $ExpectType MouseDownEvent + event; + }, + mouseenter(event) { + // $ExpectType HTMLElement + this; + // $ExpectType MouseEnterEvent + event; + }, + mouseleave(event) { + // $ExpectType HTMLElement + this; + // $ExpectType MouseLeaveEvent + event; + }, + mousemove(event) { + // $ExpectType HTMLElement + this; + // $ExpectType MouseMoveEvent + event; + }, + mouseout(event) { + // $ExpectType HTMLElement + this; + // $ExpectType MouseOutEvent + event; + }, + mouseover(event) { + // $ExpectType HTMLElement + this; + // $ExpectType MouseOverEvent + event; + }, + mouseup(event) { + // $ExpectType HTMLElement + this; + // $ExpectType MouseUpEvent + event; + }, + keydown(event) { + // $ExpectType HTMLElement + this; + // $ExpectType KeyDownEvent + event; + }, + keypress(event) { + // $ExpectType HTMLElement + this; + // $ExpectType KeyPressEvent + event; + }, + keyup(event) { + // $ExpectType HTMLElement + this; + // $ExpectType KeyUpEvent + event; + }, + touchcancel(event) { + // $ExpectType HTMLElement + this; + // $ExpectType TouchCancelEvent + event; + }, + touchend(event) { + // $ExpectType HTMLElement + this; + // $ExpectType TouchEndEvent + event; + }, + touchmove(event) { + // $ExpectType HTMLElement + this; + // $ExpectType TouchMoveEvent + event; + }, + touchstart(event) { + // $ExpectType HTMLElement + this; + // $ExpectType TouchStartEvent + event; + }, + blur(event) { + // $ExpectType HTMLElement + this; + // $ExpectType BlurEvent + event; + }, + focus(event) { + // $ExpectType HTMLElement + this; + // $ExpectType FocusEvent + event; + }, + focusin(event) { + // $ExpectType HTMLElement + this; + // $ExpectType FocusInEvent + event; + }, + focusout(event) { + // $ExpectType HTMLElement + this; + // $ExpectType FocusOutEvent + event; + } + }; +} + function JQuery_EventExtensions() { function special() { jQuery.event.special.multiclick = { From bf2beee34cc2b64128bbbde858a476fcaba976e2 Mon Sep 17 00:00:00 2001 From: Leonard Thieu Date: Sat, 24 Nov 2018 09:45:54 -0500 Subject: [PATCH 091/608] [jquery] Fix no-angle-bracket-type-assertion violations. --- types/jquery/test/example-tests.ts | 2 +- types/jquery/test/longdesc-tests.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/types/jquery/test/example-tests.ts b/types/jquery/test/example-tests.ts index 673e549c31..77d412f8e1 100644 --- a/types/jquery/test/example-tests.ts +++ b/types/jquery/test/example-tests.ts @@ -1578,7 +1578,7 @@ function examples() { function event_related_target_0() { $('a').mouseout(function(event) { - alert(( event.relatedTarget).nodeName); // "DIV" + alert((event.relatedTarget as HTMLElement).nodeName); // "DIV" }); } diff --git a/types/jquery/test/longdesc-tests.ts b/types/jquery/test/longdesc-tests.ts index 8c5382f904..e1ee36a575 100644 --- a/types/jquery/test/longdesc-tests.ts +++ b/types/jquery/test/longdesc-tests.ts @@ -886,7 +886,7 @@ function longdesc() { var currentRequests: JQuery.PlainObject = {}; $.ajaxPrefilter(function(options, originalOptions, jqXHR) { - if (( options).abortOnRetry) { + if ((options as any).abortOnRetry) { if (currentRequests[options.url!]) { currentRequests[options.url!].abort(); } @@ -1297,7 +1297,7 @@ function longdesc() { return $.css(elem, borderRadius!); }, set: function(elem, value) { - ( elem.style)[borderRadius!] = value; + (elem.style as any)[borderRadius!] = value; }, }; } From 1bcbf71b93f09c4a7f29d7f60a18c6dc99d6aa4d Mon Sep 17 00:00:00 2001 From: Kamontat Chantrachirathumrong Date: Sat, 24 Nov 2018 15:54:45 +0100 Subject: [PATCH 092/608] Fix error in list type --- types/prompts/index.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/types/prompts/index.d.ts b/types/prompts/index.d.ts index 7aa3f2ea63..a10a7ba243 100644 --- a/types/prompts/index.d.ts +++ b/types/prompts/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/terkelg/prompts // Definitions by: Berkay GURSOY // Daniel Perez Alvarez +// Kamontat Chantrachirathumrong // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -47,6 +48,7 @@ declare namespace prompts { interface Choice { title: string; value: string; + disable?: boolean; } interface Options { @@ -58,7 +60,7 @@ declare namespace prompts { type: ValueOrFunc; name: ValueOrFunc; message?: ValueOrFunc; - initial?: string; + initial?: string | number; style?: string; format?: PrevCaller; validate?: PrevCaller; From a34223bc90cabd779bcbb14c2d9685206c52d87d Mon Sep 17 00:00:00 2001 From: Kamontat Chantrachirathumrong Date: Sat, 24 Nov 2018 15:57:20 +0100 Subject: [PATCH 093/608] [release] Increase prompts version 1.2 --- types/prompts/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/prompts/index.d.ts b/types/prompts/index.d.ts index a10a7ba243..447d67d557 100644 --- a/types/prompts/index.d.ts +++ b/types/prompts/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for prompts 1.1 +// Type definitions for prompts 1.2 // Project: https://github.com/terkelg/prompts // Definitions by: Berkay GURSOY // Daniel Perez Alvarez From a2c196471f30c373a6127ea47bc23c7973f0a454 Mon Sep 17 00:00:00 2001 From: Kamontat Chantrachirathumrong Date: Sat, 24 Nov 2018 16:00:36 +0100 Subject: [PATCH 094/608] [improve] Add boolean as initial message --- types/prompts/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/prompts/index.d.ts b/types/prompts/index.d.ts index 447d67d557..d68f63af8e 100644 --- a/types/prompts/index.d.ts +++ b/types/prompts/index.d.ts @@ -60,7 +60,7 @@ declare namespace prompts { type: ValueOrFunc; name: ValueOrFunc; message?: ValueOrFunc; - initial?: string | number; + initial?: string | number | boolean; style?: string; format?: PrevCaller; validate?: PrevCaller; From 218607fa1be6d4394178f76e9bc490fcc46e38b5 Mon Sep 17 00:00:00 2001 From: Kamontat Chantrachirathumrong Date: Sat, 24 Nov 2018 16:06:46 +0100 Subject: [PATCH 095/608] [improve] Add falsy type to skip the question --- types/prompts/index.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/types/prompts/index.d.ts b/types/prompts/index.d.ts index d68f63af8e..e4e2fbca80 100644 --- a/types/prompts/index.d.ts +++ b/types/prompts/index.d.ts @@ -57,7 +57,7 @@ declare namespace prompts { } interface PromptObject { - type: ValueOrFunc; + type: ValueOrFunc | Falsy; name: ValueOrFunc; message?: ValueOrFunc; initial?: string | number | boolean; @@ -86,6 +86,8 @@ declare namespace prompts { values: Answers, prompt: PromptObject ) => R; + + type Falsy = false | null | undefined; type ValueOrFunc = T | PrevCaller; } From e067afd74c6a54eb618b82b92f195b9a21b7f0d8 Mon Sep 17 00:00:00 2001 From: Leonard Thieu Date: Sat, 24 Nov 2018 10:22:29 -0500 Subject: [PATCH 096/608] Disable no-angle-bracket-type-assertion rule. --- types/angular-agility/tslint.json | 3 ++- types/angular-locker/tslint.json | 3 ++- types/angular-odata-resources/tslint.json | 3 ++- types/angular-ui-tree/tslint.json | 3 ++- types/angularfire/tslint.json | 3 ++- types/bootstrap-slider/tslint.json | 5 ++++- types/datatables.net/tslint.json | 7 ++++++- types/devexpress-web/v172/tslint.json | 3 ++- types/devexpress-web/v181/tslint.json | 3 ++- types/ej.web.all/tslint.json | 3 ++- types/gridstack/tslint.json | 3 ++- types/highcharts/tslint.json | 3 ++- types/intl-tel-input/v13/tslint.json | 3 ++- types/jquery.colorpicker/tslint.json | 3 ++- types/jquery.fancytree/tslint.json | 3 ++- types/jquery.pjax/tslint.json | 3 ++- types/kendo-ui/tslint.json | 3 ++- types/ng-cordova/tslint.json | 3 ++- types/ng-flow/tslint.json | 3 ++- types/ng-grid/tslint.json | 3 ++- types/openui5/tslint.json | 3 ++- types/q/tslint.json | 3 ++- types/q/v0/tslint.json | 3 ++- types/qtip2/tslint.json | 3 ++- types/sammy/tslint.json | 3 ++- types/segment-analytics/tslint.json | 3 ++- types/selectize/tslint.json | 3 ++- types/space-pen/tslint.json | 3 ++- types/toastr/tslint.json | 3 ++- 29 files changed, 64 insertions(+), 29 deletions(-) diff --git a/types/angular-agility/tslint.json b/types/angular-agility/tslint.json index a41bf5d19a..67293bd146 100644 --- a/types/angular-agility/tslint.json +++ b/types/angular-agility/tslint.json @@ -74,6 +74,7 @@ "typedef-whitespace": false, "unified-signatures": false, "void-return": false, - "whitespace": false + "whitespace": false, + "no-angle-bracket-type-assertion": false } } diff --git a/types/angular-locker/tslint.json b/types/angular-locker/tslint.json index a41bf5d19a..67293bd146 100644 --- a/types/angular-locker/tslint.json +++ b/types/angular-locker/tslint.json @@ -74,6 +74,7 @@ "typedef-whitespace": false, "unified-signatures": false, "void-return": false, - "whitespace": false + "whitespace": false, + "no-angle-bracket-type-assertion": false } } diff --git a/types/angular-odata-resources/tslint.json b/types/angular-odata-resources/tslint.json index a41bf5d19a..67293bd146 100644 --- a/types/angular-odata-resources/tslint.json +++ b/types/angular-odata-resources/tslint.json @@ -74,6 +74,7 @@ "typedef-whitespace": false, "unified-signatures": false, "void-return": false, - "whitespace": false + "whitespace": false, + "no-angle-bracket-type-assertion": false } } diff --git a/types/angular-ui-tree/tslint.json b/types/angular-ui-tree/tslint.json index a41bf5d19a..67293bd146 100644 --- a/types/angular-ui-tree/tslint.json +++ b/types/angular-ui-tree/tslint.json @@ -74,6 +74,7 @@ "typedef-whitespace": false, "unified-signatures": false, "void-return": false, - "whitespace": false + "whitespace": false, + "no-angle-bracket-type-assertion": false } } diff --git a/types/angularfire/tslint.json b/types/angularfire/tslint.json index a41bf5d19a..67293bd146 100644 --- a/types/angularfire/tslint.json +++ b/types/angularfire/tslint.json @@ -74,6 +74,7 @@ "typedef-whitespace": false, "unified-signatures": false, "void-return": false, - "whitespace": false + "whitespace": false, + "no-angle-bracket-type-assertion": false } } diff --git a/types/bootstrap-slider/tslint.json b/types/bootstrap-slider/tslint.json index f93cf8562a..1c36270d47 100644 --- a/types/bootstrap-slider/tslint.json +++ b/types/bootstrap-slider/tslint.json @@ -1,3 +1,6 @@ { - "extends": "dtslint/dt.json" + "extends": "dtslint/dt.json", + "rules": { + "no-angle-bracket-type-assertion": false + } } diff --git a/types/datatables.net/tslint.json b/types/datatables.net/tslint.json index 3db14f85ea..2b6ccb9109 100644 --- a/types/datatables.net/tslint.json +++ b/types/datatables.net/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-angle-bracket-type-assertion": false + } +} \ No newline at end of file diff --git a/types/devexpress-web/v172/tslint.json b/types/devexpress-web/v172/tslint.json index a41bf5d19a..67293bd146 100644 --- a/types/devexpress-web/v172/tslint.json +++ b/types/devexpress-web/v172/tslint.json @@ -74,6 +74,7 @@ "typedef-whitespace": false, "unified-signatures": false, "void-return": false, - "whitespace": false + "whitespace": false, + "no-angle-bracket-type-assertion": false } } diff --git a/types/devexpress-web/v181/tslint.json b/types/devexpress-web/v181/tslint.json index a41bf5d19a..67293bd146 100644 --- a/types/devexpress-web/v181/tslint.json +++ b/types/devexpress-web/v181/tslint.json @@ -74,6 +74,7 @@ "typedef-whitespace": false, "unified-signatures": false, "void-return": false, - "whitespace": false + "whitespace": false, + "no-angle-bracket-type-assertion": false } } diff --git a/types/ej.web.all/tslint.json b/types/ej.web.all/tslint.json index 35e3f27cc8..0615bdcb0e 100644 --- a/types/ej.web.all/tslint.json +++ b/types/ej.web.all/tslint.json @@ -37,6 +37,7 @@ "radix": false, "prefer-for-of": false, "one-line": false, - "no-unnecessary-type-assertion": false + "no-unnecessary-type-assertion": false, + "no-angle-bracket-type-assertion": false } } diff --git a/types/gridstack/tslint.json b/types/gridstack/tslint.json index a41bf5d19a..67293bd146 100644 --- a/types/gridstack/tslint.json +++ b/types/gridstack/tslint.json @@ -74,6 +74,7 @@ "typedef-whitespace": false, "unified-signatures": false, "void-return": false, - "whitespace": false + "whitespace": false, + "no-angle-bracket-type-assertion": false } } diff --git a/types/highcharts/tslint.json b/types/highcharts/tslint.json index cfc8218eab..c663b9324a 100644 --- a/types/highcharts/tslint.json +++ b/types/highcharts/tslint.json @@ -9,6 +9,7 @@ "no-declare-current-package": false, "no-object-literal-type-assertion": false, "no-self-import": false, - "no-unnecessary-generics": false + "no-unnecessary-generics": false, + "no-angle-bracket-type-assertion": false } } diff --git a/types/intl-tel-input/v13/tslint.json b/types/intl-tel-input/v13/tslint.json index b6afb8acee..d2632b3e92 100644 --- a/types/intl-tel-input/v13/tslint.json +++ b/types/intl-tel-input/v13/tslint.json @@ -75,6 +75,7 @@ "typedef-whitespace": false, "unified-signatures": false, "void-return": false, - "whitespace": false + "whitespace": false, + "no-angle-bracket-type-assertion": false } } diff --git a/types/jquery.colorpicker/tslint.json b/types/jquery.colorpicker/tslint.json index a41bf5d19a..67293bd146 100644 --- a/types/jquery.colorpicker/tslint.json +++ b/types/jquery.colorpicker/tslint.json @@ -74,6 +74,7 @@ "typedef-whitespace": false, "unified-signatures": false, "void-return": false, - "whitespace": false + "whitespace": false, + "no-angle-bracket-type-assertion": false } } diff --git a/types/jquery.fancytree/tslint.json b/types/jquery.fancytree/tslint.json index a41bf5d19a..67293bd146 100644 --- a/types/jquery.fancytree/tslint.json +++ b/types/jquery.fancytree/tslint.json @@ -74,6 +74,7 @@ "typedef-whitespace": false, "unified-signatures": false, "void-return": false, - "whitespace": false + "whitespace": false, + "no-angle-bracket-type-assertion": false } } diff --git a/types/jquery.pjax/tslint.json b/types/jquery.pjax/tslint.json index a41bf5d19a..67293bd146 100644 --- a/types/jquery.pjax/tslint.json +++ b/types/jquery.pjax/tslint.json @@ -74,6 +74,7 @@ "typedef-whitespace": false, "unified-signatures": false, "void-return": false, - "whitespace": false + "whitespace": false, + "no-angle-bracket-type-assertion": false } } diff --git a/types/kendo-ui/tslint.json b/types/kendo-ui/tslint.json index a41bf5d19a..67293bd146 100644 --- a/types/kendo-ui/tslint.json +++ b/types/kendo-ui/tslint.json @@ -74,6 +74,7 @@ "typedef-whitespace": false, "unified-signatures": false, "void-return": false, - "whitespace": false + "whitespace": false, + "no-angle-bracket-type-assertion": false } } diff --git a/types/ng-cordova/tslint.json b/types/ng-cordova/tslint.json index a41bf5d19a..67293bd146 100644 --- a/types/ng-cordova/tslint.json +++ b/types/ng-cordova/tslint.json @@ -74,6 +74,7 @@ "typedef-whitespace": false, "unified-signatures": false, "void-return": false, - "whitespace": false + "whitespace": false, + "no-angle-bracket-type-assertion": false } } diff --git a/types/ng-flow/tslint.json b/types/ng-flow/tslint.json index a41bf5d19a..67293bd146 100644 --- a/types/ng-flow/tslint.json +++ b/types/ng-flow/tslint.json @@ -74,6 +74,7 @@ "typedef-whitespace": false, "unified-signatures": false, "void-return": false, - "whitespace": false + "whitespace": false, + "no-angle-bracket-type-assertion": false } } diff --git a/types/ng-grid/tslint.json b/types/ng-grid/tslint.json index a41bf5d19a..67293bd146 100644 --- a/types/ng-grid/tslint.json +++ b/types/ng-grid/tslint.json @@ -74,6 +74,7 @@ "typedef-whitespace": false, "unified-signatures": false, "void-return": false, - "whitespace": false + "whitespace": false, + "no-angle-bracket-type-assertion": false } } diff --git a/types/openui5/tslint.json b/types/openui5/tslint.json index a41bf5d19a..67293bd146 100644 --- a/types/openui5/tslint.json +++ b/types/openui5/tslint.json @@ -74,6 +74,7 @@ "typedef-whitespace": false, "unified-signatures": false, "void-return": false, - "whitespace": false + "whitespace": false, + "no-angle-bracket-type-assertion": false } } diff --git a/types/q/tslint.json b/types/q/tslint.json index 0bded8e292..4af8abbc8d 100644 --- a/types/q/tslint.json +++ b/types/q/tslint.json @@ -7,6 +7,7 @@ "no-unnecessary-type-assertion": false, "prefer-declare-function": false, "strict-export-declare-modifiers": false, - "unified-signatures": false + "unified-signatures": false, + "no-angle-bracket-type-assertion": false } } diff --git a/types/q/v0/tslint.json b/types/q/v0/tslint.json index a41bf5d19a..67293bd146 100644 --- a/types/q/v0/tslint.json +++ b/types/q/v0/tslint.json @@ -74,6 +74,7 @@ "typedef-whitespace": false, "unified-signatures": false, "void-return": false, - "whitespace": false + "whitespace": false, + "no-angle-bracket-type-assertion": false } } diff --git a/types/qtip2/tslint.json b/types/qtip2/tslint.json index a41bf5d19a..67293bd146 100644 --- a/types/qtip2/tslint.json +++ b/types/qtip2/tslint.json @@ -74,6 +74,7 @@ "typedef-whitespace": false, "unified-signatures": false, "void-return": false, - "whitespace": false + "whitespace": false, + "no-angle-bracket-type-assertion": false } } diff --git a/types/sammy/tslint.json b/types/sammy/tslint.json index a41bf5d19a..67293bd146 100644 --- a/types/sammy/tslint.json +++ b/types/sammy/tslint.json @@ -74,6 +74,7 @@ "typedef-whitespace": false, "unified-signatures": false, "void-return": false, - "whitespace": false + "whitespace": false, + "no-angle-bracket-type-assertion": false } } diff --git a/types/segment-analytics/tslint.json b/types/segment-analytics/tslint.json index a41bf5d19a..67293bd146 100644 --- a/types/segment-analytics/tslint.json +++ b/types/segment-analytics/tslint.json @@ -74,6 +74,7 @@ "typedef-whitespace": false, "unified-signatures": false, "void-return": false, - "whitespace": false + "whitespace": false, + "no-angle-bracket-type-assertion": false } } diff --git a/types/selectize/tslint.json b/types/selectize/tslint.json index a41bf5d19a..67293bd146 100644 --- a/types/selectize/tslint.json +++ b/types/selectize/tslint.json @@ -74,6 +74,7 @@ "typedef-whitespace": false, "unified-signatures": false, "void-return": false, - "whitespace": false + "whitespace": false, + "no-angle-bracket-type-assertion": false } } diff --git a/types/space-pen/tslint.json b/types/space-pen/tslint.json index a41bf5d19a..67293bd146 100644 --- a/types/space-pen/tslint.json +++ b/types/space-pen/tslint.json @@ -74,6 +74,7 @@ "typedef-whitespace": false, "unified-signatures": false, "void-return": false, - "whitespace": false + "whitespace": false, + "no-angle-bracket-type-assertion": false } } diff --git a/types/toastr/tslint.json b/types/toastr/tslint.json index a41bf5d19a..67293bd146 100644 --- a/types/toastr/tslint.json +++ b/types/toastr/tslint.json @@ -74,6 +74,7 @@ "typedef-whitespace": false, "unified-signatures": false, "void-return": false, - "whitespace": false + "whitespace": false, + "no-angle-bracket-type-assertion": false } } From dcda399637f7d78d7a7dd1c6ed1f5ccf01693a28 Mon Sep 17 00:00:00 2001 From: BamButz Date: Sun, 25 Nov 2018 12:25:56 +0100 Subject: [PATCH 097/608] Adding types for "hyper-aws4" --- types/hyper-aws4/hyper-aws4-tests.ts | 12 ++++++++++++ types/hyper-aws4/index.d.ts | 25 +++++++++++++++++++++++++ types/hyper-aws4/tsconfig.json | 23 +++++++++++++++++++++++ types/hyper-aws4/tslint.json | 1 + 4 files changed, 61 insertions(+) create mode 100644 types/hyper-aws4/hyper-aws4-tests.ts create mode 100644 types/hyper-aws4/index.d.ts create mode 100644 types/hyper-aws4/tsconfig.json create mode 100644 types/hyper-aws4/tslint.json diff --git a/types/hyper-aws4/hyper-aws4-tests.ts b/types/hyper-aws4/hyper-aws4-tests.ts new file mode 100644 index 0000000000..14caa34a9f --- /dev/null +++ b/types/hyper-aws4/hyper-aws4-tests.ts @@ -0,0 +1,12 @@ +import { sign, Request } from "hyper-aws4"; + +const signOption: Request = { + url: "https://us-west-1.hyper.sh/version", + method: "GET", + credential: { + accessKey: "6DPLADBPWYXDUVXLX34EJXBL", + secretKey: "2ldD1Yz0nzATl9vvagBwYTjglXBjVOWU8gV8aMm5" + } +}; + +sign(signOption); diff --git a/types/hyper-aws4/index.d.ts b/types/hyper-aws4/index.d.ts new file mode 100644 index 0000000000..bf2a0fafa8 --- /dev/null +++ b/types/hyper-aws4/index.d.ts @@ -0,0 +1,25 @@ +// Type definitions for hyper-aws4 1.1 +// Project: https://github.com/Tim-Zhang/hyper-aws4#readme +// Definitions by: BamButz +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export interface Credentials { + accessKey: string; + secretKey: string; +} + +export interface Header { + [header: string]: string; +} + +export type HttpMethods = "GET" | "POST" | "PUT" | "DELETE" | "PATCH"; + +export interface Request { + url: string; + method?: HttpMethods; + body?: string; + headers?: Header; + credential?: Credentials; +} + +export function sign(request: Request, credential?: Credentials): Header; diff --git a/types/hyper-aws4/tsconfig.json b/types/hyper-aws4/tsconfig.json new file mode 100644 index 0000000000..6df2d811c1 --- /dev/null +++ b/types/hyper-aws4/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "hyper-aws4-tests.ts" + ] +} diff --git a/types/hyper-aws4/tslint.json b/types/hyper-aws4/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/hyper-aws4/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 09832c50db44a2c8da4d4e330e0a61917fe32ec1 Mon Sep 17 00:00:00 2001 From: Kamontat Chantrachirathumrong Date: Sun, 25 Nov 2018 13:34:03 +0100 Subject: [PATCH 098/608] [fix] Remove trail space --- types/prompts/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/prompts/index.d.ts b/types/prompts/index.d.ts index e4e2fbca80..bfb08a8bd7 100644 --- a/types/prompts/index.d.ts +++ b/types/prompts/index.d.ts @@ -86,7 +86,7 @@ declare namespace prompts { values: Answers, prompt: PromptObject ) => R; - + type Falsy = false | null | undefined; type ValueOrFunc = T | PrevCaller; From 28cec6d7e832384d8e93596e6b723ea179d8d84f Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sun, 25 Nov 2018 15:02:24 +0100 Subject: [PATCH 099/608] Add types for iri --- types/iri/index.d.ts | 89 +++++++++++++++++++++++++++++++++++++++++ types/iri/iri-tests.ts | 43 ++++++++++++++++++++ types/iri/tsconfig.json | 23 +++++++++++ types/iri/tslint.json | 1 + 4 files changed, 156 insertions(+) create mode 100644 types/iri/index.d.ts create mode 100644 types/iri/iri-tests.ts create mode 100644 types/iri/tsconfig.json create mode 100644 types/iri/tslint.json diff --git a/types/iri/index.d.ts b/types/iri/index.d.ts new file mode 100644 index 0000000000..93183bcfad --- /dev/null +++ b/types/iri/index.d.ts @@ -0,0 +1,89 @@ +// Type definitions for iri 1.3 +// Project: https://github.com/awwright/node-iri +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export class IRI { + /** + * The constructor takes a single argument, a URI or IRI string: + */ + constructor(iri: string); + /** + * Returns UTF-16 IRI + */ + toString(): string; + /** + * Returns the IRI without the fragment component. Useful for dereferencing URLs on a network. + */ + defrag(): IRI; + /** + * IRIs with a fragment are not absolute. + */ + isAbsolute(): boolean; + /** + * Resolves the IRI against itself, having the effect of stripping the fragment and checking that the supplied IRI is valid (absolute). + */ + toAbsolute(): IRI; + /** + * Resolves the IRI against itself, having the effect of stripping the fragment and checking that the supplied IRI is valid (absolute). + */ + authority(): string | null; + /** + * Returns the fragment component of the IRI. + */ + fragment(): string | null; + /** + * Returns the hier-part of the IRI, the hierarchial component: Everything between the scheme and query, including leading `//` for the host, if it exists. + */ + hierpart(): string; + /** + * Returns the host component of the URI, either a domain name or string-formatted IP address. Excludes port number and username/password. + */ + host(): string; + /** + * Returns the path component of the hier-part. Does not include the authority/host, query, or fragment. + */ + path(): string; + /** + * Returns the port component of the authority as a string, or `null` if there is no port. + */ + port(): string | null; + /** + * Returns the query component of the IRI including leading "?", or `null` if there is no query component. + */ + query(): string | null; + /** + * Resolve the provided URI/IRI reference against this IRI. + */ + resolveReference(ref: string | IRI): IRI; + /** + * Returns the scheme of the IRI, e.g. "https", "file", or "urn". + */ + scheme(): string | null; + /** + * Returns the username/password component of the IRI. + */ + userinfo(): string | null; + /** + * Returns a URI formatted string with only 7-bit characters. + */ + toURIString(): string; + /** + * Decodes URI-encoded UTF-8 characters and returns a unicode string (Strings in ECMAScript/JavaScript are UTF-16). + */ + toIRIString(): string; + /** + * Returns a new IRI object with URI-encoded UTF-8 characters decoded. + */ + toIRI(): IRI; +} + +/** + * Returns an iri.IRI object with UTF-8 escaped characterd decoded. + */ +export function fromURI(uri: string): IRI; + +/** + * Returns an IRI string decoded from the given URI. + */ +export function toIRIString(uri: string): string; diff --git a/types/iri/iri-tests.ts b/types/iri/iri-tests.ts new file mode 100644 index 0000000000..97a460e02c --- /dev/null +++ b/types/iri/iri-tests.ts @@ -0,0 +1,43 @@ +import { IRI, fromURI, toIRIString } from 'iri'; + +const iri = new IRI('iri'); +// $ExpectType string +iri.toString(); +// $ExpectType IRI +iri.defrag(); +// $ExpectType boolean +iri.isAbsolute(); +// $ExpectType IRI +iri.toAbsolute(); +// $ExpectType string | null +iri.authority(); +// $ExpectType string | null +iri.fragment(); +// $ExpectType string +iri.hierpart(); +// $ExpectType string +iri.host(); +// $ExpectType string +iri.path(); +// $ExpectType string | null +iri.port(); +// $ExpectType string | null +iri.query(); +// $ExpectType IRI +iri.resolveReference('ref'); +iri.resolveReference(iri); +// $ExpectType string | null +iri.scheme(); +// $ExpectType string | null +iri.userinfo(); +// $ExpectType string +iri.toURIString(); +// $ExpectType string +iri.toIRIString(); +// $ExpectType IRI +iri.toIRI(); + +// $ExpectType IRI +fromURI('u'); +// $ExpectType string +toIRIString('u'); diff --git a/types/iri/tsconfig.json b/types/iri/tsconfig.json new file mode 100644 index 0000000000..09b1e0069e --- /dev/null +++ b/types/iri/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "iri-tests.ts" + ] +} diff --git a/types/iri/tslint.json b/types/iri/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/iri/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 7416fd03c44b5a4d9e9ce6eb5bd4418d754adac0 Mon Sep 17 00:00:00 2001 From: Florian Dreschner Date: Sun, 25 Nov 2018 21:42:31 +0100 Subject: [PATCH 100/608] Add encrypt and decrypt to Pubnub types --- types/pubnub/index.d.ts | 22 +++++++++++++++++++++- types/pubnub/pubnub-tests.ts | 12 ++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/types/pubnub/index.d.ts b/types/pubnub/index.d.ts index 8337acfbe4..1fc38edabf 100644 --- a/types/pubnub/index.d.ts +++ b/types/pubnub/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for pubnub 4.0 // Project: https://github.com/pubnub/javascript -// Definitions by: bitbankinc , rollymaduk , vitosamson +// Definitions by: bitbankinc , rollymaduk , vitosamson , FlorianDr // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // @see https://www.pubnub.com/docs/web-javascript/api-reference-configuration @@ -88,6 +88,18 @@ declare class Pubnub { setState( params: Pubnub.SetStateParameters ): Promise; + + encrypt( + data: string, + customCipherKey?: string, + options?: Pubnub.CryptoParameters, + ): object | string | null; + + decrypt( + data: object, + customCipherKey?: string, + options?: Pubnub.CryptoParameters + ): object | string | null; } declare namespace Pubnub { @@ -296,6 +308,14 @@ declare namespace Pubnub { }; } + // encrypt + interface CryptoParameters { + encryptKey?: boolean; + keyEncoding?: string; + keyLength?: number; + mode?: string; + } + interface Categories { PNNetworkUpCategory: string; PNNetworkDownCategory: string; diff --git a/types/pubnub/pubnub-tests.ts b/types/pubnub/pubnub-tests.ts index 1d8b2bb1ca..50660bd942 100644 --- a/types/pubnub/pubnub-tests.ts +++ b/types/pubnub/pubnub-tests.ts @@ -86,3 +86,15 @@ pubnub.setState({ channels: [] }, (status, res) => { pubnub.setState({ channels: [] }).then(res => { console.log(res.state); }); + +const cryptoOptions = { + encryptKey: true, + keyEncoding: 'utf8', + keyLength: 256, + mode: 'cbc' +}; +const mySecret = { + message: 'Hi!', +}; +pubnub.decrypt(mySecret, undefined, cryptoOptions); +pubnub.encrypt('egrah5rwgrehwqh5eh3hwfwef', undefined, cryptoOptions); From 147d828b80b191986af9e796d635e0cef3fdae14 Mon Sep 17 00:00:00 2001 From: Florian Dreschner Date: Sun, 25 Nov 2018 21:44:14 +0100 Subject: [PATCH 101/608] Add comment for decrypt parameters --- types/pubnub/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/pubnub/index.d.ts b/types/pubnub/index.d.ts index 1fc38edabf..0b5f75901c 100644 --- a/types/pubnub/index.d.ts +++ b/types/pubnub/index.d.ts @@ -308,7 +308,7 @@ declare namespace Pubnub { }; } - // encrypt + // encrypt & decrypt interface CryptoParameters { encryptKey?: boolean; keyEncoding?: string; From 44ef75a9066b67df3e76d93f12bff05a408e7137 Mon Sep 17 00:00:00 2001 From: Florian Dreschner Date: Sun, 25 Nov 2018 21:58:23 +0100 Subject: [PATCH 102/608] Add version note under header --- types/pubnub/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/pubnub/index.d.ts b/types/pubnub/index.d.ts index 0b5f75901c..7e148bc4c4 100644 --- a/types/pubnub/index.d.ts +++ b/types/pubnub/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: bitbankinc , rollymaduk , vitosamson , FlorianDr // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // @see https://www.pubnub.com/docs/web-javascript/api-reference-configuration +// TypeScript Version: 2.2 declare class Pubnub { constructor(config: Pubnub.PubnubConfig); From 620ad409303126f5066dc1dda42ec23ce0bf2f4f Mon Sep 17 00:00:00 2001 From: Karol Samborski Date: Sun, 25 Nov 2018 22:50:42 +0100 Subject: [PATCH 103/608] Type definitions for multiSamlStrategy --- types/passport-saml/index.d.ts | 1 + types/passport-saml/passport-saml-tests.ts | 25 ++++++++++++++++++++++ types/passport-saml/tsconfig.json | 3 ++- 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/types/passport-saml/index.d.ts b/types/passport-saml/index.d.ts index cc2faafe5c..9338b88deb 100644 --- a/types/passport-saml/index.d.ts +++ b/types/passport-saml/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/bergie/passport-saml // Definitions by: Chris Barth // Damian Assennato +// Karol Samborski // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 diff --git a/types/passport-saml/passport-saml-tests.ts b/types/passport-saml/passport-saml-tests.ts index 615c1b7320..b22421fe81 100644 --- a/types/passport-saml/passport-saml-tests.ts +++ b/types/passport-saml/passport-saml-tests.ts @@ -1,6 +1,7 @@ import express = require('express'); import passport = require('passport'); import SamlStrategy = require('passport-saml'); +import MultiSamlStrategy = require('passport-saml/multiSamlStrategy'); import fs = require('fs'); const samlStrategy = new SamlStrategy.Strategy( @@ -33,3 +34,27 @@ passport.use(samlStrategy); passport.authenticate('samlCustomName', {failureRedirect: '/', failureFlash: true}); const metadata = samlStrategy.generateServiceProviderMetadata("decryptionCert"); + +const multiSamlStrategy = new MultiSamlStrategy.MultiSamlStrategy( + { + name: 'samlCustomName', + path: '/login/callback', + entryPoint: 'https://openidp.feide.no/simplesaml/saml2/idp/SSOService.php', + issuer: 'passport-saml', + getSamlOptions(req: express.Request, callback: (err: Error | null, samlOptions: SamlStrategy.SamlConfig) => void) { + callback(null, { + name: 'samlCustomName', + path: '/login/callback2', + entryPoint: 'https://openidp.feide.no/simplesaml/saml2/idp/SSOService.php', + issuer: 'passport-saml', + }); + } + }, + (profile: {}, done: (err: Error | null, user: {}, info?: {}) => void) => { + const user = {}; + done(null, user); + } +); + +passport.use(multiSamlStrategy); +passport.authenticate('samlCustomName', {failureRedirect: '/', failureFlash: true}); diff --git a/types/passport-saml/tsconfig.json b/types/passport-saml/tsconfig.json index 0809dbbaf7..39283fa663 100644 --- a/types/passport-saml/tsconfig.json +++ b/types/passport-saml/tsconfig.json @@ -18,6 +18,7 @@ }, "files": [ "index.d.ts", + "multiSamlStrategy.d.ts", "passport-saml-tests.ts" ] -} \ No newline at end of file +} From 58db065b6e539e777e8f0b9726fd187297651621 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Alvergnat?= Date: Thu, 22 Nov 2018 22:54:38 +0100 Subject: [PATCH 104/608] Add types for deprecate --- types/deprecate/deprecate-tests.ts | 9 ++++++++ types/deprecate/index.d.ts | 33 ++++++++++++++++++++++++++++++ types/deprecate/tsconfig.json | 23 +++++++++++++++++++++ types/deprecate/tslint.json | 3 +++ 4 files changed, 68 insertions(+) create mode 100644 types/deprecate/deprecate-tests.ts create mode 100644 types/deprecate/index.d.ts create mode 100644 types/deprecate/tsconfig.json create mode 100644 types/deprecate/tslint.json diff --git a/types/deprecate/deprecate-tests.ts b/types/deprecate/deprecate-tests.ts new file mode 100644 index 0000000000..3df2257c40 --- /dev/null +++ b/types/deprecate/deprecate-tests.ts @@ -0,0 +1,9 @@ +import deprecate = require('deprecate'); + +deprecate('someMethod'); +deprecate('someMethod', 'This is deprecated'); +deprecate('someMethod', 'This is deprecated', 'foo', 'bar'); + +deprecate.color = '\x1b[31;1m'; +deprecate.silence = true; +deprecate.stream = process.stderr; diff --git a/types/deprecate/index.d.ts b/types/deprecate/index.d.ts new file mode 100644 index 0000000000..a053721ff5 --- /dev/null +++ b/types/deprecate/index.d.ts @@ -0,0 +1,33 @@ +// Type definitions for deprecate 1.1 +// Project: https://github.com/brianc/node-deprecate +// Definitions by: Toilal +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +/// + +declare namespace deprecate { + /** + * Set to false to not output a color. Defaults to '\x1b[31;1m' which is red. + */ + let color: string; + + /** + * Set to false to do nothing at all when the deprecate method is called. Useful in tests of the library you're deprecating things within. + */ + let silence: boolean; + + /** + * The stream to which output is written. Defaults to process.stderr + */ + let stream: NodeJS.WriteStream; +} + +/** + * Call deprecate within a function you are deprecating. + * + * It will spit out all the messages to the console the first time and only the first time the method is called. + */ +declare function deprecate(methodName: string, ...message: string[]): void; + +export = deprecate; diff --git a/types/deprecate/tsconfig.json b/types/deprecate/tsconfig.json new file mode 100644 index 0000000000..75acd6cda6 --- /dev/null +++ b/types/deprecate/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "deprecate-tests.ts" + ] +} diff --git a/types/deprecate/tslint.json b/types/deprecate/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/deprecate/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} From cc95a58bf19a53762240bcdabf1ac18c040a5904 Mon Sep 17 00:00:00 2001 From: Karol Samborski Date: Mon, 26 Nov 2018 07:13:25 +0100 Subject: [PATCH 105/608] Missing file --- types/passport-saml/multiSamlStrategy.d.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 types/passport-saml/multiSamlStrategy.d.ts diff --git a/types/passport-saml/multiSamlStrategy.d.ts b/types/passport-saml/multiSamlStrategy.d.ts new file mode 100644 index 0000000000..405c7264dc --- /dev/null +++ b/types/passport-saml/multiSamlStrategy.d.ts @@ -0,0 +1,10 @@ +import express = require('express'); +import { Strategy, SamlConfig, VerifyWithRequest, VerifyWithoutRequest } from './index'; + +export interface MultiSamlConfig extends SamlConfig { + getSamlOptions(req: express.Request, callback: (err: Error | null, samlOptions: SamlConfig) => void): void; +} + +export class MultiSamlStrategy extends Strategy { + constructor(config: MultiSamlConfig, verify: VerifyWithRequest | VerifyWithoutRequest); +} From a941c86b563f56f65e6038c6f35debe28fba2514 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Ba=C4=8D=C3=ADk?= Date: Mon, 26 Nov 2018 14:57:35 +0100 Subject: [PATCH 106/608] Added RN Image width and height props --- types/react-native/index.d.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index 2386fc71c2..112abe79a9 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -3629,6 +3629,12 @@ interface ImagePropsAndroid { * Duration of fade in animation. */ fadeDuration?: number; + + /** + * Required sizes if using native image resources on Android + */ + width?: number; + height?: number; } /** From ce71e7bb557834aa38e36ed35903d80cb35bb4cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Ba=C4=8D=C3=ADk?= Date: Mon, 26 Nov 2018 15:40:11 +0100 Subject: [PATCH 107/608] Removed whitespace --- types/react-native/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index 112abe79a9..15423558e4 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -3629,7 +3629,7 @@ interface ImagePropsAndroid { * Duration of fade in animation. */ fadeDuration?: number; - + /** * Required sizes if using native image resources on Android */ From f26696ad1980206be1efc54f1f407b067801a5a7 Mon Sep 17 00:00:00 2001 From: Daan Boerlage Date: Mon, 26 Nov 2018 15:32:07 +0100 Subject: [PATCH 108/608] add typings for open-apifactory --- types/openapi-factory/index.d.ts | 49 +++++++++++++++++++ .../openapi-factory/openapi-factory-tests.ts | 25 ++++++++++ types/openapi-factory/tsconfig.json | 23 +++++++++ types/openapi-factory/tslint.json | 3 ++ 4 files changed, 100 insertions(+) create mode 100644 types/openapi-factory/index.d.ts create mode 100644 types/openapi-factory/openapi-factory-tests.ts create mode 100644 types/openapi-factory/tsconfig.json create mode 100644 types/openapi-factory/tslint.json diff --git a/types/openapi-factory/index.d.ts b/types/openapi-factory/index.d.ts new file mode 100644 index 0000000000..6cb22f7194 --- /dev/null +++ b/types/openapi-factory/index.d.ts @@ -0,0 +1,49 @@ +// Type definitions for openapi-factory 4.2 +// Project: https://github.com/wparad/openapi-factory.js +// Definitions by: Daan Boerlage +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +declare namespace OpenApi { + interface OpenApiOptions { + requestMiddleware?: () => any; + responseMiddleware?: () => any; + errorMiddleware?: () => any; + } +} + +declare class OpenApi { + constructor(options: OpenApi.OpenApiOptions, overrideLogger?: () => void); + + setAuthorizer(authorizerFunc: (req?: any) => any): void; + onEvent(onEventFunc: (req?: any) => any): void; + onSchedule(onScheduleFunc: (req?: any) => any): void; + + head(route: string, p0: (req?: any) => any): void; + head(route: string, p0: object, p1: (req?: any) => any): void; + + get(route: string, p0: (req?: any) => any): void; + get(route: string, p0: object, p1: (req?: any) => any): void; + + post(route: string, p0: (req?: any) => any): void; + post(route: string, p0: object, p1: (req?: any) => any): void; + + put(route: string, p0: (req?: any) => any): void; + put(route: string, p0: object, p1: (req?: any) => any): void; + + patch(route: string, p0: (req?: any) => any): void; + patch(route: string, p0: object, p1: (req?: any) => any): void; + + delete(route: string, p0: (req?: any) => any): void; + delete(route: string, p0: object, p1: (req?: any) => any): void; + + options(route: string, p0: (req?: any) => any): void; + options(route: string, p0: object, p1: (req?: any) => any): void; + + any(route: string, p0: (req?: any) => any): void; + any(route: string, p0: object, p1: (req?: any) => any): void; + + handler(event: object, context: object): Promise; +} + +export = OpenApi; diff --git a/types/openapi-factory/openapi-factory-tests.ts b/types/openapi-factory/openapi-factory-tests.ts new file mode 100644 index 0000000000..13e1e0e7cc --- /dev/null +++ b/types/openapi-factory/openapi-factory-tests.ts @@ -0,0 +1,25 @@ +import * as OpenApiFactory from 'openapi-factory'; + +const api = new OpenApiFactory({}); + +api.setAuthorizer((req: any) => req); +api.onEvent((req: any) => req); +api.onSchedule((req: any) => req); + +api.head('/v1/test', () => 'success'); +api.get('/v1/test', () => 'success'); +api.post('/v1/test', () => 'success'); +api.put('/v1/test', () => 'success'); +api.patch('/v1/test', () => 'success'); +api.delete('/v1/test', () => 'success'); +api.options('/v1/test', () => 'success'); +api.any('/v1/test2', () => 'success'); + +api.head('/v2/test', {test: true}, () => 'success'); +api.get('/v2/test', {test: true}, () => 'success'); +api.post('/v2/test', {test: true}, () => 'success'); +api.put('/v2/test', {test: true}, () => 'success'); +api.patch('/v2/test', {test: true}, () => 'success'); +api.delete('/v2/test', {test: true}, () => 'success'); +api.options('/v2/test', {test: true}, () => 'success'); +api.any('/v2/test2', {test: true}, () => 'success'); diff --git a/types/openapi-factory/tsconfig.json b/types/openapi-factory/tsconfig.json new file mode 100644 index 0000000000..e8528e8e84 --- /dev/null +++ b/types/openapi-factory/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "openapi-factory-tests.ts" + ] +} diff --git a/types/openapi-factory/tslint.json b/types/openapi-factory/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/openapi-factory/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} From f675d110aae80c33bdc289624c85052a2a1dc858 Mon Sep 17 00:00:00 2001 From: Florian Dreschner Date: Mon, 26 Nov 2018 16:16:36 +0100 Subject: [PATCH 109/608] Change crypto payload to any --- types/pubnub/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/pubnub/index.d.ts b/types/pubnub/index.d.ts index 7e148bc4c4..257ca3cd44 100644 --- a/types/pubnub/index.d.ts +++ b/types/pubnub/index.d.ts @@ -94,13 +94,13 @@ declare class Pubnub { data: string, customCipherKey?: string, options?: Pubnub.CryptoParameters, - ): object | string | null; + ): any; decrypt( data: object, customCipherKey?: string, options?: Pubnub.CryptoParameters - ): object | string | null; + ): any; } declare namespace Pubnub { From 7bba952b5759fceb1b6307c807482380600047b5 Mon Sep 17 00:00:00 2001 From: Daan Boerlage Date: Mon, 26 Nov 2018 18:29:53 +0100 Subject: [PATCH 110/608] [openapi-factory] fix http methods param typings --- types/openapi-factory/index.d.ts | 52 +++++++++++-------- .../openapi-factory/openapi-factory-tests.ts | 36 +++++++------ 2 files changed, 51 insertions(+), 37 deletions(-) diff --git a/types/openapi-factory/index.d.ts b/types/openapi-factory/index.d.ts index 6cb22f7194..e41958e6df 100644 --- a/types/openapi-factory/index.d.ts +++ b/types/openapi-factory/index.d.ts @@ -5,43 +5,53 @@ // TypeScript Version: 2.2 declare namespace OpenApi { - interface OpenApiOptions { + interface ApiOptions { requestMiddleware?: () => any; responseMiddleware?: () => any; errorMiddleware?: () => any; } + + interface HttpMethodOptions { + rawBody?: boolean; + } + + interface HttpResponse { + statusCode?: number; + headers?: object; + body?: (object | string); + } } declare class OpenApi { - constructor(options: OpenApi.OpenApiOptions, overrideLogger?: () => void); + constructor(options: OpenApi.ApiOptions, overrideLogger?: () => void); - setAuthorizer(authorizerFunc: (req?: any) => any): void; - onEvent(onEventFunc: (req?: any) => any): void; - onSchedule(onScheduleFunc: (req?: any) => any): void; + setAuthorizer(authorizerFunc: (req?: any) => Promise): void; + onEvent(onEventFunc: (req?: any) => Promise): void; + onSchedule(onScheduleFunc: (req?: any) => Promise): void; - head(route: string, p0: (req?: any) => any): void; - head(route: string, p0: object, p1: (req?: any) => any): void; + head(route: string, handler: (req?: object) => (OpenApi.HttpResponse | Promise)): void; + head(route: string, options: OpenApi.HttpMethodOptions, handler: (req?: any) => any): void; - get(route: string, p0: (req?: any) => any): void; - get(route: string, p0: object, p1: (req?: any) => any): void; + get(route: string, handler: (req?: object) => (OpenApi.HttpResponse | Promise)): void; + get(route: string, options: OpenApi.HttpMethodOptions, handler: (req?: object) => (OpenApi.HttpResponse | Promise)): void; - post(route: string, p0: (req?: any) => any): void; - post(route: string, p0: object, p1: (req?: any) => any): void; + post(route: string, handler: (req?: object) => (OpenApi.HttpResponse | Promise)): void; + post(route: string, options: OpenApi.HttpMethodOptions, handler: (req?: object) => (OpenApi.HttpResponse | Promise)): void; - put(route: string, p0: (req?: any) => any): void; - put(route: string, p0: object, p1: (req?: any) => any): void; + put(route: string, handler: (req?: object) => (OpenApi.HttpResponse | Promise)): void; + put(route: string, options: OpenApi.HttpMethodOptions, handler: (req?: object) => (OpenApi.HttpResponse | Promise)): void; - patch(route: string, p0: (req?: any) => any): void; - patch(route: string, p0: object, p1: (req?: any) => any): void; + patch(route: string, handler: (req?: object) => (OpenApi.HttpResponse | Promise)): void; + patch(route: string, options: OpenApi.HttpMethodOptions, handler: (req?: object) => (OpenApi.HttpResponse | Promise)): void; - delete(route: string, p0: (req?: any) => any): void; - delete(route: string, p0: object, p1: (req?: any) => any): void; + delete(route: string, handler: (req?: object) => (OpenApi.HttpResponse | Promise)): void; + delete(route: string, options: OpenApi.HttpMethodOptions, handler: (req?: object) => (OpenApi.HttpResponse | Promise)): void; - options(route: string, p0: (req?: any) => any): void; - options(route: string, p0: object, p1: (req?: any) => any): void; + options(route: string, handler: (req?: object) => (OpenApi.HttpResponse | Promise)): void; + options(route: string, options: OpenApi.HttpMethodOptions, handler: (req?: object) => (OpenApi.HttpResponse | Promise)): void; - any(route: string, p0: (req?: any) => any): void; - any(route: string, p0: object, p1: (req?: any) => any): void; + any(route: string, handler: (req?: object) => (OpenApi.HttpResponse | Promise)): void; + any(route: string, options: OpenApi.HttpMethodOptions, handler: (req?: object) => (OpenApi.HttpResponse | Promise)): void; handler(event: object, context: object): Promise; } diff --git a/types/openapi-factory/openapi-factory-tests.ts b/types/openapi-factory/openapi-factory-tests.ts index 13e1e0e7cc..ad24a5021d 100644 --- a/types/openapi-factory/openapi-factory-tests.ts +++ b/types/openapi-factory/openapi-factory-tests.ts @@ -6,20 +6,24 @@ api.setAuthorizer((req: any) => req); api.onEvent((req: any) => req); api.onSchedule((req: any) => req); -api.head('/v1/test', () => 'success'); -api.get('/v1/test', () => 'success'); -api.post('/v1/test', () => 'success'); -api.put('/v1/test', () => 'success'); -api.patch('/v1/test', () => 'success'); -api.delete('/v1/test', () => 'success'); -api.options('/v1/test', () => 'success'); -api.any('/v1/test2', () => 'success'); +const testReponse = { + statusCode: 200 +}; -api.head('/v2/test', {test: true}, () => 'success'); -api.get('/v2/test', {test: true}, () => 'success'); -api.post('/v2/test', {test: true}, () => 'success'); -api.put('/v2/test', {test: true}, () => 'success'); -api.patch('/v2/test', {test: true}, () => 'success'); -api.delete('/v2/test', {test: true}, () => 'success'); -api.options('/v2/test', {test: true}, () => 'success'); -api.any('/v2/test2', {test: true}, () => 'success'); +api.head('/v1/test', () => testReponse); +api.get('/v1/test', () => testReponse); +api.post('/v1/test', () => testReponse); +api.put('/v1/test', () => testReponse); +api.patch('/v1/test', () => testReponse); +api.delete('/v1/test', () => testReponse); +api.options('/v1/test', () => testReponse); +api.any('/v1/test2', () => testReponse); + +api.head('/v2/test', { rawBody: true }, () => testReponse); +api.get('/v2/test', { rawBody: true }, () => testReponse); +api.post('/v2/test', { rawBody: true }, () => testReponse); +api.put('/v2/test', { rawBody: true }, () => testReponse); +api.patch('/v2/test', { rawBody: true }, () => testReponse); +api.delete('/v2/test', { rawBody: true }, () => testReponse); +api.options('/v2/test', { rawBody: true }, () => testReponse); +api.any('/v2/test2', { rawBody: true }, () => testReponse); From c830fd6999d65e1c02f3be796233fb380f396826 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Mon, 26 Nov 2018 21:00:12 +0100 Subject: [PATCH 111/608] Add types for create-hash --- types/create-hash/create-hash-tests.ts | 9 +++++++++ types/create-hash/index.d.ts | 26 ++++++++++++++++++++++++++ types/create-hash/tsconfig.json | 23 +++++++++++++++++++++++ types/create-hash/tslint.json | 1 + 4 files changed, 59 insertions(+) create mode 100644 types/create-hash/create-hash-tests.ts create mode 100644 types/create-hash/index.d.ts create mode 100644 types/create-hash/tsconfig.json create mode 100644 types/create-hash/tslint.json diff --git a/types/create-hash/create-hash-tests.ts b/types/create-hash/create-hash-tests.ts new file mode 100644 index 0000000000..d039a5a704 --- /dev/null +++ b/types/create-hash/create-hash-tests.ts @@ -0,0 +1,9 @@ +import createHash = require('create-hash'); + +const hash = createHash('sha224'); + +hash.update('synchronous write'); +hash.digest(); +hash.write('write to it as a stream'); +hash.end(); +hash.read(); diff --git a/types/create-hash/index.d.ts b/types/create-hash/index.d.ts new file mode 100644 index 0000000000..712be2520f --- /dev/null +++ b/types/create-hash/index.d.ts @@ -0,0 +1,26 @@ +// Type definitions for create-hash 1.2 +// Project: https://github.com/crypto-browserify/createHash +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +/// + +import { Hash } from 'crypto'; + +export = createHash; + +declare function createHash(algo: createHash.Algorithm): Hash; + +declare namespace createHash { + type Algorithm = + | 'md5' + | 'rmd160' + | 'ripemd160' + | 'sha' + | 'sha1' + | 'sha224' + | 'sha256' + | 'sha384' + | 'sha512'; +} diff --git a/types/create-hash/tsconfig.json b/types/create-hash/tsconfig.json new file mode 100644 index 0000000000..83e50b425c --- /dev/null +++ b/types/create-hash/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "create-hash-tests.ts" + ] +} diff --git a/types/create-hash/tslint.json b/types/create-hash/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/create-hash/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From b41337dd487ca3a99359e93a9067073643870d99 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Mon, 26 Nov 2018 21:15:37 +0100 Subject: [PATCH 112/608] Add types for create-hmac --- types/create-hmac/create-hmac-tests.ts | 9 +++++++++ types/create-hmac/index.d.ts | 26 ++++++++++++++++++++++++++ types/create-hmac/tsconfig.json | 23 +++++++++++++++++++++++ types/create-hmac/tslint.json | 1 + 4 files changed, 59 insertions(+) create mode 100644 types/create-hmac/create-hmac-tests.ts create mode 100644 types/create-hmac/index.d.ts create mode 100644 types/create-hmac/tsconfig.json create mode 100644 types/create-hmac/tslint.json diff --git a/types/create-hmac/create-hmac-tests.ts b/types/create-hmac/create-hmac-tests.ts new file mode 100644 index 0000000000..f233a0390a --- /dev/null +++ b/types/create-hmac/create-hmac-tests.ts @@ -0,0 +1,9 @@ +import createHmac = require('create-hmac'); + +const hmac = createHmac('sha224', Buffer.from('secret key')); + +hmac.update('synchronous write'); +hmac.digest(); +hmac.write('write to it as a stream'); +hmac.end(); +hmac.read(); diff --git a/types/create-hmac/index.d.ts b/types/create-hmac/index.d.ts new file mode 100644 index 0000000000..3d6bcfeafa --- /dev/null +++ b/types/create-hmac/index.d.ts @@ -0,0 +1,26 @@ +// Type definitions for create-hmac 1.1 +// Project: https://github.com/crypto-browserify/createHmac +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +/// + +import { Hmac } from 'crypto'; + +export = createHmac; + +declare function createHmac(algo: createHmac.Algorithm, key: string | Buffer): Hmac; + +declare namespace createHmac { + type Algorithm = + | 'rmd160' + | 'ripemd160' + | 'md5' + | 'sha' + | 'sha1' + | 'sha224' + | 'sha256' + | 'sha384' + | 'sha512'; +} diff --git a/types/create-hmac/tsconfig.json b/types/create-hmac/tsconfig.json new file mode 100644 index 0000000000..badd99da29 --- /dev/null +++ b/types/create-hmac/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "create-hmac-tests.ts" + ] +} diff --git a/types/create-hmac/tslint.json b/types/create-hmac/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/create-hmac/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From afe5664ded8cec5ccf443e2dd682298f5b53c5b7 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Mon, 26 Nov 2018 21:41:06 +0100 Subject: [PATCH 113/608] Add types for sha.js --- types/sha.js/index.d.ts | 26 ++++++++++++++++++++++++++ types/sha.js/sha.js-tests.ts | 15 +++++++++++++++ types/sha.js/tsconfig.json | 23 +++++++++++++++++++++++ types/sha.js/tslint.json | 1 + 4 files changed, 65 insertions(+) create mode 100644 types/sha.js/index.d.ts create mode 100644 types/sha.js/sha.js-tests.ts create mode 100644 types/sha.js/tsconfig.json create mode 100644 types/sha.js/tslint.json diff --git a/types/sha.js/index.d.ts b/types/sha.js/index.d.ts new file mode 100644 index 0000000000..d5dc4ba752 --- /dev/null +++ b/types/sha.js/index.d.ts @@ -0,0 +1,26 @@ +// Type definitions for sha.js 2.4 +// Project: https://github.com/crypto-browserify/sha.js +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import { Hash } from 'crypto'; + +export = SHA; + +declare function SHA(algorithm: string): Hash; + +declare namespace SHA { + type Algorithm = 'sha' | 'sha1' | 'sha224' | 'sha256' | 'sha384' | 'sha512'; + interface HashStatic { + new (): Hash; + } + + const sha: HashStatic; + const sha1: HashStatic; + const sha224: HashStatic; + const sha256: HashStatic; + const sha384: HashStatic; + const sha512: HashStatic; +} diff --git a/types/sha.js/sha.js-tests.ts b/types/sha.js/sha.js-tests.ts new file mode 100644 index 0000000000..fd3cde2e47 --- /dev/null +++ b/types/sha.js/sha.js-tests.ts @@ -0,0 +1,15 @@ +import shajs = require('sha.js'); + +shajs('sha256') + .update('42') + .digest('hex'); +new shajs.sha().update('42').digest('hex'); +new shajs.sha1().update('42').digest('hex'); +new shajs.sha224().update('42').digest('hex'); +new shajs.sha256().update('42').digest('hex'); +new shajs.sha384().update('42').digest('hex'); +new shajs.sha512().update('42').digest('hex'); + +const sha256stream = shajs('sha256'); +sha256stream.end('42'); +(sha256stream.read() as Buffer).toString('hex'); diff --git a/types/sha.js/tsconfig.json b/types/sha.js/tsconfig.json new file mode 100644 index 0000000000..9f10462f5a --- /dev/null +++ b/types/sha.js/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "sha.js-tests.ts" + ] +} diff --git a/types/sha.js/tslint.json b/types/sha.js/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/sha.js/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 9ed2a742a2989285e8ca98bbc3b3c418df508c72 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Mon, 26 Nov 2018 22:03:57 +0100 Subject: [PATCH 114/608] Add types for ripemd160 --- types/ripemd160/index.d.ts | 16 ++++++++++++++++ types/ripemd160/ripemd160-tests.ts | 7 +++++++ types/ripemd160/tsconfig.json | 23 +++++++++++++++++++++++ types/ripemd160/tslint.json | 1 + 4 files changed, 47 insertions(+) create mode 100644 types/ripemd160/index.d.ts create mode 100644 types/ripemd160/ripemd160-tests.ts create mode 100644 types/ripemd160/tsconfig.json create mode 100644 types/ripemd160/tslint.json diff --git a/types/ripemd160/index.d.ts b/types/ripemd160/index.d.ts new file mode 100644 index 0000000000..27de423a18 --- /dev/null +++ b/types/ripemd160/index.d.ts @@ -0,0 +1,16 @@ +// Type definitions for ripemd160 2.0 +// Project: https://github.com/crypto-browserify/ripemd160#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import { Hash } from 'crypto'; + +export = RIPEMD160; + +declare const RIPEMD160: RIPEMD160Static; + +interface RIPEMD160Static { + new (): Hash; +} diff --git a/types/ripemd160/ripemd160-tests.ts b/types/ripemd160/ripemd160-tests.ts new file mode 100644 index 0000000000..3a78efbac3 --- /dev/null +++ b/types/ripemd160/ripemd160-tests.ts @@ -0,0 +1,7 @@ +import RIPEMD160 = require('ripemd160'); + +new RIPEMD160().update('42').digest('hex'); + +const ripemd160stream = new RIPEMD160(); +ripemd160stream.end('42'); +(ripemd160stream.read() as Buffer).toString('hex'); diff --git a/types/ripemd160/tsconfig.json b/types/ripemd160/tsconfig.json new file mode 100644 index 0000000000..07abc9bd05 --- /dev/null +++ b/types/ripemd160/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "ripemd160-tests.ts" + ] +} diff --git a/types/ripemd160/tslint.json b/types/ripemd160/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/ripemd160/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 9fa2b6599f6309a7e33e5b5ab1387537ed68d9df Mon Sep 17 00:00:00 2001 From: Boris Sergeyev Date: Mon, 26 Nov 2018 22:18:35 +0100 Subject: [PATCH 115/608] [react-redux] extended ThunkActionCreator testsuite to check all overloads --- types/react-redux/react-redux-tests.tsx | 59 ++++++++++++++++++++++--- 1 file changed, 54 insertions(+), 5 deletions(-) diff --git a/types/react-redux/react-redux-tests.tsx b/types/react-redux/react-redux-tests.tsx index f47683047e..554ace09ff 100644 --- a/types/react-redux/react-redux-tests.tsx +++ b/types/react-redux/react-redux-tests.tsx @@ -120,12 +120,61 @@ function MapDispatchWithThunkActionCreators() { } class TestComponent extends React.Component {} - const Test = connect( - null, - ({ simpleAction, thunkAction }), - )(TestComponent); + const mapStateToProps = ({ foo }: { foo: string }) => ({ foo }); + const mapDispatchToProps = { simpleAction, thunkAction }; - const verify = ; + const Test1 = connect(null, mapDispatchToProps)(TestComponent); + const Test2 = connect(mapStateToProps, mapDispatchToProps)(TestComponent); + const Test3 = connect( + null, mapDispatchToProps, null, { storeKey: 'somekey' } + )(TestComponent); + const Test4 = connect( + mapStateToProps, mapDispatchToProps, null, { storeKey: 'somekey' } + )(TestComponent); + const verify =
+ ; + + ; + +
; +} + +function MapManualDispatchThatLooksLikeThunk() { + interface OwnProps { + foo: string; + } + interface TestComponentProps extends OwnProps { + remove: (item: string) => () => object; + } + class TestComponent extends React.Component { + render() { + return
; + } + } + + const mapStateToProps = ({ foo }: { foo: string }) => ({ foo }); + function mapDispatchToProps(dispatch: Dispatch) { + return { + remove(item: string) { + return () => dispatch({ type: 'REMOVE_ITEM', item }); + } + }; + } + + const Test1 = connect(null, mapDispatchToProps)(TestComponent); + const Test2 = connect(mapStateToProps, mapDispatchToProps)(TestComponent); + const Test3 = connect( + null, mapDispatchToProps, null, { storeKey: 'somekey' } + )(TestComponent); + const Test4 = connect( + mapStateToProps, mapDispatchToProps, null, { storeKey: 'somekey' } + )(TestComponent); + const verify =
+ ; + + ; + +
; } function MapStateAndDispatchObject() { From 8cbf6d938de2e838a4f3cc9695576958ed55f4c3 Mon Sep 17 00:00:00 2001 From: Boris Sergeyev Date: Mon, 26 Nov 2018 22:19:18 +0100 Subject: [PATCH 116/608] [react-redux] fixed type definitions to pass extended tests --- types/react-redux/index.d.ts | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/types/react-redux/index.d.ts b/types/react-redux/index.d.ts index bf65d89fd5..dc8a9af912 100644 --- a/types/react-redux/index.d.ts +++ b/types/react-redux/index.d.ts @@ -160,7 +160,12 @@ export interface Connect { ( mapStateToProps: null | undefined, - mapDispatchToProps: MapDispatchToPropsParam + mapDispatchToProps: MapDispatchToPropsNonObject + ): InferableComponentEnhancerWithProps; + + ( + mapStateToProps: null | undefined, + mapDispatchToProps: TDispatchProps, ): InferableComponentEnhancerWithProps< WithThunkActionCreators, TOwnProps @@ -168,7 +173,12 @@ export interface Connect { ( mapStateToProps: MapStateToPropsParam, - mapDispatchToProps: MapDispatchToPropsParam + mapDispatchToProps: MapDispatchToPropsNonObject + ): InferableComponentEnhancerWithProps; + + ( + mapStateToProps: MapStateToPropsParam, + mapDispatchToProps: TDispatchProps, ): InferableComponentEnhancerWithProps< TStateProps & WithThunkActionCreators, TOwnProps @@ -208,7 +218,14 @@ export interface Connect { ( mapStateToProps: null | undefined, - mapDispatchToProps: MapDispatchToPropsParam, + mapDispatchToProps: MapDispatchToPropsNonObject, + mergeProps: null | undefined, + options: Options<{}, TStateProps, TOwnProps> + ): InferableComponentEnhancerWithProps; + + ( + mapStateToProps: null | undefined, + mapDispatchToProps: TDispatchProps, mergeProps: null | undefined, options: Options<{}, TStateProps, TOwnProps> ): InferableComponentEnhancerWithProps< @@ -218,7 +235,14 @@ export interface Connect { ( mapStateToProps: MapStateToPropsParam, - mapDispatchToProps: MapDispatchToPropsParam, + mapDispatchToProps: MapDispatchToPropsNonObject, + mergeProps: null | undefined, + options: Options + ): InferableComponentEnhancerWithProps; + + ( + mapStateToProps: MapStateToPropsParam, + mapDispatchToProps: TDispatchProps, mergeProps: null | undefined, options: Options ): InferableComponentEnhancerWithProps< @@ -248,10 +272,12 @@ export type MapDispatchToProps = MapDispatchToPropsFunction | TDispatchProps; export type MapDispatchToPropsFactory = - (dispatch: Dispatch, ownProps: TOwnProps) => MapDispatchToProps; + (dispatch: Dispatch, ownProps: TOwnProps) => MapDispatchToPropsFunction; export type MapDispatchToPropsParam = MapDispatchToPropsFactory | MapDispatchToProps; +export type MapDispatchToPropsNonObject = MapDispatchToPropsFactory | MapDispatchToPropsFunction; + export type MergeProps = (stateProps: TStateProps, dispatchProps: TDispatchProps, ownProps: TOwnProps) => TMergedProps; From 009260118e5ebe5a5afe3ebf749998d69e0e5ea7 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sun, 25 Nov 2018 23:53:43 +0100 Subject: [PATCH 117/608] Add types for saslmechanisms --- types/saslmechanisms/index.d.ts | 31 ++++++++++++++++++++ types/saslmechanisms/saslmechanisms-tests.ts | 22 ++++++++++++++ types/saslmechanisms/tsconfig.json | 23 +++++++++++++++ types/saslmechanisms/tslint.json | 1 + 4 files changed, 77 insertions(+) create mode 100644 types/saslmechanisms/index.d.ts create mode 100644 types/saslmechanisms/saslmechanisms-tests.ts create mode 100644 types/saslmechanisms/tsconfig.json create mode 100644 types/saslmechanisms/tslint.json diff --git a/types/saslmechanisms/index.d.ts b/types/saslmechanisms/index.d.ts new file mode 100644 index 0000000000..62f71e8a25 --- /dev/null +++ b/types/saslmechanisms/index.d.ts @@ -0,0 +1,31 @@ +// Type definitions for saslmechanisms 0.1 +// Project: https://github.com/jaredhanson/js-sasl +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = Factory; + +declare class Factory { + static Factory: typeof Factory; + + use(name: string, mechanism: Factory.MechanismStatic): this; + use(mechanism: Factory.MechanismStatic): this; + create(mechanisms: string[]): Factory.Mechanism | null; +} + +declare namespace Factory { + interface MechanismStatic { + new (): Mechanism; + prototype: { + [key: string]: any; + name: string; + }; + } + interface Mechanism { + name: string; + + response(cred: { [key: string]: any }): string; + + challenge(chal: string): void; + } +} diff --git a/types/saslmechanisms/saslmechanisms-tests.ts b/types/saslmechanisms/saslmechanisms-tests.ts new file mode 100644 index 0000000000..d7e6fe7620 --- /dev/null +++ b/types/saslmechanisms/saslmechanisms-tests.ts @@ -0,0 +1,22 @@ +import Fct = require('saslmechanisms'); +import { Factory, MechanismStatic, Mechanism } from 'saslmechanisms'; + +const Mech: MechanismStatic = null as any; + +const factory = new Fct(); +new Factory(); +new Factory.Factory(); + +// $ExpectType Factory +factory.use(Mech); +factory.use('Mech', Mech); + +const mech: Mechanism | null = factory.create(['Mech']); +if (mech) { + // $ExpectType string + mech.name; + // $ExpectType string + mech.response({ foo: 'bar' }); + // $ExpectType void + mech.challenge('challenge'); +} diff --git a/types/saslmechanisms/tsconfig.json b/types/saslmechanisms/tsconfig.json new file mode 100644 index 0000000000..64beedfc0f --- /dev/null +++ b/types/saslmechanisms/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "saslmechanisms-tests.ts" + ] +} diff --git a/types/saslmechanisms/tslint.json b/types/saslmechanisms/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/saslmechanisms/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 84bc355df06ea07679ab0634483c08f76ac4bb7c Mon Sep 17 00:00:00 2001 From: Boris Sergeyev Date: Tue, 27 Nov 2018 07:18:16 +0100 Subject: [PATCH 118/608] [react-redux] improved naming of higher-order-type that handles thunks --- types/react-redux/index.d.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/types/react-redux/index.d.ts b/types/react-redux/index.d.ts index dc8a9af912..bcbcced0bd 100644 --- a/types/react-redux/index.d.ts +++ b/types/react-redux/index.d.ts @@ -112,19 +112,19 @@ export type InferableComponentEnhancerWithProps = export type InferableComponentEnhancer = InferableComponentEnhancerWithProps; -export type WrappedThunkActionCreator any> = +export type InferThunkActionCreatorType any> = TActionCreator extends (...args: infer TParams) => (...args: any[]) => infer TReturn ? (...args: TParams) => TReturn : TActionCreator; export type HandleThunkActionCreator = TActionCreator extends (...args: any[]) => any - ? WrappedThunkActionCreator + ? InferThunkActionCreatorType : TActionCreator; // redux-thunk middleware returns thunk's return value from dispatch call // https://github.com/reduxjs/redux-thunk#composition -export type WithThunkActionCreators = +export type ResolveThunks = TDispatchProps extends { [key: string]: any } ? { [C in keyof TDispatchProps]: HandleThunkActionCreator @@ -167,7 +167,7 @@ export interface Connect { mapStateToProps: null | undefined, mapDispatchToProps: TDispatchProps, ): InferableComponentEnhancerWithProps< - WithThunkActionCreators, + ResolveThunks, TOwnProps >; @@ -180,7 +180,7 @@ export interface Connect { mapStateToProps: MapStateToPropsParam, mapDispatchToProps: TDispatchProps, ): InferableComponentEnhancerWithProps< - TStateProps & WithThunkActionCreators, + TStateProps & ResolveThunks, TOwnProps >; @@ -229,7 +229,7 @@ export interface Connect { mergeProps: null | undefined, options: Options<{}, TStateProps, TOwnProps> ): InferableComponentEnhancerWithProps< - WithThunkActionCreators, + ResolveThunks, TOwnProps >; @@ -246,7 +246,7 @@ export interface Connect { mergeProps: null | undefined, options: Options ): InferableComponentEnhancerWithProps< - TStateProps & WithThunkActionCreators, + TStateProps & ResolveThunks, TOwnProps >; // tslint:enable:no-unnecessary-generics From 7e23c69081ef5211b821463eb9c223e891c7a456 Mon Sep 17 00:00:00 2001 From: Nokky Goren <30292793+ApeNox@users.noreply.github.com> Date: Tue, 27 Nov 2018 16:31:11 +0200 Subject: [PATCH 119/608] Update definitions to accommodate API changes InputProps are now optional. The Component now receives props via direct application. --- types/react-places-autocomplete/index.d.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/types/react-places-autocomplete/index.d.ts b/types/react-places-autocomplete/index.d.ts index 62e3d93a1d..26046fc06f 100644 --- a/types/react-places-autocomplete/index.d.ts +++ b/types/react-places-autocomplete/index.d.ts @@ -15,9 +15,7 @@ export interface formattedSuggestionType { } export interface PropTypes { - inputProps: { - value: string; - onChange: (value: string) => void; + inputProps?: { type?: string; name?: string; placeholder?: string; @@ -49,6 +47,9 @@ export interface PropTypes { radius?: number | string; types?: string[]; }; + value: string; + onChange?: (value: string) => void; + onBlur?: (event: React.FocusEvent) => void; debounce?: number; highlightFirstSuggestion?: boolean; From f5e979aa4e03525afab03c4bff3c339762b57314 Mon Sep 17 00:00:00 2001 From: Nokky Goren <30292793+ApeNox@users.noreply.github.com> Date: Tue, 27 Nov 2018 16:53:21 +0200 Subject: [PATCH 120/608] fix optional inputs --- types/react-places-autocomplete/index.d.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/types/react-places-autocomplete/index.d.ts b/types/react-places-autocomplete/index.d.ts index 26046fc06f..f95164a89d 100644 --- a/types/react-places-autocomplete/index.d.ts +++ b/types/react-places-autocomplete/index.d.ts @@ -19,7 +19,6 @@ export interface PropTypes { type?: string; name?: string; placeholder?: string; - onBlur?: (event: React.FocusEvent) => void; disabled?: boolean; }; onError?: (status: string, clearSuggestion: () => void) => void; @@ -47,7 +46,7 @@ export interface PropTypes { radius?: number | string; types?: string[]; }; - value: string; + value?: string; onChange?: (value: string) => void; onBlur?: (event: React.FocusEvent) => void; From f4f4074e189ffb8b461566c4430bd3d4620daa17 Mon Sep 17 00:00:00 2001 From: Nokky Goren <30292793+ApeNox@users.noreply.github.com> Date: Tue, 27 Nov 2018 16:55:07 +0200 Subject: [PATCH 121/608] Update types version --- types/react-places-autocomplete/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-places-autocomplete/index.d.ts b/types/react-places-autocomplete/index.d.ts index f95164a89d..19d53c863d 100644 --- a/types/react-places-autocomplete/index.d.ts +++ b/types/react-places-autocomplete/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-places-autocomplete 6.1 +// Type definitions for react-places-autocomplete 7 // Project: https://github.com/kenny-hibino/react-places-autocomplete/ // Definitions by: Guilherme Hübner // Andrew Makarov From 0a3010fe25eaded32b64e515df877479ca13cb53 Mon Sep 17 00:00:00 2001 From: Nokky Goren <30292793+ApeNox@users.noreply.github.com> Date: Tue, 27 Nov 2018 16:57:11 +0200 Subject: [PATCH 122/608] Update Tests --- .../react-places-autocomplete-tests.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-places-autocomplete/react-places-autocomplete-tests.tsx b/types/react-places-autocomplete/react-places-autocomplete-tests.tsx index 41e6ff37b4..a7a7816d99 100644 --- a/types/react-places-autocomplete/react-places-autocomplete-tests.tsx +++ b/types/react-places-autocomplete/react-places-autocomplete-tests.tsx @@ -45,7 +45,7 @@ class Test extends React.Component { return (
- + ); } From 4731065fe25d5aa1e192166802321482db70dd21 Mon Sep 17 00:00:00 2001 From: Nokky Goren <30292793+ApeNox@users.noreply.github.com> Date: Tue, 27 Nov 2018 17:02:42 +0200 Subject: [PATCH 123/608] Update index.d.ts --- types/react-places-autocomplete/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-places-autocomplete/index.d.ts b/types/react-places-autocomplete/index.d.ts index 19d53c863d..6a6a85c19e 100644 --- a/types/react-places-autocomplete/index.d.ts +++ b/types/react-places-autocomplete/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-places-autocomplete 7 +// Type definitions for react-places-autocomplete 7.2 // Project: https://github.com/kenny-hibino/react-places-autocomplete/ // Definitions by: Guilherme Hübner // Andrew Makarov From c7f49bd2d0d3e9f5cd066b6e340db5f404a0d212 Mon Sep 17 00:00:00 2001 From: dasimple Date: Tue, 27 Nov 2018 18:47:12 +0200 Subject: [PATCH 124/608] First typings for gdal package --- types/gdal/gdal-tests.ts | 78 ++++ types/gdal/index.d.ts | 764 +++++++++++++++++++++++++++++++++++++++ types/gdal/tsconfig.json | 22 ++ types/gdal/tslint.json | 1 + 4 files changed, 865 insertions(+) create mode 100644 types/gdal/gdal-tests.ts create mode 100644 types/gdal/index.d.ts create mode 100644 types/gdal/tsconfig.json create mode 100644 types/gdal/tslint.json diff --git a/types/gdal/gdal-tests.ts b/types/gdal/gdal-tests.ts new file mode 100644 index 0000000000..d30c83d571 --- /dev/null +++ b/types/gdal/gdal-tests.ts @@ -0,0 +1,78 @@ +import * as gdal from 'gdal'; + +// gdal.checksumImage(srcRasterBand, 0, 0, 512, 512); + +gdal.config.get('GDAL_DATA'); +gdal.config.set('GDAL_DATA', 'C:\\warmerda\\bld\\data'); + +/*gdal.contourGenerate({ + src: srcRasterBand, + dst: dstRasterBand +});*/ + +gdal.decToDMS(60, 'lat'); +gdal.decToDMS(60, 'lat', 2); + +/*gdal.fillNodata({ + +});*/ + +let creationOptionsArray: string[]; +creationOptionsArray = ['VRT_CREATION_OPTION=...']; +let creationOptionsObject: object; +creationOptionsObject = { + VRT_CREATION_OPTION: '...' +}; +gdal.open('C:\\datasets\\ogr.shp'); +gdal.open('C:\\datasets\\ogr.shp', 'r'); +gdal.open('C:\\datasets\\ogr.shp', 'r', 'ESRI Shapefile'); +gdal.open('C:\\datasets\\ogr.shp', 'r', ['ESRI Shapefile']); +gdal.open('C:\\datasets\\ogr.shp', 'r+'); +gdal.open('C:\\datasets\\ogr.shp', 'r+', 'ESRI Shapefile'); +gdal.open('C:\\datasets\\ogr.shp', 'r+', ['ESRI Shapefile']); +gdal.open('C:\\datasets\\raster.vrt', 'w', 'VRT'); +gdal.open('C:\\datasets\\raster.vrt', 'w', 'VRT', 512, 512, 3, 1, creationOptionsArray); +gdal.open('C:\\datasets\\raster.vrt', 'w', 'VRT', 512, 512, 3, 1, creationOptionsObject); +gdal.open('C:\\datasets\\raster.vrt', 'w', ['VRT']); +gdal.open('C:\\datasets\\raster.vrt', 'w', ['VRT'], 512, 512, 3, 1, creationOptionsArray); +gdal.open('C:\\datasets\\raster.vrt', 'w', ['VRT'], 512, 512, 3, 1, creationOptionsObject); + +/*let polygonizeOptions: gdal.PolygonizeOptions; +polygonizeOptions = { + src: srcRasterBand, + dst: dstRasterBand, + connectedness: 1, + mask: maskRasterBand, + pixValField: 1, + useFloats: true +}; +gdal.polygonize(polygonizeOptions); +gdal.polygonize({ + src: srcRasterBand, + dst: dstRasterBand, + pixValField: 1 +});*/ + +gdal.quiet(); + +/*let reprojectImageOptions: gdal.ReprojectImageOptions; +reprojectImageOptions = { + src: srcRasterBand, + dst: dstRasterBand, + s_srs: sourceSRS, + t_srs: targetSRS +}; +gdal.reprojectImage(reprojectImageOptions); +gdal.reprojectImage({ + +}); + +gdal.sieveFilter({ + +}); + +gdal.suggestedWarpOutput({ + +});*/ + +gdal.verbose(); diff --git a/types/gdal/index.d.ts b/types/gdal/index.d.ts new file mode 100644 index 0000000000..50280cff3d --- /dev/null +++ b/types/gdal/index.d.ts @@ -0,0 +1,764 @@ +// Type definitions for gdal 0.9 +// Project: https://github.com/naturalatlas/node-gdal#readme +// Definitions by: Andrei Digori +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.0 + +export as namespace gdal; + +/* Internal interfaces */ + +export type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array; +export type Resampling = 'NEAREST' | 'GAUSS' | 'CUBIC' | 'AVERAGE' | 'MODE' | 'AVERAGE_MAGPHASE' | 'NONE'; + +export interface XY +{ + x: number; + y: number; +} + +export interface XYZ extends XY +{ + z: number; +} + +export interface EnvelopeBounds +{ + minX: number, + maxX: number, + minY: number, + maxY: number +} + +export interface Envelope3DBounds extends EnvelopeBounds +{ + minZ: number, + maxZ: number +} + +export interface RasterBandStatistics +{ + min: number; + max: number; + mean: number; + std_dev: number; +} + +export interface RasterBandPixelsWriteOptions +{ + buffer_width?: number; + buffer_height?: number; + pixel_space?: number; + line_space?: number; +} + +export interface RasterBandPixelsReadOptions +{ + buffer_width?: number; + buffer_height?: number; + pixel_space?: number; + line_space?: number; + data_type?: string; +} + +export interface ContourGenerateOptions +{ + src: RasterBand; + dst: Layer; + offset?: number; + interval?: number; + fixedLevels?: number[]; + nodata?: number; + idField?: number; + elevField?: number; +} + +export interface FillNoDataOptions +{ + src: RasterBand; + mask?: RasterBand; + searchDist: number; + smoothingIterations?: number; +} + +export interface PolygonizeOptions +{ + src: RasterBand; + dst: Layer; + mask?: RasterBand; + pixValField: number; + connectedness?: number; + useFloats?: boolean; +} + +export interface ReprojectImageOptions +{ + src: Dataset; + dst: Dataset; + s_srs: SpatialReference; + t_srs: SpatialReference; + resampling?: string; + cutline?: Geometry; + srcBands?: number[]; + dstBands?: number[]; + srcAlphaBand?: number; + dstAlphaBand?: number; + srcNodata?: number; + dstNodata?: number; + memoryLimit?: number; + maxError?: number; + multi?: boolean; + options?: string[] | object; +} + +export interface SieveFilterOptions +{ + src: RasterBand; + dst: RasterBand; + mask?: RasterBand; + threshold: number; + connectedness?: number; +} + +export interface SuggestedWarpOutputOptions +{ + src: Dataset; + s_srs: SpatialReference; + t_srs: SpatialReference; + maxError?: number; +} + +/* From API: https://naturalatlas.github.io/node-gdal/ */ + +/* Constants */ + +// CPL Error Codes +export const CPLE_AppDefined: number; +export const CPLE_AssertionFailed: number; +export const CPLE_FileIO: number; +export const CPLE_IllegalArg: number; +export const CPLE_None: number; +export const CPLE_NotSupported: number; +export const CPLE_NoWriteAccess: number; +export const CPLE_ObjectNull: number; +export const CPLE_OpenFailed: number; +export const CPLE_OutOfMemory: number; +export const CPLE_UserInterrupt: number; + +// CPL Error Levels +export const CE_Debug: number; +export const CE_Failure: number; +export const CE_Fatal: number; +export const CE_None: number; +export const CE_Warning: number; + +// DCAP +export const DCAP_CREATE: string; +export const DCAP_CREATECOPY: string; +export const DCAP_VIRTUALIO: string; + +// DMD +export const DMD_CREATIONDATATYPES: string; +export const DMD_CREATIONOPTIONLIST: string; +export const DMD_EXTENSION: string; +export const DMD_HELPTOPIC: string; +export const DMD_LONGNAME: string; +export const DMD_MIMETYPE: string; + +// GCI +export const GCI_AlphaBand: string; +export const GCI_BlackBand: string; +export const GCI_BlueBand: string; +export const GCI_CyanBand: string; +export const GCI_GrayIndex: string; +export const GCI_GreenBand: string; +export const GCI_HueBand: string; +export const GCI_LightnessBand: string; +export const GCI_MagentaBand: string; +export const GCI_PaletteIndex: string; +export const GCI_RedBand: string; +export const GCI_SaturationBand: string; +export const GCI_Undefined: string; +export const GCI_YCbCr_CbBand: string; +export const GCI_YCbCr_CrBand: string; +export const GCI_YCbCr_YBand: string; +export const GCI_YellowBand: string; + +// GDT +export const GDT_Byte: string; +export const GDT_CFloat32: string; +export const GDT_CFloat64: string; +export const GDT_CInt16: string; +export const GDT_CInt32: string; +export const GDT_Float32: string; +export const GDT_Float64: string; +export const GDT_Int16: string; +export const GDT_Int32: string; +export const GDT_UInt16: string; +export const GDT_UInt32: string; +export const GDT_Unknown: string; + +// GRA +export const GRA_Average: string; +export const GRA_Bilinear: string; +export const GRA_Cubic: string; +export const GRA_CubicSpline: string; +export const GRA_Lanczos: string; +export const GRA_Mode: string; +export const GRA_NearestNeighbor: string; + +// ODsC +export const ODrCCreateDataSource: string; +export const ODrCDeleteDataSource: string; +export const ODsCCreateGeomFieldAfterCreateLayer: string; +export const ODsCCreateLayer: string; +export const ODsCDeleteLayer: string; + +// OFT +export const OFTBinary: string; +export const OFTDate: string; +export const OFTDateTime: string; +export const OFTInteger: string; +export const OFTIntegerList: string; +export const OFTReal: string; +export const OFTRealList: string; +export const OFTString: string; +export const OFTStringList: string; +export const OFTTime: string; +export const OFTWideString: string; +export const OFTWideStringList: string; + +// OJ +export const OJLeft: string; +export const OJRight: string; +export const OJUndefined: string; + +// OLC +export const OLCAlterFieldDefn: string; +export const OLCCreateField: string; +export const OLCCreateGeomField: string; +export const OLCDeleteFeature: string; +export const OLCDeleteField: string; +export const OLCFastFeatureCount: string; +export const OLCFastGetExtent: string; +export const OLCFastSetNextByIndex: string; +export const OLCFastSpatialFilter: string; +export const OLCIgnoreFields: string; +export const OLCRandomRead: string; +export const OLCRandomWrite: string; +export const OLCReorderFields: string; +export const OLCSequentialWrite: string; +export const OLCStringsAsUTF8: string; +export const OLCTransactions: string; + +// wkbByteOrder +export const wkbNDR: string; +export const wkbXDR: string; + +// wkbGeometryType +export const wkb25DBit: number; +export const wkbGeometryCollection: number; +export const wkbGeometryCollection25D: number; +export const wkbLinearRing: string; +export const wkbLinearRing25D: number; +export const wkbLineString: number; +export const wkbLineString25D: number; +export const wkbMultiLineString: number; +export const wkbMultiLineString25D: number; +export const wkbMultiPoint: number; +export const wkbMultiPoint25D: number; +export const wkbMultiPolygon: number; +export const wkbMultiPolygon25D: number; +export const wkbNone: number; +export const wkbPoint: number; +export const wkbPoint25D: number; +export const wkbPolygon: number; +export const wkbPolygon25D: number; +export const wkbUnknown: number; + +// wkbVariant +export const wkbVariantIso: string; +export const wkbVariantOgc: string; +export const wkbVariantOldOgc: string; + +/* Classes and interfaces */ + +export class CoordinateTransformation +{ + constructor(source: SpatialReference, target: SpatialReference | Dataset); + transformPoint(x: number, y: number, z?: number): XYZ; +} + +export interface Dataset +{ + buildOverviews(resampling: Resampling, overviews: number[], bands?: number[]): void; + close(): void; + executeSQL(statement: string, spatial_filter?: Geometry, dialect?: string): Layer; + flush(): void; + getFileList(): string[]; + getGCPProjection(): string; + getGCPs(): object[]; + getMetadata(domain?: string): object; + setGCPs(gcps: object[], projection: string): void; + testCapability(capability: string): boolean; + + readonly bands: DatasetBands; + readonly description: string; + readonly driver: Driver; + geoTransform: number[]; + readonly layers: DatasetLayers; + readonly rasterSize: XY; + srs: SpatialReference; +} + +export interface DatasetBands +{ + count(): number; + create(dataType: number): RasterBand; + forEach(callback: (band: RasterBand, i: number) => void): void; + get(id: number): RasterBand; + map(callback: (band: RasterBand, i: number) => T): T[]; + + readonly ds: Dataset; +} + +export interface DatasetLayers +{ + copy(src_lyr_name: string, dst_lyr_name: string, options?: object | string[]): Layer; + count(): number; + create(name: string, srs: SpatialReference, geomType: number | Function, creation_options: string[] | object): Layer; + forEach(callback: (layer: Layer, i: number) => void): void; + get(key: string | number): Layer; + map(callback: (layer: Layer, i: number) => T): T[]; + remove(index: number): void; + + readonly ds: Dataset; +} + +export interface Driver +{ + copyFiles(name_old: string, name_new: string): void; + create(filename: string, x_size?: number, y_size?: number, band_count?: number, data_type?: number, creation_options?: string[] | object): Dataset; + createCopy(filename: string, src: Dataset, strict?: boolean, options?: string[] | object): Dataset; + deleteDataset(filename: string): void; + getMetadata(domain?: string): object; + open(path: string, mode?: 'r' | 'r+'): Dataset; + rename(new_name: string, old_name: string): void; + + readonly description: string; +} + +export class Envelope +{ + constructor(bounds: EnvelopeBounds); + contains(envelope: Envelope): boolean; + intersect(envelope: Envelope): void; + intersects(envelope: Envelope): boolean; + isEmpty(): boolean; + merge(envelope: Envelope): void; + toPolygon(): Polygon; +} + +export class Envelope3D extends Envelope +{ + constructor(bounds: Envelope3DBounds); +} + +export class Feature +{ + constructor(definition: Layer | FeatureDefn); + clone(): Feature; + destroy(): void; + equals(feature: Feature): boolean; + getFieldDefn(index: number): FieldDefn; + getGeometry(): Geometry; + setFrom(feature: Feature, index_map?: number[], forgiving?: boolean): void; + setGeometry(geometry: Geometry): void; + + readonly defn: FeatureDefn; + fid: number; + readonly fields: FeatureFields; +} + +export class FeatureDefn +{ + constructor(); + clone(): FeatureDefn; + + readonly fields: FeatureDefnFields; + geomIgnored: boolean; + geomType: number; + readonly name: string; + styleIgnored: boolean; +} + +export interface FeatureDefnFields +{ + add(field: FieldDefn | FieldDefn[]): void; + count(): number; + forEach(callback: (field: FieldDefn, i: number) => void): void; + get(key: string | number): FieldDefn; + getNames(): string[]; + indexOf(name: string): number; + map(callback: (field: FieldDefn, i: number) => T): T[]; + remove(key: string | number): void; + reorder(map: number[]): void; + + readonly featureDefn: FeatureDefn; +} + +export interface FeatureFields +{ + count(): number; + forEach(callback: (value: any, key: string) => void): void; + get(key: string | number): any; + getNames(): string[]; + indexOf(name: string): number; + map(callback: (value: any, key: string) => T): T[]; + reset(values: object, value: any): void; + set(key: string | number, value: any): void; + toArray(): any[]; + toJSON(): string; + toObject(): object; + + readonly feature: Feature; +} + +export class FieldDefn +{ + constructor(name: string, type: string); + + ignored: boolean; + justification: string; + name: string; + precision: number; + type: string; + width: number; +} + +export interface GDALDrivers +{ + count(): number; + forEach(callback: (driver: Driver, i: number) => void): void; + get(index: number | string): Driver; + getNames(): string[]; + map(callback: (driver: Driver, i: number) => T): T[]; +} + +export abstract class Geometry +{ + static create(type: number): Geometry; + static fromWKB(wkb: number, srs?: SpatialReference): Geometry; + static fromWKT(wkt: string, srs?: SpatialReference): Geometry; + static getConstructor(type: number): Function; + static getName(type: number): string; + + boundary(): Geometry; + buffer(distance: number, segments: number): Geometry; + centroid(): Point; + clone(): Geometry; + closeRings(): void; + contains(geometry: Geometry): boolean; + convexHull(): Geometry; + crosses(geometry: Geometry): boolean; + difference(geometry: Geometry): Geometry; + disjoint(geometry: Geometry): boolean; + distance(geometry: Geometry): number; + empty(): void; + equals(geometry: Geometry): boolean; + getEnvelope(): Envelope; + getEnvelope3D(): Envelope3D; + intersection(geometry: Geometry): Geometry; + intersects(geometry: Geometry): boolean; + isEmpty(): boolean; + isRing(): boolean; + isSimple(): boolean; + isValid(): boolean; + overlaps(geometry: Geometry): boolean; + segmentize(segment_length: number): number; + simplify(tolerance: number): Geometry; + simplifyPreserveTopology(tolerance: number): Geometry; + swapXY(): void; + symDifference(geometry: Geometry): Geometry; + toGML(): Geometry; + toJSON(): Geometry; + toKML(): Geometry; + toObject(): object; + touches(geometry: Geometry): boolean; + toWKB(byte_order?: string, variant?: string): Geometry; + toWKT(): Geometry; + transform(transformation: CoordinateTransformation): void; + transformTo(srs: SpatialReference): void; + union(geometry: Geometry): Geometry; + within(geometry: Geometry): boolean; + + readonly coordinateDimension: number; + readonly dimension: number; + readonly name: string; + srs: SpatialReference; + readonly wkbSize: number; + readonly wkbType: number; +} + +export class GeometryCollection extends Geometry +{ + getArea(): number; + getLength(): number; + + children: GeometryCollectionChildren; +} + +export interface GeometryCollectionChildren +{ + add(geometry: Geometry | Geometry[]): void; + count(): number; + forEach(callback: (geometry: Geometry, i: number) => void): void; + get(index: number): Geometry; + map(callback: (geometry: Geometry, i: number) => T): T[]; + remove(index: number): void; + toArray(): Geometry[]; + + readonly layer: Layer; +} + +export interface Layer +{ + flush(): void; + getExtent(force?: boolean): Envelope; + getSpatialFilter(): Geometry; + setAttributeFilter(filter: string): void; + setSpatialFilter(filter: Geometry): void; + setSpatialFilter(minX: number, maxX: number, minY: number, maxY: number): void; + testCapability(capability: string): boolean; + + readonly ds: Dataset; + readonly features: LayerFeatures; + readonly fidColumn: string; + readonly fields: LayerFields; + readonly geomColumn: string; + readonly geomType: number; + readonly name: string; + readonly srs: SpatialReference; +} + +export interface LayerFeatures +{ + add(feature: Feature): void; + count(force?: boolean): number; + first(): Feature; + forEach(callback: (feature: Feature, i: number) => void): void; + get(id: number): Feature; + map(callback: (feature: Feature, i: number) => T): T[]; + next(): Feature; + remove(id: number): void; + set(id: number, feature: Feature): void; + + readonly layer: Layer; +} + +export interface LayerFields +{ + add(def: FieldDefn | FieldDefn[], approx?: boolean): void; + count(): number; + forEach(callback: (field: FieldDefn, i: number) => void): void; + fromJSON(object: object, approx_ok?: boolean): LayerFields; + get(field: string | number): FieldDefn; + getNames(): string[]; + indexOf(field: string): number; + map(callback: (field: FieldDefn, i: number) => T): T[]; + remove(field: string | number): void; + reorder(map: number[]): void; + + readonly layer: Layer; +} + +export class LinearRing extends LineString +{ + getArea(): number; +} + +export class LineString extends Geometry +{ + addSubLineString(line: LineString, start?: number, end?: number): void; + getLength(): number; + value(distance: number): Point; + + readonly points: LineStringPoints; +} + +export interface LineStringPoints +{ + add(point: Point | Point[]): void; + count(): number; + forEach(callback: (point: Point, i: number) => void): void; + get(index: number): Point; + map(callback: (point: Point, i: number) => T): T[]; + remove(index: number): void; + resize(count: number): void; + reverse(): void; + set(index: number, point: Point): void; + toArray(): Point[]; +} + +export class MultiLineString extends GeometryCollection +{ + polygonize(): Polygon; +} + +export class MultiPoint extends GeometryCollection +{ + +} + +export class MultiPolygon extends GeometryCollection +{ + getArea(): number; + unionCascaded(): Geometry; +} + +export class Point extends Geometry +{ + constructor(x: number, y: number, z?: number); + + x: number; + y: number; + z: number; +} + +export class Polygon extends Geometry +{ + getArea(): number; + + rings: PolygonRings; +} + +export interface PolygonRings +{ + add(ring: LinearRing | LinearRing[]): void; + count(): number; + forEach(callback: (ring: LinearRing, i: number) => void): void; + get(index: number): LinearRing; + map(callback: (ring: LinearRing, i: number) => T): T[]; + remove(index: number): void; + toArray(): LinearRing[]; + + readonly layer: Layer; +} + +export interface RasterBand +{ + computeStatistics(allow_approximation: boolean): RasterBandStatistics; + createMaskBand(flags: number): void; + fill(real_value: number, imaginary_value?: number): void; + flush(): void; + getMaskBand(): RasterBand; + getMaskFlags(): number; + getMetadata(domain?: string): object; + getStatistics(allow_approximation: boolean, force: boolean): RasterBandStatistics; + setStatistics(min: number, max: number, mean: number, std_dev: number): void; + + readonly blockSize: XY; + categoryNames: string[]; + colorInterpretation: string; + readonly dataType: string; + readonly description: string; + readonly ds: Dataset; + readonly hasArbitraryOverviews: boolean; + readonly id: number; + readonly maximum: number; + readonly minimum: number; + noDataValue: number; + offset: number; + readonly overviews: RasterBandOverviews; + readonly pixels: RasterBandPixels; + readonly readOnly: boolean; + scale: number; + readonly size: XY; + unitType: string; +} + +export interface RasterBandOverviews +{ + count(): number; + forEach(callback: (overviewBand: RasterBand, i: number) => void): void; + get(index: number): RasterBand; + getBySampleCount(samples: number): RasterBand; + map(callback: (overviewBand: RasterBand, i: number) => T): T[]; +} + +export interface RasterBandPixels +{ + get(x: number, y: number): number; + read(x: number, y: number, width: number, height: number, data?: TypedArray, options?: RasterBandPixelsReadOptions): TypedArray; + readBlock(x: number, y: number, data?: TypedArray): TypedArray; + set(x: number, y: number, value: number): void; + write(x: number, y: number, width: number, height: number, data: TypedArray, options?: RasterBandPixelsWriteOptions): void; + writeBlock(x: number, y: number, data: TypedArray): void; +} + +export class SpatialReference +{ + constructor(wkt?: string); + autoIdentifyEPSG(): void; + clone(): SpatialReference; + cloneGeogCS(): SpatialReference; + EPSGTreatsAsLatLong(): boolean; + EPSGTreatsAsNorthingEasting(): boolean; + getAngularUnits(): { value: any, unit: any }; + getAttrValue(node_name: string, attr_index?: number): string; + getAuthorityCode(target_key: string): string; + getAuthorityName(target_key: string): string; + getLinearUnits(): { value: any, unit: any }; + isCompound(): boolean; + isGeocentric(): boolean; + isGeographic(): boolean; + isLocal(): boolean; + isProjected(): boolean; + isSame(srs: SpatialReference): boolean; + isSameGeogCS(srs: SpatialReference): boolean; + isSameVertCS(srs: SpatialReference): boolean; + isVertical(): boolean; + morphFromESRI(): void; + morphToESRI(): void; + setWellKnownGeogCS(name: string): void; + toPrettyWKT(simplify?: boolean): string; + toProj4(): string; + toWKT(): string; + toXML(): string; + validate(): string; + + static fromCRSURL(input: string): SpatialReference; + static fromEPSG(input: string): SpatialReference; + static fromEPSGA(input: number): SpatialReference; + static fromESRI(input: string[]): SpatialReference; + static fromMICoordSys(input: string): SpatialReference; + static fromProj4(input: string): SpatialReference; + static fromURL(url: string): SpatialReference; + static fromURN(input: string): SpatialReference; + static fromUserInput(input: string): SpatialReference; + static fromWKT(wkt: string): SpatialReference; + static fromWMSAUTO(input: string): SpatialReference; + static fromXML(input: string): SpatialReference; +} + +export namespace config +{ + function get(key: string): string; + function set(key: string, value: string): void; +} + +export const drivers: GDALDrivers; +export const lastError: { number: any, message: any, type: any }; +export const version: string; + +export function checksumImage(src: RasterBand, x?: number, y?: number, w?: number, h?: number): number; +export function contourGenerate(options: ContourGenerateOptions): void; +export function decToDMS(angle: number, axis: 'lat' | 'long', precision?: number): string; +export function fillNodata(options: FillNoDataOptions): void; +export function open(path: string, mode?: 'r' | 'r+' | 'w', drivers?: string | string[], x_size?: number, y_size?: number, band_count?: number, data_type?: number, creation_options?: string[] | object): Dataset; +export function polygonize(options: PolygonizeOptions): void; +export function quiet(): void; +export function reprojectImage(options: ReprojectImageOptions): void; +export function sieveFilter(options: SieveFilterOptions): void; +export function suggestedWarpOutput(options: SuggestedWarpOutputOptions): { rasterSize: any, geoTransform: any }; +export function verbose(): void; \ No newline at end of file diff --git a/types/gdal/tsconfig.json b/types/gdal/tsconfig.json new file mode 100644 index 0000000000..a7bd1cf386 --- /dev/null +++ b/types/gdal/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", + "gdal-tests.ts" + ] +} diff --git a/types/gdal/tslint.json b/types/gdal/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/gdal/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From a104ee185677834365ba69b74bd14cd14723d5e7 Mon Sep 17 00:00:00 2001 From: andreidigori <45198612+andreidigori@users.noreply.github.com> Date: Tue, 27 Nov 2018 19:05:34 +0200 Subject: [PATCH 125/608] Update tsconfig.json Set "strictFunctionTypes": false, --- types/gdal/tsconfig.json | 1 + 1 file changed, 1 insertion(+) diff --git a/types/gdal/tsconfig.json b/types/gdal/tsconfig.json index a7bd1cf386..3a5bfaf917 100644 --- a/types/gdal/tsconfig.json +++ b/types/gdal/tsconfig.json @@ -7,6 +7,7 @@ "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, + "strictFunctionTypes": false, "baseUrl": "../", "typeRoots": [ "../" From 08b098667ad9ab2e6ff405662be41b947af7e04f Mon Sep 17 00:00:00 2001 From: andreidigori <45198612+andreidigori@users.noreply.github.com> Date: Tue, 27 Nov 2018 19:20:57 +0200 Subject: [PATCH 126/608] Update index.d.ts TsLint check --- types/gdal/index.d.ts | 138 ++++++++++++++---------------------------- 1 file changed, 46 insertions(+), 92 deletions(-) diff --git a/types/gdal/index.d.ts b/types/gdal/index.d.ts index 50280cff3d..41a89ff72f 100644 --- a/types/gdal/index.d.ts +++ b/types/gdal/index.d.ts @@ -11,49 +11,42 @@ export as namespace gdal; export type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array; export type Resampling = 'NEAREST' | 'GAUSS' | 'CUBIC' | 'AVERAGE' | 'MODE' | 'AVERAGE_MAGPHASE' | 'NONE'; -export interface XY -{ +export interface XY { x: number; y: number; } -export interface XYZ extends XY -{ +export interface XYZ extends XY { z: number; } -export interface EnvelopeBounds -{ +export interface EnvelopeBounds { minX: number, maxX: number, minY: number, maxY: number } -export interface Envelope3DBounds extends EnvelopeBounds -{ +export interface Envelope3DBounds extends EnvelopeBounds { minZ: number, maxZ: number } -export interface RasterBandStatistics -{ +export interface RasterBandStatistics { min: number; max: number; mean: number; std_dev: number; } -export interface RasterBandPixelsWriteOptions -{ +export interface RasterBandPixelsWriteOptions { buffer_width?: number; buffer_height?: number; pixel_space?: number; line_space?: number; } -export interface RasterBandPixelsReadOptions -{ +export interface RasterBandPixelsReadOptions { buffer_width?: number; buffer_height?: number; pixel_space?: number; @@ -61,8 +54,7 @@ export interface RasterBandPixelsReadOptions data_type?: string; } -export interface ContourGenerateOptions -{ +export interface ContourGenerateOptions { src: RasterBand; dst: Layer; offset?: number; @@ -73,16 +65,14 @@ export interface ContourGenerateOptions elevField?: number; } -export interface FillNoDataOptions -{ +export interface FillNoDataOptions { src: RasterBand; mask?: RasterBand; searchDist: number; smoothingIterations?: number; } -export interface PolygonizeOptions -{ +export interface PolygonizeOptions { src: RasterBand; dst: Layer; mask?: RasterBand; @@ -91,8 +81,7 @@ export interface PolygonizeOptions useFloats?: boolean; } -export interface ReprojectImageOptions -{ +export interface ReprojectImageOptions { src: Dataset; dst: Dataset; s_srs: SpatialReference; @@ -111,8 +100,7 @@ export interface ReprojectImageOptions options?: string[] | object; } -export interface SieveFilterOptions -{ +export interface SieveFilterOptions { src: RasterBand; dst: RasterBand; mask?: RasterBand; @@ -120,8 +108,7 @@ export interface SieveFilterOptions connectedness?: number; } -export interface SuggestedWarpOutputOptions -{ +export interface SuggestedWarpOutputOptions { src: Dataset; s_srs: SpatialReference; t_srs: SpatialReference; @@ -283,14 +270,12 @@ export const wkbVariantOldOgc: string; /* Classes and interfaces */ -export class CoordinateTransformation -{ +export class CoordinateTransformation { constructor(source: SpatialReference, target: SpatialReference | Dataset); transformPoint(x: number, y: number, z?: number): XYZ; } -export interface Dataset -{ +export interface Dataset { buildOverviews(resampling: Resampling, overviews: number[], bands?: number[]): void; close(): void; executeSQL(statement: string, spatial_filter?: Geometry, dialect?: string): Layer; @@ -311,8 +296,7 @@ export interface Dataset srs: SpatialReference; } -export interface DatasetBands -{ +export interface DatasetBands { count(): number; create(dataType: number): RasterBand; forEach(callback: (band: RasterBand, i: number) => void): void; @@ -322,8 +306,7 @@ export interface DatasetBands readonly ds: Dataset; } -export interface DatasetLayers -{ +export interface DatasetLayers { copy(src_lyr_name: string, dst_lyr_name: string, options?: object | string[]): Layer; count(): number; create(name: string, srs: SpatialReference, geomType: number | Function, creation_options: string[] | object): Layer; @@ -335,8 +318,7 @@ export interface DatasetLayers readonly ds: Dataset; } -export interface Driver -{ +export interface Driver { copyFiles(name_old: string, name_new: string): void; create(filename: string, x_size?: number, y_size?: number, band_count?: number, data_type?: number, creation_options?: string[] | object): Dataset; createCopy(filename: string, src: Dataset, strict?: boolean, options?: string[] | object): Dataset; @@ -348,8 +330,7 @@ export interface Driver readonly description: string; } -export class Envelope -{ +export class Envelope { constructor(bounds: EnvelopeBounds); contains(envelope: Envelope): boolean; intersect(envelope: Envelope): void; @@ -359,13 +340,11 @@ export class Envelope toPolygon(): Polygon; } -export class Envelope3D extends Envelope -{ +export class Envelope3D extends Envelope { constructor(bounds: Envelope3DBounds); } -export class Feature -{ +export class Feature { constructor(definition: Layer | FeatureDefn); clone(): Feature; destroy(): void; @@ -380,8 +359,7 @@ export class Feature readonly fields: FeatureFields; } -export class FeatureDefn -{ +export class FeatureDefn { constructor(); clone(): FeatureDefn; @@ -392,8 +370,7 @@ export class FeatureDefn styleIgnored: boolean; } -export interface FeatureDefnFields -{ +export interface FeatureDefnFields { add(field: FieldDefn | FieldDefn[]): void; count(): number; forEach(callback: (field: FieldDefn, i: number) => void): void; @@ -407,8 +384,7 @@ export interface FeatureDefnFields readonly featureDefn: FeatureDefn; } -export interface FeatureFields -{ +export interface FeatureFields { count(): number; forEach(callback: (value: any, key: string) => void): void; get(key: string | number): any; @@ -424,8 +400,7 @@ export interface FeatureFields readonly feature: Feature; } -export class FieldDefn -{ +export class FieldDefn { constructor(name: string, type: string); ignored: boolean; @@ -436,8 +411,7 @@ export class FieldDefn width: number; } -export interface GDALDrivers -{ +export interface GDALDrivers { count(): number; forEach(callback: (driver: Driver, i: number) => void): void; get(index: number | string): Driver; @@ -445,8 +419,7 @@ export interface GDALDrivers map(callback: (driver: Driver, i: number) => T): T[]; } -export abstract class Geometry -{ +export abstract class Geometry { static create(type: number): Geometry; static fromWKB(wkb: number, srs?: SpatialReference): Geometry; static fromWKT(wkt: string, srs?: SpatialReference): Geometry; @@ -500,16 +473,14 @@ export abstract class Geometry readonly wkbType: number; } -export class GeometryCollection extends Geometry -{ +export class GeometryCollection extends Geometry { getArea(): number; getLength(): number; children: GeometryCollectionChildren; } -export interface GeometryCollectionChildren -{ +export interface GeometryCollectionChildren { add(geometry: Geometry | Geometry[]): void; count(): number; forEach(callback: (geometry: Geometry, i: number) => void): void; @@ -521,8 +492,7 @@ export interface GeometryCollectionChildren readonly layer: Layer; } -export interface Layer -{ +export interface Layer { flush(): void; getExtent(force?: boolean): Envelope; getSpatialFilter(): Geometry; @@ -541,8 +511,7 @@ export interface Layer readonly srs: SpatialReference; } -export interface LayerFeatures -{ +export interface LayerFeatures { add(feature: Feature): void; count(force?: boolean): number; first(): Feature; @@ -556,8 +525,7 @@ export interface LayerFeatures readonly layer: Layer; } -export interface LayerFields -{ +export interface LayerFields { add(def: FieldDefn | FieldDefn[], approx?: boolean): void; count(): number; forEach(callback: (field: FieldDefn, i: number) => void): void; @@ -572,13 +540,11 @@ export interface LayerFields readonly layer: Layer; } -export class LinearRing extends LineString -{ +export class LinearRing extends LineString { getArea(): number; } -export class LineString extends Geometry -{ +export class LineString extends Geometry { addSubLineString(line: LineString, start?: number, end?: number): void; getLength(): number; value(distance: number): Point; @@ -586,8 +552,7 @@ export class LineString extends Geometry readonly points: LineStringPoints; } -export interface LineStringPoints -{ +export interface LineStringPoints { add(point: Point | Point[]): void; count(): number; forEach(callback: (point: Point, i: number) => void): void; @@ -600,24 +565,20 @@ export interface LineStringPoints toArray(): Point[]; } -export class MultiLineString extends GeometryCollection -{ +export class MultiLineString extends GeometryCollection { polygonize(): Polygon; } -export class MultiPoint extends GeometryCollection -{ +export class MultiPoint extends GeometryCollection { } -export class MultiPolygon extends GeometryCollection -{ +export class MultiPolygon extends GeometryCollection { getArea(): number; unionCascaded(): Geometry; } -export class Point extends Geometry -{ +export class Point extends Geometry { constructor(x: number, y: number, z?: number); x: number; @@ -625,15 +586,13 @@ export class Point extends Geometry z: number; } -export class Polygon extends Geometry -{ +export class Polygon extends Geometry { getArea(): number; rings: PolygonRings; } -export interface PolygonRings -{ +export interface PolygonRings { add(ring: LinearRing | LinearRing[]): void; count(): number; forEach(callback: (ring: LinearRing, i: number) => void): void; @@ -645,8 +604,7 @@ export interface PolygonRings readonly layer: Layer; } -export interface RasterBand -{ +export interface RasterBand { computeStatistics(allow_approximation: boolean): RasterBandStatistics; createMaskBand(flags: number): void; fill(real_value: number, imaginary_value?: number): void; @@ -677,8 +635,7 @@ export interface RasterBand unitType: string; } -export interface RasterBandOverviews -{ +export interface RasterBandOverviews { count(): number; forEach(callback: (overviewBand: RasterBand, i: number) => void): void; get(index: number): RasterBand; @@ -686,8 +643,7 @@ export interface RasterBandOverviews map(callback: (overviewBand: RasterBand, i: number) => T): T[]; } -export interface RasterBandPixels -{ +export interface RasterBandPixels { get(x: number, y: number): number; read(x: number, y: number, width: number, height: number, data?: TypedArray, options?: RasterBandPixelsReadOptions): TypedArray; readBlock(x: number, y: number, data?: TypedArray): TypedArray; @@ -696,8 +652,7 @@ export interface RasterBandPixels writeBlock(x: number, y: number, data: TypedArray): void; } -export class SpatialReference -{ +export class SpatialReference { constructor(wkt?: string); autoIdentifyEPSG(): void; clone(): SpatialReference; @@ -741,8 +696,7 @@ export class SpatialReference static fromXML(input: string): SpatialReference; } -export namespace config -{ +export namespace config { function get(key: string): string; function set(key: string, value: string): void; } From 2de6fbab6151900dba10d85f9a6268ac13a88d1b Mon Sep 17 00:00:00 2001 From: huan086 Date: Tue, 27 Nov 2018 14:37:15 +0800 Subject: [PATCH 127/608] [radix64] Add Typescript definitions. --- types/radix64/index.d.ts | 23 +++++++++++++++++++++++ types/radix64/radix64-tests.ts | 11 +++++++++++ types/radix64/tsconfig.json | 23 +++++++++++++++++++++++ types/radix64/tslint.json | 1 + 4 files changed, 58 insertions(+) create mode 100644 types/radix64/index.d.ts create mode 100644 types/radix64/radix64-tests.ts create mode 100644 types/radix64/tsconfig.json create mode 100644 types/radix64/tslint.json diff --git a/types/radix64/index.d.ts b/types/radix64/index.d.ts new file mode 100644 index 0000000000..f376184fce --- /dev/null +++ b/types/radix64/index.d.ts @@ -0,0 +1,23 @@ +// Type definitions for radix64 1.1 +// Project: https://github.com/maxired/radix64 +// Definitions by: Jeow Li Huan +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +type MethodsString = 'base64' | 'base64URL' | 'base64URLNaturalSort' | 'base64URLASCIISort'; + +interface MethodsEnum { + BASE64: MethodsString; + BASE64URL: MethodsString; + BASE64NATURAL: MethodsString; + BASE64ASCII: MethodsString; + DEFAULT: MethodsString; +} + +interface Radix { + radix64: (number: number, method?: MethodsString) => string; + ascii64: (number: number, pad?: number) => string; + methods: MethodsEnum; +} + +declare const radix: Radix; +export = radix; diff --git a/types/radix64/radix64-tests.ts b/types/radix64/radix64-tests.ts new file mode 100644 index 0000000000..a77554c238 --- /dev/null +++ b/types/radix64/radix64-tests.ts @@ -0,0 +1,11 @@ +import radix64 = require("radix64"); + +const num: string = radix64.radix64(42); + +const numAndEnum: string = radix64.radix64(1337, radix64.methods.BASE64NATURAL); + +const numAndString: string = radix64.radix64(1337, 'base64URL'); + +const asciiNum: string = radix64.ascii64(42); + +const asciiNumAndPad: string = radix64.ascii64(42, 25); diff --git a/types/radix64/tsconfig.json b/types/radix64/tsconfig.json new file mode 100644 index 0000000000..362ad6d26e --- /dev/null +++ b/types/radix64/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "radix64-tests.ts" + ] +} diff --git a/types/radix64/tslint.json b/types/radix64/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/radix64/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From acd8209e0673bf6e558e8342706c7b5809b9e7c5 Mon Sep 17 00:00:00 2001 From: andreidigori <45198612+andreidigori@users.noreply.github.com> Date: Tue, 27 Nov 2018 19:29:25 +0200 Subject: [PATCH 128/608] Update index.d.ts Linting --- types/gdal/index.d.ts | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/types/gdal/index.d.ts b/types/gdal/index.d.ts index 41a89ff72f..6aca0120de 100644 --- a/types/gdal/index.d.ts +++ b/types/gdal/index.d.ts @@ -21,15 +21,15 @@ export interface XYZ extends XY { } export interface EnvelopeBounds { - minX: number, - maxX: number, - minY: number, - maxY: number + minX: number; + maxX: number; + minY: number; + maxY: number; } export interface Envelope3DBounds extends EnvelopeBounds { - minZ: number, - maxZ: number + minZ: number; + maxZ: number; } export interface RasterBandStatistics { @@ -309,7 +309,7 @@ export interface DatasetBands { export interface DatasetLayers { copy(src_lyr_name: string, dst_lyr_name: string, options?: object | string[]): Layer; count(): number; - create(name: string, srs: SpatialReference, geomType: number | Function, creation_options: string[] | object): Layer; + create(name: string, srs: SpatialReference, geomType: number | Geometry, creation_options: string[] | object): Layer; forEach(callback: (layer: Layer, i: number) => void): void; get(key: string | number): Layer; map(callback: (layer: Layer, i: number) => T): T[]; @@ -423,7 +423,7 @@ export abstract class Geometry { static create(type: number): Geometry; static fromWKB(wkb: number, srs?: SpatialReference): Geometry; static fromWKT(wkt: string, srs?: SpatialReference): Geometry; - static getConstructor(type: number): Function; + static getConstructor(type: number): Geometry; static getName(type: number): string; boundary(): Geometry; @@ -488,7 +488,6 @@ export interface GeometryCollectionChildren { map(callback: (geometry: Geometry, i: number) => T): T[]; remove(index: number): void; toArray(): Geometry[]; - readonly layer: Layer; } @@ -500,7 +499,6 @@ export interface Layer { setSpatialFilter(filter: Geometry): void; setSpatialFilter(minX: number, maxX: number, minY: number, maxY: number): void; testCapability(capability: string): boolean; - readonly ds: Dataset; readonly features: LayerFeatures; readonly fidColumn: string; @@ -521,7 +519,6 @@ export interface LayerFeatures { next(): Feature; remove(id: number): void; set(id: number, feature: Feature): void; - readonly layer: Layer; } @@ -536,7 +533,6 @@ export interface LayerFields { map(callback: (field: FieldDefn, i: number) => T): T[]; remove(field: string | number): void; reorder(map: number[]): void; - readonly layer: Layer; } @@ -548,7 +544,6 @@ export class LineString extends Geometry { addSubLineString(line: LineString, start?: number, end?: number): void; getLength(): number; value(distance: number): Point; - readonly points: LineStringPoints; } @@ -580,7 +575,6 @@ export class MultiPolygon extends GeometryCollection { export class Point extends Geometry { constructor(x: number, y: number, z?: number); - x: number; y: number; z: number; @@ -588,7 +582,6 @@ export class Point extends Geometry { export class Polygon extends Geometry { getArea(): number; - rings: PolygonRings; } @@ -600,7 +593,6 @@ export interface PolygonRings { map(callback: (ring: LinearRing, i: number) => T): T[]; remove(index: number): void; toArray(): LinearRing[]; - readonly layer: Layer; } @@ -614,7 +606,6 @@ export interface RasterBand { getMetadata(domain?: string): object; getStatistics(allow_approximation: boolean, force: boolean): RasterBandStatistics; setStatistics(min: number, max: number, mean: number, std_dev: number): void; - readonly blockSize: XY; categoryNames: string[]; colorInterpretation: string; @@ -681,7 +672,6 @@ export class SpatialReference { toWKT(): string; toXML(): string; validate(): string; - static fromCRSURL(input: string): SpatialReference; static fromEPSG(input: string): SpatialReference; static fromEPSGA(input: number): SpatialReference; @@ -709,10 +699,11 @@ export function checksumImage(src: RasterBand, x?: number, y?: number, w?: numbe export function contourGenerate(options: ContourGenerateOptions): void; export function decToDMS(angle: number, axis: 'lat' | 'long', precision?: number): string; export function fillNodata(options: FillNoDataOptions): void; -export function open(path: string, mode?: 'r' | 'r+' | 'w', drivers?: string | string[], x_size?: number, y_size?: number, band_count?: number, data_type?: number, creation_options?: string[] | object): Dataset; +export function open(path: string, mode?: 'r' | 'r+' | 'w', drivers?: string | string[]): Dataset; +export function open(path: string, mode?: 'w', drivers?: string | string[], x_size?: number, y_size?: number, band_count?: number, data_type?: number, creation_options?: string[] | object): Dataset; export function polygonize(options: PolygonizeOptions): void; export function quiet(): void; export function reprojectImage(options: ReprojectImageOptions): void; export function sieveFilter(options: SieveFilterOptions): void; export function suggestedWarpOutput(options: SuggestedWarpOutputOptions): { rasterSize: any, geoTransform: any }; -export function verbose(): void; \ No newline at end of file +export function verbose(): void; From d076418dc2fb9748a78bb49a4a585b577703d158 Mon Sep 17 00:00:00 2001 From: andreidigori <45198612+andreidigori@users.noreply.github.com> Date: Tue, 27 Nov 2018 19:33:23 +0200 Subject: [PATCH 129/608] Update index.d.ts Linting --- types/gdal/index.d.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/types/gdal/index.d.ts b/types/gdal/index.d.ts index 6aca0120de..d6c76ba226 100644 --- a/types/gdal/index.d.ts +++ b/types/gdal/index.d.ts @@ -564,9 +564,7 @@ export class MultiLineString extends GeometryCollection { polygonize(): Polygon; } -export class MultiPoint extends GeometryCollection { - -} +export class MultiPoint extends GeometryCollection {} export class MultiPolygon extends GeometryCollection { getArea(): number; From f757203084ed5793a80255c032740738d0a82c86 Mon Sep 17 00:00:00 2001 From: Jake Boone Date: Tue, 27 Nov 2018 11:44:14 -0700 Subject: [PATCH 130/608] [react-datepicker] v2.0.0 --- types/react-datepicker/index.d.ts | 69 ++++++++++++++++++----------- types/react-datepicker/package.json | 1 - 2 files changed, 44 insertions(+), 26 deletions(-) diff --git a/types/react-datepicker/index.d.ts b/types/react-datepicker/index.d.ts index 23e542d322..6368e273e3 100644 --- a/types/react-datepicker/index.d.ts +++ b/types/react-datepicker/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-datepicker 1.1 +// Type definitions for react-datepicker 2.0 // Project: https://github.com/Hacker0x01/react-datepicker // Definitions by: Rajab Shakirov , // Andrey Balokha , @@ -7,11 +7,11 @@ // Roy Xue // Koala Human // Sean Kelley +// Jake Boone // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 import * as React from "react"; -import * as moment from "moment"; import * as Popper from "popper.js"; export interface ReactDatePickerProps { @@ -20,59 +20,65 @@ export interface ReactDatePickerProps { autoComplete?: string; autoFocus?: boolean; calendarClassName?: string; + calendarContainer?(props: { children: React.ReactNode[] }): React.ReactNode; children?: React.ReactNode; className?: string; customInput?: React.ReactNode; customInputRef?: string; dateFormat?: string | string[]; dateFormatCalendar?: string; - dayClassName?(date: moment.Moment): string | null; + dayClassName?(date: Date): string | null; disabled?: boolean; disabledKeyboardNavigation?: boolean; dropdownMode?: 'scroll' | 'select'; - endDate?: moment.Moment; - excludeDates?: moment.Moment[]; - excludeTimes?: moment.Moment[]; - filterDate?(date: moment.Moment): boolean; + endDate?: Date; + excludeDates?: Date[]; + excludeTimes?: Date[]; + filterDate?(date: Date): boolean; fixedHeight?: boolean; forceShowMonthNavigation?: boolean; - formatWeekNumber?(date: moment.Moment): string | number; - highlightDates?: moment.Moment[]; + formatWeekNumber?(date: Date): string | number; + highlightDates?: Date[]; id?: string; - includeDates?: moment.Moment[]; - includeTimes?: moment.Moment[]; + includeDates?: Date[]; + includeTimes?: Date[]; + injectTimes?: Date[]; inline?: boolean; isClearable?: boolean; locale?: string; - maxDate?: moment.Moment; - maxTime?: moment.Moment; - minDate?: moment.Moment; - minTime?: moment.Moment; + maxDate?: Date; + maxTime?: Date; + minDate?: Date; + minTime?: Date; monthsShown?: number; name?: string; onBlur?(event: React.FocusEvent): void; - onChange(date: moment.Moment | null, event: React.SyntheticEvent | undefined): void; + onChange(date: Date | null, event: React.SyntheticEvent | undefined): void; onChangeRaw?(event: React.FocusEvent): void; onClickOutside?(event: React.MouseEvent): void; onFocus?(event: React.FocusEvent): void; onKeyDown?(event: React.KeyboardEvent): void; - onMonthChange?(date: moment.Moment): void; - onSelect?(date: moment.Moment, event: React.SyntheticEvent | undefined): void; - onWeekSelect?(firstDayOfWeek: moment.Moment, weekNumber: string | number, event: React.SyntheticEvent | undefined): void; - onYearChange?(date: moment.Moment): void; - openToDate?: moment.Moment; + onMonthChange?(date: Date): void; + onSelect?(date: Date, event: React.SyntheticEvent | undefined): void; + onWeekSelect?(firstDayOfWeek: Date, weekNumber: string | number, event: React.SyntheticEvent | undefined): void; + onInputClick?(): void; + onYearChange?(date: Date): void; + onInputError?(err: {code: number; msg: string}): void; + open?: boolean; + openToDate?: Date; peekNextMonth?: boolean; placeholderText?: string; popperClassName?: string; popperContainer?(props: { children: React.ReactNode[] }): React.ReactNode; popperModifiers?: Popper.Modifiers; popperPlacement?: string; + popperProps?: {}; preventOpenOnFocus?: boolean; readOnly?: boolean; required?: boolean; scrollableMonthYearDropdown?: boolean; scrollableYearDropdown?: boolean; - selected?: moment.Moment | null; + selected?: Date | null; selectsEnd?: boolean; selectsStart?: boolean; shouldCloseOnSelect?: boolean; @@ -83,21 +89,34 @@ export interface ReactDatePickerProps { showTimeSelectOnly?: boolean; showWeekNumbers?: boolean; showYearDropdown?: boolean; - startDate?: moment.Moment; + startDate?: Date; startOpen?: boolean; tabIndex?: number; timeCaption?: string; timeFormat?: string; timeIntervals?: number; title?: string; - todayButton?: string; + todayButton?: React.ReactNode; useShortMonthInDropdown?: boolean; useWeekdaysShort?: boolean; - utcOffset?: number; value?: string; weekLabel?: string; withPortal?: boolean; yearDropdownItemNumber?: number; + formatWeekDay?(date: Date): string; + clearButtonTitle?: string; + previousMonthButtonLabel?: string; + nextMonthButtonLabel?: string; + renderCustomHeader?(params: { + date: Date; + changeYear(year: number): void; + changeMonth(month: number): void; + decreaseMonth(): void; + increaseMonth(): void; + prevMonthButtonDisabled: boolean; + nextMonthButtonDisabled: boolean; + }): React.ReactNode; + renderDayContents?(dayOfMonth: number): React.ReactNode; } declare const ReactDatePicker: React.ClassicComponentClass; export default ReactDatePicker; diff --git a/types/react-datepicker/package.json b/types/react-datepicker/package.json index fc763e4d4b..245f69cd2c 100644 --- a/types/react-datepicker/package.json +++ b/types/react-datepicker/package.json @@ -1,7 +1,6 @@ { "private": true, "dependencies": { - "moment": ">=2.14.0", "popper.js": "^1.14.1" } } From c3f0ee0d5d9765ac9fe65da8c75e477a71e398ca Mon Sep 17 00:00:00 2001 From: Jake Boone Date: Tue, 27 Nov 2018 11:55:08 -0700 Subject: [PATCH 131/608] [react-datepicker] fix v2 tests --- types/react-datepicker/react-datepicker-tests.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/types/react-datepicker/react-datepicker-tests.tsx b/types/react-datepicker/react-datepicker-tests.tsx index 1414672684..4a3fd93cac 100644 --- a/types/react-datepicker/react-datepicker-tests.tsx +++ b/types/react-datepicker/react-datepicker-tests.tsx @@ -1,17 +1,16 @@ import * as React from 'react'; -import * as moment from 'moment'; import DatePicker from 'react-datepicker'; {}} - onYearChange={(date: moment.Moment) => {}} + selected={new Date()} + onChange={(date: Date | null) => {}} + onYearChange={(date: Date) => {}} popperModifiers={{ flip: { enabled: false } }} - includeTimes={[moment()]} + includeTimes={[new Date()]} >
From 00f1245e599f463b2ea16b4e77e85bf73f9cbca5 Mon Sep 17 00:00:00 2001 From: piotr rotynski Date: Tue, 27 Nov 2018 23:22:07 +0100 Subject: [PATCH 132/608] Adding withArgs method to Spy interface as per Jasmine's docs for v3.3 --- types/jasmine/index.d.ts | 1 + types/jasmine/jasmine-tests.ts | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/types/jasmine/index.d.ts b/types/jasmine/index.d.ts index e9dba1e2cd..a87b8b3a86 100644 --- a/types/jasmine/index.d.ts +++ b/types/jasmine/index.d.ts @@ -639,6 +639,7 @@ declare namespace jasmine { calls: Calls; mostRecentCall: { args: any[]; }; argsForCall: any[]; + withArgs(...args: any[]): Spy; } type SpyObj = T & { diff --git a/types/jasmine/jasmine-tests.ts b/types/jasmine/jasmine-tests.ts index ba8763ce3d..92f9a21db8 100644 --- a/types/jasmine/jasmine-tests.ts +++ b/types/jasmine/jasmine-tests.ts @@ -469,6 +469,40 @@ describe("A spy, when configured with an alternate implementation", () => { }); }); +describe("A spy, when configured with alternate implementations for specified arguments", () => { + var foo: any, bar: any, fetchedBar: any; + + beforeEach(() => { + foo = { + setBar: (value: any) => { + bar = value; + }, + getBar: () => { + return bar; + } + }; + + spyOn(foo, "getBar") + .withArgs(1, "2") + .and.callFake(() => 1002); + + foo.setBar(123); + fetchedBar = foo.getBar(1, "2"); + }); + + it("tracks that the spy was called", () => { + expect(foo.getBar).toHaveBeenCalled(); + }); + + it("should not effect other functions", () => { + expect(bar).toEqual(123); + }); + + it("when called returns the requested value", () => { + expect(fetchedBar).toEqual(1002); + }); +}); + describe("A spy, when configured to throw a value", () => { var foo: any, bar: any; From 53771da91e57c816f8f1899c2e4e072a9bcf97f8 Mon Sep 17 00:00:00 2001 From: Chris Arnesen Date: Wed, 28 Nov 2018 14:15:24 +0700 Subject: [PATCH 133/608] Add options arg to "find-versions" --- types/find-versions/find-versions-tests.ts | 3 ++- types/find-versions/index.d.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/types/find-versions/find-versions-tests.ts b/types/find-versions/find-versions-tests.ts index 81ea6ca974..e92e6d9848 100644 --- a/types/find-versions/find-versions-tests.ts +++ b/types/find-versions/find-versions-tests.ts @@ -1,3 +1,4 @@ import findVersions = require('find-versions'); -findVersions('node v1.0.0'); +findVersions('node v1.0.0'); // $ExpectType string[] +findVersions('1.0', { loose: true }); // $ExpectType string[] diff --git a/types/find-versions/index.d.ts b/types/find-versions/index.d.ts index 449c5a45c3..f22e3796e2 100644 --- a/types/find-versions/index.d.ts +++ b/types/find-versions/index.d.ts @@ -3,5 +3,5 @@ // Definitions by: Leonid Logvinov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare function findVersions(version: string): string[]; +declare function findVersions(version: string, options?: { loose: boolean }): string[]; export = findVersions; From 95b52bea5276fb948958f3d8e4929954b27fd39c Mon Sep 17 00:00:00 2001 From: Chris Arnesen Date: Wed, 28 Nov 2018 14:22:42 +0700 Subject: [PATCH 134/608] Update metadata --- types/find-versions/index.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/types/find-versions/index.d.ts b/types/find-versions/index.d.ts index f22e3796e2..7151227fb2 100644 --- a/types/find-versions/index.d.ts +++ b/types/find-versions/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for find-versions 2.0 +// Type definitions for find-versions 3.0 // Project: https://github.com/sindresorhus/find-versions // Definitions by: Leonid Logvinov +// Chris Arnesen Date: Wed, 28 Nov 2018 15:29:38 +0700 Subject: [PATCH 135/608] Update types/find-versions/index.d.ts --- types/find-versions/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/find-versions/index.d.ts b/types/find-versions/index.d.ts index 7151227fb2..9531c1628f 100644 --- a/types/find-versions/index.d.ts +++ b/types/find-versions/index.d.ts @@ -1,7 +1,7 @@ // Type definitions for find-versions 3.0 // Project: https://github.com/sindresorhus/find-versions // Definitions by: Leonid Logvinov -// Chris Arnesen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare function findVersions(version: string, options?: { loose: boolean }): string[]; From e8b63b0bdafe5b3f86c1f2eb062e77aef9fe99c6 Mon Sep 17 00:00:00 2001 From: Mathieu Ghennassia Date: Wed, 28 Nov 2018 11:52:15 +0100 Subject: [PATCH 136/608] mongodb: Type parameter update of method findOneAndUpdate --- types/mongodb/index.d.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/types/mongodb/index.d.ts b/types/mongodb/index.d.ts index ab4d2f4c02..f994ade210 100644 --- a/types/mongodb/index.d.ts +++ b/types/mongodb/index.d.ts @@ -79,7 +79,7 @@ export interface ClientSession extends EventEmitter { /** The server id associated with this session */ id: any; /** - * Aborts the currently active transaction in this session. + * Aborts the currently active transaction in this session. * @param {MongoCallback} [cb] Optional callback for completion of this operation */ abortTransaction(cb?: MongoCallback): Promise; @@ -89,7 +89,7 @@ export interface ClientSession extends EventEmitter { */ advanceOperationTime(operamtionTime: Timestamp): void; /** - * Commits the currently active transaction in this session. + * Commits the currently active transaction in this session. * @param {MongoCallback} [cb] Optional callback for completion of this operation */ commitTransaction(cb?: MongoCallback): Promise; @@ -110,7 +110,7 @@ export interface ClientSession extends EventEmitter { * Used to determine if this session equals another * * @param {ClientSession} session A class representing a client session on the server - * @returns {boolean} if the sessions are equal + * @returns {boolean} if the sessions are equal */ equals(session: ClientSession): boolean; @@ -118,13 +118,13 @@ export interface ClientSession extends EventEmitter { incrementTransactionNumber(): void; /** - * @returns {boolean} this session is currently in a transaction or not + * @returns {boolean} this session is currently in a transaction or not */ inTransaction(): boolean; /** * Starts a new transaction with the given options. - * @param {TransactionOptions} options + * @param {TransactionOptions} options * @memberof ClientSession */ startTransaction(options?: TransactionOptions): void; @@ -219,10 +219,10 @@ export class MongoError extends Error { * client/user (eg. "Email address must be unique" instead of "Both email * address and username must be unique") - which caters for a better (app) * user experience. - * + * * Details: https://github.com/Automattic/mongoose/issues/2129 (issue for * mongoose, but the same applies for the native mongodb driver) - * + * * Note that in mongoose (the link above) the prop in question is called * 'message' while in mongodb it is called 'errmsg'. This can be seen in * multiple places in the source code, for example here: @@ -706,9 +706,9 @@ export interface Collection { findOneAndReplace(filter: FilterQuery, replacement: Object, options?: FindOneAndReplaceOption): Promise>; findOneAndReplace(filter: FilterQuery, replacement: Object, options: FindOneAndReplaceOption, callback: MongoCallback>): void; /** http://mongodb.github.io/node-mongodb-native/3.1/api/Collection.html#findOneAndUpdate */ - findOneAndUpdate(filter: FilterQuery, update: Object, callback: MongoCallback>): void; - findOneAndUpdate(filter: FilterQuery, update: Object, options?: FindOneAndUpdateOption): Promise>; - findOneAndUpdate(filter: FilterQuery, update: Object, options: FindOneAndUpdateOption, callback: MongoCallback>): void; + findOneAndUpdate(filter: FilterQuery, update: UpdateQuery | TSchema, callback: MongoCallback>): void; + findOneAndUpdate(filter: FilterQuery, update: UpdateQuery | TSchema, options?: FindOneAndUpdateOption): Promise>; + findOneAndUpdate(filter: FilterQuery, update: UpdateQuery | TSchema, options: FindOneAndUpdateOption, callback: MongoCallback>): void; /** http://mongodb.github.io/node-mongodb-native/3.1/api/Collection.html#geoHaystackSearch */ geoHaystackSearch(x: number, y: number, callback: MongoCallback): void; geoHaystackSearch(x: number, y: number, options?: GeoHaystackSearchOptions): Promise; From 1bec72c66668b0fd21dc7b23d7a9deae265ffa59 Mon Sep 17 00:00:00 2001 From: Adam Misiorny Date: Wed, 28 Nov 2018 12:56:06 +0100 Subject: [PATCH 137/608] [rosie] Fix sequence definition with builder argument --- types/rosie/index.d.ts | 2 +- types/rosie/rosie-tests.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/types/rosie/index.d.ts b/types/rosie/index.d.ts index 1078b53573..e66e9855eb 100644 --- a/types/rosie/index.d.ts +++ b/types/rosie/index.d.ts @@ -163,7 +163,7 @@ declare namespace rosie { * @param {function(number): *=} builder * @return {Factory} */ - sequence(name: keyof T, dependenciesOrBuilder?: () => any | keyof T[], builder?: Function) : IFactory; + sequence(name: keyof T, dependenciesOrBuilder?: (i: number) => any | keyof T[], builder?: Function) : IFactory; /** * Sets a post-processor callback that will receive built objects and the diff --git a/types/rosie/rosie-tests.ts b/types/rosie/rosie-tests.ts index 6c2152a9e7..86dd049732 100644 --- a/types/rosie/rosie-tests.ts +++ b/types/rosie/rosie-tests.ts @@ -19,6 +19,7 @@ resultObj = Factory.build('some'); Factory.define('coach') .option('buildPlayer', false) .sequence('id') + .sequence('name', (i: number) => `Coach${i}`) .attr('players', ['id', 'buildPlayer'], function(id: any, buildPlayer: boolean) { if (buildPlayer) { return [Factory.build('player', {coach_id: id})]; From d0081bef8b40ab5d104694063131acc928e5f78b Mon Sep 17 00:00:00 2001 From: HarikiRito <35214929+HarikiRito@users.noreply.github.com> Date: Wed, 28 Nov 2018 19:41:26 +0700 Subject: [PATCH 138/608] Export Interface --- types/react-lottie/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/react-lottie/index.d.ts b/types/react-lottie/index.d.ts index 8e4f3b717b..a57da91307 100644 --- a/types/react-lottie/index.d.ts +++ b/types/react-lottie/index.d.ts @@ -7,7 +7,7 @@ import * as React from 'react'; -interface Options { +export interface Options { /** * Defines if the animation should play only once or repeatedly in an endless loop */ @@ -41,7 +41,7 @@ interface Options { }; } -interface EventListener { +export interface EventListener { /** * The event sent by Lottie */ @@ -61,7 +61,7 @@ interface EventListener { callback: () => void; } -interface LottieProps { +export interface LottieProps { /** * Object representing animation settings */ From 422ae215527764ce90c03fe262b401bdae07c17d Mon Sep 17 00:00:00 2001 From: Kamontat Chantrachirathumrong Date: Wed, 28 Nov 2018 15:06:11 +0100 Subject: [PATCH 139/608] Update index.d.ts --- types/wikidata-sdk/index.d.ts | 243 ++++++++++++++++++++++++++-------- 1 file changed, 185 insertions(+), 58 deletions(-) diff --git a/types/wikidata-sdk/index.d.ts b/types/wikidata-sdk/index.d.ts index 5810bcc9de..79620ac623 100644 --- a/types/wikidata-sdk/index.d.ts +++ b/types/wikidata-sdk/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for wikidata-sdk 5.15 +// Type definitions for wikidata-sdk 5.15.9 // Project: https://github.com/maxlath/wikidata-sdk // Definitions by: Kamontat Chantrachirathumrong // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -7,20 +7,36 @@ import { WikidataLanguage } from "./def/type/language"; import { WikidataProperty } from "./def/type/property"; import { WikidataSite } from "./def/type/site"; +import { WikidataSiteLink, WikidataSiteLinkSimplify, WikidataSiteLinkWithUrlSimplify } from "./def/object/sitelink"; import { UrlResultFormat } from "./def/type/format"; +import { + WikidataLanguageBaseString, + WikidataLanguageBaseStringSimplify, + WikidataLanguageBaseArrayString, + WikidataLanguageBaseArrayStringSimplify +} from "wikidata-sdk/def/object/language-base-string"; -import { Claim, MainSnak, TimeDataValue, EntityDataValue } from "./def/object/claim"; +import { WikidataClaim, WikidataMainSnak, WikidataTimeDataValue, WikidataEntityDataValue } from "./def/object/claim"; -export type WikidataLanguage = WikidataLanguage; -export type WikidataProperty = WikidataProperty; -export type WikidataSite = WikidataSite; +// ----------------------------------- // +// Export session // +// ----------------------------------- // -export type UrlResultFormat = UrlResultFormat; +export { WikidataLanguage, WikidataProperty, WikidataSite }; -export type Claim = Claim; -export type MainSnak = MainSnak; -export type TimeDataValue = TimeDataValue; -export type EntityDataValue = EntityDataValue; +export { + WikidataLanguageBaseString, + WikidataLanguageBaseStringSimplify, + WikidataLanguageBaseArrayString, + WikidataLanguageBaseArrayStringSimplify, + WikidataSiteLink, + WikidataSiteLinkSimplify, + WikidataSiteLinkWithUrlSimplify +}; + +export { UrlResultFormat }; + +export { WikidataClaim, WikidataMainSnak, WikidataTimeDataValue, WikidataEntityDataValue }; export as namespace sdk; @@ -42,22 +58,22 @@ export as namespace sdk; * @see {@link https://www.wikidata.org/w/api.php?action=help&modules=wbsearchentities | Wikidata[wbsearchentities] } */ export function searchEntities( - search: string, - language?: WikidataLanguage, - limit?: string | number, - format?: UrlResultFormat, - uselang?: WikidataLanguage + search: string, + language?: WikidataLanguage, + limit?: string | number, + format?: UrlResultFormat, + uselang?: WikidataLanguage ): string; /** * @alias searchEntities */ export function searchEntities(opt: { - search: string; - language?: WikidataLanguage; - limit?: string | number; - format?: UrlResultFormat; - uselang?: WikidataLanguage; + search: string; + language?: WikidataLanguage; + limit?: string | number; + format?: UrlResultFormat; + uselang?: WikidataLanguage; }): string; /* ********** @@ -79,20 +95,20 @@ export function searchEntities(opt: { * @see {@link https://www.wikidata.org/w/api.php?action=help&modules=wbgetentities | Wikidata[wbgetentities] } */ export function getEntities( - ids: string | string[], - languages?: WikidataLanguage | WikidataLanguage[], - props?: WikidataProperty | WikidataProperty[], - format?: UrlResultFormat + ids: string | string[], + languages?: WikidataLanguage | WikidataLanguage[], + props?: WikidataProperty | WikidataProperty[], + format?: UrlResultFormat ): string; /** * @alias getEntities */ export function getEntities(a: { - ids: string | string[]; - languages?: WikidataLanguage | WikidataLanguage[]; - props?: WikidataProperty | WikidataProperty[]; - format?: UrlResultFormat; + ids: string | string[]; + languages?: WikidataLanguage | WikidataLanguage[]; + props?: WikidataProperty | WikidataProperty[]; + format?: UrlResultFormat; }): string; /** @@ -101,20 +117,20 @@ export function getEntities(a: { * Without id limitation and return the array of url instead. */ export function getManyEntities( - ids: string | string[], - languages?: WikidataLanguage | WikidataLanguage[], - props?: WikidataProperty | WikidataProperty[], - format?: UrlResultFormat + ids: string | string[], + languages?: WikidataLanguage | WikidataLanguage[], + props?: WikidataProperty | WikidataProperty[], + format?: UrlResultFormat ): string[]; /** * @alias getManyEntities */ export function getManyEntities(a: { - ids: string | string[]; - languages?: WikidataLanguage | WikidataLanguage[]; - props?: WikidataProperty | WikidataProperty[]; - format?: UrlResultFormat; + ids: string | string[]; + languages?: WikidataLanguage | WikidataLanguage[]; + props?: WikidataProperty | WikidataProperty[]; + format?: UrlResultFormat; }): string[]; /** @@ -131,22 +147,22 @@ export function getManyEntities(a: { * @see {@link https://github.com/maxlath/wikidata-sdk/blob/6b0673b9bf0fcaab19db65e2cc77e33c901ef35d/docs/get_entities.md#by-wikipedia-titles | Github[get_entities.md#by-wikipedia-titles] } */ export function getWikidataIdsFromWikipediaTitles( - titles: string | string[], - sites?: string, - languages?: WikidataLanguage | WikidataLanguage[], - props?: WikidataProperty | WikidataProperty[], - format?: UrlResultFormat + titles: string | string[], + sites?: WikidataSite, + languages?: WikidataLanguage | WikidataLanguage[], + props?: WikidataProperty | WikidataProperty[], + format?: UrlResultFormat ): string; /** * @alias getWikidataIdsFromWikipediaTitles */ export function getWikidataIdsFromWikipediaTitles(a: { - titles: string | string[]; - sites?: string; - languages?: WikidataLanguage | WikidataLanguage[]; - props?: WikidataProperty | WikidataProperty[]; - format?: UrlResultFormat; + titles: string | string[]; + sites?: WikidataSite; + languages?: WikidataLanguage | WikidataLanguage[]; + props?: WikidataProperty | WikidataProperty[]; + format?: UrlResultFormat; }): string; /** @@ -167,13 +183,13 @@ export function getWikidataIdsFromWikipediaTitles(a: { * {@link https://github.com/maxlath/wikidata-sdk/blob/6b0673b9bf0fcaab19db65e2cc77e33c901ef35d/docs/get_entities_reverse_claims.md#get-entities-reverse-claims | Github[get-entities-reverse-claims] } */ export function getReverseClaims( - property: string | string[], - value: string | string[], - options?: { - limit?: number; - keepProperties?: boolean; - caseInsensitive?: boolean; - } + property: string | string[], + value: string | string[], + options?: { + limit?: number; + keepProperties?: boolean; + caseInsensitive?: boolean; + } ): string; /** @@ -241,7 +257,7 @@ export function truthyClaims(claims: object): object; * * @see {@link https://www.mediawiki.org/wiki/Wikibase/Indexing/RDF_Dump_Format#Truthy_statements | Truthy} */ -export function truthyPropertyClaims(claims: Claim[]): Claim[]; +export function truthyPropertyClaims(claims: WikidataClaim[]): WikidataClaim[]; /** * This will get the link that represent the site of the title. @@ -252,16 +268,16 @@ export function truthyPropertyClaims(claims: Claim[]): Claim[]; * * @see {@link https://github.com/maxlath/wikidata-sdk/blob/6b0673b9bf0fcaab19db65e2cc77e33c901ef35d/docs/general_helpers.md#getsitelinkurl | Github[getsitelinkurl] } */ -export function getSitelinkUrl(site: string, title: string): string; +export function getSitelinkUrl(site: WikidataSite, title: string): string; /** * @alias getSitelinkUrl */ -export function getSitelinkUrl(a: { site: string; title: string }): string; +export function getSitelinkUrl(a: { site: WikidataSite; title: string }): string; export interface SitelinkData { - lang: string; - project: string; + lang: string; + project: string; } /** * Get the sitelink on english language and the lang of it. @@ -335,3 +351,114 @@ export function wikidataTimeToSimpleDay(a: string | object): string; * @returns URL from a wikimedia commons filename */ export function getImageUrl(a: string, width?: number): string; + +export type SimplifyOption = { + // claims + entityPrefix?: string; + propertyPrefix?: string; + keepRichValues?: boolean; + keepQualifiers?: boolean; + keepReferences?: boolean; + keepIds?: boolean; + keepHashes?: boolean; + keepNonTruthy?: boolean; + // sitelinks + addUrl?: boolean; +}; + +/** + * Helper method, for simplify result object more reasonable + */ +export namespace simplify { + /** + * Applying all simplifiers at once: labels, descriptions, aliases, claims, sitelinks. See next sections for details. + * You can also pass options as a second argument, that will then be passed the subfunctions: + * + * @param entity the entity that receive from {@link getEntities} APIs + * @param opt simlify option. currently only simplify claims and simplify sitelinks. + * + * @see {@link https://github.com/maxlath/wikidata-sdk/blob/master/docs/simplify_entities_data.md#simplify-entity | Github[simplify-entity]} + */ + export function entity(entity: T, opt?: SimplifyOption): T; + + /** + * This is a same of {@link entity} method except this input as multiple array of entities. + * + * @param entities entities from {@link getEntities} APIs + * @param opt simlify option. currently only simplify claims and simplify sitelinks. + * + * @see {@link https://github.com/maxlath/wikidata-sdk/blob/master/docs/simplify_entities_data.md#simplify-entities | Github[simplify-entities]} + */ + export function entities(entities: T[], opt?: SimplifyOption): T[]; + + /** + * Make label simplifier and easier to understand + * + * @param labels label object, you will receive this from getEntities method + * + * @example + * + * const label = simplify.labels("{ pl: { language: 'pl', value: 'książka' } }"); + * console.log(label) // { pl: 'książka' } + * + * @see {@link https://github.com/maxlath/wikidata-sdk/blob/master/docs/simplify_entities_data.md#simplify-labels | Github[simplify-labels]} + */ + export function labels(labels: WikidataLanguageBaseString): WikidataLanguageBaseStringSimplify; + + /** + * Make description simplifier and easier to understand + * + * @param descriptions description object, you will receive this from getEntities method + * + * @example + * + * const desc = simplify.descriptions("{ pl: { language: 'pl', value: 'dokument piśmienniczy [...]' } }"); + * console.log(desc) // { pl: 'dokument piśmienniczy [...]' } + * + * @see {@link https://github.com/maxlath/wikidata-sdk/blob/master/docs/simplify_entities_data.md#simplify-descriptions | Github[simplify-descriptions]} + */ + export function descriptions(descriptions: WikidataLanguageBaseString): WikidataLanguageBaseStringSimplify; + + /** + * Make alias simplifier and easier to understand + * + * @param aliases alias object, you will receive this from getEntities method + * + * @example + * + * const alias = simplify.aliases("{ pl: [ { language: 'pl', value: 'Tom' }, { language: 'pl', value: 'Tomik' } ] }"); + * console.log(alias) // { pl: [ 'Tom', 'Tomik' ] } + * + * @see {@link https://github.com/maxlath/wikidata-sdk/blob/master/docs/simplify_entities_data.md#simplify-aliases | Github[simplify-aliases]} + */ + export function aliases(aliases: WikidataLanguageBaseArrayString): WikidataLanguageBaseArrayStringSimplify; + + /** + * Make sitelink simplifier and easier to understand + * + * @param sitelinks sitelink object, you will receive this from getEntities method + * + * @example + * + * const site = simplify.sitelinks("{ plwiki: { site: 'plwiki', title: 'Książka', badges: [] } }"); + * console.log(site) // { plwiki: 'Książka' } + * + * @see {@link https://github.com/maxlath/wikidata-sdk/blob/master/docs/simplify_entities_data.md#simplify-sitelinks | Github[simplify-sitelinks]} + */ + export function sitelinks(sitelinks: WikidataSiteLink): WikidataSiteLinkSimplify; + + /** + * Make sitelink simplifier and easier to understand. include URL in the result. + * + * @param sitelinks sitelink object, you will receive this from getEntities method + * @param options add url to a result + * + * @example + * + * const site = simplify.sitelinks("{ plwiki: { site: 'plwiki', title: 'Książka', badges: [] } }", {addUrl: true}); + * console.log(site) // { plwiki: { title: 'Książka', url: 'https://pl.wikipedia.org/wiki/Książka' } } + * + * @see {@link https://github.com/maxlath/wikidata-sdk/blob/master/docs/simplify_entities_data.md#add-sitelinks-urls | Github[simplify-sitelinks-with-url]} + */ + export function sitelinks(sitelinks: WikidataSiteLink, options: { addUrl: true }): WikidataSiteLinkWithUrlSimplify; +} From d284105dcadcce897d96a1d38a5040e396095f35 Mon Sep 17 00:00:00 2001 From: Kamontat Chantrachirathumrong Date: Wed, 28 Nov 2018 15:08:33 +0100 Subject: [PATCH 140/608] Update claim name --- types/wikidata-sdk/def/object/claim.d.ts | 54 ++++++++++++------------ 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/types/wikidata-sdk/def/object/claim.d.ts b/types/wikidata-sdk/def/object/claim.d.ts index c397fcb0df..99ed8bf52c 100644 --- a/types/wikidata-sdk/def/object/claim.d.ts +++ b/types/wikidata-sdk/def/object/claim.d.ts @@ -1,34 +1,34 @@ -export interface TimeDataValue { - type: "time"; - value: { - time: string; - timezone: number; - before: number; - after: number; - precision: number; - calendermodel: string; - }; +export interface WikidataTimeDataValue { + type: "time"; + value: { + time: string; + timezone: number; + before: number; + after: number; + precision: number; + calendermodel: string; + }; } -export interface EntityDataValue { - type: "wikibase-entityid"; - value: { - "numeric-id": number; - "entity-type": string; - }; +export interface WikidataEntityDataValue { + type: "wikibase-entityid"; + value: { + "numeric-id": number; + "entity-type": string; + }; } -export interface MainSnak { - datatype: string; - snaktype: string; - property: string; - hash: string; - datavalue: TimeDataValue | EntityDataValue; +export interface WikidataMainSnak { + datatype: string; + snaktype: string; + property: string; + hash: string; + datavalue: WikidataTimeDataValue | WikidataEntityDataValue; } -export interface Claim { - rank: string; - id: string; - type: string; - mainsnak: MainSnak; +export interface WikidataClaim { + rank: string; + id: string; + type: string; + mainsnak: WikidataMainSnak; } From d5acd49750e454a5ab7f35a452a2f2cd61ea12ea Mon Sep 17 00:00:00 2001 From: Kamontat Chantrachirathumrong Date: Wed, 28 Nov 2018 15:09:17 +0100 Subject: [PATCH 141/608] Add language base string object type --- .../def/object/language-base-string.d.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 types/wikidata-sdk/def/object/language-base-string.d.ts diff --git a/types/wikidata-sdk/def/object/language-base-string.d.ts b/types/wikidata-sdk/def/object/language-base-string.d.ts new file mode 100644 index 0000000000..9f35d4bd8e --- /dev/null +++ b/types/wikidata-sdk/def/object/language-base-string.d.ts @@ -0,0 +1,19 @@ +import { WikidataLanguage } from "wikidata-sdk"; + +export type WikidataLanguageBaseString = { + [Key in WikidataLanguage]?: { + language: Key; + value: string; + } +}; + +export type WikidataLanguageBaseStringSimplify = { [key in WikidataLanguage]?: string }; + +export type WikidataLanguageBaseArrayString = { + [Key in WikidataLanguage]: { + language: Key; + value: string; + }[] +}; + +export type WikidataLanguageBaseArrayStringSimplify = { [key in WikidataLanguage]: string[] }; From 22e936663027c8f82280ce4a3883fe42ea30e8ee Mon Sep 17 00:00:00 2001 From: Kamontat Chantrachirathumrong Date: Wed, 28 Nov 2018 15:09:40 +0100 Subject: [PATCH 142/608] Add sitelink object --- types/wikidata-sdk/def/object/sitelink.d.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 types/wikidata-sdk/def/object/sitelink.d.ts diff --git a/types/wikidata-sdk/def/object/sitelink.d.ts b/types/wikidata-sdk/def/object/sitelink.d.ts new file mode 100644 index 0000000000..4b6aeee23d --- /dev/null +++ b/types/wikidata-sdk/def/object/sitelink.d.ts @@ -0,0 +1,12 @@ +import { WikidataSite } from "wikidata-sdk"; + +export type WikidataSiteLink = { [Key in WikidataSite]: { site: Key; title: string; badges: string[] } }; + +export type WikidataSiteLinkSimplify = { [key in WikidataSite]: string }; + +export type WikidataSiteLinkWithUrlSimplify = { + [key in WikidataSite]: { + title: string; + url: string; + } +}; From 3e65f7972871d987b69b60a2b63587a89e5dbb6f Mon Sep 17 00:00:00 2001 From: feinoujc Date: Wed, 28 Nov 2018 09:10:50 -0500 Subject: [PATCH 143/608] [@pollyjs/core] updates for 1.3 config options --- types/pollyjs__core/index.d.ts | 28 +++++---- types/pollyjs__core/pollyjs__core-tests.ts | 69 +++++++++++++++++++++- 2 files changed, 83 insertions(+), 14 deletions(-) diff --git a/types/pollyjs__core/index.d.ts b/types/pollyjs__core/index.d.ts index 83b6b933b9..4f6d308d0d 100644 --- a/types/pollyjs__core/index.d.ts +++ b/types/pollyjs__core/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for @pollyjs/core 1.2 +// Type definitions for @pollyjs/core 1.3 // Project: https://github.com/netflix/pollyjs/tree/master/packages/@pollyjs/core // Definitions by: feinoujc // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -12,8 +12,10 @@ export const Timing: { fixed(ms: number): () => Promise; relative(ratio: number): (ms: number) => Promise; }; + +export type MatchBy = (input: T) => R; export interface PollyConfig { - mode?: MODES; + mode?: MODES | string; adapters?: Array; adapterOptions?: any; @@ -34,20 +36,20 @@ export interface PollyConfig { timing?: ((ms: number) => Promise) | (() => Promise); matchRequestsBy?: { - method?: boolean; - headers?: any; - body?: boolean; + method?: boolean | MatchBy; + headers?: boolean | { exclude: string[] } | MatchBy>; + body?: boolean | MatchBy; order?: boolean; url?: { - protocol?: boolean; - username?: boolean; - password?: boolean; - hostname?: boolean; - port?: boolean; - pathname?: boolean; - query?: boolean; - hash?: boolean; + protocol?: boolean | MatchBy; + username?: boolean | MatchBy; + password?: boolean | MatchBy; + hostname?: boolean | MatchBy; + port?: boolean | MatchBy; + pathname?: boolean | MatchBy; + query?: boolean | MatchBy; + hash?: boolean | MatchBy; }; }; } diff --git a/types/pollyjs__core/pollyjs__core-tests.ts b/types/pollyjs__core/pollyjs__core-tests.ts index 22f5516646..0644eff7f4 100644 --- a/types/pollyjs__core/pollyjs__core-tests.ts +++ b/types/pollyjs__core/pollyjs__core-tests.ts @@ -6,7 +6,74 @@ const polly = new Polly('test recording', { recordFailedRequests: true, adapters: ['xhr', 'fetch'], persister: 'rest', - timing: Timing.relative(3) + timing: Timing.relative(3), + matchRequestsBy: { + method: true, + headers: true, + body: true, + order: true, + + url: { + protocol: true, + username: true, + password: true, + hostname: true, + port: true, + pathname: true, + query: true, + hash: false + } + } +}); + +new Polly('test recording', { + mode: 'replay', + recordFailedRequests: true, + adapters: ['xhr', 'fetch'], + persister: 'rest', + timing: Timing.relative(3), + matchRequestsBy: { + method(method) { + return method.toLowerCase(); + }, + headers: 1 === 1 ? { exclude: ['X-Auth'] } : (headers) => { + delete headers['X-Auth']; + return headers; + }, + body(body) { + const json = JSON.parse(body); + + delete json.email; + return JSON.stringify(json); + }, + + url: { + protocol(protocol) { + return protocol === 'http' ? 'https:' : protocol; + }, + username(username) { + return username === 'johndoe' ? 'username' : username; + }, + password(password) { + return password || 'password'; + }, + hostname(hostname) { + return hostname.replace('.com', '.net'); + }, + port(port) { + return port > 80 ? 3000 : 433; + }, + pathname(pathname) { + return pathname.replace('/api/v1', '/api'); + }, + query(query) { + return { ...query, token: '' }; + }, + hash(hash) { + return hash.replace(/token=[0-9]+/, ''); + } + } + } }); function log(_: string) { From 091bd02a320f8984ff9b7045efab32737d631b93 Mon Sep 17 00:00:00 2001 From: Kamontat Chantrachirathumrong Date: Wed, 28 Nov 2018 15:14:48 +0100 Subject: [PATCH 144/608] Fix error --- types/wikidata-sdk/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/wikidata-sdk/index.d.ts b/types/wikidata-sdk/index.d.ts index 79620ac623..98eb893d0c 100644 --- a/types/wikidata-sdk/index.d.ts +++ b/types/wikidata-sdk/index.d.ts @@ -14,7 +14,7 @@ import { WikidataLanguageBaseStringSimplify, WikidataLanguageBaseArrayString, WikidataLanguageBaseArrayStringSimplify -} from "wikidata-sdk/def/object/language-base-string"; +} from "./def/object/language-base-string"; import { WikidataClaim, WikidataMainSnak, WikidataTimeDataValue, WikidataEntityDataValue } from "./def/object/claim"; From 265766df3dfefc749ecd229354e8ca884c8cf818 Mon Sep 17 00:00:00 2001 From: Kamontat Chantrachirathumrong Date: Wed, 28 Nov 2018 15:32:28 +0100 Subject: [PATCH 145/608] [fix] Fix a lot of linter error --- .../def/object/language-base-string.d.ts | 18 +- types/wikidata-sdk/def/object/sitelink.d.ts | 10 +- types/wikidata-sdk/index.d.ts | 320 +++++++++--------- 3 files changed, 176 insertions(+), 172 deletions(-) diff --git a/types/wikidata-sdk/def/object/language-base-string.d.ts b/types/wikidata-sdk/def/object/language-base-string.d.ts index 9f35d4bd8e..8f9606dbb1 100644 --- a/types/wikidata-sdk/def/object/language-base-string.d.ts +++ b/types/wikidata-sdk/def/object/language-base-string.d.ts @@ -1,19 +1,19 @@ -import { WikidataLanguage } from "wikidata-sdk"; +import { WikidataLanguage } from "../type/language"; export type WikidataLanguageBaseString = { - [Key in WikidataLanguage]?: { - language: Key; - value: string; - } + [Key in WikidataLanguage]?: { + language: Key; + value: string; + } }; export type WikidataLanguageBaseStringSimplify = { [key in WikidataLanguage]?: string }; export type WikidataLanguageBaseArrayString = { - [Key in WikidataLanguage]: { - language: Key; - value: string; - }[] + [Key in WikidataLanguage]: Array<{ + language: Key; + value: string; + }> }; export type WikidataLanguageBaseArrayStringSimplify = { [key in WikidataLanguage]: string[] }; diff --git a/types/wikidata-sdk/def/object/sitelink.d.ts b/types/wikidata-sdk/def/object/sitelink.d.ts index 4b6aeee23d..d0eea713e5 100644 --- a/types/wikidata-sdk/def/object/sitelink.d.ts +++ b/types/wikidata-sdk/def/object/sitelink.d.ts @@ -1,12 +1,12 @@ -import { WikidataSite } from "wikidata-sdk"; +import { WikidataSite } from "../type/site"; export type WikidataSiteLink = { [Key in WikidataSite]: { site: Key; title: string; badges: string[] } }; export type WikidataSiteLinkSimplify = { [key in WikidataSite]: string }; export type WikidataSiteLinkWithUrlSimplify = { - [key in WikidataSite]: { - title: string; - url: string; - } + [key in WikidataSite]: { + title: string; + url: string; + } }; diff --git a/types/wikidata-sdk/index.d.ts b/types/wikidata-sdk/index.d.ts index 98eb893d0c..6ed81883cc 100644 --- a/types/wikidata-sdk/index.d.ts +++ b/types/wikidata-sdk/index.d.ts @@ -1,8 +1,8 @@ -// Type definitions for wikidata-sdk 5.15.9 +// Type definitions for wikidata-sdk 5.15 // Project: https://github.com/maxlath/wikidata-sdk // Definitions by: Kamontat Chantrachirathumrong // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 +// TypeScript Version: 2.1 import { WikidataLanguage } from "./def/type/language"; import { WikidataProperty } from "./def/type/property"; @@ -10,10 +10,10 @@ import { WikidataSite } from "./def/type/site"; import { WikidataSiteLink, WikidataSiteLinkSimplify, WikidataSiteLinkWithUrlSimplify } from "./def/object/sitelink"; import { UrlResultFormat } from "./def/type/format"; import { - WikidataLanguageBaseString, - WikidataLanguageBaseStringSimplify, - WikidataLanguageBaseArrayString, - WikidataLanguageBaseArrayStringSimplify + WikidataLanguageBaseString, + WikidataLanguageBaseStringSimplify, + WikidataLanguageBaseArrayString, + WikidataLanguageBaseArrayStringSimplify } from "./def/object/language-base-string"; import { WikidataClaim, WikidataMainSnak, WikidataTimeDataValue, WikidataEntityDataValue } from "./def/object/claim"; @@ -25,19 +25,23 @@ import { WikidataClaim, WikidataMainSnak, WikidataTimeDataValue, WikidataEntityD export { WikidataLanguage, WikidataProperty, WikidataSite }; export { - WikidataLanguageBaseString, - WikidataLanguageBaseStringSimplify, - WikidataLanguageBaseArrayString, - WikidataLanguageBaseArrayStringSimplify, - WikidataSiteLink, - WikidataSiteLinkSimplify, - WikidataSiteLinkWithUrlSimplify + WikidataLanguageBaseString, + WikidataLanguageBaseStringSimplify, + WikidataLanguageBaseArrayString, + WikidataLanguageBaseArrayStringSimplify, + WikidataSiteLink, + WikidataSiteLinkSimplify, + WikidataSiteLinkWithUrlSimplify }; export { UrlResultFormat }; export { WikidataClaim, WikidataMainSnak, WikidataTimeDataValue, WikidataEntityDataValue }; +export interface Json { + [key: string]: any; +} + export as namespace sdk; /* ********** @@ -58,22 +62,22 @@ export as namespace sdk; * @see {@link https://www.wikidata.org/w/api.php?action=help&modules=wbsearchentities | Wikidata[wbsearchentities] } */ export function searchEntities( - search: string, - language?: WikidataLanguage, - limit?: string | number, - format?: UrlResultFormat, - uselang?: WikidataLanguage + search: string, + language?: WikidataLanguage, + limit?: string | number, + format?: UrlResultFormat, + uselang?: WikidataLanguage ): string; /** * @alias searchEntities */ export function searchEntities(opt: { - search: string; - language?: WikidataLanguage; - limit?: string | number; - format?: UrlResultFormat; - uselang?: WikidataLanguage; + search: string; + language?: WikidataLanguage; + limit?: string | number; + format?: UrlResultFormat; + uselang?: WikidataLanguage; }): string; /* ********** @@ -95,20 +99,20 @@ export function searchEntities(opt: { * @see {@link https://www.wikidata.org/w/api.php?action=help&modules=wbgetentities | Wikidata[wbgetentities] } */ export function getEntities( - ids: string | string[], - languages?: WikidataLanguage | WikidataLanguage[], - props?: WikidataProperty | WikidataProperty[], - format?: UrlResultFormat + ids: string | string[], + languages?: WikidataLanguage | WikidataLanguage[], + props?: WikidataProperty | WikidataProperty[], + format?: UrlResultFormat ): string; /** * @alias getEntities */ export function getEntities(a: { - ids: string | string[]; - languages?: WikidataLanguage | WikidataLanguage[]; - props?: WikidataProperty | WikidataProperty[]; - format?: UrlResultFormat; + ids: string | string[]; + languages?: WikidataLanguage | WikidataLanguage[]; + props?: WikidataProperty | WikidataProperty[]; + format?: UrlResultFormat; }): string; /** @@ -117,20 +121,20 @@ export function getEntities(a: { * Without id limitation and return the array of url instead. */ export function getManyEntities( - ids: string | string[], - languages?: WikidataLanguage | WikidataLanguage[], - props?: WikidataProperty | WikidataProperty[], - format?: UrlResultFormat + ids: string | string[], + languages?: WikidataLanguage | WikidataLanguage[], + props?: WikidataProperty | WikidataProperty[], + format?: UrlResultFormat ): string[]; /** * @alias getManyEntities */ export function getManyEntities(a: { - ids: string | string[]; - languages?: WikidataLanguage | WikidataLanguage[]; - props?: WikidataProperty | WikidataProperty[]; - format?: UrlResultFormat; + ids: string | string[]; + languages?: WikidataLanguage | WikidataLanguage[]; + props?: WikidataProperty | WikidataProperty[]; + format?: UrlResultFormat; }): string[]; /** @@ -147,22 +151,22 @@ export function getManyEntities(a: { * @see {@link https://github.com/maxlath/wikidata-sdk/blob/6b0673b9bf0fcaab19db65e2cc77e33c901ef35d/docs/get_entities.md#by-wikipedia-titles | Github[get_entities.md#by-wikipedia-titles] } */ export function getWikidataIdsFromWikipediaTitles( - titles: string | string[], - sites?: WikidataSite, - languages?: WikidataLanguage | WikidataLanguage[], - props?: WikidataProperty | WikidataProperty[], - format?: UrlResultFormat + titles: string | string[], + sites?: WikidataSite, + languages?: WikidataLanguage | WikidataLanguage[], + props?: WikidataProperty | WikidataProperty[], + format?: UrlResultFormat ): string; /** * @alias getWikidataIdsFromWikipediaTitles */ export function getWikidataIdsFromWikipediaTitles(a: { - titles: string | string[]; - sites?: WikidataSite; - languages?: WikidataLanguage | WikidataLanguage[]; - props?: WikidataProperty | WikidataProperty[]; - format?: UrlResultFormat; + titles: string | string[]; + sites?: WikidataSite; + languages?: WikidataLanguage | WikidataLanguage[]; + props?: WikidataProperty | WikidataProperty[]; + format?: UrlResultFormat; }): string; /** @@ -183,13 +187,13 @@ export function getWikidataIdsFromWikipediaTitles(a: { * {@link https://github.com/maxlath/wikidata-sdk/blob/6b0673b9bf0fcaab19db65e2cc77e33c901ef35d/docs/get_entities_reverse_claims.md#get-entities-reverse-claims | Github[get-entities-reverse-claims] } */ export function getReverseClaims( - property: string | string[], - value: string | string[], - options?: { - limit?: number; - keepProperties?: boolean; - caseInsensitive?: boolean; - } + property: string | string[], + value: string | string[], + options?: { + limit?: number; + keepProperties?: boolean; + caseInsensitive?: boolean; + } ): string; /** @@ -248,7 +252,7 @@ export function isSitelinkKey(a: string): boolean; * * @see {@link https://www.mediawiki.org/wiki/Wikibase/Indexing/RDF_Dump_Format#Truthy_statements | Truthy} */ -export function truthyClaims(claims: object): object; +export function truthyClaims(claims: WikidataClaim): WikidataClaim; /** * Filter-out non-truthy claims from an entity.claims[prop] array @@ -276,8 +280,8 @@ export function getSitelinkUrl(site: WikidataSite, title: string): string; export function getSitelinkUrl(a: { site: WikidataSite; title: string }): string; export interface SitelinkData { - lang: string; - project: string; + lang: string; + project: string; } /** * Get the sitelink on english language and the lang of it. @@ -340,7 +344,7 @@ export function wikidataTimeToDateObject(a: string): Date; * @see {@link https://github.com/maxlath/wikidata-sdk/blob/6b0673b9bf0fcaab19db65e2cc77e33c901ef35d/docs/general_helpers.md#wikidatatimetosimpleday | Github[wikidatatimetosimpleday] } * */ -export function wikidataTimeToSimpleDay(a: string | object): string; +export function wikidataTimeToSimpleDay(a: string | Json): string; /** * Get an image URL from a Wikimedia Commons filename @@ -352,113 +356,113 @@ export function wikidataTimeToSimpleDay(a: string | object): string; */ export function getImageUrl(a: string, width?: number): string; -export type SimplifyOption = { - // claims - entityPrefix?: string; - propertyPrefix?: string; - keepRichValues?: boolean; - keepQualifiers?: boolean; - keepReferences?: boolean; - keepIds?: boolean; - keepHashes?: boolean; - keepNonTruthy?: boolean; - // sitelinks - addUrl?: boolean; -}; +export interface SimplifyOption { + // claims + entityPrefix?: string; + propertyPrefix?: string; + keepRichValues?: boolean; + keepQualifiers?: boolean; + keepReferences?: boolean; + keepIds?: boolean; + keepHashes?: boolean; + keepNonTruthy?: boolean; + // sitelinks + addUrl?: boolean; +} /** * Helper method, for simplify result object more reasonable */ export namespace simplify { - /** - * Applying all simplifiers at once: labels, descriptions, aliases, claims, sitelinks. See next sections for details. - * You can also pass options as a second argument, that will then be passed the subfunctions: - * - * @param entity the entity that receive from {@link getEntities} APIs - * @param opt simlify option. currently only simplify claims and simplify sitelinks. - * - * @see {@link https://github.com/maxlath/wikidata-sdk/blob/master/docs/simplify_entities_data.md#simplify-entity | Github[simplify-entity]} - */ - export function entity(entity: T, opt?: SimplifyOption): T; + /** + * Applying all simplifiers at once: labels, descriptions, aliases, claims, sitelinks. See next sections for details. + * You can also pass options as a second argument, that will then be passed the subfunctions: + * + * @param entity the entity that receive from {@link getEntities} APIs + * @param opt simlify option. currently only simplify claims and simplify sitelinks. + * + * @see {@link https://github.com/maxlath/wikidata-sdk/blob/master/docs/simplify_entities_data.md#simplify-entity | Github[simplify-entity]} + */ + function entity(entity: T, opt?: SimplifyOption): T; - /** - * This is a same of {@link entity} method except this input as multiple array of entities. - * - * @param entities entities from {@link getEntities} APIs - * @param opt simlify option. currently only simplify claims and simplify sitelinks. - * - * @see {@link https://github.com/maxlath/wikidata-sdk/blob/master/docs/simplify_entities_data.md#simplify-entities | Github[simplify-entities]} - */ - export function entities(entities: T[], opt?: SimplifyOption): T[]; + /** + * This is a same of {@link entity} method except this input as multiple array of entities. + * + * @param entities entities from {@link getEntities} APIs + * @param opt simlify option. currently only simplify claims and simplify sitelinks. + * + * @see {@link https://github.com/maxlath/wikidata-sdk/blob/master/docs/simplify_entities_data.md#simplify-entities | Github[simplify-entities]} + */ + function entities(entities: T[], opt?: SimplifyOption): T[]; - /** - * Make label simplifier and easier to understand - * - * @param labels label object, you will receive this from getEntities method - * - * @example - * - * const label = simplify.labels("{ pl: { language: 'pl', value: 'książka' } }"); - * console.log(label) // { pl: 'książka' } - * - * @see {@link https://github.com/maxlath/wikidata-sdk/blob/master/docs/simplify_entities_data.md#simplify-labels | Github[simplify-labels]} - */ - export function labels(labels: WikidataLanguageBaseString): WikidataLanguageBaseStringSimplify; + /** + * Make label simplifier and easier to understand + * + * @param labels label object, you will receive this from getEntities method + * + * @example + * + * const label = simplify.labels("{ pl: { language: 'pl', value: 'książka' } }"); + * console.log(label) // { pl: 'książka' } + * + * @see {@link https://github.com/maxlath/wikidata-sdk/blob/master/docs/simplify_entities_data.md#simplify-labels | Github[simplify-labels]} + */ + function labels(labels: WikidataLanguageBaseString): WikidataLanguageBaseStringSimplify; - /** - * Make description simplifier and easier to understand - * - * @param descriptions description object, you will receive this from getEntities method - * - * @example - * - * const desc = simplify.descriptions("{ pl: { language: 'pl', value: 'dokument piśmienniczy [...]' } }"); - * console.log(desc) // { pl: 'dokument piśmienniczy [...]' } - * - * @see {@link https://github.com/maxlath/wikidata-sdk/blob/master/docs/simplify_entities_data.md#simplify-descriptions | Github[simplify-descriptions]} - */ - export function descriptions(descriptions: WikidataLanguageBaseString): WikidataLanguageBaseStringSimplify; + /** + * Make description simplifier and easier to understand + * + * @param descriptions description object, you will receive this from getEntities method + * + * @example + * + * const desc = simplify.descriptions("{ pl: { language: 'pl', value: 'dokument piśmienniczy [...]' } }"); + * console.log(desc) // { pl: 'dokument piśmienniczy [...]' } + * + * @see {@link https://github.com/maxlath/wikidata-sdk/blob/master/docs/simplify_entities_data.md#simplify-descriptions | Github[simplify-descriptions]} + */ + function descriptions(descriptions: WikidataLanguageBaseString): WikidataLanguageBaseStringSimplify; - /** - * Make alias simplifier and easier to understand - * - * @param aliases alias object, you will receive this from getEntities method - * - * @example - * - * const alias = simplify.aliases("{ pl: [ { language: 'pl', value: 'Tom' }, { language: 'pl', value: 'Tomik' } ] }"); - * console.log(alias) // { pl: [ 'Tom', 'Tomik' ] } - * - * @see {@link https://github.com/maxlath/wikidata-sdk/blob/master/docs/simplify_entities_data.md#simplify-aliases | Github[simplify-aliases]} - */ - export function aliases(aliases: WikidataLanguageBaseArrayString): WikidataLanguageBaseArrayStringSimplify; + /** + * Make alias simplifier and easier to understand + * + * @param aliases alias object, you will receive this from getEntities method + * + * @example + * + * const alias = simplify.aliases("{ pl: [ { language: 'pl', value: 'Tom' }, { language: 'pl', value: 'Tomik' } ] }"); + * console.log(alias) // { pl: [ 'Tom', 'Tomik' ] } + * + * @see {@link https://github.com/maxlath/wikidata-sdk/blob/master/docs/simplify_entities_data.md#simplify-aliases | Github[simplify-aliases]} + */ + function aliases(aliases: WikidataLanguageBaseArrayString): WikidataLanguageBaseArrayStringSimplify; - /** - * Make sitelink simplifier and easier to understand - * - * @param sitelinks sitelink object, you will receive this from getEntities method - * - * @example - * - * const site = simplify.sitelinks("{ plwiki: { site: 'plwiki', title: 'Książka', badges: [] } }"); - * console.log(site) // { plwiki: 'Książka' } - * - * @see {@link https://github.com/maxlath/wikidata-sdk/blob/master/docs/simplify_entities_data.md#simplify-sitelinks | Github[simplify-sitelinks]} - */ - export function sitelinks(sitelinks: WikidataSiteLink): WikidataSiteLinkSimplify; + /** + * Make sitelink simplifier and easier to understand + * + * @param sitelinks sitelink object, you will receive this from getEntities method + * + * @example + * + * const site = simplify.sitelinks("{ plwiki: { site: 'plwiki', title: 'Książka', badges: [] } }"); + * console.log(site) // { plwiki: 'Książka' } + * + * @see {@link https://github.com/maxlath/wikidata-sdk/blob/master/docs/simplify_entities_data.md#simplify-sitelinks | Github[simplify-sitelinks]} + */ + function sitelinks(sitelinks: WikidataSiteLink): WikidataSiteLinkSimplify; - /** - * Make sitelink simplifier and easier to understand. include URL in the result. - * - * @param sitelinks sitelink object, you will receive this from getEntities method - * @param options add url to a result - * - * @example - * - * const site = simplify.sitelinks("{ plwiki: { site: 'plwiki', title: 'Książka', badges: [] } }", {addUrl: true}); - * console.log(site) // { plwiki: { title: 'Książka', url: 'https://pl.wikipedia.org/wiki/Książka' } } - * - * @see {@link https://github.com/maxlath/wikidata-sdk/blob/master/docs/simplify_entities_data.md#add-sitelinks-urls | Github[simplify-sitelinks-with-url]} - */ - export function sitelinks(sitelinks: WikidataSiteLink, options: { addUrl: true }): WikidataSiteLinkWithUrlSimplify; + /** + * Make sitelink simplifier and easier to understand. include URL in the result. + * + * @param sitelinks sitelink object, you will receive this from getEntities method + * @param options add url to a result + * + * @example + * + * const site = simplify.sitelinks("{ plwiki: { site: 'plwiki', title: 'Książka', badges: [] } }", {addUrl: true}); + * console.log(site) // { plwiki: { title: 'Książka', url: 'https://pl.wikipedia.org/wiki/Książka' } } + * + * @see {@link https://github.com/maxlath/wikidata-sdk/blob/master/docs/simplify_entities_data.md#add-sitelinks-urls | Github[simplify-sitelinks-with-url]} + */ + function sitelinks(sitelinks: WikidataSiteLink, options: { addUrl: true }): WikidataSiteLinkWithUrlSimplify; } From 793d709fb22bb195371fd52fa0a8d50a39e4accf Mon Sep 17 00:00:00 2001 From: Lucas Motta Date: Wed, 28 Nov 2018 16:16:54 +0000 Subject: [PATCH 146/608] Include missing type for the method readFile --- types/ssh2-streams/index.d.ts | 24 ++++++++++++++++++++++++ types/ssh2/index.d.ts | 20 ++++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/types/ssh2-streams/index.d.ts b/types/ssh2-streams/index.d.ts index a780273591..3eaca56f6f 100644 --- a/types/ssh2-streams/index.d.ts +++ b/types/ssh2-streams/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for ssh2-streams v0.1.9 // Project: https://github.com/mscdex/ssh2-streams // Definitions by: Ron Buckton +// Definitions by: Ron Buckton // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -1044,6 +1045,24 @@ export class SFTPStream extends stream.Transform { */ fastPut(localPath: string, remotePath: string, callback: (err: any) => void): void; + /** + * (Client-only) + * Reads a file in memory and returns its contents + */ + readFile(remotePath: string, options: ReadFileOptions, callback: (err: any, handle: Buffer) => void): void; + + /** + * (Client-only) + * Reads a file in memory and returns its contents + */ + readFile(remotePath: string, encoding: string, callback: (err: any, handle: Buffer) => void): void; + + /** + * (Client-only) + * Reads a file in memory and returns its contents + */ + readFile(remotePath: string, callback: (err: any, handle: Buffer) => void): void; + /** * (Client-only) * Returns a new readable stream for `path`. @@ -1612,6 +1631,11 @@ export interface TransferOptions { step?: (total_transferred: number, chunk: number, total: number) => void; } +export interface ReadFileOptions { + encoding?: string + flag?: string +} + export interface ReadStreamOptions { flags?: string; encoding?: string; diff --git a/types/ssh2/index.d.ts b/types/ssh2/index.d.ts index 25bcfef52e..cf88fff5f1 100644 --- a/types/ssh2/index.d.ts +++ b/types/ssh2/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: Qubo // Ron Buckton // Will Boyce +// Lucas Motta // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -21,6 +22,7 @@ import { Attributes, Stats, TransferOptions, + ReadFileOptions, ReadStreamOptions, WriteStreamOptions, FileEntry @@ -1273,6 +1275,24 @@ export interface SFTPWrapper extends events.EventEmitter { */ fastPut(localPath: string, remotePath: string, callback: (err: any) => void): void; + /** + * (Client-only) + * Reads a file in memory and returns its contents + */ + readFile(remotePath: string, options: ReadFileOptions, callback: (err: any, handle: Buffer) => void): void; + + /** + * (Client-only) + * Reads a file in memory and returns its contents + */ + readFile(remotePath: string, encoding: string, callback: (err: any, handle: Buffer) => void): void; + + /** + * (Client-only) + * Reads a file in memory and returns its contents + */ + readFile(remotePath: string, callback: (err: any, handle: Buffer) => void): void; + /** * (Client-only) * Returns a new readable stream for `path`. From f857ba9d66d2f430fb2ff06b7e4579fbf61b7673 Mon Sep 17 00:00:00 2001 From: Erik Christensen Date: Wed, 28 Nov 2018 11:17:01 -0500 Subject: [PATCH 147/608] Added CollationDocument type in a couple places that were missed --- types/mongodb/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/mongodb/index.d.ts b/types/mongodb/index.d.ts index a217b0a605..3de97daf60 100644 --- a/types/mongodb/index.d.ts +++ b/types/mongodb/index.d.ts @@ -526,7 +526,7 @@ export interface CollectionCreateOptions extends CommonOptions { indexOptionDefaults?: object; viewOn?: string; pipeline?: any[]; - collation?: object; + collation?: CollationDocument; } /** http://mongodb.github.io/node-mongodb-native/3.1/api/Db.html#collection */ @@ -563,7 +563,7 @@ export interface IndexOptions extends CommonOptions { name?: string; // Creates a partial index based on the given filter object (MongoDB 3.2 or higher) partialFilterExpression?: any; - collation?: Object; + collation?: CollationDocument; default_language?: string } From b2133e941c8646b7a5c0581453123054314c2602 Mon Sep 17 00:00:00 2001 From: Lucas Motta Date: Wed, 28 Nov 2018 16:26:08 +0000 Subject: [PATCH 148/608] Fix credit name --- types/ssh2-streams/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/ssh2-streams/index.d.ts b/types/ssh2-streams/index.d.ts index 3eaca56f6f..e80e529ced 100644 --- a/types/ssh2-streams/index.d.ts +++ b/types/ssh2-streams/index.d.ts @@ -1,7 +1,7 @@ // Type definitions for ssh2-streams v0.1.9 // Project: https://github.com/mscdex/ssh2-streams // Definitions by: Ron Buckton -// Definitions by: Ron Buckton +// Definitions by: Lucas Motta // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// From 5cc01bba1447d578d0c0c8b4fe80d599638b9dc0 Mon Sep 17 00:00:00 2001 From: Erik Christensen Date: Wed, 28 Nov 2018 11:37:45 -0500 Subject: [PATCH 149/608] Fixed incorrect type for caseFirst in CollationDocument --- types/mongodb/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/mongodb/index.d.ts b/types/mongodb/index.d.ts index 3de97daf60..ef7b7768d8 100644 --- a/types/mongodb/index.d.ts +++ b/types/mongodb/index.d.ts @@ -1786,7 +1786,7 @@ export interface CollationDocument { locale: string; strength?: number; caseLevel?: boolean; - caseFirst?: boolean; + caseFirst?: string; numericOrdering?: boolean; alternate?: string; maxVariable?: string; From 850c8337b5a1ccf88a967a69aad34959fcdfaa2a Mon Sep 17 00:00:00 2001 From: Kamontat Chantrachirathumrong Date: Wed, 28 Nov 2018 22:57:47 +0100 Subject: [PATCH 150/608] [improve] Improve type of prompts --- types/prompts/index.d.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/types/prompts/index.d.ts b/types/prompts/index.d.ts index bfb08a8bd7..0db58ea435 100644 --- a/types/prompts/index.d.ts +++ b/types/prompts/index.d.ts @@ -52,12 +52,12 @@ declare namespace prompts { } interface Options { - onSubmit: (prompt: PromptObject, answer: any, answers: any[]) => void; - onCancel: (prompt: PromptObject, answers: any) => void; + onSubmit?: (prompt: PromptObject, answer: any, answers: any[]) => void; + onCancel?: (prompt: PromptObject, answers: any) => void; } interface PromptObject { - type: ValueOrFunc | Falsy; + type: ValueOrFunc | Falsy; name: ValueOrFunc; message?: ValueOrFunc; initial?: string | number | boolean; @@ -89,5 +89,7 @@ declare namespace prompts { type Falsy = false | null | undefined; + type PromptType = "text" | "password" | "invisible" | "number" | "confirm" | "list" | "toggle" | "select" | "multiselect" | "autocomplete" | Falsy + type ValueOrFunc = T | PrevCaller; } From aa0097e633b912dbf22a0ce94c574da8ef92c970 Mon Sep 17 00:00:00 2001 From: Adam <23192421+shenphen@users.noreply.github.com> Date: Thu, 29 Nov 2018 08:52:59 +0100 Subject: [PATCH 151/608] fix travis errors --- types/cropperjs/index.d.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/types/cropperjs/index.d.ts b/types/cropperjs/index.d.ts index 6e48bdae49..d7be9dbc39 100644 --- a/types/cropperjs/index.d.ts +++ b/types/cropperjs/index.d.ts @@ -426,15 +426,9 @@ declare class cropperjs { /** * Replace the image's src and rebuild the cropper. * @param url A new image url + * @param hasSameSize If the new image has the same size with the old one, then it will not rebuilt the cropper and only update the urls of all related images. */ - replace(url: string): void; - - /** - * Replace the image's src and rebuild the cropper. If the new image has the same size with the old one, then it will not rebuilt the cropper and only update the urls of all related images. This can be used for applying filters. - * @param url A new image url - * @param hasSameSize (Default: false) - */ - replace(url: string, hasSameSize: boolean): void; + replace(url: string, hasSameSize: boolean = false): void; /** * Enable (unfreeze) the cropper. From 3c744b74bec078faa9a9227ea23c00ffdc0a132a Mon Sep 17 00:00:00 2001 From: Lucas Motta Date: Thu, 29 Nov 2018 10:32:40 +0000 Subject: [PATCH 152/608] Fix ci problems --- types/ssh2-streams/index.d.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/types/ssh2-streams/index.d.ts b/types/ssh2-streams/index.d.ts index e80e529ced..df1e001e0a 100644 --- a/types/ssh2-streams/index.d.ts +++ b/types/ssh2-streams/index.d.ts @@ -1,7 +1,6 @@ // Type definitions for ssh2-streams v0.1.9 // Project: https://github.com/mscdex/ssh2-streams // Definitions by: Ron Buckton -// Definitions by: Lucas Motta // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -1631,11 +1630,6 @@ export interface TransferOptions { step?: (total_transferred: number, chunk: number, total: number) => void; } -export interface ReadFileOptions { - encoding?: string - flag?: string -} - export interface ReadStreamOptions { flags?: string; encoding?: string; @@ -1704,4 +1698,9 @@ export interface ParsedKey { publicOrig: Buffer; ppk?: boolean; privateMAC?: string; +} + +export interface ReadFileOptions { + encoding?: string; + flag?: string; } \ No newline at end of file From 5c1c6b290b6446c1ba270e083286d1c487da9c2f Mon Sep 17 00:00:00 2001 From: Silas Rech Date: Thu, 29 Nov 2018 13:12:37 +0100 Subject: [PATCH 153/608] [crumb] add typings --- types/crumb/crumb-tests.ts | 47 +++++++++++++++ types/crumb/index.d.ts | 114 +++++++++++++++++++++++++++++++++++++ types/crumb/tsconfig.json | 23 ++++++++ types/crumb/tslint.json | 1 + 4 files changed, 185 insertions(+) create mode 100644 types/crumb/crumb-tests.ts create mode 100644 types/crumb/index.d.ts create mode 100644 types/crumb/tsconfig.json create mode 100644 types/crumb/tslint.json diff --git a/types/crumb/crumb-tests.ts b/types/crumb/crumb-tests.ts new file mode 100644 index 0000000000..90612a3e4a --- /dev/null +++ b/types/crumb/crumb-tests.ts @@ -0,0 +1,47 @@ +import * as hapi from 'hapi'; +import * as crumb from 'crumb'; + +const server = new hapi.Server({ port: 8000 }); + +server.register({ + plugin: crumb, + options: { + key: 'csrf-token', + size: 50, + autoGenerate: true, + addToViewContext: true, + cookieOptions: { + path: '/', + }, + headerName: 'X-CSRF-Token', + restful: true, + skip: () => false, + enforce: true, + logUnauthorized: false, + } +}); + +server.route({ + method: 'get', + path: '/', + handler: async (_, h) => { + return h.continue; + }, +}); + +server.route({ + method: 'get', + path: '/custom', + options: { + plugins: { + crumb: { + key: 'x-csrf-token', + source: 'query', + restful: true, + }, + }, + }, + handler: async (_, h) => { + return h.continue; + }, +}); diff --git a/types/crumb/index.d.ts b/types/crumb/index.d.ts new file mode 100644 index 0000000000..16311c99bf --- /dev/null +++ b/types/crumb/index.d.ts @@ -0,0 +1,114 @@ +// Type definitions for crumb 7.2 +// Project: https://github.com/hapijs/crumb +// Definitions by: Silas Rech +// Simon Schick +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +import { Request, Plugin, ResponseToolkit, ServerStateCookieOptions } from 'hapi'; + +declare module 'hapi' { + interface PluginSpecificConfiguration { + crumb?: boolean | { + /** + * The name of the cookie to store the CSRF crumb into. + */ + key?: string; + + /** + * Specifies how the crumb will be sent in requests. + * + * @default 'payload' + */ + source?: 'payload' | 'query'; + + /** + * Override for the server's 'restful' setting + */ + restful?: boolean; + }; + } +} + +declare namespace crumb { + type SkipFunction = (request?: Request, h?: ResponseToolkit) => boolean; + + interface RegisterOptions { + /** + * The name of the cookie to store the CSRF crumb into. + * + * @default 'crumb' + */ + key?: string; + + /** + * The length of the crumb to generate. + * See {@link https://github.com/hapijs/cryptiles cryptiles} for more information. + * + * @default 43 + */ + size?: number; + + /** + * Whether to automatically generate a new crumb for requests. + * + * @default true + */ + autoGenerate?: boolean; + + /** + * Whether to automatically add the crumb to view contexts as the given key. + * + * @default true + */ + addToViewContext?: boolean; + + /** + * Storage options for the cookie containing the crumb + * + * @default { path: '/' } + */ + cookieOptions?: ServerStateCookieOptions; + + /** + * Specify the name of the custom CSRF header. + * + * @default 'X-CSRF-Token' + */ + headerName?: string; + + /** + * RESTful mode that validates crumb tokens from 'X-CSRF-Token' request header for POST, PUT, PATCH and DELETE server routes. + * Disables payload/query crumb validation. + * + * @default false + */ + restful?: boolean; + + /** + * A function which when provided, is called for every request. + * If the provided function returns true, validation and generation of crumb is skipped. + * + * @default false + */ + skip?: boolean | SkipFunction; + + /** + * Using enforce with false will set the CSRF header cookie but won't execute the validation. + * + * @default true + */ + enforce?: boolean; + + /** + * Whether to add to the request log with tag 'crumb' and data 'validation failed'. + * + * @default false + */ + logUnauthorized?: boolean; + } +} + +declare const crumb: Plugin; + +export = crumb; diff --git a/types/crumb/tsconfig.json b/types/crumb/tsconfig.json new file mode 100644 index 0000000000..5beceb6a88 --- /dev/null +++ b/types/crumb/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "crumb-tests.ts" + ] +} diff --git a/types/crumb/tslint.json b/types/crumb/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/crumb/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 900a8f162194c33518842b97477a4992963953a7 Mon Sep 17 00:00:00 2001 From: pawkrol Date: Thu, 29 Nov 2018 15:17:52 +0100 Subject: [PATCH 154/608] Add import function --- types/mathjs/index.d.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/types/mathjs/index.d.ts b/types/mathjs/index.d.ts index 6cb49323fa..09b4a9d27c 100644 --- a/types/mathjs/index.d.ts +++ b/types/mathjs/index.d.ts @@ -7,6 +7,7 @@ // TypeScript Version: 2.2 import { Decimal } from "decimal.js"; +import { ImportOptions } from "mathjs"; declare const math: math.MathJsStatic; export as namespace math; @@ -2571,6 +2572,18 @@ declare namespace math { * ‘string’, ‘Array’, ‘Date’. */ typeof(x: any): string; + + /** + * Import functions from an object or a module + * @param object An object with functions to be imported. + * @param options An object with import options. + */ + import(object: object | Array, options: ImportOptions); + + /** + * It may not exists - this is _only_ for import functionality. + */ + [key: string]: any; } interface Matrix { @@ -4542,4 +4555,10 @@ declare namespace math { */ typeof(): MathJsChain; } + + interface ImportOptions { + override?: boolean; + silent?: boolean; + wrap?: boolean; + } } From f6e24ebb8e2b2971102c1203dba773d9cffd1ec1 Mon Sep 17 00:00:00 2001 From: pawkrol Date: Thu, 29 Nov 2018 15:19:50 +0100 Subject: [PATCH 155/608] Remove import and add author --- types/mathjs/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/mathjs/index.d.ts b/types/mathjs/index.d.ts index 09b4a9d27c..7917ce417e 100644 --- a/types/mathjs/index.d.ts +++ b/types/mathjs/index.d.ts @@ -3,11 +3,11 @@ // Definitions by: Ilya Shestakov , // Andy Patterson , // Brad Besserman +// Pawel Krol // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 import { Decimal } from "decimal.js"; -import { ImportOptions } from "mathjs"; declare const math: math.MathJsStatic; export as namespace math; From 7b89694607cb4a4d602f7600bb582880075b03cd Mon Sep 17 00:00:00 2001 From: Michael Pertl Date: Thu, 29 Nov 2018 16:08:35 +0100 Subject: [PATCH 156/608] [@types/ssh2-sftp-client] "Formatting: Either use all tabs, or always use 4 spaces" --- types/ssh2-sftp-client/index.d.ts | 65 ++++++++++++++++++------------- 1 file changed, 39 insertions(+), 26 deletions(-) diff --git a/types/ssh2-sftp-client/index.d.ts b/types/ssh2-sftp-client/index.d.ts index 2dcaee74e6..165af77ab4 100644 --- a/types/ssh2-sftp-client/index.d.ts +++ b/types/ssh2-sftp-client/index.d.ts @@ -5,35 +5,48 @@ import * as ssh2 from 'ssh2'; import * as ssh2Stream from 'ssh2-streams'; + export = sftp; declare class sftp { - connect(options: ssh2.ConnectConfig): Promise; - list(remoteFilePath: string): Promise; - get(remoteFilePath: string, useCompression?: boolean, encoding?: string | null): Promise; - fastGet(remoteFilePath: string, localPath: string, options?: ssh2Stream.TransferOptions): Promise; - put(input: string | Buffer | NodeJS.ReadableStream, remoteFilePath: string, useCompression?: boolean, encoding?: string): Promise; - fastPut(localPath: string, emoteFilePath: string, options?: ssh2Stream.TransferOptions): Promise; - mkdir(remoteFilePath: string, recursive?: boolean): Promise; - rmdir(remoteFilePath: string, recursive?: boolean): Promise; - delete(remoteFilePath: string): Promise; - rename(remoteSourcePath: string, remoteDestPath: string): Promise; - end(): Promise; - on(event: string, callback: (...args: any[]) => void): void; + connect(options: ssh2.ConnectConfig): Promise; + + list(remoteFilePath: string): Promise; + + get(remoteFilePath: string, useCompression?: boolean, encoding?: string | null): Promise; + + fastGet(remoteFilePath: string, localPath: string, options?: ssh2Stream.TransferOptions): Promise; + + put(input: string | Buffer | NodeJS.ReadableStream, remoteFilePath: string, useCompression?: boolean, encoding?: string): Promise; + + fastPut(localPath: string, emoteFilePath: string, options?: ssh2Stream.TransferOptions): Promise; + + mkdir(remoteFilePath: string, recursive?: boolean): Promise; + + rmdir(remoteFilePath: string, recursive?: boolean): Promise; + + delete(remoteFilePath: string): Promise; + + rename(remoteSourcePath: string, remoteDestPath: string): Promise; + + end(): Promise; + + on(event: string, callback: (...args: any[]) => void): void; } + declare namespace sftp { - interface FileInfo { - type: string; - name: string; - size: number; - modifyTime: number; - accessTime: number; - rights: { - user: string; - group: string; - other: string; - }; - owner: number; - group: number; - } + interface FileInfo { + type: string; + name: string; + size: number; + modifyTime: number; + accessTime: number; + rights: { + user: string; + group: string; + other: string; + }; + owner: number; + group: number; + } } From 8046ef23ae267844626edf0a8f20a91ba0acfad1 Mon Sep 17 00:00:00 2001 From: Michael Pertl Date: Thu, 29 Nov 2018 16:13:29 +0100 Subject: [PATCH 157/608] [@types/ssh2-sftp-client] added type definitions for methods 'exists', 'stat' and 'chmod' --- types/ssh2-sftp-client/index.d.ts | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/types/ssh2-sftp-client/index.d.ts b/types/ssh2-sftp-client/index.d.ts index 165af77ab4..8089810fa9 100644 --- a/types/ssh2-sftp-client/index.d.ts +++ b/types/ssh2-sftp-client/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for ssh2-sftp-client 2.3 +// Type definitions for ssh2-sftp-client 2.4 // Project: https://www.npmjs.com/package/ssh2-sftp-client -// Definitions by: igrayson , Ascari Andrea , Kartik Malik +// Definitions by: igrayson , Ascari Andrea , Kartik Malik , Michael Pertl // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped import * as ssh2 from 'ssh2'; @@ -13,6 +13,10 @@ declare class sftp { list(remoteFilePath: string): Promise; + exists(remotePath: string): Promise; + + stat(remotePath: string): Promise + get(remoteFilePath: string, useCompression?: boolean, encoding?: string | null): Promise; fastGet(remoteFilePath: string, localPath: string, options?: ssh2Stream.TransferOptions): Promise; @@ -29,6 +33,8 @@ declare class sftp { rename(remoteSourcePath: string, remoteDestPath: string): Promise; + chmod(remotePath: string, mode: number | string): Promise; + end(): Promise; on(event: string, callback: (...args: any[]) => void): void; @@ -49,4 +55,14 @@ declare namespace sftp { owner: number; group: number; } + + interface FileStats { + mode: number; + permissions?: any; + owner: number; + group: number; + size: number; + accessTime: number; + modifyTime: number; + } } From c74a7e8088af068f6e1925eb5c953affd3d05a45 Mon Sep 17 00:00:00 2001 From: Michael Pertl Date: Thu, 29 Nov 2018 16:23:22 +0100 Subject: [PATCH 158/608] [@types/ssh2-sftp-client] multi-line "definitions by"; added new tests --- types/ssh2-sftp-client/index.d.ts | 5 ++++- types/ssh2-sftp-client/ssh2-sftp-client-tests.ts | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/types/ssh2-sftp-client/index.d.ts b/types/ssh2-sftp-client/index.d.ts index 8089810fa9..ac0c0847ee 100644 --- a/types/ssh2-sftp-client/index.d.ts +++ b/types/ssh2-sftp-client/index.d.ts @@ -1,6 +1,9 @@ // Type definitions for ssh2-sftp-client 2.4 // Project: https://www.npmjs.com/package/ssh2-sftp-client -// Definitions by: igrayson , Ascari Andrea , Kartik Malik , Michael Pertl +// Definitions by: igrayson +// Ascari Andrea +// Kartik Malik +// Michael Pertl // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped import * as ssh2 from 'ssh2'; diff --git a/types/ssh2-sftp-client/ssh2-sftp-client-tests.ts b/types/ssh2-sftp-client/ssh2-sftp-client-tests.ts index 8a9c99fde1..d59e552990 100644 --- a/types/ssh2-sftp-client/ssh2-sftp-client-tests.ts +++ b/types/ssh2-sftp-client/ssh2-sftp-client-tests.ts @@ -1,5 +1,6 @@ import Client = require('ssh2-sftp-client'); import * as fs from 'fs'; + const client = new Client(); client.connect({ @@ -11,6 +12,10 @@ client.connect({ client.list('/remote/path').then(() => null); +client.exists('/remote/path').then(() => null); + +client.stat('/remote/path').then(() => null); + client.get('/remote/path').then(stream => stream.read(0)); client.get('/remote/path', true, 'utf8').then(stream => stream.read(0)); client.get('/remote/path', true, null).then(stream => stream.read(0)); @@ -30,6 +35,8 @@ client.delete('remote/path').then(() => null); client.rename('/remote/from', '/remote/to').then(() => null); +client.chmod('/remote/path', 777).then(() => null); + client.end().then(() => null); client.on('event', () => null); From c042e6eacaf7a1f17d7a46af8a331dc3a417e7a8 Mon Sep 17 00:00:00 2001 From: Michael Pertl Date: Thu, 29 Nov 2018 16:29:27 +0100 Subject: [PATCH 159/608] [@types/ssh2-sftp-client] added missing semicolon --- types/ssh2-sftp-client/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/ssh2-sftp-client/index.d.ts b/types/ssh2-sftp-client/index.d.ts index ac0c0847ee..c568571eb5 100644 --- a/types/ssh2-sftp-client/index.d.ts +++ b/types/ssh2-sftp-client/index.d.ts @@ -18,7 +18,7 @@ declare class sftp { exists(remotePath: string): Promise; - stat(remotePath: string): Promise + stat(remotePath: string): Promise; get(remoteFilePath: string, useCompression?: boolean, encoding?: string | null): Promise; From e02b8523a1f3ea4f6788de1dee5727e43ad9a053 Mon Sep 17 00:00:00 2001 From: Lukas Elmer Date: Thu, 29 Nov 2018 17:29:43 +0100 Subject: [PATCH 160/608] improve superagent.agent() typing --- types/superagent/index.d.ts | 2 +- types/superagent/superagent-tests.ts | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/types/superagent/index.d.ts b/types/superagent/index.d.ts index 971cc3c4c2..261ea99bed 100644 --- a/types/superagent/index.d.ts +++ b/types/superagent/index.d.ts @@ -45,7 +45,7 @@ declare namespace request { // tslint:disable-next-line:unified-signatures (method: string, url: string): SuperAgentRequest; - agent(): SuperAgent; + agent(): this & Request & SuperAgent; serialize: { [type: string]: Serializer }; parse: { [type: string]: Parser }; } diff --git a/types/superagent/superagent-tests.ts b/types/superagent/superagent-tests.ts index c063c819be..2e13d5b90a 100644 --- a/types/superagent/superagent-tests.ts +++ b/types/superagent/superagent-tests.ts @@ -421,3 +421,15 @@ request .get('/echo') .use(echoPlugin) .end(); + +async function testDefaultOptions() { + // Default options for multiple requests + const agentWithDefaultOptions = request.agent() + .use(() => null) + .auth('digest', 'secret', {type:'auto'}); + + await agentWithDefaultOptions.get('/with-plugin-and-auth'); + await agentWithDefaultOptions.get('/also-with-plugin-and-auth'); +} + +testDefaultOptions(); From bf07afd86497cc8195477b8be5e904f830514159 Mon Sep 17 00:00:00 2001 From: Lukas Elmer Date: Thu, 29 Nov 2018 17:34:25 +0100 Subject: [PATCH 161/608] improve formatting and whitespaces --- types/superagent/superagent-tests.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/types/superagent/superagent-tests.ts b/types/superagent/superagent-tests.ts index 2e13d5b90a..44ef7cf773 100644 --- a/types/superagent/superagent-tests.ts +++ b/types/superagent/superagent-tests.ts @@ -424,9 +424,10 @@ request async function testDefaultOptions() { // Default options for multiple requests - const agentWithDefaultOptions = request.agent() + const agentWithDefaultOptions = request + .agent() .use(() => null) - .auth('digest', 'secret', {type:'auto'}); + .auth('digest', 'secret', { type: 'auto' }); await agentWithDefaultOptions.get('/with-plugin-and-auth'); await agentWithDefaultOptions.get('/also-with-plugin-and-auth'); From 09cf6f908a2bd4d341d80a89aa735d52fd5ad8a9 Mon Sep 17 00:00:00 2001 From: Lukas Elmer Date: Thu, 29 Nov 2018 17:36:21 +0100 Subject: [PATCH 162/608] update header --- types/superagent/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/superagent/index.d.ts b/types/superagent/index.d.ts index 261ea99bed..c10ff467bb 100644 --- a/types/superagent/index.d.ts +++ b/types/superagent/index.d.ts @@ -6,6 +6,7 @@ // Shrey Jain // Alec Zopf // Adam Haglund +// Lukas Elmer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 From 84d0e5f3c6ed696e578b99865567b4ad93814368 Mon Sep 17 00:00:00 2001 From: Tyler Date: Thu, 29 Nov 2018 11:24:47 -0700 Subject: [PATCH 163/608] update react-flatpickr definitions --- types/react-flatpickr/index.d.ts | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/types/react-flatpickr/index.d.ts b/types/react-flatpickr/index.d.ts index a0a9725ccd..973f30efc9 100644 --- a/types/react-flatpickr/index.d.ts +++ b/types/react-flatpickr/index.d.ts @@ -1,18 +1,26 @@ -// Type definitions for react-flatpickr 3.2 +// Type definitions for react-flatpickr 3.6.4 // Project: https://github.com/coderhaoxin/react-flatpickr // Definitions by: begincalendar +// snaveevans // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 -import { Component } from 'react'; -import flatpickr from 'flatpickr'; +import { Component } from "react"; +import flatpickr from "flatpickr"; export interface DateTimePickerProps { - defaultValue?: string; - options?: flatpickr.Options.Options; - onChange?: flatpickr.Options.Hook; - value?: string; - className?: string; + defaultValue?: string; + options?: flatpickr.Options.Options; + onChange?: flatpickr.Options.Hook; + onOpen?: flatpickr.Options.Hook; + onClose?: flatpickr.Options.Hook; + onMonthChange?: flatpickr.Options.Hook; + onYearChange?: flatpickr.Options.Hook; + onReady?: flatpickr.Options.Hook; + onValueUpdate?: flatpickr.Options.Hook; + onDayCreate?: flatpickr.Options.Hook; + value?: string | Date | number | Array; + children?: JSX.Element; } export default class DatePicker extends Component {} From f8ad24974118da570659fcaf7a6f35271e828f15 Mon Sep 17 00:00:00 2001 From: Tyler Date: Thu, 29 Nov 2018 11:42:10 -0700 Subject: [PATCH 164/608] refactor react-flatpickr test --- .../react-flatpickr/react-flatpickr-tests.tsx | 50 ++++++++++++++----- 1 file changed, 38 insertions(+), 12 deletions(-) diff --git a/types/react-flatpickr/react-flatpickr-tests.tsx b/types/react-flatpickr/react-flatpickr-tests.tsx index 452d8529b4..ce7122a47f 100644 --- a/types/react-flatpickr/react-flatpickr-tests.tsx +++ b/types/react-flatpickr/react-flatpickr-tests.tsx @@ -1,22 +1,48 @@ -import flatpickr from 'flatpickr'; -import * as React from 'react'; -import DatePicker from 'react-flatpickr'; +import flatpickr from "flatpickr"; +import * as React from "react"; +import DatePicker from "react-flatpickr"; -const noParamsElement = ; +const noParamsElement = ; -const defaultValueElement = ; +const defaultValueElement = ; const options = { - dateFormat: 'YYYY-MM-DD' + dateFormat: "YYYY-MM-DD" }; -const optionsElement = ; +const optionsElement = ; -const onChange = ( - selectedDates: Date[], dateStr: string, instance: flatpickr.Instance, +const hook = ( + selectedDates: Date[], + dateStr: string, + instance: flatpickr.Instance, elem: HTMLElement ) => null; -const onChangeElement = ; +const onChangeElement = ; +const onOpenElement = ; +const onCloseElement = ; +const onMonthChangeElement = ; +const onYearChangeElement = ; +const onReadyElement = ; +const onValueUpdateElement = ; +const onDayCreateElement = ; -const valueElement = ; +const valueStringElement = ; +const valueDateElement = ; +const valueNumberElement = ; +const valueStringArrayElement = ( + +); +const valueDateArrayElement = ( + +); +const valueNumberArrayElement = ( + +); -const classNameElement = ; +const wrappedElement = ( + + + +); From 0085b9868c6252a56fed4690444231dbd8cb8099 Mon Sep 17 00:00:00 2001 From: Tyler Date: Thu, 29 Nov 2018 11:45:23 -0700 Subject: [PATCH 165/608] react-flatpickr remove minor version --- types/react-flatpickr/index.d.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/types/react-flatpickr/index.d.ts b/types/react-flatpickr/index.d.ts index 973f30efc9..9f60b4d7be 100644 --- a/types/react-flatpickr/index.d.ts +++ b/types/react-flatpickr/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-flatpickr 3.6.4 +// Type definitions for react-flatpickr 3.6 // Project: https://github.com/coderhaoxin/react-flatpickr // Definitions by: begincalendar // snaveevans @@ -9,18 +9,18 @@ import { Component } from "react"; import flatpickr from "flatpickr"; export interface DateTimePickerProps { - defaultValue?: string; - options?: flatpickr.Options.Options; - onChange?: flatpickr.Options.Hook; - onOpen?: flatpickr.Options.Hook; - onClose?: flatpickr.Options.Hook; - onMonthChange?: flatpickr.Options.Hook; - onYearChange?: flatpickr.Options.Hook; - onReady?: flatpickr.Options.Hook; - onValueUpdate?: flatpickr.Options.Hook; - onDayCreate?: flatpickr.Options.Hook; - value?: string | Date | number | Array; - children?: JSX.Element; + defaultValue?: string; + options?: flatpickr.Options.Options; + onChange?: flatpickr.Options.Hook; + onOpen?: flatpickr.Options.Hook; + onClose?: flatpickr.Options.Hook; + onMonthChange?: flatpickr.Options.Hook; + onYearChange?: flatpickr.Options.Hook; + onReady?: flatpickr.Options.Hook; + onValueUpdate?: flatpickr.Options.Hook; + onDayCreate?: flatpickr.Options.Hook; + value?: string | Date | number | Array; + children?: JSX.Element; } export default class DatePicker extends Component {} From c652a0afb4330ca150f1755bba040cf72b4ec5f5 Mon Sep 17 00:00:00 2001 From: Tyler Date: Thu, 29 Nov 2018 11:47:37 -0700 Subject: [PATCH 166/608] Revert "react-flatpickr remove minor version" This reverts commit 0085b9868c6252a56fed4690444231dbd8cb8099. --- types/react-flatpickr/index.d.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/types/react-flatpickr/index.d.ts b/types/react-flatpickr/index.d.ts index 9f60b4d7be..973f30efc9 100644 --- a/types/react-flatpickr/index.d.ts +++ b/types/react-flatpickr/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-flatpickr 3.6 +// Type definitions for react-flatpickr 3.6.4 // Project: https://github.com/coderhaoxin/react-flatpickr // Definitions by: begincalendar // snaveevans @@ -9,18 +9,18 @@ import { Component } from "react"; import flatpickr from "flatpickr"; export interface DateTimePickerProps { - defaultValue?: string; - options?: flatpickr.Options.Options; - onChange?: flatpickr.Options.Hook; - onOpen?: flatpickr.Options.Hook; - onClose?: flatpickr.Options.Hook; - onMonthChange?: flatpickr.Options.Hook; - onYearChange?: flatpickr.Options.Hook; - onReady?: flatpickr.Options.Hook; - onValueUpdate?: flatpickr.Options.Hook; - onDayCreate?: flatpickr.Options.Hook; - value?: string | Date | number | Array; - children?: JSX.Element; + defaultValue?: string; + options?: flatpickr.Options.Options; + onChange?: flatpickr.Options.Hook; + onOpen?: flatpickr.Options.Hook; + onClose?: flatpickr.Options.Hook; + onMonthChange?: flatpickr.Options.Hook; + onYearChange?: flatpickr.Options.Hook; + onReady?: flatpickr.Options.Hook; + onValueUpdate?: flatpickr.Options.Hook; + onDayCreate?: flatpickr.Options.Hook; + value?: string | Date | number | Array; + children?: JSX.Element; } export default class DatePicker extends Component {} From 5baad0aabf25ca9416d93f06c479d8c6e790a938 Mon Sep 17 00:00:00 2001 From: Tyler Date: Thu, 29 Nov 2018 11:48:28 -0700 Subject: [PATCH 167/608] react-flatpickr remove patch version --- types/react-flatpickr/index.d.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/types/react-flatpickr/index.d.ts b/types/react-flatpickr/index.d.ts index 973f30efc9..9f60b4d7be 100644 --- a/types/react-flatpickr/index.d.ts +++ b/types/react-flatpickr/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-flatpickr 3.6.4 +// Type definitions for react-flatpickr 3.6 // Project: https://github.com/coderhaoxin/react-flatpickr // Definitions by: begincalendar // snaveevans @@ -9,18 +9,18 @@ import { Component } from "react"; import flatpickr from "flatpickr"; export interface DateTimePickerProps { - defaultValue?: string; - options?: flatpickr.Options.Options; - onChange?: flatpickr.Options.Hook; - onOpen?: flatpickr.Options.Hook; - onClose?: flatpickr.Options.Hook; - onMonthChange?: flatpickr.Options.Hook; - onYearChange?: flatpickr.Options.Hook; - onReady?: flatpickr.Options.Hook; - onValueUpdate?: flatpickr.Options.Hook; - onDayCreate?: flatpickr.Options.Hook; - value?: string | Date | number | Array; - children?: JSX.Element; + defaultValue?: string; + options?: flatpickr.Options.Options; + onChange?: flatpickr.Options.Hook; + onOpen?: flatpickr.Options.Hook; + onClose?: flatpickr.Options.Hook; + onMonthChange?: flatpickr.Options.Hook; + onYearChange?: flatpickr.Options.Hook; + onReady?: flatpickr.Options.Hook; + onValueUpdate?: flatpickr.Options.Hook; + onDayCreate?: flatpickr.Options.Hook; + value?: string | Date | number | Array; + children?: JSX.Element; } export default class DatePicker extends Component {} From 47b4772299affae7d56351a46668c9624d3b0aba Mon Sep 17 00:00:00 2001 From: Tyler Date: Thu, 29 Nov 2018 12:01:10 -0700 Subject: [PATCH 168/608] react-flatpickr use ReadonlyArray --- types/react-flatpickr/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-flatpickr/index.d.ts b/types/react-flatpickr/index.d.ts index 9f60b4d7be..f9b817bd00 100644 --- a/types/react-flatpickr/index.d.ts +++ b/types/react-flatpickr/index.d.ts @@ -19,7 +19,7 @@ export interface DateTimePickerProps { onReady?: flatpickr.Options.Hook; onValueUpdate?: flatpickr.Options.Hook; onDayCreate?: flatpickr.Options.Hook; - value?: string | Date | number | Array; + value?: string | Date | number | ReadonlyArray; children?: JSX.Element; } From 2100292089ba9dee0667b756c02774108b5f696e Mon Sep 17 00:00:00 2001 From: Javier Gonzalez Date: Thu, 29 Nov 2018 21:07:23 +0100 Subject: [PATCH 169/608] [socket.io] add overload for origins method As seen in https://socket.io/docs/server-api/#server-origins-fn --- types/socket.io/index.d.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/types/socket.io/index.d.ts b/types/socket.io/index.d.ts index f5e6c5fd00..d32fcaade6 100644 --- a/types/socket.io/index.d.ts +++ b/types/socket.io/index.d.ts @@ -143,6 +143,17 @@ declare namespace SocketIO { origins( v: string|string[] ): Server; /** + * Provides a function taking two arguments origin:String + * and callback(error, success), where success is a boolean + * value indicating whether origin is allowed or not. If + * success is set to false, error must be provided as a string + * value that will be appended to the server response, e.g. “Origin not allowed”. + * @param fn The function that will be called to check the origin + * return This Server + */ + origins( fn: ( origin: string, callback: ( error: string | null, success: boolean ) => void ) => void ): Server; + + /** * Attaches socket.io to a server * @param srv The http.Server that we want to attach to * @param opts An optional parameters object From 70368743cc57f09eb5496e417014b260e2517418 Mon Sep 17 00:00:00 2001 From: Javier Gonzalez Date: Thu, 29 Nov 2018 21:10:45 +0100 Subject: [PATCH 170/608] fixed indentation --- types/socket.io/index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/types/socket.io/index.d.ts b/types/socket.io/index.d.ts index d32fcaade6..792fb85167 100644 --- a/types/socket.io/index.d.ts +++ b/types/socket.io/index.d.ts @@ -144,10 +144,10 @@ declare namespace SocketIO { /** * Provides a function taking two arguments origin:String - * and callback(error, success), where success is a boolean - * value indicating whether origin is allowed or not. If - * success is set to false, error must be provided as a string - * value that will be appended to the server response, e.g. “Origin not allowed”. + * and callback(error, success), where success is a boolean + * value indicating whether origin is allowed or not. If + * success is set to false, error must be provided as a string + * value that will be appended to the server response, e.g. “Origin not allowed”. * @param fn The function that will be called to check the origin * return This Server */ From 8cdfef9948972883fe751a3fcb2c5d0badc29a76 Mon Sep 17 00:00:00 2001 From: Javier Gonzalez Date: Thu, 29 Nov 2018 21:11:28 +0100 Subject: [PATCH 171/608] fixed indentation again --- types/socket.io/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/socket.io/index.d.ts b/types/socket.io/index.d.ts index 792fb85167..1a2fb802e6 100644 --- a/types/socket.io/index.d.ts +++ b/types/socket.io/index.d.ts @@ -153,7 +153,7 @@ declare namespace SocketIO { */ origins( fn: ( origin: string, callback: ( error: string | null, success: boolean ) => void ) => void ): Server; - /** + /** * Attaches socket.io to a server * @param srv The http.Server that we want to attach to * @param opts An optional parameters object From b3461ed26b0f4c6bc3d99fa4d1919eba4635a27d Mon Sep 17 00:00:00 2001 From: Javier Gonzalez Date: Thu, 29 Nov 2018 21:12:16 +0100 Subject: [PATCH 172/608] and fixed indentation once more --- types/socket.io/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/socket.io/index.d.ts b/types/socket.io/index.d.ts index 1a2fb802e6..e0abb6e972 100644 --- a/types/socket.io/index.d.ts +++ b/types/socket.io/index.d.ts @@ -153,7 +153,7 @@ declare namespace SocketIO { */ origins( fn: ( origin: string, callback: ( error: string | null, success: boolean ) => void ) => void ): Server; - /** + /** * Attaches socket.io to a server * @param srv The http.Server that we want to attach to * @param opts An optional parameters object From 3bc0b5bec959415292efd71bf5c188eb170b550e Mon Sep 17 00:00:00 2001 From: Tyler Date: Thu, 29 Nov 2018 13:25:36 -0700 Subject: [PATCH 173/608] react-flatpickr allow Element array --- types/react-flatpickr/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-flatpickr/index.d.ts b/types/react-flatpickr/index.d.ts index f9b817bd00..5e3b12fdf8 100644 --- a/types/react-flatpickr/index.d.ts +++ b/types/react-flatpickr/index.d.ts @@ -20,7 +20,7 @@ export interface DateTimePickerProps { onValueUpdate?: flatpickr.Options.Hook; onDayCreate?: flatpickr.Options.Hook; value?: string | Date | number | ReadonlyArray; - children?: JSX.Element; + children?: JSX.Element | JSX.Element[]; } export default class DatePicker extends Component {} From 0ccda5781a317728dc62b4889daac7f8a1b396b0 Mon Sep 17 00:00:00 2001 From: Tyler Date: Thu, 29 Nov 2018 13:31:29 -0700 Subject: [PATCH 174/608] react-flatpickr test multiple elements --- types/react-flatpickr/react-flatpickr-tests.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/types/react-flatpickr/react-flatpickr-tests.tsx b/types/react-flatpickr/react-flatpickr-tests.tsx index ce7122a47f..c51f527707 100644 --- a/types/react-flatpickr/react-flatpickr-tests.tsx +++ b/types/react-flatpickr/react-flatpickr-tests.tsx @@ -46,3 +46,10 @@ const wrappedElement = ( ); + +const wrappedElements = ( + + + + +); From 56761f59b80614fbfc67fd190cbe11f9461f4919 Mon Sep 17 00:00:00 2001 From: Dobes Vandermeer Date: Thu, 29 Nov 2018 12:40:58 -0800 Subject: [PATCH 175/608] Add hint to CollectionAggregationOptions Although this option is, for some reason, not document. It is supported. It follows the format specified here: https://docs.mongodb.com/manual/reference/command/aggregate/ --- types/mongodb/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/mongodb/index.d.ts b/types/mongodb/index.d.ts index b31a8dd7b9..11d425dc30 100644 --- a/types/mongodb/index.d.ts +++ b/types/mongodb/index.d.ts @@ -1294,6 +1294,7 @@ export interface CollectionAggregationOptions { * Allow driver to bypass schema validation in MongoDB 3.2 or higher. */ bypassDocumentValidation?: boolean; + hint?: string | Object; raw?: boolean; promoteLongs?: boolean; promoteValues?: boolean; From b4d06b7f3e785e70d824103c6974589ac1f80a98 Mon Sep 17 00:00:00 2001 From: Samuel Thompson Date: Thu, 29 Nov 2018 14:47:13 -0700 Subject: [PATCH 176/608] added various events and variable around --- types/sip.js/index.d.ts | 45 ++++++++++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/types/sip.js/index.d.ts b/types/sip.js/index.d.ts index 65466ee840..b364074e07 100644 --- a/types/sip.js/index.d.ts +++ b/types/sip.js/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for sip.js 0.8 +// Type definitions for sip.js 0.9 // Project: http://sipjs.com // Definitions by: Kir Dergachev // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -75,6 +75,8 @@ export namespace C { export type DescriptionModifier = (description: RTCSessionDescription) => Promise; export interface SessionDescriptionHandler { + peerConnection: any; + getDescription(options: SessionDescriptionHandlerParameters, modifiers: DescriptionModifier[]): Promise; setDescription(sessionDescription: string, options: SessionDescriptionHandlerParameters, modifiers: DescriptionModifier[]): Promise; hasDescription: (contentType: string) => boolean; @@ -128,11 +130,17 @@ export interface Session { on(name: 'accepted', callback: (data: { code: number, response: IncomingResponse }) => void): void; on(name: 'failed' | 'rejected', callback: (response: IncomingResponse, cause: string) => void): void; on(name: 'terminated', callback: (message: IncomingResponse, cause: string) => void): void; - on(name: 'cancel' | string, callback: () => void): void; - on(name: 'replaced', callback: (newSession: Session) => void): void; + on(name: 'cancel' | 'directionChanged' | 'trackAdded' | 'SessionDescriptionHandler-created' | string, callback: () => void): void; + on(name: 'replaced' | 'reinvite', callback: (newSession: Session) => void): void; on(name: 'dtmf', callback: (request: IncomingRequest, dtmf: Session.DTMF) => void): void; on(name: 'muted' | 'unmuted', callback: (data: Session.Muted) => void): void; on(name: 'refer' | 'bye', callback: (request: IncomingRequest) => void): void; + on(name: 'referRequested', callback: (request: ClientContext | ServerContext) => void): void; + + /* these come from the ClientContext that is on the session somehow */ + on(name: 'referAccepted' | 'referRejected' | 'referRequestAccepted' | 'referRequestRejected' | 'referProgress', + callback: (ClientContext: ClientContext) => void): void; + on(name: 'notify', callback: (request: IncomingRequest) => void): void; } export namespace Session { @@ -164,7 +172,10 @@ export namespace Session { }; } - interface DTMF extends Object { } + interface DTMF extends Object { + direction: string | 'incoming'; + tone: any; + } interface Muted { audio?: boolean; @@ -364,27 +375,40 @@ export interface Subscription extends ClientContext { } /* Context */ -export interface Context { +export class Context { ua: UA; method: string; request: OutgoingRequest; localIdentity: NameAddrHeader; remoteIdentity: NameAddrHeader; data: {}; +} + +export class ClientContext extends Context { + cancel(options?: { status_code?: number, reason_phrase?: string }): ClientContext; + + //This exists on all Context, but I cant make it work right on(name: 'progress' | 'accepted' | 'rejected' | 'failed', callback: (response: IncomingMessage, cause: string) => void): void; on(name: 'notify', callback: (request: IncomingRequest) => void): void; on(name: string, callback: () => void): void; + + on(name: 'referAccepted' | 'referRejected' | 'referRequestAccepted' | 'referRequestRejected' | 'referProgress', + callback: (ClientContext: ClientContext) => void): void; } -export interface ClientContext extends Context { - cancel(options?: { status_code?: number, reason_phrase?: string }): ClientContext; -} - -export interface ServerContext extends Context { +export class ServerContext extends Context { progress(options?: Session.ProgressOptions): void; accept(options?: Session.AcceptOptions): void; reject(options?: Session.CommonOptions): void; reply(options?: Session.CommonOptions): void; + + //This exists on all Context, but I cant make it work right + on(name: 'progress' | 'accepted' | 'rejected' | 'failed', callback: (response: IncomingMessage, cause: string) => void): void; + on(name: 'notify', callback: (request: IncomingRequest) => void): void; + on(name: string, callback: () => void): void; + + on(name: 'referRequestAccepted' | 'referRequestRejected' | 'referInviteSent' | 'referProgress' | 'referAccepted' | 'referRejected', + callback: (ServerContext: ServerContext) => void): void; } /* Request */ @@ -398,6 +422,7 @@ export interface OutgoingRequest extends Request { } export interface IncomingResponse extends Request { + reason_phrase: string | 'Ringing'; } export interface IncomingMessage extends Request { From 87bc38c4bda08dc6255e733cf8748dd1a84d0829 Mon Sep 17 00:00:00 2001 From: Samuel Thompson Date: Thu, 29 Nov 2018 14:50:08 -0700 Subject: [PATCH 177/608] oops --- types/sip.js/index.d.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/types/sip.js/index.d.ts b/types/sip.js/index.d.ts index b364074e07..7ca7c2eb98 100644 --- a/types/sip.js/index.d.ts +++ b/types/sip.js/index.d.ts @@ -134,13 +134,12 @@ export interface Session { on(name: 'replaced' | 'reinvite', callback: (newSession: Session) => void): void; on(name: 'dtmf', callback: (request: IncomingRequest, dtmf: Session.DTMF) => void): void; on(name: 'muted' | 'unmuted', callback: (data: Session.Muted) => void): void; - on(name: 'refer' | 'bye', callback: (request: IncomingRequest) => void): void; + on(name: 'refer' | 'bye' | 'notify', callback: (request: IncomingRequest) => void): void; on(name: 'referRequested', callback: (request: ClientContext | ServerContext) => void): void; /* these come from the ClientContext that is on the session somehow */ on(name: 'referAccepted' | 'referRejected' | 'referRequestAccepted' | 'referRequestRejected' | 'referProgress', callback: (ClientContext: ClientContext) => void): void; - on(name: 'notify', callback: (request: IncomingRequest) => void): void; } export namespace Session { @@ -387,7 +386,7 @@ export class Context { export class ClientContext extends Context { cancel(options?: { status_code?: number, reason_phrase?: string }): ClientContext; - //This exists on all Context, but I cant make it work right + // This exists on all Context, but I cant make it work right on(name: 'progress' | 'accepted' | 'rejected' | 'failed', callback: (response: IncomingMessage, cause: string) => void): void; on(name: 'notify', callback: (request: IncomingRequest) => void): void; on(name: string, callback: () => void): void; @@ -402,7 +401,7 @@ export class ServerContext extends Context { reject(options?: Session.CommonOptions): void; reply(options?: Session.CommonOptions): void; - //This exists on all Context, but I cant make it work right + // This exists on all Context, but I cant make it work right on(name: 'progress' | 'accepted' | 'rejected' | 'failed', callback: (response: IncomingMessage, cause: string) => void): void; on(name: 'notify', callback: (request: IncomingRequest) => void): void; on(name: string, callback: () => void): void; From 03ae76d4ec1efd6f1ee51d9f8861ec284b808ed2 Mon Sep 17 00:00:00 2001 From: Hernan Rajchert Date: Thu, 29 Nov 2018 18:54:27 -0300 Subject: [PATCH 178/608] chore: update definitions Update definitions to match those defined by the library author --- types/unist/index.d.ts | 39 ++++++++++++++++++++++++++++++-------- types/unist/unist-tests.ts | 2 -- 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/types/unist/index.d.ts b/types/unist/index.d.ts index 7433ddcc13..389b26e04f 100644 --- a/types/unist/index.d.ts +++ b/types/unist/index.d.ts @@ -1,40 +1,63 @@ // Type definitions for Unist 2.0 -// Project: https://github.com/syntax-tree/unist +// Project: https://github.com/syntax-tree/unist-ts // Definitions by: bizen241 // Jun Lu +// Hernan Rajchert +// Titus Wormer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.4 +// TypeScript Version: 3.1 +export as namespace Unist + +// Syntactic units in unist syntax trees are called nodes. export interface Node { + // The variant of a node. type: string; + + // Information from the ecosystem. data?: Data; + + // Location of a node in a source document. + // Must not be present if a node is generated. position?: Position; } export interface Data { - [key: string]: any; + [key: string]: unknown; } +// Location of a node in a source file. export interface Position { + // Place of the first character of the parsed source region. start: Point; + + // Place of the first character after the parsed source region. end: Point; - /** >= 1 */ - indent?: number[]; + + // Start column at each index (plus start line) in the source region, + // for elements that span multiple lines. + indent: number[]; } +// One place in a source file. export interface Point { - /** >= 1 */ + // Line in a source file (1-indexed integer). line: number; - /** >= 1 */ + + // Column in a source file (1-indexed integer). column: number; - /** >= 0 */ + + // Character in a source file (0-indexed integer). offset?: number; } +// Nodes containing other nodes. export interface Parent extends Node { + // List representing the children of a node. children: Node[]; } +// Nodes containing a value. export interface Literal extends Node { value: any; } diff --git a/types/unist/unist-tests.ts b/types/unist/unist-tests.ts index 3cb69bcc76..9ba2dc06d5 100644 --- a/types/unist/unist-tests.ts +++ b/types/unist/unist-tests.ts @@ -1,5 +1,3 @@ -import * as Unist from 'unist'; - const data: Unist.Data = { string: 'string', number: 1, From 2da1cef96f96157493360f98c607343ed90f6677 Mon Sep 17 00:00:00 2001 From: Hernan Rajchert Date: Thu, 29 Nov 2018 19:40:11 -0300 Subject: [PATCH 179/608] fix: unist ts version --- types/unist/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/unist/index.d.ts b/types/unist/index.d.ts index 389b26e04f..55bea58e47 100644 --- a/types/unist/index.d.ts +++ b/types/unist/index.d.ts @@ -5,7 +5,7 @@ // Hernan Rajchert // Titus Wormer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3.1 +// TypeScript Version: 3.0 export as namespace Unist From 09b6f76746fa597d9bbbfea4cc32806d17349cf8 Mon Sep 17 00:00:00 2001 From: Law Smith Date: Thu, 29 Nov 2018 16:45:28 -0800 Subject: [PATCH 180/608] Added support for params when starting sagaTester. --- types/redux-saga-tester/index.d.ts | 28 +++---- types/redux-saga-tester/package.json | 7 ++ .../redux-saga-tester-tests.ts | 74 ++++++++++++------- 3 files changed, 65 insertions(+), 44 deletions(-) create mode 100644 types/redux-saga-tester/package.json diff --git a/types/redux-saga-tester/index.d.ts b/types/redux-saga-tester/index.d.ts index fda97e494b..5778edf1bd 100644 --- a/types/redux-saga-tester/index.d.ts +++ b/types/redux-saga-tester/index.d.ts @@ -1,27 +1,19 @@ // Type definitions for redux-saga-tester 1.0 // Project: https://github.com/wix/redux-saga-tester#readme -// Definitions by: Ben Lorantfy +// Definitions by: Ben Lorantfy , Law Smith // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.4 + +import {Task} from 'redux-saga'; +import {AnyAction, Middleware, Reducer, ReducersMapObject} from 'redux'; -export interface AnyAction { - type: string; - [key: string]: any; -} -export type Reducer = (state: object, action: AnyAction) => object; -export interface ReducerMap { - [key: string]: Reducer; -} -export type ReduxMiddleware = (options: { dispatch: (action: AnyAction) => void, getState: () => object }) - => (next: (action: AnyAction) => any) - => any; export type SagaFunction = (...args: any[]) => any; -export interface SagaTesterOptions { +export interface SagaTesterOptions { initialState?: StateType; - reducers?: ReducerMap|Reducer; - middlewares?: ReduxMiddleware[]; - combineReducers?: (map: ReducerMap) => Reducer; + reducers?: ReducersMapObject | Reducer; + middlewares?: Middleware[]; + combineReducers?: (map: ReducersMapObject) => Reducer; ignoreReduxActions?: boolean; options?: object; } @@ -32,7 +24,7 @@ export default class SagaTester { /** * Starts execution of the provided saga. */ - start(saga: SagaFunction): void; + start(saga: SagaFunction, ...args: any[]): Task; /** * Dispatches an action to the redux store. diff --git a/types/redux-saga-tester/package.json b/types/redux-saga-tester/package.json new file mode 100644 index 0000000000..8d41143894 --- /dev/null +++ b/types/redux-saga-tester/package.json @@ -0,0 +1,7 @@ +{ + "private": true, + "dependencies": { + "redux": "^3.7.2", + "redux-saga": "^0.15.3" + } +} diff --git a/types/redux-saga-tester/redux-saga-tester-tests.ts b/types/redux-saga-tester/redux-saga-tester-tests.ts index 0dba716533..4cd9c001c9 100644 --- a/types/redux-saga-tester/redux-saga-tester-tests.ts +++ b/types/redux-saga-tester/redux-saga-tester-tests.ts @@ -2,62 +2,79 @@ import SagaTester from 'redux-saga-tester'; // constructor with all options new SagaTester({ - initialState: { - orders: [], - }, - reducers: { - orders: (state, action) => state, - }, - middlewares: [ - ({ dispatch, getState }) => (next) => (action: { type: string }) => { - dispatch({ type: 'BLA' }); - getState(); + initialState: { + orders: [], + }, + reducers: { + orders: (state, action) => state, + }, + middlewares: [ + ({dispatch, getState}) => (next) => (action) => { + dispatch({type: 'BLA'}); + getState(); - return next(action); + return next(action); + }, + ], + ignoreReduxActions: false, + options: { + a: 23, }, - ], - ignoreReduxActions: false, - options: { - a: 23, - }, }); // constructor with function as reducers new SagaTester({ - reducers: (state, action) => state, + reducers: (state = {}, action) => state, +}); + +// constructor with reducer map +new SagaTester({ + reducers: { + a: (state, action) => state, + b: (state, action) => state, + c: (state, action) => state, + } }); // constructor with no options interface MockStateType { - orders: Array<{ name: string }>; + orders: Array<{ name: string }>; } -const sagaTester = new SagaTester({ initialState: { orders: [] }}); + +const sagaTester = new SagaTester({initialState: {orders: []}}); // start function* fakeSaga() { - return 23; + return 23; +} + +function* fakeSagaWithParams(param1: string, param2: number) { + return param1.length > param2 } sagaTester.start(fakeSaga); +sagaTester.start(fakeSagaWithParams, 'foo', 3); // dispatch -sagaTester.dispatch({ type: 'LOAD_ORDERS', orders: [] }); +sagaTester.dispatch({type: 'LOAD_ORDERS', orders: []}); // updateState -sagaTester.updateState({ orders: [] }); +sagaTester.updateState({orders: []}); // getState sagaTester.getState().orders; // waitFor -sagaTester.waitFor('LOAD_ORDERS').then(() => {}); -sagaTester.waitFor('LOAD_ORDERS', true).then(() => {}); +sagaTester.waitFor('LOAD_ORDERS').then(() => { +}); +sagaTester.waitFor('LOAD_ORDERS', true).then(() => { +}); // wasCalled -sagaTester.wasCalled("LOAD_ORDERS"); +sagaTester.wasCalled('LOAD_ORDERS'); // numCalled -sagaTester.numCalled("LOAD_ORDERS") === 1; +sagaTester.numCalled('LOAD_ORDERS') === 1; // getLatestCalledAction sagaTester.getLatestCalledAction().type; @@ -68,3 +85,8 @@ sagaTester.getCalledActions()[0].type; // getCalledActions sagaTester.reset(); sagaTester.reset(true); + +// getState +const state = sagaTester.getState(); +state.orders.length; +state.orders[0].name; From 8d5940c36bdd76ba364fa79271aff55cc8e0fc48 Mon Sep 17 00:00:00 2001 From: Law Smith Date: Thu, 29 Nov 2018 17:50:40 -0800 Subject: [PATCH 181/608] Fixing linter errors. --- types/redux-saga-tester/index.d.ts | 4 ++-- types/redux-saga-tester/redux-saga-tester-tests.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/types/redux-saga-tester/index.d.ts b/types/redux-saga-tester/index.d.ts index 5778edf1bd..d7772626ef 100644 --- a/types/redux-saga-tester/index.d.ts +++ b/types/redux-saga-tester/index.d.ts @@ -4,8 +4,8 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.4 -import {Task} from 'redux-saga'; -import {AnyAction, Middleware, Reducer, ReducersMapObject} from 'redux'; +import { Task } from 'redux-saga'; +import { AnyAction, Middleware, Reducer, ReducersMapObject } from 'redux'; export type SagaFunction = (...args: any[]) => any; diff --git a/types/redux-saga-tester/redux-saga-tester-tests.ts b/types/redux-saga-tester/redux-saga-tester-tests.ts index 4cd9c001c9..48eb490d0a 100644 --- a/types/redux-saga-tester/redux-saga-tester-tests.ts +++ b/types/redux-saga-tester/redux-saga-tester-tests.ts @@ -49,7 +49,7 @@ function* fakeSaga() { } function* fakeSagaWithParams(param1: string, param2: number) { - return param1.length > param2 + return param1.length > param2; } sagaTester.start(fakeSaga); From f68c66518bca72590b23358ca77bcb6e89c04b99 Mon Sep 17 00:00:00 2001 From: Nathan Mackinnon Date: Fri, 30 Nov 2018 13:01:21 +1100 Subject: [PATCH 182/608] fix: adds type definition for color on LegendPayload --- types/recharts/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/recharts/index.d.ts b/types/recharts/index.d.ts index 34e3cbcb88..97bbdbf354 100644 --- a/types/recharts/index.d.ts +++ b/types/recharts/index.d.ts @@ -363,6 +363,7 @@ export interface LegendPayload { value: any; id: any; type: LegendType; + color?: string; } export type BBoxUpdateCallback = (box: { width: number; height: number; }) => void; From 852e463c4ec0ed68f0695082a3329249b5e27750 Mon Sep 17 00:00:00 2001 From: Wong Yong Jie Date: Fri, 30 Nov 2018 10:58:36 +0800 Subject: [PATCH 183/608] oauth2orize: The DecisionParseFunction in decision() is optional. See: https://github.com/jaredhanson/oauth2orize/blob/v1.8.0/lib/middleware/decision.js#L76 --- types/oauth2orize/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/oauth2orize/index.d.ts b/types/oauth2orize/index.d.ts index 798030c7d2..b3a62d01e4 100644 --- a/types/oauth2orize/index.d.ts +++ b/types/oauth2orize/index.d.ts @@ -99,6 +99,7 @@ export class OAuth2Server { decision(options: DecisionOptions, parse: DecisionParseFunction): MiddlewareFunction; decision(parse: DecisionParseFunction): MiddlewareFunction; + decision(): MiddlewareFunction; token(options?: any): MiddlewareFunction; From 322728342726dd171e02d5d2ef0d9c47a96eea65 Mon Sep 17 00:00:00 2001 From: kingdaro Date: Fri, 30 Nov 2018 00:18:46 -0600 Subject: [PATCH 184/608] [react-facebook-login]: export props --- types/react-facebook-login/index.d.ts | 2 +- .../react-facebook-login/react-facebook-login-tests.tsx | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/types/react-facebook-login/index.d.ts b/types/react-facebook-login/index.d.ts index 82672660a8..3ef679141e 100644 --- a/types/react-facebook-login/index.d.ts +++ b/types/react-facebook-login/index.d.ts @@ -6,7 +6,7 @@ import * as React from "react"; -interface ReactFacebookLoginProps { +export interface ReactFacebookLoginProps { appId: string; callback(userInfo: ReactFacebookLoginInfo): void; onFailure?(response: ReactFacebookFailureResponse): void; diff --git a/types/react-facebook-login/react-facebook-login-tests.tsx b/types/react-facebook-login/react-facebook-login-tests.tsx index d7b2ebcde8..2a1fede6dd 100644 --- a/types/react-facebook-login/react-facebook-login-tests.tsx +++ b/types/react-facebook-login/react-facebook-login-tests.tsx @@ -1,7 +1,6 @@ import * as React from 'react'; import * as ReactDOM from 'react-dom'; - -import FacebookLogin, { ReactFacebookLoginInfo, ReactFacebookFailureResponse } from 'react-facebook-login'; +import FacebookLogin, { ReactFacebookFailureResponse, ReactFacebookLoginInfo, ReactFacebookLoginProps } from 'react-facebook-login'; const responseFacebook = (response: ReactFacebookLoginInfo) => { console.log(response); @@ -106,3 +105,9 @@ class MyComponent2 extends React.Component { ); } } + +type FacebookLoginWrapperProps = ReactFacebookLoginProps & { className?: string } + +export const FacebookLoginWrapper = ({ className, ...props}: FacebookLoginWrapperProps) => ( + +) From 9a86c019d97a9846393b34e8e3a1d21f141aca31 Mon Sep 17 00:00:00 2001 From: kingdaro Date: Fri, 30 Nov 2018 00:25:08 -0600 Subject: [PATCH 185/608] missing semicolons --- types/react-facebook-login/react-facebook-login-tests.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/react-facebook-login/react-facebook-login-tests.tsx b/types/react-facebook-login/react-facebook-login-tests.tsx index 2a1fede6dd..ed11a5f4ac 100644 --- a/types/react-facebook-login/react-facebook-login-tests.tsx +++ b/types/react-facebook-login/react-facebook-login-tests.tsx @@ -106,8 +106,8 @@ class MyComponent2 extends React.Component { } } -type FacebookLoginWrapperProps = ReactFacebookLoginProps & { className?: string } +type FacebookLoginWrapperProps = ReactFacebookLoginProps & { className?: string }; export const FacebookLoginWrapper = ({ className, ...props}: FacebookLoginWrapperProps) => ( -) +); From cc1e2c1ac382d742e3ac9a7877236f3ab449a9dd Mon Sep 17 00:00:00 2001 From: kingdaro Date: Fri, 30 Nov 2018 00:35:05 -0600 Subject: [PATCH 186/608] react-facebook-login: remove redundant `string |` --- types/react-facebook-login/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-facebook-login/index.d.ts b/types/react-facebook-login/index.d.ts index 3ef679141e..24df31b5ad 100644 --- a/types/react-facebook-login/index.d.ts +++ b/types/react-facebook-login/index.d.ts @@ -18,7 +18,7 @@ export interface ReactFacebookLoginProps { cssClass?: string; disableMobileRedirect?: boolean; fields?: string; - icon?: string | React.ReactNode; + icon?: React.ReactNode; isDisabled?: boolean; language?: string; onClick?(event: React.MouseEvent): void; From 1626bd3d82d37b2e37a34bd132c4109234c78cbd Mon Sep 17 00:00:00 2001 From: kingdaro Date: Fri, 30 Nov 2018 00:35:26 -0600 Subject: [PATCH 187/608] react-facebook-login: add additional missnig props --- types/react-facebook-login/index.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/types/react-facebook-login/index.d.ts b/types/react-facebook-login/index.d.ts index 24df31b5ad..c8be6e47f0 100644 --- a/types/react-facebook-login/index.d.ts +++ b/types/react-facebook-login/index.d.ts @@ -32,6 +32,10 @@ export interface ReactFacebookLoginProps { xfbml?: boolean; isMobile?: boolean; tag?: Node | React.Component; + returnScopes?: boolean; + state?: string; + authType?: string; + responseType?: string; } export interface ReactFacebookFailureResponse { From 04fb2654db72e7979e44b81ce44386244c6e1859 Mon Sep 17 00:00:00 2001 From: kingdaro Date: Fri, 30 Nov 2018 00:35:52 -0600 Subject: [PATCH 188/608] react-facebook-login: simplify exports --- types/react-facebook-login/index.d.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/types/react-facebook-login/index.d.ts b/types/react-facebook-login/index.d.ts index c8be6e47f0..b56b484476 100644 --- a/types/react-facebook-login/index.d.ts +++ b/types/react-facebook-login/index.d.ts @@ -49,14 +49,12 @@ export interface ReactFacebookLoginInfo { email?: string; } -interface ReactFacebookLoginState { +export interface ReactFacebookLoginState { isSdkLoaded?: boolean; isProcessing?: boolean; } -declare class ReactFacebookLogin extends React.Component< +export default class ReactFacebookLogin extends React.Component< ReactFacebookLoginProps, ReactFacebookLoginState > {} - -export default ReactFacebookLogin; From 7fe4b2a91493a6b1fdbe861029ad7347572c806a Mon Sep 17 00:00:00 2001 From: kingdaro Date: Fri, 30 Nov 2018 00:36:27 -0600 Subject: [PATCH 189/608] add missing space --- types/react-facebook-login/react-facebook-login-tests.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-facebook-login/react-facebook-login-tests.tsx b/types/react-facebook-login/react-facebook-login-tests.tsx index ed11a5f4ac..a52c955596 100644 --- a/types/react-facebook-login/react-facebook-login-tests.tsx +++ b/types/react-facebook-login/react-facebook-login-tests.tsx @@ -108,6 +108,6 @@ class MyComponent2 extends React.Component { type FacebookLoginWrapperProps = ReactFacebookLoginProps & { className?: string }; -export const FacebookLoginWrapper = ({ className, ...props}: FacebookLoginWrapperProps) => ( +export const FacebookLoginWrapper = ({ className, ...props }: FacebookLoginWrapperProps) => ( ); From 544bbdef11e4a15ad8dddae8305fc6f6b5b783a8 Mon Sep 17 00:00:00 2001 From: kingdaro Date: Fri, 30 Nov 2018 00:38:50 -0600 Subject: [PATCH 190/608] bump version --- types/react-facebook-login/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-facebook-login/index.d.ts b/types/react-facebook-login/index.d.ts index b56b484476..419761974e 100644 --- a/types/react-facebook-login/index.d.ts +++ b/types/react-facebook-login/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-facebook-login 3.6 +// Type definitions for react-facebook-login 4.1 // Project: https://github.com/keppelen/react-facebook-login // Definitions by: Alexandre Paré , Jan Karres // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped From 0b111f9e2bbccd414a2c522b2d7ffba65bda199a Mon Sep 17 00:00:00 2001 From: Adam <23192421+shenphen@users.noreply.github.com> Date: Fri, 30 Nov 2018 08:14:29 +0100 Subject: [PATCH 191/608] Update index.d.ts --- types/cropperjs/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/cropperjs/index.d.ts b/types/cropperjs/index.d.ts index d7be9dbc39..d444c20705 100644 --- a/types/cropperjs/index.d.ts +++ b/types/cropperjs/index.d.ts @@ -426,9 +426,9 @@ declare class cropperjs { /** * Replace the image's src and rebuild the cropper. * @param url A new image url - * @param hasSameSize If the new image has the same size with the old one, then it will not rebuilt the cropper and only update the urls of all related images. + * @param hasSameSize If the new image has the same size with the old one, then it will not rebuilt the cropper and only update the urls of all related images. (Default: false) */ - replace(url: string, hasSameSize: boolean = false): void; + replace(url: string, hasSameSize?: boolean): void; /** * Enable (unfreeze) the cropper. From 42675056c5f5b3101a43b111931c825c65d7dcb3 Mon Sep 17 00:00:00 2001 From: Daniel Rose Date: Wed, 8 Aug 2018 09:00:40 +0200 Subject: [PATCH 192/608] Adds type definitions for packages: sc-auth, socketcluster, socketcluster-client, socketcluster-server, expirymanager, fleximap, sc-broker, sc-broker-cluster, sc-channel --- types/expirymanager/expirymanager-tests.ts | 19 ++ types/expirymanager/index.d.ts | 25 ++ types/expirymanager/tsconfig.json | 23 ++ types/expirymanager/tslint.json | 3 + types/fleximap/fleximap-tests.ts | 27 ++ types/fleximap/index.d.ts | 38 +++ types/fleximap/tsconfig.json | 23 ++ types/fleximap/tslint.json | 6 + types/sc-auth/index.d.ts | 19 ++ types/sc-auth/sc-auth-tests.ts | 102 ++++++ types/sc-auth/tsconfig.json | 23 ++ types/sc-auth/tslint.json | 1 + types/sc-broker-cluster/clientcluster.d.ts | 10 + types/sc-broker-cluster/index.d.ts | 160 +++++++++ .../sc-broker-cluster-tests.ts | 29 ++ types/sc-broker-cluster/scbroker.d.ts | 3 + types/sc-broker-cluster/tsconfig.json | 25 ++ types/sc-broker-cluster/tslint.json | 3 + types/sc-broker/index.d.ts | 165 +++++++++ types/sc-broker/sc-broker-tests.ts | 58 ++++ types/sc-broker/scbroker.d.ts | 32 ++ types/sc-broker/tsconfig.json | 24 ++ types/sc-broker/tslint.json | 3 + types/sc-channel/index.d.ts | 45 +++ types/sc-channel/sc-channel-tests.ts | 33 ++ types/sc-channel/tsconfig.json | 23 ++ types/sc-channel/tslint.json | 3 + types/socketcluster-client/index.d.ts | 23 ++ .../lib/scclientsocket.d.ts | 251 ++++++++++++++ .../socketcluster-client-tests.ts | 75 +++++ types/socketcluster-client/tsconfig.json | 24 ++ types/socketcluster-client/tslint.json | 3 + types/socketcluster-server/index.d.ts | 15 + types/socketcluster-server/scserver.d.ts | 315 ++++++++++++++++++ .../socketcluster-server/scserversocket.d.ts | 43 +++ .../socketcluster-server-tests.ts | 39 +++ types/socketcluster-server/tsconfig.json | 25 ++ types/socketcluster-server/tslint.json | 3 + types/socketcluster/fsutil.d.ts | 11 + types/socketcluster/index.d.ts | 84 +++++ types/socketcluster/scbroker.d.ts | 3 + types/socketcluster/scworker.d.ts | 63 ++++ types/socketcluster/socketcluster-tests.ts | 76 +++++ types/socketcluster/tsconfig.json | 26 ++ types/socketcluster/tslint.json | 3 + 45 files changed, 2007 insertions(+) create mode 100644 types/expirymanager/expirymanager-tests.ts create mode 100644 types/expirymanager/index.d.ts create mode 100644 types/expirymanager/tsconfig.json create mode 100644 types/expirymanager/tslint.json create mode 100644 types/fleximap/fleximap-tests.ts create mode 100644 types/fleximap/index.d.ts create mode 100644 types/fleximap/tsconfig.json create mode 100644 types/fleximap/tslint.json create mode 100644 types/sc-auth/index.d.ts create mode 100644 types/sc-auth/sc-auth-tests.ts create mode 100644 types/sc-auth/tsconfig.json create mode 100644 types/sc-auth/tslint.json create mode 100644 types/sc-broker-cluster/clientcluster.d.ts create mode 100644 types/sc-broker-cluster/index.d.ts create mode 100644 types/sc-broker-cluster/sc-broker-cluster-tests.ts create mode 100644 types/sc-broker-cluster/scbroker.d.ts create mode 100644 types/sc-broker-cluster/tsconfig.json create mode 100644 types/sc-broker-cluster/tslint.json create mode 100644 types/sc-broker/index.d.ts create mode 100644 types/sc-broker/sc-broker-tests.ts create mode 100644 types/sc-broker/scbroker.d.ts create mode 100644 types/sc-broker/tsconfig.json create mode 100644 types/sc-broker/tslint.json create mode 100644 types/sc-channel/index.d.ts create mode 100644 types/sc-channel/sc-channel-tests.ts create mode 100644 types/sc-channel/tsconfig.json create mode 100644 types/sc-channel/tslint.json create mode 100644 types/socketcluster-client/index.d.ts create mode 100644 types/socketcluster-client/lib/scclientsocket.d.ts create mode 100644 types/socketcluster-client/socketcluster-client-tests.ts create mode 100644 types/socketcluster-client/tsconfig.json create mode 100644 types/socketcluster-client/tslint.json create mode 100644 types/socketcluster-server/index.d.ts create mode 100644 types/socketcluster-server/scserver.d.ts create mode 100644 types/socketcluster-server/scserversocket.d.ts create mode 100644 types/socketcluster-server/socketcluster-server-tests.ts create mode 100644 types/socketcluster-server/tsconfig.json create mode 100644 types/socketcluster-server/tslint.json create mode 100644 types/socketcluster/fsutil.d.ts create mode 100644 types/socketcluster/index.d.ts create mode 100644 types/socketcluster/scbroker.d.ts create mode 100644 types/socketcluster/scworker.d.ts create mode 100644 types/socketcluster/socketcluster-tests.ts create mode 100644 types/socketcluster/tsconfig.json create mode 100644 types/socketcluster/tslint.json diff --git a/types/expirymanager/expirymanager-tests.ts b/types/expirymanager/expirymanager-tests.ts new file mode 100644 index 0000000000..2206b2673e --- /dev/null +++ b/types/expirymanager/expirymanager-tests.ts @@ -0,0 +1,19 @@ +import { ExpiryManager } from "expirymanager"; + +const expiryManager = new ExpiryManager(); + +const keys = ['1', '2']; + +expiryManager.expire(keys, 1); + +expiryManager.unexpire(keys); + +const expiry: number = expiryManager.getExpiry(keys[0]); + +let expiredKeys = expiryManager.getExpiredKeys(); +expiredKeys = expiryManager.getExpiredKeys(expiryManager.now()); + +expiredKeys = expiryManager.extractExpiredKeys(); +expiredKeys = expiryManager.extractExpiredKeys(expiryManager.now()); + +expiryManager.clear(); diff --git a/types/expirymanager/index.d.ts b/types/expirymanager/index.d.ts new file mode 100644 index 0000000000..c192da7af7 --- /dev/null +++ b/types/expirymanager/index.d.ts @@ -0,0 +1,25 @@ +// Type definitions for expirymanager 0.9 +// Project: https://github.com/SocketCluster/expirymanager +// Definitions by: Daniel Rose +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export type Key = any; +export type Keys = Key[]; + +export class ExpiryManager { + constructor(); + + now(): number; + + expire(keys: Keys, seconds: number): void; + unexpire(keys: Keys): void; + + getExpiry(key: Key): number; + + getKeysByExpiry(expiry: number): Keys; + + getExpiredKeys(time?: number): Keys; + extractExpiredKeys(time?: number): Keys; + + clear(): void; +} diff --git a/types/expirymanager/tsconfig.json b/types/expirymanager/tsconfig.json new file mode 100644 index 0000000000..094c4e8c8d --- /dev/null +++ b/types/expirymanager/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "expirymanager-tests.ts" + ] +} diff --git a/types/expirymanager/tslint.json b/types/expirymanager/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/expirymanager/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/fleximap/fleximap-tests.ts b/types/fleximap/fleximap-tests.ts new file mode 100644 index 0000000000..4ca0181662 --- /dev/null +++ b/types/fleximap/fleximap-tests.ts @@ -0,0 +1,27 @@ +import { FlexiMap } from "fleximap"; + +let flexiMap = new FlexiMap(); +flexiMap = new FlexiMap({ arr: [] }); +flexiMap = new FlexiMap([{ arr: [] }, { obj: {} }]); + +flexiMap.set('keyA', {arr: [], obj: {}}); +let result = flexiMap.get(['keyA', 'arr']); + +flexiMap.add(['keyB1', 'keyB2', 'keyB3'], 123); +result = flexiMap.get(['keyB1', 'keyB2']); + +const arr = []; +arr[5] = 'Hello world'; + +flexiMap.set(['keyC1', 'keyC2'], arr); +result = flexiMap.get(['keyC1', 'keyC2']); + +flexiMap.set(['itemsA', 0], 'hello'); +flexiMap.set(['itemsA', 2], 'world'); +flexiMap.remove(['itemsA', 0]); + +flexiMap.set(['itemsB', 0], 'a'); +flexiMap.set(['itemsB', 1], 'b'); +flexiMap.set(['itemsB', 2], 'c'); +let splicedItems = flexiMap.splice(['itemsB'], 1, 1); +splicedItems = flexiMap.splice(['itemsB'], 1, 0, 'b2'); diff --git a/types/fleximap/index.d.ts b/types/fleximap/index.d.ts new file mode 100644 index 0000000000..9bce180c66 --- /dev/null +++ b/types/fleximap/index.d.ts @@ -0,0 +1,38 @@ +// Type definitions for fleximap 0.9.10 +// Project: https://github.com/SocketCluster/fleximap +// Definitions by: Daniel Rose +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +export type KeyChain = any; + +export class FlexiMap { + constructor(object?: any[] | object); + + get(keyChain: KeyChain): any; + getRange(keyChain: KeyChain, fromIndex: number, toIndex: number): any; + getRaw(keyChain: KeyChain): any; + getAll(): any[] | object; + + count(keyChain: KeyChain): number; + + hasImmediateKey(key: string): boolean; + hasKey(keyChain: KeyChain): boolean; + hasType(keyChain: KeyChain, type: any): boolean; + hasValue(keyChain: KeyChain, value: any): boolean; + hasObject(keyChain: KeyChain, object: object): boolean; + + set(keyChain: KeyChain, value: any): any; + + add(keyChain: KeyChain, value: any): number; + + concat(keyChain: KeyChain, value: any): any; + + remove(keyChain: KeyChain): any; + removeRange(keyChain: KeyChain, fromIndex: number, toIndex: number): any[]; + removeAll(): void; + + splice(keyChain: KeyChain, index: number, count: number, ...items: any[]): any[]; + + pop(keyChain: KeyChain): any[]; +} diff --git a/types/fleximap/tsconfig.json b/types/fleximap/tsconfig.json new file mode 100644 index 0000000000..710fa81c96 --- /dev/null +++ b/types/fleximap/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "fleximap-tests.ts" + ] +} diff --git a/types/fleximap/tslint.json b/types/fleximap/tslint.json new file mode 100644 index 0000000000..65c83fb1e3 --- /dev/null +++ b/types/fleximap/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "dt-header": false + } +} diff --git a/types/sc-auth/index.d.ts b/types/sc-auth/index.d.ts new file mode 100644 index 0000000000..84f92bf674 --- /dev/null +++ b/types/sc-auth/index.d.ts @@ -0,0 +1,19 @@ +// Type definitions for sc-auth 5.0 +// Project: https://github.com/SocketCluster/sc-auth +// Definitions by: Daniel Rose +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +import { VerifyOptions, VerifyCallback, Secret, SignCallback, SignOptions } from "jsonwebtoken"; + +export interface SCAuthEngine { + verifyToken(signedToken: string, key: string | Buffer, options?: VerifyOptions, callback?: VerifyCallback): void; + signToken(token: string | object | Buffer, key: Secret, options?: SignOptions, callback?: SignCallback): void; +} + +export class AuthEngine implements SCAuthEngine { + constructor(); + + verifyToken(signedToken: string, key: string | Buffer, options?: VerifyOptions, callback?: VerifyCallback): void; + signToken(token: string | object | Buffer, key: Secret, options?: SignOptions, callback?: SignCallback): void; +} diff --git a/types/sc-auth/sc-auth-tests.ts b/types/sc-auth/sc-auth-tests.ts new file mode 100644 index 0000000000..4fa57d3391 --- /dev/null +++ b/types/sc-auth/sc-auth-tests.ts @@ -0,0 +1,102 @@ +/** + * This mostly delegates to jwt, so using its tests as base + */ + +import scAuth = require("sc-auth"); +import fs = require("fs"); + +let signedToken = ""; +let cert: Buffer; + +interface TestObject { + foo: string; +} + +const testObject = { foo: "bar" }; + +const authEngine = new scAuth.AuthEngine(); + +// sign with default (HMAC SHA256) +authEngine.signToken(testObject, "shhhhh"); + +// sign with default (HMAC SHA256) and single audience +authEngine.signToken(testObject, "shhhhh", { audience: "theAudience" }); + +// sign with default (HMAC SHA256) and multiple audiences +authEngine.signToken(testObject, "shhhhh", { + audience: ["audience1", "audience2"] +}); + +// sign with default (HMAC SHA256) and a keyid +authEngine.signToken(testObject, "shhhhh", { keyid: "theKeyId" }); + +// sign with RSA SHA256 +cert = fs.readFileSync("private.key"); // get private key +authEngine.signToken(testObject, cert, { algorithm: "RS256" }); + +// sign with encrypted RSA SHA256 private key (only PEM encoding is supported) +const privKey: Buffer = fs.readFileSync("encrypted_private.key"); // get private key +const secret = { key: privKey.toString(), passphrase: "keypwd" }; +authEngine.signToken(testObject, secret, { algorithm: "RS256" }); // the algorithm option is mandatory in this case + +// sign asynchronously +authEngine.signToken(testObject, cert, { algorithm: "RS256" }, (err, token) => { + signedToken = token; +}); + +// verify a token symmetric +authEngine.verifyToken(signedToken, "shhhhh", {}, (err, decoded) => { + const result = decoded as TestObject; + + console.log(result.foo); // bar +}); + +// use external time for verifying +authEngine.verifyToken(signedToken, "shhhhh", { clockTimestamp: 1 }, (err, decoded) => { + const result = decoded as TestObject; + + console.log(result.foo); // bar +}); + +// invalid token +authEngine.verifyToken(signedToken, "wrong-secret", {}, (err, decoded) => { + console.log(err); + + // decoded undefined +}); + +// verify a token asymmetric +cert = fs.readFileSync("public.pem"); // get public key +authEngine.verifyToken(signedToken, cert, {}, (err, decoded) => { + const result = decoded as TestObject; + + console.log(result.foo); // bar +}); + +// verify audience +cert = fs.readFileSync("public.pem"); // get public key +authEngine.verifyToken(signedToken, cert, { audience: "urn:foo" }, (err, decoded) => { + // if audience mismatch, err == invalid audience + console.log(err); +}); + +// verify issuer +cert = fs.readFileSync("public.pem"); // get public key +authEngine.verifyToken(signedToken, cert, { audience: "urn:foo", issuer: "urn:issuer" }, (err, decoded) => { + // if issuer mismatch, err == invalid issuer + console.log(err); +}); + +// verify algorithm +cert = fs.readFileSync("public.pem"); // get public key +authEngine.verifyToken(signedToken, cert, { algorithms: ["RS256"] }, (err, decoded) => { + // if algorithm mismatch, err == invalid algorithm + console.log(err); +}); + +// verify without expiration check +cert = fs.readFileSync("public.pem"); // get public key +authEngine.verifyToken(signedToken, cert, { ignoreExpiration: true }, (err, decoded) => { + // if ignoreExpration == false and token is expired, err == expired token + console.log(err); +}); diff --git a/types/sc-auth/tsconfig.json b/types/sc-auth/tsconfig.json new file mode 100644 index 0000000000..5c8e3a1e19 --- /dev/null +++ b/types/sc-auth/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "sc-auth-tests.ts" + ] +} diff --git a/types/sc-auth/tslint.json b/types/sc-auth/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/sc-auth/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/sc-broker-cluster/clientcluster.d.ts b/types/sc-broker-cluster/clientcluster.d.ts new file mode 100644 index 0000000000..f2234df6ab --- /dev/null +++ b/types/sc-broker-cluster/clientcluster.d.ts @@ -0,0 +1,10 @@ +import { EventEmitter } from "events"; +import { SCBrokerClient } from "sc-broker"; +import { mapperFunction } from "."; + +export class ClientCluster extends EventEmitter { + constructor(clients: SCBrokerClient[]); + + setMapper(mapper: mapperFunction): void; + getMapper(): mapperFunction; +} diff --git a/types/sc-broker-cluster/index.d.ts b/types/sc-broker-cluster/index.d.ts new file mode 100644 index 0000000000..9314acda82 --- /dev/null +++ b/types/sc-broker-cluster/index.d.ts @@ -0,0 +1,160 @@ +// Type definitions for sc-broker-cluster 6.1 +// Project: https://github.com/SocketCluster/sc-broker-cluster +// Definitions by: Daniel Rose +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +import { SCServerSocket, SCServer } from "socketcluster-server"; +import { BrokerStartInfo, BrokerExitInfo } from "socketcluster"; +import { SpliceOptions, QueryOptions } from "sc-broker"; +import { SCChannel } from "sc-channel"; +import { EventEmitter } from "events"; +import { AsyncResultArrayCallback } from "async"; +import { KeyChain, FlexiMap } from "fleximap"; +import { Keys } from "expirymanager"; +import { ClientCluster } from "./clientcluster"; + +export class AbstractDataClient extends EventEmitter { + constructor(dataClient: ClientCluster); + + set(keyChain: KeyChain, value: any, getValue?: boolean, callback?: (err?: Error) => void): void; + set(keyChain: KeyChain, value: any, callback?: (err?: Error) => void): void; + + expire(keys: Keys, seconds: number, callback?: (err?: Error) => void): void; + unexpire(keys: Keys, callback?: (err?: Error) => void): void; + + add(keyChain: KeyChain, value: any, getValue?: boolean, callback?: (err?: Error) => void): void; + add(keyChain: KeyChain, value: any, callback?: (err?: Error) => void): void; + + get(keyChain: KeyChain, callback: (err: Error | null, value: any) => void): void; + + getRange(keyChain: KeyChain, fromIndex: number, toIndex: number, callback: (err: Error | null, value: any) => void): void; + getRange(keyChain: KeyChain, fromIndex: number, callback: (err: Error | null, value: any) => void): void; + + getAll(callback: (err: Error | null, value: any[] | object) => void): void; + + count(keyChain: KeyChain, callback: (err: Error | null, value: number) => void): void; + + remove(keyChain: KeyChain, getValue?: boolean, callback?: (err?: Error) => void): void; + remove(keyChain: KeyChain, callback?: (err?: Error) => void): void; + + removeRange(keyChain: KeyChain, fromIndex: number, toIndex?: number, getValue?: boolean, callback?: (err?: Error) => void): void; + removeRange(keyChain: KeyChain, fromIndex: number, toIndex?: number, callback?: (err?: Error) => void): void; + removeRange(keyChain: KeyChain, fromIndex: number, callback?: (err?: Error) => void): void; + + removeAll(callback?: (err: Error) => void): void; + + splice(keyChain: KeyChain, options?: SpliceOptions, callback?: (err?: Error) => void): void; + splice(keyChain: KeyChain, callback?: (err?: Error) => void): void; + + pop(keyChain: KeyChain, callback: (err: Error | null, data: any) => void): void; + + hasKey(keyChain: KeyChain, callback: (err: Error | null, data: boolean) => void): void; + + extractKeys(keyChain: KeyChain): string[]; + + extractValues(keyChain: KeyChain): any[]; + + exec(query: (datamap: FlexiMap) => void, options?: QueryOptions, callback?: (err: Error | null, data: any) => void): void; + exec(query: (datamap: FlexiMap) => void, callback: (err: Error | null, data: any) => void): void; +} + +export type handlerFunction = (data: any) => void; + +export type mapperFunction = (keyChain: KeyChain, method: string, clientIds: number[]) => number | number[]; + +/** + * The exchange object is a top-level SCBrokerClient which lets you publish events and manipulate data within your brokers - It represents a cluster of 1 or more brokers. + */ +export class SCExchange extends AbstractDataClient { + constructor(privateClientCluster: ClientCluster, publicClientCluster: ClientCluster, ioClusterClient: Client); + + send(data: any, mapIndex: number | string | string[] | null, callback?: (err?: Error) => void): void; + + publish(channelName: string, data: any, callback: (err?: Error) => void): void; + + subscribe(channelName: string): SCChannel; + unsubscribe(channelName: string): void; + + channel(channelName: string): SCChannel; + destroyChannel(channelName: string): void; + + subscriptions(includePending?: boolean): string[]; + isSubscribed(channelName: string, includePending?: boolean): boolean; + + watch(channelName: string, handler: handlerFunction): void; + unwatch(channelName: string, handler?: handlerFunction): void; + watchers(channelName: string): handlerFunction[]; + + setMapper(mapper: mapperFunction): void; + getMapper(): mapperFunction; + + map(keyChain: KeyChain, method: string): { type: string; targets: Client[] }; + + destroy(): void; +} + +export interface SCBrokerClusterServerOptions { + brokers: string[]; + debug?: boolean; + inspect?: boolean; + instanceId?: string; + secretKey?: string; + expiryAccuracy?: number; + downgradeToUser: number | string; + appBrokerControllerPath?: string; + processTermTimeout?: number; + ipcAckTimeout?: number; + brokerOptions?: SCServer.SCServerOptions; +} + +export class Server extends EventEmitter { + constructor(options: SCBrokerClusterServerOptions); + + on(event: "brokerStart", listener: (brokerInfo: BrokerStartInfo) => void): this; + on(event: "brokerExit", listener: (brokerInfo: BrokerExitInfo) => void): this; + on(event: "brokerMessage", listener: (brokerId: string, data: any, callback: (err: Error | null, data: any) => void) => void): this; + on(event: "ready", listener: () => void): this; + on(event: "error", listener: (err?: Error) => void): this; + + sendToBroker(brokerId: string, data: any, callback: (err: Error | null, data: any) => void): void; + killBrokers(): void; + destroy(): void; +} + +export interface SCBrokerClusterClientOptions { + brokers: string[]; + secretKey?: string; + pubSubBatchDuration?: number; + connectRetryErrorThreshold: number; +} + +export interface MessagePacket { + channel: string; + data: any; +} + +export class Client extends EventEmitter { + constructor(options: SCBrokerClusterClientOptions); + + exchange(): SCExchange; + + options: SCBrokerClusterClientOptions; + + on(event: "error", listener: (err?: Error) => void): this; + on(event: "warning", listener: (warning?: Error) => void): this; + on(event: "ready", listener: () => void): this; + on(event: "message", listener: (packet: MessagePacket) => void): this; + + destroy(callback: AsyncResultArrayCallback): void; + + subscribe(channel: string, callback: (err?: Error) => void): void; + unsubscribe(channel: string, callback: () => void): void; + unsubscribeAll(callback: () => void): void; + isSubscribed(channel: string, includePending: boolean): boolean; + + subscribeSocket(socket: SCServerSocket, channel: string, callback?: (err?: Error) => void): void; + unsubscribeSocket(socket: SCServerSocket, channel: string, callback?: () => void): void; + + setSCServer(scServer: SCServer): void; +} diff --git a/types/sc-broker-cluster/sc-broker-cluster-tests.ts b/types/sc-broker-cluster/sc-broker-cluster-tests.ts new file mode 100644 index 0000000000..0f5c274248 --- /dev/null +++ b/types/sc-broker-cluster/sc-broker-cluster-tests.ts @@ -0,0 +1,29 @@ +import { Client } from "sc-broker-cluster"; +import { SCServer, SCServerSocket } from "socketcluster-server"; +import WebSocket = require("ws"); + +const client = new Client({ + brokers: [], + secretKey: "secretKey", + pubSubBatchDuration: 100, + connectRetryErrorThreshold: 5 +}); + +client.on("error", err => {}); +client.on("warning", err => {}); + +const exchange = client.exchange(); + +const scServer = new SCServer(); +client.setSCServer(scServer); + +client.once("ready", () => {}); + +const wsSocket = new WebSocket("address"); +const socket = new SCServerSocket("id", scServer, wsSocket); +client.subscribeSocket(socket, "channelName", err => {}); + +client.unsubscribeSocket(socket, "channelName"); + +const data: any = {}; +exchange.publish("channelName", data, err => {}); diff --git a/types/sc-broker-cluster/scbroker.d.ts b/types/sc-broker-cluster/scbroker.d.ts new file mode 100644 index 0000000000..a7ddb7db87 --- /dev/null +++ b/types/sc-broker-cluster/scbroker.d.ts @@ -0,0 +1,3 @@ +import SCBroker = require("sc-broker/scbroker"); + +export = SCBroker; diff --git a/types/sc-broker-cluster/tsconfig.json b/types/sc-broker-cluster/tsconfig.json new file mode 100644 index 0000000000..8ace8fc9dc --- /dev/null +++ b/types/sc-broker-cluster/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "clientcluster.d.ts", + "scbroker.d.ts", + "sc-broker-cluster-tests.ts" + ] +} diff --git a/types/sc-broker-cluster/tslint.json b/types/sc-broker-cluster/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/sc-broker-cluster/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/sc-broker/index.d.ts b/types/sc-broker/index.d.ts new file mode 100644 index 0000000000..ccb83e880e --- /dev/null +++ b/types/sc-broker/index.d.ts @@ -0,0 +1,165 @@ +// Type definitions for sc-broker 5.1 +// Project: https://github.com/SocketCluster/sc-broker +// Definitions by: Daniel Rose +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +import { SCServer } from "socketcluster-server"; +import { WorkerExitInfo } from "socketcluster"; +import { EventEmitter } from "events"; +import { KeyChain, FlexiMap } from "fleximap"; +import { Keys, Key } from "expirymanager"; + +export interface SCBrokerServerOptions { + id?: string; + instanceId?: string; + debug?: boolean; + inspect?: boolean; + socketPath?: string; + port?: number; + expiryAccuracy?: number; + downgradeToUser: number | string; + brokerControllerPath?: string; + processTermTimeout?: number; + ipcAckTimeout?: number; + secretKey?: string; + brokerOptions?: SCServer.SCServerOptions; +} + +export interface SCBrokerServer extends EventEmitter { + options: SCBrokerServerOptions; + socketPath?: string; + port?: number; + ipcAckTimeout: number; + + on(event: "error", listener: (err?: Error) => void): this; + on(event: "brokerMessage", listener: (brokerId: string, data: any, callback: (err: Error | null, data: any) => void) => void): this; + on(event: "ready", listener: (data: any) => void): this; + on(event: "exit", listener: (data: WorkerExitInfo) => void): this; + + sendToBroker(data: any, callback?: (err: Error | null, data: any, brokerId: string) => void): void; +} + +export function createServer(options?: SCBrokerServerOptions): SCBrokerServer; + +export interface AutoReconnectOptions { + initialDelay?: number; + randomness?: number; + multiplier?: number; + maxDelay?: number; +} + +export interface SCBrokerClientOptions { + secretKey?: string; + timeout?: number; + socketPath?: string; + port?: number; + host?: string; + autoReconnect?: boolean; + autoReconnectOptions?: AutoReconnectOptions; + connectRetryErrorThreshold?: number; + pubSubBatchDuration?: number; +} + +export interface QueryOptions { + baseKey?: KeyChain; + noAck?: boolean; + data?: any; +} + +export interface SpliceOptions { + index?: number; + count?: number; + items?: any[]; + getValue?: boolean; + noAck?: boolean; +} + +export interface SCBrokerClient extends EventEmitter { + readonly CONNECTED: "connected"; + readonly CONNECTING: "connecting"; + readonly DISCONNECTED: "disconnected"; + + socketPath?: string; + port?: number; + host?: string; + autoReconnect: boolean; + autoReconnectOptions?: AutoReconnectOptions; + connectRetryErrorThreshold: number; + state: "connected" | "connecting" | "disconnected"; + connectAttempts: number; + pendingReconnect: boolean; + pendingReconnectTimeout: number | null; + + on(event: "error", listener: (err?: Error) => void): this; + on(event: "warning", listener: (warning?: Error) => void): this; + on(event: "ready", listener: (data: any) => void): this; + on(event: "message", listener: (channel: string, data: any) => void): this; + on(event: "subscribeFail", listener: (err: Error | null, channel: string) => void): this; + on(event: "subscribe", listener: (channel: string) => void): this; + on(event: "unsubscribe", listener: () => void): this; + + isConnected(): boolean; + + subscribe(channel: string, ackCallback: (err?: Error) => void, force?: boolean): void; + unsubscribe(channel: string, ackCallback: (err?: Error) => void): void; + + subscriptions(includePending?: boolean): string[]; + isSubscribed(channel: string, includePending?: boolean): boolean; + + publish(channel: string, data: any, callback: (err?: Error) => void): void; + + send(data: any, callback: (err?: Error) => void): void; + + set(keyChain: KeyChain, value: any, getValue?: boolean, callback?: (err?: Error) => void): void; + set(keyChain: KeyChain, value: any, callback?: (err?: Error) => void): void; + + expire(keys: Keys, seconds: number, callback?: (err?: Error) => void): void; + unexpire(keys: Keys, callback?: (err?: Error) => void): void; + getExpiry(key: Key, callback?: (err?: Error) => void): number; + + add(keyChain: KeyChain, value: any, getValue?: boolean, callback?: (err?: Error) => void): void; + add(keyChain: KeyChain, value: any, callback?: (err?: Error) => void): void; + + concat(keyChain: KeyChain, value: any, getValue?: boolean, callback?: (err?: Error) => void): void; + concat(keyChain: KeyChain, value: any, callback?: (err?: Error) => void): void; + + get(keyChain: KeyChain, callback: (err: Error | null, value: any) => void): void; + + getRange(keyChain: KeyChain, fromIndex: number, toIndex: number, callback: (err: Error | null, value: any) => void): void; + getRange(keyChain: KeyChain, fromIndex: number, callback: (err: Error | null, value: any) => void): void; + + getAll(callback: (err: Error | null, value: any[] | object) => void): void; + + count(keyChain: KeyChain, callback: (err: Error | null, value: number) => void): void; + + exec(query: (datamap: FlexiMap) => void, options?: QueryOptions, callback?: (err: Error | null, data: any) => void): void; + exec(query: (datamap: FlexiMap) => void, callback: (err: Error | null, data: any) => void): void; + + query(query: (datamap: FlexiMap) => void, data?: any, callback?: (err: Error | null, data: any) => void): void; + query(query: (datamap: FlexiMap) => void, callback: (err: Error | null, data: any) => void): void; + + remove(keyChain: KeyChain, getValue?: boolean, callback?: (err?: Error) => void): void; + remove(keyChain: KeyChain, callback?: (err?: Error) => void): void; + + removeRange(keyChain: KeyChain, fromIndex: number, toIndex?: number, getValue?: boolean, callback?: (err?: Error) => void): void; + removeRange(keyChain: KeyChain, fromIndex: number, toIndex?: number, callback?: (err?: Error) => void): void; + removeRange(keyChain: KeyChain, fromIndex: number, callback?: (err?: Error) => void): void; + + removeAll(callback?: (err: Error) => void): void; + + splice(keyChain: KeyChain, options?: SpliceOptions, callback?: (err?: Error) => void): void; + splice(keyChain: KeyChain, callback?: (err?: Error) => void): void; + + pop(keyChain: KeyChain, callback: (err: Error | null, data: any) => void): void; + + hasKey(keyChain: KeyChain, callback: (err: Error | null, data: boolean) => void): void; + + extractKeys(keyChain: KeyChain): string[]; + + extractValues(keyChain: KeyChain): any[]; + + end(callback: (err?: Error) => void): void; +} + +export function createClient(options?: SCBrokerClientOptions): SCBrokerClient; diff --git a/types/sc-broker/sc-broker-tests.ts b/types/sc-broker/sc-broker-tests.ts new file mode 100644 index 0000000000..201ff10a27 --- /dev/null +++ b/types/sc-broker/sc-broker-tests.ts @@ -0,0 +1,58 @@ +import { SCServer, SCServerSocket } from "socketcluster-server"; +import SCBroker = require("sc-broker/scbroker"); +import { FlexiMap } from "fleximap"; +import { ExpiryManager } from "expirymanager"; + +//////////////////////////////////////////////////// +/// SCBroker tests +//////////////////////////////////////////////////// + +const options: SCServer.SCServerOptions = { port: 80 }; + +let scBroker = new SCBroker(); +scBroker = new SCBroker(options); +scBroker.options = { environment: "prod" }; + +const id: number = scBroker.id; +const instanceId: number = scBroker.instanceId; +const dataMap: FlexiMap = scBroker.dataMap; +const dataExpirer: ExpiryManager = scBroker.dataExpirer; +const subscriptions = scBroker.subscriptions; + +const socket: SCServerSocket = subscriptions[1]["test"]; + +scBroker.on("subscribe", channel => { + const subscribeChannel: string = channel; +}); +scBroker.on("unsubscribe", channel => { + const unsubscribeChannel: string = channel; +}); +scBroker.on("publish", (channel, data) => { + const publishChannel: string = channel; + const publishData: any = data; +}); +scBroker.on("masterMessage", (data, masterMessageResponse) => { + const masterMessageData: any = data; + masterMessageResponse(null, "test"); + masterMessageResponse(new Error(), null); +}); + +scBroker.publish("testChannel", 123); + +scBroker.exec(dataMap => { + dataMap.set(["main", "message"], "Message"); + return dataMap.get(["main"]); +}); + +scBroker.sendToMaster("data"); +scBroker.sendToMaster(123, (err, response) => { + if (!err) { + const answer = response; + } +}); + +class MyBroker extends SCBroker { + run() { + this.on("subscribe", channel => {}); + } +} diff --git a/types/sc-broker/scbroker.d.ts b/types/sc-broker/scbroker.d.ts new file mode 100644 index 0000000000..057b983adf --- /dev/null +++ b/types/sc-broker/scbroker.d.ts @@ -0,0 +1,32 @@ +import { EventEmitter } from "events"; +import { SCServer, SCServerSocket } from "socketcluster-server"; +import { FlexiMap, KeyChain } from "fleximap"; +import { ExpiryManager } from "expirymanager"; + +export = SCBroker; + +interface Subscriptions { + [socketId: number]: { + [channel: string]: SCServerSocket; + }; +} + +declare class SCBroker extends EventEmitter { + id: number; + options: SCServer.SCServerOptions; + instanceId: number; + dataMap: FlexiMap; + dataExpirer: ExpiryManager; + subscriptions: Subscriptions; + + constructor(options?: SCServer.SCServerOptions); + + on(event: "subscribe" | "unsubscribe", listener: (channel: string) => void): this; + on(event: "publish", listener: (channel: string, data: any) => void): this; + on(event: "masterMessage", listener: (data: any, respond: (err: Error | null, responseData: any) => void) => void): this; + + publish(channel: string, message: any): void; + run(): void; + exec(query: (dataMap: FlexiMap, dataExpirer: ExpiryManager, subscriptions: Subscriptions) => any, baseKey?: KeyChain): any; + sendToMaster(data: any, callback?: (err: Error | null, responseData: any) => void): void; +} diff --git a/types/sc-broker/tsconfig.json b/types/sc-broker/tsconfig.json new file mode 100644 index 0000000000..6adfe07a5b --- /dev/null +++ b/types/sc-broker/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "scbroker.d.ts", + "sc-broker-tests.ts" + ] +} diff --git a/types/sc-broker/tslint.json b/types/sc-broker/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/sc-broker/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/sc-channel/index.d.ts b/types/sc-channel/index.d.ts new file mode 100644 index 0000000000..034723c0ba --- /dev/null +++ b/types/sc-channel/index.d.ts @@ -0,0 +1,45 @@ +// Type definitions for sc-channel 1.2 +// Project: https://github.com/SocketCluster/sc-channel +// Definitions by: Daniel Rose +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +import Emitter = require("component-emitter"); +import { SCExchange, handlerFunction } from "sc-broker-cluster"; + +export interface SCChannelOptions { + waitForAuth?: boolean; + batch?: boolean; + data?: any; +} + +export class SCChannel extends Emitter { + readonly PENDING: "pending"; + readonly SUBSCRIBED: "subscribed"; + readonly UNSUBSCRIBED: "unsubscribed"; + + name: string; + state: ChannelState; + waitForAuth: boolean; + batch: boolean; + data: any; + + constructor(name: string, client: SCExchange, options?: SCChannelOptions); + + setOptions(options?: SCChannelOptions): void; + getState(): "pending" | "subscribed" | "unsubscribed"; + + subscribe(options?: any): void; + unsubscribe(): void; + isSubscribed(includePending?: boolean): boolean; + + publish(data: any, callback?: (err?: Error) => void): void; + + watch(handler: handlerFunction): void; + unwatch(handler?: handlerFunction): void; + watchers(): handlerFunction[]; + + destroy(): void; +} + +export type ChannelState = "pending" | "subscribed" | "unsubscribed"; diff --git a/types/sc-channel/sc-channel-tests.ts b/types/sc-channel/sc-channel-tests.ts new file mode 100644 index 0000000000..bfc90cee12 --- /dev/null +++ b/types/sc-channel/sc-channel-tests.ts @@ -0,0 +1,33 @@ +import { SCChannel, SCChannelOptions } from "sc-channel"; +import { handlerFunction, Client, SCBrokerClusterClientOptions } from "sc-broker-cluster"; + +const clientOptions: SCBrokerClusterClientOptions = { brokers: [], connectRetryErrorThreshold: 0 }; +const client = new Client(clientOptions); + +let channel = new SCChannel("channelName", client.exchange()); +const channelOptions: SCChannelOptions = {}; +channel = new SCChannel("channelName", client.exchange(), channelOptions); + +channel.state = channel.PENDING; +channel.state = channel.SUBSCRIBED; +channel.state = channel.UNSUBSCRIBED; + +const channelName: string = channel.name; + +const handler: handlerFunction = () => { }; + +channel.watch(handler); +channel.unwatch(); + +channel.subscribe(); +channel.subscribe(channelOptions); +channel.unsubscribe(); + +const data: any = channel.data; + +channel.emit("subscribe", channelName); +channel.emit("unsubscribe", channelName); + +channel.setOptions(channelOptions); + +channel.publish(data); diff --git a/types/sc-channel/tsconfig.json b/types/sc-channel/tsconfig.json new file mode 100644 index 0000000000..c5c5ce5f14 --- /dev/null +++ b/types/sc-channel/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "sc-channel-tests.ts" + ] +} diff --git a/types/sc-channel/tslint.json b/types/sc-channel/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/sc-channel/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/socketcluster-client/index.d.ts b/types/socketcluster-client/index.d.ts new file mode 100644 index 0000000000..9c15a45465 --- /dev/null +++ b/types/socketcluster-client/index.d.ts @@ -0,0 +1,23 @@ +// Type definitions for socketcluster-client 13.0 +// Project: https://github.com/SocketCluster/socketcluster-client +// Definitions by: Daniel Rose +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +import { SCAuthEngine } from "sc-auth"; +import { SCServer } from "socketcluster-server"; + +export import SCClientSocket = require("./lib/scclientsocket"); + +export function create(options?: SCClientSocket.ClientOptions): SCClientSocket; + +/** @deprecated */ +export function connect(options?: SCClientSocket.ClientOptions): SCClientSocket; + +export function destroy(socket: SCClientSocket): void; + +export const clients: { + [id: string]: SCClientSocket; +}; + +export const version: string; diff --git a/types/socketcluster-client/lib/scclientsocket.d.ts b/types/socketcluster-client/lib/scclientsocket.d.ts new file mode 100644 index 0000000000..19552bd102 --- /dev/null +++ b/types/socketcluster-client/lib/scclientsocket.d.ts @@ -0,0 +1,251 @@ +import Emitter = require("component-emitter"); +import { SCServer } from "socketcluster-server"; +import { SCAuthEngine } from "sc-auth"; +import { SCChannel, SCChannelOptions, ChannelState } from "sc-channel"; +import WebSocket = require("ws"); + +declare class SCClientSocket extends Emitter { + constructor(opts: SCClientSocket.ClientOptions); + + id: string; + + channels: { + [channelName: string]: SCChannel; + }; + + CONNECTING: "connecting"; + OPEN: "open"; + CLOSED: "closed"; + + state: SCClientSocket.States; + getState(): SCClientSocket.States; + + AUTHENTICATED: "authenticated"; + UNAUTHENTICATED: "unauthenticated"; + + authState: SCClientSocket.AuthStates; + + PENDING: "pending"; + + pendingReconnect: boolean; + pendingReconnectTimeout: number; + + getBytesReceived(): number; + + deauthenticate(callback?: (err: Error) => void): void; + + connect(): void; + open(): void; + disconnect(code?: number, data?: string | object): void; + reconnect(code?: number, data?: string | object): void; + destroy(code?: number, data?: string | object): void; + + decodeBase64(encodedString: string): string; + encodeBase64(decodedString: string): string; + + getAuthToken(): object | null; + authToken: object | null; + + getSignedAuthToken(): string | null; + signedAuthToken: string | null; + + // Perform client-initiated authentication by providing an encrypted token string. + authenticate(signedAuthToken: string, callback?: (err: Error, authStatus: SCClientSocket.AuthStatus) => void): void; + + decode(message: any): any; + encode(object: any): any; + + send(data: any): void; + + emit(event: string, data: any, callback?: (err: Error, responseData: any) => void): void; + + publish(channelName: string, data: any, callback?: (err: Error, ackData: any) => void): void; + + subscribe(channelName: string, options?: SCChannelOptions): SCChannel; + unsubscribe(channelName: string): void; + + channel(channelName: string, options?: SCChannelOptions): SCChannel; + + destroyChannel(channelName: string): void; + + subscriptions(includePending?: boolean): string[]; + isSubscribed(channelName: string, includePending?: boolean): boolean; + + processPendingSubscriptions(): void; + + watch(channelName: string, handler: SCClientSocket.WatcherFunction): void; + unwatch(channelName: string, handler?: SCClientSocket.WatcherFunction): void; + watchers(channelName: string): SCClientSocket.WatcherFunction[]; + + on(event: "connecting", listener: () => void): this; + on(event: "connect", listener: (status: SCClientSocket.ConnectStatus, processSubscriptions: () => void) => void): this; + on(event: "connectAbort" | "disconnect" | "close", listener: (code: number, data: string | object) => void): this; + + on(event: "kickOut", listener: (message: string, channelName: string) => void): this; + + on(event: "authenticate", listener: (signedAuthToken: string | null) => void): this; + on(event: "deauthenticate", listener: (oldSignedToken: string | null) => void): this; + on(event: "authStateChange", listener: (stateChangeData: SCClientSocket.AuthStateChangeData) => void): this; + on(event: "removeAuthToken", listener: (oldToken: object | null) => void): this; + + on(event: "subscribe" | "subscribeRequest", listener: (channelName: string, subscriptionOptions: SCChannelOptions) => void): this; + on(event: "subscribeStateChange", listener: (stateChangeData: SCClientSocket.SubscribeStateChangeData) => void): this; + on(event: "subscribeFail", listener: (err: Error, channelName: string, subscriptionOptions: SCChannelOptions) => void): this; + on(event: "unsubscribe", listener: (channelName: string) => void): this; + + on(event: "error", listener: (err: Error) => void): this; + + on(event: "raw", listener: (data: any) => void): this; + on(event: "message", listener: (message: WebSocket.Data) => void): this; + + // Implements Emitter interface + + // tslint:disable:ban-types + // tslint:disable:adjacent-overload-signatures + on(event: string, listener: Function): this; + once(event: string, listener: Function): this; + off(event?: string, listener?: Function): this; + emit(event: string, ...args: any[]): boolean; + listeners(event: string): Function[]; + hasListeners(event: string): boolean; + // tslint:enable:adjacent-overload-signatures + // tslint:enable:ban-types +} + +export = SCClientSocket; + +declare namespace SCClientSocket { + interface ClientOptions { + host?: string; + + // Defaults to the current host (read from the URL). + hostname?: string; + + // Defaults to false. + secure?: boolean; + + // Defaults to 80 if !secure otherwise defaults to 443. + port?: number; + + // The URL which SC uses to make the initial handshake for the WebSocket. Defaults to '/socketcluster/'. + path?: string; + + // A map of key-value pairs which will be used as query parameters for the initial HTTP handshake which will initiate the WebSocket connection. + query?: string | { [key: string]: string }; + + // (milliseconds) - This is the timeout for getting a response to a SCSocket emit event (when a callback is provided). + ackTimeout?: number; + + // (milliseconds) + connectTimeout?: number; + + // Whether or not to automatically connect the socket as soon as it is created. Default is true. + autoConnect?: boolean; + + // Whether or not to automatically reconnect the socket when it loses the connection. + autoReconnect?: boolean; + + // Valid properties are: initialDelay (milliseconds), randomness (milliseconds), multiplier (decimal; default is 1.5) and maxDelay (milliseconds). + autoReconnectOptions?: AutoReconnectOptions; + + // Whether or not a client automatically disconnects on page unload. If enabled, the client will disconnect when a user navigates away from the page. + // This can happen when a user closes the tab/window, clicks a link to leave the page, or types a new URL into the address bar. Defaults to true. + disconnectOnUnload?: boolean; + + // Turn on/off per-message deflate compression. If this is true, you need to make sure that this property is also set to true on the server-side. + // Note that this option is only relevant when running the client from Node.js. Most modern browsers will automatically use perMessageDeflate so + // you only need to turn it on from the server-side. + perMessageDeflate?: boolean; + + // Defaults to true; multiplexing allows you to reuse a socket instead of creating a second socket to the same address. + multiplex?: boolean; + + // Defaults to null (0 milliseconds); this property affects channel subscription batching; it determines the period in milliseconds for batching + // multiple subscription requests together. It only affects channels that have the batch option set to true. A value of null or 0 means that all + // subscribe or unsubscribe requests which were made within the same call stack will be batched together. This property was introduced on the + // client-side in SC version 8 (both the client and server versions need to be >= 8.0.0). Note that there is also a separate property with the + // same name which can be configured on the server. + pubSubBatchDuration?: number; + + // Whether or not to add a timestamp to the WebSocket handshake request. + timestampRequests?: boolean; + + // The query parameter name to use to hold the timestamp. + timestampParam?: string; + + // A custom engine to use for storing and loading JWT auth tokens on the client side. + authEngine?: SCAuthEngine | null; + + // The name of the JWT auth token (provided to the authEngine - By default this is the localStorage variable name); defaults to 'socketCluster.authToken'. + authTokenName?: string; + + // The type to use to represent binary on the client. Defaults to 'arraybuffer'. + binaryType?: string; + + // Set this to false during debugging - Otherwise client connection will fail when using self-signed certificates. + rejectUnauthorized?: boolean; + + // If you set this to true, any data/objects/arrays that you pass to the client socket will be cloned before being sent/queued up. If the socket + // is disconnected and you emit an event, it will be added to a queue which will be processed upon reconnection. The cloneData option is false + // by default; this means that if you emit/publish an object and that object changes somewhere else in your code before the queue is processed, + // then the changed version of that object will be sent out to the server. + cloneData?: boolean; + + // This is true by default. If you set this to false, then the socket will not automatically try to subscribe to pending subscriptions on + // connect - Instead, you will have to manually invoke the processSubscriptions callback from inside the 'connect' event handler on the client side. + // See SCSocket Client API. This gives you more fine-grained control with regards to when pending subscriptions are processed after the socket + // connection is established (or re-established). + autoSubscribeOnConnect?: boolean; + + // Lets you set a custom codec engine. This allows you to specify how data gets encoded before being sent over the wire and how it gets decoded + // once it reaches the other side. The codecEngine must be an object which exposes an encode(object) and a decode(encodedData) function. + // The encode function can return any data type - Commonly a string or a Buffer/ArrayBuffer. The decode function needs to return a JavaScript + // object which adheres to the SC protocol. The idea of using a custom codec is that it allows you to compress SC packets in any format you like + // (optimized for any use case) - By decoding these packets back into their original protocol form, SC will be able process them appropriately. + // Note that if you provide a codecEngine when creating a client socket see 'codecEngine', you will need to make sure that the server uses the + // same codec by passing the same engine to `worker.scServer.setCodecEngine(codecEngine)` when your SC worker initializes on the server side + // (see 'setCodecEngine' method here). The default codec engine used by SC is here. + codecEngine?: SCServer.SCCodecEngine | null; + + // A prefix to add to the channel names. + channelPrefix?: string | null; + + subscriptionRetryOptions?: object | null; + } + + interface AutoReconnectOptions { + initialDelay?: number; + randomness?: number; + multiplier?: number; + maxDelay?: number; + } + + interface AuthStatus { + isAuthenticated: AuthStates; + authError: Error; + } + + interface AuthStateChangeData { + oldState: AuthStates; + newState: AuthStates; + } + + interface ConnectStatus { + id: string; + pingTimeout: number; + isAuthenticated: boolean; + authToken?: object; + authError?: Error; + } + + interface SubscribeStateChangeData { + channel: string; + oldState: ChannelState; + newState: ChannelState; + subscriptionOptions: SCChannelOptions; + } + + type WatcherFunction = (data: any) => void; + type AuthStates = "authenticated" | "unauthenticated"; + type States = "connecting" | "open" | "closed"; +} diff --git a/types/socketcluster-client/socketcluster-client-tests.ts b/types/socketcluster-client/socketcluster-client-tests.ts new file mode 100644 index 0000000000..527385a5eb --- /dev/null +++ b/types/socketcluster-client/socketcluster-client-tests.ts @@ -0,0 +1,75 @@ +// Adapted from README + +import { create, destroy } from "socketcluster-client"; +import { ClientOptions } from "socketcluster-client/lib/scclientsocket"; + +const secureClientOptions: ClientOptions = { + hostname: "securedomain.com", + secure: true, + port: 443, + rejectUnauthorized: false +}; + +let socket = create(secureClientOptions); + +socket.on("connect", () => { + console.log("CONNECTED"); +}); + +// Listen to an event called 'rand' from the server +socket.on("rand", (num: any) => { + console.log("RANDOM: " + num); +}); + +const options: ClientOptions = { + path: "/socketcluster/", + port: 8000, + hostname: "127.0.0.1", + autoConnect: true, + secure: false, + rejectUnauthorized: false, + connectTimeout: 10000, // milliseconds + ackTimeout: 10000, // milliseconds + channelPrefix: null, + disconnectOnUnload: true, + multiplex: true, + autoReconnectOptions: { + initialDelay: 10000, // milliseconds + randomness: 10000, // milliseconds + multiplier: 1.5, // decimal + maxDelay: 60000 // milliseconds + }, + authEngine: null, + codecEngine: null, + subscriptionRetryOptions: {}, + query: { + yourparam: "hello" + } +}; +socket = create(options); + +socket.on("subscribe", channelname => { + console.log("subscribe:" + channelname); +}); + +socket.on("subscribeFail", channelname => { + console.log("subscribeFail:" + channelname); +}); + +socket.on("unsubscribe", channelname => { + console.log("unsubscribe:" + channelname); +}); + +socket.on("subscribeStateChange", data => { + console.log("subscribeStateChange:" + JSON.stringify(data)); +}); + +socket.on("message", data => { + console.log("message:" + data); +}); + +const channels = socket.channels; +const testChannel = channels["test"]; +const state = testChannel.getState(); + +destroy(socket); diff --git a/types/socketcluster-client/tsconfig.json b/types/socketcluster-client/tsconfig.json new file mode 100644 index 0000000000..54fc6ea8af --- /dev/null +++ b/types/socketcluster-client/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "lib/scclientsocket.d.ts", + "socketcluster-client-tests.ts" + ] +} diff --git a/types/socketcluster-client/tslint.json b/types/socketcluster-client/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/socketcluster-client/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/socketcluster-server/index.d.ts b/types/socketcluster-server/index.d.ts new file mode 100644 index 0000000000..7466d1daed --- /dev/null +++ b/types/socketcluster-server/index.d.ts @@ -0,0 +1,15 @@ +// Type definitions for socketcluster-server 13.1 +// Project: https://github.com/SocketCluster/socketcluster-server +// Definitions by: Daniel Rose +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +import { Server } from "http"; + +export import SCServer = require("./scserver"); +export import SCServerSocket = require("./scserversocket"); + +export function listen(port?: number, options?: SCServer.SCServerOptions, listeningListener?: () => void): SCServer; +export function listen(port?: number, listeningListener?: () => void): SCServer; + +export function attach(server: Server, options?: SCServer.SCServerOptions): SCServer; diff --git a/types/socketcluster-server/scserver.d.ts b/types/socketcluster-server/scserver.d.ts new file mode 100644 index 0000000000..a7147aa2dd --- /dev/null +++ b/types/socketcluster-server/scserver.d.ts @@ -0,0 +1,315 @@ +import { EventEmitter } from "events"; +import { Secret } from "jsonwebtoken"; +import { ServerOptions } from "https"; +import { IncomingMessage, Server } from "http"; +import { SCAuthEngine } from "sc-auth"; +import { SCExchange } from "sc-broker-cluster"; +import WebSocket = require("ws"); + +import SCServerSocket = require("./scserversocket"); + +declare class SCServer extends EventEmitter { + readonly MIDDLEWARE_HANDSHAKE_WS: "handshakeWS"; + readonly MIDDLEWARE_HANDSHAKE_SC: "handshakeSC"; + readonly MIDDLEWARE_AUTHENTICATE: "authenticate"; + readonly MIDDLEWARE_SUBSCRIBE: "subscribe"; + readonly MIDDLEWARE_PUBLISH_IN: "publishIn"; + readonly MIDDLEWARE_PUBLISH_OUT: "publishOut"; + readonly MIDDLEWARE_EMIT: "emit"; + + options: SCServer.SCServerOptions; + exchange: SCExchange; + + clients: { + [id: string]: SCServerSocket; + }; + clientsCount: number; + + pendingClients: { + [id: string]: SCServerSocket; + }; + pendingClientsCount: number; + + constructor(options?: SCServer.SCServerOptions); + + on(event: "connection", listener: SCServer.connectionListenerFunction): this; + + addMiddleware(type: "handshakeWS", middlewareFn: (req: IncomingMessage, next: SCServer.nextMiddlewareFunction) => void): void; + addMiddleware(type: "handshakeSC", middlewareFn: (req: SCServer.HandshakeSCRequest, next: SCServer.nextHandshakeSCMiddlewareFunction) => void): void; + addMiddleware(type: "authenticate", middlewareFn: (req: SCServer.AuthenticateRequest, next: SCServer.nextAuthenticateMiddlewareFunction) => void): void; + addMiddleware(type: "subscribe", middlewareFn: (req: SCServer.SubscribeRequest, next: SCServer.nextMiddlewareFunction) => void): void; + addMiddleware(type: "publishIn", middlewareFn: (req: SCServer.PublishInRequest, next: SCServer.nextMiddlewareFunction) => void): void; + addMiddleware(type: "publishOut", middlewareFn: (req: SCServer.PublishOutRequest, next: SCServer.nextMiddlewareFunction) => void): void; + addMiddleware(type: "emit", middlewareFn: (req: SCServer.EmitRequest, next: SCServer.nextMiddlewareFunction) => void): void; + + setAuthEngine(authEngine: SCAuthEngine): void; + setCodecEngine(codecEngine: SCServer.SCCodecEngine): void; +} + +export = SCServer; + +declare namespace SCServer { + interface AuthToken { + [x: string]: any; + } + + interface SCServerOptions { + // The port on which to listen for outside connections/requests + port?: number; + + // Number of worker processes + workers?: number; + + // Number of broker processes + brokers?: number; + + // Should be either 'dev' or 'prod' - This affects the shutdown procedure + // when a 'SIGUSR2' signal is received by master. In 'dev', a SIGUSR2 will + // trigger an immediate shutdown of workers. In 'prod' workers will + // be terminated progressively in accordance with processTermTimeout. + environment?: string; + + // Setting this to true will cause the master process to shut down when + // it receives a SIGUSR2 signal (instead of just the workers). + // If you're using nodemon, set this to true. + killMasterOnSignal?: boolean; + + // A unique name for your app (this is used internally for + // various things such as the directory name in which to store socket + // file descriptors) - If you don't provide an appName, SC will + // generate a random one (UUID v4) + appName?: string; + + // This can be the name of an npm module or a path to a Node.js module + // to use as the WebSocket server engine. + // You can now set this to 'sc-uws' for a massive speedup of at least 2x! + wsEngine?: string; + + // An ID to associate with this specific instance of SC + // this may be useful if you are running an SC app on multiple + // hosts - You can access the instanceId from the Broker object + // (inside brokerController) - If you don't provide an instanceId, + // SC will generate a random one (UUID v4) + instanceId?: string; + + // A key which various SC processes will use to interact with + // scBroker broker processes securely, defaults to a 256 bits + // cryptographically random hex string + secretKey?: string; + + // The key which SC will use to encrypt/decrypt authTokens, defaults + // to a 256 bits cryptographically random hex string + // The default JWT algorithm used is 'HS256'. + // If you want to use RSA or ECDSA, you should provide a authPrivateKey + // and authPublicKey instead of authKey. + authKey?: Secret; + + // perMessageDeflate compression. Note that this option is passed directly to the wsEngine's + // Server object. So if you're using 'ws' as the engine, you can pass an object instead of + // a boolean. Search for perMessageDeflate here: + // https://github.com/websockets/ws/blob/master/doc/ws.md#new-websocketserveroptions-callback + // Note that by default, per-message deflate only kicks in for messages > 1024 bytes. + perMessageDeflate?: boolean; + + // If using an RSA or ECDSA algorithm to sign the authToken, you will need + // to provide an authPrivateKey and authPublicKey in PEM format (string or Buffer). + authPrivateKey?: Secret; + authPublicKey?: Secret; + + // The default expiry for auth tokens in seconds + authDefaultExpiry?: number; + + // The algorithm to use to sign and verify JWT tokens. + authAlgorithm?: string; + + // Crash workers when an error happens - This is the most sensible default + crashWorkerOnError?: boolean; + + // Reboot workers when they crash - This is a necessity + // in production but can be turned off for debugging + rebootWorkerOnCrash?: boolean; + + // Kill/respawn a worker process if its memory consumption exceeds this + // threshold (in bytes) - If this is null (default), this behavior + // will be switched off + killWorkerMemoryThreshold?: number; + + // Can be 'http' or 'https' + protocol?: "http" | "https"; + + // This is the same as the object provided to Node.js's https server + protocolOptions?: ServerOptions; + + // A log level of 3 will log everything, 2 will show notices and errors, + // 1 will only log errors, 0 will log nothing + logLevel?: 0 | 1 | 2 | 3; + + // In milliseconds, how long a client has to connect to SC before timing out + connectTimeout?: number; + + // In milliseconds - If the socket handshake hasn't been completed before + // this timeout is reached, the new connection attempt will be terminated. + handshakeTimeout?: number; + + // In milliseconds, the timeout for calling res(err, data) when + // your emit() call expects an ACK response from the other side + // (when callback is provided to emit) + ackTimeout?: number; + + // In milliseconds, the timeout for calling res(err, data) when + // your sendToWorker, sendToBroker or sendToMaster (IPC) call + // expects an ACK response from the other process + // (when callback is provided) + ipcAckTimeout?: number; + + // In milliseconds - If the socket cannot upgrade transport + // within this period, it will stop trying + socketUpgradeTimeout?: number; + + // Origins which are allowed to connect to the real-time scServer + origins?: string; + + // The maximum number of unique channels which a single + // socket can subscribe to + socketChannelLimit?: number; + + // The interval in milliseconds on which to + // send a ping to the client to check that + // it is still alive + pingInterval?: number; + + // How many milliseconds to wait without receiving a ping + // before closing the socket + pingTimeout?: number; + + // Maximum amount of milliseconds to wait before force-killing + // a process after it was passed a 'SIGTERM' or 'SIGUSR2' signal + processTermTimeout?: number; + + // Whether or not errors from child processes (workers and brokers) + // should be passed to the current master process + propagateErrors?: boolean; + + // Whether or not warnings from child processes (workers and brokers) + // should be passed to the current master process + propagateWarnings?: number; + + // Whether or not a 'warning' event should be emitted (and logged to console) + // whenever an action is blocked by a middleware function + middlewareEmitWarnings?: number; + + // Lets you specify a host name to bind to - Defaults to + // 127.0.0.1 (localhost) + host?: string; + + // The path to a file used to bootstrap worker processes + workerController?: string; + + // The path to a file used to bootstrap broker processes + brokerController?: string; + + // The path to a file used to bootstrap the workerCluster process + workerClusterController?: string; + + // By default, SC will reboot all workers when it receives a 'SIGUSR2' signal - + // This can be used for updating workers with fresh source code in production + rebootOnSignal?: boolean; + + // If you run your master process (server.js) as super user, this option + // lets you downgrade worker and broker processes to run under + // the specified user (with fewer permissions than master) - You can provide + // a Linux UID or username + downgradeToUser?: number | string; + + // The URL path reserved by SocketCluster clients to interact with the server + path?: string; + + // The root directory in which to store your socket files in Linux. + socketRoot?: string; + + // Defaults to "rr", but can be set to "none" + schedulingPolicy?: "rr" | "none"; + + // Whether or not clients are allowed to publish messages to channels + allowClientPublish?: boolean; + + // This option is passed to the Node.js HTTP server if provided + tcpSynBacklog?: number; + + // SC keeps track of request per minutes internally - This allows you to change + // how often this gets updated + workerStatusInterval?: number; + + // This allows you to batch multiple messages together when passing them across + // message brokers. This may improve the efficiency of your pub/sub operations. + // This value is in milliseconds. 5 is generally a safe value to set this to. + pubSubBatchDuration?: number; + + // The default clustering/brokering engine (Node.js module name) which provides the + // SCWorker.exchange object and manages brokers behind the scenes. + // You shouldn't need to change this unless you want to build your own + // process clustering engine (which is difficult to do). + brokerEngine?: string; + + wsEngineServerOptions?: WebSocket.ClientOptions; + maxPayload?: number; + pingTimeoutDisabled?: boolean; + authSignAsync?: boolean; + authVerifyAsync?: boolean; + httpServer?: Server; + } + + interface SCServerSocketStatus { + id: string; + pingTimeout: number; + } + + interface HandshakeSCRequest { + socket: SCServerSocket; + } + + interface AuthenticateRequest { + socket: SCServerSocket; + authToken: AuthToken; + } + + interface SubscribeRequest { + socket: SCServerSocket; + authTokenExpiredError?: Error; + channel?: string; + waitForAuth?: boolean; + data?: any; + } + + interface PublishInRequest { + socket: SCServerSocket; + authTokenExpiredError?: Error; + channel?: string; + data?: any; + ackData?: any; + } + + interface PublishOutRequest { + socket: SCServerSocket; + channel?: string; + data?: any; + useCache?: boolean; + } + + interface EmitRequest { + socket: SCServerSocket; + authTokenExpiredError?: Error; + event: string; + data?: any; + } + + type nextMiddlewareFunction = (error?: true | string | Error) => void; + type nextHandshakeSCMiddlewareFunction = (error?: true | string | Error | null, statusCode?: number) => void; + type nextAuthenticateMiddlewareFunction = (error?: true | string | Error | null, isBadToken?: boolean) => void; + type connectionListenerFunction = (scSocket: SCServerSocket, serverSocketStatus: SCServerSocketStatus) => void; + + interface SCCodecEngine { + decode: (input: any) => any; + ncode: (object: any) => any; + } +} diff --git a/types/socketcluster-server/scserversocket.d.ts b/types/socketcluster-server/scserversocket.d.ts new file mode 100644 index 0000000000..7b32cef72c --- /dev/null +++ b/types/socketcluster-server/scserversocket.d.ts @@ -0,0 +1,43 @@ +import Emitter = require("component-emitter"); +import { IncomingMessage } from "http"; +import { SCExchange } from "sc-broker-cluster"; +import { SignOptions } from "jsonwebtoken"; +import WebSocket = require("ws"); + +import SCServer = require("./scserver"); + +declare class SCServerSocket extends Emitter { + readonly CONNECTING: "connecting"; + readonly OPEN: "open"; + readonly CLOSED: "closed"; + + readonly AUTHENTICATED: "authenticated"; + readonly UNAUTHENTICATED: "unauthenticated"; + + id: string; + request: IncomingMessage; + + remoteAddress: string; + remoteFamily: string; + remotePort: number; + + exchange: SCExchange; + + state: "connecting" | "open" | "closed"; + authState: "authenticated" | "unauthenticated"; + authToken?: SCServer.AuthToken; + + constructor(id: string, server: SCServer, socket: WebSocket); + + getState(): "connecting" | "open" | "closed"; + disconnect(code?: number, data?: any): void; + send(data: any, options: { mask?: boolean; binary?: boolean; compress?: boolean; fin?: boolean }): void; + getAuthToken(): SCServer.AuthToken; + setAuthToken(data: SCServer.AuthToken, options?: SignOptions): void; + deauthenticate(): void; + kickOut(channel?: string, message?: string, callback?: () => void): void; + subscriptions(): string[]; + isSubscribed(channel?: string): boolean; +} + +export = SCServerSocket; diff --git a/types/socketcluster-server/socketcluster-server-tests.ts b/types/socketcluster-server/socketcluster-server-tests.ts new file mode 100644 index 0000000000..3d62fe9041 --- /dev/null +++ b/types/socketcluster-server/socketcluster-server-tests.ts @@ -0,0 +1,39 @@ +// Adapted from README + +// Using with basic http(s) module (example) + +import http = require("http"); +import * as socketClusterServer from "socketcluster-server"; + +let httpServer = http.createServer(); +let scServer = socketClusterServer.attach(httpServer); + +scServer.on("connection", socket => { + // ... Handle new socket connections here +}); + +httpServer.listen(8000); + +// Using with Express (example) + +import serveStatic = require("serve-static"); +import path = require("path"); +import express = require("express"); + +const app = express(); + +app.use(serveStatic(path.resolve(__dirname, "public"))); + +httpServer = http.createServer(); + +// Attach express to our httpServer +httpServer.on("request", app); + +// Attach socketcluster-server to our httpServer +scServer = socketClusterServer.attach(httpServer); + +scServer.on("connection", socket => { + // ... Handle new socket connections here +}); + +httpServer.listen(8000); diff --git a/types/socketcluster-server/tsconfig.json b/types/socketcluster-server/tsconfig.json new file mode 100644 index 0000000000..be1a6bdcb0 --- /dev/null +++ b/types/socketcluster-server/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "scserver.d.ts", + "scserversocket.d.ts", + "socketcluster-server-tests.ts" + ] +} diff --git a/types/socketcluster-server/tslint.json b/types/socketcluster-server/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/socketcluster-server/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/socketcluster/fsutil.d.ts b/types/socketcluster/fsutil.d.ts new file mode 100644 index 0000000000..bcfcbfc59f --- /dev/null +++ b/types/socketcluster/fsutil.d.ts @@ -0,0 +1,11 @@ +import { PathLike } from "fs"; + +export function fileExists(filePath: PathLike, callback: (exists: boolean) => void): void; + +export function waitForFile( + filePath: PathLike, + checkInterval: number, + startTime: number, + maxWaitDuration: number, + timeoutErrorMessage?: string +): Promise; diff --git a/types/socketcluster/index.d.ts b/types/socketcluster/index.d.ts new file mode 100644 index 0000000000..0ec8485cfa --- /dev/null +++ b/types/socketcluster/index.d.ts @@ -0,0 +1,84 @@ +// Type definitions for socketcluster 14.0 +// Project: https://github.com/SocketCluster/socketcluster +// Definitions by: Daniel Rose +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +import { EventEmitter } from "events"; +import { SCServer } from "socketcluster-server"; +import { ChildProcess } from "child_process"; + +interface WorkerStartInfo { + id: number; + pid: number; + respawn: boolean; +} + +interface WorkerClusterStartInfo { + pid: number; + childProcess: ChildProcess; +} + +interface WorkerClusterReadyInfo { + pid: number; + childProcess: ChildProcess; +} + +interface WorkerClusterExitInfo { + pid: number; + code: number; + signal: string; + childProcess: ChildProcess; +} + +export = SocketCluster; + +declare class SocketCluster extends EventEmitter { + readonly EVENT_FAIL: "fail"; + readonly EVENT_WARNING: "warning"; + readonly EVENT_READY: "ready"; + readonly EVENT_WORKER_START: "workerStart"; + readonly EVENT_WORKER_EXIT: "workerExit"; + readonly EVENT_BROKER_START: "brokerStart"; + readonly EVENT_BROKER_EXIT: "brokerExit"; + readonly EVENT_WORKER_CLUSTER_START: "workerClusterStart"; + readonly EVENT_WORKER_CLUSTER_READY: "workerClusterReady"; + readonly EVENT_WORKER_CLUSTER_EXIT: "workerClusterExit"; + + options: SCServer.SCServerOptions; + + constructor(options?: SCServer.SCServerOptions); + + on(event: "fail", listener: (err: Error) => void): this; + on(event: "warning", listener: (warning: Error) => void): this; + on(event: "ready", listener: () => void): this; + on(event: "workerStart", listener: (workerInfo: WorkerStartInfo) => void): this; + on(event: "workerExit", listener: (workerInfo: SocketCluster.WorkerExitInfo) => void): this; + on(event: "brokerStart", listener: (brokerInfo: SocketCluster.BrokerStartInfo) => void): this; + on(event: "brokerExit", listener: (brokerInfo: SocketCluster.BrokerExitInfo) => void): this; + on(event: "workerClusterStart", listener: (workerClusterInfo: WorkerClusterStartInfo) => void): this; + on(event: "workerClusterReady", listener: (workerClusterInfo: WorkerClusterReadyInfo) => void): this; + on(event: "workerClusterExit", listener: (workerClusterInfo: WorkerClusterExitInfo) => void): this; +} + +declare namespace SocketCluster { + interface WorkerExitInfo { + id: number; + pid: number; + code: number; + signal: string; + } + + interface BrokerStartInfo { + id: number; + pid: number; + respawn: boolean; + } + + interface BrokerExitInfo { + id: number; + pid: number; + code: number; + signal: string; + } +} diff --git a/types/socketcluster/scbroker.d.ts b/types/socketcluster/scbroker.d.ts new file mode 100644 index 0000000000..461801aa63 --- /dev/null +++ b/types/socketcluster/scbroker.d.ts @@ -0,0 +1,3 @@ +import SCBroker = require("sc-broker-cluster/scbroker"); + +export = SCBroker; diff --git a/types/socketcluster/scworker.d.ts b/types/socketcluster/scworker.d.ts new file mode 100644 index 0000000000..48502692be --- /dev/null +++ b/types/socketcluster/scworker.d.ts @@ -0,0 +1,63 @@ +import { EventEmitter } from "events"; +import { Server as httpServer } from "http"; +import { Server as httpsServer } from "https"; +import { SCServer, SCServerSocket } from "socketcluster-server"; +import { SCAuthEngine } from "sc-auth"; +import { SCExchange } from "sc-broker-cluster"; + +export = SCWorker; + +type middlewareFunction = (options: SCServer.SCServerOptions, next: (error?: string | Error) => void) => void; + +declare class SCWorker extends EventEmitter { + readonly EVENT_ERROR: "error"; + readonly EVENT_WARNING: "warning"; + readonly EVENT_EXIT: "exit"; + readonly EVENT_READY: "ready"; + readonly EVENT_CONNECTION: "connection"; + + readonly MIDDLEWARE_START: "start"; + + id: number; + isLeader: boolean; + options: SCServer.SCServerOptions; + httpServer: httpServer | httpsServer; + scServer: SCServer; + exchange: SCExchange; + auth: SCAuthEngine; + + constructor(options?: SCServer.SCServerOptions); + + run(): void; + + getSCServer(): SCServer; + getHTTPServer(): httpServer | httpsServer; + getSocketPath(): string; + + setAuthEngine(authEngine: SCAuthEngine): void; + setCodecEngine(codecEngine: SCServer.SCCodecEngine): void; + + open(): void; + close(callback?: () => void): void; + + addMiddleware(type: "start", middlewareFn: middlewareFunction): void; + removeMiddleware(type: "start", middlewareFn: middlewareFunction): void; + + startHTTPServer(): void; + start(): Promise; + + getStatus(): { + clientCount: any; + httpRPM: number; + wsRPM: number; + }; + + sendToMaster(data: any, callback: (err: Error | null, data: any) => void): void; + respondToMaster(err: Error | null, data: any, rid: number): void; + + on(event: "connection", listener: (scSocket: SCServerSocket) => void): this; + on(event: "ready", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "warning", listener: (warning: Error) => void): this; + on(event: "masterMessage", listener: (data: any, respond: (err: Error | null, responseData: any) => void) => void): this; +} diff --git a/types/socketcluster/socketcluster-tests.ts b/types/socketcluster/socketcluster-tests.ts new file mode 100644 index 0000000000..85ad9c3d05 --- /dev/null +++ b/types/socketcluster/socketcluster-tests.ts @@ -0,0 +1,76 @@ +import * as fsutil from "socketcluster/fsutil"; +import SocketCluster = require("socketcluster"); +import { SCServer } from "socketcluster-server"; +import { ChildProcess } from "child_process"; + +//////////////////////////////////////////////////// +/// SocketCluster tests +//////////////////////////////////////////////////// + +{ + const options: SCServer.SCServerOptions = { port: 80 }; + + let sc = new SocketCluster(); + sc = new SocketCluster(options); + sc.options = { environment: "prod" }; + + sc.on(sc.EVENT_FAIL, err => { + const error: Error = err; + }); + sc.on(sc.EVENT_WARNING, warning => { + const warn: Error = warning; + }); + + sc.on(sc.EVENT_READY, () => {}); + + sc.on(sc.EVENT_WORKER_START, workerInfo => { + const id: number = workerInfo.id; + const pid: number = workerInfo.pid; + const respawn: boolean = workerInfo.respawn; + }); + sc.on(sc.EVENT_WORKER_EXIT, workerInfo => { + const id: number = workerInfo.id; + const pid: number = workerInfo.pid; + const code: number = workerInfo.code; + const signal: string = workerInfo.signal; + }); + + sc.on(sc.EVENT_BROKER_START, brokerInfo => { + const id: number = brokerInfo.id; + const pid: number = brokerInfo.pid; + const respawn: boolean = brokerInfo.respawn; + }); + sc.on(sc.EVENT_BROKER_EXIT, brokerInfo => { + const id: number = brokerInfo.id; + const pid: number = brokerInfo.pid; + const code: number = brokerInfo.code; + const signal: string = brokerInfo.signal; + }); + + sc.on(sc.EVENT_WORKER_CLUSTER_START, workerClusterInfo => { + const pid: number = workerClusterInfo.pid; + const childProcess: ChildProcess = workerClusterInfo.childProcess; + }); + sc.on(sc.EVENT_WORKER_CLUSTER_READY, workerClusterInfo => { + const pid: number = workerClusterInfo.pid; + const childProcess: ChildProcess = workerClusterInfo.childProcess; + }); + sc.on(sc.EVENT_WORKER_CLUSTER_EXIT, workerClusterInfo => { + const pid: number = workerClusterInfo.pid; + const code: number = workerClusterInfo.code; + const signal: string = workerClusterInfo.signal; + const childProcess: ChildProcess = workerClusterInfo.childProcess; + }); +} + +//////////////////////////////////////////////////// +/// fsutil tests +//////////////////////////////////////////////////// + +{ + fsutil.fileExists("/path/to/folder", err => {}); + fsutil.fileExists(Buffer.from(""), err => {}); + + const pathPromise: Promise = fsutil.waitForFile("/path/to/folder", 100, 0, 100); + const bufferPromise: Promise = fsutil.waitForFile(Buffer.from(""), 0, 0, 0, "timeout"); +} diff --git a/types/socketcluster/tsconfig.json b/types/socketcluster/tsconfig.json new file mode 100644 index 0000000000..1a0267f5f0 --- /dev/null +++ b/types/socketcluster/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "fsutil.d.ts", + "scbroker.d.ts", + "scworker.d.ts", + "socketcluster-tests.ts" + ] +} diff --git a/types/socketcluster/tslint.json b/types/socketcluster/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/socketcluster/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} From c2e36d8f4bd6caf353b0774e2aab9e2e9188baf6 Mon Sep 17 00:00:00 2001 From: Gerhard Stoebich <18708370+Flarna@users.noreply.github.com> Date: Fri, 30 Nov 2018 12:01:59 +0100 Subject: [PATCH 193/608] [node] add some more elements to IncomingHttpHeaders --- types/node/index.d.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/types/node/index.d.ts b/types/node/index.d.ts index f71cd9f6ec..b9edae0587 100644 --- a/types/node/index.d.ts +++ b/types/node/index.d.ts @@ -1126,10 +1126,10 @@ declare module "http" { 'access-control-allow-headers'?: string; 'accept-patch'?: string; 'accept-ranges'?: string; - 'authorization'?: string; 'age'?: string; 'allow'?: string; 'alt-svc'?: string; + 'authorization'?: string; 'cache-control'?: string; 'connection'?: string; 'content-disposition'?: string; @@ -1139,14 +1139,24 @@ declare module "http" { 'content-location'?: string; 'content-range'?: string; 'content-type'?: string; + 'cookie'?: string; 'date'?: string; + 'expect'?: string; 'expires'?: string; + 'forwarded'?: string; + 'from'?: string; 'host'?: string; + 'if-match'?: string; + 'if-modified-since'?: string; + 'if-none-match'?: string; + 'if-unmodified-since'?: string; 'last-modified'?: string; 'location'?: string; 'pragma'?: string; 'proxy-authenticate'?: string; + 'proxy-authorization'?: string; 'public-key-pins'?: string; + 'range'?: string; 'referer'?: string; 'retry-after'?: string; 'set-cookie'?: string[]; From 8324b632a330fb669d3ee5b7440002d26ec4a266 Mon Sep 17 00:00:00 2001 From: "h.naoufal" Date: Fri, 30 Nov 2018 13:06:31 +0100 Subject: [PATCH 194/608] Adding missing inputIconPosition to interface DateRangePickerShape --- types/react-dates/index.d.ts | 731 +++++++++++++++++++---------------- 1 file changed, 401 insertions(+), 330 deletions(-) diff --git a/types/react-dates/index.d.ts b/types/react-dates/index.d.ts index 05058b2ca9..911dfc75c8 100644 --- a/types/react-dates/index.d.ts +++ b/types/react-dates/index.d.ts @@ -1,14 +1,14 @@ // Type definitions for react-dates v17.1.0 // Project: https://github.com/airbnb/react-dates -// Definitions by: Artur Ampilogov +// Definitions by: Artur Ampilogov // Nathan Holland // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 // Required fields are made according to 'minimum REQUIRED setup' in https://github.com/airbnb/react-dates/blob/master/README.md - -import * as React from 'react'; -import * as moment from 'moment'; + +import * as React from "react"; +import * as moment from "moment"; export = ReactDates; @@ -18,451 +18,513 @@ declare namespace momentPropTypes { type momentDurationObj = any; } - declare namespace ReactDates { - // SHAPES + // SHAPES // // shapes/AnchorDirectionShape.js - type AnchorDirectionShape = 'left' | 'right'; + type AnchorDirectionShape = "left" | "right"; // shapes/CalendarInfoPositionShape.js - type CalendarInfoPositionShape = 'top' | 'bottom' | 'before' | 'after'; + type CalendarInfoPositionShape = "top" | "bottom" | "before" | "after"; - // shapes/DateRangePickerShape.js interface DateRangePickerShape { // required props for a functional interactive DateRangePicker - startDate: momentPropTypes.momentObj | null, - startDateId: string, - endDate: momentPropTypes.momentObj | null, - endDateId: string, - focusedInput: FocusedInputShape | null, + startDate: momentPropTypes.momentObj | null; + startDateId: string; + endDate: momentPropTypes.momentObj | null; + endDateId: string; + focusedInput: FocusedInputShape | null; - onDatesChange: (arg: { - startDate: momentPropTypes.momentObj | null, - endDate: momentPropTypes.momentObj | null - }) => void, - onFocusChange: (arg: FocusedInputShape | null) => void, - - onClose?: (final: { startDate: momentPropTypes.momentObj, endDate: momentPropTypes.momentObj }) => void, + onDatesChange: ( + arg: { + startDate: momentPropTypes.momentObj | null; + endDate: momentPropTypes.momentObj | null; + } + ) => void; + onFocusChange: (arg: FocusedInputShape | null) => void; + + onClose?: ( + final: { + startDate: momentPropTypes.momentObj; + endDate: momentPropTypes.momentObj; + } + ) => void; // input related props - startDatePlaceholderText?: string, - endDatePlaceholderText?: string, - disabled?: DisabledShape, - required?: boolean, - readOnly?: boolean, - screenReaderInputMessage?: string, - showClearDates?: boolean, - showDefaultInputIcon?: boolean, - customInputIcon?: string | JSX.Element, - customArrowIcon?: string | JSX.Element, - customCloseIcon?: string | JSX.Element, - noBorder?: boolean, - block?: boolean, - small?: boolean, - regular?: boolean, - keepFocusOnInput?: boolean, + startDatePlaceholderText?: string; + endDatePlaceholderText?: string; + disabled?: DisabledShape; + required?: boolean; + readOnly?: boolean; + screenReaderInputMessage?: string; + showClearDates?: boolean; + showDefaultInputIcon?: boolean; + inputIconPosition?: IconPositionShape; + customInputIcon?: string | JSX.Element; + customArrowIcon?: string | JSX.Element; + customCloseIcon?: string | JSX.Element; + noBorder?: boolean; + block?: boolean; + small?: boolean; + regular?: boolean; + keepFocusOnInput?: boolean; // calendar presentation and interaction related props - renderMonthText?: (day: momentPropTypes.momentObj) => (string | JSX.Element), + renderMonthText?: ( + day: momentPropTypes.momentObj + ) => string | JSX.Element; renderMonthElement?: ( props: { - month: momentPropTypes.momentObj; - onMonthSelect: (currentMonth: momentPropTypes.momentObj, newMonthVal: string) => void; - onYearSelect: (currentMonth: momentPropTypes.momentObj, newYearVal: string) => void; + month: momentPropTypes.momentObj; + onMonthSelect: ( + currentMonth: momentPropTypes.momentObj, + newMonthVal: string + ) => void; + onYearSelect: ( + currentMonth: momentPropTypes.momentObj, + newYearVal: string + ) => void; } - ) => string | JSX.Element, - orientation?: OrientationShape, - anchorDirection?: AnchorDirectionShape, - openDirection?: OpenDirectionShape, - horizontalMargin?: number, - withPortal?: boolean, - withFullScreenPortal?: boolean, - appendToBody?: boolean, - disableScroll?: boolean, - daySize?: number, - isRTL?: boolean, - firstDayOfWeek?: DayOfWeekShape, - initialVisibleMonth?: () => momentPropTypes.momentObj, - numberOfMonths?: number, - keepOpenOnDateSelect?: boolean, - reopenPickerOnClearDates?: boolean, - renderCalendarInfo?: () => (string | JSX.Element), - calendarInfoPosition?: CalendarInfoPositionShape, - hideKeyboardShortcutsPanel?: boolean, - verticalHeight?: number, - transitionDuration?: number, - verticalSpacing?: number, + ) => string | JSX.Element; + orientation?: OrientationShape; + anchorDirection?: AnchorDirectionShape; + openDirection?: OpenDirectionShape; + horizontalMargin?: number; + withPortal?: boolean; + withFullScreenPortal?: boolean; + appendToBody?: boolean; + disableScroll?: boolean; + daySize?: number; + isRTL?: boolean; + firstDayOfWeek?: DayOfWeekShape; + initialVisibleMonth?: () => momentPropTypes.momentObj; + numberOfMonths?: number; + keepOpenOnDateSelect?: boolean; + reopenPickerOnClearDates?: boolean; + renderCalendarInfo?: () => string | JSX.Element; + calendarInfoPosition?: CalendarInfoPositionShape; + hideKeyboardShortcutsPanel?: boolean; + verticalHeight?: number; + transitionDuration?: number; + verticalSpacing?: number; // navigation related props - navPrev?: string | JSX.Element, - navNext?: string | JSX.Element, - onPrevMonthClick?: (newCurrentMonth: momentPropTypes.momentObj) => void, - onNextMonthClick?: (newCurrentMonth: momentPropTypes.momentObj) => void, + navPrev?: string | JSX.Element; + navNext?: string | JSX.Element; + onPrevMonthClick?: (newCurrentMonth: momentPropTypes.momentObj) => void; + onNextMonthClick?: (newCurrentMonth: momentPropTypes.momentObj) => void; // day presentation and interaction related props - renderCalendarDay?: (day: momentPropTypes.momentObj) => (string | JSX.Element), - renderDayContents?: (day: momentPropTypes.momentObj) => (string | JSX.Element), - minimumNights?: number, - enableOutsideDays?: boolean, - isDayBlocked?: (day: any) => boolean, - isOutsideRange?: (day: any) => boolean, - isDayHighlighted?: (day: any) => boolean, - + renderCalendarDay?: ( + day: momentPropTypes.momentObj + ) => string | JSX.Element; + renderDayContents?: ( + day: momentPropTypes.momentObj + ) => string | JSX.Element; + minimumNights?: number; + enableOutsideDays?: boolean; + isDayBlocked?: (day: any) => boolean; + isOutsideRange?: (day: any) => boolean; + isDayHighlighted?: (day: any) => boolean; // internationalization props - displayFormat?: (string | (() => string)), - monthFormat?: string, - weekDayFormat?: string, - phrases?: DateRangePickerPhrases, - dayAriaLabelFormat?: string + displayFormat?: string | (() => string); + monthFormat?: string; + weekDayFormat?: string; + phrases?: DateRangePickerPhrases; + dayAriaLabelFormat?: string; } // shapes/DayOfWeekShape.js type DayOfWeekShape = 0 | 1 | 2 | 3 | 4 | 5 | 6; // shapes/DisabledShape.js - type DisabledShape = boolean | 'startDate' | 'endDate'; + type DisabledShape = boolean | "startDate" | "endDate"; // shapes/FocusedInputShape.js - type FocusedInputShape = 'startDate' | 'endDate'; + type FocusedInputShape = "startDate" | "endDate"; // shape/IconPositionShape.js - type IconPositionShape = 'before' | 'after'; + type IconPositionShape = "before" | "after"; // type/OpenDirectionShape.js - type OpenDirectionShape = 'down' | 'up'; + type OpenDirectionShape = "down" | "up"; // shpae/OrientationShape.js - type OrientationShape = 'horizontal' | 'vertical'; + type OrientationShape = "horizontal" | "vertical"; // shape/ScrollableOrientationShape.js - type ScrollableOrientationShape = 'horizontal' | 'vertical' | 'verticalScrollable'; - + type ScrollableOrientationShape = + | "horizontal" + | "vertical" + | "verticalScrollable"; // shapes/SingleDatePickerShape.js interface SingleDatePickerShape { - id: string, + id: string; // required props for a functional interactive SingleDatePicker - date: momentPropTypes.momentObj | null, - focused: boolean, - - onDateChange: (date: momentPropTypes.momentObj | null) => void, - onFocusChange: (arg: { focused: boolean | null }) => void, - + date: momentPropTypes.momentObj | null; + focused: boolean; + + onDateChange: (date: momentPropTypes.momentObj | null) => void; + onFocusChange: (arg: { focused: boolean | null }) => void; + // input related props - placeholder?: string, - disabled?: boolean, - required?: boolean, - readOnly?: boolean, - screenReaderInputMessage?: string, - showClearDate?: boolean, - customCloseIcon?: string | JSX.Element, - showDefaultInputIcon?: boolean, - inputIconPosition?: IconPositionShape, - customInputIcon?: string | JSX.Element, - noBorder?: boolean, - block?: boolean, - small?: boolean, - regular?: boolean, - verticalSpacing?: number, - keepFocusOnInput?: boolean, + placeholder?: string; + disabled?: boolean; + required?: boolean; + readOnly?: boolean; + screenReaderInputMessage?: string; + showClearDate?: boolean; + customCloseIcon?: string | JSX.Element; + showDefaultInputIcon?: boolean; + inputIconPosition?: IconPositionShape; + customInputIcon?: string | JSX.Element; + noBorder?: boolean; + block?: boolean; + small?: boolean; + regular?: boolean; + verticalSpacing?: number; + keepFocusOnInput?: boolean; // calendar presentation and interaction related props - renderMonthText?: (day: momentPropTypes.momentObj) => (string | JSX.Element), + renderMonthText?: ( + day: momentPropTypes.momentObj + ) => string | JSX.Element; renderMonthElement?: ( props: { - month: momentPropTypes.momentObj; - onMonthSelect: (currentMonth: momentPropTypes.momentObj, newMonthVal: string) => void; - onYearSelect: (currentMonth: momentPropTypes.momentObj, newYearVal: string) => void; + month: momentPropTypes.momentObj; + onMonthSelect: ( + currentMonth: momentPropTypes.momentObj, + newMonthVal: string + ) => void; + onYearSelect: ( + currentMonth: momentPropTypes.momentObj, + newYearVal: string + ) => void; } - ) => string | JSX.Element, - orientation?: OrientationShape, - anchorDirection?: AnchorDirectionShape, - openDirection?: OpenDirectionShape, - horizontalMargin?: number, - withPortal?: boolean, - withFullScreenPortal?: boolean, - appendToBody?: boolean, - disableScroll?: boolean, - initialVisibleMonth?: () => momentPropTypes.momentObj, - firstDayOfWeek?: DayOfWeekShape, - numberOfMonths?: number, - keepOpenOnDateSelect?: boolean, - reopenPickerOnClearDates?: boolean, - renderCalendarInfo?: () => (string | JSX.Element), - calendarInfoPosition?: CalendarInfoPositionShape, - hideKeyboardShortcutsPanel?: boolean, - daySize?: number, - isRTL?: boolean, - verticalHeight?: number | null, - transitionDuration?: number, + ) => string | JSX.Element; + orientation?: OrientationShape; + anchorDirection?: AnchorDirectionShape; + openDirection?: OpenDirectionShape; + horizontalMargin?: number; + withPortal?: boolean; + withFullScreenPortal?: boolean; + appendToBody?: boolean; + disableScroll?: boolean; + initialVisibleMonth?: () => momentPropTypes.momentObj; + firstDayOfWeek?: DayOfWeekShape; + numberOfMonths?: number; + keepOpenOnDateSelect?: boolean; + reopenPickerOnClearDates?: boolean; + renderCalendarInfo?: () => string | JSX.Element; + calendarInfoPosition?: CalendarInfoPositionShape; + hideKeyboardShortcutsPanel?: boolean; + daySize?: number; + isRTL?: boolean; + verticalHeight?: number | null; + transitionDuration?: number; // navigation related props - navPrev?: string | JSX.Element, - navNext?: string | JSX.Element, - onPrevMonthClick?: (newCurrentMonth: momentPropTypes.momentObj) => void, - onNextMonthClick?: (newCurrentMonth: momentPropTypes.momentObj) => void, - onClose?: (final: { startDate: momentPropTypes.momentObj, endDate: momentPropTypes.momentObj }) => void, + navPrev?: string | JSX.Element; + navNext?: string | JSX.Element; + onPrevMonthClick?: (newCurrentMonth: momentPropTypes.momentObj) => void; + onNextMonthClick?: (newCurrentMonth: momentPropTypes.momentObj) => void; + onClose?: ( + final: { + startDate: momentPropTypes.momentObj; + endDate: momentPropTypes.momentObj; + } + ) => void; // day presentation and interaction related props - renderCalendarDay?: (day: momentPropTypes.momentObj) => (string | JSX.Element), - renderDayContents?: (day: momentPropTypes.momentObj) => (string | JSX.Element), - enableOutsideDays?: boolean, - isDayBlocked?: (day: any) => boolean, - isOutsideRange?: (day: any) => boolean, - isDayHighlighted?: (day: any) => boolean, + renderCalendarDay?: ( + day: momentPropTypes.momentObj + ) => string | JSX.Element; + renderDayContents?: ( + day: momentPropTypes.momentObj + ) => string | JSX.Element; + enableOutsideDays?: boolean; + isDayBlocked?: (day: any) => boolean; + isOutsideRange?: (day: any) => boolean; + isDayHighlighted?: (day: any) => boolean; // internationalization props - displayFormat?: (string | (() => string)), - monthFormat?: string, - weekDayFormat?: string, - phrases?: SingleDatePickerPhrases, - dayAriaLabelFormat?: string, + displayFormat?: string | (() => string); + monthFormat?: string; + weekDayFormat?: string; + phrases?: SingleDatePickerPhrases; + dayAriaLabelFormat?: string; } // PHRASES // // defaultPhrases.js type DateRangePickerPhrases = { - calendarLabel?: string, - closeDatePicker?: string, - clearDates?: string, - focusStartDate?: string, - jumpToPrevMonth?: string, - jumpToNextMonth?: string, - keyboardShortcuts?: string, - showKeyboardShortcutsPanel?: string, - hideKeyboardShortcutsPanel?: string, - openThisPanel?: string, - enterKey?: string, - leftArrowRightArrow?: string, - upArrowDownArrow?: string, - pageUpPageDown?: string, - homeEnd?: string, - escape?: string, - questionMark?: string, - selectFocusedDate?: string, - moveFocusByOneDay?: string, - moveFocusByOneWeek?: string, - moveFocusByOneMonth?: string, - moveFocustoStartAndEndOfWeek?: string, - returnFocusToInput?: string, - keyboardNavigationInstructions?: string, - chooseAvailableStartDate?: (date: string) => string, - chooseAvailableEndDate?: (date: string) => string, - dateIsUnavailable?: (date: string) => string, - dateIsSelected?: (date: string) => string + calendarLabel?: string; + closeDatePicker?: string; + clearDates?: string; + focusStartDate?: string; + jumpToPrevMonth?: string; + jumpToNextMonth?: string; + keyboardShortcuts?: string; + showKeyboardShortcutsPanel?: string; + hideKeyboardShortcutsPanel?: string; + openThisPanel?: string; + enterKey?: string; + leftArrowRightArrow?: string; + upArrowDownArrow?: string; + pageUpPageDown?: string; + homeEnd?: string; + escape?: string; + questionMark?: string; + selectFocusedDate?: string; + moveFocusByOneDay?: string; + moveFocusByOneWeek?: string; + moveFocusByOneMonth?: string; + moveFocustoStartAndEndOfWeek?: string; + returnFocusToInput?: string; + keyboardNavigationInstructions?: string; + chooseAvailableStartDate?: (date: string) => string; + chooseAvailableEndDate?: (date: string) => string; + dateIsUnavailable?: (date: string) => string; + dateIsSelected?: (date: string) => string; }; // defaultPhrases.js type DateRangePickerInputPhrases = { - focusStartDate?: string, - clearDates?: string, - keyboardNavigationInstructions?: string, - } + focusStartDate?: string; + clearDates?: string; + keyboardNavigationInstructions?: string; + }; // defaultPhrases.js - type SingleDatePickerPhrases = { - calendarLabel?: string, - closeDatePicker?: string, - clearDate?: string, - jumpToPrevMonth?: string, - jumpToNextMonth?: string, - keyboardShortcuts?: string, - showKeyboardShortcutsPanel?: string, - hideKeyboardShortcutsPanel?: string, - openThisPanel?: string, - enterKey?: string, - leftArrowRightArrow?: string, - upArrowDownArrow?: string, - pageUpPageDown?: string, - homeEnd?: string, - escape?: string, - questionMark?: string, - selectFocusedDate?: string, - moveFocusByOneDay?: string, - moveFocusByOneWeek?: string, - moveFocusByOneMonth?: string, - moveFocustoStartAndEndOfWeek?: string, - returnFocusToInput?: string, - keyboardNavigationInstructions?: string, - chooseAvailableDate?: (date: string) => string, - dateIsUnavailable?: (date: string) => string, - dateIsSelected?: (date: string) => string, + type SingleDatePickerPhrases = { + calendarLabel?: string; + closeDatePicker?: string; + clearDate?: string; + jumpToPrevMonth?: string; + jumpToNextMonth?: string; + keyboardShortcuts?: string; + showKeyboardShortcutsPanel?: string; + hideKeyboardShortcutsPanel?: string; + openThisPanel?: string; + enterKey?: string; + leftArrowRightArrow?: string; + upArrowDownArrow?: string; + pageUpPageDown?: string; + homeEnd?: string; + escape?: string; + questionMark?: string; + selectFocusedDate?: string; + moveFocusByOneDay?: string; + moveFocusByOneWeek?: string; + moveFocusByOneMonth?: string; + moveFocustoStartAndEndOfWeek?: string; + returnFocusToInput?: string; + keyboardNavigationInstructions?: string; + chooseAvailableDate?: (date: string) => string; + dateIsUnavailable?: (date: string) => string; + dateIsSelected?: (date: string) => string; }; // defaultPhrases.js type SingleDatePickerInputPhrases = { - clearDate?: string, - keyboardNavigationInstructions?: string, - } + clearDate?: string; + keyboardNavigationInstructions?: string; + }; // defaultPhrases.js type DayPickerPhrases = { - calendarLabel?: string, - jumpToPrevMonth?: string, - jumpToNextMonth?: string, - keyboardShortcuts?: string, - showKeyboardShortcutsPanel?: string, - hideKeyboardShortcutsPanel?: string, - openThisPanel?: string, - enterKey?: string, - leftArrowRightArrow?: string, - upArrowDownArrow?: string, - pageUpPageDown?: string, - homeEnd?: string, - escape?: string, - questionMark?: string, - selectFocusedDate?: string, - moveFocusByOneDay?: string, - moveFocusByOneWeek?: string, - moveFocusByOneMonth?: string, - moveFocustoStartAndEndOfWeek?: string, - returnFocusToInput?: string, - chooseAvailableStartDate?: (date: string) => string, - chooseAvailableEndDate?: (date: string) => string, - chooseAvailableDate?: (date: string) => string, - dateIsUnavailable?: (date: string) => string, - dateIsSelected?: (date: string) => string, + calendarLabel?: string; + jumpToPrevMonth?: string; + jumpToNextMonth?: string; + keyboardShortcuts?: string; + showKeyboardShortcutsPanel?: string; + hideKeyboardShortcutsPanel?: string; + openThisPanel?: string; + enterKey?: string; + leftArrowRightArrow?: string; + upArrowDownArrow?: string; + pageUpPageDown?: string; + homeEnd?: string; + escape?: string; + questionMark?: string; + selectFocusedDate?: string; + moveFocusByOneDay?: string; + moveFocusByOneWeek?: string; + moveFocusByOneMonth?: string; + moveFocustoStartAndEndOfWeek?: string; + returnFocusToInput?: string; + chooseAvailableStartDate?: (date: string) => string; + chooseAvailableEndDate?: (date: string) => string; + chooseAvailableDate?: (date: string) => string; + dateIsUnavailable?: (date: string) => string; + dateIsSelected?: (date: string) => string; }; // defaultPhrases.js type DayPickerKeyboardShortcutsPhrases = { - keyboardShortcuts?: string, - showKeyboardShortcutsPanel?: string, - hideKeyboardShortcutsPanel?: string, - openThisPanel?: string, - enterKey?: string, - leftArrowRightArrow?: string, - upArrowDownArrow?: string, - pageUpPageDown?: string, - homeEnd?: string, - escape?: string, - questionMark?: string, - selectFocusedDate?: string, - moveFocusByOneDay?: string, - moveFocusByOneWeek?: string, - moveFocusByOneMonth?: string, - moveFocustoStartAndEndOfWeek?: string, - returnFocusToInput?: string, + keyboardShortcuts?: string; + showKeyboardShortcutsPanel?: string; + hideKeyboardShortcutsPanel?: string; + openThisPanel?: string; + enterKey?: string; + leftArrowRightArrow?: string; + upArrowDownArrow?: string; + pageUpPageDown?: string; + homeEnd?: string; + escape?: string; + questionMark?: string; + selectFocusedDate?: string; + moveFocusByOneDay?: string; + moveFocusByOneWeek?: string; + moveFocusByOneMonth?: string; + moveFocustoStartAndEndOfWeek?: string; + returnFocusToInput?: string; }; // defaultPhrases.js type DayPickerNavigationPhrases = { - jumpToPrevMonth?: string, - jumpToNextMonth?: string, + jumpToPrevMonth?: string; + jumpToNextMonth?: string; }; - + // defaultPhrases.js type CalendarDayPhrases = { - chooseAvailableDate: (date: string) => string, - dateIsUnavailable: (date: string) => string, - dateIsSelected: (date: string) => string, + chooseAvailableDate: (date: string) => string; + dateIsUnavailable: (date: string) => string; + dateIsSelected: (date: string) => string; }; // COMPONENTS - // + // // components/DateRangePicker.js type DateRangePicker = React.ClassicComponentClass; var DateRangePicker: React.ClassicComponentClass; // components/DayPickerRangeController.jsx - interface DayPickerRangeControllerShape extends DayPickerShape{ + interface DayPickerRangeControllerShape extends DayPickerShape { // REQUIRED props - startDate: momentPropTypes.momentObj | null, - endDate: momentPropTypes.momentObj | null, - onDatesChange: (arg: { - startDate: momentPropTypes.momentObj | null, - endDate: momentPropTypes.momentObj | null - } - ) => void, - focusedInput: FocusedInputShape, - onFocusChange: (arg: FocusedInputShape | null) => void, + startDate: momentPropTypes.momentObj | null; + endDate: momentPropTypes.momentObj | null; + onDatesChange: ( + arg: { + startDate: momentPropTypes.momentObj | null; + endDate: momentPropTypes.momentObj | null; + } + ) => void; + focusedInput: FocusedInputShape; + onFocusChange: (arg: FocusedInputShape | null) => void; - startDateOffset?: (day: any) => any, - endDateOffset?: (day: any) => any, + startDateOffset?: (day: any) => any; + endDateOffset?: (day: any) => any; - onClose?: (final: { startDate: momentPropTypes.momentObj, endDate: momentPropTypes.momentObj }) => void, + onClose?: ( + final: { + startDate: momentPropTypes.momentObj; + endDate: momentPropTypes.momentObj; + } + ) => void; - keepOpenOnDateSelect?: boolean, - minimumNights?: number, - disabled?: DisabledShape, - isOutsideRange?: (day: any) => boolean, - isDayBlocked?: (day: any) => boolean, - isDayHighlighted?: (day: any) => boolean, + keepOpenOnDateSelect?: boolean; + minimumNights?: number; + disabled?: DisabledShape; + isOutsideRange?: (day: any) => boolean; + isDayBlocked?: (day: any) => boolean; + isDayHighlighted?: (day: any) => boolean; } - type DayPickerRangeController = React.ClassicComponentClass; - var DayPickerRangeController: React.ClassicComponentClass; + type DayPickerRangeController = React.ClassicComponentClass< + DayPickerRangeControllerShape + >; + var DayPickerRangeController: React.ClassicComponentClass< + DayPickerRangeControllerShape + >; // components/DayPickerShape.jsx interface DayPickerShape { - renderMonthText?: (day: momentPropTypes.momentObj) => (string | JSX.Element), + renderMonthText?: ( + day: momentPropTypes.momentObj + ) => string | JSX.Element; renderMonthElement?: ( props: { - month: momentPropTypes.momentObj; - onMonthSelect: (currentMonth: momentPropTypes.momentObj, newMonthVal: string) => void; - onYearSelect: (currentMonth: momentPropTypes.momentObj, newYearVal: string) => void; + month: momentPropTypes.momentObj; + onMonthSelect: ( + currentMonth: momentPropTypes.momentObj, + newMonthVal: string + ) => void; + onYearSelect: ( + currentMonth: momentPropTypes.momentObj, + newYearVal: string + ) => void; } - ) => string | JSX.Element, - enableOutsideDays?: boolean, - numberOfMonths?: number, - orientation?: ScrollableOrientationShape, - withPortal?: boolean, - initialVisibleMonth?: () => momentPropTypes.momentObj, - firstDayOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6, - hideKeyboardShortcutsPanel?: boolean, - daySize?: number, - verticalHeight?: number, - noBorder?: boolean, - transitionDuration?: number, + ) => string | JSX.Element; + enableOutsideDays?: boolean; + numberOfMonths?: number; + orientation?: ScrollableOrientationShape; + withPortal?: boolean; + initialVisibleMonth?: () => momentPropTypes.momentObj; + firstDayOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6; + hideKeyboardShortcutsPanel?: boolean; + daySize?: number; + verticalHeight?: number; + noBorder?: boolean; + transitionDuration?: number; - navPrev?: string | JSX.Element, - navNext?: string | JSX.Element, + navPrev?: string | JSX.Element; + navNext?: string | JSX.Element; - onPrevMonthClick?: (newCurrentMonth: momentPropTypes.momentObj) => void, - onNextMonthClick?: (newCurrentMonth: momentPropTypes.momentObj) => void, - onOutsideClick?: (e: any) => void, - renderCalendarDay?: (day: momentPropTypes.momentObj) => (string | JSX.Element), - renderDayContents?: (day: momentPropTypes.momentObj) => (string | JSX.Element), - renderCalendarInfo?: () => (string | JSX.Element), - calendarInfoPosition?: CalendarInfoPositionShape, + onPrevMonthClick?: (newCurrentMonth: momentPropTypes.momentObj) => void; + onNextMonthClick?: (newCurrentMonth: momentPropTypes.momentObj) => void; + onOutsideClick?: (e: any) => void; + renderCalendarDay?: ( + day: momentPropTypes.momentObj + ) => string | JSX.Element; + renderDayContents?: ( + day: momentPropTypes.momentObj + ) => string | JSX.Element; + renderCalendarInfo?: () => string | JSX.Element; + calendarInfoPosition?: CalendarInfoPositionShape; // accessibility - onBlur?: () => void, - isFocused?: boolean, - showKeyboardShortcuts?: boolean, + onBlur?: () => void; + isFocused?: boolean; + showKeyboardShortcuts?: boolean; // i18n - monthFormat?: string, - weekDayFormat?: string, - phrases?: SingleDatePickerPhrases, - dayAriaLabelFormat?: string, + monthFormat?: string; + weekDayFormat?: string; + phrases?: SingleDatePickerPhrases; + dayAriaLabelFormat?: string; - isRTL?: boolean + isRTL?: boolean; } // components/DayPickerSingleDateController.jsx interface DayPickerSingleDateControllerShape extends DayPickerShape { - date: momentPropTypes.momentObj | null, - onDateChange: (date: momentPropTypes.momentObj | null) => void, - focused: boolean, - onFocusChange: (arg: { focused: boolean | null }) => void, + date: momentPropTypes.momentObj | null; + onDateChange: (date: momentPropTypes.momentObj | null) => void; + focused: boolean; + onFocusChange: (arg: { focused: boolean | null }) => void; - onClose?: (final: { date: momentPropTypes.momentObj }) => void, + onClose?: (final: { date: momentPropTypes.momentObj }) => void; - keepOpenOnDateSelect?: boolean, - isOutsideRange?: (day: any) => boolean, - isDayBlocked?: (day: any) => boolean, - isDayHighlighted?: (day: any) => boolean, + keepOpenOnDateSelect?: boolean; + isOutsideRange?: (day: any) => boolean; + isDayBlocked?: (day: any) => boolean; + isDayHighlighted?: (day: any) => boolean; } - type DayPickerSingleDateController = React.ClassicComponentClass; - var DayPickerSingleDateController: React.ClassicComponentClass; + type DayPickerSingleDateController = React.ClassicComponentClass< + DayPickerSingleDateControllerShape + >; + var DayPickerSingleDateController: React.ClassicComponentClass< + DayPickerSingleDateControllerShape + >; // components/SingleDatePicker.js type SingleDatePicker = React.ClassicComponentClass; @@ -479,9 +541,18 @@ declare namespace ReactDates { // utils/isSameDay.js var isSameDay: (a: moment.Moment, b: moment.Moment) => boolean; // utils/toISODateString.js - var toISODateString: (date: moment.MomentInput, currentFormat: moment.MomentFormatSpecification) => string | null; + var toISODateString: ( + date: moment.MomentInput, + currentFormat: moment.MomentFormatSpecification + ) => string | null; // utils/toLocalizedDateString.js - var toLocalizedDateString: (date: moment.MomentInput, currentFormat: moment.MomentFormatSpecification) => string | null; + var toLocalizedDateString: ( + date: moment.MomentInput, + currentFormat: moment.MomentFormatSpecification + ) => string | null; // utils/toMomentObject.js - var toMomentObject: (dateString: moment.MomentInput, customFormat: moment.MomentFormatSpecification) => moment.Moment | null; + var toMomentObject: ( + dateString: moment.MomentInput, + customFormat: moment.MomentFormatSpecification + ) => moment.Moment | null; } From fe68a448fbefa2874d3cc2cf5890204016cb179e Mon Sep 17 00:00:00 2001 From: "h.naoufal" Date: Fri, 30 Nov 2018 13:16:38 +0100 Subject: [PATCH 195/608] Adding missing inputIconPosition to interface DateRangePickerShape --adjust code styling --- types/react-dates/index.d.ts | 110 ++++++++++------------------------- 1 file changed, 30 insertions(+), 80 deletions(-) diff --git a/types/react-dates/index.d.ts b/types/react-dates/index.d.ts index 911dfc75c8..5596dbef42 100644 --- a/types/react-dates/index.d.ts +++ b/types/react-dates/index.d.ts @@ -7,8 +7,8 @@ // Required fields are made according to 'minimum REQUIRED setup' in https://github.com/airbnb/react-dates/blob/master/README.md -import * as React from "react"; -import * as moment from "moment"; +import * as React from 'react'; +import * as moment from 'moment'; export = ReactDates; @@ -22,10 +22,10 @@ declare namespace ReactDates { // SHAPES // // shapes/AnchorDirectionShape.js - type AnchorDirectionShape = "left" | "right"; + type AnchorDirectionShape = 'left' | 'right'; // shapes/CalendarInfoPositionShape.js - type CalendarInfoPositionShape = "top" | "bottom" | "before" | "after"; + type CalendarInfoPositionShape = 'top' | 'bottom' | 'before' | 'after'; // shapes/DateRangePickerShape.js interface DateRangePickerShape { @@ -71,20 +71,12 @@ declare namespace ReactDates { keepFocusOnInput?: boolean; // calendar presentation and interaction related props - renderMonthText?: ( - day: momentPropTypes.momentObj - ) => string | JSX.Element; + renderMonthText?: (day: momentPropTypes.momentObj) => string | JSX.Element; renderMonthElement?: ( props: { month: momentPropTypes.momentObj; - onMonthSelect: ( - currentMonth: momentPropTypes.momentObj, - newMonthVal: string - ) => void; - onYearSelect: ( - currentMonth: momentPropTypes.momentObj, - newYearVal: string - ) => void; + onMonthSelect: (currentMonth: momentPropTypes.momentObj, newMonthVal: string) => void; + onYearSelect: (currentMonth: momentPropTypes.momentObj, newYearVal: string) => void; } ) => string | JSX.Element; orientation?: OrientationShape; @@ -116,12 +108,8 @@ declare namespace ReactDates { onNextMonthClick?: (newCurrentMonth: momentPropTypes.momentObj) => void; // day presentation and interaction related props - renderCalendarDay?: ( - day: momentPropTypes.momentObj - ) => string | JSX.Element; - renderDayContents?: ( - day: momentPropTypes.momentObj - ) => string | JSX.Element; + renderCalendarDay?: (day: momentPropTypes.momentObj) => string | JSX.Element; + renderDayContents?: (day: momentPropTypes.momentObj) => string | JSX.Element; minimumNights?: number; enableOutsideDays?: boolean; isDayBlocked?: (day: any) => boolean; @@ -140,25 +128,22 @@ declare namespace ReactDates { type DayOfWeekShape = 0 | 1 | 2 | 3 | 4 | 5 | 6; // shapes/DisabledShape.js - type DisabledShape = boolean | "startDate" | "endDate"; + type DisabledShape = boolean | 'startDate' | 'endDate'; // shapes/FocusedInputShape.js - type FocusedInputShape = "startDate" | "endDate"; + type FocusedInputShape = 'startDate' | 'endDate'; // shape/IconPositionShape.js - type IconPositionShape = "before" | "after"; + type IconPositionShape = 'before' | 'after'; // type/OpenDirectionShape.js - type OpenDirectionShape = "down" | "up"; + type OpenDirectionShape = 'down' | 'up'; // shpae/OrientationShape.js - type OrientationShape = "horizontal" | "vertical"; + type OrientationShape = 'horizontal' | 'vertical'; // shape/ScrollableOrientationShape.js - type ScrollableOrientationShape = - | "horizontal" - | "vertical" - | "verticalScrollable"; + type ScrollableOrientationShape = 'horizontal' | 'vertical' | 'verticalScrollable'; // shapes/SingleDatePickerShape.js interface SingleDatePickerShape { @@ -190,20 +175,12 @@ declare namespace ReactDates { keepFocusOnInput?: boolean; // calendar presentation and interaction related props - renderMonthText?: ( - day: momentPropTypes.momentObj - ) => string | JSX.Element; + renderMonthText?: (day: momentPropTypes.momentObj) => string | JSX.Element; renderMonthElement?: ( props: { month: momentPropTypes.momentObj; - onMonthSelect: ( - currentMonth: momentPropTypes.momentObj, - newMonthVal: string - ) => void; - onYearSelect: ( - currentMonth: momentPropTypes.momentObj, - newYearVal: string - ) => void; + onMonthSelect: (currentMonth: momentPropTypes.momentObj, newMonthVal: string) => void; + onYearSelect: (currentMonth: momentPropTypes.momentObj, newYearVal: string) => void; } ) => string | JSX.Element; orientation?: OrientationShape; @@ -240,12 +217,8 @@ declare namespace ReactDates { ) => void; // day presentation and interaction related props - renderCalendarDay?: ( - day: momentPropTypes.momentObj - ) => string | JSX.Element; - renderDayContents?: ( - day: momentPropTypes.momentObj - ) => string | JSX.Element; + renderCalendarDay?: (day: momentPropTypes.momentObj) => string | JSX.Element; + renderDayContents?: (day: momentPropTypes.momentObj) => string | JSX.Element; enableOutsideDays?: boolean; isDayBlocked?: (day: any) => boolean; isOutsideRange?: (day: any) => boolean; @@ -438,29 +411,17 @@ declare namespace ReactDates { isDayHighlighted?: (day: any) => boolean; } - type DayPickerRangeController = React.ClassicComponentClass< - DayPickerRangeControllerShape - >; - var DayPickerRangeController: React.ClassicComponentClass< - DayPickerRangeControllerShape - >; + type DayPickerRangeController = React.ClassicComponentClass; + var DayPickerRangeController: React.ClassicComponentClass; // components/DayPickerShape.jsx interface DayPickerShape { - renderMonthText?: ( - day: momentPropTypes.momentObj - ) => string | JSX.Element; + renderMonthText?: (day: momentPropTypes.momentObj) => string | JSX.Element; renderMonthElement?: ( props: { month: momentPropTypes.momentObj; - onMonthSelect: ( - currentMonth: momentPropTypes.momentObj, - newMonthVal: string - ) => void; - onYearSelect: ( - currentMonth: momentPropTypes.momentObj, - newYearVal: string - ) => void; + onMonthSelect: (currentMonth: momentPropTypes.momentObj, newMonthVal: string) => void; + onYearSelect: (currentMonth: momentPropTypes.momentObj, newYearVal: string) => void; } ) => string | JSX.Element; enableOutsideDays?: boolean; @@ -481,12 +442,8 @@ declare namespace ReactDates { onPrevMonthClick?: (newCurrentMonth: momentPropTypes.momentObj) => void; onNextMonthClick?: (newCurrentMonth: momentPropTypes.momentObj) => void; onOutsideClick?: (e: any) => void; - renderCalendarDay?: ( - day: momentPropTypes.momentObj - ) => string | JSX.Element; - renderDayContents?: ( - day: momentPropTypes.momentObj - ) => string | JSX.Element; + renderCalendarDay?: (day: momentPropTypes.momentObj) => string | JSX.Element; + renderDayContents?: (day: momentPropTypes.momentObj) => string | JSX.Element; renderCalendarInfo?: () => string | JSX.Element; calendarInfoPosition?: CalendarInfoPositionShape; @@ -519,12 +476,8 @@ declare namespace ReactDates { isDayHighlighted?: (day: any) => boolean; } - type DayPickerSingleDateController = React.ClassicComponentClass< - DayPickerSingleDateControllerShape - >; - var DayPickerSingleDateController: React.ClassicComponentClass< - DayPickerSingleDateControllerShape - >; + type DayPickerSingleDateController = React.ClassicComponentClass; + var DayPickerSingleDateController: React.ClassicComponentClass; // components/SingleDatePicker.js type SingleDatePicker = React.ClassicComponentClass; @@ -541,10 +494,7 @@ declare namespace ReactDates { // utils/isSameDay.js var isSameDay: (a: moment.Moment, b: moment.Moment) => boolean; // utils/toISODateString.js - var toISODateString: ( - date: moment.MomentInput, - currentFormat: moment.MomentFormatSpecification - ) => string | null; + var toISODateString: (date: moment.MomentInput, currentFormat: moment.MomentFormatSpecification) => string | null; // utils/toLocalizedDateString.js var toLocalizedDateString: ( date: moment.MomentInput, From 38e1c355dd456e83be3a56e764febf2f1c819903 Mon Sep 17 00:00:00 2001 From: slyrz Date: Fri, 30 Nov 2018 13:23:22 +0100 Subject: [PATCH 196/608] Remove Promise in Request.frame function The type definition of the Request class declares the return type of the frame() function as Promise, but it should be Frame | null only. --- types/puppeteer/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/puppeteer/index.d.ts b/types/puppeteer/index.d.ts index cbb31f2fd0..d90f02f8b8 100644 --- a/types/puppeteer/index.d.ts +++ b/types/puppeteer/index.d.ts @@ -968,7 +968,7 @@ export interface Request { /** * @returns The `Frame` object that initiated the request, or `null` if navigating to error pages */ - frame(): Promise; + frame(): Frame | null; /** * An object with HTTP headers associated with the request. From c83d99b2fe77138c5d67dfe33e566140a690a23e Mon Sep 17 00:00:00 2001 From: Toby Li Date: Fri, 30 Nov 2018 15:28:29 +0000 Subject: [PATCH 197/608] Corrected notification duration to timeout, state restored to nomal --- types/openfin/index.d.ts | 6 +++--- types/openfin/openfin-tests.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/types/openfin/index.d.ts b/types/openfin/index.d.ts index 55ee5b6741..78b1801b0b 100644 --- a/types/openfin/index.d.ts +++ b/types/openfin/index.d.ts @@ -420,7 +420,7 @@ declare namespace fin { /** * The timeout for displaying a notification.Can be in milliseconds or "never". */ - duration?: number | "never"; + timeout?: number | "never"; /** * The url of the notification */ @@ -804,9 +804,9 @@ declare namespace fin { */ getSnapshot(callback?: (base64Snapshot: string) => void, errorCallback?: (reason: string) => void): void; /** - * Gets the current state ("minimized", "maximized", or "restored") of the window. + * Gets the current state ("minimized", "maximized", or "normal") of the window. */ - getState(callback?: (state: "minimized" | "maximized" | "restored") => void, errorCallback?: (reason: string) => void): void; + getState(callback?: (state: "minimized" | "maximized" | "normal") => void, errorCallback?: (reason: string) => void): void; /** * Returns the zoom level of the window. */ diff --git a/types/openfin/openfin-tests.ts b/types/openfin/openfin-tests.ts index 167a6c86be..e4430ff9c2 100644 --- a/types/openfin/openfin-tests.ts +++ b/types/openfin/openfin-tests.ts @@ -207,7 +207,7 @@ function test_notification() { notification.close(); // sendMessage notification = new fin.desktop.Notification({ - duration: 10, + timeout: 10, url: "http://localhost:5000/Account/Register", message: "Hello", onShow: () => { }, From 005314f76718b92006f94797a5f1b6d939a53f1d Mon Sep 17 00:00:00 2001 From: Alessandro Vergani Date: Fri, 30 Nov 2018 16:29:56 +0100 Subject: [PATCH 198/608] Update better-sqlite3 to match version 5.0 --- types/better-sqlite3/better-sqlite3-tests.ts | 42 ++++++++++++---- types/better-sqlite3/index.d.ts | 53 +++++++++++--------- types/better-sqlite3/tsconfig.json | 3 +- 3 files changed, 64 insertions(+), 34 deletions(-) diff --git a/types/better-sqlite3/better-sqlite3-tests.ts b/types/better-sqlite3/better-sqlite3-tests.ts index 7272d88f7e..cdc80f595e 100644 --- a/types/better-sqlite3/better-sqlite3-tests.ts +++ b/types/better-sqlite3/better-sqlite3-tests.ts @@ -6,7 +6,6 @@ const result: Database.RunResult = { changes: 1, lastInsertRowid: 1 }; const options: Database.Options = { fileMustExist: true, memory: true, readonly: true }; const registrationOptions: Database.RegistrationOptions = { deterministic: true, - name: '', safeIntegers: true, varargs: true }; @@ -15,26 +14,49 @@ let db = Database('.'); db = new Database('.', { memory: true }); db.exec('CREATE TABLE test (id INTEGER PRIMARY KEY NOT NULL, name TEXT NOT NULL);'); db.exec('INSERT INTO test(name) VALUES("name");'); -db.pragma('data_version', true); +db.pragma('data_version', { simple: true }); db.checkpoint(); db.checkpoint('main'); -db.register(() => { }); -db.register({ name: 'noop', deterministic: true, varargs: true }, () => { }); +db.function('noop', () => { }); +db.function('noop', { deterministic: true, varargs: true }, () => { }); +db.aggregate('add', { + start: 0, + step: (t, n) => t + n, + deterministic: true, + varargs: true +}); +db.aggregate('getAverage', { + start: () => [], + step: (array, nextValue) => { + array.push(nextValue); + }, + result: array => array.reduce((t: any, v: any) => t + v) / array.length, +}); +db.aggregate('addAll', { + start: 0, + step: (total, nextValue) => total + nextValue, + inverse: (total, droppedValue) => total - droppedValue, + result: total => Math.round(total), +}); db.defaultSafeIntegers(); db.defaultSafeIntegers(true); const stmt = db.prepare('SELECT * FROM test WHERE name == ?;'); stmt.get(['name']); stmt.all({ name: 'name' }); -stmt.each('name', (row: { name: string }) => { }); -stmt.each((row: { name: string }) => { }); +for (const row of stmt.iterate('name')) { +} stmt.pluck(); stmt.pluck(true); +stmt.expand(); +stmt.expand(true); stmt.bind('name'); stmt.safeIntegers(); stmt.safeIntegers(true); -const trans = db.transaction(['INSERT INTO test(name) VALUES(?);']); -trans.run('name'); -trans.bind('name'); -trans.run(); +const trans = db.transaction((param) => stmt.all(param)); +trans('name'); +trans.default('name'); +trans.default('name'); +trans.immediate('name'); +trans.exclusive('name'); diff --git a/types/better-sqlite3/index.d.ts b/types/better-sqlite3/index.d.ts index 5a4859e21f..abc85c3194 100644 --- a/types/better-sqlite3/index.d.ts +++ b/types/better-sqlite3/index.d.ts @@ -3,35 +3,32 @@ // Definitions by: Ben Davies // Mathew Rumsey // Santiago Aguilar +// Alessandro Vergani // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped import Integer = require("integer"); -declare class Statement { +interface Statement { database: Database; source: string; - returnsData: boolean; - constructor(db: Database, sources: string[]); + reader: boolean; run(...params: any[]): Database.RunResult; get(...params: any[]): any; all(...params: any[]): any[]; - each(params: any, cb: (row: any) => void): void; - each(cb: (row: any) => void): void; - each(...params: any[]): void; + iterate(...params: any[]): IterableIterator; pluck(toggleState?: boolean): this; + expand(toggleState?: boolean): this; bind(...params: any[]): this; safeIntegers(toggleState?: boolean): this; } -declare class Transaction { - database: Database; - source: string; - constructor(db: Database, sources: string[]); - - run(...params: any[]): Database.RunResult; - bind(...params: any[]): this; - safeIntegers(toggleState?: boolean): this; +interface Transaction { + (...params: any[]): any; + default(...params: any[]): any; + deferred(...params: any[]): any; + immediate(...params: any[]): any; + exclusive(...params: any[]): any; } interface Database { @@ -42,15 +39,14 @@ interface Database { inTransaction: boolean; prepare(source: string): Statement; - transaction(sources: string[]): Transaction; + transaction(fn: (...params: any[]) => any): Transaction; exec(source: string): this; - pragma(source: string, simplify?: boolean): any; + pragma(source: string, options?: Database.PragmaOptions): any; checkpoint(databaseName?: string): this; - register(cb: (...params: any[]) => any): this; - register( - options: Database.RegistrationOptions, - cb: (...params: any[]) => any - ): this; + function(name: string, cb: (...params: any[]) => any): this; + function(name: string, options: Database.RegistrationOptions, cb: (...params: any[]) => any): this; + aggregate(name: string, options: Database.AggregateOptions): this; + loadExtension(path: string): this; close(): this; defaultSafeIntegers(toggleState?: boolean): this; } @@ -63,7 +59,7 @@ declare class SqliteError implements Error { } interface DatabaseConstructor { - new (filename: string, options?: Database.Options): Database; + new(filename: string, options?: Database.Options): Database; (filename: string, options?: Database.Options): Database; prototype: Database; @@ -81,14 +77,25 @@ declare namespace Database { memory?: boolean; readonly?: boolean; fileMustExist?: boolean; + timeout?: number; + } + + interface PragmaOptions { + simple?: boolean; } interface RegistrationOptions { - name?: string; varargs?: boolean; deterministic?: boolean; safeIntegers?: boolean; } + + interface AggregateOptions extends RegistrationOptions { + start?: any; + step: (total: any, next: any) => any; + inverse?: (totla: any, dropped: any) => any; + result?: (totla: any) => any; + } } declare const Database: DatabaseConstructor; diff --git a/types/better-sqlite3/tsconfig.json b/types/better-sqlite3/tsconfig.json index 30a480355b..19cd56ac36 100644 --- a/types/better-sqlite3/tsconfig.json +++ b/types/better-sqlite3/tsconfig.json @@ -1,6 +1,7 @@ { "compilerOptions": { "module": "commonjs", + "target": "es6", "lib": [ "es6" ], @@ -20,4 +21,4 @@ "index.d.ts", "better-sqlite3-tests.ts" ] -} \ No newline at end of file +} From a386b24578934f1be2128e0f695485bd78a84f56 Mon Sep 17 00:00:00 2001 From: Fabio Tea Date: Fri, 30 Nov 2018 19:48:40 +0100 Subject: [PATCH 199/608] url-assembler: making 'strict: boolean' parameter of param functions optional as per api-definition of 1.2.10 --- types/url-assembler/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/url-assembler/index.d.ts b/types/url-assembler/index.d.ts index 3f33bf921a..e27fbbe58d 100644 --- a/types/url-assembler/index.d.ts +++ b/types/url-assembler/index.d.ts @@ -7,8 +7,8 @@ interface UrlAssembler { template(template: string): UrlAssembler; prefix(subPath: string): UrlAssembler; segment(subPathTemplate: string): UrlAssembler; - param(key: string, value: string, strict: boolean): UrlAssembler; - param(params: {[s: string]: any}, strict: boolean): UrlAssembler; + param(key: string, value: string, strict?: boolean): UrlAssembler; + param(params: {[s: string]: any}, strict?: boolean): UrlAssembler; query(key: string, value: any): UrlAssembler; query(params: {[s: string]: any}): UrlAssembler; toString(): string; From 8814139174714997d92831b3a41a3f9eee376fa4 Mon Sep 17 00:00:00 2001 From: Fabio Tea Date: Fri, 30 Nov 2018 19:56:58 +0100 Subject: [PATCH 200/608] [url-assembler]: making 'strict: boolean' parameter optional (+adjusted version comment) --- types/url-assembler/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/url-assembler/index.d.ts b/types/url-assembler/index.d.ts index e27fbbe58d..bce3adb35e 100644 --- a/types/url-assembler/index.d.ts +++ b/types/url-assembler/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for url-assembler 1.2 +// Type definitions for url-assembler 1.2.10 // Project: https://github.com/Floby/node-url-assembler // Definitions by: Wolfgang Faust // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped From 96d4557ecde6e7cedc60cf9fa6486aa19ffce841 Mon Sep 17 00:00:00 2001 From: Zak Angelle Date: Fri, 30 Nov 2018 12:53:15 -0600 Subject: [PATCH 201/608] yup: Add resolve type to TestContext --- types/yup/index.d.ts | 1 + types/yup/yup-tests.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/types/yup/index.d.ts b/types/yup/index.d.ts index 821b0e3526..7d93dd3326 100644 --- a/types/yup/index.d.ts +++ b/types/yup/index.d.ts @@ -206,6 +206,7 @@ export interface TestContext { options: ValidateOptions; parent: any; schema: Schema; + resolve: (value: any) => any; createError: (params: { path: string; message: string }) => ValidationError; } diff --git a/types/yup/yup-tests.ts b/types/yup/yup-tests.ts index efef78d319..b4dedc6bcb 100644 --- a/types/yup/yup-tests.ts +++ b/types/yup/yup-tests.ts @@ -174,6 +174,8 @@ const testContext = function(this: TestContext) { this.parent; // $ExpectType Schema this.schema; + // $ExpectType (value: any) => any + this.resolve; // $ExpectType ValidationError this.createError({ path: "1", message: "1" }); return true; From 86e80e4f78aee19a33d0864e5e18403b0a881f86 Mon Sep 17 00:00:00 2001 From: David Brett Date: Fri, 30 Nov 2018 14:12:07 -0500 Subject: [PATCH 202/608] Adding ProgressBarOptions to exports for progress --- types/progress/index.d.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/types/progress/index.d.ts b/types/progress/index.d.ts index 74596c4c13..6f6e2ea33d 100644 --- a/types/progress/index.d.ts +++ b/types/progress/index.d.ts @@ -10,22 +10,22 @@ /** * These are keys in the options object you can pass to the progress bar along with total as seen in the example above. */ -interface ProgressBarOptions { +export interface ProgressBarOptions { /** * Total number of ticks to complete. */ total: number; - + /** * current completed index */ - curr?: number; - + curr?: number; + /** * head character defaulting to complete character */ - head?: string; - + head?: string; + /** * The displayed width of the progress bar defaulting to total. */ @@ -120,7 +120,7 @@ declare class ProgressBar { * overall completion to. */ update(ratio: number, tokens?: any): void; - + /** * "interrupt" the progress bar and write a message above it. */ @@ -128,7 +128,7 @@ declare class ProgressBar { /** * Terminates a progress bar. - */ + */ terminate(): void; /** @@ -138,4 +138,4 @@ declare class ProgressBar { } declare namespace ProgressBar { } -export = ProgressBar; +export default ProgressBar; From 3dc3584b476342f732bdba4cb8612ff3d4113b62 Mon Sep 17 00:00:00 2001 From: Fabio Tea Date: Fri, 30 Nov 2018 21:07:18 +0100 Subject: [PATCH 203/608] [url-assembler]: fixed dt-header (removed patch-version) --- types/url-assembler/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/url-assembler/index.d.ts b/types/url-assembler/index.d.ts index bce3adb35e..e27fbbe58d 100644 --- a/types/url-assembler/index.d.ts +++ b/types/url-assembler/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for url-assembler 1.2.10 +// Type definitions for url-assembler 1.2 // Project: https://github.com/Floby/node-url-assembler // Definitions by: Wolfgang Faust // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped From c2cf09838355de2914d34c4b83a22388004274ff Mon Sep 17 00:00:00 2001 From: David Brett Date: Fri, 30 Nov 2018 15:13:16 -0500 Subject: [PATCH 204/608] Adding types for multi-progress --- types/multi-progress/index.d.ts | 42 +++++++++++ types/multi-progress/multi-progress-tests.ts | 18 +++++ types/multi-progress/tsconfig.json | 23 ++++++ types/multi-progress/tslint.json | 79 ++++++++++++++++++++ 4 files changed, 162 insertions(+) create mode 100644 types/multi-progress/index.d.ts create mode 100644 types/multi-progress/multi-progress-tests.ts create mode 100644 types/multi-progress/tsconfig.json create mode 100644 types/multi-progress/tslint.json diff --git a/types/multi-progress/index.d.ts b/types/multi-progress/index.d.ts new file mode 100644 index 0000000000..e1ae12a4e0 --- /dev/null +++ b/types/multi-progress/index.d.ts @@ -0,0 +1,42 @@ +// Type definitions for multi-progress v2.0.0 +// Project: https://github.com/pitaj/multi-progress +// Definitions by: David Brett +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import ProgressBar, { ProgressBarOptions } from '../progress' +import { Stream } from 'stream'; + +declare class MultiProgress { + /** + * Create a new @see MultiProgress with the given stream, or stderr by default + * @param stream A stream to write the progress bars to + */ + constructor(stream?: Stream) + + /** + * Add a new bar + */ + newBar: (format: string, options: ProgressBarOptions) => ProgressBar; + + /** + * Close all bars + */ + terminate: () => void; + + /** + * Render the given progress bar + */ + move: (index: number) => void; + + /** + * Move the bar indicated by index forward the number of steps indicated by value + */ + tick: (index: number, value: number, options?: any) => void; + + /** + * Update the bar indicated by index to the value given + */ + update: (index: number, value: number, options?: any) => void; +} diff --git a/types/multi-progress/multi-progress-tests.ts b/types/multi-progress/multi-progress-tests.ts new file mode 100644 index 0000000000..3397a48428 --- /dev/null +++ b/types/multi-progress/multi-progress-tests.ts @@ -0,0 +1,18 @@ +/** + * Example from https://github.com/pitaj/multi-progress + */ + +// require the library +var MultiProgress = require("multi-progress"); + +// spawn an instance with the optional stream to write to +// use of `new` is optional +var multi = new MultiProgress(process.stderr); + +// create a progress bar +var bar = multi.newBar(' downloading [:bar] :percent :etas', { + complete: '=', + incomplete: ' ', + width: 30, + total: 20 +}); diff --git a/types/multi-progress/tsconfig.json b/types/multi-progress/tsconfig.json new file mode 100644 index 0000000000..72100a32f7 --- /dev/null +++ b/types/multi-progress/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "multi-progress-tests.ts" + ] +} \ No newline at end of file diff --git a/types/multi-progress/tslint.json b/types/multi-progress/tslint.json new file mode 100644 index 0000000000..a41bf5d19a --- /dev/null +++ b/types/multi-progress/tslint.json @@ -0,0 +1,79 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "adjacent-overload-signatures": false, + "array-type": false, + "arrow-return-shorthand": false, + "ban-types": false, + "callable-types": false, + "comment-format": false, + "dt-header": false, + "eofline": false, + "export-just-namespace": false, + "import-spacing": false, + "interface-name": false, + "interface-over-type-literal": false, + "jsdoc-format": false, + "max-line-length": false, + "member-access": false, + "new-parens": false, + "no-any-union": false, + "no-boolean-literal-compare": false, + "no-conditional-assignment": false, + "no-consecutive-blank-lines": false, + "no-construct": false, + "no-declare-current-package": false, + "no-duplicate-imports": false, + "no-duplicate-variable": false, + "no-empty-interface": false, + "no-for-in-array": false, + "no-inferrable-types": false, + "no-internal-module": false, + "no-irregular-whitespace": false, + "no-mergeable-namespace": false, + "no-misused-new": false, + "no-namespace": false, + "no-object-literal-type-assertion": false, + "no-padding": false, + "no-redundant-jsdoc": false, + "no-redundant-jsdoc-2": false, + "no-redundant-undefined": false, + "no-reference-import": false, + "no-relative-import-in-test": false, + "no-self-import": false, + "no-single-declare-module": false, + "no-string-throw": false, + "no-unnecessary-callback-wrapper": false, + "no-unnecessary-class": false, + "no-unnecessary-generics": false, + "no-unnecessary-qualifier": false, + "no-unnecessary-type-assertion": false, + "no-useless-files": false, + "no-var-keyword": false, + "no-var-requires": false, + "no-void-expression": false, + "no-trailing-whitespace": false, + "object-literal-key-quotes": false, + "object-literal-shorthand": false, + "one-line": false, + "one-variable-per-declaration": false, + "only-arrow-functions": false, + "prefer-conditional-expression": false, + "prefer-const": false, + "prefer-declare-function": false, + "prefer-for-of": false, + "prefer-method-signature": false, + "prefer-template": false, + "radix": false, + "semicolon": false, + "space-before-function-paren": false, + "space-within-parens": false, + "strict-export-declare-modifiers": false, + "trim-file": false, + "triple-equals": false, + "typedef-whitespace": false, + "unified-signatures": false, + "void-return": false, + "whitespace": false + } +} From 2e2869dcd8f5cbc8be06e600d789dd9c99d08c46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Den=C3=A8le?= Date: Fri, 30 Nov 2018 21:51:13 +0100 Subject: [PATCH 205/608] [puppeteer] 1.11.0 update type definitions --- types/puppeteer/index.d.ts | 214 ++++++++++++++++++------------------- 1 file changed, 102 insertions(+), 112 deletions(-) diff --git a/types/puppeteer/index.d.ts b/types/puppeteer/index.d.ts index cbb31f2fd0..202cc05181 100644 --- a/types/puppeteer/index.d.ts +++ b/types/puppeteer/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for puppeteer 1.10 +// Type definitions for puppeteer 1.11 // Project: https://github.com/GoogleChrome/puppeteer#readme // Definitions by: Marvin Hagemeister // Christopher Deutsch @@ -398,6 +398,8 @@ export interface Cookie { path: string; /** The cookie Unix expiration time in seconds. */ expires: number; + /** The cookie size */ + size: number; /** The cookie http only flag. */ httpOnly: boolean; /** The session cookie flag. */ @@ -414,7 +416,6 @@ export interface DeleteCookie { url?: string; domain?: string; path?: string; - secure?: boolean; } export interface SetCookie { @@ -579,20 +580,20 @@ export interface PDFOptions { * @default 'Letter' */ format?: PDFFormat; - /** Paper width, accepts values labeled with units. */ - width?: string; - /** Paper height, accepts values labeled with units. */ - height?: string; + /** Paper width, accepts values labeled with units. Treat numbers as pixel values */ + width?: string | number; + /** Paper height, accepts values labeled with units. Treat numbers as pixel values */ + height?: string | number; /** Paper margins, defaults to none. */ margin?: { - /** Top margin, accepts values labeled with units. */ - top?: string; - /** Right margin, accepts values labeled with units. */ - right?: string; - /** Bottom margin, accepts values labeled with units. */ - bottom?: string; - /** Left margin, accepts values labeled with units. */ - left?: string; + /** Top margin, accepts values labeled with units. Treat numbers as pixel values */ + top?: string | number; + /** Right margin, accepts values labeled with units. Treat numbers as pixel values */ + right?: string | number; + /** Bottom margin, accepts values labeled with units. Treat numbers as pixel values */ + bottom?: string | number; + /** Left margin, accepts values labeled with units. Treat numbers as pixel values */ + left?: string | number; }; /** @@ -1177,8 +1178,9 @@ export interface FrameBase extends Evalable { /** * Sets the page content. * @param html HTML markup to assign to the page. + * @param options The navigation parameters. */ - setContent(html: string): Promise; + setContent(html: string, options?: NavigationOptions): Promise; /** * This method fetches an element with `selector`, scrolls it into view if needed, @@ -1395,11 +1397,11 @@ export interface AXNode { /** * Whether the checkbox is checked, or "mixed". */ - checked: boolean | string; + checked: boolean | "mixed"; /** * Whether the toggle button is checked, or "mixed". */ - pressed: boolean | string; + pressed: boolean | "mixed"; /** * The level of a heading. */ @@ -1620,9 +1622,9 @@ export interface Page extends EventEmitter, FrameBase { /** * Determines whether cache is enabled on the page. - * @param enabled Whether or not to enable cache on the page. + * @param enabled Whether or not to enable cache on the page. Defaults to true. */ - setCacheEnabled(enabled: boolean): Promise; + setCacheEnabled(enabled?: boolean): Promise; /** * Sets the cookies on the page. @@ -1934,26 +1936,6 @@ export interface Target { } export interface LaunchOptions extends Timeoutable { - /** - * Whether to open chrome in appMode. - * @default false - */ - appMode?: boolean; - /** - * Whether to ignore HTTPS errors during navigation. - * @default false - */ - ignoreHTTPSErrors?: boolean; - /** - * Do not use `puppeteer.defaultArgs()` for launching Chromium. - * @default false - */ - ignoreDefaultArgs?: boolean | string[]; - /** - * Whether to run Chromium in headless mode. - * @default true - */ - headless?: boolean; /** * Path to a Chromium executable to run instead of bundled Chromium. If * executablePath is a relative path, then it is resolved relative to current @@ -1961,10 +1943,73 @@ export interface LaunchOptions extends Timeoutable { */ executablePath?: string; /** - * Slows down Puppeteer operations by the specified amount of milliseconds. - * Useful so that you can see what is going on. + * Do not use `puppeteer.defaultArgs()` for launching Chromium. + * @default false */ - slowMo?: number; + ignoreDefaultArgs?: boolean | string[]; + /** + * Close chrome process on Ctrl-C. + * @default true + */ + handleSIGINT?: boolean; + /** + * Close chrome process on SIGTERM. + * @default true + */ + handleSIGTERM?: boolean; + /** + * Close chrome process on SIGHUP. + * @default true + */ + handleSIGHUP?: boolean; + /** + * Whether to pipe browser process stdout and stderr into process.stdout and + * process.stderr. + * @default false + */ + dumpio?: boolean; + /** + * Specify environment variables that will be visible to Chromium. + * @default `process.env`. + */ + env?: { + [key: string]: string | boolean | number; + }; + /** + * Connects to the browser over a pipe instead of a WebSocket. + * @default false + */ + pipe?: boolean; +} + +export interface ChromeArgOptions { + /** + * Whether to run browser in headless mode. + * @default true unless the devtools option is true. + */ + headless?: boolean; + /** + * Additional arguments to pass to the browser instance. + * The list of Chromium flags can be found here. + */ + args?: string[]; + /** + * Path to a User Data Directory. + */ + userDataDir?: string; + /** + * Whether to auto-open a DevTools panel for each tab. + * If this option is true, the headless option will be set false. + */ + devtools?: boolean; +} + +export interface BrowserOptions { + /** + * Whether to ignore HTTPS errors during navigation. + * @default false + */ + ignoreHTTPSErrors?: boolean; /** * Sets a consistent viewport for each page. Defaults to an 800x600 viewport. null disables the default viewport. */ @@ -2000,81 +2045,26 @@ export interface LaunchOptions extends Timeoutable { isLandscape?: boolean; }; /** - * Additional arguments to pass to the Chromium instance. List of Chromium - * flags can be found here. + * Slows down Puppeteer operations by the specified amount of milliseconds. + * Useful so that you can see what is going on. */ - args?: string[]; - /** - * Close chrome process on Ctrl-C. - * @default true - */ - handleSIGINT?: boolean; - /** - * Close chrome process on SIGTERM. - * @default true - */ - handleSIGTERM?: boolean; - /** - * Close chrome process on SIGHUP. - * @default true - */ - handleSIGHUP?: boolean; - /** - * Whether to pipe browser process stdout and stderr into process.stdout and - * process.stderr. - * @default false - */ - dumpio?: boolean; - /** Path to a User Data Directory. */ - userDataDir?: string; - /** - * Specify environment variables that will be visible to Chromium. - * @default `process.env`. - */ - env?: { - [key: string]: string | boolean | number; - }; - /** - * Whether to auto-open DevTools panel for each tab. If this option is true, the headless option will be set false. - */ - devtools?: boolean; - /** - * Connects to the browser over a pipe instead of a WebSocket. - * @default false - */ - pipe?: boolean; -} - -export interface DefaultArgsOptions { - /** - * Whether to run browser in headless mode. - * @default true unless the devtools option is true. - */ - headless?: boolean; - /** - * Additional arguments to pass to the browser instance. - * The list of Chromium flags can be found here. - */ - args?: string[]; - /** - * Path to a User Data Directory. - */ - userDataDir?: string; - /** - * Whether to auto-open a DevTools panel for each tab. - * If this option is true, the headless option will be set false. - */ - devtools?: boolean; + slowMo?: number; } export interface ConnectOptions { /** A browser websocket endpoint to connect to. */ browserWSEndpoint?: string; /** - * Whether to ignore HTTPS errors during navigation. - * @default false + * **Experimental** Specify a custom transport object for Puppeteer to use. */ - ignoreHTTPSErrors?: boolean; + transport?: ConnectionTransport; +} + +export interface ConnectionTransport { + send: (message: string) => void; + close: () => void; + onmessage?: (message: string) => void; + onclose?: () => void; } export interface CDPSession extends EventEmitter { @@ -2117,10 +2107,10 @@ export interface CoverageEntry { } /** Attaches Puppeteer to an existing Chromium instance */ -export function connect(options?: ConnectOptions): Promise; +export function connect(options?: ConnectOptions & BrowserOptions): Promise; /** The default flags that Chromium will be launched with */ -export function defaultArgs(options?: DefaultArgsOptions): string[]; +export function defaultArgs(options?: ChromeArgOptions): string[]; /** Path where Puppeteer expects to find bundled Chromium */ export function executablePath(): string; /** The method launches a browser instance with given arguments. The browser will be closed when the parent node.js process is closed. */ -export function launch(options?: LaunchOptions): Promise; +export function launch(options?: LaunchOptions & ChromeArgOptions & BrowserOptions): Promise; From 30a14bb78ef80d38789c512debb8b8fa185c6846 Mon Sep 17 00:00:00 2001 From: Mark Wolff Date: Fri, 30 Nov 2018 14:03:07 -0800 Subject: [PATCH 206/608] Update docs comment for start/stoptrackpage --- types/applicationinsights-js/index.d.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/types/applicationinsights-js/index.d.ts b/types/applicationinsights-js/index.d.ts index b86dc23634..ee509a0eb5 100644 --- a/types/applicationinsights-js/index.d.ts +++ b/types/applicationinsights-js/index.d.ts @@ -670,13 +670,15 @@ declare module Microsoft.ApplicationInsights { context: ITelemetryContext; queue: Array<() => void>; /** - * Starts timing how long the user views a page or other item. Call this when the page opens. - * This method doesn't send any telemetry. Call {@link stopTrackTelemetry} to log the page when it closes. + * Starts the timer for tracking a page load time. Use this instead of `trackPageView` if you want to control when the page view timer starts and stops, + * but don't want to calculate the duration yourself. This method doesn't send any telemetry. Call `stopTrackPage` to log the end of the page view + * and send the event. * @param name A string that idenfities this item, unique within this HTML document. Defaults to the document title. */ startTrackPage(name?: string): any; /** - * Logs how long a page or other item was visible, after {@link startTrackPage}. Call this when the page closes. + * Stops the timer that was started by calling `startTrackPage` and sends the pageview load time telemetry with the specified properties and measurements. + * The duration of the page view will be the time between calling `startTrackPage` and `stopTrackPage`. * @param name The string you used as the name in startTrackPage. Defaults to the document title. * @param url String - a relative or absolute URL that identifies the page or other item. Defaults to the window location. * @param properties map[string, string] - additional data used to filter pages and metrics in the portal. Defaults to empty. From 1916f716dc67551c639b323a14064c7b9f74562e Mon Sep 17 00:00:00 2001 From: Wayne Carson Date: Fri, 30 Nov 2018 15:41:13 -0800 Subject: [PATCH 207/608] Added flush() method to debounce (see https://git.io/fpoYM) --- types/debounce/debounce-tests.ts | 3 +++ types/debounce/index.d.ts | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/types/debounce/debounce-tests.ts b/types/debounce/debounce-tests.ts index 4acff7c446..5f0463a4c1 100644 --- a/types/debounce/debounce-tests.ts +++ b/types/debounce/debounce-tests.ts @@ -14,6 +14,9 @@ const imm1: number = (debounce((x: number) => x * 2, 100, true))(2); const clearable = debounce(doThings); clearable.clear(); +const flushable = debounce(doThings); +flushable.flush(); + // Intentionally asserts that the member variable has all the same benefits as the direct export. // Eventually, if debounce stop supporting the CommonJS-only module calling (`require("debounce")(...)`), // we can remove this and change the top import&require to `import { debounce } from "debounce";`. diff --git a/types/debounce/index.d.ts b/types/debounce/index.d.ts index fa244351d6..bef99f2c86 100644 --- a/types/debounce/index.d.ts +++ b/types/debounce/index.d.ts @@ -1,13 +1,15 @@ -// Type definitions for debounce 3.0 +// Type definitions for debounce 1.2.0 // Project: https://github.com/component/debounce // Definitions by: Denis Sokolov // Josh Goldberg +// Wayne Carson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace _debounce { const debounce: typeof _debounce; } -declare function _debounce(f: A, interval?: number, immediate?: boolean): A & { clear(): void; }; +declare function _debounce(f: A, interval?: number, immediate?: boolean): A & { clear(): void; } + & { flush(): void }; export = _debounce; From 6645ba33d52edd3303ae58bf81ce6b29042bd924 Mon Sep 17 00:00:00 2001 From: Wayne Carson Date: Fri, 30 Nov 2018 16:12:54 -0800 Subject: [PATCH 208/608] Fixed DT header version convention issue. --- types/debounce/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/debounce/index.d.ts b/types/debounce/index.d.ts index bef99f2c86..e561cb51fe 100644 --- a/types/debounce/index.d.ts +++ b/types/debounce/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for debounce 1.2.0 +// Type definitions for debounce 1.2 // Project: https://github.com/component/debounce // Definitions by: Denis Sokolov // Josh Goldberg From f86366a401ca98ebaa7aa3ec4a0ef5391970eee7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Den=C3=A8le?= Date: Sat, 1 Dec 2018 02:44:09 +0100 Subject: [PATCH 209/608] Prefer notation without arrow function --- types/puppeteer/index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/types/puppeteer/index.d.ts b/types/puppeteer/index.d.ts index 202cc05181..813f256835 100644 --- a/types/puppeteer/index.d.ts +++ b/types/puppeteer/index.d.ts @@ -2061,10 +2061,10 @@ export interface ConnectOptions { } export interface ConnectionTransport { - send: (message: string) => void; - close: () => void; - onmessage?: (message: string) => void; - onclose?: () => void; + send(message: string): void; + close(): void; + onmessage?(message: string): void; + onclose?(): void; } export interface CDPSession extends EventEmitter { From 0a82ed88126e5b99a876aa5514ce2beedb9f441a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Den=C3=A8le?= Date: Sat, 1 Dec 2018 02:45:40 +0100 Subject: [PATCH 210/608] Remove empty line --- types/puppeteer/index.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/types/puppeteer/index.d.ts b/types/puppeteer/index.d.ts index 813f256835..fe4fb0d14a 100644 --- a/types/puppeteer/index.d.ts +++ b/types/puppeteer/index.d.ts @@ -2033,7 +2033,6 @@ export interface BrowserOptions { */ isMobile?: boolean; /** - * * Specifies if viewport supports touch events. * @default false */ From b506cfa9c04bbeff9866b50a0712808b45ea171b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Den=C3=A8le?= Date: Sat, 1 Dec 2018 03:01:35 +0100 Subject: [PATCH 211/608] Define type for layout dimension --- types/puppeteer/index.d.ts | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/types/puppeteer/index.d.ts b/types/puppeteer/index.d.ts index fe4fb0d14a..1b675b20c5 100644 --- a/types/puppeteer/index.d.ts +++ b/types/puppeteer/index.d.ts @@ -513,6 +513,9 @@ export interface DirectNavigationOptions extends NavigationOptions { referer?: string; } +/** Accepts values labeled with units. If number, treat as pixels. */ +export type LayoutDimension = string | number; + export type PDFFormat = | "Letter" | "Legal" @@ -580,22 +583,21 @@ export interface PDFOptions { * @default 'Letter' */ format?: PDFFormat; - /** Paper width, accepts values labeled with units. Treat numbers as pixel values */ - width?: string | number; - /** Paper height, accepts values labeled with units. Treat numbers as pixel values */ - height?: string | number; - /** Paper margins, defaults to none. */ + /** Paper width. */ + width?: LayoutDimension; + /** Paper height. */ + height?: LayoutDimension; + /** Paper margins, defaults to none. */ margin?: { - /** Top margin, accepts values labeled with units. Treat numbers as pixel values */ - top?: string | number; - /** Right margin, accepts values labeled with units. Treat numbers as pixel values */ - right?: string | number; - /** Bottom margin, accepts values labeled with units. Treat numbers as pixel values */ - bottom?: string | number; - /** Left margin, accepts values labeled with units. Treat numbers as pixel values */ - left?: string | number; + /** Top margin. */ + top?: LayoutDimension; + /** Right margin. */ + right?: LayoutDimension; + /** Bottom margin. */ + bottom?: LayoutDimension; + /** Left margin. */ + left?: LayoutDimension; }; - /** * Give any CSS @page size declared in the page priority over what is declared in width and * height or format options. From 8775d384e1fccf160bc9727d076ffdc23ae53c05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Den=C3=A8le?= Date: Sat, 1 Dec 2018 03:17:17 +0100 Subject: [PATCH 212/608] Extends interfaces for ConnectOptions & LaunchOptions --- types/puppeteer/index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/types/puppeteer/index.d.ts b/types/puppeteer/index.d.ts index 1b675b20c5..e48e29b7ec 100644 --- a/types/puppeteer/index.d.ts +++ b/types/puppeteer/index.d.ts @@ -1937,7 +1937,7 @@ export interface Target { url(): string; } -export interface LaunchOptions extends Timeoutable { +export interface LaunchOptions extends ChromeArgOptions, BrowserOptions, Timeoutable { /** * Path to a Chromium executable to run instead of bundled Chromium. If * executablePath is a relative path, then it is resolved relative to current @@ -2052,7 +2052,7 @@ export interface BrowserOptions { slowMo?: number; } -export interface ConnectOptions { +export interface ConnectOptions extends BrowserOptions { /** A browser websocket endpoint to connect to. */ browserWSEndpoint?: string; /** @@ -2108,10 +2108,10 @@ export interface CoverageEntry { } /** Attaches Puppeteer to an existing Chromium instance */ -export function connect(options?: ConnectOptions & BrowserOptions): Promise; +export function connect(options?: ConnectOptions): Promise; /** The default flags that Chromium will be launched with */ export function defaultArgs(options?: ChromeArgOptions): string[]; /** Path where Puppeteer expects to find bundled Chromium */ export function executablePath(): string; /** The method launches a browser instance with given arguments. The browser will be closed when the parent node.js process is closed. */ -export function launch(options?: LaunchOptions & ChromeArgOptions & BrowserOptions): Promise; +export function launch(options?: LaunchOptions): Promise; From 37bcddb3e7247ada9dceca821eaaecfbc5cbde4f Mon Sep 17 00:00:00 2001 From: Yu Shimura Date: Sat, 1 Dec 2018 11:55:06 +0900 Subject: [PATCH 213/608] Parsed result now statically typed --- types/binary-parser/binary-parser-tests.ts | 25 +++ types/binary-parser/index.d.ts | 187 ++++++++++++--------- 2 files changed, 133 insertions(+), 79 deletions(-) diff --git a/types/binary-parser/binary-parser-tests.ts b/types/binary-parser/binary-parser-tests.ts index d0d09e5ef7..9eca89211c 100644 --- a/types/binary-parser/binary-parser-tests.ts +++ b/types/binary-parser/binary-parser-tests.ts @@ -93,3 +93,28 @@ const parser5 = new Parser() length: '4', formatter: (arr) => { } }); + +const parser6 = new Parser() + .nest("nested", { + type: new Parser() + .array("points", { + type: new Parser() + .uint8("x") + .uint8("y"), + length: 2 + }) + }) + .choice("optional", { + tag: "nested.points[0].x", + choices: { + 1: new Parser() + .uint8("number") + } + }); + +const result = parser6.parse(Buffer.from([0x01, 0x02, 0x03, 0x04, 0x05])); + +// See the inferred static types on the IntelliSense. +result.nested.points[0].x; +result.nested.points[1].y; +result.optional.number; diff --git a/types/binary-parser/index.d.ts b/types/binary-parser/index.d.ts index 657996bd8d..b16f433e55 100644 --- a/types/binary-parser/index.d.ts +++ b/types/binary-parser/index.d.ts @@ -1,88 +1,117 @@ // Type definitions for binary-parser 1.3 // Project: https://github.com/keichi/binary-parser -// Definitions by: Benjamin Riggs , Dolan Miu +// Definitions by: Benjamin Riggs , +// Dolan Miu , +// Yu Shimura // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 /// -export interface Parser { - parse(buffer: Buffer, callback?: (err?: Error, result?: any) => void): Parser.Parsed; +export interface Parser { + parse(buffer: Buffer, callback?: (err?: Error, result?: any) => void): Parser.Parsed; create(constructorFunction: ObjectConstructor): Parser; - int8(name: string, options?: Parser.Options): Parser; - uint8(name: string, options?: Parser.Options): Parser; + int8(name: N, options?: Parser.Options): Parser.Next; + uint8(name: N, options?: Parser.Options): Parser.Next; - int16(name: string, options?: Parser.Options): Parser; - uint16(name: string, options?: Parser.Options): Parser; - int16le(name: string, options?: Parser.Options): Parser; - int16be(name: string, options?: Parser.Options): Parser; - uint16le(name: string, options?: Parser.Options): Parser; - uint16be(name: string, options?: Parser.Options): Parser; + int16(name: N, options?: Parser.Options): Parser.Next; + uint16(name: N, options?: Parser.Options): Parser.Next; + int16le(name: N, options?: Parser.Options): Parser.Next; + int16be(name: N, options?: Parser.Options): Parser.Next; + uint16le(name: N, options?: Parser.Options): Parser.Next; + uint16be(name: N, options?: Parser.Options): Parser.Next; - int32(name: string, options?: Parser.Options): Parser; - uint32(name: string, options?: Parser.Options): Parser; - int32le(name: string, options?: Parser.Options): Parser; - int32be(name: string, options?: Parser.Options): Parser; - uint32le(name: string, options?: Parser.Options): Parser; - uint32be(name: string, options?: Parser.Options): Parser; + int32(name: N, options?: Parser.Options): Parser.Next; + uint32(name: N, options?: Parser.Options): Parser.Next; + int32le(name: N, options?: Parser.Options): Parser.Next; + int32be(name: N, options?: Parser.Options): Parser.Next; + uint32le(name: N, options?: Parser.Options): Parser.Next; + uint32be(name: N, options?: Parser.Options): Parser.Next; - bit1(name: string, options?: Parser.Options): Parser; - bit2(name: string, options?: Parser.Options): Parser; - bit3(name: string, options?: Parser.Options): Parser; - bit4(name: string, options?: Parser.Options): Parser; - bit5(name: string, options?: Parser.Options): Parser; - bit6(name: string, options?: Parser.Options): Parser; - bit7(name: string, options?: Parser.Options): Parser; - bit8(name: string, options?: Parser.Options): Parser; - bit9(name: string, options?: Parser.Options): Parser; - bit10(name: string, options?: Parser.Options): Parser; - bit11(name: string, options?: Parser.Options): Parser; - bit12(name: string, options?: Parser.Options): Parser; - bit13(name: string, options?: Parser.Options): Parser; - bit14(name: string, options?: Parser.Options): Parser; - bit15(name: string, options?: Parser.Options): Parser; - bit16(name: string, options?: Parser.Options): Parser; - bit17(name: string, options?: Parser.Options): Parser; - bit18(name: string, options?: Parser.Options): Parser; - bit19(name: string, options?: Parser.Options): Parser; - bit20(name: string, options?: Parser.Options): Parser; - bit21(name: string, options?: Parser.Options): Parser; - bit22(name: string, options?: Parser.Options): Parser; - bit23(name: string, options?: Parser.Options): Parser; - bit24(name: string, options?: Parser.Options): Parser; - bit25(name: string, options?: Parser.Options): Parser; - bit26(name: string, options?: Parser.Options): Parser; - bit27(name: string, options?: Parser.Options): Parser; - bit28(name: string, options?: Parser.Options): Parser; - bit29(name: string, options?: Parser.Options): Parser; - bit30(name: string, options?: Parser.Options): Parser; - bit31(name: string, options?: Parser.Options): Parser; - bit32(name: string, options?: Parser.Options): Parser; + bit1(name: N, options?: Parser.Options): Parser.Next; + bit2(name: N, options?: Parser.Options): Parser.Next; + bit3(name: N, options?: Parser.Options): Parser.Next; + bit4(name: N, options?: Parser.Options): Parser.Next; + bit5(name: N, options?: Parser.Options): Parser.Next; + bit6(name: N, options?: Parser.Options): Parser.Next; + bit7(name: N, options?: Parser.Options): Parser.Next; + bit8(name: N, options?: Parser.Options): Parser.Next; + bit9(name: N, options?: Parser.Options): Parser.Next; + bit10(name: N, options?: Parser.Options): Parser.Next; + bit11(name: N, options?: Parser.Options): Parser.Next; + bit12(name: N, options?: Parser.Options): Parser.Next; + bit13(name: N, options?: Parser.Options): Parser.Next; + bit14(name: N, options?: Parser.Options): Parser.Next; + bit15(name: N, options?: Parser.Options): Parser.Next; + bit16(name: N, options?: Parser.Options): Parser.Next; + bit17(name: N, options?: Parser.Options): Parser.Next; + bit18(name: N, options?: Parser.Options): Parser.Next; + bit19(name: N, options?: Parser.Options): Parser.Next; + bit20(name: N, options?: Parser.Options): Parser.Next; + bit21(name: N, options?: Parser.Options): Parser.Next; + bit22(name: N, options?: Parser.Options): Parser.Next; + bit23(name: N, options?: Parser.Options): Parser.Next; + bit24(name: N, options?: Parser.Options): Parser.Next; + bit25(name: N, options?: Parser.Options): Parser.Next; + bit26(name: N, options?: Parser.Options): Parser.Next; + bit27(name: N, options?: Parser.Options): Parser.Next; + bit28(name: N, options?: Parser.Options): Parser.Next; + bit29(name: N, options?: Parser.Options): Parser.Next; + bit30(name: N, options?: Parser.Options): Parser.Next; + bit31(name: N, options?: Parser.Options): Parser.Next; + bit32(name: N, options?: Parser.Options): Parser.Next; - float(name: string, options?: Parser.Options): Parser; - floatle(name: string, options?: Parser.Options): Parser; - floatbe(name: string, options?: Parser.Options): Parser; + float(name: N, options?: Parser.Options): Parser.Next; + floatle(name: N, options?: Parser.Options): Parser.Next; + floatbe(name: N, options?: Parser.Options): Parser.Next; - double(name: string, options?: Parser.Options): Parser; - doublele(name: string, options?: Parser.Options): Parser; - doublebe(name: string, options?: Parser.Options): Parser; + double(name: N, options?: Parser.Options): Parser.Next; + doublele(name: N, options?: Parser.Options): Parser.Next; + doublebe(name: N, options?: Parser.Options): Parser.Next; - string(name: string, options?: Parser.StringOptions): Parser; + string(name: N, options?: Parser.StringOptions): Parser.Next; - buffer(name: string, options: Parser.BufferOptions): Parser; + buffer(name: N, options: Parser.BufferOptions): Parser.Next; - array(name: string, options: Parser.ArrayOptions): Parser; + array(name: N, options: Q): Parser.Next + ? O extends undefined ? Array<{}> : O[] + : T extends string + ? number[] + : never + : never + >; - choice(name: string, options: Parser.ChoiceOptions): Parser; + choice(name: N, options: Q): Parser.Next + ? O extends undefined ? {} : O + : T extends string ? any : never + : never + : never + >; - nest(name: string, options: Parser.NestOptions): Parser; + nest(name: N, options: Q): Parser.Next + ? O extends undefined ? {} : O + : never + : never + >; - skip(length: number): Parser; + skip(length: number): Parser; - endianess(endianess: Parser.Endianness): Parser; /* [sic] */ + endianess(endianess: Parser.Endianness): Parser; /* [sic] */ - namely(alias: string): Parser; + namely(alias: string): Parser; compile(): void; @@ -96,10 +125,8 @@ export interface ParserConstructor { export const Parser: ParserConstructor; export namespace Parser { - type Data = number | string | Array | Parsed | Buffer; - interface Parsed { - [name: string]: Data; - } + type Data = number | string | Array> | Parser | Buffer; + type Parsed = O extends undefined ? {} : O; interface Options { formatter?: ((value: Data) => any); @@ -108,7 +135,7 @@ export namespace Parser { interface StringOptions extends Options { encoding?: string; - length?: number | string | ((this: Parsed) => number); + length?: number | string | ((this: Parser) => number); zeroTerminated?: boolean; greedy?: boolean; stripNull?: boolean; @@ -116,32 +143,34 @@ export namespace Parser { interface BufferOptions extends Options { clone?: boolean; - length?: number | string | ((this: Parsed) => number); + length?: number | string | ((this: Parser) => number); readUntil?: string | ((item: number, buffer: Buffer) => boolean); } interface ArrayOptions extends Options { - type: string | Parser; - length?: number | string | ((this: Parsed) => number); - lengthInBytes?: number | string | ((this: Parsed) => number); + type: string | Parser; + length?: number | string | ((this: Parser) => number); + lengthInBytes?: number | string | ((this: Parser) => number); readUntil?: string | ((item: number, buffer: Buffer) => boolean); } interface ChoiceOptions extends Options { - tag: string | ((this: Parsed) => number); - choices: { [item: number]: Parser | string }; - defaultChoice?: Parser | string; + tag: string | ((this: Parser) => number); + choices: { [item: number]: Parser | string }; + defaultChoice?: Parser | string; } interface NestOptions extends Options { - type: Parser | string; + type: Parser; } type Endianness = 'little' | 'big'; - interface Context { - [name: string]: Parsed; - } + type Valid = + O extends undefined ? P : O & P; + + type Next = + Parser>; } From 0c94f13161257397f488f2943b15e3e945cec0a1 Mon Sep 17 00:00:00 2001 From: Levin Keller Date: Thu, 29 Nov 2018 20:21:55 +0100 Subject: [PATCH 214/608] Correctly type callback --- types/web3/providers.d.ts | 10 ++++++---- types/web3/web3-tests.ts | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/types/web3/providers.d.ts b/types/web3/providers.d.ts index 729ea09278..22a883222f 100644 --- a/types/web3/providers.d.ts +++ b/types/web3/providers.d.ts @@ -12,11 +12,13 @@ interface JsonRPCResponse { error?: string; } +interface Callback { + (error: Error): void; + (error: null, val: ResultType): void; +} + export class Provider { - send( - payload: JsonRPCRequest, - callback: (e: Error, val: JsonRPCResponse) => void - ): any; + send(payload: JsonRPCRequest, callback: Callback): any; } export class WebsocketProvider extends Provider { diff --git a/types/web3/web3-tests.ts b/types/web3/web3-tests.ts index 170a8b22c3..1d7474465e 100644 --- a/types/web3/web3-tests.ts +++ b/types/web3/web3-tests.ts @@ -2,6 +2,7 @@ import Web3 = require("web3"); import BigNumber = require("bn.js"); import { TransactionReceipt } from "web3/types"; import PromiEvent from "web3/promiEvent"; +import { Provider, JsonRPCResponse } from "web3/providers"; const contractAddress = "0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe"; @@ -10,6 +11,25 @@ const contractAddress = "0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe"; // -------------------------------------------------------------------------- const web3 = new Web3(); const myProvider = new web3.providers.HttpProvider("http://localhost:5454"); + +const createFailingHttpProvider = (): Provider => ({ + send(payload, callback) { + callback(new Error("Illegal!")); + } +}); + +const createSuccesfulHttpProvider = (): Provider => ({ + send(payload, callback) { + const response = {}; + callback(null, response as JsonRPCResponse); + } +}); + +const fakeProvider: Provider = createFailingHttpProvider(); +const otherFakeProvider: Provider = createSuccesfulHttpProvider(); + +web3.setProvider(fakeProvider); +web3.setProvider(otherFakeProvider); web3.setProvider(myProvider); web3.eth.setProvider(myProvider); From c679a8e691db619614c4acb666b768ef2f1508d2 Mon Sep 17 00:00:00 2001 From: Ivo Murrell Date: Sat, 1 Dec 2018 02:32:31 +0000 Subject: [PATCH 215/608] Add type definitions for cfn-response package. --- types/cfn-response/cfn-response-tests.ts | 12 ++++++++++++ types/cfn-response/index.d.ts | 19 +++++++++++++++++++ types/cfn-response/tsconfig.json | 23 +++++++++++++++++++++++ types/cfn-response/tslint.json | 1 + 4 files changed, 55 insertions(+) create mode 100644 types/cfn-response/cfn-response-tests.ts create mode 100644 types/cfn-response/index.d.ts create mode 100644 types/cfn-response/tsconfig.json create mode 100644 types/cfn-response/tslint.json diff --git a/types/cfn-response/cfn-response-tests.ts b/types/cfn-response/cfn-response-tests.ts new file mode 100644 index 0000000000..b9633c17aa --- /dev/null +++ b/types/cfn-response/cfn-response-tests.ts @@ -0,0 +1,12 @@ +import * as cfn from "cfn-response"; +import { CloudFormationCustomResourceEvent, Context } from "aws-lambda"; + +declare const event: CloudFormationCustomResourceEvent; +declare const context: Context; + +// $ExpectType void +cfn.send(event, context, cfn.SUCCESS, { sample: 123 }, "abc"); +// $ExpectType void +cfn.send(event, context, "SUCCESS"); +// $ExpectError +cfn.send(event, context, "", {}); diff --git a/types/cfn-response/index.d.ts b/types/cfn-response/index.d.ts new file mode 100644 index 0000000000..54cb63dfef --- /dev/null +++ b/types/cfn-response/index.d.ts @@ -0,0 +1,19 @@ +// Type definitions for cfn-response 1.0 +// Project: https://github.com/LukeMizuhashi/cfn-response +// Definitions by: Ivo Murrell +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +import { CloudFormationCustomResourceEvent, Context } from "aws-lambda"; + +export type ResponseStatus = "SUCCESS" | "FAILED"; +export const SUCCESS: ResponseStatus; +export const FAILED: ResponseStatus; + +export function send( + event: CloudFormationCustomResourceEvent, + context: Context, + responseStatus: ResponseStatus, + responseData?: object, + physicalResourceId?: string +): void; diff --git a/types/cfn-response/tsconfig.json b/types/cfn-response/tsconfig.json new file mode 100644 index 0000000000..0aff9f9071 --- /dev/null +++ b/types/cfn-response/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "cfn-response-tests.ts" + ] +} diff --git a/types/cfn-response/tslint.json b/types/cfn-response/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/cfn-response/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From c92112c5e79c70f4f4c0b08e4da5077e3e58c916 Mon Sep 17 00:00:00 2001 From: Adam Misiorny Date: Sat, 1 Dec 2018 15:09:22 +0100 Subject: [PATCH 216/608] Split sequence declaration --- types/rosie/index.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/types/rosie/index.d.ts b/types/rosie/index.d.ts index e66e9855eb..b8c52d3bc0 100644 --- a/types/rosie/index.d.ts +++ b/types/rosie/index.d.ts @@ -163,7 +163,8 @@ declare namespace rosie { * @param {function(number): *=} builder * @return {Factory} */ - sequence(name: keyof T, dependenciesOrBuilder?: (i: number) => any | keyof T[], builder?: Function) : IFactory; + sequence(name: K, builder?: (i: number) => any): IFactory; + sequence(name: keyof T, dependencies: D[], builder: (i: number, ...args: any[]) => any): IFactory; /** * Sets a post-processor callback that will receive built objects and the From 2b8c538ab791543e1c1661dc0700a637f4514bb9 Mon Sep 17 00:00:00 2001 From: Adam Misiorny Date: Sat, 1 Dec 2018 15:10:57 +0100 Subject: [PATCH 217/608] Unregistered factories --- types/rosie/index.d.ts | 1 + types/rosie/rosie-tests.ts | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/types/rosie/index.d.ts b/types/rosie/index.d.ts index b8c52d3bc0..ad7d8f644d 100644 --- a/types/rosie/index.d.ts +++ b/types/rosie/index.d.ts @@ -8,6 +8,7 @@ declare namespace rosie { interface IFactoryStatic { + new(): IFactory; /** * Defines a factory by name and constructor function. Call #attr and #option * on the result to define the properties of this factory. diff --git a/types/rosie/rosie-tests.ts b/types/rosie/rosie-tests.ts index 86dd049732..bb6b9defb8 100644 --- a/types/rosie/rosie-tests.ts +++ b/types/rosie/rosie-tests.ts @@ -70,6 +70,21 @@ const person = Factory.build('Person'); let aString = ''; aString = person.firstName; +// Unregistered factories +const unregisteredPersonFactory = new Factory(); + +unregisteredPersonFactory.attr('firstName', 'John').sequence('id'); + +// Sequence with dependencies +unregisteredPersonFactory.sequence('lastName', ['age'], (i: number, age: number) => `Doe ${i} ${age}`) + +// Unregistered extended factories + +const unregisteredExtendedPersonFactory = new Factory().extend(unregisteredPersonFactory) + +unregisteredExtendedPersonFactory.attr('firstName', 'John2') +unregisteredExtendedPersonFactory.sequence('lastName', ['age'], (i: number) => `Doe2 ${i}`) + class CustomClass { type: string; From 1bd81e2845069ea2a1696fc367041dec9bb30eb3 Mon Sep 17 00:00:00 2001 From: Adam Misiorny Date: Sat, 1 Dec 2018 15:11:19 +0100 Subject: [PATCH 218/608] Add author info --- types/rosie/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/rosie/index.d.ts b/types/rosie/index.d.ts index ad7d8f644d..63624ad3f2 100644 --- a/types/rosie/index.d.ts +++ b/types/rosie/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: Abner Oliveira , // Chris Grigg , // Alex Bukurov +// Adam Misiorny // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 From d2260f4ff382e9128a876325fc22df9b80611443 Mon Sep 17 00:00:00 2001 From: Hernan Rajchert Date: Sat, 1 Dec 2018 11:33:29 -0300 Subject: [PATCH 219/608] fix: mdast version --- types/mdast/index.d.ts | 2 +- types/unist/index.d.ts | 4 +--- types/unist/unist-tests.ts | 14 ++++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/types/mdast/index.d.ts b/types/mdast/index.d.ts index d7761bd38f..c1fcadec97 100644 --- a/types/mdast/index.d.ts +++ b/types/mdast/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/syntax-tree/mdast // Definitions by: Jun Lu // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.4 +// TypeScript Version: 3.0 import { Parent as UnistParent, Literal as UnistLiteral, Node } from 'unist'; diff --git a/types/unist/index.d.ts b/types/unist/index.d.ts index 55bea58e47..121362a2ac 100644 --- a/types/unist/index.d.ts +++ b/types/unist/index.d.ts @@ -7,8 +7,6 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 3.0 -export as namespace Unist - // Syntactic units in unist syntax trees are called nodes. export interface Node { // The variant of a node. @@ -59,5 +57,5 @@ export interface Parent extends Node { // Nodes containing a value. export interface Literal extends Node { - value: any; + value: unknown; } diff --git a/types/unist/unist-tests.ts b/types/unist/unist-tests.ts index 9ba2dc06d5..6f10111ba0 100644 --- a/types/unist/unist-tests.ts +++ b/types/unist/unist-tests.ts @@ -1,4 +1,6 @@ -const data: Unist.Data = { +import {Data, Point, Position, Node, Literal, Parent} from './index'; + +const data: Data = { string: 'string', number: 1, object: { @@ -9,32 +11,32 @@ const data: Unist.Data = { null: null }; -const point: Unist.Point = { +const point: Point = { line: 1, column: 1, offset: 0 }; -const position: Unist.Position = { +const position: Position = { start: point, end: point, indent: [1] }; -const node: Unist.Node = { +const node: Node = { type: 'node', data, position }; -const text: Unist.Literal = { +const text: Literal = { type: 'text', data, position, value: 'value' }; -const parent: Unist.Parent = { +const parent: Parent = { type: 'parent', data, position, From 982ed47c5cf0bcea51727e8137b717a536dce726 Mon Sep 17 00:00:00 2001 From: Hernan Rajchert Date: Sat, 1 Dec 2018 11:36:35 -0300 Subject: [PATCH 220/608] fix: linting problems --- types/unist/unist-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/unist/unist-tests.ts b/types/unist/unist-tests.ts index 6f10111ba0..1c27db2a58 100644 --- a/types/unist/unist-tests.ts +++ b/types/unist/unist-tests.ts @@ -1,4 +1,4 @@ -import {Data, Point, Position, Node, Literal, Parent} from './index'; +import { Data, Point, Position, Node, Literal, Parent } from 'unist'; const data: Data = { string: 'string', From b3d6ad95f869a0ba8fadc6b6676b6f05c545699f Mon Sep 17 00:00:00 2001 From: Silas Rech Date: Sat, 1 Dec 2018 15:48:04 +0100 Subject: [PATCH 221/608] [hibp] add typings --- types/hibp/hibp-tests.ts | 17 +++++++ types/hibp/index.d.ts | 97 ++++++++++++++++++++++++++++++++++++++++ types/hibp/tsconfig.json | 23 ++++++++++ types/hibp/tslint.json | 1 + 4 files changed, 138 insertions(+) create mode 100644 types/hibp/hibp-tests.ts create mode 100644 types/hibp/index.d.ts create mode 100644 types/hibp/tsconfig.json create mode 100644 types/hibp/tslint.json diff --git a/types/hibp/hibp-tests.ts b/types/hibp/hibp-tests.ts new file mode 100644 index 0000000000..cdcd1851bf --- /dev/null +++ b/types/hibp/hibp-tests.ts @@ -0,0 +1,17 @@ +import * as hibp from 'hibp'; + +hibp +.search('someAccountOrEmail') +.then(data => { + if (data.breaches || data.pastes) { + // Bummer... + console.log(data); + } else { + // Phew! We're clear. + console.log('Good news — no pwnage found!'); + } +}) +.catch(err => { + // Something went wrong. + console.log(err.message); +}); diff --git a/types/hibp/index.d.ts b/types/hibp/index.d.ts new file mode 100644 index 0000000000..27819f1c96 --- /dev/null +++ b/types/hibp/index.d.ts @@ -0,0 +1,97 @@ +// Type definitions for hibp 7.2 +// Project: https://github.com/wkovacs64/hibp +// Definitions by: Silas Rech +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +/// + +export interface BreachOptions { + domain?: string; + truncate?: boolean; +} + +export interface Breach { + Name: string; + Title: string; + Domain: string; + BreachDate: string; + AddedDate: string; + ModifiedDate: string; + PwnCount: number; + Description: string; + LogoPath: string; + DataClasses: string[]; + IsVerified: boolean; + IsFabricated: boolean; + IsSensitive: boolean; + IsRetired: boolean; + IsSpamList: boolean; +} + +export interface Paste { + Id: string; + Source: string; + Title: string; + Date: string; + EmailCount: number; +} + +export interface Range { + suffix: string; + count: number; +} + +/** + * Fetches data for a specific breach event. + */ +export function breach(breachName: string): Promise; + +/** + * Fetches breach data for a specific account. + */ +export function breachedAccount(account: string, options?: BreachOptions): Promise; + +/** + * Fetches all breach events in the system. + */ +export function breaches(options?: { domain?: string }): Promise; + +/** + * Fetches all data classes in the system. + */ +export function dataClasses(): Promise; + +/** + * Fetches paste data for a specific email address. + */ +export function pasteAccount(email: string): Promise; + +/** + * Fetches the number of times the the given password has been exposed in a breach (0 indicating no exposure). + * The password is given in plain text, but only the first 5 characters of its SHA-1 hash will be submitted to the API. + */ +export function pwnedPassword(password: string): Promise; + +/** + * Fetches the SHA-1 hash suffixes for the given 5-character SHA-1 hash prefix. + * + * When a password hash with the same first 5 characters is found in the Pwned Passwords repository, + * the API will respond with an HTTP 200 and include the suffix of every hash beginning with the specified prefix, + * followed by a count of how many times it appears in the data set. + * + * This function parses the response and returns a more structured format. + */ +export function pwnedPasswordRange(prefix: string): Promise; + +/** + * Fetches all breaches and all pastes associated with the provided account (email address or username). + * + * Note that the remote API does not support querying pastes by username (only email addresses), + * so in the event the provided account is not a valid email address, + * only breach data is queried and the "pastes" field of the resulting object will always be null. + * + * This is exactly how searching via the current web interface behaves, which this convenience method is designed to mimic. + * + */ +export function search(account: string, options?: BreachOptions): Promise<{ breaches?: Breach[], pastes?: Paste[] }>; diff --git a/types/hibp/tsconfig.json b/types/hibp/tsconfig.json new file mode 100644 index 0000000000..58ecb92a11 --- /dev/null +++ b/types/hibp/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "hibp-tests.ts" + ] +} diff --git a/types/hibp/tslint.json b/types/hibp/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/hibp/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 8b0dd4b73160fd8d77cc9dcd7e227159588c5552 Mon Sep 17 00:00:00 2001 From: Hernan Rajchert Date: Sat, 1 Dec 2018 11:54:46 -0300 Subject: [PATCH 222/608] fix: remove mandatory indent property --- types/unist/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/unist/index.d.ts b/types/unist/index.d.ts index 121362a2ac..202b315250 100644 --- a/types/unist/index.d.ts +++ b/types/unist/index.d.ts @@ -34,7 +34,7 @@ export interface Position { // Start column at each index (plus start line) in the source region, // for elements that span multiple lines. - indent: number[]; + indent?: number[]; } // One place in a source file. From 0084184b14ff5aaeb264188421e51f5af205e779 Mon Sep 17 00:00:00 2001 From: Hernan Rajchert Date: Sat, 1 Dec 2018 11:58:20 -0300 Subject: [PATCH 223/608] refactor: converted comments in multi-line to see them in the IDE --- types/unist/index.d.ts | 70 +++++++++++++++++++++++++++++++----------- 1 file changed, 52 insertions(+), 18 deletions(-) diff --git a/types/unist/index.d.ts b/types/unist/index.d.ts index 202b315250..023b1c11e3 100644 --- a/types/unist/index.d.ts +++ b/types/unist/index.d.ts @@ -7,55 +7,89 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 3.0 -// Syntactic units in unist syntax trees are called nodes. +/** + * Syntactic units in unist syntax trees are called nodes. + */ export interface Node { - // The variant of a node. + /** + * The variant of a node. + */ type: string; - // Information from the ecosystem. + /** + * Information from the ecosystem. + */ data?: Data; - // Location of a node in a source document. - // Must not be present if a node is generated. + /** + * Location of a node in a source document. + * Must not be present if a node is generated. + */ position?: Position; } +/** + * Information associated by the ecosystem with the node. + * Space is guaranteed to never be specified by unist or specifications + * implementing unist. + */ export interface Data { [key: string]: unknown; } -// Location of a node in a source file. +/** + * Location of a node in a source file. + */ export interface Position { - // Place of the first character of the parsed source region. + /** + * Place of the first character of the parsed source region. + */ start: Point; - // Place of the first character after the parsed source region. + /** + * Place of the first character after the parsed source region. + */ end: Point; - // Start column at each index (plus start line) in the source region, - // for elements that span multiple lines. + /** + * Start column at each index (plus start line) in the source region, + * for elements that span multiple lines. + */ indent?: number[]; } -// One place in a source file. +/** + * One place in a source file. + */ export interface Point { - // Line in a source file (1-indexed integer). + /** + * Line in a source file (1-indexed integer). + */ line: number; - // Column in a source file (1-indexed integer). + /** + * Column in a source file (1-indexed integer). + */ column: number; - - // Character in a source file (0-indexed integer). + /** + * Character in a source file (0-indexed integer). + */ offset?: number; } -// Nodes containing other nodes. +/** + * Nodes containing other nodes. + */ export interface Parent extends Node { - // List representing the children of a node. + /** + * List representing the children of a node. + */ children: Node[]; } -// Nodes containing a value. +/** + * Nodes containing a value. + */ export interface Literal extends Node { value: unknown; } From 2c5d06c3e8368dabfbb5e2a6f6958148857fe0d6 Mon Sep 17 00:00:00 2001 From: Adam Misiorny Date: Sat, 1 Dec 2018 16:01:05 +0100 Subject: [PATCH 224/608] [@storybook/addon-options] Add withOptions --- types/storybook__addon-options/index.d.ts | 7 +++++++ .../storybook__addon-options-tests.ts | 19 ++++++++++++++++++- types/storybook__addon-options/tsconfig.json | 5 ++++- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/types/storybook__addon-options/index.d.ts b/types/storybook__addon-options/index.d.ts index 61f9f11def..a0baa39ab2 100644 --- a/types/storybook__addon-options/index.d.ts +++ b/types/storybook__addon-options/index.d.ts @@ -6,6 +6,8 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 +import { StoryDecorator } from "@storybook/react"; + export interface Options { name?: string; url?: string; @@ -23,4 +25,9 @@ export interface Options { selectedAddonPanel?: string; } +/** + * @deprecated Use withOptions instead + */ export function setOptions(options: Options): void; + +export function withOptions(options: Options): StoryDecorator; diff --git a/types/storybook__addon-options/storybook__addon-options-tests.ts b/types/storybook__addon-options/storybook__addon-options-tests.ts index a3003c913f..1fc49d18e0 100644 --- a/types/storybook__addon-options/storybook__addon-options-tests.ts +++ b/types/storybook__addon-options/storybook__addon-options-tests.ts @@ -1,4 +1,5 @@ -import { setOptions } from '@storybook/addon-options'; +import { setOptions, withOptions } from '@storybook/addon-options'; +import { addDecorator } from '@storybook/react'; setOptions({ name: 'My Storybook', @@ -31,3 +32,19 @@ setOptions({ hierarchySeparator: '.', hierarchyRootSeparator: '#', }); + +addDecorator( + withOptions({ + name: "My Storybook", + url: "https://example.com", + goFullScreen: false, + showStoriesPanel: false, + showAddonPanel: false, + showSearchBox: false, + addonPanelInRight: false, + sortStoriesByKind: false, + hierarchySeparator: /\//, + hierarchyRootSeparator: /\|/, + selectedAddonPanel: "storybook/actions/action-panel" + }) +); diff --git a/types/storybook__addon-options/tsconfig.json b/types/storybook__addon-options/tsconfig.json index 936a535725..df1a88f769 100644 --- a/types/storybook__addon-options/tsconfig.json +++ b/types/storybook__addon-options/tsconfig.json @@ -15,6 +15,9 @@ "paths": { "@storybook/addon-options": [ "storybook__addon-options" + ], + "@storybook/react": [ + "storybook__react" ] }, "types": [], @@ -25,4 +28,4 @@ "index.d.ts", "storybook__addon-options-tests.ts" ] -} \ No newline at end of file +} From 6e11b5df9d359a15d2851144b130139259f36ae4 Mon Sep 17 00:00:00 2001 From: Adam Misiorny Date: Sat, 1 Dec 2018 16:02:18 +0100 Subject: [PATCH 225/608] Add author --- types/storybook__addon-options/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/storybook__addon-options/index.d.ts b/types/storybook__addon-options/index.d.ts index a0baa39ab2..42010b84e4 100644 --- a/types/storybook__addon-options/index.d.ts +++ b/types/storybook__addon-options/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: Joscha Feth // Simon Helle Nielsen // A.MacLeay +// Adam Misiorny // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 From e66e6ed61f4b7ebe84b84ad46c6cc7f982b0bf72 Mon Sep 17 00:00:00 2001 From: Adam Misiorny Date: Sat, 1 Dec 2018 16:13:44 +0100 Subject: [PATCH 226/608] Increase typescript version to match @storybook/react --- types/storybook__addon-options/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/storybook__addon-options/index.d.ts b/types/storybook__addon-options/index.d.ts index 42010b84e4..ec3ba1e252 100644 --- a/types/storybook__addon-options/index.d.ts +++ b/types/storybook__addon-options/index.d.ts @@ -5,7 +5,7 @@ // A.MacLeay // Adam Misiorny // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.8 import { StoryDecorator } from "@storybook/react"; From ba67cbd87032a56e0c10378d989da955a0b902aa Mon Sep 17 00:00:00 2001 From: Silas Rech Date: Sat, 1 Dec 2018 17:52:49 +0100 Subject: [PATCH 227/608] [sass] add typings --- types/sass/index.d.ts | 203 +++++++++++++++++++++++++++++++++++++++ types/sass/sass-tests.ts | 7 ++ types/sass/tsconfig.json | 23 +++++ types/sass/tslint.json | 1 + 4 files changed, 234 insertions(+) create mode 100644 types/sass/index.d.ts create mode 100644 types/sass/sass-tests.ts create mode 100644 types/sass/tsconfig.json create mode 100644 types/sass/tslint.json diff --git a/types/sass/index.d.ts b/types/sass/index.d.ts new file mode 100644 index 0000000000..0131836143 --- /dev/null +++ b/types/sass/index.d.ts @@ -0,0 +1,203 @@ +// Type definitions for sass 1.15 +// Project: https://github.com/sass/dart-sass +// Definitions by: Silas Rech +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +/// + +export type ImporterReturnType = { file: string } | { contents: string } | Error | null; + +export type Importer = (url: string, prev: string, done: (data: ImporterReturnType) => void) => ImporterReturnType | void; + +export interface Options { + /** + * Path to a file to compile. + * + * @default null + */ + file?: string; + + /** + * A string to pass to compile. + * + * It is recommended that you use `includePaths` in conjunction with this so that sass can find files when using the @import directive. + * + * @default null + */ + data?: string; + + /** + * Handles when the @import directive is encountered. + * + * A custom importer allows extension of the sass engine in both a synchronous and asynchronous manner. + * + * @default undefined + */ + importer?: Importer | Importer[]; + + /** + * Holds a collection of custom functions that may be invoked by the sass files being compiled. + * + * @default undefined + */ + functions?: { [key: string]: () => void }; + + /** + * An array of paths that should be looked in to attempt to resolve your @import declarations. + * When using `data`, it is recommended that you use this. + * + * @default [] + */ + includePaths?: string[]; + + /** + * Enable Sass Indented Syntax for parsing the data string or file. + * + * @default false + */ + indentedSyntax?: boolean; + + /** + * Used to determine whether to use space or tab character for indentation. + * + * @default 'space' + */ + indentType?: 'space' | 'tab'; + + /** + * Used to determine the number of spaces or tabs to be used for indentation. + * + * @default 2 + */ + indentWidth?: number; + + /** + * Used to determine which sequence to use for line breaks. + * + * @default 'lf' + */ + linefeed?: 'cr' | 'crlf' | 'lf' | 'lfcr'; + + /** + * Disable the inclusion of source map information in the output file. + * + * @default false + */ + omitSourceMapUrl?: boolean; + + /** + * Specify the intended location of the output file. + * Strongly recommended when outputting source maps so that they can properly refer back to their intended files. + * + * @default null + */ + outFile?: string; + + /** + * Determines the output format of the final CSS style. + * + * @default 'expanded' + */ + outputStyle?: 'compressed' | 'expanded'; + + /** + * Enables the outputting of a source map. + * + * @default undefined + */ + sourceMap?: boolean | string; + + /** + * Includes the contents in the source map information. + * + * @default false + */ + sourceMapContents?: boolean; + + /** + * Embeds the source map as a data URI. + * + * @default false + */ + sourceMapEmbed?: boolean; + + /** + * The value will be emitted as `sourceRoot` in the source map information. + * + * @default undefined + */ + sourceMapRoot?: string; +} + +export interface SassException extends Error { + /** + * The error message. + */ + message: string; + + /** + * The line number of error. + */ + line: number; + + /** + * The column number of error. + */ + column: number; + + /** + * The status code. + */ + status: number; + + /** + * The filename of error. + * + * In case file option was not set (in favour of `data`), this will reflect the value `stdin`. + */ + file: string; +} + +export interface Result { + /** + * The compiled CSS. + * + * Write this to a file, or serve it out as needed. + */ + css: Buffer; + + /** + * The source map. + */ + map?: Buffer; + stats: { + /** + * The path to the scss file, or `data` if the source was not a file. + */ + entry: string; + + /** + * `Date.now()` before the compilation. + */ + start: number; + + /** + * `Date.now()` after the compilation. + */ + end: number; + + /** + * `end - start` + */ + duration: number; + + /** + * Absolute paths to all related files in no particular order. + */ + includedFiles: string[]; + }; +} + +export function render(options: Options, callback: (exception: SassException, result: Result) => void): void; +export function renderSync(options: Options): Result; diff --git a/types/sass/sass-tests.ts b/types/sass/sass-tests.ts new file mode 100644 index 0000000000..ae656d0a98 --- /dev/null +++ b/types/sass/sass-tests.ts @@ -0,0 +1,7 @@ +import * as sass from 'sass'; + +sass.renderSync({ + file: 'index.scss', + sourceMap: true, + outFile: 'index.css', +}); diff --git a/types/sass/tsconfig.json b/types/sass/tsconfig.json new file mode 100644 index 0000000000..11599da1da --- /dev/null +++ b/types/sass/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "sass-tests.ts" + ] +} diff --git a/types/sass/tslint.json b/types/sass/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/sass/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From ff503e74dd923e53cf48c6989eda5cc6a3b543d0 Mon Sep 17 00:00:00 2001 From: Ivan Fernandes Date: Sun, 2 Dec 2018 01:38:59 -0200 Subject: [PATCH 228/608] passport-bnet type definitions --- types/passport-bnet/index.d.ts | 42 ++++++++++++++ types/passport-bnet/passport-bnet-tests.ts | 65 ++++++++++++++++++++++ types/passport-bnet/tsconfig.json | 23 ++++++++ types/passport-bnet/tslint.json | 1 + 4 files changed, 131 insertions(+) create mode 100644 types/passport-bnet/index.d.ts create mode 100644 types/passport-bnet/passport-bnet-tests.ts create mode 100644 types/passport-bnet/tsconfig.json create mode 100644 types/passport-bnet/tslint.json diff --git a/types/passport-bnet/index.d.ts b/types/passport-bnet/index.d.ts new file mode 100644 index 0000000000..ef6f977830 --- /dev/null +++ b/types/passport-bnet/index.d.ts @@ -0,0 +1,42 @@ +// Type definitions for passport-bnet 2.0.0 +// Project: https://github.com/Blizzard/passport-bnet#readme +// Definitions by: Ivan Fernandes +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import { Strategy as OAuth2Strategy, VerifyFunction, VerifyFunctionWithRequest } from 'passport-oauth2'; + +declare class BnetStrategy extends OAuth2Strategy { + constructor(options: BnetStrategy.StrategyOptions, verify: VerifyFunction); + constructor(options: BnetStrategy.StrategyOptionsWithRequest, verify: VerifyFunctionWithRequest); +} + +declare namespace BnetStrategy { + + interface _BaseBnetOptions { + region?: string; + + scopeSeparator?: string; + customHeaders?: object; + authorizationURL?: string; + tokenURL?: string; + scope?: string; + clientID: string; + clientSecret: string; + callbackURL?: string; + } + + interface StrategyOptions extends _BaseBnetOptions { + passReqToCallback?: false; + } + + interface StrategyOptionsWithRequest extends _BaseBnetOptions { + passReqToCallback: true; + } + + function getHost(region: string): string; + + type Strategy = BnetStrategy; + const Strategy: typeof BnetStrategy; +} + +export = BnetStrategy \ No newline at end of file diff --git a/types/passport-bnet/passport-bnet-tests.ts b/types/passport-bnet/passport-bnet-tests.ts new file mode 100644 index 0000000000..86f3090c88 --- /dev/null +++ b/types/passport-bnet/passport-bnet-tests.ts @@ -0,0 +1,65 @@ +//Based on passport-oauth2/passport-oauth2-tests.ts + +import BnetStrategy = require("passport-bnet"); +import { Strategy, StrategyOptions, StrategyOptionsWithRequest } from "passport-bnet"; +import { Strategy as OAuth2Strategy } from "passport-oauth2"; +import { VerifyCallback } from "passport-oauth2"; +import { Request } from "express"; + +const strategyOptions1: StrategyOptions = { + authorizationURL: 'http://www.example.com/auth', + callbackURL: 'http://www.example.com/callback', + clientID: 'dummy', + clientSecret: 'secret', + tokenURL: 'http://www.example.com/token', + region: 'us', + scope: "email", + scopeSeparator: ' ', + customHeaders: {} +} + +function verifyFunction1(_accessToken: string, _refreshToken: string, _profile: any, verifyCallback: VerifyCallback) { + verifyCallback(new Error('unimplemented')); +} + +function verifyFunction2(_accessToken: string, _refreshToken: string, _results: any, _profile: any, verifyCallback: VerifyCallback) { + verifyCallback(new Error('unimplemented')); +} + +const strategy1: BnetStrategy = new BnetStrategy(strategyOptions1, verifyFunction1); + +const strategy2: Strategy = new BnetStrategy(strategyOptions1, verifyFunction2); + +function verifyFunction3(_req: Request, _accessToken: string, _refreshToken: string, _profile: any, verifyCallback: VerifyCallback) { + verifyCallback(undefined, { userid: '1' }); +} + +function verifyFunction4(_req: Request, _accessToken: string, _refreshToken: string, _results: any, _profile: any, verifyCallback: VerifyCallback) { + verifyCallback(undefined, { userid: '1' }); +} + +const strategyOptions2: StrategyOptionsWithRequest = { + authorizationURL: 'http://www.example.com/auth', + callbackURL: 'http://www.example.com/callback', + clientID: 'dummy', + clientSecret: 'secret', + tokenURL: 'http://www.example.com/token', + region: 'us', + scope: "email", + scopeSeparator: ' ', + customHeaders: {}, + passReqToCallback: true +}; + +const strategy3: OAuth2Strategy = new BnetStrategy +(strategyOptions2, verifyFunction3); + +const strategy4: Strategy = new Strategy(strategyOptions2, verifyFunction4); + +class MyStrategy extends BnetStrategy { + useProtectedProperty() { + this._oauth2.get('http://www.example.com/profile', 'token', err => err.statusCode); + this._oauth2.get('http://www.example.com/profile', 'token', (err, result) => result); + this._oauth2.get('http://www.example.com/profile', 'token', (err, result, response) => response); + } +} \ No newline at end of file diff --git a/types/passport-bnet/tsconfig.json b/types/passport-bnet/tsconfig.json new file mode 100644 index 0000000000..28da7a7a65 --- /dev/null +++ b/types/passport-bnet/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "passport-bnet-tests.ts" + ] +} \ No newline at end of file diff --git a/types/passport-bnet/tslint.json b/types/passport-bnet/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/passport-bnet/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 374b24ef8732e7907faef7bb13b4326191d1747d Mon Sep 17 00:00:00 2001 From: Ivan Fernandes Date: Sun, 2 Dec 2018 02:03:00 -0200 Subject: [PATCH 229/608] adding typescript version --- types/passport-bnet/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/passport-bnet/index.d.ts b/types/passport-bnet/index.d.ts index ef6f977830..1b28ee21ad 100644 --- a/types/passport-bnet/index.d.ts +++ b/types/passport-bnet/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/Blizzard/passport-bnet#readme // Definitions by: Ivan Fernandes // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 import { Strategy as OAuth2Strategy, VerifyFunction, VerifyFunctionWithRequest } from 'passport-oauth2'; From 55dc8ebd80d0386841468e2c515aba766fba5da3 Mon Sep 17 00:00:00 2001 From: Ivan Fernandes Date: Sun, 2 Dec 2018 02:10:27 -0200 Subject: [PATCH 230/608] fomatting --- types/passport-bnet/index.d.ts | 7 +++---- types/passport-bnet/passport-bnet-tests.ts | 9 ++++----- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/types/passport-bnet/index.d.ts b/types/passport-bnet/index.d.ts index 1b28ee21ad..e5493a8d3c 100644 --- a/types/passport-bnet/index.d.ts +++ b/types/passport-bnet/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for passport-bnet 2.0.0 +// Type definitions for passport-bnet 2.0. // Project: https://github.com/Blizzard/passport-bnet#readme // Definitions by: Ivan Fernandes // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -12,7 +12,6 @@ declare class BnetStrategy extends OAuth2Strategy { } declare namespace BnetStrategy { - interface _BaseBnetOptions { region?: string; @@ -20,7 +19,7 @@ declare namespace BnetStrategy { customHeaders?: object; authorizationURL?: string; tokenURL?: string; - scope?: string; + scope?: string; clientID: string; clientSecret: string; callbackURL?: string; @@ -40,4 +39,4 @@ declare namespace BnetStrategy { const Strategy: typeof BnetStrategy; } -export = BnetStrategy \ No newline at end of file +export = BnetStrategy; diff --git a/types/passport-bnet/passport-bnet-tests.ts b/types/passport-bnet/passport-bnet-tests.ts index 86f3090c88..06c0ffccec 100644 --- a/types/passport-bnet/passport-bnet-tests.ts +++ b/types/passport-bnet/passport-bnet-tests.ts @@ -1,9 +1,8 @@ -//Based on passport-oauth2/passport-oauth2-tests.ts +// Based on passport-oauth2/passport-oauth2-tests.ts import BnetStrategy = require("passport-bnet"); import { Strategy, StrategyOptions, StrategyOptionsWithRequest } from "passport-bnet"; -import { Strategy as OAuth2Strategy } from "passport-oauth2"; -import { VerifyCallback } from "passport-oauth2"; +import { Strategy as OAuth2Strategy, VerifyCallback } from "passport-oauth2"; import { Request } from "express"; const strategyOptions1: StrategyOptions = { @@ -16,7 +15,7 @@ const strategyOptions1: StrategyOptions = { scope: "email", scopeSeparator: ' ', customHeaders: {} -} +}; function verifyFunction1(_accessToken: string, _refreshToken: string, _profile: any, verifyCallback: VerifyCallback) { verifyCallback(new Error('unimplemented')); @@ -62,4 +61,4 @@ class MyStrategy extends BnetStrategy { this._oauth2.get('http://www.example.com/profile', 'token', (err, result) => result); this._oauth2.get('http://www.example.com/profile', 'token', (err, result, response) => response); } -} \ No newline at end of file +} From 47fa3e69a48443e99093497e234cd5fb4159761d Mon Sep 17 00:00:00 2001 From: Ivan Fernandes Date: Sun, 2 Dec 2018 02:12:46 -0200 Subject: [PATCH 231/608] fixing version notation --- types/passport-bnet/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/passport-bnet/index.d.ts b/types/passport-bnet/index.d.ts index e5493a8d3c..86255c782d 100644 --- a/types/passport-bnet/index.d.ts +++ b/types/passport-bnet/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for passport-bnet 2.0. +// Type definitions for passport-bnet 2.0 // Project: https://github.com/Blizzard/passport-bnet#readme // Definitions by: Ivan Fernandes // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped From c45cef2c6ebdbb8764f2631154f61213109c5733 Mon Sep 17 00:00:00 2001 From: Kobi Cohen Date: Sun, 2 Dec 2018 12:58:30 +0200 Subject: [PATCH 232/608] updating isMatchWithCustomizer type to accept two more arguments: object and source per lodash docs https://lodash.com/docs/4.17.11#isMatchWith --- types/lodash/common/lang.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/lodash/common/lang.d.ts b/types/lodash/common/lang.d.ts index 9afe554b28..723388c9cc 100644 --- a/types/lodash/common/lang.d.ts +++ b/types/lodash/common/lang.d.ts @@ -1020,7 +1020,7 @@ declare module "../index" { // isMatchWith - type isMatchWithCustomizer = (value: any, other: any, indexOrKey: PropertyName) => boolean; + type isMatchWithCustomizer = (value: any, other: any, indexOrKey: PropertyName, object: object, source: object) => boolean; interface LoDashStatic { /** From 1aa8969874dbfcba59ec66cebd97a8c51bac9c19 Mon Sep 17 00:00:00 2001 From: Nikola Malovic Date: Sun, 2 Dec 2018 12:29:37 +0100 Subject: [PATCH 233/608] Options id i snot a number only --- types/react-data-grid/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-data-grid/index.d.ts b/types/react-data-grid/index.d.ts index b41c2c2501..94d8af72d9 100644 --- a/types/react-data-grid/index.d.ts +++ b/types/react-data-grid/index.d.ts @@ -583,7 +583,7 @@ declare namespace AdazzleReactDataGrid { declare namespace AdazzleReactDataGridPlugins { interface AutoCompleteEditorProps { onCommit?: () => void; - options?: Array<{ id: number; title: string }>; + options?: Array<{ id: any; title: string }>; label?: any; value?: any; height?: number; From 76d38d894f396cf0084f70d88c6ff1bc3ad79eaf Mon Sep 17 00:00:00 2001 From: Glen Date: Sun, 2 Dec 2018 14:05:33 +0200 Subject: [PATCH 234/608] hoverBackgroundColor and hoverBorderColor should accept Color/Color[] --- types/chart.js/chart.js-tests.ts | 6 +++++- types/chart.js/index.d.ts | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/types/chart.js/chart.js-tests.ts b/types/chart.js/chart.js-tests.ts index 705392baed..fd5ed53e80 100644 --- a/types/chart.js/chart.js-tests.ts +++ b/types/chart.js/chart.js-tests.ts @@ -9,7 +9,9 @@ const plugin = { } }; -const chart: Chart = new Chart(new CanvasRenderingContext2D(), { +const ctx = new CanvasRenderingContext2D(); + +const chart: Chart = new Chart(ctx, { type: "bar", plugins: [plugin, plugin], data: { @@ -17,6 +19,8 @@ const chart: Chart = new Chart(new CanvasRenderingContext2D(), { datasets: [ { backgroundColor: "#000000", + hoverBackgroundColor: ctx.createLinearGradient(0, 0, 0, 100), + hoverBorderColor: ctx.createLinearGradient(0, 0, 0, 100), borderWidth: 1, label: "test", data: [1, null, 3] diff --git a/types/chart.js/index.d.ts b/types/chart.js/index.d.ts index 884ddaa760..2803def896 100644 --- a/types/chart.js/index.d.ts +++ b/types/chart.js/index.d.ts @@ -554,8 +554,8 @@ declare namespace Chart { borderSkipped?: PositionType; data?: Array | ChartPoint[]; fill?: boolean | number | string; - hoverBackgroundColor?: string | string[]; - hoverBorderColor?: string | string[]; + hoverBackgroundColor?: ChartColor | ChartColor[]; + hoverBorderColor?: ChartColor | ChartColor[]; hoverBorderWidth?: number | number[]; label?: string; lineTension?: number; From dc80f4fdbb210e70c3ba2b8c4e02b50c501bd027 Mon Sep 17 00:00:00 2001 From: Dima Smirnov Date: Sun, 2 Dec 2018 15:32:55 +0300 Subject: [PATCH 235/608] added fn type for order --- types/sequelize/index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/types/sequelize/index.d.ts b/types/sequelize/index.d.ts index f25aacc3e4..4ab0ee11a8 100644 --- a/types/sequelize/index.d.ts +++ b/types/sequelize/index.d.ts @@ -3330,7 +3330,7 @@ declare namespace sequelize { * first element is the column / function to order by, the second is the direction. For example: * `order: [['name', 'DESC']]`. In this way the column will be escaped, but the direction will not. */ - order?: string | col | literal | Array | { model: Model, as?: string }> | Array | { model: Model, as?: string }>>; + order?: string | col | literal | Array | { model: Model, as?: string } | fn> | fn | Array | { model: Model, as?: string }| fn>| fn>; /** * Limit the results @@ -5240,13 +5240,13 @@ declare namespace sequelize { * `this.constructor.prototype.find.apply(this, arguments)` */ classMethods?: Object; - + /** * Change the database schema. PG only feature, but also works with other dialects. */ schema?: string; - - + + /** * Change the database schema delimiter. Defaults to "." on PG but for other dialects can be also changed to "_". */ From c8b9249b2b51ecb7920617e8ddf101633bb90f91 Mon Sep 17 00:00:00 2001 From: Dima Smirnov Date: Sun, 2 Dec 2018 15:35:40 +0300 Subject: [PATCH 236/608] added tests for order with order --- types/sequelize/sequelize-tests.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/types/sequelize/sequelize-tests.ts b/types/sequelize/sequelize-tests.ts index 6b7ea6ea0a..4f0520ff84 100644 --- a/types/sequelize/sequelize-tests.ts +++ b/types/sequelize/sequelize-tests.ts @@ -946,6 +946,8 @@ User.findAll( { where : { user_id : 1 }, attributes : ['a', 'b'], include : [{ m User.findAll( { order : s.literal( 'email =' ) } ); User.findAll( { order : [s.literal( 'email = ' + s.escape( 'test@sequelizejs.com' ) )] } ); User.findAll( { order : [['id', ';DELETE YOLO INJECTIONS']] } ); +User.findAll( { order : Sequelize.random() } ); +User.findAll( { order : [Sequelize.random()] } ); User.findAll( { include : [User], order : [[User, 'id', ';DELETE YOLO INJECTIONS']] } ); User.findAll( { include : [User], order : [['id', 'ASC NULLS LAST'], [User, 'id', 'DESC NULLS FIRST']] } ); User.findAll( { include : [{ model : User, where : { title : 'DoDat' }, include : [{ model : User }] }] } ); From dcbe9083a25abff7d02ed78d64f7bc056db4f849 Mon Sep 17 00:00:00 2001 From: Dima Smirnov Date: Sun, 2 Dec 2018 15:39:14 +0300 Subject: [PATCH 237/608] updated tests to use s. --- types/sequelize/sequelize-tests.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/sequelize/sequelize-tests.ts b/types/sequelize/sequelize-tests.ts index 4f0520ff84..943fed79e3 100644 --- a/types/sequelize/sequelize-tests.ts +++ b/types/sequelize/sequelize-tests.ts @@ -946,8 +946,8 @@ User.findAll( { where : { user_id : 1 }, attributes : ['a', 'b'], include : [{ m User.findAll( { order : s.literal( 'email =' ) } ); User.findAll( { order : [s.literal( 'email = ' + s.escape( 'test@sequelizejs.com' ) )] } ); User.findAll( { order : [['id', ';DELETE YOLO INJECTIONS']] } ); -User.findAll( { order : Sequelize.random() } ); -User.findAll( { order : [Sequelize.random()] } ); +User.findAll( { order : s.random() } ); +User.findAll( { order : [s.random()] } ); User.findAll( { include : [User], order : [[User, 'id', ';DELETE YOLO INJECTIONS']] } ); User.findAll( { include : [User], order : [['id', 'ASC NULLS LAST'], [User, 'id', 'DESC NULLS FIRST']] } ); User.findAll( { include : [{ model : User, where : { title : 'DoDat' }, include : [{ model : User }] }] } ); From cefa24199f09265e6dec5b0ddddc0bd0b229ab82 Mon Sep 17 00:00:00 2001 From: Dima Smirnov Date: Sun, 2 Dec 2018 15:50:21 +0300 Subject: [PATCH 238/608] increased the version number in the header --- types/sequelize/index.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/types/sequelize/index.d.ts b/types/sequelize/index.d.ts index 4ab0ee11a8..06f27421cb 100644 --- a/types/sequelize/index.d.ts +++ b/types/sequelize/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Sequelize 4.27.10 +// Type definitions for Sequelize 4.27.11 // Project: http://sequelizejs.com // Definitions by: samuelneff // Peter Harris @@ -15,6 +15,7 @@ // Nick Schultz // Thomas Breleur // Antoine Boisadam +// Dima Smirnov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 From df0bcd09d20e3b763664f4d4ca249ce0b22687c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20D=C3=BCfel?= Date: Sun, 2 Dec 2018 17:13:01 +0100 Subject: [PATCH 239/608] Replace Bluebird by native Promises --- types/bull/index.d.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/types/bull/index.d.ts b/types/bull/index.d.ts index c08048f1d7..2d18e0a800 100644 --- a/types/bull/index.d.ts +++ b/types/bull/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for bull 3.4 +// Type definitions for bull 3.5 // Project: https://github.com/OptimalBits/bull // Definitions by: Bruno Grieder // Cameron Crothers @@ -17,7 +17,6 @@ // TypeScript Version: 2.8 import * as Redis from "ioredis"; -import * as Promise from "bluebird"; /** * This is the Queue constructor. From ee2293da4b1ac471cd34b86a62c65e083608bc32 Mon Sep 17 00:00:00 2001 From: denis Date: Fri, 30 Nov 2018 23:12:01 +0100 Subject: [PATCH 240/608] Add core and utils --- .../ckeditor__ckeditor5-core-tests.ts | 328 ++++ types/ckeditor__ckeditor5-core/index.d.ts | 269 ++++ types/ckeditor__ckeditor5-core/tsconfig.json | 26 + types/ckeditor__ckeditor5-core/tslint.json | 22 + .../ckeditor__ckeditor5-engine-tests.ts | 81 + types/ckeditor__ckeditor5-engine/index.d.ts | 1368 +++++++++++++++++ .../ckeditor__ckeditor5-engine/tsconfig.json | 24 + types/ckeditor__ckeditor5-engine/tslint.json | 20 + .../ckeditor__ckeditor5-utils-tests.ts | 26 +- types/ckeditor__ckeditor5-utils/index.d.ts | 8 +- 10 files changed, 2160 insertions(+), 12 deletions(-) create mode 100644 types/ckeditor__ckeditor5-core/ckeditor__ckeditor5-core-tests.ts create mode 100644 types/ckeditor__ckeditor5-core/index.d.ts create mode 100644 types/ckeditor__ckeditor5-core/tsconfig.json create mode 100644 types/ckeditor__ckeditor5-core/tslint.json create mode 100644 types/ckeditor__ckeditor5-engine/ckeditor__ckeditor5-engine-tests.ts create mode 100644 types/ckeditor__ckeditor5-engine/index.d.ts create mode 100644 types/ckeditor__ckeditor5-engine/tsconfig.json create mode 100644 types/ckeditor__ckeditor5-engine/tslint.json diff --git a/types/ckeditor__ckeditor5-core/ckeditor__ckeditor5-core-tests.ts b/types/ckeditor__ckeditor5-core/ckeditor__ckeditor5-core-tests.ts new file mode 100644 index 0000000000..68a20aff51 --- /dev/null +++ b/types/ckeditor__ckeditor5-core/ckeditor__ckeditor5-core-tests.ts @@ -0,0 +1,328 @@ +import * as utils from "ckeditor__ckeditor5-utils"; +import * as core from "ckeditor__ckeditor5-core"; +import * as engine from "ckeditor__ckeditor5-engine"; + +declare let bool: boolean; +declare let command: core.Command; +declare let commandCollection: core.CommandCollection; +declare let commands: core.Command[]; +declare let componentFactory: core.ComponentFactory; +declare let config: utils.Config; +declare let conversion: engine.conversion.Conversion; +declare let dataController: engine.controller.DataController; +declare let editingController: engine.controller.EditingController; +declare let editingKeystrokeHandler: core.EditingKeystrokeHandler; +declare let editor: core.editor.Editor; +declare let focusTracker: utils.FocusTracker; +declare let htmlElement: HTMLElement; +declare let keystrokes: core.EditingKeystrokeHandler; +declare let locale: utils.Locale; +declare let model: engine.model.Model; +declare let num: number; +declare let pendingActions: core.PendingActions; +declare let plugin: core.Plugin; +declare let pluginCollection: core.PluginCollection; +declare let pluginCollectionStr: core.PluginCollection>; +declare let pluginStr: core.Plugin; +declare let myPlugin: MyPlugin; +declare let myPluginMaybe: MyPlugin | undefined; +declare let myPlugins: MyPlugin[]; +declare let str: string; +declare let strOrUndef: string | undefined; +declare let strs: string[]; +declare let ui: core.editor.EditorUI; +declare let undef: undefined; +declare let view: core.EditorUIView; + +class MyPlugin extends core.Plugin { + constructor(editor: core.editor.Editor) { + super(editor); + } + + static get pluginName() { + return "A"; + } + + myMethod() { + return "this is MyPlugin method"; + } +} + +class SomeCommand extends core.Command { + execute() {} +} + +// core/editor/utils/dataapimixin ============================================= + +class DataApiEditor extends core.editor.Editor implements core.editor.utils.DataApi { + // mixin by DataApiMixin + getData: () => string; + setData: (data: string) => void; +} +utils.mix(DataApiEditor, core.editor.utils.DataApiMixin); +const dataApiEditor = new DataApiEditor(); + +dataApiEditor.setData("foo"); +str = dataApiEditor.getData(); + +// core/editor/utils/elementapimixin ========================================== + +class ElementApiEditor extends core.editor.Editor implements core.editor.utils.ElementApi { + // mixin by ElementApiMixin + readonly sourceElement: HTMLElement; + updateSourceElement: () => void; +} +utils.mix(ElementApiEditor, core.editor.utils.ElementApiMixin); +const elementApiEditor = new ElementApiEditor(); + +htmlElement = elementApiEditor.sourceElement; +elementApiEditor.updateSourceElement(); + +// core/editor/utils/attachtoform ============================================= + +// $ExpectError +core.editor.utils.attachToForm(editor); +core.editor.utils.attachToForm(elementApiEditor); + +// core/editor/editor ========================================================= + +commandCollection = editor.commands; +config = editor.config; +editingController = editor.editing; +conversion = editor.conversion; +dataController = editor.data; +editor.isReadOnly = bool; +editingKeystrokeHandler = editor.keystrokes; +locale = editor.locale; +model = editor.model; +pluginCollection = editor.plugins; + +if (editor.state === "initializing") { + console.log("new Editor()"); +} else if (editor.state === "ready") { + console.log("Editor.create()"); +} else if (editor.state === "destroyed") { + console.log("editor.destroy"); +} else { + const n: never = editor.state; +} + +editor.state = "ready"; + +core.editor.Editor.builtinPlugins = [plugin, pluginStr, plugin]; +const plugins: Array> = core.editor.Editor.builtinPlugins; + +core.editor.Editor.defaultConfig = { + foo: { + a: 1, + b: 2 + } +}; + +editor = new core.editor.Editor(); +editor = new core.editor.Editor({language: "pl"}); + +editor.destroy(); +editor.destroy().then(() => { + console.log(`${editor.state} == destroyed`); +}); + +editor.execute("someCommand"); +editor.execute("someCommand2", "arg1", 2); + +editor.initPlugins(); +editor.initPlugins().then(() => { + console.log(`init ${Array.from(editor.plugins).length} plugins`); +}); + +locale.t = editor.t; +str = editor.t("Label"); +str = editor.t('Created file "%0" in %1ms.', ["fileName", "100"]); + +// core/editor/editorui ======================================================= + +componentFactory = ui.componentFactory; +editor = ui.editor; +focusTracker = ui.focusTracker; +view = ui.view; + +ui = new core.editor.EditorUI(editor, view); +ui.destroy(); +ui.update(); + +// core/editor/editorwithui =================================================== + +declare let ewui: core.editor.EditorWithUI; +htmlElement = ewui.element!; +ui = ewui.ui; + +// core/command =============================================================== + +editor = command.editor; + +bool = command.isEnabled; + +undef = command.value; +strOrUndef = new core.Command(editor).value; + +command = new core.Command(editor); + +command.destroy(); + +command.execute(); + +command.refresh(); + +// core/commandcollection ===================================================== + +commandCollection = new core.CommandCollection(); + +const collectionsPairs = Array.from(commandCollection); +const collectionsPair = collectionsPairs[0]; +str = collectionsPair[0]; +command = collectionsPair[1]; + +commandCollection.add("foo", new SomeCommand(editor)); + +command = commandCollection.commands().next().value; +commands = Array.from(commandCollection.commands()); + +commandCollection.destroy(); + +commandCollection.execute("foo"); +commandCollection.execute("bar", 1, "param"); + +command = commandCollection.get("foo"); + +str = commandCollection.names().next().value; +strs = Array.from(commandCollection.names()); + +// core/editingkeystrokehandler =============================================== + +keystrokes = new core.EditingKeystrokeHandler(editor); + +editor = keystrokes.editor; + +keystrokes.press({keyCode: 123}); + +keystrokes.set("Ctrl+A", "foo"); +keystrokes.set(["shift", "33"], "foo"); +keystrokes.set(["ctrl", "A"], "foo", {priority: 10}); +keystrokes.set(["ctrl", "A"], "foo", {priority: "high"}); +keystrokes.set(["ctrl", "A"], () => console.log("key")); +keystrokes.set(["ctrl", "A"], (keyEvtData, cancel) => { + console.log(keyEvtData.keyCode); + cancel(); +}); + +// core/pendingactions ======================================================== + +pendingActions = new core.PendingActions(editor); + +str = core.PendingActions.pluginName; + +const firstAction = pendingActions.first; + +bool = pendingActions.hasAny; + +strs = Array.from(pendingActions, action => action.message); + +const action1 = pendingActions.add("Action 1"); + +pendingActions.remove(action1); + +firstAction!.fire("I'm an Observable with a message"); +str = firstAction!.message; +str = action1.message; + +// core/plugin ================================================================ + +class MyPluginMini extends core.Plugin { + constructor(editor: core.editor.Editor) { + super(editor); + } +} + +class MyPluginAll extends core.Plugin { + constructor(editor: core.editor.Editor) { + super(editor); + } + + static get pluginName() { + return "All"; + } + + static get requires() { + return [MyPlugin, MyPluginMini]; + } + + afterInit() {return Math.random() ? null : Promise.resolve("resolved"); } + destroy() {return Math.random() ? null : Promise.resolve("destroy"); } + init() {return Math.random() ? null : Promise.resolve("init"); } +} + +plugin = new MyPlugin(editor); +plugin = new MyPluginMini(editor); +pluginStr = new MyPluginAll(editor); + +const Plugin: MyPlugin = new MyPlugin(editor); +const pluginMini: MyPluginMini = new MyPluginMini(editor); +const pluginAll: MyPluginAll = new MyPluginAll(editor); + +editor = myPlugin.editor; + +str = MyPluginAll.pluginName; +strOrUndef = MyPluginMini.pluginName; // Todo: should be undefined. + +plugin = new MyPluginAll.requires[0](editor); + +const fs: Function[] = MyPluginAll.requires; +const fsOrUndef = MyPluginMini.requires; // Todo: should be undefined. + +// $ExpectError +pluginMini.afterInit(); +pluginAll.afterInit(); + +// $ExpectError +pluginMini.destroy(); +pluginAll.destroy(); + +// $ExpectError +pluginMini.init(); +pluginAll.init(); + +// core/plugincollection ====================================================== + +pluginCollectionStr = new core.PluginCollection(editor, [MyPluginAll]); +// $ExpectError +pluginCollectionStr = new core.PluginCollection(editor, [MyPlugin]); + +const aColl = new core.PluginCollection(editor, [MyPluginAll, MyPluginMini]); + +const myColl = new core.PluginCollection(editor, [MyPlugin]); + +const myCollArray = Array.from(myColl); +myPlugins = myCollArray.map(entry => entry[1]); +myPlugin = new (myCollArray[0][0])(editor); + +myColl.destroy() + .then(destroyedPlugins => { + num = destroyedPlugins.length; + const plugin = destroyedPlugins[0]; + editor = plugin.editor; + plugin.init!(); + plugin.destroy(); + str = plugin.myMethod(); + }); + +myPluginMaybe = myColl.get("A"); +myPluginMaybe = myColl.get(MyPlugin); + +myColl.load([MyPlugin, "A"]) + .then((loadedPlugins) => { + const plugin = loadedPlugins[0]; + editor = plugin.editor; + str = plugin.myMethod(); + }); + +myColl.load([MyPlugin, "A"], [MyPlugin, "A"]); diff --git a/types/ckeditor__ckeditor5-core/index.d.ts b/types/ckeditor__ckeditor5-core/index.d.ts new file mode 100644 index 0000000000..63ae237739 --- /dev/null +++ b/types/ckeditor__ckeditor5-core/index.d.ts @@ -0,0 +1,269 @@ +// Type definitions for @ckeditor/ckeditor5-core 11.0 +// Project: https://github.com/ckeditor/ckeditor5-core +// Definitions by: denisname +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +import * as engine from "ckeditor__ckeditor5-engine"; +import * as ckutils from "ckeditor__ckeditor5-utils"; + +// TODO: depends on other libraries +export interface AlignmentConfig {} +export interface AutosaveConfig {} +export interface CKFinderAdapterConfig {} +export interface CloudServicesConfig {} +export interface FontFamilyConfig {} +export interface FontSizeConfig {} +export interface HeadingConfig {} +export interface HighlightConfig {} +export interface ImageConfig {} +export interface MediaEmbedConfig {} +export interface TypingConfig {} +export interface ComponentFactory {} // CKEditor 5 UI +export interface EditorUIView {} // CKEditor 5 UI + +export namespace editor { + namespace utils { + // core/editor/utils/attachtoform + + function attachToForm(editor: Editor & ElementApi): void; + + // core/editor/utils/dataapimixin + + const DataApiMixin: DataApi; + + interface DataApi { + getData(): string; + setData(data: string): void; + } + + // core/editor/utils/elementapimixin + + const ElementApiMixin: ElementApi; + + interface ElementApi { + readonly sourceElement: HTMLElement; + updateSourceElement(): void; + } + } + + // core/editor/editor + + class Editor implements ckutils.Emitter, ckutils.Observable { + readonly commands: CommandCollection; + readonly config: ckutils.Config; + readonly conversion: engine.conversion.Conversion; + readonly data: engine.controller.DataController; + readonly editing: engine.controller.EditingController; + isReadOnly: boolean; + readonly keystrokes: EditingKeystrokeHandler; + readonly locale: ckutils.Locale; + readonly model: engine.model.Model; + readonly plugins: PluginCollection>; + state: "initializing" | "ready" | "destroyed"; + + static builtinPlugins: Array>; + static defaultConfig: object; + + constructor(config?: object); + destroy(): Promise; + execute(commandName: string, ...commandParams: any[]): void; + initPlugins(): Promise; + t(str: string, values?: string[]): string; + + static create(config: object): Promise; + + // Emitter + delegate(...events: string[]): ckutils.EmitterMixinDelegateChain; + fire(eventOrInfo: string | ckutils.EventInfo, ...args: any[]): any; + listenTo(emitter: ckutils.Emitter, event: string, callback: Function, options?: {priority?: ckutils.PriorityString | number }): void; + off(event: string, callback?: Function): void; + on(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + once(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + stopDelegating(event?: string, emitter?: ckutils.Emitter): void; + stopListening(emitter?: ckutils.Emitter, event?: string, callback?: Function): void; + + // Observable + bind(...bindProperties: string[]): ckutils.BindChain; + decorate(methodName: string): void; + set(name: object): void; + set(name: string, value: any): void; + unbind(...unbindProperties: string[]): void; + } + + // core/editor/editorconfig + + interface EditorConfig { + alignment: AlignmentConfig; + autosave: AutosaveConfig; + balloonToolbar: string[]; + blockToolbar: string[]; + ckfinder: CKFinderAdapterConfig; + cloudServices: CloudServicesConfig; + fontFamily: FontFamilyConfig; + fontSize: FontSizeConfig; + heading: HeadingConfig; + highlight: HighlightConfig; + image: ImageConfig; + language: string; + mediaEmbed: MediaEmbedConfig; + plugins: Array; + removePlugins: string[]; + toolbar: string[] | {items: string[]; viewportTopOffset: number; }; + typing: TypingConfig; + } + + // core/editor/editorui + + class EditorUI implements ckutils.Emitter { + readonly componentFactory: ComponentFactory; + readonly editor: Editor; + readonly focusTracker: ckutils.FocusTracker; + readonly view: EditorUIView; + + constructor(editor: Editor, view: EditorUIView); + destroy(): void; + update(): void; + + // Emitter + delegate(...events: string[]): ckutils.EmitterMixinDelegateChain; + fire(eventOrInfo: string | ckutils.EventInfo, ...args: any[]): any; + listenTo(emitter: ckutils.Emitter, event: string, callback: Function, options?: {priority?: ckutils.PriorityString | number }): void; + off(event: string, callback?: Function): void; + on(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + once(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + stopDelegating(event?: string, emitter?: ckutils.Emitter): void; + stopListening(emitter?: ckutils.Emitter, event?: string, callback?: Function): void; + } + + // core/editor/editorwithui + + interface EditorWithUI { + readonly element: HTMLElement | null; + readonly ui: EditorUI; + } +} + +// core/command + +export class Command implements ckutils.Emitter, ckutils.Observable { + readonly editor: editor.Editor; + readonly isEnabled: boolean; + readonly value: T | undefined; + + constructor(editor: editor.Editor); + destroy(): void; + execute(): void; + refresh(): void; + + // Emitter + delegate(...events: string[]): ckutils.EmitterMixinDelegateChain; + fire(eventOrInfo: string | ckutils.EventInfo, ...args: any[]): any; + listenTo(emitter: ckutils.Emitter, event: string, callback: Function, options?: {priority?: ckutils.PriorityString | number }): void; + off(event: string, callback?: Function): void; + on(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + once(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + stopDelegating(event?: string, emitter?: ckutils.Emitter): void; + stopListening(emitter?: ckutils.Emitter, event?: string, callback?: Function): void; + + // Observable + bind(...bindProperties: string[]): ckutils.BindChain; + decorate(methodName: string): void; + set(name: object): void; + set(name: string, value: any): void; + unbind(...unbindProperties: string[]): void; +} + +// core/commandcollection + +export class CommandCollection { + constructor(); + [Symbol.iterator](): Iterator<[string, Command]>; + add(commandName: string, command: Command): void; + commands(): IterableIterator; + destroy(): void; + execute(commandName: string, ...commandParams: any[]): void; + get(commandName: string): Command; + names(): IterableIterator; +} + +// core/editingkeystrokehandler + +export class EditingKeystrokeHandler extends ckutils.KeystrokeHandler { + readonly editor: editor.Editor; + + constructor(editor: editor.Editor); + set( + keystroke: string | Array, + callback: string | ((keyEvtData: engine.view.observer.KeyEventData, cancel: () => void) => void), + options?: {priority: ckutils.PriorityString | number} + ): void; +} + +// core/pendingactions + +export class PendingActions extends Plugin { + static readonly pluginName: "PendingActions"; + + first: null | ckutils.Observable & {message: string}; + readonly hasAny: boolean; + + [Symbol.iterator](): Iterator; + add(message: string): ckutils.Observable & {message: string}; + remove(action: ckutils.Observable & {message: string}): void; +} + +// core/plugin + +export abstract class Plugin implements ckutils.Emitter, ckutils.Observable { + readonly editor: editor.Editor; + + static readonly pluginName?: string; + static readonly requires?: Array Plugin>; + + constructor(editor: editor.Editor); + afterInit?(): null | Promise; + destroy?(): null | Promise; + init?(): null | Promise; + + // Emitter + delegate(...events: string[]): ckutils.EmitterMixinDelegateChain; + fire(eventOrInfo: string | ckutils.EventInfo, ...args: any[]): any; + listenTo(emitter: ckutils.Emitter, event: string, callback: Function, options?: {priority?: ckutils.PriorityString | number }): void; + off(event: string, callback?: Function): void; + on(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + once(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + stopDelegating(event?: string, emitter?: ckutils.Emitter): void; + stopListening(emitter?: ckutils.Emitter, event?: string, callback?: Function): void; + + // Observable + bind(...bindProperties: string[]): ckutils.BindChain; + decorate(methodName: string): void; + set(name: object): void; + set(name: string, value: any): void; + unbind(...unbindProperties: string[]): void; +} + +// PluginInterface, see Plugin + +// core/plugincollection + +export class PluginCollection

> { + constructor( + editor: editor.Editor, + availablePlugins?: Array P> + ); + + [Symbol.iterator](): Iterator<[new(editor: editor.Editor) => P, P]>; + + destroy(): Promise}>>; + + get( + key: string | (new(editor: editor.Editor) => P) + ): P | undefined; + + load( + plugins: Array P)>, + removePlugins?: Array P)> + ): Promise; +} diff --git a/types/ckeditor__ckeditor5-core/tsconfig.json b/types/ckeditor__ckeditor5-core/tsconfig.json new file mode 100644 index 0000000000..5f53bb9035 --- /dev/null +++ b/types/ckeditor__ckeditor5-core/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "lib": [ + "es6", + "dom", + "es2015.promise" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "ckeditor__ckeditor5-core-tests.ts" + ] +} diff --git a/types/ckeditor__ckeditor5-core/tslint.json b/types/ckeditor__ckeditor5-core/tslint.json new file mode 100644 index 0000000000..b4dd998211 --- /dev/null +++ b/types/ckeditor__ckeditor5-core/tslint.json @@ -0,0 +1,22 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "ban-types": { + "options": [ + ["Object", "Avoid using the `Object` type. Did you mean `object`?"], + ["Boolean", "Avoid using the `Boolean` type. Did you mean `boolean`?"], + ["Number", "Avoid using the `Number` type. Did you mean `number`?"], + ["String", "Avoid using the `String` type. Did you mean `string`?"], + ["Symbol", "Avoid using the `Symbol` type. Did you mean `symbol`?"] + ] + }, + "no-empty-interface": false, + "prefer-switch": false, + "quotemark": [ + true, + "double", + "avoid-escape", + "avoid-template" + ] + } +} diff --git a/types/ckeditor__ckeditor5-engine/ckeditor__ckeditor5-engine-tests.ts b/types/ckeditor__ckeditor5-engine/ckeditor__ckeditor5-engine-tests.ts new file mode 100644 index 0000000000..676f30ac3b --- /dev/null +++ b/types/ckeditor__ckeditor5-engine/ckeditor__ckeditor5-engine-tests.ts @@ -0,0 +1,81 @@ +import * as engine from "ckeditor__ckeditor5-engine"; + +declare let pattern: engine.view.MatcherPattern; + +pattern = {name: /^p/}; + +pattern = { + attributes: { + title: "foobar", + foo: /^\w+/, + bar: true, + } +}; + +pattern = { + classes: "foobar" +}; + +pattern = { + classes: /foo.../ +}; + +pattern = { + classes: ["baz", "bar", /foo.../] +}; + +pattern = { + styles: { + position: "absolute", + color: /^\w*blue$/ + } +}; + +pattern = { + name: "span", + styles: { + "font-weight": "bold" + }, + classes: "highlighted" +}; + +pattern = (element: engine.view.Element) => { + if (element.name === "div" && element.childCount > 0) { + return {name: true}; + } + + return null; +}; + +pattern = (element: engine.view.Element) => { + if (element.name === "p") { + const fontSize = element.getStyle("font-size")!; + const size = fontSize.match(/(\d+)/px); + + if (size && Number(size[1]) > 26) { + return {name: true, attribute: ["font-size"]}; + } + } + + return null; +}; + +declare let viewDefinition: engine.view.ElementDefinition; + +viewDefinition = "p"; + +viewDefinition = { + name: "h1", + classes: ["foo", "bar"], +}; + +viewDefinition = { + name: "span", + styles: { + "font-size": "12px", + "font-weight": "bold", + }, + attributes: { + "data-id": "123", + } +}; diff --git a/types/ckeditor__ckeditor5-engine/index.d.ts b/types/ckeditor__ckeditor5-engine/index.d.ts new file mode 100644 index 0000000000..280b6ea213 --- /dev/null +++ b/types/ckeditor__ckeditor5-engine/index.d.ts @@ -0,0 +1,1368 @@ +// Type definitions for @ckeditor/ckeditor5-engine 11.0 +// Project: https://github.com/ckeditor/ckeditor5-engine +// Definitions by: denisname +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +import * as ckutils from "ckeditor__ckeditor5-utils"; + +export namespace controller { + // engine/controller/datacontroller + + class DataController implements ckutils.Emitter, ckutils.Observable { + readonly downcastDispatcher: conversion.DowncastDispatcher; + readonly mapper: conversion.Mapper; + readonly model: model.Model; + readonly processor: dataprocessor.DataProcessor; + readonly upcastDispatcher: conversion.UpcastDispatcher; + + constructor(model: model.Model, dataProcessor?: dataprocessor.DataProcessor); + destroy(): void; + get(rootName?: string): string; + init(data: string, rootName?: string): Promise; + parse(data: string, context?: model.SchemaContextDefinition): model.DocumentFragment; + stringify(modelElementOrFragment: Element | model.DocumentFragment): string; + toModel(viewElementOrFragment: Element | model.DocumentFragment, context?: model.SchemaContextDefinition): model.DocumentFragment; + toView(modelElementOrFragment: Element | model.DocumentFragment): model.DocumentFragment; + + // Emitter + delegate(...events: string[]): ckutils.EmitterMixinDelegateChain; + fire(eventOrInfo: string | ckutils.EventInfo, ...args: any[]): any; + listenTo(emitter: ckutils.Emitter, event: string, callback: Function, options?: {priority?: ckutils.PriorityString | number }): void; + off(event: string, callback?: Function): void; + on(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + once(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + stopDelegating(event?: string, emitter?: ckutils.Emitter): void; + stopListening(emitter?: ckutils.Emitter, event?: string, callback?: Function): void; + + // Observable + bind(...bindProperties: string[]): ckutils.BindChain; + decorate(methodName: string): void; + set(name: object): void; + set(name: string, value: any): void; + unbind(...unbindProperties: string[]): void; + } + + // engine/controller/editingcontroller + + class EditingController implements ckutils.Emitter, ckutils.Observable { + readonly downcastDispatcher: conversion.DowncastDispatcher; + readonly mapper: conversion.Mapper; + readonly model: model.Model; + readonly view: view.View; + + constructor(model: model.Model); + destroy(): void; + + // Emitter + delegate(...events: string[]): ckutils.EmitterMixinDelegateChain; + fire(eventOrInfo: string | ckutils.EventInfo, ...args: any[]): any; + listenTo(emitter: ckutils.Emitter, event: string, callback: Function, options?: {priority?: ckutils.PriorityString | number }): void; + off(event: string, callback?: Function): void; + on(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + once(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + stopDelegating(event?: string, emitter?: ckutils.Emitter): void; + stopListening(emitter?: ckutils.Emitter, event?: string, callback?: Function): void; + + // Observable + bind(...bindProperties: string[]): ckutils.BindChain; + decorate(methodName: string): void; + set(name: object): void; + set(name: string, value: any): void; + unbind(...unbindProperties: string[]): void; + } +} + +export namespace conversion { + // engine/conversion/conversion + + class Conversion { + constructor(); + attributeToAttribute(definition?: {model: string | Object, view?: string | Object, upcastAlso?: view.MatcherPattern | view.MatcherPattern[]}): void; + attributeToElement(definition: ConverterDefinition): void; + elementToElement(definition: ConverterDefinition): void; + for(groupName: string): {add: () => void}; + register(groupName: string, dispatchers: Array): void; + } + + interface ConverterDefinition { + converterPriority: ckutils.PriorityString; + model: any; + upcastAlso: view.MatcherPattern | view.MatcherPattern[]; + view: view.ElementDefinition | Object; + } + + // engine/conversion/downcast-converters + + interface HighlightDescriptor { + attributes: Object; + classes: string | string[]; + id: string; + priority: number; + } + + // engine/conversion/downcast-selection-converters + + function clearAttributes(): Function; + + function convertCollapsedSelection(): Function; + + function convertRangeSelection(): Function; + + // engine/conversion/downcastdispatcher + + class DowncastDispatcher { + // TODO + } + + // engine/conversion/mapper + + class Mapper { + constructor(); + bindElementToMarker(element: view.Element, name: string): void; + bindElements(modelElement: model.Element, viewElement: view.Element): void; + clearBindings(): void; + getModelLength(viewNode: view.Element): number; + markerNameToElements(name: string): Set | null; + registerViewToModelLength(viewElementName: string, lengthCallback: Function): void; + toModelElement(viewElement: view.Element): model.Element | undefined; + toModelPosition(viewPosition: view.Position): model.Position; + toModelRange(viewRange: view.Range): model.Range; + toViewElement(modelElement: model.Element): view.Element | undefined; + toViewPosition(modelPosition: model.Position, options?: {isPhantom: boolean}): view.Position; + toViewRange(modelRange: model.Range): view.Range; + unbindElementsFromMarkerName(name: string): void; + unbindModelElement(modelElement: model.Element): void; + unbindViewElement(viewElement: view.Element): void; + } + + // engine/conversion/modelconsumable + + class ModelConsumable { + constructor(); + add(item: model.Item | model.Selection | model.Range, type: string): void; + consume(item: model.Item | model.Selection | model.Range, type: string): boolean; + revert(item: model.Item | model.Selection | model.Range, type: string): null | boolean; + test(item: model.Item | model.Selection | model.Range, type: string): null | boolean; + } + + // engine/conversion/upcast-converters + + function convertText(): Function; + + function convertToModelFragment(): Function; + + function upcastAttributeToAttribute( + config: {view: string | {key: string, name: string, value: string | RegExp | Function}, + model: string | {key: string, value: string | Function}, + converterPriority?: ckutils.PriorityString} + ): Function; + + function upcastElementToAttribute( + config: {view: view.MatcherPattern, model: string | {key: string, value: string | Function}, converterPriority?: ckutils.PriorityString} + ): Function; + + function upcastElementToElement( + config: {view: view.MatcherPattern, model: string | Element | Function, converterPriority?: ckutils.PriorityString} + ): Function; + + function upcastElementToMarker( + config: {view: view.MatcherPattern, model: string | Function, converterPriority?: ckutils.PriorityString} + ): Function; + + // engine/conversion/upcast-selection-converters + + function convertSelectionChange(model: model.Model, mapper: Mapper): Function; + + // engine/conversion/upcastdispatcher + + class UpcastDispatcher { + // TODO + } + + interface ViewConversionApi { + // TODO + } + + // engine/conversion/viewconsumable + + class ViewConsumable { + // TODO + } +} + +export namespace dataprocessor { + // engine/dataprocessor/basichtmlwriter + + class BasicHtmlWriter implements HtmlWriter { + getHtml(fragment: model.DocumentFragment): string; + } + + // engine/dataprocessor/dataprocessor + + interface DataProcessor { + // TODO + } + + // engine/dataprocessor/htmldataprocessor + + class HtmlDataProcessor implements DataProcessor { + // TODO + } + + // engine/dataprocessor/htmlwriter + + interface HtmlWriter { + getHtml(fragment: model.DocumentFragment): string; + } + + // engine/dataprocessor/xmldataprocessor + + class XmlDataProcessor implements DataProcessor { + // TODO + } +} + +export namespace devUtils { + // engine/dev-utils/enableenginedebug + + class DebugPlugin {} + + function disableEngineDebug(): void; + + function enableEngineDebug(_logger: {log: (...arg: any[]) => string, error: (...arg: any[]) => string}): DebugPlugin; + + // engine/dev-utils/model + + namespace devmodel { + function getData( + model: model.Model, + options?: { + withoutSelection?: boolean, + rootName?: string, + convertMarkers?: boolean + } + ): string; + + function parse( + data: string, + schema: model.Schema, + batch: model.Batch, + options?: { + selectionAttributes?: Object[], + lastRangeBackward?: boolean, + context?: model.SchemaContextDefinition + } + ): model.Element | model.Text | model.DocumentFragment | Object; + + function setData(model: string, data: Object, options: {rootName?: string, selectionAttributes?: Object[], lastRangeBackward?: boolean, batchType?: string}): void; + + function stringify( + node: model.RootElement | model.Element | model.Text | model.DocumentFragment, + selectionOrPositionOrRange: model.Selection | model.Position | model.Range, // TODO optional + markers: Iterable | null + ): string; + } + + // engine/dev-utils/operationreplayer + + class OperationReplayer { + // TODO + } + + // engine/dev-utils/view + + function getData( + view: view.View, + options?: { + withoutSelection?: boolean, + rootName?: boolean, + showType?: boolean, + showPriority?: boolean, + showAttributeElementId?: boolean, + renderUIElements?: boolean, + } + ): string; + + function parse( + data: string, + options: { + order?: number[], + lastRangeBackward?: boolean, + rootElement?: view.Element | view.DocumentFragment, + sameSelectionCharacters?: boolean + } + ): view.Text | view.Element | view.DocumentFragment | Object; + + function setData( + view: view.View, + data: string, + options: {rootName?: string} + ): void; + + function stringify( + node: view.Text | view.Element | view.DocumentFragment, + selectionOrPositionOrRange?: view.DocumentSelection | view.Position | view.Range, + options?: { + showType?: boolean, + showPriority?: boolean, + showAttributeElementId?: boolean, + ignoreRoot?: boolean, + sameSelectionCharacters?: boolean, + renderUIElements?: boolean, + } + ): string; +} + +export namespace model { + namespace operation { + // engine/model/operation/attributeoperation + + class AttributeOperation { + // TODO + } + + // engine/model/operation/detachoperation + + class DetachOperation { + // TODO + } + + // engine/model/operation/insertoperation + + class InsertOperation { + // TODO + } + + // engine/model/operation/markeroperation + + class MarkerOperation { + // TODO + } + + // engine/model/operation/mergeoperation + + class MergeOperation { + // TODO + } + + // engine/model/operation/moveoperation + + class MoveOperation { + // TODO + } + + // engine/model/operation/nooperation + + class NoOperation { + // TODO + } + + // engine/model/operation/operation + + class Operation { + // TODO + } + + // engine/model/operation/operationfactory + + class OperationFactory { + // TODO + } + + // engine/model/operation/renameoperation + + class RenameOperation { + // TODO + } + + // engine/model/operation/rootattributeoperation + + class RootAttributeOperation { + // TODO + } + + // engine/model/operation/splitoperation + + class SplitOperation { + // TODO + } + + // engine/model/operation/transform + + class TransformationContext { + // TODO + } + + function transform(a: Operation, b: Operation, context: TransformationContext): Operation[]; + + function transformSets(operationsA: Operation[], operationsB: Operation[], options: {document: Document | null, useRelations: boolean, padWithNoOps: boolean}): object; + } + + namespace utils { + function deleteContent( + model: Model, + selection: Selection | DocumentSelection, + batch: Batch, + options?: {leaveUnmerged: boolean, doNotResetEntireContent: boolean} + ): void; + + function getSelectedContent( + model: Model, + selection: Selection | DocumentSelection + ): DocumentFragment; + + function insertContent( + model: Model, + content: DocumentFragment | Item, + selectable?: Selection | DocumentSelection | Position | Element | Iterable | Range | null + ): void; + + function modifySelection( + model: Model, + selection: Selection | DocumentSelection, + options?: {direction?: "forward" | "backward", unit?: "character" | "codePoint" | "word"} + ): void; + + function injectSelectionPostFixer( + model: Model + ): void; + } + + // engine/model/batch + + class Batch { + // TODO + } + + // engine/model/differ + + class Differ { + // TODO + } + + // engine/model/document + + class Document { + // TODO + } + + // engine/model/documentfragment + + class DocumentFragment { + readonly childCount: number; + readonly isEmpty: boolean; + readonly markers: Map; + readonly maxOffset: number; + readonly parent: null; + readonly root: DocumentFragment; + + protected constructor(children?: Node | Iterable); + [Symbol.iterator](): Iterator; + getChild(index: number): Node | null; + getChildIndex(node: Node): number | null; + getChildStartOffset(node: Node): number | null; + getChildren(): Iterable; + getNodeByPath(relativePath: number[]): Node | DocumentFragment; + getPath(): number[]; /*TS3.0: []*/ + is(type: string): boolean; + offsetToIndex(offset: number): number; + toJSON(): Object; + protected _appendChild(items: Item | Iterable): void; + protected _insertChild(index: number, items: Item | Iterable): void; + protected _removeChildren(index: number, howMany?: number): Node[]; + + static fromJSON(json: object): DocumentFragment; + } + + // engine/model/documentselection + + class DocumentSelection { + // TODO + } + + // engine/model/element + + class Element extends Node { + readonly childCount: number; + readonly isEmpty: boolean; + readonly maxOffset: number; + readonly name: string; + + protected constructor( + name: string, + attrs?: Map | ReadonlyArray<[string, any]>, + children?: Node | Iterable + ); + getChild(index: number): Node; + getChildIndex(node: Node): number; + getChildStartOffset(node: Node): number; + getChildren(): Iterable; + getNodeByPath(relativePath: number[]): Node; + is(type: string, name?: string): boolean; + offsetToIndex(offset: number): number; + toJSON(): object; + protected _appendChild(nodes: Item | Iterable): void; + protected _clone(deep?: boolean): Element; + protected _insertChild(index: number, items: Item | Iterable): void; + protected _removeChildren(index: number, howMany?: number): Node[]; + + static fromJSON(json: object): Element; + } + + // engine/model/history + + class History { + // TODO + } + + // engine/model/item + + type Item = Node | TextProxy; + + // engine/model/liveposition + + class LivePosition { + // TODO + } + + // engine/model/liverange + + class LiveRange { + // TODO + } + + // engine/model/markercollection + + class Marker { + // TODO + } + + class MarkerCollection { + // TODO + } + + // engine/model/model + + class Model implements ckutils.Emitter, ckutils.Observable { + readonly document: Document; + readonly markers: MarkerCollection; + readonly schema: Schema; + + applyOperation(operation: operation.Operation): void; + change(callback: Function): any; + deleteContent(selection: Selection | DocumentSelection, batch: Batch, options: {leaveUnmerged?: boolean, doNotResetEntireContent?: boolean}): void; + destroy(): void; + enqueueChange(batchOrType: Batch | "transparent" | "default", callback: Function): void; + getSelectedContent(selection: Selection | DocumentSelection): DocumentFragment; + hasContent(rangeOrElement: Range | Element): boolean; + insertContent(content: DocumentFragment | Item, selectable?: Selection | DocumentSelection | Position | Element | Iterable | Range | null): void; + modifySelection(selection: Selection | DocumentSelection, options?: {direction?: "forward" | "backward", unit?: "character" | "codePoint" | "word"}): void; + + // Emitter + delegate(...events: string[]): ckutils.EmitterMixinDelegateChain; + fire(eventOrInfo: string | ckutils.EventInfo, ...args: any[]): any; + listenTo(emitter: ckutils.Emitter, event: string, callback: Function, options?: {priority?: ckutils.PriorityString | number }): void; + off(event: string, callback?: Function): void; + on(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + once(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + stopDelegating(event?: string, emitter?: ckutils.Emitter): void; + stopListening(emitter?: ckutils.Emitter, event?: string, callback?: Function): void; + + // Observable + bind(...bindProperties: string[]): ckutils.BindChain; + decorate(methodName: string): void; + set(name: object): void; + set(name: string, value: any): void; + unbind(...unbindProperties: string[]): void; + } + + // engine/model/node + + class Node { + readonly document: Document | null; + readonly endOffset: number | null; + readonly index: number | null; + readonly nextSibling: Node | null; + readonly offsetSize: number; + readonly parent: Element | DocumentFragment | null; + readonly previousSibling: Node | null; + readonly root: Node | DocumentFragment; + readonly startOffset: number | null; + + constructor(attrs?: Map | ReadonlyArray<[string, any]>); + getAncestors(options: {includeSelf: boolean, parentFirst: boolean}): Node[]; + getAttribute(key: string): any /*| undefined*/; + getAttributeKeys(): Iterable; + getAttributes(): Iterable; + getCommonAncestor(node: Node, options?: {includeSelf: boolean}): Element | DocumentFragment | null; + getPath(): number[]; + hasAttribute(key: string): boolean; + + is(type: "element"): this is Element; + is(type: "rootElement"): this is RootElement; + is(type: "text"): this is Text; + is(type: "textProxy"): this is TextProxy; + is(type: "documentFragment"): this is DocumentFragment; + is(type: string, name: string): boolean; + + isAfter(node: Node): boolean; + isBefore(node: Node): boolean; + toJSON(): object; + } + + type NodeSet = Node | TextProxy | string | NodeList | DocumentFragment | Iterable; + + // engine/model/nodelist + + class NodeList implements Iterable { + readonly length: number; + readonly maxOffset: number; + + [Symbol.iterator](): Iterator; + getNode(index: number): Node | null; + getNodeIndex(node: Node): number | null; + getNodeStartOffset(node: Node): number | null; + indexToOffset(index: number): number; + offsetToIndex(offset: number): number; + toJSON(): Node[]; + } + + // engine/model/position + + class Position { + readonly index: number; + readonly isAtEnd: boolean; + readonly isAtStart: boolean; + readonly nodeAfter: Node | null; + readonly nodeBefore: Node; + offset: number; + readonly parent: Element; + readonly path: number[]; + readonly root: Element | DocumentFragment; + stickiness: PositionStickiness; + readonly textNode: Text | null; + + constructor(root: Element | DocumentFragment, path: number[], stickiness?: PositionStickiness); + compareWith(otherPosition: Position): PositionRelation; + getAncestors(): Item[]; + getCommonAncestor(position: Position): Element | DocumentFragment | null; + getCommonPath(position: Position): number[]; + getLastMatchingPosition(skip: (t: TreeWalkerValue) => boolean, options: object): Position; + getParentPath(): number[]; + getShiftedBy(shift: number): Position; + getTransformedByOperation(operation: operation.Operation): Position; + hasSameParentAs(position: Position): boolean; + isAfter(otherPosition: Position): boolean; + isBefore(otherPosition: Position): boolean; + isEqual(otherPosition: Position): boolean; + isTouching(otherPosition: Position): boolean; + toJSON(): object; + + static createAfter(item: Item): Position; + static createAt(itemOrPosition: Item | Position, offset?: number | "end" | "before" | "after"): void; + static createBefore(item: Item): Position; + static createFromParentAndOffset(parent: Element | DocumentFragment, offset: number): Position; + static createFromPosition(position: Position): Position; + static fromJSON(json: object, doc: Document): Position; + } + + type PositionRelation = "before" | "after" | "same"; + + type PositionStickiness = "toNone" | "toNext" | "toPrevious"; + + // engine/model/range + + class Range implements Iterable { + readonly end: Position; + isCollapsed: boolean; + isFlat: boolean; + root: Element | DocumentFragment; + readonly start: Position; + + constructor(start: Position, end?: Position); + [Symbol.iterator](): Iterator; + containsItem(item: Item): void; + containsPosition(position: Position): boolean; + containsRange(otherRange: Range, loose?: boolean): boolean; + getCommonAncestor(): Element | DocumentFragment | null; + getDifference(otherRange: Range): Range[]; + getIntersection(otherRange: Range): Range | null; + getMinimalFlatRanges(): Range[]; + getPositions(options: object): Iterable; + getTransformedByOperation(operation: operation.Operation): Range[]; + getTransformedByOperations(operations: Iterable): Range[]; + getWalker(options: { + startPosition: Position, + singleCharacters: boolean, + shallow: boolean, + ignoreElementEnd: boolean, + }): void; + isEqual(otherRange: Range): boolean; + isIntersecting(otherRange: Range): boolean; + toJSON(): object; + } + + function getItems(options: object): Iterable; + + // engine/model/rootelement + + class RootElement extends Element { + readonly document: Document | null; + readonly rootName: string; + + constructor(doc: Document, name: string, rootName: string); + // TODO: toJSON(): string; + } + + // engine/model/schema + + class Schema { + // TODO + } + + class SchemaContext { + // TODO + } + + interface SchemaCompiledItemDefinition { + name: string; + allowIn: string | string[]; + allowAttributes: string | string[]; + isBlock: boolean; + isLimit: boolean; + isObject: boolean; + } + + type SchemaContextDefinition = Node | Position | SchemaContext | string | Array; + + interface SchemaContextItem { + name: string; + getAttributeKeys: Iterable; + getAttribute: (key: string) => string; + } + + interface SchemaItemDefinition { + allowIn: string | string[]; + allowAttributes: string | string[]; + allowContentOf: string | string[]; + allowWhere: string | string[]; + allowAttributesOf: string | string[]; + inheritTypesFrom: string | string[]; + inheritAllFrom: string | string[]; + isBlock: boolean; + isLimit: boolean; + isObject: boolean; + } + + // engine/model/selection + + class Selection implements ckutils.Emitter { + // TODO + + // Emitter + delegate(...events: string[]): ckutils.EmitterMixinDelegateChain; + fire(eventOrInfo: string | ckutils.EventInfo, ...args: any[]): any; + listenTo(emitter: ckutils.Emitter, event: string, callback: Function, options?: {priority?: ckutils.PriorityString | number }): void; + off(event: string, callback?: Function): void; + on(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + once(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + stopDelegating(event?: string, emitter?: ckutils.Emitter): void; + stopListening(emitter?: ckutils.Emitter, event?: string, callback?: Function): void; + } + + // engine/model/text + + class Text extends Node { + readonly data: string; + protected _data: string; + + protected constructor(data: string, attrs?: Map | ReadonlyArray<[string, any]>); + toJSON(): object; + protected _clone(): Text; + + static fromJSON(json: object): Text; + } + + // engine/model/textproxy + + class TextProxy { + readonly data: string; + readonly document: Document | null; + readonly endOffset: number; + readonly isPartial: boolean; + readonly offsetInText: number; + readonly offsetSize: number; + readonly parent: Element | DocumentFragment | null; + readonly root: Node | DocumentFragment; + readonly startOffset: number; + readonly textNode: Text; + + protected constructor(textNode: Text, offsetInText: number, length: number); + getAncestors(options: {includeSelf?: boolean, parentFirst?: boolean}): Array; + getAttribute(key: string): any; + getAttributeKeys(): Iterable; + getAttributes(): Iterable; + getPath(): number[]; + hasAttribute(key: string): boolean; + is(type: "textProxy"): this is TextProxy; + is(type: string): boolean; + } + + // engine/model/treewalker + + class TreeWalker implements Iterable { + readonly boundaries: Range; + readonly direction: "backward" | "forward"; + readonly ignoreElementEnd: boolean; + readonly position: Position; + readonly shallow: boolean; + readonly singleCharacters: boolean; + + constructor(options?: { + direction?: "forward" | "backward", + boundaries?: Range, + startPosition: Position, + singleCharacters?: boolean, + shallow?: boolean, + ignoreElementEnd?: boolean + }); + [Symbol.iterator](): Iterator; + next(): TreeWalkerValue; + skip(skip: (t: TreeWalkerValue) => boolean): void; + } + + interface TreeWalkerValue { + item: Item; + length: number; + nextPosition: Position; + previousPosition: Position; + type: TreeWalkerValueType; + } + + type TreeWalkerValueType = "elementStart" | "elementEnd" | "character" | "text"; + + // engine/model/writer + + class Writer { + // TODO + } +} + +export namespace utils { + // engine/utils/bindtwostepcarettoattribute + + function bindTwoStepCaretToAttribute(view: view.View, model: model.Model, emitter: ckutils.Emitter, attribute: string): void; +} + +export namespace view { + namespace observer { + // engine/view/observer/clickobserver + + class ClickObserver extends DomEventObserver { + // TODO + } + + // engine/view/observer/compositionobserver + + class CompositionObserver extends DomEventObserver { + // TODO + } + + // engine/view/observer/domeventdata + + class DomEventData { + // TODO + } + + // engine/view/observer/domeventobserver + + class DomEventObserver extends Observer { + readonly domEventType: string | string[]; + useCapture: boolean; + + fire(eventType: string, domEvent: Event, additionalData?: Object): void; + onDomEvent(): void; + } + + // engine/view/observer/fakeselectionobserver + + class FakeSelectionObserver extends Observer { + constructor(view: View); + destroy(): void; + observe(): void; + } + + // engine/view/observer/focusobserver + + class FocusObserver extends DomEventObserver { + // TODO + } + + // engine/view/observer/keyobserver + + class KeyEventData extends DomEventData implements ckutils.KeystrokeInfo { + // KeystrokeInfo + altKey?: boolean; + ctrlKey?: boolean; + keyCode: number; + keystroke: number; + shiftKey?: boolean; + } + + class KeyObserver extends DomEventObserver { + // TODO + } + + // engine/view/observer/mouseobserver + + class MouseObserver extends DomEventObserver { + // TODO + } + + // engine/view/observer/mutationobserver + + class MutationObserver extends Observer { + domConverter: DomConverter; + renderer: Renderer; + } + + interface MutatedChildren { + newChildren: Node[]; + node: Element; + oldChildren: Node[]; + type: string; + } + + interface MutatedText { + newText: string; + node: Text; + oldText: string; + type: string; + } + + // engine/view/observer/observer + + class Observer { + readonly document: Document; + readonly isEnabled: boolean; + readonly view: View; + + constructor(view: View); + destroy(): void; + disable(): void; + enable(): void; + observe(domElement: HTMLElement, name: string): void; + } + + // engine/view/observer/selectionobserver + + class SelectionObserver extends Observer { + readonly domConverter: DomConverter; + readonly mutationObserver: MutationObserver; + readonly selection: DocumentSelection; + } + } + + // engine/view/attributeelement + + class AttributeElement extends Element { + readonly id: string | number; + readonly priority: number; + protected _clonesGroup: Set | null; + protected _id: string | number; + protected _priority: number; + + static DEFAULT_PRIORITY: number; + + protected constructor( + name: string, + attrs?: object | Iterable<[string, string]> | Map, + children?: Node | Iterable + ); + getElementsWithSameId(): Set; + getFillerOffset(): number | null; + isSimilar(otherElement: Element): boolean; + protected _clone(deep: boolean): AttributeElement; + } + + // engine/view/containerelement + + class ContainerElement extends Element { + protected constructor( + name: string, + attrs?: object | Iterable<[string, string]> | Map, + children?: Node | Iterable + ); + getFillerOffset(): number | null; + } + + // engine/view/document + + class Document implements ckutils.Emitter, ckutils.Observable { + readonly isComposing: boolean; + readonly isFocused: boolean; + isReadOnly: boolean; + readonly roots: ckutils.Collection; + readonly selection: DocumentSelection; + + constructor(); + getRoot(name?: string): RootEditableElement | null; + registerPostFixer(postFixer: (downcastWriter: DowncastWriter) => boolean): void; + protected _callPostFixers(writer: DowncastWriter): void; + + // Emitter + delegate(...events: string[]): ckutils.EmitterMixinDelegateChain; + fire(eventOrInfo: string | ckutils.EventInfo, ...args: any[]): any; + listenTo(emitter: ckutils.Emitter, event: string, callback: Function, options?: {priority?: ckutils.PriorityString | number }): void; + off(event: string, callback?: Function): void; + on(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + once(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + stopDelegating(event?: string, emitter?: ckutils.Emitter): void; + stopListening(emitter?: ckutils.Emitter, event?: string, callback?: Function): void; + + // Observable + bind(...bindProperties: string[]): ckutils.BindChain; + decorate(methodName: string): void; + set(name: object): void; + set(name: string, value: any): void; + unbind(...unbindProperties: string[]): void; + } + + type ChangeType = "children" | "attributes" | "text"; + + // engine/view/documentfragment + + class DocumentFragment { + readonly childCount: number; + readonly isEmpty: boolean; + readonly parent: null; + readonly root: DocumentFragment; + protected _children: Element[]; + + protected constructor(children?: Node | Iterable); + [Symbol.iterator](): Iterator; + _appendChild(items: Item | Iterable): number; + _insertChild(index: number, items: Item | Iterable): number; + _removeChildren(index: number, howMany?: number): Node[]; + getChild(index: number): Node; + getChildIndex(node: Node): number; + getChildren(): Iterable; + is(type: string): boolean; + } + + // engine/view/documentselection + + class DocumentSelection { + // TODO + } + + // engine/view/domconverter + + class DomConverter { + // TODO + } + + // engine/view/downcastwriter + + class DowncastWriter { + // TODO + } + + // engine/view/editableelement + + class EditableElement extends ContainerElement { + // TODO + } + + // engine/view/element + + class Element extends Node { + readonly childCount: number; + readonly isEmpty: boolean; + readonly name: string; + protected _attrs: Map; + protected _children: Node[]; + protected _classes: Set; + protected _customProperties: Map; + protected _styles: Map; + + protected constructor( + name: string, + attrs?: object | Iterable<[string, string]> | Map, + children?: Node | Iterable + ); + _removeChildren(index: number, howMany?: number): Node[]; + _removeClass(className: string[] | string): void; + findAncestor(patterns: Object | string | RegExp | Function): Element | null; + getAttribute(key: string): string | undefined; + getAttributeKeys(): Iterable; + getAttributes(): Iterable; + getChild(index: number): Node; + getChildIndex(node: Node): number; + getChildren(): Iterable; + getClassNames(): Iterable; + getCustomProperties(): Iterable; + getCustomProperty(key: string | symbol): any; + getFillerOffset(): void; + getIdentity(): string; + getStyle(property: string): string | undefined; + getStyleNames(): Iterable; + hasAttribute(key: string): boolean; + hasClass(className: string): void; + hasStyle(property: string): void; + is(type: string, name?: string): boolean; + isSimilar(otherElement: Element): boolean; + protected _addClass(className: string[] | string): void; + protected _appendChild(items: Item | Iterable): number; + protected _clone(deep?: boolean): Element; + protected _insertChild(index: number, items: Item | Iterable): number; + protected _removeAttribute(key: string): boolean; + protected _removeCustomProperty(key: string | symbol): boolean; + protected _removeStyle(property: string[] | string): void; + protected _setAttribute(key: string, value: string): void; + protected _setCustomProperty(key: string | symbol, value: any): void; + protected _setStyle(property: string | {[key: string]: string}, value?: string): void; + } + + // engine/view/elementdefinition + + type ElementDefinition = string | { + attributes?: {[key: string]: string}; + classes?: string | string[]; + name: string; + priority?: number; + styles?: {[key: string]: string}; + }; + + // engine/view/emptyelement + + class EmptyElement extends Element { + protected constructor( + name: string, + attrs?: object | Iterable<[string, string]> | Map, + children?: Node | Iterable + ); + getFillerOffset(): null; + } + + // engine/view/filler + + const INLINE_FILLER_LENGTH: number; + + const INLINE_FILLER: string; + + function BR_FILLER(): void; + + function NBSP_FILLER(): void; + + function getDataWithoutFiller(domText: Text): string; + + function injectQuirksHandling(view: View): void; + + function isBlockFiller(domNode: /*TODO globals.*/Node, blockFiller: Function): boolean; + + function isInlineFiller(domText: /*TODO globals.*/Text): boolean; + + function startsWithFiller(domNode: /*TODO globals.*/Text): boolean; + + // engine/view/item + + type Item = Node | TextProxy; + + // engine/view/matcher + + class Matcher { + // TODO + } + + type MatcherPattern = + ((element: Element) => null | {name: boolean; attribute?: string[]; }) | + string | + RegExp | + { + attributes?: {[key: string]: string | RegExp | boolean}; + classes?: string | RegExp | Array; + name?: string | RegExp; + styles?: {[key: string]: string | RegExp}; + }; + + // engine/view/node + + class Node { + readonly document: Document | null; + readonly index: number | null; + readonly nextSibling: Node | null; + readonly parent: Element | DocumentFragment | null; + readonly previousSibling: Node | null; + readonly root: Node | DocumentFragment; + + constructor(); + _fireChange(type: ChangeType, node: Node): void; + getAncestors(options: {includeSelf: boolean, parentFirst?: boolean}): Array; + getCommonAncestor(node: Node, options: {includeSelf?: boolean}): Element | DocumentFragment | null; + getPath(): number[]; + + is(type: "element"): this is Element; + is(type: "containerElement"): this is ContainerElement; + is(type: "attributeElement"): this is AttributeElement; + is(type: "emptyElement"): this is EmptyElement; + is(type: "uiElement"): this is UIElement; + is(type: "documentFragment"): this is DocumentFragment; + is(type: "text"): this is Text; + is(type: "textProxy"): this is TextProxy; + is(type: string, name: string): boolean; + + isAfter(node: Node): boolean; + isBefore(node: Node): boolean; + isSimilar(otherElement: Node): boolean; + toJSON(): object; + protected _clone(): Node; + protected _remove(): void; + } + + // engine/view/placeholder + + function attachPlaceholder(view: View, element: Element, placeholderText: string, checkFunction?: Function): void; + + function detachPlaceholder(view: View, element: Element): void; + + // engine/view/position + + class Position { + // TODO + } + + type PositionRelation = "before" | "after" | "same" | "different"; + + // engine/view/range + + class Range { + // TODO + } + + // engine/view/renderer + + class Renderer { + // TODO + } + + // engine/view/rooteditableelement + + class RootEditableElement extends EditableElement { + // TODO + } + + // engine/view/selection + + class Selection { + // TODO + } + + // engine/view/text + + class Text extends Node { + readonly data: string; + protected _data: string; + protected _textData: string; + + protected constructor(data: string); + isSimilar(otherNode: Text): boolean; + protected _clone(): Text; + } + + // engine/view/textproxy + + class TextProxy { + readonly data: string; + readonly document: Document | null; + readonly isPartial: boolean; + readonly offsetInText: number; + readonly offsetSize: number; + readonly parent: Element | DocumentFragment | null; + readonly root: Node | DocumentFragment; + readonly textNode: Text; + + protected constructor(textNode: Text, offsetInText: number, length: number); + getAncestors(options: {includeSelf?: boolean, parentFirst?: boolean}): Array; + is(type: "textProxy"): this is TextProxy; + is(type: string): boolean; + } + + // engine/view/treewalker + + class TreeWalker { + readonly boundaries: Range; + readonly direction: TreeWalkerDirection; + readonly ignoreElementEnd: boolean; + readonly position: Position; + readonly shallow: boolean; + readonly singleCharacters: boolean; + + constructor(options: { + boundaries?: Range, + startPosition?: Position, + direction?: TreeWalkerDirection, + singleCharacters?: boolean, + shallow?: boolean, + ignoreElementEnd?: boolean; + }); + [Symbol.iterator](): Iterator; + next(): TreeWalkerValue; + skip(skip: (treeWalkerValue: TreeWalkerValue) => boolean): void; + } + + type TreeWalkerDirection = "forward" | "backward"; + + interface TreeWalkerValue { + item: Item; + length: number; + nextPosition: Position; + previousPosition: Position; + type: TreeWalkerValueType; + } + + type TreeWalkerValueType = "elementStart" | "elementEnd" | "text"; + + // engine/view/uielement + + class UIElement extends Element { + protected constructor( + name: string, + attrs?: object | Iterable<[string, string]> | Map, + children?: Node | Iterable + ); + getFillerOffset(): null; + render(domDocument: /*TODO: globals.*/Document): HTMLElement; + toDomElement(domDocument: /*TODO: globals.*/Document): HTMLElement; + } + + // engine/view/upcastwriter + + class UpcastWriter { + // TODO + } + + // engine/view/view + + class View implements ckutils.Emitter, ckutils.Observable { + // TODO + + // Emitter + delegate(...events: string[]): ckutils.EmitterMixinDelegateChain; + fire(eventOrInfo: string | ckutils.EventInfo, ...args: any[]): any; + listenTo(emitter: ckutils.Emitter, event: string, callback: Function, options?: {priority?: ckutils.PriorityString | number }): void; + off(event: string, callback?: Function): void; + on(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + once(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + stopDelegating(event?: string, emitter?: ckutils.Emitter): void; + stopListening(emitter?: ckutils.Emitter, event?: string, callback?: Function): void; + + // Observable + bind(...bindProperties: string[]): ckutils.BindChain; + decorate(methodName: string): void; + set(name: object): void; + set(name: string, value: any): void; + unbind(...unbindProperties: string[]): void; + } +} diff --git a/types/ckeditor__ckeditor5-engine/tsconfig.json b/types/ckeditor__ckeditor5-engine/tsconfig.json new file mode 100644 index 0000000000..36da122d77 --- /dev/null +++ b/types/ckeditor__ckeditor5-engine/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "ckeditor__ckeditor5-engine-tests.ts" + ] +} diff --git a/types/ckeditor__ckeditor5-engine/tslint.json b/types/ckeditor__ckeditor5-engine/tslint.json new file mode 100644 index 0000000000..6a214f0cfd --- /dev/null +++ b/types/ckeditor__ckeditor5-engine/tslint.json @@ -0,0 +1,20 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "ban-types": { + "options": [ + ["Boolean", "Avoid using the `Boolean` type. Did you mean `boolean`?"], + ["Number", "Avoid using the `Number` type. Did you mean `number`?"], + ["String", "Avoid using the `String` type. Did you mean `string`?"], + ["Symbol", "Avoid using the `Symbol` type. Did you mean `symbol`?"] + ] + }, + "no-empty-interface": false, + "quotemark": [ + true, + "double", + "avoid-escape", + "avoid-template" + ] + } +} diff --git a/types/ckeditor__ckeditor5-utils/ckeditor__ckeditor5-utils-tests.ts b/types/ckeditor__ckeditor5-utils/ckeditor__ckeditor5-utils-tests.ts index 82c272a6ec..19f21f667a 100644 --- a/types/ckeditor__ckeditor5-utils/ckeditor__ckeditor5-utils-tests.ts +++ b/types/ckeditor__ckeditor5-utils/ckeditor__ckeditor5-utils-tests.ts @@ -489,24 +489,30 @@ utils.mapsEqual(map, map); // utils/mix ================================================================== -class Editor { - b: () => number; -} - interface SomeMixin { a: () => string; } +class Editor implements SomeMixin { + a: () => string; + b() { return 3; } +} + const SomeMixin = { - a() { - return "a"; - } + a() { return "a"; } +}; + +const SomeMixinNum = { + a() { return 3; } }; utils.mix(Editor, SomeMixin); -const mixEditor = new Editor() as Editor & SomeMixin; -mixEditor.a(); -mixEditor.b(); +// $ExpectError +utils.mix(Editor, SomeMixinNum); + +const editor = new Editor(); +str = editor.a(); +num = editor.b(); // utils/nth ================================================================== diff --git a/types/ckeditor__ckeditor5-utils/index.d.ts b/types/ckeditor__ckeditor5-utils/index.d.ts index 8d9d50e889..50571483f8 100644 --- a/types/ckeditor__ckeditor5-utils/index.d.ts +++ b/types/ckeditor__ckeditor5-utils/index.d.ts @@ -367,7 +367,11 @@ export class KeystrokeHandler { destroy(): void; listenTo(emitter: Emitter): void; press(keyEvtData: KeystrokeInfo): boolean; - set(keystroke: string | Array, callback: Function, options?: {priority?: PriorityString | number}): void; + set( + keystroke: string | Array, + callback: (keyEvtData: KeystrokeInfo, cancel: () => void) => void, + options?: {priority?: PriorityString | number} + ): void; } // utils/locale @@ -392,7 +396,7 @@ export function mapsEqual(mapsA: Map, mapsB: Map): boolean; // utils/mix -export function mix(baseClass: {new(): any}, ...mixins: any[]): void; +export function mix(baseClass: {new(...p: any[]): T}, ...mixins: Array>): void; // utils/nth From 788d99040f5ae9e75dbf8649b4856eaf18d07ea3 Mon Sep 17 00:00:00 2001 From: Robin Hames Date: Sun, 2 Dec 2018 18:50:31 +0000 Subject: [PATCH 241/608] Add configPath to ConfigStoreOptions in @types/configstore --- types/configstore/index.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/types/configstore/index.d.ts b/types/configstore/index.d.ts index 2617f2bce0..bbc0740c23 100644 --- a/types/configstore/index.d.ts +++ b/types/configstore/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for configstore 2.1 +// Type definitions for configstore 4.0 // Project: https://github.com/yeoman/configstore // Definitions by: ArcticLight // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -67,5 +67,6 @@ declare class Configstore { declare namespace Configstore { interface ConfigstoreOptions { globalConfigPath?: boolean; + configPath?: string; } } From 4e8911977001fbfef99652853e182ef604d8b86a Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sun, 2 Dec 2018 19:38:23 +0100 Subject: [PATCH 242/608] Add types for fuzzy-search --- types/fuzzy-search/fuzzy-search-tests.ts | 27 ++++++++++++++++++++++++ types/fuzzy-search/index.d.ts | 26 +++++++++++++++++++++++ types/fuzzy-search/tsconfig.json | 23 ++++++++++++++++++++ types/fuzzy-search/tslint.json | 1 + 4 files changed, 77 insertions(+) create mode 100644 types/fuzzy-search/fuzzy-search-tests.ts create mode 100644 types/fuzzy-search/index.d.ts create mode 100644 types/fuzzy-search/tsconfig.json create mode 100644 types/fuzzy-search/tslint.json diff --git a/types/fuzzy-search/fuzzy-search-tests.ts b/types/fuzzy-search/fuzzy-search-tests.ts new file mode 100644 index 0000000000..667cda446f --- /dev/null +++ b/types/fuzzy-search/fuzzy-search-tests.ts @@ -0,0 +1,27 @@ +import FuzzySearch = require('fuzzy-search'); + +const f = new FuzzySearch(['1', '2', '3']); + +new FuzzySearch([{ a: 1 }, { a: 2 }, { a: 3 }], ['a']); + +new FuzzySearch([{ a: 1 }, { a: 2 }, { a: 3 }], ['a'], {}); + +new FuzzySearch([{ a: 1 }, { a: 2 }, { a: 3 }], ['a'], { caseSensitive: true }); + +new FuzzySearch([{ a: 1 }, { a: 2 }, { a: 3 }], ['a'], { sort: true }); + +new FuzzySearch([{ a: 1 }, { a: 2 }, { a: 3 }], ['a'], { caseSensitive: true, sort: true }); + +let strArr: string[]; + +strArr = f.haystack; +// $ExpectType string[] +f.keys; +// $ExpectType Required +f.options; + +strArr = new FuzzySearch(['1', '2', '3']).search(); +strArr = new FuzzySearch(['1', '2', '3']).search('2'); + +// $ExpectType number +FuzzySearch.isMatch('1', '1', false); diff --git a/types/fuzzy-search/index.d.ts b/types/fuzzy-search/index.d.ts new file mode 100644 index 0000000000..8c3d5103ff --- /dev/null +++ b/types/fuzzy-search/index.d.ts @@ -0,0 +1,26 @@ +// Type definitions for fuzzy-search 2.1 +// Project: https://github.com/wouter2203/fuzzy-search#readme +// Definitions by: Alex Deas +// BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +declare class FuzzySearch { + haystack: T[]; + keys: string[]; + options: Required; + + static isMatch(item: string, query: string, caseSensitive: boolean): number; + + constructor(haystack: T[], keys?: string[], options?: FuzzySearch.Options); + search(needle?: string): T[]; +} + +declare namespace FuzzySearch { + interface Options { + caseSensitive?: boolean; + sort?: boolean; + } +} + +export = FuzzySearch; diff --git a/types/fuzzy-search/tsconfig.json b/types/fuzzy-search/tsconfig.json new file mode 100644 index 0000000000..c72f9609d0 --- /dev/null +++ b/types/fuzzy-search/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "fuzzy-search-tests.ts" + ] +} diff --git a/types/fuzzy-search/tslint.json b/types/fuzzy-search/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/fuzzy-search/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From f368a2dbfdd73511fbde3ab961ec111ce0486646 Mon Sep 17 00:00:00 2001 From: Christian Sporer Date: Sun, 2 Dec 2018 20:01:52 +0100 Subject: [PATCH 243/608] Adaptations according to the ES6 spec: * https://github.com/definitelyTyped/DefinitelyTyped/#should-i-add-an-empty-namespace-to-a-package-that-doesnt-export-a-module-to-use-es6-style-imports * https://stackoverflow.com/a/39415662 * https://github.com/Microsoft/TypeScript/wiki/What's-new-in-TypeScript#support-for-import-d-from-cjs-form-commonjs-modules-with---esmoduleinterop --- types/list-stream/list-stream-tests.ts | 2 +- types/list-stream/tsconfig.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/types/list-stream/list-stream-tests.ts b/types/list-stream/list-stream-tests.ts index 5f04626b31..3648097ad6 100644 --- a/types/list-stream/list-stream-tests.ts +++ b/types/list-stream/list-stream-tests.ts @@ -1,4 +1,4 @@ -import * as ListStream from "list-stream"; +import ListStream from "list-stream"; let chunk: any = "chunk"; let listStream: ListStream; diff --git a/types/list-stream/tsconfig.json b/types/list-stream/tsconfig.json index 52ec1c73e1..060c211379 100644 --- a/types/list-stream/tsconfig.json +++ b/types/list-stream/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", From 3f185078d8bdf57c6669b08a5ea135de65555d9d Mon Sep 17 00:00:00 2001 From: Christian Sporer Date: Sun, 2 Dec 2018 20:04:46 +0100 Subject: [PATCH 244/608] Fix error while running `npm test` --- types/list-stream/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/list-stream/index.d.ts b/types/list-stream/index.d.ts index b51c9bacb0..f92eb5f917 100644 --- a/types/list-stream/index.d.ts +++ b/types/list-stream/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/rvagg/list-stream // Definitions by: IanStorm // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.7 /// From 1aeeff704cbf6b3ab599b4b6ff232690771b2099 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sun, 2 Dec 2018 20:21:13 +0100 Subject: [PATCH 245/608] Add types for snakecase-keys --- types/snakecase-keys/index.d.ts | 19 ++++++++++++++++ types/snakecase-keys/snakecase-keys-tests.ts | 5 +++++ types/snakecase-keys/tsconfig.json | 23 ++++++++++++++++++++ types/snakecase-keys/tslint.json | 1 + 4 files changed, 48 insertions(+) create mode 100644 types/snakecase-keys/index.d.ts create mode 100644 types/snakecase-keys/snakecase-keys-tests.ts create mode 100644 types/snakecase-keys/tsconfig.json create mode 100644 types/snakecase-keys/tslint.json diff --git a/types/snakecase-keys/index.d.ts b/types/snakecase-keys/index.d.ts new file mode 100644 index 0000000000..d9afe0a2fd --- /dev/null +++ b/types/snakecase-keys/index.d.ts @@ -0,0 +1,19 @@ +// Type definitions for snakecase-keys 2.1 +// Project: https://github.com/bendrucker/snakecase-keys#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +export = snakecaseKeys; + +declare function snakecaseKeys( + obj: object, + options?: snakecaseKeys.Options +): { [key: string]: any }; + +declare namespace snakecaseKeys { + interface Options { + deep?: boolean; + exclude?: Array; + } +} diff --git a/types/snakecase-keys/snakecase-keys-tests.ts b/types/snakecase-keys/snakecase-keys-tests.ts new file mode 100644 index 0000000000..e74d13404f --- /dev/null +++ b/types/snakecase-keys/snakecase-keys-tests.ts @@ -0,0 +1,5 @@ +import snakecaseKeys = require('snakecase-keys'); + +snakecaseKeys({ fooBar: 'baz' }); +snakecaseKeys({ fooBar: 'baz' }, { deep: false }); +snakecaseKeys({ fooBar: 'baz' }, { exclude: ['fooBax', /Foo$/] }); diff --git a/types/snakecase-keys/tsconfig.json b/types/snakecase-keys/tsconfig.json new file mode 100644 index 0000000000..6d944fa502 --- /dev/null +++ b/types/snakecase-keys/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "snakecase-keys-tests.ts" + ] +} diff --git a/types/snakecase-keys/tslint.json b/types/snakecase-keys/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/snakecase-keys/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From ec7a15613f2ccdb7e63d0ffc1d154bfa93395355 Mon Sep 17 00:00:00 2001 From: Robin Hames Date: Sun, 2 Dec 2018 19:21:34 +0000 Subject: [PATCH 246/608] Add test for ConfigStoreOptions.configPath in @types/configstore --- types/configstore/configstore-tests.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/types/configstore/configstore-tests.ts b/types/configstore/configstore-tests.ts index ffd04e31a7..9365afdbda 100644 --- a/types/configstore/configstore-tests.ts +++ b/types/configstore/configstore-tests.ts @@ -5,6 +5,7 @@ let value: any; let key: string; let num: number; let object: any; +let path: string; cs.set(key, value); value = cs.get(key); @@ -13,4 +14,12 @@ cs.delete(key); object = cs.all; cs.all = object; num = cs.size; -key = cs.path; +path = cs.path; + +const csWithPathOption = new Configstore('foo', null, { configPath: path }); + +csWithPathOption.set(key, value); +value = csWithPathOption.get(key); +csWithPathOption.delete(key); + +key = csWithPathOption.path; From 1bb213f443c6dc0eff1792967feb08b0aa59e555 Mon Sep 17 00:00:00 2001 From: Jacob Greenfield Date: Sun, 2 Dec 2018 14:50:04 -0500 Subject: [PATCH 247/608] Make argument to getFormatter optional See here: https://eslint.org/docs/developer-guide/nodejs-api#clienginegetformatter --- types/eslint/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/eslint/index.d.ts b/types/eslint/index.d.ts index 451477af40..01f39ee83e 100644 --- a/types/eslint/index.d.ts +++ b/types/eslint/index.d.ts @@ -471,7 +471,7 @@ export class CLIEngine { isPathIgnored(filePath: string): boolean; - getFormatter(format: string): CLIEngine.Formatter; + getFormatter(format?: string): CLIEngine.Formatter; getRules(): Map; From 9f24a56a9c1cd62aae856f0c1154b4ea99e04d1a Mon Sep 17 00:00:00 2001 From: Jacob Greenfield Date: Sun, 2 Dec 2018 15:02:01 -0500 Subject: [PATCH 248/608] Update tests --- types/eslint/eslint-tests.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/types/eslint/eslint-tests.ts b/types/eslint/eslint-tests.ts index c6b8b786fa..ed211d220e 100644 --- a/types/eslint/eslint-tests.ts +++ b/types/eslint/eslint-tests.ts @@ -480,7 +480,10 @@ cli.addPlugin('my-fancy-plugin', {}); cli.isPathIgnored('./dist/index.js'); -const formatter = cli.getFormatter('codeframe'); +let formatter: CLIEngine.Formatter; + +formatter = cli.getFormatter('codeframe'); +formatter = cli.getFormatter(); formatter(cliReport.results); From 0dc2aeee2feacafe39f0a73dc07fd2cd090e9a32 Mon Sep 17 00:00:00 2001 From: Jannik Keye Date: Sun, 2 Dec 2018 22:02:51 +0100 Subject: [PATCH 249/608] fxi: fastify version support 2.0 release candidate --- types/fastify-jwt/fastify-jwt-tests.ts | 7 +++---- types/fastify-jwt/package.json | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/types/fastify-jwt/fastify-jwt-tests.ts b/types/fastify-jwt/fastify-jwt-tests.ts index 6b92026b04..fc68ac8bcc 100644 --- a/types/fastify-jwt/fastify-jwt-tests.ts +++ b/types/fastify-jwt/fastify-jwt-tests.ts @@ -1,17 +1,16 @@ -import { IncomingMessage, Server, ServerResponse } from "http"; -import fastifyJwt = require("fastify-jwt"); import fastify = require("fastify"); +import fastifyJwt = require("fastify-jwt"); const app = fastify(); app.register(fastifyJwt, { - secret: "super-secret" + secret: "super-secret", }); app.register(fastifyJwt, { secret: (request, reply, callback) => { return ""; - } + }, }); app.get("/path", (request, reply) => { diff --git a/types/fastify-jwt/package.json b/types/fastify-jwt/package.json index e8c68ab969..5eb77c39fa 100644 --- a/types/fastify-jwt/package.json +++ b/types/fastify-jwt/package.json @@ -1,6 +1,6 @@ { "private": true, "dependencies": { - "fastify": "^1.11.2" + "fastify": ">=1.13.1 || 2.0.0-rc.1" } } From 8ac2b26cf846b8ad38e2ade7a51b03cb3e963dc3 Mon Sep 17 00:00:00 2001 From: Ilari Aarnio Date: Sun, 2 Dec 2018 23:09:05 +0200 Subject: [PATCH 250/608] Add missing types for imap-simple 4.2 Add type definitions for functions: - addBox - delBox - getBoxes - append Fix parameter name for delFlags. --- types/imap-simple/index.d.ts | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/types/imap-simple/index.d.ts b/types/imap-simple/index.d.ts index 3bde57c113..a45629f234 100644 --- a/types/imap-simple/index.d.ts +++ b/types/imap-simple/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for imap-simple v3.1.0 +// Type definitions for imap-simple v4.2.0 // Project: https://github.com/chadxz/imap-simple // Definitions by: Jeffery Grajkowski +// Ilari Aarnio // Definitions: https://github.com/psnider/DefinitelyTyped/imap-simple /// @@ -42,6 +43,18 @@ export class ImapSimple extends NodeJS.EventEmitter { openBox(boxName: string, callback: (err: Error, boxName: string) => void): void; openBox(boxName: string): Promise; + /** Create a mailbox, calling the provided callback with signature (err, boxName), or resolves the returned promise with boxName. */ + addBox(boxName: string, callback: (err: Error, boxName: string) => void): void; + addBox(boxName: string): Promise; + + /** Delete a mailbox, calling the provided callback with signature (err, boxName), or resolves the returned promise with boxName. */ + delBox(boxName: string, callback: (err: Error, boxName: string) => void): void; + delBox(boxName: string): Promise; + + /** Returns the full list of mailboxes (folders). Upon success, either the provided callback will be called with signature (err, boxes), or the returned promise will be resolved with boxes. Boxes is the exact object returned from the node-imap getBoxes() result. */ + getBoxes(callback: (err: Error, boxes: any) => void): void; + getBoxes(): Promise; + /** Search for and retrieve mail in the previously opened mailbox. */ search(searchCriteria: any[], fetchOptions: Imap.FetchOptions, callback: (err: Error, messages: Message[]) => void): void; search(searchCriteria: any[], fetchOptions: Imap.FetchOptions): Promise; @@ -57,6 +70,10 @@ export class ImapSimple extends NodeJS.EventEmitter { addMessageLabel(source: string | string[], label: string | string[], callback: (err: Error) => void): void; addMessageLabel(source: string | string[], label: string | string[]): Promise; + /** Appends the argument message to the currently open mailbox or another mailbox. Message is a RFC-822 compatible MIME message. Valid options are mailbox, flags and date. When completed, either calls the provided callback with signature (err), or resolves the returned promise. */ + append(message: any, options: any, callback: (err: Error) => void): void; + append(message: any, options: any): Promise; + /** Moves the specified message(s) in the currently open mailbox to another mailbox. source corresponds to a node-imap MessageSource which specifies the messages to be moved. When completed, either calls the provided callback with signature (err), or resolves the returned promise. */ moveMessage(source: string | string[], boxName: string, callback: (err: Error) => void): void; moveMessage(source: string | string[], boxName: string): Promise; @@ -66,8 +83,8 @@ export class ImapSimple extends NodeJS.EventEmitter { addFlags(source: string | string[], flag: string | string[]): Promise; /** Removes the provided flag(s) from the specified message(s). uid is the uid of the message you want to remove the flag from or an array of uids. flag is either a string or array of strings indicating the flags to remove. */ - delFlags(source: string | string[], flag: string | string[], callback: (err: Error) => void): void; - delFlags(source: string | string[], flag: string | string[]): Promise; + delFlags(uid: string | string[], flag: string | string[], callback: (err: Error) => void): void; + delFlags(uid: string | string[], flag: string | string[]): Promise; } export namespace errors { From 25db1d4746951c960276b85740fe375f83c5629b Mon Sep 17 00:00:00 2001 From: Ivan Fernandes Date: Sun, 2 Dec 2018 19:13:47 -0200 Subject: [PATCH 251/608] adding missing options from option type --- types/passport-bnet/index.d.ts | 21 ++++++++++----------- types/passport-oauth2/index.d.ts | 23 +++++++++++++++++++++++ 2 files changed, 33 insertions(+), 11 deletions(-) diff --git a/types/passport-bnet/index.d.ts b/types/passport-bnet/index.d.ts index 86255c782d..c8e6dd923c 100644 --- a/types/passport-bnet/index.d.ts +++ b/types/passport-bnet/index.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -import { Strategy as OAuth2Strategy, VerifyFunction, VerifyFunctionWithRequest } from 'passport-oauth2'; +import { Strategy as OAuth2Strategy, VerifyFunction, VerifyFunctionWithRequest, _StrategyOptionsBase } from 'passport-oauth2'; declare class BnetStrategy extends OAuth2Strategy { constructor(options: BnetStrategy.StrategyOptions, verify: VerifyFunction); @@ -12,17 +12,16 @@ declare class BnetStrategy extends OAuth2Strategy { } declare namespace BnetStrategy { - interface _BaseBnetOptions { - region?: string; - scopeSeparator?: string; - customHeaders?: object; - authorizationURL?: string; - tokenURL?: string; - scope?: string; - clientID: string; - clientSecret: string; - callbackURL?: string; + //Utility types for excluding properties from interfaces + type Diff = ({ [P in T]: P } & { [P in U]: never } & { [x: string]: never })[T]; + type Omit = Pick>; + + // passport--bnet accepts any options that passport-oauth2 accepts, but add the option region and makes authorizationURL and tokenURL optional + interface _BaseBnetOptions + extends Partial>, Omit<_StrategyOptionsBase, 'authorizationURL' | 'tokenURL'> { + + region?: string; } interface StrategyOptions extends _BaseBnetOptions { diff --git a/types/passport-oauth2/index.d.ts b/types/passport-oauth2/index.d.ts index d985852bd6..c3723b50b7 100644 --- a/types/passport-oauth2/index.d.ts +++ b/types/passport-oauth2/index.d.ts @@ -9,6 +9,7 @@ import { Request } from 'express'; import { Strategy } from 'passport'; import { OAuth2 } from 'oauth'; +import { OutgoingHttpHeaders } from 'http'; declare class OAuth2Strategy extends Strategy { name: string; @@ -32,6 +33,23 @@ declare class OAuth2Strategy extends Strategy { } declare namespace OAuth2Strategy { + interface Metadata { + authorizationURL: string; + tokenURL: string; + clientID: string; + } + + type StateStoreStoreCallback = (err: Error | null, state: any) => void; + type StateStoreVerifyCallback = (err: Error, ok: boolean, state: any) => void + + interface StateStore { + store(req: Request, callback: StateStoreStoreCallback): void; + store(req: Request, meta: Metadata, callback: StateStoreStoreCallback): void; + + verify(req: Request, state: string, callback: StateStoreVerifyCallback): void; + verify(req: Request, state: string, meta: Metadata, callback: StateStoreVerifyCallback): void; + } + type VerifyCallback = (err?: Error | null, user?: object, info?: object) => void; type VerifyFunction = @@ -47,6 +65,11 @@ declare namespace OAuth2Strategy { clientID: string; clientSecret: string; callbackURL?: string; + customHeaders?: OutgoingHttpHeaders; + scope?: string | string[]; + sessionKey?: string; + store?: StateStore; + state?: any; } interface StrategyOptions extends _StrategyOptionsBase { passReqToCallback?: false; From b5ca615a9891b341dc8e8511fd1b1992578d587d Mon Sep 17 00:00:00 2001 From: Alan Plum Date: Sun, 2 Dec 2018 22:35:24 +0100 Subject: [PATCH 252/608] Add json_ml --- types/json_ml/index.d.ts | 20 ++++++++++++++++++++ types/json_ml/json_ml-tests.ts | 12 ++++++++++++ types/json_ml/tsconfig.json | 16 ++++++++++++++++ types/json_ml/tslint.json | 1 + 4 files changed, 49 insertions(+) create mode 100644 types/json_ml/index.d.ts create mode 100644 types/json_ml/json_ml-tests.ts create mode 100644 types/json_ml/tsconfig.json create mode 100644 types/json_ml/tslint.json diff --git a/types/json_ml/index.d.ts b/types/json_ml/index.d.ts new file mode 100644 index 0000000000..ba53b84cb4 --- /dev/null +++ b/types/json_ml/index.d.ts @@ -0,0 +1,20 @@ +// Type definitions for json_ml 0.0 +// Project: https://github.com/59naga/json-ml +// Definitions by: Alan Plum +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +export type Node = string | Element; +export type SimpleElement = [string, Attributes] | [string]; +export interface NodeList extends Array {} +export type Element = SimpleElement & NodeList; +export interface Attributes { + [key: string]: string; +} +export function parse(xml: string, trim?: boolean): Node[]; +export function stringify( + object: Node[], + replacer?: ((node: Cheerio) => any) | null, + indent?: number +): string; diff --git a/types/json_ml/json_ml-tests.ts b/types/json_ml/json_ml-tests.ts new file mode 100644 index 0000000000..ecc84d9d8b --- /dev/null +++ b/types/json_ml/json_ml-tests.ts @@ -0,0 +1,12 @@ +/// +import { Attributes, Element, Node, parse, stringify } from "json_ml"; + +const nodes: Node[] = parse("

  • hello
"); +const node1: Node = nodes[0]; +if (typeof node1 !== "string") { + const el: Element = node1; + const attrs = el[1] as Attributes; + console.log(el[0], attrs); +} + +console.log(stringify(nodes, el => (el.is("li") ? null : el), 2)); diff --git a/types/json_ml/tsconfig.json b/types/json_ml/tsconfig.json new file mode 100644 index 0000000000..951405762a --- /dev/null +++ b/types/json_ml/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "json_ml-tests.ts"] +} diff --git a/types/json_ml/tslint.json b/types/json_ml/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/json_ml/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 539239405f26d75d0dab48f5f4cb5131a324452b Mon Sep 17 00:00:00 2001 From: Alan Plum Date: Sun, 2 Dec 2018 22:40:44 +0100 Subject: [PATCH 253/608] Add roman-numerals --- types/roman-numerals/index.d.ts | 7 +++++++ types/roman-numerals/roman-numerals-tests.ts | 5 +++++ types/roman-numerals/tsconfig.json | 16 ++++++++++++++++ types/roman-numerals/tslint.json | 1 + 4 files changed, 29 insertions(+) create mode 100644 types/roman-numerals/index.d.ts create mode 100644 types/roman-numerals/roman-numerals-tests.ts create mode 100644 types/roman-numerals/tsconfig.json create mode 100644 types/roman-numerals/tslint.json diff --git a/types/roman-numerals/index.d.ts b/types/roman-numerals/index.d.ts new file mode 100644 index 0000000000..0ab8e88047 --- /dev/null +++ b/types/roman-numerals/index.d.ts @@ -0,0 +1,7 @@ +// Type definitions for roman-numerals 0.3 +// Project: https://github.com/joshleaves/roman-numerals +// Definitions by: Alan Plum +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export function toRoman(arabic: number): string; +export function toArabic(roman: string): number; diff --git a/types/roman-numerals/roman-numerals-tests.ts b/types/roman-numerals/roman-numerals-tests.ts new file mode 100644 index 0000000000..a99972afae --- /dev/null +++ b/types/roman-numerals/roman-numerals-tests.ts @@ -0,0 +1,5 @@ +import { toArabic, toRoman } from "roman-numerals"; + +const XLII: string = toRoman(42); +const meaningOfLife: number = toArabic(XLII); +toRoman(meaningOfLife); diff --git a/types/roman-numerals/tsconfig.json b/types/roman-numerals/tsconfig.json new file mode 100644 index 0000000000..7edc311353 --- /dev/null +++ b/types/roman-numerals/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "roman-numerals-tests.ts"] +} diff --git a/types/roman-numerals/tslint.json b/types/roman-numerals/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/roman-numerals/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From ccce0edf6d9dd01a3479daf4b98da3dc7d0bd442 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Mon, 3 Dec 2018 00:26:33 +0100 Subject: [PATCH 254/608] Add types for unique-random-array --- types/unique-random-array/index.d.ts | 8 +++++++ types/unique-random-array/tsconfig.json | 23 +++++++++++++++++++ types/unique-random-array/tslint.json | 1 + .../unique-random-array-tests.ts | 6 +++++ 4 files changed, 38 insertions(+) create mode 100644 types/unique-random-array/index.d.ts create mode 100644 types/unique-random-array/tsconfig.json create mode 100644 types/unique-random-array/tslint.json create mode 100644 types/unique-random-array/unique-random-array-tests.ts diff --git a/types/unique-random-array/index.d.ts b/types/unique-random-array/index.d.ts new file mode 100644 index 0000000000..7e4ddacb0f --- /dev/null +++ b/types/unique-random-array/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for unique-random-array 1.0 +// Project: https://github.com/sindresorhus/unique-random-array#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = uniqueRandomArray; + +declare function uniqueRandomArray(input: T[]): () => T; diff --git a/types/unique-random-array/tsconfig.json b/types/unique-random-array/tsconfig.json new file mode 100644 index 0000000000..40257f7e47 --- /dev/null +++ b/types/unique-random-array/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "unique-random-array-tests.ts" + ] +} diff --git a/types/unique-random-array/tslint.json b/types/unique-random-array/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/unique-random-array/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/unique-random-array/unique-random-array-tests.ts b/types/unique-random-array/unique-random-array-tests.ts new file mode 100644 index 0000000000..de4563532c --- /dev/null +++ b/types/unique-random-array/unique-random-array-tests.ts @@ -0,0 +1,6 @@ +import uniqueRandomArray = require('unique-random-array'); + +// $ExpectType () => number +uniqueRandomArray([1, 2, 3, 4]); +// $ExpectType () => string | number +uniqueRandomArray(["1", 2, 3, 4]); From efaad74d08d3ce0d09f50a3c9b387e1e847df7bb Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Mon, 3 Dec 2018 00:35:54 +0100 Subject: [PATCH 255/608] Add types for random-int --- types/random-int/index.d.ts | 9 +++++++++ types/random-int/random-int-tests.ts | 6 ++++++ types/random-int/tsconfig.json | 23 +++++++++++++++++++++++ types/random-int/tslint.json | 1 + 4 files changed, 39 insertions(+) create mode 100644 types/random-int/index.d.ts create mode 100644 types/random-int/random-int-tests.ts create mode 100644 types/random-int/tsconfig.json create mode 100644 types/random-int/tslint.json diff --git a/types/random-int/index.d.ts b/types/random-int/index.d.ts new file mode 100644 index 0000000000..6f7f421976 --- /dev/null +++ b/types/random-int/index.d.ts @@ -0,0 +1,9 @@ +// Type definitions for random-int 1.0 +// Project: https://github.com/sindresorhus/random-int +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = randomInt; + +declare function randomInt(max: number): number; +declare function randomInt(min: number, max: number): number; // tslint:disable-line unified-signatures diff --git a/types/random-int/random-int-tests.ts b/types/random-int/random-int-tests.ts new file mode 100644 index 0000000000..68165e9c5d --- /dev/null +++ b/types/random-int/random-int-tests.ts @@ -0,0 +1,6 @@ +import randomInt = require('random-int'); + +// $ExpectType number +randomInt(5); +// $ExpectType number +randomInt(10, 100); diff --git a/types/random-int/tsconfig.json b/types/random-int/tsconfig.json new file mode 100644 index 0000000000..e1a576d337 --- /dev/null +++ b/types/random-int/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "random-int-tests.ts" + ] +} diff --git a/types/random-int/tslint.json b/types/random-int/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/random-int/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From a6d95779bae652a238cd584d66e5009e02d54888 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Mon, 3 Dec 2018 00:42:33 +0100 Subject: [PATCH 256/608] Add types for random-float --- types/random-float/index.d.ts | 9 +++++++++ types/random-float/random-float-tests.ts | 6 ++++++ types/random-float/tsconfig.json | 23 +++++++++++++++++++++++ types/random-float/tslint.json | 1 + 4 files changed, 39 insertions(+) create mode 100644 types/random-float/index.d.ts create mode 100644 types/random-float/random-float-tests.ts create mode 100644 types/random-float/tsconfig.json create mode 100644 types/random-float/tslint.json diff --git a/types/random-float/index.d.ts b/types/random-float/index.d.ts new file mode 100644 index 0000000000..646d263128 --- /dev/null +++ b/types/random-float/index.d.ts @@ -0,0 +1,9 @@ +// Type definitions for random-float 1.0 +// Project: https://github.com/sindresorhus/random-float +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = randomFloat; + +declare function randomFloat(max: number): number; +declare function randomFloat(min: number, max: number): number; // tslint:disable-line unified-signatures diff --git a/types/random-float/random-float-tests.ts b/types/random-float/random-float-tests.ts new file mode 100644 index 0000000000..663190ce81 --- /dev/null +++ b/types/random-float/random-float-tests.ts @@ -0,0 +1,6 @@ +import randomFloat = require('random-float'); + +// $ExpectType number +randomFloat(5); +// $ExpectType number +randomFloat(10, 100); diff --git a/types/random-float/tsconfig.json b/types/random-float/tsconfig.json new file mode 100644 index 0000000000..faefa13645 --- /dev/null +++ b/types/random-float/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "random-float-tests.ts" + ] +} diff --git a/types/random-float/tslint.json b/types/random-float/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/random-float/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From cfc0da48c03bde6f87e9d06aa11e1cb3aa6f98ab Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Mon, 3 Dec 2018 00:46:11 +0100 Subject: [PATCH 257/608] Add types for random-boolean --- types/random-boolean/index.d.ts | 8 +++++++ types/random-boolean/random-boolean-tests.ts | 4 ++++ types/random-boolean/tsconfig.json | 23 ++++++++++++++++++++ types/random-boolean/tslint.json | 1 + 4 files changed, 36 insertions(+) create mode 100644 types/random-boolean/index.d.ts create mode 100644 types/random-boolean/random-boolean-tests.ts create mode 100644 types/random-boolean/tsconfig.json create mode 100644 types/random-boolean/tslint.json diff --git a/types/random-boolean/index.d.ts b/types/random-boolean/index.d.ts new file mode 100644 index 0000000000..3390da9317 --- /dev/null +++ b/types/random-boolean/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for random-boolean 1.0 +// Project: https://github.com/arthurvr/random-boolean#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = randomBoolean; + +declare function randomBoolean(): boolean; diff --git a/types/random-boolean/random-boolean-tests.ts b/types/random-boolean/random-boolean-tests.ts new file mode 100644 index 0000000000..8ac983e111 --- /dev/null +++ b/types/random-boolean/random-boolean-tests.ts @@ -0,0 +1,4 @@ +import randomBoolean = require('random-boolean'); + +// $ExpectType boolean +randomBoolean(); diff --git a/types/random-boolean/tsconfig.json b/types/random-boolean/tsconfig.json new file mode 100644 index 0000000000..7392190732 --- /dev/null +++ b/types/random-boolean/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "random-boolean-tests.ts" + ] +} diff --git a/types/random-boolean/tslint.json b/types/random-boolean/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/random-boolean/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From a3f716d8f28c05469b8409d0c32a7146ec9a57f3 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Mon, 3 Dec 2018 01:13:39 +0100 Subject: [PATCH 258/608] Add types for random-item --- types/random-item/index.d.ts | 8 ++++++++ types/random-item/random-item-tests.ts | 6 ++++++ types/random-item/tsconfig.json | 23 +++++++++++++++++++++++ types/random-item/tslint.json | 1 + 4 files changed, 38 insertions(+) create mode 100644 types/random-item/index.d.ts create mode 100644 types/random-item/random-item-tests.ts create mode 100644 types/random-item/tsconfig.json create mode 100644 types/random-item/tslint.json diff --git a/types/random-item/index.d.ts b/types/random-item/index.d.ts new file mode 100644 index 0000000000..3fbbaca074 --- /dev/null +++ b/types/random-item/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for random-item 1.0 +// Project: https://github.com/sindresorhus/random-item +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = randomItem; + +declare function randomItem(input: T[]): T; diff --git a/types/random-item/random-item-tests.ts b/types/random-item/random-item-tests.ts new file mode 100644 index 0000000000..12185a0ad2 --- /dev/null +++ b/types/random-item/random-item-tests.ts @@ -0,0 +1,6 @@ +import randomItem = require('random-item'); + +// $ExpectType string +randomItem(['pony', 'unicorn', 'rainbow']); +// $ExpectType string | number +randomItem(['pony', 'unicorn', 'rainbow', 1]); diff --git a/types/random-item/tsconfig.json b/types/random-item/tsconfig.json new file mode 100644 index 0000000000..279aba16b5 --- /dev/null +++ b/types/random-item/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "random-item-tests.ts" + ] +} diff --git a/types/random-item/tslint.json b/types/random-item/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/random-item/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From f47939d42dcfe49da2bb73ad1662159bb50ad0e2 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Mon, 3 Dec 2018 01:22:11 +0100 Subject: [PATCH 259/608] Add types for random-obj-prop --- types/random-obj-prop/index.d.ts | 8 +++++++ .../random-obj-prop/random-obj-prop-tests.ts | 4 ++++ types/random-obj-prop/tsconfig.json | 23 +++++++++++++++++++ types/random-obj-prop/tslint.json | 1 + 4 files changed, 36 insertions(+) create mode 100644 types/random-obj-prop/index.d.ts create mode 100644 types/random-obj-prop/random-obj-prop-tests.ts create mode 100644 types/random-obj-prop/tsconfig.json create mode 100644 types/random-obj-prop/tslint.json diff --git a/types/random-obj-prop/index.d.ts b/types/random-obj-prop/index.d.ts new file mode 100644 index 0000000000..f9aca5624f --- /dev/null +++ b/types/random-obj-prop/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for random-obj-prop 1.0 +// Project: https://github.com/sindresorhus/random-obj-prop +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = randomObjProp; + +declare function randomObjProp(input: { [key: string]: T }): T; diff --git a/types/random-obj-prop/random-obj-prop-tests.ts b/types/random-obj-prop/random-obj-prop-tests.ts new file mode 100644 index 0000000000..7dd2fcd67d --- /dev/null +++ b/types/random-obj-prop/random-obj-prop-tests.ts @@ -0,0 +1,4 @@ +import randomObjProp = require('random-obj-prop'); + +// $ExpectType string | number +randomObjProp({ foo: 'pony', bar: 1 }); diff --git a/types/random-obj-prop/tsconfig.json b/types/random-obj-prop/tsconfig.json new file mode 100644 index 0000000000..f155cfc211 --- /dev/null +++ b/types/random-obj-prop/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "random-obj-prop-tests.ts" + ] +} diff --git a/types/random-obj-prop/tslint.json b/types/random-obj-prop/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/random-obj-prop/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From f32b52127dca1db30ad7def58a52534ca2dc9175 Mon Sep 17 00:00:00 2001 From: Steven Date: Sun, 2 Dec 2018 19:31:42 -0800 Subject: [PATCH 260/608] fix [SerialPort]: Change `data` -> `delimiter` in ready-parser options See [the implementation](https://github.com/node-serialport/node-serialport/blob/8825d264436e91ca727a0c9b4d04a756479c4b1f/packages/parser-ready/ready.js#L22-L24) of the ready parser --- types/serialport/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/serialport/index.d.ts b/types/serialport/index.d.ts index 14ded3b6e3..c1a81376fa 100644 --- a/types/serialport/index.d.ts +++ b/types/serialport/index.d.ts @@ -103,7 +103,7 @@ declare namespace SerialPort { constructor(options: {delimiter: string | Buffer | number[], encoding?: 'ascii'|'utf8'|'utf16le'|'ucs2'|'base64'|'binary'|'hex'}); } class Ready extends Stream.Transform { - constructor(options: {data: string | Buffer | number[]}); + constructor(options: {delimiter: string | Buffer | number[]}); } class Regex extends Stream.Transform { constructor(options: {regex: RegExp}); From b1eb8bdee501bf2e2022593f74f6028ce76932fc Mon Sep 17 00:00:00 2001 From: Steven Date: Sun, 2 Dec 2018 19:40:16 -0800 Subject: [PATCH 261/608] Update serialport-tests.ts --- types/serialport/serialport-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/serialport/serialport-tests.ts b/types/serialport/serialport-tests.ts index 16cf2b6a70..d6541a63c2 100644 --- a/types/serialport/serialport-tests.ts +++ b/types/serialport/serialport-tests.ts @@ -107,7 +107,7 @@ function test_parsers() { const CCTalkParser = new SerialPort.parsers.CCTalk(); const DelimiterParser = new SerialPort.parsers.Delimiter({ delimiter: Buffer.from('EOL') }); const ReadlineParser = new SerialPort.parsers.Readline({ delimiter: '\r\n' }); - const ReadyParser = new SerialPort.parsers.Ready({ data: 'READY' }); + const ReadyParser = new SerialPort.parsers.Ready({ delimiter: 'READY' }); const RegexParser = new SerialPort.parsers.Regex({regex: /.*/}); port.pipe(ByteLengthParser); From 5bc22c159118f003bd6898338945e4e7930345a6 Mon Sep 17 00:00:00 2001 From: Robert Stigsson Date: Mon, 3 Dec 2018 09:04:56 +0100 Subject: [PATCH 262/608] recharts: added ReferenceArea.ifOverflow, ReferenceDot.ifOverflow and ReferenceLine.ifOverflow --- types/recharts/index.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/types/recharts/index.d.ts b/types/recharts/index.d.ts index 34e3cbcb88..d2cd6458d0 100644 --- a/types/recharts/index.d.ts +++ b/types/recharts/index.d.ts @@ -11,6 +11,7 @@ // Paul Melnikow // Harry Cruse // Andrew Palugniok +// Robert Stigsson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -634,6 +635,7 @@ export interface ReferenceAreaProps extends Partial { yAxis?: object; isFront?: boolean; alwaysShow?: boolean; + ifOverflow?: 'hidden' | 'visible' | 'discard' | 'extendDomain' x1?: number | string; x2?: number | string; y1?: number | string; @@ -657,6 +659,7 @@ export interface ReferenceDotProps extends EventAttributes, Partial | React.ReactElement; From 4ea0c9f150ab7aec3c4ba6f2ea9e9568c7e0951f Mon Sep 17 00:00:00 2001 From: Robert Stigsson Date: Mon, 3 Dec 2018 09:44:41 +0100 Subject: [PATCH 263/608] recharts: fixed issue with missing semi-colon --- types/recharts/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/recharts/index.d.ts b/types/recharts/index.d.ts index d2cd6458d0..7054b18e08 100644 --- a/types/recharts/index.d.ts +++ b/types/recharts/index.d.ts @@ -635,7 +635,7 @@ export interface ReferenceAreaProps extends Partial { yAxis?: object; isFront?: boolean; alwaysShow?: boolean; - ifOverflow?: 'hidden' | 'visible' | 'discard' | 'extendDomain' + ifOverflow?: 'hidden' | 'visible' | 'discard' | 'extendDomain'; x1?: number | string; x2?: number | string; y1?: number | string; @@ -659,7 +659,7 @@ export interface ReferenceDotProps extends EventAttributes, Partial | React.ReactElement; From a359aa88ddefb61792db576a4ca7ccb42e71a93b Mon Sep 17 00:00:00 2001 From: Thibault Date: Mon, 3 Dec 2018 08:49:55 +0000 Subject: [PATCH 264/608] [@types/web3] :arrow_up: Solidity compilers defines stateMutability for ABIDefinition --- types/web3/eth/abi.d.ts | 1 + types/web3/test/abi-tests.ts | 89 ++++++++++++++++++++++++++++++++++++ types/web3/tsconfig.json | 3 +- types/web3/web3-tests.ts | 3 ++ 4 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 types/web3/test/abi-tests.ts diff --git a/types/web3/eth/abi.d.ts b/types/web3/eth/abi.d.ts index b103c9e4ce..dcf644e93a 100644 --- a/types/web3/eth/abi.d.ts +++ b/types/web3/eth/abi.d.ts @@ -1,6 +1,7 @@ export interface ABIDefinition { constant?: boolean; payable?: boolean; + stateMutability?: "pure" | "view" | "nonpayable" | "payable"; anonymous?: boolean; inputs?: Array<{ name: string; type: ABIDataTypes; indexed?: boolean }>; name?: string; diff --git a/types/web3/test/abi-tests.ts b/types/web3/test/abi-tests.ts new file mode 100644 index 0000000000..357c59f3c3 --- /dev/null +++ b/types/web3/test/abi-tests.ts @@ -0,0 +1,89 @@ +import { ABIDefinition } from "web3/eth/abi.d"; + +export const OLD_ABI_STANDARD: ABIDefinition[] = [ + { + constant: true, + payable: false, + inputs: [ + { + name: "paramAddress", + type: "address" + } + ], + name: "function1", + outputs: [], + type: "function" + }, { + constant: true, + payable: false, + inputs: [], + name: "removeOwner", + outputs: [ + { + name: "paramAddress", + type: "address" + } + ], + type: "function" + }, { + constant: false, + payable: false, + inputs: [], + name: "removeOwner", + outputs: [], + type: "function" + }, { + constant: false, + payable: true, + inputs: [], + name: "removeOwner", + outputs: [], + type: "function" + }, +]; + +export const NEW_ABI_STANDARD: ABIDefinition[] = [ + { + constant: true, + payable: false, + stateMutability: "view", + inputs: [ + { + name: "paramAddress", + type: "address" + } + ], + name: "function1", + outputs: [], + type: "function" + }, { + constant: true, + payable: false, + stateMutability: "pure", + inputs: [], + name: "removeOwner", + outputs: [ + { + name: "paramAddress", + type: "address" + } + ], + type: "function" + }, { + constant: false, + payable: false, + stateMutability: "nonpayable", + inputs: [], + name: "removeOwner", + outputs: [], + type: "function" + }, { + constant: false, + payable: true, + stateMutability: "payable", + inputs: [], + name: "removeOwner", + outputs: [], + type: "function" + }, +]; diff --git a/types/web3/tsconfig.json b/types/web3/tsconfig.json index 42b54fc8c5..45fb60fda4 100644 --- a/types/web3/tsconfig.json +++ b/types/web3/tsconfig.json @@ -23,6 +23,7 @@ "eth/accounts.d.ts", "eth/contract.d.ts", "eth/index.d.ts", - "eth/types.d.ts" + "eth/types.d.ts", + "test/abi-tests.ts" ] } diff --git a/types/web3/web3-tests.ts b/types/web3/web3-tests.ts index 170a8b22c3..746e199418 100644 --- a/types/web3/web3-tests.ts +++ b/types/web3/web3-tests.ts @@ -2,6 +2,7 @@ import Web3 = require("web3"); import BigNumber = require("bn.js"); import { TransactionReceipt } from "web3/types"; import PromiEvent from "web3/promiEvent"; +import { NEW_ABI_STANDARD, OLD_ABI_STANDARD } from "web3/test/abi-tests"; const contractAddress = "0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe"; @@ -125,6 +126,8 @@ web3.eth.personal.unlockAccount( // // web3.eth.abi // -------------------------------------------------------------------------- +const myContractOldAbi = new web3.eth.Contract(OLD_ABI_STANDARD); +const myContractNewAbi = new web3.eth.Contract(NEW_ABI_STANDARD); // // web3.bzz From c7e8761c67c32583d1081258e87e947d95088113 Mon Sep 17 00:00:00 2001 From: "h.naoufal" Date: Mon, 3 Dec 2018 10:16:34 +0100 Subject: [PATCH 265/608] fixing problems with occured through merging --- types/react-dates/index.d.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/types/react-dates/index.d.ts b/types/react-dates/index.d.ts index f1db1c96b7..17ea9788f6 100644 --- a/types/react-dates/index.d.ts +++ b/types/react-dates/index.d.ts @@ -4,7 +4,6 @@ // Nathan Holland // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 -Heads up, this will commit to master. // Required fields are made according to 'minimum REQUIRED setup' in https://github.com/airbnb/react-dates/blob/master/README.md import * as React from 'react'; @@ -496,10 +495,7 @@ declare namespace ReactDates { var toISODateString: (date: moment.MomentInput, currentFormat: moment.MomentFormatSpecification) => string | null; // utils/toLocalizedDateString.js var toLocalizedDateString: ( - dat<<<<<<< master -56 -  -e: moment.MomentInput, + date: moment.MomentInput, currentFormat: moment.MomentFormatSpecification ) => string | null; // utils/toMomentObject.js From 1184370cda953a282150eea2c4e32e14d81279f3 Mon Sep 17 00:00:00 2001 From: tassadarliu Date: Mon, 3 Dec 2018 17:52:45 +0800 Subject: [PATCH 266/608] [Convict] get autocomplete for format --- types/convict/index.d.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/types/convict/index.d.ts b/types/convict/index.d.ts index 2c3dbf0547..8be23f1547 100644 --- a/types/convict/index.d.ts +++ b/types/convict/index.d.ts @@ -37,6 +37,20 @@ declare namespace convict { parse: (content: string) => any; } + type PredefinedFormat = + | '*' + | 'int' + | 'port' + | 'windows_named_pipe' + | 'port_or_windows_named_pipe' + | 'url' + | 'email' + | 'ipaddress' + | 'duration' + | 'timestamp' + | 'nat' + | String; + interface SchemaObj { default: T; doc?: string; @@ -52,7 +66,7 @@ declare namespace convict { * If omitted, format will be set to the value of Object.prototype.toString.call * for the default value */ - format?: string | any[] | ((val: any) => void); + format?: PredefinedFormat | any[] | ((val: any) => void); env?: string; arg?: string; sensitive?: boolean; From aeeaa025d5799c6552a5ff4d77318af4c3c9f009 Mon Sep 17 00:00:00 2001 From: Benjamin Lupton Date: Mon, 3 Dec 2018 20:53:58 +1100 Subject: [PATCH 267/608] ansicolors: support colors as functions --- types/ansicolors/index.d.ts | 73 +++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 36 deletions(-) diff --git a/types/ansicolors/index.d.ts b/types/ansicolors/index.d.ts index e82fb47dd7..dd1a872e57 100644 --- a/types/ansicolors/index.d.ts +++ b/types/ansicolors/index.d.ts @@ -4,41 +4,42 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped interface Colors extends String { - white: Colors - black: Colors - blue: Colors - cyan: Colors - green: Colors - magenta: Colors - red: Colors - yellow: Colors - brightBlack: Colors - brightRed: Colors - brightGreen: Colors - brightYellow: Colors - brightBlue: Colors - brightMagenta: Colors - brightCyan: Colors - brightWhite: Colors - bgBlack: Colors - bgRed: Colors - bgGreen: Colors - bgYellow: Colors - bgBlue: Colors - bgMagenta: Colors - bgCyan: Colors - bgWhite: Colors - bgBrightBlack: Colors - bgBrightRed: Colors - bgBrightGreen: Colors - bgBrightYellow: Colors - bgBrightBlue: Colors - bgBrightMagenta: Colors - bgBrightCyan: Colors - bgBrightWhite: Colors - open: Colors - close: Colors - colors: Colors + (value: string): string + white: this + black: this + blue: this + cyan: this + green: this + magenta: this + red: this + yellow: this + brightBlack: this + brightRed: this + brightGreen: this + brightYellow: this + brightBlue: this + brightMagenta: this + brightCyan: this + brightWhite: this + bgBlack: this + bgRed: this + bgGreen: this + bgYellow: this + bgBlue: this + bgMagenta: this + bgCyan: this + bgWhite: this + bgBrightBlack: this + bgBrightRed: this + bgBrightGreen: this + bgBrightYellow: this + bgBrightBlue: this + bgBrightMagenta: this + bgBrightCyan: this + bgBrightWhite: this + open: this + close: this + colors: this } -declare var colors: Colors +declare const colors: Colors export default colors From d654965211716edda15c5183fb58332760185896 Mon Sep 17 00:00:00 2001 From: craig bruce Date: Mon, 3 Dec 2018 21:03:30 +1100 Subject: [PATCH 268/608] Expose modules globally as nested modules --- .../cast.framework.breaks.d.ts | 169 +- .../cast.framework.d.ts | 1467 +++---- .../cast.framework.events.d.ts | 782 ++-- .../cast.framework.messages.d.ts | 3792 ++++++++--------- .../cast.framework.system.d.ts | 322 +- .../cast.framework.ui.d.ts | 362 +- .../chromecast-caf-receiver-tests.ts | 68 +- types/chromecast-caf-receiver/index.d.ts | 3 + 8 files changed, 3468 insertions(+), 3497 deletions(-) diff --git a/types/chromecast-caf-receiver/cast.framework.breaks.d.ts b/types/chromecast-caf-receiver/cast.framework.breaks.d.ts index 21adf13fb0..5ece1f15e9 100644 --- a/types/chromecast-caf-receiver/cast.framework.breaks.d.ts +++ b/types/chromecast-caf-receiver/cast.framework.breaks.d.ts @@ -1,92 +1,91 @@ import { Break, BreakClip } from "./cast.framework.messages"; -export = cast.framework.breaks; -declare namespace cast.framework.breaks { - class BreakSeekData { - constructor(seekFrom: number, seekTo: number, breaks: Break[]); +export as namespace breaks +export class BreakSeekData { + constructor(seekFrom: number, seekTo: number, breaks: Break[]); - /** - * List of breaks - */ - breaks: Break[]; + /** + * List of breaks + */ + breaks: Break[]; - /** - * Current playback time - */ - seekFrom: number; + /** + * Current playback time + */ + seekFrom: number; - /** - * The time to seek to - */ - seekTo: number; - } - - /** Provide context information for break clip load interceptor. */ - class BreakClipLoadInterceptorContext { - constructor(brk: Break); - - /** - * The container break for the break clip - */ - break: Break; - } - - /** Interface to manage breaks */ - interface BreakManager { - /** - * Get current media break by id. - */ - getBreakById(id: string): Break; - - /** - * Get current media break clip by id - */ - getBreakClipById(id: string): BreakClip; - - /** Get current media break clips. */ - getBreakClips(): BreakClip[]; - - /** Get current media breaks. */ - getBreaks(): Break[]; - - /** Returns true if watched breaks should be played. */ - getPlayWatchedBreak(): boolean; - - /** - * Provide an interceptor to allow developer to insert more break clips or modify current break clip before a break is started. - * If interceptor is null it will reset the interceptor to default one. - * By default VAST fetching and parsing logic in default interceptor. - * So if customized interceptor is set by developer; - * the VAST logic will be overridden and developers should implement their own VAST fetching and parsing logic in the provided interceptor. - */ - setBreakClipLoadInterceptor( - interceptor: ( - breakClip: BreakClip, - breakClipLoaderContext?: BreakClipLoadInterceptorContext - ) => void - ): void; - - /** - * Provide an interceptor for developer to specify what breaks they want to play after seek. - */ - setBreakSeekInterceptor( - seekInterceptor: (breakSeekData: BreakSeekData) => void - ): void; - - /** - * Set a flag to control if the watched client stitching break should be played. - */ - setPlayWatchedBreak(playWatchedBreak: boolean): void; - - /** - * Provide an interceptor to modify VAST tracking URL before it is being sent to server. - * The input of the interceptor is a string of the tracking URL. - * The interceptor can either return a modified string of URL or a Promise of modified string of URL. - * The interceptor can also return null if you want to send the tracking URL by your own code instead of by CAF. - */ - setVastTrackingInterceptor( - interceptor?: (trackingUrl: string) => void - ): void; - } + /** + * The time to seek to + */ + seekTo: number; } + +/** Provide context information for break clip load interceptor. */ +export class BreakClipLoadInterceptorContext { + constructor(brk: Break); + + /** + * The container break for the break clip + */ + break: Break; +} + +/** Interface to manage breaks */ +export interface BreakManager { + /** + * Get current media break by id. + */ + getBreakById(id: string): Break; + + /** + * Get current media break clip by id + */ + getBreakClipById(id: string): BreakClip; + + /** Get current media break clips. */ + getBreakClips(): BreakClip[]; + + /** Get current media breaks. */ + getBreaks(): Break[]; + + /** Returns true if watched breaks should be played. */ + getPlayWatchedBreak(): boolean; + + /** + * Provide an interceptor to allow developer to insert more break clips or modify current break clip before a break is started. + * If interceptor is null it will reset the interceptor to default one. + * By default VAST fetching and parsing logic in default interceptor. + * So if customized interceptor is set by developer; + * the VAST logic will be overridden and developers should implement their own VAST fetching and parsing logic in the provided interceptor. + */ + setBreakClipLoadInterceptor( + interceptor: ( + breakClip: BreakClip, + breakClipLoaderContext?: BreakClipLoadInterceptorContext + ) => void + ): void; + + /** + * Provide an interceptor for developer to specify what breaks they want to play after seek. + */ + setBreakSeekInterceptor( + seekInterceptor: (breakSeekData: BreakSeekData) => void + ): void; + + /** + * Set a flag to control if the watched client stitching break should be played. + */ + setPlayWatchedBreak(playWatchedBreak: boolean): void; + + /** + * Provide an interceptor to modify VAST tracking URL before it is being sent to server. + * The input of the interceptor is a string of the tracking URL. + * The interceptor can either return a modified string of URL or a Promise of modified string of URL. + * The interceptor can also return null if you want to send the tracking URL by your own code instead of by CAF. + */ + setVastTrackingInterceptor( + interceptor?: (trackingUrl: string) => void + ): void; +} + diff --git a/types/chromecast-caf-receiver/cast.framework.d.ts b/types/chromecast-caf-receiver/cast.framework.d.ts index 28b0c69e2d..6e2be61eb0 100644 --- a/types/chromecast-caf-receiver/cast.framework.d.ts +++ b/types/chromecast-caf-receiver/cast.framework.d.ts @@ -1,3 +1,8 @@ +import * as breaks from "./cast.framework.breaks"; +import * as events from "./cast.framework.events"; +import * as messages from "./cast.framework.messages"; +import * as system from "./cast.framework.system"; +import * as ui from "./cast.framework.ui"; import { EventType } from "./cast.framework.events"; import { PlayerState, @@ -27,757 +32,761 @@ import { SystemState } from "./cast.framework.system"; -export = cast.framework; -type HTMLMediaElement = any; -declare namespace cast.framework { - type LoggerLevel = - | "DEBUG" - | "VERBOSE" - | "INFO" - | "WARNING" - | "ERROR" - | "NONE"; +export import breaks = breaks; +export import events = events; +export import ui = ui; +export import system = system; +export import messages = messages; - type ContentProtection = "NONE" | "CLEARKEY" | "PLAYREADY" | "WIDEVINE"; +export type HTMLMediaElement = any; +export as namespace framework +export type LoggerLevel = + | "DEBUG" + | "VERBOSE" + | "INFO" + | "WARNING" + | "ERROR" + | "NONE"; + +export type ContentProtection = "NONE" | "CLEARKEY" | "PLAYREADY" | "WIDEVINE"; + +/** + * Manages text tracks. + */ +export class TextTracksManager { + constructor(params?: any); /** - * Manages text tracks. + * Adds text tracks to the list. */ - class TextTracksManager { - constructor(params?: any); - - /** - * Adds text tracks to the list. - */ - addTracks(tracks: Track[]): void; - - /** - * Creates a text track. - */ - createTrack(): Track; - - /** - * Gets all active text ids. - */ - getActiveIds(): number[]; - - /** - * Gets all active text tracks. - */ - getActiveTracks(): Track[]; - - /** - * Returns the current text track style. - */ - getTextTracksStyle(): TextTrackStyle; - - /** - * Gets text track by id. - */ - getTrackById(id: number): Track; - - /** - * Returns all text tracks. - */ - getTracks(): Track[]; - - /** - * Gets text tracks by language. - */ - getTracksByLanguage(language: string): Track[]; - - /** - * Sets text tracks to be active by id. - */ - setActiveByIds(newIds: number[]): void; - - /** - * Sets text tracks to be active by language. - */ - setActiveByLanguage(language: string): void; - - /** - * Sets text track style. - */ - setTextTrackStyle(style: TextTrackStyle): void; - } + addTracks(tracks: Track[]): void; /** - * QueueManager exposes several queue manipulation APIs to developers. + * Creates a text track. */ - class QueueManager { - constructor(params?: any); - - /** - * Returns the current queue item. - */ - getCurrentItem(): QueueItem; - - /** - * Returns the index of the current queue item. - */ - getCurrentItemIndex(): number; - - /** - * Returns the queue items. - */ - getItems(): QueueItem[]; - - /** - * Inserts items into the queue. - */ - insertItems(items: QueueItem[], insertBefore?: number): void; - - /** - * Removes items from the queue. - */ - removeItems(itemIds: number[]): void; - - /** - * Sets whether to limit the number of queue items to be reported in Media Status (default is true). - */ - setQueueStatusLimit(limitQueueItemsInStatus: boolean): void; - - /** - * Updates existing queue items by matching itemId. - */ - updateItems(items: QueueItem[]): void; - } + createTrack(): Track; /** - * Base implementation of a queue. + * Gets all active text ids. */ - class QueueBase { - /** - * Fetches a window of items using the specified item id as reference; called by the receiver MediaManager when it needs more queue items; - * often as a request from senders. If only one of nextCount and prevCount is non-zero; fetchItems should only return items after or before - * the reference item; if both nextCount and prevCount are non-zero; a window of items including the reference item should be returned. - */ - fetchItems( - itemId: number, - nextCount: number, - prevCount: number - ): QueueItem[] | Promise; - - /** - * Initializes the queue with the requestData. This is called when a new LOAD request comes in to the receiver. - * If this returns or resolves to null; our default queueing implementation will create a queue based on queueData.items or the single media - * in the load request data. - */ - initialize( - requestData: LoadRequestData - ): QueueData | Promise; - - /** - * Returns next items after the reference item; often the end of the current queue; called by the receiver MediaManager. - */ - nextItems(itemId?: number): QueueItem[] | Promise; - - /** - * Sets the current item with the itemId; called by the receiver MediaManager when it changes the current playing item. - */ - onCurrentItemIdChanged(itemId: number): void; - - /** - * A callback for informing the following items have been inserted into the receiver queue in this session. - * A cloud based implementation can optionally choose to update its queue based on the new information. - */ - onItemsInserted(items: QueueItem[], insertBefore?: number): void; - - /** - * A callback for informing the following items have been removed from the receiver queue in this session. - * A cloud based implementation can optionally choose to update its queue based on the new information. - */ - onItemsRemoved(itemIds: number[]): void; - - /** - * Returns previous items before the reference item; often at the beginning of the queue; called by the receiver MediaManager. - */ - prevItems(itemId?: number): QueueItem[] | Promise; - - /** - * Shuffles the queue and returns new queue items. Returns null if the operation is not supported. - */ - shuffle(): QueueItem[] | Promise; - } + getActiveIds(): number[]; /** - * Controls and monitors media playback. + * Gets all active text tracks. */ - class PlayerManager { - constructor(params?: any); - - /** - * Adds an event listener for player event. - */ - addEventListener: ( - eventType: EventType | EventType[], - eventListener: EventHandler - ) => void; - - /** - * Sends a media status message to all senders (broadcast). Applications use this to send a custom state change. - */ - broadcastStatus( - includeMedia?: boolean, - requestId?: number, - customData?: any, - includeQueueItems?: boolean - ): void; - - getAudioTracksManager(): AudioTracksManager; - - /** - * Returns current time in sec in currently-playing break clip. - */ - getBreakClipCurrentTimeSec(): number; - - /** - * Returns duration in sec of currently-playing break clip. - */ - getBreakClipDurationSec(): number; - - /** - * Obtain the breaks (Ads) manager. - */ - getBreakManager(): BreakManager; - - /** - * Returns list of breaks. - */ - getBreaks(): Break[]; - - /** - * Gets current time in sec of current media. - */ - getCurrentTimeSec(): number; - - /** - * Gets duration in sec of currently playing media. - */ - getDurationSec(): number; - - /** - * Returns live seekable range with start and end time in seconds. The values are media time based. - */ - getLiveSeekableRange(): LiveSeekableRange; - - /** - * Gets media information of current media. - */ - getMediaInformation(): MediaInformation; - - /** - * Returns playback configuration. - */ - getPlaybackConfig(): PlaybackConfig; - - /** - * Returns current playback rate. - */ - getPlaybackRate(): number; - - /** - * Gets player state. - */ - getPlayerState(): PlayerState; - - /** - * Get the preferred playback rate. (Can be used on shutdown event to save latest preferred playback rate to a persistent storage; - * so it can be used in next session in the cast options). - */ - getPreferredPlaybackRate(): number; - - /** - * Get the preferred text track language. - */ - getPreferredTextLanguage(): string; - - /** - * Obtain QueueManager API. - */ - getQueueManager(): QueueManager; - - getTextTracksManager(): TextTracksManager; - - /** - * Loads media. - */ - load(loadRequest: LoadRequestData): Promise; - - /** - * Pauses currently playing media. - */ - pause(): void; - - /** - * Plays currently paused media. - */ - play(): void; - - /** - * Requests a text string to be played back locally on the receiver device. - */ - playString(stringId: PlayStringId, args?: string[]): Promise; - - /** - * Request Google Assistant to refresh the credentials. Only works if the original credentials came from the assistant. - */ - refreshCredentials(): Promise; - - /** - * Removes the event listener added for given player event. If event listener is not added; it will be ignored. - */ - removeEventListener( - eventType: EventType | EventType[], - eventListener: EventHandler - ): void; - - /** - * Seeks in current media. - */ - seek(seekTime: number): void; - - /** - * Sends an error to a specific sender - */ - sendError( - senderId: string, - requestId: number, - type: ErrorType, - reason?: ErrorReason, - customData?: any - ): void; - - /** - * Send local media request. - */ - sendLocalMediaRequest(request: RequestData): void; - - /** - * Sends a media status message to a specific sender. - */ - sendStatus( - senderId: string, - requestId: number, - includeMedia?: boolean, - customData?: any, - includeQueueItems?: boolean - ): void; - - /** - * Sets the IDLE reason. This allows applications that want to force the IDLE state to indicate the reason that made the player going to IDLE state - * (a custom error; for example). The idle reason will be sent in the next status message. NOTE: Most applications do not need to set this value; - * it is only needed if they want to make the player go to IDLE in special circumstances and the default idleReason does not reflect their intended - * behavior. - */ - setIdleReason(idleReason: IdleReason): void; - - /** - * Sets MediaElement to use. If Promise of MediaElement is set; media begins playback after Promise is resolved. - */ - setMediaElement(mediaElement: HTMLMediaElement): void; - - /** - * Sets media information. - */ - setMediaInformation( - mediaInformation: MediaInformation, - opt_broadcast?: boolean - ): void; - - /** - * Sets a handler to return or modify PlaybackConfig; for a specific load request. The handler paramaters are the load request data - * and default playback config for the receiver (provided in the context options). The handler should returns a modified playback config; - * or null to prevent the media from playing. The return value can be a promise to allow waiting for data from the server. - */ - setMediaPlaybackInfoHandler( - handler: ( - loadRequestData: LoadRequestData, - playbackConfig: PlaybackConfig - ) => void - ): void; - - /** - * Sets a handler to return the media url for a load request. This handler can be used to avoid having the media content url published as part - * of the media status. By default the media contentId is used as the content url. - */ - setMediaUrlResolver( - resolver: (loadRequestData: LoadRequestData) => void - ): void; - - /** - * Provide an interceptor of incoming and outgoing messages. - * The interceptor can update the request data; and return updated data; a promise of - * updated data if need to get more data from the server; or null if the request should not be handled. - * Note that if load message interceptor is provided; and no interceptor is provided for preload - - * the load interceptor will be called for preload messages. - */ - setMessageInterceptor( - type: MessageType, - interceptor: (requestData: RequestData) => Promise - ): void; - - /** - * Sets playback configuration on the PlayerManager. - */ - setPlaybackConfig(playbackConfig: PlaybackConfig): void; - - /** - * Set the preferred playback rate for follow up load or media items. The preferred playback rate will be updated automatically to the latest - * playback rate that was provided by a load request or explicit set of playback rate. - */ - setPreferredPlaybackRate(preferredPlaybackRate: number): void; - - /** - * Set the preferred text track language. The preferred text track language will be updated automatically to the latest enabled language - * by a load request or explicit change to text tracks. (Should be called only in idle state; and Will only apply to next loaded media). - */ - setPreferredTextLanguage(preferredTextLanguage: string): void; - - /** - * Stops currently playing media. - */ - stop(): void; - } + getActiveTracks(): Track[]; /** - * Configuration to customize playback behavior. + * Returns the current text track style. */ - class PlaybackConfig { - /** - * Duration of buffered media in seconds to start buffering. - */ - autoPauseDuration?: number; + getTextTracksStyle(): TextTrackStyle; - /** - * Duration of buffered media in seconds to start/resume playback after auto-paused due to buffering. - */ - autoResumeDuration?: number; - - /** - * Minimum number of buffered segments to start/resume playback. - */ - autoResumeNumberOfSegments?: number; - - /** - * A function to customize request to get a caption segment. - */ - captionsRequestHandler?: RequestHandler; - - /** - * Initial bandwidth in bits in per second. - */ - initialBandwidth?: number; - - /** - * Custom license data. - */ - licenseCustomData?: string; - - /** - * Handler to process license data. The handler is passed the license data; and returns the modified license data. - */ - licenseHandler?: BinaryHandler; - - /** - * A function to customize request to get a license. - */ - licenseRequestHandler?: RequestHandler; - - /** - * Url for acquiring the license. - */ - licenseUrl?: string; - - /** - * Handler to process manifest data. The handler is passed the manifest; and returns the modified manifest. - */ - manifestHandler?: (manifest: string) => string; - - /** - * A function to customize request to get a manifest. - */ - manifestRequestHandler?: RequestHandler; - - /** - * Preferred protection system to use for decrypting content. - */ - protectionSystem: ContentProtection; - - /** - * Handler to process segment data. The handler is passed the segment data; and returns the modified segment data. - */ - segmentHandler?: BinaryHandler; - - /** - * A function to customize request information to get a media segment. - */ - segmentRequestHandler?: RequestHandler; - - /** - * Maximum number of times to retry a network request for a segment. - */ - segmentRequestRetryLimit?: number; - } /** - * HTTP(s) Request/Response information. + * Gets text track by id. */ - class NetworkRequestInfo { - /** - * The content of the request. Can be used to modify license request body. - */ - content: Uint8Array; + getTrackById(id: number): Track; - /** - * An object containing properties that you would like to send in the header. - */ - headers: any; + /** + * Returns all text tracks. + */ + getTracks(): Track[]; - /** - * The URL requested. - */ - url: string; + /** + * Gets text tracks by language. + */ + getTracksByLanguage(language: string): Track[]; - /** - * Indicates whether CORS Access-Control requests should be made using credentials such as cookies or authorization headers. - */ - withCredentials: boolean; - } - /** Cast receiver context options. All options are optionals. */ - class CastReceiverOptions { - /** - * Optional map of custom messages namespaces to initialize and their types. - * Custom messages namespaces need to be initiated before the application started; - * so it is best to provide the namespaces in the receiver options. - * (The default type of a message bus is JSON; if not provided here). - */ - customNamespaces?: any; + /** + * Sets text tracks to be active by id. + */ + setActiveByIds(newIds: number[]): void; - /** - * Sender id used for local requests. Default value is 'local'. - */ - localSenderId?: string; + /** + * Sets text tracks to be active by language. + */ + setActiveByLanguage(language: string): void; - /** - * Maximum time in seconds before closing an idle sender connection. - * Setting this value enables a heartbeat message to keep the connection alive. - * Used to detect unresponsive senders faster than typical TCP timeouts. - * The minimum value is 5 seconds; there is no upper bound enforced but practically it's minutes before platform TCP timeouts come into play. - * Default value is 10 seconds. - */ - maxInactivity?: number; - - /** - * Optional media element to play content with. Default behavior is to use the first found media element in the page. - */ - mediaElement?: HTMLMediaElement; - - /** - * Optional playback configuration. - */ - playbackConfig?: PlaybackConfig; - - /** - * If this is true; the watched client stitching break will also be played. - */ - playWatchedBreak?: boolean; - - /** - * Preferred value for player playback rate. It is used if playback rate value is not provided in the load request. - */ - preferredPlaybackRate?: number; - - /** - * Preferred text track language. It is used if no active track is provided in the load request. - */ - preferredTextLanguage?: string; - - /** - * Optional queue implementation. - */ - queue?: QueueBase; - - /** - * Text that represents the application status. - * It should meet internationalization rules as may be displayed by the sender application. - */ - statusText?: string; - - /** - * A bitmask of media commands supported by the application. - * LOAD; PLAY; STOP; GET_STATUS must always be supported. - * If this value is not provided; then PAUSE; SEEK; STREAM_VOLUME; STREAM_MUTE are assumed to be supported too. - */ - supportedCommands?: number; - - /** - * Indicate that MPL should be used for DASH content. - */ - useLegacyDashSupport?: boolean; - - /** - * An integer used as an internal version number. - * This number is used only to distinguish between receiver releases and higher numbers do not necessarily have to represent newer releases. - */ - versionCode?: number; - } - - /** Manages loading of underlying libraries and initializes underlying cast receiver SDK. */ - class CastReceiverContext { - /** Returns the CastReceiverContext singleton instance. */ - static getInstance(): CastReceiverContext; - - constructor(params: any); - - /** - * Sets message listener on custom message channel. - */ - addCustomMessageListener( - namespace: string, - listener: EventHandler - ): void; - - /** - * Add listener to cast system events. - */ - addEventListener( - type: SystemEventType | SystemEventType[], - handler: EventHandler - ): void; - - /** - * Checks if the given media params of video or audio streams are supported by the platform. - */ - canDisplayType( - mimeType: string, - codecs?: string, - width?: number, - height?: number, - framerate?: number - ): boolean; - - /** - * Provides application information once the system is ready; otherwise it will be null. - */ - getApplicationData(): ApplicationData; - - /** - * Provides device capabilities information once the system is ready; otherwise it will be null. - * If an empty object is returned; the device does not expose any capabilities information. - */ - getDeviceCapabilities(): any; - - /** - * Get Player instance that can control and monitor media playback. - */ - getPlayerManager(): PlayerManager; - - /** - * Get a sender by sender id - */ - getSender(senderId: string): Sender; - - /** - * Gets a list of currently-connected senders. - */ - getSenders(): Sender[]; - - /** - * Reports if the cast application's HDMI input is in standby. - */ - getStandbyState(): StandbyState; - - /** - * Provides application information about the system state. - */ - getSystemState(): SystemState; - - /** - * Reports if the cast application is the HDMI active input. - */ - getVisibilityState(): any; - - /** - * When the application calls start; the system will send the ready event to indicate - * that the application information is ready and the application can send messages as soon as there is one sender connected. - */ - isSystemReady(): boolean; - - /** - * Start loading player js. This can be used to start loading the players js code in early stage of starting the receiver before calling start. - * This function is a no-op if players were already loaded (start was called). - */ - loadPlayerLibraries(useLegacyDashSupport?: boolean): void; - - /** - * Remove a message listener on custom message channel. - */ - removeCustomMessageListener( - namespace: string, - listener: EventHandler - ): void; - - /** - * Remove listener to cast system events. - */ - removeEventListener(type: EventType, handler: EventHandler): void; - - /** - * Sends a message to a specific sender. - */ - sendCustomMessage( - namespace: string, - senderId: string, - message: any - ): void; - - /** - * This function should be called in response to the feedbackstarted event if the application - * add debug state information to log in the feedback report. - * It takes in a parameter ‘message’ that is a string that represents the debug information that the application wants to log. - */ - sendFeedbackMessage(feedbackMessage: string): void; - - /** - * Sets the application state. The application should call this when its state changes. - * If undefined or set to an empty string; the value of the Application Name established during application - * registration is used for the application state by default. - */ - setApplicationState(statusText: string): void; - - /** - * Sets the receiver inactivity timeout. - * It is recommended to set the maximum inactivity value when calling Start and not changing it. - * This API is just provided for development/debugging purposes. - */ - setInactivityTimeout(maxInactivity: number): void; - - /** - * Sets the log verbosity level. - */ - setLoggerLevel(level: LoggerLevel): void; - - /** - * Initializes system manager and media manager; so that receiver app can receive requests from senders. - */ - start(options?: CastReceiverOptions): CastReceiverContext; - - /** - * Shutdown receiver application. - */ - stop(): void; - } - - /** Manages audio tracks. */ - class AudioTracksManager { - constructor(params: any); - getActiveId(): number; - getActiveTrack(): Track; - getTrackById(id: number): Track; - getTracks(): Track[]; - getTracksByLanguage(language: string): Track[]; - setActiveById(id: number): void; - setActiveByLanguage(language: string): void; - } + /** + * Sets text track style. + */ + setTextTrackStyle(style: TextTrackStyle): void; +} + +/** + * QueueManager exposes several queue manipulation APIs to developers. + */ +export class QueueManager { + constructor(params?: any); + + /** + * Returns the current queue item. + */ + getCurrentItem(): QueueItem; + + /** + * Returns the index of the current queue item. + */ + getCurrentItemIndex(): number; + + /** + * Returns the queue items. + */ + getItems(): QueueItem[]; + + /** + * Inserts items into the queue. + */ + insertItems(items: QueueItem[], insertBefore?: number): void; + + /** + * Removes items from the queue. + */ + removeItems(itemIds: number[]): void; + + /** + * Sets whether to limit the number of queue items to be reported in Media Status (default is true). + */ + setQueueStatusLimit(limitQueueItemsInStatus: boolean): void; + + /** + * Updates existing queue items by matching itemId. + */ + updateItems(items: QueueItem[]): void; +} + +/** + * Base implementation of a queue. + */ +export class QueueBase { + /** + * Fetches a window of items using the specified item id as reference; called by the receiver MediaManager when it needs more queue items; + * often as a request from senders. If only one of nextCount and prevCount is non-zero; fetchItems should only return items after or before + * the reference item; if both nextCount and prevCount are non-zero; a window of items including the reference item should be returned. + */ + fetchItems( + itemId: number, + nextCount: number, + prevCount: number + ): QueueItem[] | Promise; + + /** + * Initializes the queue with the requestData. This is called when a new LOAD request comes in to the receiver. + * If this returns or resolves to null; our default queueing implementation will create a queue based on queueData.items or the single media + * in the load request data. + */ + initialize( + requestData: LoadRequestData + ): QueueData | Promise; + + /** + * Returns next items after the reference item; often the end of the current queue; called by the receiver MediaManager. + */ + nextItems(itemId?: number): QueueItem[] | Promise; + + /** + * Sets the current item with the itemId; called by the receiver MediaManager when it changes the current playing item. + */ + onCurrentItemIdChanged(itemId: number): void; + + /** + * A callback for informing the following items have been inserted into the receiver queue in this session. + * A cloud based implementation can optionally choose to update its queue based on the new information. + */ + onItemsInserted(items: QueueItem[], insertBefore?: number): void; + + /** + * A callback for informing the following items have been removed from the receiver queue in this session. + * A cloud based implementation can optionally choose to update its queue based on the new information. + */ + onItemsRemoved(itemIds: number[]): void; + + /** + * Returns previous items before the reference item; often at the beginning of the queue; called by the receiver MediaManager. + */ + prevItems(itemId?: number): QueueItem[] | Promise; + + /** + * Shuffles the queue and returns new queue items. Returns null if the operation is not supported. + */ + shuffle(): QueueItem[] | Promise; +} + +/** + * Controls and monitors media playback. + */ +export class PlayerManager { + constructor(params?: any); + + /** + * Adds an event listener for player event. + */ + addEventListener: ( + eventType: EventType | EventType[], + eventListener: EventHandler + ) => void; + + /** + * Sends a media status message to all senders (broadcast). Applications use this to send a custom state change. + */ + broadcastStatus( + includeMedia?: boolean, + requestId?: number, + customData?: any, + includeQueueItems?: boolean + ): void; + + getAudioTracksManager(): AudioTracksManager; + + /** + * Returns current time in sec in currently-playing break clip. + */ + getBreakClipCurrentTimeSec(): number; + + /** + * Returns duration in sec of currently-playing break clip. + */ + getBreakClipDurationSec(): number; + + /** + * Obtain the breaks (Ads) manager. + */ + getBreakManager(): BreakManager; + + /** + * Returns list of breaks. + */ + getBreaks(): Break[]; + + /** + * Gets current time in sec of current media. + */ + getCurrentTimeSec(): number; + + /** + * Gets duration in sec of currently playing media. + */ + getDurationSec(): number; + + /** + * Returns live seekable range with start and end time in seconds. The values are media time based. + */ + getLiveSeekableRange(): LiveSeekableRange; + + /** + * Gets media information of current media. + */ + getMediaInformation(): MediaInformation; + + /** + * Returns playback configuration. + */ + getPlaybackConfig(): PlaybackConfig; + + /** + * Returns current playback rate. + */ + getPlaybackRate(): number; + + /** + * Gets player state. + */ + getPlayerState(): PlayerState; + + /** + * Get the preferred playback rate. (Can be used on shutdown event to save latest preferred playback rate to a persistent storage; + * so it can be used in next session in the cast options). + */ + getPreferredPlaybackRate(): number; + + /** + * Get the preferred text track language. + */ + getPreferredTextLanguage(): string; + + /** + * Obtain QueueManager API. + */ + getQueueManager(): QueueManager; + + getTextTracksManager(): TextTracksManager; + + /** + * Loads media. + */ + load(loadRequest: LoadRequestData): Promise; + + /** + * Pauses currently playing media. + */ + pause(): void; + + /** + * Plays currently paused media. + */ + play(): void; + + /** + * Requests a text string to be played back locally on the receiver device. + */ + playString(stringId: PlayStringId, args?: string[]): Promise; + + /** + * Request Google Assistant to refresh the credentials. Only works if the original credentials came from the assistant. + */ + refreshCredentials(): Promise; + + /** + * Removes the event listener added for given player event. If event listener is not added; it will be ignored. + */ + removeEventListener( + eventType: EventType | EventType[], + eventListener: EventHandler + ): void; + + /** + * Seeks in current media. + */ + seek(seekTime: number): void; + + /** + * Sends an error to a specific sender + */ + sendError( + senderId: string, + requestId: number, + type: ErrorType, + reason?: ErrorReason, + customData?: any + ): void; + + /** + * Send local media request. + */ + sendLocalMediaRequest(request: RequestData): void; + + /** + * Sends a media status message to a specific sender. + */ + sendStatus( + senderId: string, + requestId: number, + includeMedia?: boolean, + customData?: any, + includeQueueItems?: boolean + ): void; + + /** + * Sets the IDLE reason. This allows applications that want to force the IDLE state to indicate the reason that made the player going to IDLE state + * (a custom error; for example). The idle reason will be sent in the next status message. NOTE: Most applications do not need to set this value; + * it is only needed if they want to make the player go to IDLE in special circumstances and the default idleReason does not reflect their intended + * behavior. + */ + setIdleReason(idleReason: IdleReason): void; + + /** + * Sets MediaElement to use. If Promise of MediaElement is set; media begins playback after Promise is resolved. + */ + setMediaElement(mediaElement: HTMLMediaElement): void; + + /** + * Sets media information. + */ + setMediaInformation( + mediaInformation: MediaInformation, + opt_broadcast?: boolean + ): void; + + /** + * Sets a handler to return or modify PlaybackConfig; for a specific load request. The handler paramaters are the load request data + * and default playback config for the receiver (provided in the context options). The handler should returns a modified playback config; + * or null to prevent the media from playing. The return value can be a promise to allow waiting for data from the server. + */ + setMediaPlaybackInfoHandler( + handler: ( + loadRequestData: LoadRequestData, + playbackConfig: PlaybackConfig + ) => void + ): void; + + /** + * Sets a handler to return the media url for a load request. This handler can be used to avoid having the media content url published as part + * of the media status. By default the media contentId is used as the content url. + */ + setMediaUrlResolver( + resolver: (loadRequestData: LoadRequestData) => void + ): void; + + /** + * Provide an interceptor of incoming and outgoing messages. + * The interceptor can update the request data; and return updated data; a promise of + * updated data if need to get more data from the server; or null if the request should not be handled. + * Note that if load message interceptor is provided; and no interceptor is provided for preload - + * the load interceptor will be called for preload messages. + */ + setMessageInterceptor( + type: MessageType, + interceptor: (requestData: RequestData) => Promise + ): void; + + /** + * Sets playback configuration on the PlayerManager. + */ + setPlaybackConfig(playbackConfig: PlaybackConfig): void; + + /** + * Set the preferred playback rate for follow up load or media items. The preferred playback rate will be updated automatically to the latest + * playback rate that was provided by a load request or explicit set of playback rate. + */ + setPreferredPlaybackRate(preferredPlaybackRate: number): void; + + /** + * Set the preferred text track language. The preferred text track language will be updated automatically to the latest enabled language + * by a load request or explicit change to text tracks. (Should be called only in idle state; and Will only apply to next loaded media). + */ + setPreferredTextLanguage(preferredTextLanguage: string): void; + + /** + * Stops currently playing media. + */ + stop(): void; +} + +/** + * Configuration to customize playback behavior. + */ +export class PlaybackConfig { + /** + * Duration of buffered media in seconds to start buffering. + */ + autoPauseDuration?: number; + + /** + * Duration of buffered media in seconds to start/resume playback after auto-paused due to buffering. + */ + autoResumeDuration?: number; + + /** + * Minimum number of buffered segments to start/resume playback. + */ + autoResumeNumberOfSegments?: number; + + /** + * A function to customize request to get a caption segment. + */ + captionsRequestHandler?: RequestHandler; + + /** + * Initial bandwidth in bits in per second. + */ + initialBandwidth?: number; + + /** + * Custom license data. + */ + licenseCustomData?: string; + + /** + * Handler to process license data. The handler is passed the license data; and returns the modified license data. + */ + licenseHandler?: BinaryHandler; + + /** + * A function to customize request to get a license. + */ + licenseRequestHandler?: RequestHandler; + + /** + * Url for acquiring the license. + */ + licenseUrl?: string; + + /** + * Handler to process manifest data. The handler is passed the manifest; and returns the modified manifest. + */ + manifestHandler?: (manifest: string) => string; + + /** + * A function to customize request to get a manifest. + */ + manifestRequestHandler?: RequestHandler; + + /** + * Preferred protection system to use for decrypting content. + */ + protectionSystem: ContentProtection; + + /** + * Handler to process segment data. The handler is passed the segment data; and returns the modified segment data. + */ + segmentHandler?: BinaryHandler; + + /** + * A function to customize request information to get a media segment. + */ + segmentRequestHandler?: RequestHandler; + + /** + * Maximum number of times to retry a network request for a segment. + */ + segmentRequestRetryLimit?: number; +} +/** + * HTTP(s) Request/Response information. + */ +export class NetworkRequestInfo { + /** + * The content of the request. Can be used to modify license request body. + */ + content: Uint8Array; + + /** + * An object containing properties that you would like to send in the header. + */ + headers: any; + + /** + * The URL requested. + */ + url: string; + + /** + * Indicates whether CORS Access-Control requests should be made using credentials such as cookies or authorization headers. + */ + withCredentials: boolean; +} +/** Cast receiver context options. All options are optionals. */ +export class CastReceiverOptions { + /** + * Optional map of custom messages namespaces to initialize and their types. + * Custom messages namespaces need to be initiated before the application started; + * so it is best to provide the namespaces in the receiver options. + * (The default type of a message bus is JSON; if not provided here). + */ + customNamespaces?: any; + + /** + * Sender id used for local requests. Default value is 'local'. + */ + localSenderId?: string; + + /** + * Maximum time in seconds before closing an idle sender connection. + * Setting this value enables a heartbeat message to keep the connection alive. + * Used to detect unresponsive senders faster than typical TCP timeouts. + * The minimum value is 5 seconds; there is no upper bound enforced but practically it's minutes before platform TCP timeouts come into play. + * Default value is 10 seconds. + */ + maxInactivity?: number; + + /** + * Optional media element to play content with. Default behavior is to use the first found media element in the page. + */ + mediaElement?: HTMLMediaElement; + + /** + * Optional playback configuration. + */ + playbackConfig?: PlaybackConfig; + + /** + * If this is true; the watched client stitching break will also be played. + */ + playWatchedBreak?: boolean; + + /** + * Preferred value for player playback rate. It is used if playback rate value is not provided in the load request. + */ + preferredPlaybackRate?: number; + + /** + * Preferred text track language. It is used if no active track is provided in the load request. + */ + preferredTextLanguage?: string; + + /** + * Optional queue implementation. + */ + queue?: QueueBase; + + /** + * Text that represents the application status. + * It should meet internationalization rules as may be displayed by the sender application. + */ + statusText?: string; + + /** + * A bitmask of media commands supported by the application. + * LOAD; PLAY; STOP; GET_STATUS must always be supported. + * If this value is not provided; then PAUSE; SEEK; STREAM_VOLUME; STREAM_MUTE are assumed to be supported too. + */ + supportedCommands?: number; + + /** + * Indicate that MPL should be used for DASH content. + */ + useLegacyDashSupport?: boolean; + + /** + * An integer used as an internal version number. + * This number is used only to distinguish between receiver releases and higher numbers do not necessarily have to represent newer releases. + */ + versionCode?: number; +} + +/** Manages loading of underlying libraries and initializes underlying cast receiver SDK. */ +export class CastReceiverContext { + /** Returns the CastReceiverContext singleton instance. */ + static getInstance(): CastReceiverContext; + + constructor(params: any); + + /** + * Sets message listener on custom message channel. + */ + addCustomMessageListener( + namespace: string, + listener: EventHandler + ): void; + + /** + * Add listener to cast system events. + */ + addEventListener( + type: SystemEventType | SystemEventType[], + handler: EventHandler + ): void; + + /** + * Checks if the given media params of video or audio streams are supported by the platform. + */ + canDisplayType( + mimeType: string, + codecs?: string, + width?: number, + height?: number, + framerate?: number + ): boolean; + + /** + * Provides application information once the system is ready; otherwise it will be null. + */ + getApplicationData(): ApplicationData; + + /** + * Provides device capabilities information once the system is ready; otherwise it will be null. + * If an empty object is returned; the device does not expose any capabilities information. + */ + getDeviceCapabilities(): any; + + /** + * Get Player instance that can control and monitor media playback. + */ + getPlayerManager(): PlayerManager; + + /** + * Get a sender by sender id + */ + getSender(senderId: string): Sender; + + /** + * Gets a list of currently-connected senders. + */ + getSenders(): Sender[]; + + /** + * Reports if the cast application's HDMI input is in standby. + */ + getStandbyState(): StandbyState; + + /** + * Provides application information about the system state. + */ + getSystemState(): SystemState; + + /** + * Reports if the cast application is the HDMI active input. + */ + getVisibilityState(): any; + + /** + * When the application calls start; the system will send the ready event to indicate + * that the application information is ready and the application can send messages as soon as there is one sender connected. + */ + isSystemReady(): boolean; + + /** + * Start loading player js. This can be used to start loading the players js code in early stage of starting the receiver before calling start. + * This function is a no-op if players were already loaded (start was called). + */ + loadPlayerLibraries(useLegacyDashSupport?: boolean): void; + + /** + * Remove a message listener on custom message channel. + */ + removeCustomMessageListener( + namespace: string, + listener: EventHandler + ): void; + + /** + * Remove listener to cast system events. + */ + removeEventListener(type: EventType, handler: EventHandler): void; + + /** + * Sends a message to a specific sender. + */ + sendCustomMessage( + namespace: string, + senderId: string, + message: any + ): void; + + /** + * This function should be called in response to the feedbackstarted event if the application + * add debug state information to log in the feedback report. + * It takes in a parameter ‘message’ that is a string that represents the debug information that the application wants to log. + */ + sendFeedbackMessage(feedbackMessage: string): void; + + /** + * Sets the application state. The application should call this when its state changes. + * If undefined or set to an empty string; the value of the Application Name established during application + * registration is used for the application state by default. + */ + setApplicationState(statusText: string): void; + + /** + * Sets the receiver inactivity timeout. + * It is recommended to set the maximum inactivity value when calling Start and not changing it. + * This API is just provided for development/debugging purposes. + */ + setInactivityTimeout(maxInactivity: number): void; + + /** + * Sets the log verbosity level. + */ + setLoggerLevel(level: LoggerLevel): void; + + /** + * Initializes system manager and media manager; so that receiver app can receive requests from senders. + */ + start(options?: CastReceiverOptions): CastReceiverContext; + + /** + * Shutdown receiver application. + */ + stop(): void; +} + +/** Manages audio tracks. */ +export class AudioTracksManager { + constructor(params: any); + getActiveId(): number; + getActiveTrack(): Track; + getTrackById(id: number): Track; + getTracks(): Track[]; + getTracksByLanguage(language: string): Track[]; + setActiveById(id: number): void; + setActiveByLanguage(language: string): void; } diff --git a/types/chromecast-caf-receiver/cast.framework.events.d.ts b/types/chromecast-caf-receiver/cast.framework.events.d.ts index 03b70ca459..468ed98158 100644 --- a/types/chromecast-caf-receiver/cast.framework.events.d.ts +++ b/types/chromecast-caf-receiver/cast.framework.events.d.ts @@ -4,423 +4,421 @@ import { Track, MediaStatus } from "./cast.framework.messages"; -export = cast.framework.events; -declare namespace cast.framework.events { - type EventType = - | "ALL" - | "ABORT" - | "CAN_PLAY" - | "CAN_PLAY_THROUGH" - | "DURATION_CHANGE" - | "EMPTIED" - | "ENDED" - | "LOADED_DATA" - | "LOADED_METADATA" - | "LOAD_START" - | "PAUSE" - | "PLAY" - | "PLAYING" - | "PROGRESS" - | "RATE_CHANGE" - | "SEEKED" - | "SEEKING" - | "STALLED" - | "TIME_UPDATE" - | "SUSPEND" - | "WAITING" - | "BITRATE_CHANGED" - | "BREAK_STARTED" - | "BREAK_ENDED" - | "BREAK_CLIP_LOADING" - | "BREAK_CLIP_STARTED" - | "BREAK_CLIP_ENDED" - | "BUFFERING" - | "CACHE_LOADED" - | "CACHE_HIT" - | "CACHE_INSERTED" - | "CLIP_STARTED" - | "CLIP_ENDED" - | "EMSG" - | "ERROR" - | "ID3" - | "MEDIA_STATUS" - | "MEDIA_FINISHED" - | "PLAYER_PRELOADING" - | "PLAYER_PRELOADING_CANCELLED" - | "PLAYER_LOAD_COMPLETE" - | "PLAYER_LOADING" - | "SEGMENT_DOWNLOADED" - | "REQUEST_SEEK" - | "REQUEST_LOAD" - | "REQUEST_STOP" - | "REQUEST_PAUSE" - | "REQUEST_PLAY" - | "REQUEST_PLAY_AGAIN" - | "REQUEST_PLAYBACK_RATE_CHANGE" - | "REQUEST_SKIP_AD" - | "REQUEST_VOLUME_CHANGE" - | "REQUEST_EDIT_TRACKS_INFO" - | "REQUEST_EDIT_AUDIO_TRACKS" - | "REQUEST_SET_CREDENTIALS" - | "REQUEST_LOAD_BY_ENTITY" - | "REQUEST_USER_ACTION" - | "REQUEST_DISPLAY_STATUS" - | "REQUEST_CUSTOM_COMMAND" - | "REQUEST_FOCUS_STATE" - | "REQUEST_QUEUE_LOAD" - | "REQUEST_QUEUE_INSERT" - | "REQUEST_QUEUE_UPDATE" - | "REQUEST_QUEUE_REMOVE" - | "REQUEST_QUEUE_REORDER" - | "REQUEST_QUEUE_GET_ITEM_RANGE" - | "REQUEST_QUEUE_GET_ITEMS" - | "REQUEST_QUEUE_GET_ITEM_IDS" - | "REQUEST_PRECACHE"; +export as namespace events +export type EventType = + | "ALL" + | "ABORT" + | "CAN_PLAY" + | "CAN_PLAY_THROUGH" + | "DURATION_CHANGE" + | "EMPTIED" + | "ENDED" + | "LOADED_DATA" + | "LOADED_METADATA" + | "LOAD_START" + | "PAUSE" + | "PLAY" + | "PLAYING" + | "PROGRESS" + | "RATE_CHANGE" + | "SEEKED" + | "SEEKING" + | "STALLED" + | "TIME_UPDATE" + | "SUSPEND" + | "WAITING" + | "BITRATE_CHANGED" + | "BREAK_STARTED" + | "BREAK_ENDED" + | "BREAK_CLIP_LOADING" + | "BREAK_CLIP_STARTED" + | "BREAK_CLIP_ENDED" + | "BUFFERING" + | "CACHE_LOADED" + | "CACHE_HIT" + | "CACHE_INSERTED" + | "CLIP_STARTED" + | "CLIP_ENDED" + | "EMSG" + | "ERROR" + | "ID3" + | "MEDIA_STATUS" + | "MEDIA_FINISHED" + | "PLAYER_PRELOADING" + | "PLAYER_PRELOADING_CANCELLED" + | "PLAYER_LOAD_COMPLETE" + | "PLAYER_LOADING" + | "SEGMENT_DOWNLOADED" + | "REQUEST_SEEK" + | "REQUEST_LOAD" + | "REQUEST_STOP" + | "REQUEST_PAUSE" + | "REQUEST_PLAY" + | "REQUEST_PLAY_AGAIN" + | "REQUEST_PLAYBACK_RATE_CHANGE" + | "REQUEST_SKIP_AD" + | "REQUEST_VOLUME_CHANGE" + | "REQUEST_EDIT_TRACKS_INFO" + | "REQUEST_EDIT_AUDIO_TRACKS" + | "REQUEST_SET_CREDENTIALS" + | "REQUEST_LOAD_BY_ENTITY" + | "REQUEST_USER_ACTION" + | "REQUEST_DISPLAY_STATUS" + | "REQUEST_CUSTOM_COMMAND" + | "REQUEST_FOCUS_STATE" + | "REQUEST_QUEUE_LOAD" + | "REQUEST_QUEUE_INSERT" + | "REQUEST_QUEUE_UPDATE" + | "REQUEST_QUEUE_REMOVE" + | "REQUEST_QUEUE_REORDER" + | "REQUEST_QUEUE_GET_ITEM_RANGE" + | "REQUEST_QUEUE_GET_ITEMS" + | "REQUEST_QUEUE_GET_ITEM_IDS" + | "REQUEST_PRECACHE"; - type DetailedErrorCode = - | "MEDIA_UNKNOWN" - | "MEDIA_ABORTED" - | "MEDIA_DECODE" - | "MEDIA_NETWORK" - | "MEDIA_SRC_NOT_SUPPORTED" - | "SOURCE_BUFFER_FAILURE" - | "MEDIAKEYS_UNKNOWN" - | "MEDIAKEYS_NETWORK" - | "MEDIAKEYS_UNSUPPORTED" - | "MEDIAKEYS_WEBCRYPTO" - | "NETWORK_UNKNOWN" - | "SEGMENT_NETWORK" - | "HLS_NETWORK_MASTER_PLAYLIST" - | "HLS_NETWORK_PLAYLIST" - | "HLS_NETWORK_NO_KEY_RESPONSE" - | "HLS_NETWORK_KEY_LOAD" - | "HLS_NETWORK_INVALID_SEGMENT" - | "HLS_SEGMENT_PARSING" - | "DASH_NETWORK" - | "DASH_NO_INIT" - | "SMOOTH_NETWORK" - | "SMOOTH_NO_MEDIA_DATA" - | "MANIFEST_UNKNOWN" - | "HLS_MANIFEST_MASTER" - | "HLS_MANIFEST_PLAYLIST" - | "DASH_MANIFEST_UNKNOWN" - | "DASH_MANIFEST_NO_PERIODS" - | "DASH_MANIFEST_NO_MIMETYPE" - | "DASH_INVALID_SEGMENT_INFO" - | "SMOOTH_MANIFEST" - | "SEGMENT_UNKNOWN" - | "TEXT_UNKNOWN" - | "APP" - | "BREAK_CLIP_LOADING_ERROR" - | "BREAK_SEEK_INTERCEPTOR_ERROR" - | "IMAGE_ERROR" - | "LOAD_INTERRUPTED" - | "GENERIC"; +export type DetailedErrorCode = + | "MEDIA_UNKNOWN" + | "MEDIA_ABORTED" + | "MEDIA_DECODE" + | "MEDIA_NETWORK" + | "MEDIA_SRC_NOT_SUPPORTED" + | "SOURCE_BUFFER_FAILURE" + | "MEDIAKEYS_UNKNOWN" + | "MEDIAKEYS_NETWORK" + | "MEDIAKEYS_UNSUPPORTED" + | "MEDIAKEYS_WEBCRYPTO" + | "NETWORK_UNKNOWN" + | "SEGMENT_NETWORK" + | "HLS_NETWORK_MASTER_PLAYLIST" + | "HLS_NETWORK_PLAYLIST" + | "HLS_NETWORK_NO_KEY_RESPONSE" + | "HLS_NETWORK_KEY_LOAD" + | "HLS_NETWORK_INVALID_SEGMENT" + | "HLS_SEGMENT_PARSING" + | "DASH_NETWORK" + | "DASH_NO_INIT" + | "SMOOTH_NETWORK" + | "SMOOTH_NO_MEDIA_DATA" + | "MANIFEST_UNKNOWN" + | "HLS_MANIFEST_MASTER" + | "HLS_MANIFEST_PLAYLIST" + | "DASH_MANIFEST_UNKNOWN" + | "DASH_MANIFEST_NO_PERIODS" + | "DASH_MANIFEST_NO_MIMETYPE" + | "DASH_INVALID_SEGMENT_INFO" + | "SMOOTH_MANIFEST" + | "SEGMENT_UNKNOWN" + | "TEXT_UNKNOWN" + | "APP" + | "BREAK_CLIP_LOADING_ERROR" + | "BREAK_SEEK_INTERCEPTOR_ERROR" + | "IMAGE_ERROR" + | "LOAD_INTERRUPTED" + | "GENERIC"; - type EndedReason = - | "END_OF_STREAM" - | "ERROR" - | "STOPPED" - | "INTERRUPTED" - | "SKIPPED" - | "BREAK_SWITCH"; +export type EndedReason = + | "END_OF_STREAM" + | "ERROR" + | "STOPPED" + | "INTERRUPTED" + | "SKIPPED" + | "BREAK_SWITCH"; + +/** + * Event data for @see{@link EventType.SEGMENT_DOWNLOADED} event. + */ +export class SegmentDownloadedEvent extends Event { + constructor(downloadTime?: number, size?: number); /** - * Event data for @see{@link EventType.SEGMENT_DOWNLOADED} event. + * The time it took to download the segment; in milliseconds. */ - class SegmentDownloadedEvent extends Event { - constructor(downloadTime?: number, size?: number); - - /** - * The time it took to download the segment; in milliseconds. - */ - downloadTime?: number; - - /** - * The number of bytes in the segment. - */ - size?: number; - } + downloadTime?: number; /** - * Event data for all events that represent requests made to the receiver. + * The number of bytes in the segment. */ - class RequestEvent extends Event { - constructor( - type: EventType, - requestData?: RequestData, - senderId?: string - ); + size?: number; +} + +/** + * Event data for all events that represent requests made to the receiver. + */ +export class RequestEvent extends Event { + constructor( + type: EventType, + requestData?: RequestData, + senderId?: string + ); - /** - * The data that was sent with the request. - */ - requestData?: RequestData; + /** + * The data that was sent with the request. + */ + requestData?: RequestData; + + /** + * The sender id the request came from. + */ + senderId?: string; +} + +/** + * Event data superexport class for all events dispatched by @see{@link PlayerManager} + */ +export class Event { + constructor(type: EventType); + + /** + * Type of the event. + */ + type: EventType; +} +/** + * Event data for @see{@link EventType.MEDIA_STATUS} event. + */ +export class MediaStatusEvent extends Event { + constructor(type: EventType, mediaStatus?: MediaStatus); + + /** + * The media status that was sent. + */ + mediaStatus?: MediaStatus; +} +/** + * Event data for pause events forwarded from the MediaElement. + */ +export class MediaPauseEvent extends Event { + constructor(currentMediaTime?: number, ended?: boolean); + + /** + * Indicate if the media ended (indicates the pause was fired due to stream reached the end). + */ + ended?: boolean; +} +/** + * Event data for @see{@link EventType.MEDIA_FINISHED} event. + */ +export class MediaFinishedEvent extends Event { + constructor(currentMediaTime?: number, endedReason?: EndedReason); + + /** + * The time when the media finished (in seconds). For an item in a queue; this value represents the time in the currently playing queue item ( where 0 means the queue item has just started). + */ + currentTime?: number; + + /** + * The reason the media finished. + */ + endedReason?: EndedReason; +} +/** + * Event data for all events forwarded from the MediaElement. + */ +export class MediaElementEvent extends Event { + constructor(type: EventType, currentMediaTime?: number); + + /** + * The time in the currently playing clip when the event was fired (in seconds). Undefined if playback has not started yet. + */ + currentMediaTime?: number; +} +/** + * Event data for all events pertaining to processing a load / preload request. made to the player. + */ +export class LoadEvent extends Event { + constructor(type: EventType, media?: MediaInformation); + + /** + * Information about the media being loaded. + */ + media: MediaInformation; +} +/** + * Event data for @see{@link EventType.INBAND_TRACK_ADDED} event. + */ +export class InbandTrackAddedEvent { + constructor(track: Track); + + /** + * Added track. + */ + track: Track; +} + +/** Event data for @see{@link EventType.ID3} event. */ +export class Id3Event extends Event { + constructor(segmentData: Uint8Array); + + /** + * The segment data. + */ + segmentData: Uint8Array; +} +/** + * Event data for @see{@link EventType.EMSG} event. + */ +export class EmsgEvent extends Event { + constructor(emsgData: any); + + /** + * The time that the event ends (in presentation time). Undefined if using legacy Dash support. + */ + endTime: any; + + /** + * The duration of the event (in units of timescale). Undefined if using legacy Dash support. + */ + eventDuration: any; + + /** + * A field identifying this instance of the message. Undefined if using legacy Dash support. + */ + id: any; + + /** + * Body of the message. Undefined if using legacy Dash support. + */ + messageData: any; + + /** + * The offset that the event starts; relative to the start of the segment this is contained in (in units of timescale). Undefined if using legacy Dash support. + */ + presentationTimeDelta: any; - /** - * The sender id the request came from. - */ - senderId?: string; - } + /** + * Identifies the message scheme. Undefined if using legacy Dash support. + */ + schemeIdUri: any; /** - * Event data superclass for all events dispatched by @see{@link PlayerManager} + * The segment data. This is only defined if using legacy Dash support. */ - class Event { - constructor(type: EventType); + segmentData: any; - /** - * Type of the event. - */ - type: EventType; - } /** - * Event data for @see{@link EventType.MEDIA_STATUS} event. + * The time that the event starts (in presentation time). Undefined if using legacy Dash support. */ - class MediaStatusEvent extends Event { - constructor(type: EventType, mediaStatus?: MediaStatus); + startTime: any; - /** - * The media status that was sent. - */ - mediaStatus?: MediaStatus; - } /** - * Event data for pause events forwarded from the MediaElement. + * Provides the timescale; in ticks per second. Undefined if using legacy Dash support. */ - class MediaPauseEvent extends Event { - constructor(currentMediaTime?: number, ended?: boolean); + timescale: any; - /** - * Indicate if the media ended (indicates the pause was fired due to stream reached the end). - */ - ended?: boolean; - } - /** - * Event data for @see{@link EventType.MEDIA_FINISHED} event. - */ - class MediaFinishedEvent extends Event { - constructor(currentMediaTime?: number, endedReason?: EndedReason); - - /** - * The time when the media finished (in seconds). For an item in a queue; this value represents the time in the currently playing queue item ( where 0 means the queue item has just started). - */ - currentTime?: number; - - /** - * The reason the media finished. - */ - endedReason?: EndedReason; - } - /** - * Event data for all events forwarded from the MediaElement. - */ - class MediaElementEvent extends Event { - constructor(type: EventType, currentMediaTime?: number); - - /** - * The time in the currently playing clip when the event was fired (in seconds). Undefined if playback has not started yet. - */ - currentMediaTime?: number; - } - /** - * Event data for all events pertaining to processing a load / preload request. made to the player. - */ - class LoadEvent extends Event { - constructor(type: EventType, media?: MediaInformation); - - /** - * Information about the media being loaded. - */ - media: MediaInformation; - } /** - * Event data for @see{@link EventType.INBAND_TRACK_ADDED} event. - */ - class InbandTrackAddedEvent { - constructor(track: Track); + * Specifies the value for the event. Undefined if using legacy Dash support. + */ + value: any; +} +/** + * Event data for @see{@link EventType.CLIP_ENDED} event. + */ +export class ClipEndedEvent extends Event { + constructor(currentMediaTime: number, endedReason?: EndedReason); - /** - * Added track. - */ - track: Track; - } - - /** Event data for @see{@link EventType.ID3} event. */ - class Id3Event extends Event { - constructor(segmentData: Uint8Array); + /** + * The time in media (in seconds) when clip ended. + */ + currentMediaTime: number; - /** - * The segment data. - */ - segmentData: Uint8Array; - } /** - * Event data for @see{@link EventType.EMSG} event. + * The reason the clip ended. */ - class EmsgEvent extends Event { - constructor(emsgData: any); + endedReason?: EndedReason; +} + +/** + * Event data for @see{@link EventType.CACHE_LOADED} event. + */ +export class CacheLoadedEvent extends Event { + constructor(media?: MediaInformation); + + /** + * Information about the media being cached. + */ + media: MediaInformation; +} + +export class CacheItemEvent extends Event { + constructor(type: EventType, url: string); + + /** + * The URL of data fetched from cache + */ + url: string; +} + +export class BufferingEvent extends Event { + constructor(isBuffering: boolean); + + /** + * True if the player is entering a buffering state. + */ + isBuffering: boolean; +} + +export class BreaksEvent extends Event { + constructor( + type: EventType, + currentMediaTime?: number, + index?: number, + total?: number, + whenSkippable?: number, + endedReason?: EndedReason, + breakClipId?: string, + breakId?: string + ); + + /** + * The break's id. Refer to Break.id + */ + breakId?: string; + + /** + * The break clip's id. Refer to BreakClip.id + */ + breakClipId?: string; + + /** + * The time in the currently playing media when the break event occurred. + */ + currentMediaTime?: number; + + /** + * The reason the break clip ended. + */ + endedReason?: EndedReason; + + /** + * Index of break clip; which starts from 1. + */ + index: number; + + /** + * Total number of break clips. + */ + total: number; + + /** + * When to skip current break clip in sec; after break clip begins to play. + */ + whenSkippable?: number; +} + +/** + * Event data for @see {@link EventType.BITRATE_CHANGED} event. + */ +export class BitrateChangedEvent { + constructor(totalBitrate?: number); + + /** The bitrate of the media (audio and video) in bits per second. */ + totalBitrate: number; +} + +export class ErrorEvent extends Event { + constructor(detailedErrorCode: DetailedErrorCode, error?: any); - /** - * The time that the event ends (in presentation time). Undefined if using legacy Dash support. - */ - endTime: any; - - /** - * The duration of the event (in units of timescale). Undefined if using legacy Dash support. - */ - eventDuration: any; - - /** - * A field identifying this instance of the message. Undefined if using legacy Dash support. - */ - id: any; - - /** - * Body of the message. Undefined if using legacy Dash support. - */ - messageData: any; - - /** - * The offset that the event starts; relative to the start of the segment this is contained in (in units of timescale). Undefined if using legacy Dash support. - */ - presentationTimeDelta: any; - - /** - * Identifies the message scheme. Undefined if using legacy Dash support. - */ - schemeIdUri: any; - - /** - * The segment data. This is only defined if using legacy Dash support. - */ - segmentData: any; - - /** - * The time that the event starts (in presentation time). Undefined if using legacy Dash support. - */ - startTime: any; - - /** - * Provides the timescale; in ticks per second. Undefined if using legacy Dash support. - */ - timescale: any; - - /** - * Specifies the value for the event. Undefined if using legacy Dash support. - */ - value: any; - } - /** - * Event data for @see{@link EventType.CLIP_ENDED} event. - */ - class ClipEndedEvent extends Event { - constructor(currentMediaTime: number, endedReason?: EndedReason); - - /** - * The time in media (in seconds) when clip ended. - */ - currentMediaTime: number; - - /** - * The reason the clip ended. - */ - endedReason?: EndedReason; - } - - /** - * Event data for @see{@link EventType.CACHE_LOADED} event. - */ - class CacheLoadedEvent extends Event { - constructor(media?: MediaInformation); - - /** - * Information about the media being cached. - */ - media: MediaInformation; - } - - class CacheItemEvent extends Event { - constructor(type: EventType, url: string); - - /** - * The URL of data fetched from cache - */ - url: string; - } - - class BufferingEvent extends Event { - constructor(isBuffering: boolean); - - /** - * True if the player is entering a buffering state. - */ - isBuffering: boolean; - } - - class BreaksEvent extends Event { - constructor( - type: EventType, - currentMediaTime?: number, - index?: number, - total?: number, - whenSkippable?: number, - endedReason?: EndedReason, - breakClipId?: string, - breakId?: string - ); - - /** - * The break's id. Refer to Break.id - */ - breakId?: string; - - /** - * The break clip's id. Refer to BreakClip.id - */ - breakClipId?: string; - - /** - * The time in the currently playing media when the break event occurred. - */ - currentMediaTime?: number; - - /** - * The reason the break clip ended. - */ - endedReason?: EndedReason; - - /** - * Index of break clip; which starts from 1. - */ - index: number; - - /** - * Total number of break clips. - */ - total: number; - - /** - * When to skip current break clip in sec; after break clip begins to play. - */ - whenSkippable?: number; - } - - /** - * Event data for @see {@link EventType.BITRATE_CHANGED} event. - */ - class BitrateChangedEvent { - constructor(totalBitrate?: number); - - /** The bitrate of the media (audio and video) in bits per second. */ - totalBitrate: number; - } - - class ErrorEvent extends Event { - constructor(detailedErrorCode: DetailedErrorCode, error?: any); - - detailedErrorCode: DetailedErrorCode; - error?: any; - } + detailedErrorCode: DetailedErrorCode; + error?: any; } diff --git a/types/chromecast-caf-receiver/cast.framework.messages.d.ts b/types/chromecast-caf-receiver/cast.framework.messages.d.ts index d6dda6d145..c3dc4a405f 100644 --- a/types/chromecast-caf-receiver/cast.framework.messages.d.ts +++ b/types/chromecast-caf-receiver/cast.framework.messages.d.ts @@ -1,1900 +1,1898 @@ import { Event, DetailedErrorCode } from "./cast.framework.events"; -export = cast.framework.messages; -declare namespace cast.framework.messages { - type UserAction = - | "LIKE" - | "DISLIKE" - | "FOLLOW" - | "UNFOLLOW" - | "FLAG" - | "SKIP_AD"; - - type UserActionContext = - | "UNKNOWN_CONTEXT" - | "ALBUM" - | "ARTIST" - | "PLAYLIST" - | "EPISODE" - | "SERIES" - | "MOVIE" - | "CHANNEL" - | "TEAM" - | "PLAYER" - | "COACH"; - - type TextTrackType = - | "SUBTITLES" - | "CAPTIONS" - | "DESCRIPTIONS" - | "CHAPTERS" - | "METADATA"; - - type TextTrackWindowType = "NONE" | "NORMAL" | "ROUNDED_CORNERS"; - - type TrackType = "TEXT" | "AUDIO" | "VIDEO"; - - type TextTrackFontGenericFamily = - | "SANS_SERIF" - | "MONOSPACED_SANS_SERIF" - | "SERIF" - | "MONOSPACED_SERIF" - | "CASUAL" - | "CURSIVE" - | "SMALL_CAPITALS"; - - type TextTrackFontStyle = "NORMAL" | "BOLD" | "BOLD_ITALIC" | "ITALIC"; - - type TextTrackEdgeType = - | "NONE" - | "OUTLINE" - | "DROP_SHADOW" - | "RAISED" - | "DEPRESSED"; - - type Command = - | "PAUSE" - | "SEEK" - | "STREAM_VOLUME" - | "STREAM_MUTE" - | "ALL_BASIC_MEDIA" - | "QUEUE_NEXT" - | "QUEUE_PREV" - | "QUEUE_SHUFFLE" - | "SKIP_AD"; - - type SeekResumeState = "PLAYBACK_START" | "PLAYBACK_PAUSE"; - - type StreamingProtocolType = - | "UNKNOWN" - | "MPEG_DASH" - | "HLS" - | "SMOOTH_STREAMING"; - - type StreamType = "BUFFERED" | "LIVE" | "NONE"; - - type FocusState = "IN_FOCUS" | "NOT_IN_FOCUS"; - - type ExtendedPlayerState = "LOADING"; - - type ErrorType = - | "INVALID_PLAYER_STATE" - | "LOAD_FAILED" - | "LOAD_CANCELLED" - | "INVALID_REQUEST" - | "ERROR"; - - type ErrorReason = - | "INVALID_COMMAND" - | "INVALID_PARAMS" - | "INVALID_MEDIA_SESSION_ID" - | "SKIP_LIMIT_REACHED" - | "NOT_SUPPORTED" - | "LANGUAGE_NOT_SUPPORTED" - | "END_OF_QUEUE" - | "APP_ERROR" - | "AUTHENTICATION_EXPIRED" - | "PREMIUM_ACCOUNT_REQUIRED" - | "CONCURRENT_STREAM_LIMIT" - | "PARENTAL_CONTROL_RESTRICTED" - | "NOT_AVAILABLE_IN_REGION" - | "CONTENT_ALREADY_PLAYING" - | "INVALID_REQUEST" - | "GENERIC_LOAD_ERROR"; - - type RepeatMode = - | "REPEAT_OFF" - | "REPEAT_ALL" - | "REPEAT_SINGLE" - | "REPEAT_ALL_AND_SHUFFLE"; - - type IdleReason = "CANCELLED" | "INTERRUPTED" | "FINISHED" | "ERROR"; - - type HlsSegmentFormat = "AAC" | "AC3" | "MP3" | "TS" | "TS_AAC"; - - type HdrType = "SDR" | "HDR" | "DV"; - - type PlayStringId = - | "FREE_TRIAL_ABOUT_TO_EXPIRE" - | "SUBSCRIPTION_ABOUT_TO_EXPIRE" - | "STREAM_HIJACKED"; - - type GetStatusOptions = "NO_METADATA" | "NO_QUEUE_ITEMS"; - - type MessageType = - | "MEDIA_STATUS" - | "CLOUD_STATUS" - | "QUEUE_CHANGE" - | "QUEUE_ITEMS" - | "QUEUE_ITEM_IDS" - | "GET_STATUS" - | "LOAD" - | "PAUSE" - | "STOP" - | "PLAY" - | "SKIP_AD" - | "PLAY_AGAIN" - | "SEEK" - | "SET_PLAYBACK_RATE" - | "SET_VOLUME" - | "EDIT_TRACKS_INFO" - | "EDIT_AUDIO_TRACKS" - | "PRECACHE" - | "PRELOAD" - | "QUEUE_LOAD" - | "QUEUE_INSERT" - | "QUEUE_UPDATE" - | "QUEUE_REMOVE" - | "QUEUE_REORDER" - | "QUEUE_NEXT" - | "QUEUE_PREV" - | "QUEUE_GET_ITEM_RANGE" - | "QUEUE_GET_ITEMS" - | "QUEUE_GET_ITEM_IDS" - | "QUEUE_SHUFFLE" - | "SET_CREDENTIALS" - | "LOAD_BY_ENTITY" - | "USER_ACTION" - | "DISPLAY_STATUS" - | "FOCUS_STATE" - | "CUSTOM_COMMAND"; - - type PlayerState = "IDLE" | "PLAYING" | "PAUSED" | "BUFFERING"; - - type QueueChangeType = - | "INSERT" - | "REMOVE" - | "ITEMS_CHANGE" - | "UPDATE" - | "NO_CHANGE"; - - type QueueType = - | "ALBUM" - | "PLAYLIST" - | "AUDIOBOOK" - | "RADIO_STATION" - | "PODCAST_SERIES" - | "TV_SERIES" - | "VIDEO_PLAYLIST" - | "LIVE_TV" - | "MOVIE"; - - type MetadataType = - | "GENERIC" - | "MOVIE" - | "TV_SHOW" - | "MUSIC_TRACK" - | "PHOTO"; - - /** - * RefreshCredentials request data. - */ - interface RefreshCredentialsRequestData { - [key: string]: any; - } - - /** - * Media event SET_VOLUME request data. - */ - interface VolumeRequestData extends RequestData { - /** - * The media stream volume - */ - volume?: Volume; - } - - /** - * Represents the volume of a media session stream. - */ - interface Volume { - /** - * Value from 0 to 1 that represents the current stream volume level. - */ - level?: number; - - /** - * Whether the stream is muted. - */ - muted?: boolean; - } - - /** - * Video information such as video resolution and High Dynamic Range (HDR). - */ - class VideoInformation { - constructor(width: number, height: number, hdrType: HdrType); - - width: number; - - height: number; - - hdrType: HdrType; - } - - /** - * VAST ad request configuration. - */ - interface VastAdsRequest { - /** - * Specifies a VAST document to be used as the ads response instead of making a - * request via an ad tag url. - * This can be useful for debugging and other situations where a VAST response is - * already available. - */ - adsResponse?: string; - - /** - * URL for VAST file. - */ - adTagUrl?: string; - } - - /** - * UserAction request data. - */ - interface UserActionRequestData { - /** - * Optional request source. - * It contain the assistent query that initiate the request. - */ - source?: string; - - /** - * User action to be handled by the application. - */ - userAction?: UserAction; - - /** - * Optional context information for the user action. - */ - userActionContext?: UserActionContext; - } - - /** - * A TV episode media description. - */ - interface TvShowMediaMetadata { - /** - * TV episode number. A positive integer. - */ - episode?: number; - - /** - * @deprecated use episode instead - */ - episodeNumber?: number; - - /** - * @deprecated use episode instead - */ - episodeTitle?: string; - - /** - * Content images. Examples would include cover art or a thumbnail of - * the currently playing media. - */ - images?: Image[]; - - /** - * ISO 8601 date when the episode originally aired; e.g. 2014-02-10. - */ - originalAirdate?: string; - - /** - * @deprecated use originalAirdate instead. - */ - releaseYear?: number; - - /** - * TV episode season. A positive integer. - */ - season?: number; - - /** - * @deprecated use season instead. - */ - seasonNumber?: number; - - /** - * TV series title. - */ - seriesTitle?: string; - - /** - * TV episode title. - */ - title?: string; - } - /** - * Describes track metadata information. - */ - class Track { - constructor(trackId: number, trackType: TrackType); - - /** - * Custom data set by the receiver application. - */ - customData?: string; - - /** - * Language tag as per RFC 5646 (If subtype is “SUBTITLES” it is mandatory). - */ - language?: string; - - /** - * A descriptive; human readable name for the track. For example "Spanish". - */ - name?: string; - - /** - * For text tracks; the type of text track. - */ - subtype?: string; - - /** - * It can be the url of the track or any other identifier that allows the receiver - * to find the content (when the track is not inband or included in the manifest). - * For example it can be the url of a vtt file. - */ - trackContentId?: string; - - /** - * It represents the MIME type of the track content. For example if the track - * is a vtt file it will be ‘text/vtt’. This field is needed for out of band tracks; - * so it is usually provided if a trackContentId has also been provided. - * It is not mandatory if the receiver has a way to identify the content from - * the trackContentId; but recommended. - * The track content type; if provided; must be consistent with the track type. - */ - trackContentType?: string; - - /** - * Unique identifier of the track within the context of a MediaInformation object. - */ - trackId?: number; - - /** - * The type of track. - */ - type: TrackType; - } - /** - * Describes style information for a text track. - */ - interface TextTrackStyle { - /** - * The background 32 bit RGBA color. The alpha channel should be used for transparent backgrounds. - */ - backgroundColor?: string; - - /** - * Custom data set by the receiver application. - */ - customData?: any; - - /** - * RGBA color for the edge; this value will be ignored if edgeType is NONE. - */ - edgeColor?: string; - - edgeType?: TextTrackEdgeType; - - /** - * If the font is not available in the receiver the fontGenericFamily will be used. - */ - fontFamily?: string; - - /** - * The text track generic family. - */ - fontGenericFamily?: TextTrackFontGenericFamily; - - /** - * The font scaling factor for the text track (the default is 1). - */ - fontScale?: number; - - /** - * The text track font style. - */ - fontStyle?: TextTrackFontStyle; - - /** - * The foreground 32 bit RGBA color. - */ - foregroundColor?: string; - - /** - * 32 bit RGBA color for the window. This value will be ignored if windowType is NONE. - */ - windowColor?: string; - - /** - * Rounded corner radius absolute value in pixels (px). This value will be ignored - * if windowType is not ROUNDED_CORNERS. - */ - windowRoundedCornerRadius?: number; - - /** - * The window concept is defined in CEA-608 and CEA-708. In WebVTT is called a region. - */ - windowType?: TextTrackWindowType; - } - - /** - * Media event playback rate request data. - */ - interface SetPlaybackRateRequestData extends RequestData { - /** - * New playback rate (>0). - */ - playbackRate?: number; - - /** - * New playback rate relative to current playback rate. - * New rate will be the result of multiplying the current rate with the value. - * For example a value of 1.1 will increase rate by 10%. - * (Only used if the playbackRate value is not provided). - */ - relativePlaybackRate?: number; - } - - /** - * SetCredentials request data. - */ - interface SetCredentialsRequestData { - /** - * Credentials to use by receiver. - */ - credentials?: string; - - /** - * If it is a response for refresh credentials; it will indicate the request id - * of the refresh credentials request. - */ - forRequestId?: number; - - /** - * Optional request source. It contain the assistent query that initiate the request. - */ - source?: string; - } - - /** - * Media event SEEK request data. - */ - interface SeekRequestData extends RequestData { - /** - * Seconds since beginning of content. - */ - currentTime?: number; - - /** - * Seconds relative to the current playback position. If this field is defined; - * the currentTime field will be ignored. - */ - relativeTime?: number; - - /** - * The playback state after a SEEK request. - */ - resumeState?: SeekResumeState; - } - - /** - * Provides seekable range in seconds. - */ - class SeekableRange { - constructor(start?: number, end?: number); - - /** - * End of the seekable range in seconds. - */ - end?: number; - - /** - * Start of the seekable range in seconds. - */ - start?: number; - } - - /** - * Media event request data. - */ - class RequestData { - constructor(type: MessageType); - - /** - * Application-specific data for this request. - * It enables the sender and receiver to easily extend the media protocol - * without having to use a new namespace with custom messages. - */ - customData?: any; - - /** - * Id of the media session that the request applies to. - */ - mediaSessionId?: number; - - /** - * Id of the request; used to correlate request/response. - */ - requestId: number; - } - - /** - * Media event UPDATE queue request data. - */ - interface QueueUpdateRequestData { - /** - * ID of the current media Item after the deletion - * (if not provided; the currentItem value will be the same as before the deletion; - * if it does not exist because it has been deleted; the currentItem will point to - * the next logical item in the list). - */ - currentItemId?: number; - - /** - * Seconds since the beginning of content to start playback of the current item. - * If provided; this value will take precedence over the startTime value provided - * at the QueueItem level but only the first time the item is played. - * This is to cover the common case where the user jumps to the middle of an - * item so the currentTime does not apply to the item permanently like the - * QueueItem startTime does. It avoids having to reset the startTime dynamically - * (that may not be possible if the phone has gone to sleep). - */ - currentTime?: number; - - /** - * List of queue items to be updated. No reordering will happen; the items will - * retain the existing order. - */ - items?: QueueItem[]; - - /** - * Skip/Go back number of items with respect to the position of currentItem - * (it can be negative). If it is out of boundaries; the currentItem will be the - * next logical item in the queue wrapping around the boundaries. - * The new currentItem position will follow the rules of the queue repeat behavior. - */ - jump?: number; - - /** - * Behavior of the queue when all items have been played. - */ - repeatMode?: RepeatMode; - - /** - * Shuffle the queue items when the update is processed. - * After the queue items are shuffled; the item at the currentItem position will - * be loaded. - */ - shuffle?: boolean; - } - - /** - * Media event queue REORDER request data. - */ - class QueueReorderRequestData extends RequestData { - constructor(itemIds: number[]); - - /** - * ID of the current media Item after the deletion (if not provided; - * the currentItem value will be the same as before the deletion; - * if it does not exist because it has been deleted; - * the currentItem will point to the next logical item in the list). - */ - currentItemId?: number; - - /** - * Seconds since the beginning of content to start playback of the current item. - * If provided; this value will take precedence over the startTime value provided - * at the QueueItem level but only the first time the item is played. - * This is to cover the common case where the user jumps to the middle of an - * item so the currentTime does not apply to the item permanently like - * the QueueItem startTime does. It avoids having to reset the startTime dynamically - * (that may not be possible if the phone has gone to sleep). - */ - currentTime?: number; - - /** - * ID of the item that will be located immediately after the reordered list. - * If the ID is not found or it is not provided; - * the reordered list will be appended at the end of the existing list. - */ - insertBefore?: number; - - /** - * IDs of the items to be reordered; in the new order. - * Items not provided will keep their existing order. - * The provided list will be inserted at the position determined by insertBefore. - * For example: - * If insertBefore is not specified Existing queue: “A”;”D”;”G”;”H”;”B”;”E” itemIds: - * “D”;”H”;”B” New Order: “A”;”G”;”E”;“D”;”H”;”B” - * If insertBefore is “A” Existing queue: “A”;”D”;”G”;”H”;”B” itemIds: - * “D”;”H”;”B” New Order: “D”;”H”;”B”;“A”;”G”;”E” - * If insertBefore is “G” Existing queue: “A”;”D”;”G”;”H”;”B” itemIds: - * “D”;”H”;”B” New Order: “A”;“D”;”H”;”B”;”G”;”E” - */ - itemIds: number[]; - } - - /** - * Media event queue REMOVE request data. - */ - class QueueRemoveRequestData extends RequestData { - constructor(itemIds: number[]); - - /** - * ID of the current media Item after the deletion - * (if not provided; the currentItem value will be the same as before the deletion; - * if it does not exist because it has been deleted; - * the currentItem will point to the next logical item in the list). - */ - currentItemId?: number; - - /** - * Seconds since the beginning of content to start playback of the current item. - * If provided; this value will take precedence over the startTime value provided - * at the QueueItem level but only the first time the item is played. - * This is to cover the common case where the user jumps to the middle of an - * item so the currentTime does not apply to the item permanently like the - * QueueItem startTime does. It avoids having to reset the startTime dynamically - * (that may not be possible if the phone has gone to sleep). - */ - currentTime?: number; - - /** - * IDs of queue items to be deleted. - */ - itemIds?: number[]; - } - /** - * Media event queue LOAD request data. - */ - class QueueLoadRequestData extends RequestData { - constructor(items: QueueItem[]); - - /** - * Seconds (since the beginning of content) to start playback of the first item to - * be played. If provided; this value will take precedence over the - * startTime value provided at the QueueItem level but only the first - * time the item is played. This is to cover the common case where the user - * casts the item that was playing locally so the currentTime does not apply - * to the item permanently like the QueueItem startTime does. - * It avoids having to reset the startTime dynamically - * (that may not be possible if the phone has gone to sleep). - */ - currentTime?: number; - - /** - * Behavior of the queue when all items have been played. - */ - items: QueueItem[]; - - /** - * Id of the request; used to correlate request/response. - */ - repeatMode?: RepeatMode; - - /** - * The index of the item in the items array that must be the first currentItem - * (the item that will be played first). Note this is the index of the array - * (starts at 0) and not the itemId (as it is not known until the queue is created). - * If repeatMode is REPEAT_OFF playback will end when the last item in the array is - * played (elements before the startIndex will not be played). - * This may be useful for continuation scenarios where the user was already - * using the sender app and in the middle decides to cast. - * In this way the sender app does not need to map between the local and remote queue - * positions or saves one extra QUEUE_UPDATE request. - */ - startIndex?: number; - } - - /** - * Queue item information. Application developers may need to create a QueueItem to - * insert a queue element using InsertQueueItems. In this case they should not - * provide an itemId (as the actual itemId will be assigned when the item is inserted - * in the queue). This prevents ID collisions with items added from a sender app. - */ - class QueueItem { - constructor(opt_itemId?: number); - - /** - * Array of Track trackIds that are active. If the array is not provided; - * the default tracks will be active. - */ - activeTrackIds?: number[]; - - /** - * If the autoplay parameter is not specified or is true; the media player - * will begin playing the element in the queue when the item becomes the currentItem. - */ - autoplay?: boolean; - - /** - * The application can define any extra queue item information needed. - */ - customData?: any; - - /** - * Unique identifier of the item in the queue. - * The attribute is optional because for LOAD or INSERT should not be provided - * (as it will be assigned by the receiver when an item is first created/inserted). - */ - itemId?: number; - - /** - * Metadata (including contentId) of the playlist element. - */ - media?: MediaInformation; - - /** - * Playback duration of the item; if it is larger than the actual duration - - * startTime it will be ignored (default behavior). - * It can be negative; in such case the duration will be the actual asset - * duration minus the duration provided. - * It can be used for photo slideshows to control the duration the item should - * be presented or for live events to control the duration that the program - * should be played. It may be useful for autoplay scenarios to avoid displaying all - * the credits after an episode has ended. - */ - playbackDuration?: number; - - /** - * This parameter is a hint for the receiver to preload this media - * item before it is played. It allows for a smooth transition between items - * played from the queue. The time is expressed in seconds; relative to - * the beginning of this item playback (usually the end of the previous item playback). - * Only positive values are valid. For example; if the value is 10 seconds; this item - * will be preloaded 10 seconds before the previous item has finished. - * The receiver will try to honor this value but will not guarantee it; - * for example if the value is larger than the previous item duration the - * receiver may just preload this item shortly after the previous item has started playing - * (there will never be two items being preloaded in parallel). - * Also; if an item is inserted in the queue just after the currentItem and the time to preload is higher than the - * time left on the currentItem; the preload will just happen as soon as possible. - */ - preloadTime?: number; - - /** - * Seconds since beginning of content. If the content is live content; - * and startTime is not specified; the stream will start at the live position. - */ - startTime?: number; - } - - /** - * Media event queue INSERT request data. - */ - class QueueInsertRequestData extends RequestData { - constructor(items: QueueItem[]); - - /** - * ID of the current media Item after the insertion (if not provided; - * the currentItem value will be the same as before the insertion). - */ - currentItemId?: number; - - /** - * Index (relative to the items array; starting with 0) of the new current media Item. - * For inserted items we use the index (similar to startIndex in QUEUE_LOAD) and not - * currentItemId; because the itemId is unknown until the items are inserted. - * If not provided; the currentItem value will be the same as before the insertion - * (unless currentItemId is provided). This param allows to make atomic the common use - * case of insert and play an item. - */ - currentItemIndex?: number; - - /** - * Seconds since the beginning of content to start playback of the current item. - * If provided; this value will take precedence over the startTime value provided - * at the QueueItem level but only the first time the item is played. - * This is to cover the common case where the user jumps to the middle of an - * item so the currentTime does not apply to the item permanently like the - * QueueItem startTime does. It avoids having to reset the startTime dynamically - * (that may not be possible if the phone has gone to sleep). - */ - currentTime?: number; - - /** - * ID of the item that will be located immediately after the inserted list. - * If the ID is not found or it is not provided; the list will be appended at - * the end of the existing list. - */ - insertBefore?: number; - - /** - * List of queue items. The itemId field of the items should be empty. - * It is sorted (first element will be played first). - */ - items: QueueItem[]; - } - - /** - * Represents a data message containing the full list of queue ids. - */ - interface QueueIds { - /** - * List of queue item ids. - */ - itemIds?: number[]; - - /** - * The corresponding request id. - */ - requestId?: number; - - type: MessageType; - } - - /** - * Queue data as part of the LOAD request. - */ - class QueueData { - constructor( - id?: string, - name?: string, - description?: string, - repeatMode?: RepeatMode, - items?: QueueItem[], - startIndex?: number, - startTime?: number - ); - - /** - * Description of the queue. - */ - description?: string; - - /** - * Optional Queue entity id; provide Google Assistant deep link. - */ - entity?: string; - - /** - * Id of the queue. - */ - id?: string; - - /** - * Array of queue items. It is sorted (first element will be played first). - */ - items?: QueueItem[]; - - /** - * Name of the queue. - */ - name?: string; - - /** - * Queue type; e.g. album; playlist; radio station; tv series; etc. - */ - queueType?: QueueType; - - /** - * Continuous playback behavior of the queue. - */ - repeatMode?: RepeatMode; - - /** - * The index of the item in the queue that should be used to start playback first. - */ - startIndex?: number; - - /** - * Seconds (since the beginning of content) to start playback of the first item. - */ - startTime?: number; - } - - /** - * Represents a queue change message; such as insert; remove; and update. - */ - interface QueueChange { - /** - * The actual queue change type. - */ - changeType?: QueueChangeType; - - /** - * The id to insert the list of itemIds before. - */ - insertBefore?: number; - - /** - * List of changed itemIds. - */ - itemIds?: number[]; - - /** - * The corresponding request id. - */ - requestId?: number; - - /** - * The queue change sequence ID. Used to coordinate state sync between various - * senders and the receiver. - */ - sequenceNumber?: number; - - type: MessageType; - } - - /** - * Media event PRELOAD request data. - */ - class PreloadRequestData implements LoadRequestData { - /** - * Array of trackIds that are active. If the array is not provided; - * the default tracks will be active. - */ - activeTrackIds: number[]; - /** - * If the autoplay parameter is specified; the media player will begin playing - * the content when it is loaded. Even if autoplay is not specified;the media player - * implementation may choose to begin playback immediately. - */ - autoplay?: boolean; - /** - * Optional user credentials. - */ - credentials?: string; - /** - * Optional credentials type. The type 'cloud' is a reserved type used by load - * requests that were originated by voice assistant commands. - */ - credentialsType?: string; - /** - * Seconds since beginning of content. If the content is live content; - * and currentTime is not specified; the stream will start at the live position. - */ - currentTime?: number; - /** - * If the autoplay parameter is specified; the media player will begin playing - * the content when it is loaded. Even if autoplay is not specified; the media - * player implementation may choose to begin playback immediately. - */ - media: MediaInformation; - /** - * The media playback rate. - */ - playbackRate?: number; - /** - * Queue data. - */ - queueData: QueueData; - /** - * Application-specific data for this request. - * It enables the sender and receiver to easily extend the media protocol - * without having to use a new namespace with custom messages. - */ - customData?: any; - /** - * Id of the media session that the request applies to. - */ - mediaSessionId?: number; - /** - * Id of the request; used to correlate request/response. - */ - requestId: number; - constructor(itemId: number); - - /** - * The ID of the queue item. - */ - itemId: number; - } - - /** - * Media event PRECACHE request data. (Some fields of the load request; - * like autoplay and queueData; are ignored). - */ - class PrecacheRequestData implements LoadRequestData { - /** - * Array of trackIds that are active. If the array is not provided; - * the default tracks will be active. - */ - activeTrackIds: number[]; - /** - * If the autoplay parameter is specified; the media player will begin playing - * the content when it is loaded. Even if autoplay is not specified;the media player - * implementation may choose to begin playback immediately. - */ - autoplay?: boolean; - /** - * Optional user credentials. - */ - credentials?: string; - /** - * Optional credentials type. The type 'cloud' is a reserved type used by load - * requests that were originated by voice assistant commands. - */ - credentialsType?: string; - /** - * Seconds since beginning of content. If the content is live content; and - * currentTime is not specified; the stream will start at the live position. - */ - currentTime?: number; - /** - * If the autoplay parameter is specified; the media player will begin playing - * the content when it is loaded. Even if autoplay is not specified; - * the media player implementation may choose to begin playback immediately. - */ - media: MediaInformation; - /** - * The media playback rate. - */ - playbackRate?: number; - /** - * Queue data. - */ - queueData: QueueData; - /** - * Application-specific data for this request. - * It enables the sender and receiver to easily extend the media protocol - * without having to use a new namespace with custom messages. - */ - customData?: any; - /** - * Id of the media session that the request applies to. - */ - mediaSessionId?: number; - /** - * Id of the request; used to correlate request/response. - */ - requestId: number; - constructor(data?: string); - - /** - * Application precache data. - */ - precacheData?: string; - } - - /** - * PlayString request data. - */ - class PlayStringRequestData { - constructor(stringId: PlayStringId, opt_arguments?: string[]); - - /** - * An optional array of string values to be filled into the text. - */ - arguments?: string[]; - - /** - * An identifier for the text to be played back. - */ - stringId: PlayStringId; - } - - /** - * A photo media description. - */ - interface PhotoMediaMetadata { - /** - * Name of the photographer. - */ - artist?: string; - - /** - * ISO 8601 date and time the photo was taken; e.g. 2014-02-10T15:47:00Z. - */ - creationDateTime?: string; - - /** - * Photo height; in pixels. - */ - height?: number; - - /** - * Images associated with the content. Examples would include a photo thumbnail. - */ - images: Image[]; - - /** - * Latitude. - */ - latitude?: number; - - /** - * Location where the photo was taken. For example; "Seattle; Washington; USA". - */ - location?: string; - - /** - * Longitude. - */ - longitude?: number; - - /** - * Photo title. - */ - title?: string; - - /** - * Photo width; in pixels. - */ - width?: number; - } - - /** - * A music track media description. - */ - interface MusicTrackMediaMetadata { - /** - * Album artist name. - */ - albumArtist?: string; - - /** - * Album name. - */ - albumName?: string; - - /** - * Track artist name. - */ - artist?: string; - - /** - * @deprecated: use @see{@link artist} instead - */ - artistName: string; - - /** - * Track composer name. - */ - composer?: string; - - /** - * Disc number. A positive integer. - */ - discNumber?: number; - - /** - * Content images. Examples would include cover art or a thumbnail of the - * currently playing media. - */ - images: Image[]; - - /** - * ISO 8601 date when the track was released; e.g. 2014-02-10. - */ - releaseDate?: string; - - /** - * @deprecated: Use @see{@link releaseDate} instead - */ - releaseYear?: string; - - /** - * Track name. - */ - songName?: string; - - /** - * Track title. - */ - title?: string; - - /** - * Track number in album. A positive integer. - */ - trackNumber?: number; - } - - /** - * A movie media description. - */ - interface MovieMediaMetadata { - /** - * Content images. Examples would include cover art or a thumbnail of the - * currently playing media. - */ - images: Image[]; - - /** - * ISO 8601 date when the movie was released; e.g. 2014-02-10. - */ - releaseDate?: string; - - /** - * @deprecated: use @see{@link releaseDate} instead - */ - releaseYear?: number; - - /** - * Movie studio. - */ - studio?: string; - - /** - * Movie subtitle. - */ - subtitle?: string; - - /** - * Movie title. - */ - title?: string; - } - /** - * Represents the status of a media session. - */ - interface MediaStatus { - /** - * List of IDs corresponding to the active tracks. - */ - activeTrackIds: number[]; - - /** - * Status of break; if receiver is playing break. - * This field will be defined only when receiver is playing break. - */ - breakStatus: BreakStatus; - - /** - * ID of this media item (the item that originated the status change). - */ - currentItemId?: number; - - /** - * The current playback position. - */ - currentTime: number; - - /** - * Application-specific media status. - */ - customData?: any; - - /** - * Extended media status information. - */ - extendedStatus: ExtendedMediaStatus; - - /** - * If the state is IDLE; the reason the player went to IDLE state. - */ - idleReason: IdleReason; - - /** - * List of media queue items. - */ - items: QueueItem[]; - - /** - * Seekable range of a live or event stream. It uses relative media time in seconds. - * It will be undefined for VOD streams. - */ - liveSeekableRange: LiveSeekableRange; - - /** - * ID of the media Item currently loading. If there is no item being loaded; - * it will be undefined. - */ - loadingItemId?: number; - - /** - * The media information. - */ - media: MediaInformation; - - /** - * Unique id for the session. - */ - mediaSessionId: number; - - /** - * The playback rate. - */ - playbackRate: number; - - /** - * The playback state. - */ - playerState: PlayerState; - - /** - * ID of the next Item; only available if it has been preloaded. - * Media items can be preloaded and cached temporarily in memory; - * so when they are loaded later on; the process is faster - * (as the media does not have to be fetched from the network). - */ - preloadedItemId?: number; - - /** - * Queue data. - */ - queueData: QueueData; - - /** - * The behavior of the queue when all items have been played. - */ - repeatMode: RepeatMode; - - /** - * The commands supported by this player. - */ - supportedMediaCommands: number; - - type: MessageType; - - /** - * The video information. - */ - videoInfo: VideoInformation; - - /** - * The current stream volume. - */ - volume: Volume; - } - /** - * Common media metadata used as part of MediaInformation - */ - class MediaMetadata { - constructor(type: MetadataType); - - /** - * The type of metadata - */ - metadataType: MetadataType; - } - - /** - * Represents the media information. - */ - interface MediaInformation { - /** - * Partial list of break clips that includes current break clip that receiver - * is playing or ones that receiver will play shortly after; instead of sending - * whole list of clips. This is to avoid overflow of MediaStatus message. - */ - breakClips: BreakClip[]; - - /** - * List of breaks. - */ - breaks: Break[]; - - /** - * Typically the url of the media. - */ - contentId: string; - - /** - * The content MIME type. - */ - contentType: string; - - /** - * Optional media url; to allow using contentId for real id. If contentUrl - * is provided; it will be used as media url; otherwise the contentId will - * be used as the media url. - */ - contentUrl?: string; - - /** - * Application-specific media information. - */ - customData?: any; - - /** - * The media duration. - */ - duration?: number; - - /** - * Optional Media entity; provide Google Assistant deep link. - */ - entity?: string; - - /** - * The format of the HLS media segment. - */ - hlsSegmentFormat: HlsSegmentFormat; - - /** - * The media metadata. - */ - metadata: MediaMetadata; - - /** - * The stream type. - */ - streamType: StreamType; - - /** - * The style of text track. - */ - textTrackStyle: TextTrackStyle; - - /** - * The media tracks. - */ - tracks: Track[]; - } - - /** - * Media event LOAD request data. - */ - interface LoadRequestData extends RequestData { - /** - * Array of trackIds that are active. If the array is not provided; the - * default tracks will be active. - */ - activeTrackIds: number[]; - - /** - * If the autoplay parameter is specified; the media player will begin - * playing the content when it is loaded. Even if autoplay is not - * specified;the media player implementation may choose to begin playback - * immediately. - */ - autoplay?: boolean; - - /** - * Optional user credentials. - */ - credentials?: string; - - /** - * Optional credentials type. The type 'cloud' is a reserved type used by - * load requests that were originated by voice assistant commands. - */ - credentialsType?: string; - - /** - * Seconds since beginning of content. If the content is live content; - * and currentTime is not specified; the stream will start at the live position. - */ - currentTime?: number; - - /** - * If the autoplay parameter is specified; the media player will begin playing - * the content when it is loaded. Even if autoplay is not specified; the media - * player implementation may choose to begin playback immediately. - */ - media: MediaInformation; - - /** - * The media playback rate. - */ - playbackRate?: number; - - /** - * Queue data. - */ - queueData: QueueData; - } - - /** - * LoadByEntity request data. - */ - interface LoadByEntityRequestData { - /** - * Content entity information; typically represented by a stringified JSON object - */ - entity: string; - - /** - * Shuffle the items to play. - */ - shuffle?: boolean; - - /** - * Optional request source. It contain the assistent query that initiate the request. - */ - source?: string; - } - - /** - * Provides live seekable range with start and end time in seconds and two more - * attributes. - */ - class LiveSeekableRange { - constructor( - start?: number, - end?: number, - isMovingWindow?: boolean, - isLiveDone?: boolean - ); - - /** - * A boolean value indicates whether a live stream is ended. If it is done; - * the end of live seekable range should stop updating. - */ - isLiveDone?: boolean; - - /** - * A boolean value indicates whether the live seekable range is a moving window. - * If false; it will be either a expanding range or a fixed range meaning live - * has ended. - */ - isMovingWindow?: boolean; - } - - /** - * Represents a data message containing item information for each requested ids. - */ - interface ItemsInfo { - /** - * List of changed itemIds. - */ - items: QueueItem[]; - - /** - * The corresponding request id. - */ - requestId?: number; - - type: MessageType; - } - - /** - * An image that describes a receiver application or media item. - * This could be an application icon; cover art; or a thumbnail. - */ - class Image { - constructor(url: string); - - /** - * The height of the image. - */ - height?: number; - - /** - * the URL to the image - */ - url: string; - - /** - * The width of the image - */ - width?: number; - } - /** Media event GET_STATUS request data. */ - interface GetStatusRequestData extends RequestData { - /** - * The options of a GET_STATUS request. - */ - options: GetStatusOptions; - } - - /** - * Get items info request data. - */ - class GetItemsInfoRequestData extends RequestData { - constructor(itemIds: number[]); - - /** - * List of item ids to be requested. - */ - itemIds: number[]; - } - /** - * A generic media description. - */ - interface GenericMediaMetadata extends MediaMetadata { - /** - * Content images. Examples would include cover art or a thumbnail of the - * currently playing media. - */ - images: Image[]; - - /** - * ISO 8601 date and/or time when the content was released; e.g. 2014-02-10. - */ - releaseDate?: string; - - /** - * @deprecated - use @see{@link releaseDate} instead - */ - releaseYear?: number; - - /** - * Content subtitle. - */ - subtitle?: string; - - /** - * Content title. - */ - title?: string; - } - - /** - * Focus state change message. - */ - interface FocusStateRequestData { - /** - * The focus state of the app. - */ - state: FocusState; - } - - /** Fetch items request data. */ - class FetchItemsRequestData extends RequestData { - constructor(itemId: number, nextCount: number, prevCount: number); - - /** - * ID of the reference media item for fetching more items. - */ - itemId: number; - - /** - * Number of items after the reference item to be fetched. - */ - nextCount: number; - - /** - * Number of items before the reference item to be fetched. - */ - prevCount: number; - } - - /** - * Extended media status information - */ - class ExtendedMediaStatus { - constructor( - playerState: MediaInformation, - opt_media?: MediaInformation - ); - - media: MediaInformation; - - playerState: ExtendedPlayerState; - } - - /** Event data for @see{@link EventType.ERROR} event. */ - class ErrorEvent extends Event { - constructor(detailedErrorCode?: DetailedErrorCode, error?: any); - - /** - * An error code representing the cause of the error. - */ - detailedErrorCode?: DetailedErrorCode; - - /** - * The error object. - * This could be an Error object (e.g.; if an Error was thrown in an event handler) - * or an object with error information (e.g.; if the receiver received an invalid - * command). - */ - error?: any; - } - - class ErrorData { - constructor(type: ErrorType); - - /** - * Application-specific data for this request. - * It enables the sender and receiver to easily extend the media protocol - * without having to use a new namespace with custom messages. - */ - customData?: any; - - /** - * Id of the request; used to correlate request/response. - */ - requestId?: number; - } - - /** Media event EDIT_TRACKS_INFO request data. */ - interface EditTracksInfoRequestData extends RequestData { - /** - * Array of the Track trackIds that should be active. - * If it is not provided; the active tracks will not change. - * If the array is empty; no track will be active. - */ - activeTrackIds?: number[]; - - /** - * Flag to enable or disable text tracks. - * If false it will disable all text tracks; - * if true it will enable the first text track; or the previous active text tracks. - * This flag is ignored if activeTrackIds or language is provided. - */ - enableTextTracks?: boolean; - - /** - * Indicates that the provided language was not explicit user request; but rather - * inferred from used language in voice query. - * It allows receiver apps to use user saved preference instead of spoken language. - */ - isSuggestedLanguage?: boolean; - - /** - * Language for the tracks that should be active. The language field will take - * precedence over activeTrackIds if both are specified. - */ - language?: string; - - textTrackStyle?: TextTrackStyle; - } - - /** - * Media event EDIT_AUDIO_TRACKS request data. If language is not provided; - * the default audio track for the media will be enabled. - */ - interface EditAudioTracksRequestData extends RequestData { - /** - * Indicates that the provided language was not explicit user request; - * but rather inferred from used language in voice query. - * It allows receiver apps to use user saved preference instead of spoken language. - */ - isSuggestedLanguage?: boolean; - - language?: string; - } - - /** DisplayStatus request data. */ - interface DisplayStatusRequestData { - /** - * Optional request source. It contain the assistent query that initiate the request. - */ - source: string; - } - - /** CustomCommand request data. */ - interface CustomCommandRequestData { - /** - * Custom Data; typically represented by a stringified JSON object. - */ - data: string; - - /** - * Optional request source. It contain the assistent query that initiate the request. - */ - source: string; - } - - class BreakStatus { - constructor(currentBreakTime: number, currentBreakClipTime: number); - - /** - * Id of current break clip. - */ - breakClipId: string; - - /** - * Id of current break. - */ - breakId: string; - - /** - * Time in sec elapsed after current break clip starts. - */ - currentBreakClipTime: number; - - /** - * Time in sec elapsed after current break starts. - */ - currentBreakTime: number; - - /** - * The time in sec when this break clip becomes skippable. - * 5 means that end user can skip this break clip after 5 seconds. - * If this field is not defined; it means that current break clip is not skippable. - */ - whenSkippable: number; - } - - /** - * Represents break clip (e.g. a clip of ad during ad break) - */ - class BreakClip { - constructor(id: string); - - /** - * Url of page that sender will display; when end user clicks link on sender UI; while receiver is playing this clip. - */ - clickThroughUrl?: string; - /** - * Typically the url of the break media (playing on the receiver). - */ - contentId?: string; - /** - * The content MIME type. - */ - contentType?: string; - /** - * Optional break media url; to allow using contentId for real id. - * If contentUrl is provided; it will be used as media url; - * otherwise the contentId will be used as the media url. - */ - contentUrl?: string; - /** - * Application-specific break clip data. - */ - customData?: any; - /** - * Duration of break clip in sec. - */ - duration?: number; - /** - * The format of the HLS media segment. - */ - hlsSegmentFormat?: HlsSegmentFormat; - /** - * Unique id of break clip. - */ - id: string; - /** - * Url of content that sender will display while receiver is playing this clip. - */ - posterUrl?: string; - /** - * Title of break clip. Sender might display this on its screen; if provided. - */ - title?: string; - /** - * VAST ad request configuration. Used if contentId or contentUrl is not provided. - */ - vastAdsRequest?: VastAdsRequest; - /** - * The time in sec when this break clip becomes skippable. - * 5 means that end user can skip this break clip after 5 seconds. - * If this field is not defined; it means that current break clip is not skippable. - */ - whenSkippable?: number; - } - - /** Represents break (e.g. ad break) included in main video. */ - class Break { - constructor(id: string, breakClipIds: string[], position: number); - /** - * List of ids of break clip that this break includes. - */ - breakClipIds: string[]; - /** - * Duration of break in sec. - */ - duration?: number; - /** - * Unique id of break. - */ - id: string; - /** - * If true; indicates this is embedded break in main stream. - */ - - isEmbedded?: boolean; - /** - * Whether break is watched. - * Sender can change color of progress bar marker corresponding to this break once - * this field changes from false to true; - * denoting that the end-user already watched this break. - */ - isWatched: boolean; - - /** - * Where the break is located inside main video. -1 represents the end of main video. - */ - position: number; - } +export as namespace messages +export type UserAction = + | "LIKE" + | "DISLIKE" + | "FOLLOW" + | "UNFOLLOW" + | "FLAG" + | "SKIP_AD"; + +export type UserActionContext = + | "UNKNOWN_CONTEXT" + | "ALBUM" + | "ARTIST" + | "PLAYLIST" + | "EPISODE" + | "SERIES" + | "MOVIE" + | "CHANNEL" + | "TEAM" + | "PLAYER" + | "COACH"; + +export type TextTrackType = + | "SUBTITLES" + | "CAPTIONS" + | "DESCRIPTIONS" + | "CHAPTERS" + | "METADATA"; + +export type TextTrackWindowType = "NONE" | "NORMAL" | "ROUNDED_CORNERS"; + +export type TrackType = "TEXT" | "AUDIO" | "VIDEO"; + +export type TextTrackFontGenericFamily = + | "SANS_SERIF" + | "MONOSPACED_SANS_SERIF" + | "SERIF" + | "MONOSPACED_SERIF" + | "CASUAL" + | "CURSIVE" + | "SMALL_CAPITALS"; + +export type TextTrackFontStyle = "NORMAL" | "BOLD" | "BOLD_ITALIC" | "ITALIC"; + +export type TextTrackEdgeType = + | "NONE" + | "OUTLINE" + | "DROP_SHADOW" + | "RAISED" + | "DEPRESSED"; + +export type Command = + | "PAUSE" + | "SEEK" + | "STREAM_VOLUME" + | "STREAM_MUTE" + | "ALL_BASIC_MEDIA" + | "QUEUE_NEXT" + | "QUEUE_PREV" + | "QUEUE_SHUFFLE" + | "SKIP_AD"; + +export type SeekResumeState = "PLAYBACK_START" | "PLAYBACK_PAUSE"; + +export type StreamingProtocolType = + | "UNKNOWN" + | "MPEG_DASH" + | "HLS" + | "SMOOTH_STREAMING"; + +export type StreamType = "BUFFERED" | "LIVE" | "NONE"; + +export type FocusState = "IN_FOCUS" | "NOT_IN_FOCUS"; + +export type ExtendedPlayerState = "LOADING"; + +export type ErrorType = + | "INVALID_PLAYER_STATE" + | "LOAD_FAILED" + | "LOAD_CANCELLED" + | "INVALID_REQUEST" + | "ERROR"; + +export type ErrorReason = + | "INVALID_COMMAND" + | "INVALID_PARAMS" + | "INVALID_MEDIA_SESSION_ID" + | "SKIP_LIMIT_REACHED" + | "NOT_SUPPORTED" + | "LANGUAGE_NOT_SUPPORTED" + | "END_OF_QUEUE" + | "APP_ERROR" + | "AUTHENTICATION_EXPIRED" + | "PREMIUM_ACCOUNT_REQUIRED" + | "CONCURRENT_STREAM_LIMIT" + | "PARENTAL_CONTROL_RESTRICTED" + | "NOT_AVAILABLE_IN_REGION" + | "CONTENT_ALREADY_PLAYING" + | "INVALID_REQUEST" + | "GENERIC_LOAD_ERROR"; + +export type RepeatMode = + | "REPEAT_OFF" + | "REPEAT_ALL" + | "REPEAT_SINGLE" + | "REPEAT_ALL_AND_SHUFFLE"; + +export type IdleReason = "CANCELLED" | "INTERRUPTED" | "FINISHED" | "ERROR"; + +export type HlsSegmentFormat = "AAC" | "AC3" | "MP3" | "TS" | "TS_AAC"; + +export type HdrType = "SDR" | "HDR" | "DV"; + +export type PlayStringId = + | "FREE_TRIAL_ABOUT_TO_EXPIRE" + | "SUBSCRIPTION_ABOUT_TO_EXPIRE" + | "STREAM_HIJACKED"; + +export type GetStatusOptions = "NO_METADATA" | "NO_QUEUE_ITEMS"; + +export type MessageType = + | "MEDIA_STATUS" + | "CLOUD_STATUS" + | "QUEUE_CHANGE" + | "QUEUE_ITEMS" + | "QUEUE_ITEM_IDS" + | "GET_STATUS" + | "LOAD" + | "PAUSE" + | "STOP" + | "PLAY" + | "SKIP_AD" + | "PLAY_AGAIN" + | "SEEK" + | "SET_PLAYBACK_RATE" + | "SET_VOLUME" + | "EDIT_TRACKS_INFO" + | "EDIT_AUDIO_TRACKS" + | "PRECACHE" + | "PRELOAD" + | "QUEUE_LOAD" + | "QUEUE_INSERT" + | "QUEUE_UPDATE" + | "QUEUE_REMOVE" + | "QUEUE_REORDER" + | "QUEUE_NEXT" + | "QUEUE_PREV" + | "QUEUE_GET_ITEM_RANGE" + | "QUEUE_GET_ITEMS" + | "QUEUE_GET_ITEM_IDS" + | "QUEUE_SHUFFLE" + | "SET_CREDENTIALS" + | "LOAD_BY_ENTITY" + | "USER_ACTION" + | "DISPLAY_STATUS" + | "FOCUS_STATE" + | "CUSTOM_COMMAND"; + +export type PlayerState = "IDLE" | "PLAYING" | "PAUSED" | "BUFFERING"; + +export type QueueChangeType = + | "INSERT" + | "REMOVE" + | "ITEMS_CHANGE" + | "UPDATE" + | "NO_CHANGE"; + +export type QueueType = + | "ALBUM" + | "PLAYLIST" + | "AUDIOBOOK" + | "RADIO_STATION" + | "PODCAST_SERIES" + | "TV_SERIES" + | "VIDEO_PLAYLIST" + | "LIVE_TV" + | "MOVIE"; + +export type MetadataType = + | "GENERIC" + | "MOVIE" + | "TV_SHOW" + | "MUSIC_TRACK" + | "PHOTO"; + +/** + * RefreshCredentials request data. + */ +export interface RefreshCredentialsRequestData { + [key: string]: any; +} + +/** + * Media event SET_VOLUME request data. + */ +export interface VolumeRequestData extends RequestData { + /** + * The media stream volume + */ + volume?: Volume; +} + +/** + * Represents the volume of a media session stream. + */ +export interface Volume { + /** + * Value from 0 to 1 that represents the current stream volume level. + */ + level?: number; + + /** + * Whether the stream is muted. + */ + muted?: boolean; +} + +/** + * Video information such as video resolution and High Dynamic Range (HDR). + */ +export class VideoInformation { + constructor(width: number, height: number, hdrType: HdrType); + + width: number; + + height: number; + + hdrType: HdrType; +} + +/** + * VAST ad request configuration. + */ +export interface VastAdsRequest { + /** + * Specifies a VAST document to be used as the ads response instead of making a + * request via an ad tag url. + * This can be useful for debugging and other situations where a VAST response is + * already available. + */ + adsResponse?: string; + + /** + * URL for VAST file. + */ + adTagUrl?: string; +} + +/** + * UserAction request data. + */ +export interface UserActionRequestData { + /** + * Optional request source. + * It contain the assistent query that initiate the request. + */ + source?: string; + + /** + * User action to be handled by the application. + */ + userAction?: UserAction; + + /** + * Optional context information for the user action. + */ + userActionContext?: UserActionContext; +} + +/** + * A TV episode media description. + */ +export interface TvShowMediaMetadata { + /** + * TV episode number. A positive integer. + */ + episode?: number; + + /** + * @deprecated use episode instead + */ + episodeNumber?: number; + + /** + * @deprecated use episode instead + */ + episodeTitle?: string; + + /** + * Content images. Examples would include cover art or a thumbnail of + * the currently playing media. + */ + images?: Image[]; + + /** + * ISO 8601 date when the episode originally aired; e.g. 2014-02-10. + */ + originalAirdate?: string; + + /** + * @deprecated use originalAirdate instead. + */ + releaseYear?: number; + + /** + * TV episode season. A positive integer. + */ + season?: number; + + /** + * @deprecated use season instead. + */ + seasonNumber?: number; + + /** + * TV series title. + */ + seriesTitle?: string; + + /** + * TV episode title. + */ + title?: string; +} +/** + * Describes track metadata information. + */ +export class Track { + constructor(trackId: number, trackType: TrackType); + + /** + * Custom data set by the receiver application. + */ + customData?: string; + + /** + * Language tag as per RFC 5646 (If subtype is “SUBTITLES” it is mandatory). + */ + language?: string; + + /** + * A descriptive; human readable name for the track. For example "Spanish". + */ + name?: string; + + /** + * For text tracks; the type of text track. + */ + subtype?: string; + + /** + * It can be the url of the track or any other identifier that allows the receiver + * to find the content (when the track is not inband or included in the manifest). + * For example it can be the url of a vtt file. + */ + trackContentId?: string; + + /** + * It represents the MIME type of the track content. For example if the track + * is a vtt file it will be ‘text/vtt’. This field is needed for out of band tracks; + * so it is usually provided if a trackContentId has also been provided. + * It is not mandatory if the receiver has a way to identify the content from + * the trackContentId; but recommended. + * The track content type; if provided; must be consistent with the track type. + */ + trackContentType?: string; + + /** + * Unique identifier of the track within the context of a MediaInformation object. + */ + trackId?: number; + + /** + * The type of track. + */ + type: TrackType; +} +/** + * Describes style information for a text track. + */ +export interface TextTrackStyle { + /** + * The background 32 bit RGBA color. The alpha channel should be used for transparent backgrounds. + */ + backgroundColor?: string; + + /** + * Custom data set by the receiver application. + */ + customData?: any; + + /** + * RGBA color for the edge; this value will be ignored if edgeType is NONE. + */ + edgeColor?: string; + + edgeType?: TextTrackEdgeType; + + /** + * If the font is not available in the receiver the fontGenericFamily will be used. + */ + fontFamily?: string; + + /** + * The text track generic family. + */ + fontGenericFamily?: TextTrackFontGenericFamily; + + /** + * The font scaling factor for the text track (the default is 1). + */ + fontScale?: number; + + /** + * The text track font style. + */ + fontStyle?: TextTrackFontStyle; + + /** + * The foreground 32 bit RGBA color. + */ + foregroundColor?: string; + + /** + * 32 bit RGBA color for the window. This value will be ignored if windowType is NONE. + */ + windowColor?: string; + + /** + * Rounded corner radius absolute value in pixels (px). This value will be ignored + * if windowType is not ROUNDED_CORNERS. + */ + windowRoundedCornerRadius?: number; + + /** + * The window concept is defined in CEA-608 and CEA-708. In WebVTT is called a region. + */ + windowType?: TextTrackWindowType; +} + +/** + * Media event playback rate request data. + */ +export interface SetPlaybackRateRequestData extends RequestData { + /** + * New playback rate (>0). + */ + playbackRate?: number; + + /** + * New playback rate relative to current playback rate. + * New rate will be the result of multiplying the current rate with the value. + * For example a value of 1.1 will increase rate by 10%. + * (Only used if the playbackRate value is not provided). + */ + relativePlaybackRate?: number; +} + +/** + * SetCredentials request data. + */ +export interface SetCredentialsRequestData { + /** + * Credentials to use by receiver. + */ + credentials?: string; + + /** + * If it is a response for refresh credentials; it will indicate the request id + * of the refresh credentials request. + */ + forRequestId?: number; + + /** + * Optional request source. It contain the assistent query that initiate the request. + */ + source?: string; +} + +/** + * Media event SEEK request data. + */ +export interface SeekRequestData extends RequestData { + /** + * Seconds since beginning of content. + */ + currentTime?: number; + + /** + * Seconds relative to the current playback position. If this field is defined; + * the currentTime field will be ignored. + */ + relativeTime?: number; + + /** + * The playback state after a SEEK request. + */ + resumeState?: SeekResumeState; +} + +/** + * Provides seekable range in seconds. + */ +export class SeekableRange { + constructor(start?: number, end?: number); + + /** + * End of the seekable range in seconds. + */ + end?: number; + + /** + * Start of the seekable range in seconds. + */ + start?: number; +} + +/** + * Media event request data. + */ +export class RequestData { + constructor(type: MessageType); + + /** + * Application-specific data for this request. + * It enables the sender and receiver to easily extend the media protocol + * without having to use a new namespace with custom messages. + */ + customData?: any; + + /** + * Id of the media session that the request applies to. + */ + mediaSessionId?: number; + + /** + * Id of the request; used to correlate request/response. + */ + requestId: number; +} + +/** + * Media event UPDATE queue request data. + */ +export interface QueueUpdateRequestData { + /** + * ID of the current media Item after the deletion + * (if not provided; the currentItem value will be the same as before the deletion; + * if it does not exist because it has been deleted; the currentItem will point to + * the next logical item in the list). + */ + currentItemId?: number; + + /** + * Seconds since the beginning of content to start playback of the current item. + * If provided; this value will take precedence over the startTime value provided + * at the QueueItem level but only the first time the item is played. + * This is to cover the common case where the user jumps to the middle of an + * item so the currentTime does not apply to the item permanently like the + * QueueItem startTime does. It avoids having to reset the startTime dynamically + * (that may not be possible if the phone has gone to sleep). + */ + currentTime?: number; + + /** + * List of queue items to be updated. No reordering will happen; the items will + * retain the existing order. + */ + items?: QueueItem[]; + + /** + * Skip/Go back number of items with respect to the position of currentItem + * (it can be negative). If it is out of boundaries; the currentItem will be the + * next logical item in the queue wrapping around the boundaries. + * The new currentItem position will follow the rules of the queue repeat behavior. + */ + jump?: number; + + /** + * Behavior of the queue when all items have been played. + */ + repeatMode?: RepeatMode; + + /** + * Shuffle the queue items when the update is processed. + * After the queue items are shuffled; the item at the currentItem position will + * be loaded. + */ + shuffle?: boolean; +} + +/** + * Media event queue REORDER request data. + */ +export class QueueReorderRequestData extends RequestData { + constructor(itemIds: number[]); + + /** + * ID of the current media Item after the deletion (if not provided; + * the currentItem value will be the same as before the deletion; + * if it does not exist because it has been deleted; + * the currentItem will point to the next logical item in the list). + */ + currentItemId?: number; + + /** + * Seconds since the beginning of content to start playback of the current item. + * If provided; this value will take precedence over the startTime value provided + * at the QueueItem level but only the first time the item is played. + * This is to cover the common case where the user jumps to the middle of an + * item so the currentTime does not apply to the item permanently like + * the QueueItem startTime does. It avoids having to reset the startTime dynamically + * (that may not be possible if the phone has gone to sleep). + */ + currentTime?: number; + + /** + * ID of the item that will be located immediately after the reordered list. + * If the ID is not found or it is not provided; + * the reordered list will be appended at the end of the existing list. + */ + insertBefore?: number; + + /** + * IDs of the items to be reordered; in the new order. + * Items not provided will keep their existing order. + * The provided list will be inserted at the position determined by insertBefore. + * For example: + * If insertBefore is not specified Existing queue: “A”;”D”;”G”;”H”;”B”;”E” itemIds: + * “D”;”H”;”B” New Order: “A”;”G”;”E”;“D”;”H”;”B” + * If insertBefore is “A” Existing queue: “A”;”D”;”G”;”H”;”B” itemIds: + * “D”;”H”;”B” New Order: “D”;”H”;”B”;“A”;”G”;”E” + * If insertBefore is “G” Existing queue: “A”;”D”;”G”;”H”;”B” itemIds: + * “D”;”H”;”B” New Order: “A”;“D”;”H”;”B”;”G”;”E” + */ + itemIds: number[]; +} + +/** + * Media event queue REMOVE request data. + */ +export class QueueRemoveRequestData extends RequestData { + constructor(itemIds: number[]); + + /** + * ID of the current media Item after the deletion + * (if not provided; the currentItem value will be the same as before the deletion; + * if it does not exist because it has been deleted; + * the currentItem will point to the next logical item in the list). + */ + currentItemId?: number; + + /** + * Seconds since the beginning of content to start playback of the current item. + * If provided; this value will take precedence over the startTime value provided + * at the QueueItem level but only the first time the item is played. + * This is to cover the common case where the user jumps to the middle of an + * item so the currentTime does not apply to the item permanently like the + * QueueItem startTime does. It avoids having to reset the startTime dynamically + * (that may not be possible if the phone has gone to sleep). + */ + currentTime?: number; + + /** + * IDs of queue items to be deleted. + */ + itemIds?: number[]; +} +/** + * Media event queue LOAD request data. + */ +export class QueueLoadRequestData extends RequestData { + constructor(items: QueueItem[]); + + /** + * Seconds (since the beginning of content) to start playback of the first item to + * be played. If provided; this value will take precedence over the + * startTime value provided at the QueueItem level but only the first + * time the item is played. This is to cover the common case where the user + * casts the item that was playing locally so the currentTime does not apply + * to the item permanently like the QueueItem startTime does. + * It avoids having to reset the startTime dynamically + * (that may not be possible if the phone has gone to sleep). + */ + currentTime?: number; + + /** + * Behavior of the queue when all items have been played. + */ + items: QueueItem[]; + + /** + * Id of the request; used to correlate request/response. + */ + repeatMode?: RepeatMode; + + /** + * The index of the item in the items array that must be the first currentItem + * (the item that will be played first). Note this is the index of the array + * (starts at 0) and not the itemId (as it is not known until the queue is created). + * If repeatMode is REPEAT_OFF playback will end when the last item in the array is + * played (elements before the startIndex will not be played). + * This may be useful for continuation scenarios where the user was already + * using the sender app and in the middle decides to cast. + * In this way the sender app does not need to map between the local and remote queue + * positions or saves one extra QUEUE_UPDATE request. + */ + startIndex?: number; +} + +/** + * Queue item information. Application developers may need to create a QueueItem to + * insert a queue element using InsertQueueItems. In this case they should not + * provide an itemId (as the actual itemId will be assigned when the item is inserted + * in the queue). This prevents ID collisions with items added from a sender app. + */ +export class QueueItem { + constructor(opt_itemId?: number); + + /** + * Array of Track trackIds that are active. If the array is not provided; + * the default tracks will be active. + */ + activeTrackIds?: number[]; + + /** + * If the autoplay parameter is not specified or is true; the media player + * will begin playing the element in the queue when the item becomes the currentItem. + */ + autoplay?: boolean; + + /** + * The application can define any extra queue item information needed. + */ + customData?: any; + + /** + * Unique identifier of the item in the queue. + * The attribute is optional because for LOAD or INSERT should not be provided + * (as it will be assigned by the receiver when an item is first created/inserted). + */ + itemId?: number; + + /** + * Metadata (including contentId) of the playlist element. + */ + media?: MediaInformation; + + /** + * Playback duration of the item; if it is larger than the actual duration - + * startTime it will be ignored (default behavior). + * It can be negative; in such case the duration will be the actual asset + * duration minus the duration provided. + * It can be used for photo slideshows to control the duration the item should + * be presented or for live events to control the duration that the program + * should be played. It may be useful for autoplay scenarios to avoid displaying all + * the credits after an episode has ended. + */ + playbackDuration?: number; + + /** + * This parameter is a hint for the receiver to preload this media + * item before it is played. It allows for a smooth transition between items + * played from the queue. The time is expressed in seconds; relative to + * the beginning of this item playback (usually the end of the previous item playback). + * Only positive values are valid. For example; if the value is 10 seconds; this item + * will be preloaded 10 seconds before the previous item has finished. + * The receiver will try to honor this value but will not guarantee it; + * for example if the value is larger than the previous item duration the + * receiver may just preload this item shortly after the previous item has started playing + * (there will never be two items being preloaded in parallel). + * Also; if an item is inserted in the queue just after the currentItem and the time to preload is higher than the + * time left on the currentItem; the preload will just happen as soon as possible. + */ + preloadTime?: number; + + /** + * Seconds since beginning of content. If the content is live content; + * and startTime is not specified; the stream will start at the live position. + */ + startTime?: number; +} + +/** + * Media event queue INSERT request data. + */ +export class QueueInsertRequestData extends RequestData { + constructor(items: QueueItem[]); + + /** + * ID of the current media Item after the insertion (if not provided; + * the currentItem value will be the same as before the insertion). + */ + currentItemId?: number; + + /** + * Index (relative to the items array; starting with 0) of the new current media Item. + * For inserted items we use the index (similar to startIndex in QUEUE_LOAD) and not + * currentItemId; because the itemId is unknown until the items are inserted. + * If not provided; the currentItem value will be the same as before the insertion + * (unless currentItemId is provided). This param allows to make atomic the common use + * case of insert and play an item. + */ + currentItemIndex?: number; + + /** + * Seconds since the beginning of content to start playback of the current item. + * If provided; this value will take precedence over the startTime value provided + * at the QueueItem level but only the first time the item is played. + * This is to cover the common case where the user jumps to the middle of an + * item so the currentTime does not apply to the item permanently like the + * QueueItem startTime does. It avoids having to reset the startTime dynamically + * (that may not be possible if the phone has gone to sleep). + */ + currentTime?: number; + + /** + * ID of the item that will be located immediately after the inserted list. + * If the ID is not found or it is not provided; the list will be appended at + * the end of the existing list. + */ + insertBefore?: number; + + /** + * List of queue items. The itemId field of the items should be empty. + * It is sorted (first element will be played first). + */ + items: QueueItem[]; +} + +/** + * Represents a data message containing the full list of queue ids. + */ +export interface QueueIds { + /** + * List of queue item ids. + */ + itemIds?: number[]; + + /** + * The corresponding request id. + */ + requestId?: number; + + type: MessageType; +} + +/** + * Queue data as part of the LOAD request. + */ +export class QueueData { + constructor( + id?: string, + name?: string, + description?: string, + repeatMode?: RepeatMode, + items?: QueueItem[], + startIndex?: number, + startTime?: number + ); + + /** + * Description of the queue. + */ + description?: string; + + /** + * Optional Queue entity id; provide Google Assistant deep link. + */ + entity?: string; + + /** + * Id of the queue. + */ + id?: string; + + /** + * Array of queue items. It is sorted (first element will be played first). + */ + items?: QueueItem[]; + + /** + * Name of the queue. + */ + name?: string; + + /** + * Queue type; e.g. album; playlist; radio station; tv series; etc. + */ + queueType?: QueueType; + + /** + * Continuous playback behavior of the queue. + */ + repeatMode?: RepeatMode; + + /** + * The index of the item in the queue that should be used to start playback first. + */ + startIndex?: number; + + /** + * Seconds (since the beginning of content) to start playback of the first item. + */ + startTime?: number; +} + +/** + * Represents a queue change message; such as insert; remove; and update. + */ +export interface QueueChange { + /** + * The actual queue change type. + */ + changeType?: QueueChangeType; + + /** + * The id to insert the list of itemIds before. + */ + insertBefore?: number; + + /** + * List of changed itemIds. + */ + itemIds?: number[]; + + /** + * The corresponding request id. + */ + requestId?: number; + + /** + * The queue change sequence ID. Used to coordinate state sync between various + * senders and the receiver. + */ + sequenceNumber?: number; + + type: MessageType; +} + +/** + * Media event PRELOAD request data. + */ +export class PreloadRequestData implements LoadRequestData { + /** + * Array of trackIds that are active. If the array is not provided; + * the default tracks will be active. + */ + activeTrackIds: number[]; + /** + * If the autoplay parameter is specified; the media player will begin playing + * the content when it is loaded. Even if autoplay is not specified;the media player + * implementation may choose to begin playback immediately. + */ + autoplay?: boolean; + /** + * Optional user credentials. + */ + credentials?: string; + /** + * Optional credentials type. The type 'cloud' is a reserved type used by load + * requests that were originated by voice assistant commands. + */ + credentialsType?: string; + /** + * Seconds since beginning of content. If the content is live content; + * and currentTime is not specified; the stream will start at the live position. + */ + currentTime?: number; + /** + * If the autoplay parameter is specified; the media player will begin playing + * the content when it is loaded. Even if autoplay is not specified; the media + * player implementation may choose to begin playback immediately. + */ + media: MediaInformation; + /** + * The media playback rate. + */ + playbackRate?: number; + /** + * Queue data. + */ + queueData: QueueData; + /** + * Application-specific data for this request. + * It enables the sender and receiver to easily extend the media protocol + * without having to use a new namespace with custom messages. + */ + customData?: any; + /** + * Id of the media session that the request applies to. + */ + mediaSessionId?: number; + /** + * Id of the request; used to correlate request/response. + */ + requestId: number; + constructor(itemId: number); + + /** + * The ID of the queue item. + */ + itemId: number; +} + +/** + * Media event PRECACHE request data. (Some fields of the load request; + * like autoplay and queueData; are ignored). + */ +export class PrecacheRequestData implements LoadRequestData { + /** + * Array of trackIds that are active. If the array is not provided; + * the default tracks will be active. + */ + activeTrackIds: number[]; + /** + * If the autoplay parameter is specified; the media player will begin playing + * the content when it is loaded. Even if autoplay is not specified;the media player + * implementation may choose to begin playback immediately. + */ + autoplay?: boolean; + /** + * Optional user credentials. + */ + credentials?: string; + /** + * Optional credentials type. The type 'cloud' is a reserved type used by load + * requests that were originated by voice assistant commands. + */ + credentialsType?: string; + /** + * Seconds since beginning of content. If the content is live content; and + * currentTime is not specified; the stream will start at the live position. + */ + currentTime?: number; + /** + * If the autoplay parameter is specified; the media player will begin playing + * the content when it is loaded. Even if autoplay is not specified; + * the media player implementation may choose to begin playback immediately. + */ + media: MediaInformation; + /** + * The media playback rate. + */ + playbackRate?: number; + /** + * Queue data. + */ + queueData: QueueData; + /** + * Application-specific data for this request. + * It enables the sender and receiver to easily extend the media protocol + * without having to use a new namespace with custom messages. + */ + customData?: any; + /** + * Id of the media session that the request applies to. + */ + mediaSessionId?: number; + /** + * Id of the request; used to correlate request/response. + */ + requestId: number; + constructor(data?: string); + + /** + * Application precache data. + */ + precacheData?: string; +} + +/** + * PlayString request data. + */ +export class PlayStringRequestData { + constructor(stringId: PlayStringId, opt_arguments?: string[]); + + /** + * An optional array of string values to be filled into the text. + */ + arguments?: string[]; + + /** + * An identifier for the text to be played back. + */ + stringId: PlayStringId; +} + +/** + * A photo media description. + */ +export interface PhotoMediaMetadata { + /** + * Name of the photographer. + */ + artist?: string; + + /** + * ISO 8601 date and time the photo was taken; e.g. 2014-02-10T15:47:00Z. + */ + creationDateTime?: string; + + /** + * Photo height; in pixels. + */ + height?: number; + + /** + * Images associated with the content. Examples would include a photo thumbnail. + */ + images: Image[]; + + /** + * Latitude. + */ + latitude?: number; + + /** + * Location where the photo was taken. For example; "Seattle; Washington; USA". + */ + location?: string; + + /** + * Longitude. + */ + longitude?: number; + + /** + * Photo title. + */ + title?: string; + + /** + * Photo width; in pixels. + */ + width?: number; +} + +/** + * A music track media description. + */ +export interface MusicTrackMediaMetadata { + /** + * Album artist name. + */ + albumArtist?: string; + + /** + * Album name. + */ + albumName?: string; + + /** + * Track artist name. + */ + artist?: string; + + /** + * @deprecated: use @see{@link artist} instead + */ + artistName: string; + + /** + * Track composer name. + */ + composer?: string; + + /** + * Disc number. A positive integer. + */ + discNumber?: number; + + /** + * Content images. Examples would include cover art or a thumbnail of the + * currently playing media. + */ + images: Image[]; + + /** + * ISO 8601 date when the track was released; e.g. 2014-02-10. + */ + releaseDate?: string; + + /** + * @deprecated: Use @see{@link releaseDate} instead + */ + releaseYear?: string; + + /** + * Track name. + */ + songName?: string; + + /** + * Track title. + */ + title?: string; + + /** + * Track number in album. A positive integer. + */ + trackNumber?: number; +} + +/** + * A movie media description. + */ +export interface MovieMediaMetadata { + /** + * Content images. Examples would include cover art or a thumbnail of the + * currently playing media. + */ + images: Image[]; + + /** + * ISO 8601 date when the movie was released; e.g. 2014-02-10. + */ + releaseDate?: string; + + /** + * @deprecated: use @see{@link releaseDate} instead + */ + releaseYear?: number; + + /** + * Movie studio. + */ + studio?: string; + + /** + * Movie subtitle. + */ + subtitle?: string; + + /** + * Movie title. + */ + title?: string; +} +/** + * Represents the status of a media session. + */ +export interface MediaStatus { + /** + * List of IDs corresponding to the active tracks. + */ + activeTrackIds: number[]; + + /** + * Status of break; if receiver is playing break. + * This field will be defined only when receiver is playing break. + */ + breakStatus: BreakStatus; + + /** + * ID of this media item (the item that originated the status change). + */ + currentItemId?: number; + + /** + * The current playback position. + */ + currentTime: number; + + /** + * Application-specific media status. + */ + customData?: any; + + /** + * Extended media status information. + */ + extendedStatus: ExtendedMediaStatus; + + /** + * If the state is IDLE; the reason the player went to IDLE state. + */ + idleReason: IdleReason; + + /** + * List of media queue items. + */ + items: QueueItem[]; + + /** + * Seekable range of a live or event stream. It uses relative media time in seconds. + * It will be undefined for VOD streams. + */ + liveSeekableRange: LiveSeekableRange; + + /** + * ID of the media Item currently loading. If there is no item being loaded; + * it will be undefined. + */ + loadingItemId?: number; + + /** + * The media information. + */ + media: MediaInformation; + + /** + * Unique id for the session. + */ + mediaSessionId: number; + + /** + * The playback rate. + */ + playbackRate: number; + + /** + * The playback state. + */ + playerState: PlayerState; + + /** + * ID of the next Item; only available if it has been preloaded. + * Media items can be preloaded and cached temporarily in memory; + * so when they are loaded later on; the process is faster + * (as the media does not have to be fetched from the network). + */ + preloadedItemId?: number; + + /** + * Queue data. + */ + queueData: QueueData; + + /** + * The behavior of the queue when all items have been played. + */ + repeatMode: RepeatMode; + + /** + * The commands supported by this player. + */ + supportedMediaCommands: number; + + type: MessageType; + + /** + * The video information. + */ + videoInfo: VideoInformation; + + /** + * The current stream volume. + */ + volume: Volume; +} +/** + * Common media metadata used as part of MediaInformation + */ +export class MediaMetadata { + constructor(type: MetadataType); + + /** + * The type of metadata + */ + metadataType: MetadataType; +} + +/** + * Represents the media information. + */ +export interface MediaInformation { + /** + * Partial list of break clips that includes current break clip that receiver + * is playing or ones that receiver will play shortly after; instead of sending + * whole list of clips. This is to avoid overflow of MediaStatus message. + */ + breakClips: BreakClip[]; + + /** + * List of breaks. + */ + breaks: Break[]; + + /** + * Typically the url of the media. + */ + contentId: string; + + /** + * The content MIME type. + */ + contentType: string; + + /** + * Optional media url; to allow using contentId for real id. If contentUrl + * is provided; it will be used as media url; otherwise the contentId will + * be used as the media url. + */ + contentUrl?: string; + + /** + * Application-specific media information. + */ + customData?: any; + + /** + * The media duration. + */ + duration?: number; + + /** + * Optional Media entity; provide Google Assistant deep link. + */ + entity?: string; + + /** + * The format of the HLS media segment. + */ + hlsSegmentFormat: HlsSegmentFormat; + + /** + * The media metadata. + */ + metadata: MediaMetadata; + + /** + * The stream type. + */ + streamType: StreamType; + + /** + * The style of text track. + */ + textTrackStyle: TextTrackStyle; + + /** + * The media tracks. + */ + tracks: Track[]; +} + +/** + * Media event LOAD request data. + */ +export interface LoadRequestData extends RequestData { + /** + * Array of trackIds that are active. If the array is not provided; the + * default tracks will be active. + */ + activeTrackIds: number[]; + + /** + * If the autoplay parameter is specified; the media player will begin + * playing the content when it is loaded. Even if autoplay is not + * specified;the media player implementation may choose to begin playback + * immediately. + */ + autoplay?: boolean; + + /** + * Optional user credentials. + */ + credentials?: string; + + /** + * Optional credentials type. The type 'cloud' is a reserved type used by + * load requests that were originated by voice assistant commands. + */ + credentialsType?: string; + + /** + * Seconds since beginning of content. If the content is live content; + * and currentTime is not specified; the stream will start at the live position. + */ + currentTime?: number; + + /** + * If the autoplay parameter is specified; the media player will begin playing + * the content when it is loaded. Even if autoplay is not specified; the media + * player implementation may choose to begin playback immediately. + */ + media: MediaInformation; + + /** + * The media playback rate. + */ + playbackRate?: number; + + /** + * Queue data. + */ + queueData: QueueData; +} + +/** + * LoadByEntity request data. + */ +export interface LoadByEntityRequestData { + /** + * Content entity information; typically represented by a stringified JSON object + */ + entity: string; + + /** + * Shuffle the items to play. + */ + shuffle?: boolean; + + /** + * Optional request source. It contain the assistent query that initiate the request. + */ + source?: string; +} + +/** + * Provides live seekable range with start and end time in seconds and two more + * attributes. + */ +export class LiveSeekableRange { + constructor( + start?: number, + end?: number, + isMovingWindow?: boolean, + isLiveDone?: boolean + ); + + /** + * A boolean value indicates whether a live stream is ended. If it is done; + * the end of live seekable range should stop updating. + */ + isLiveDone?: boolean; + + /** + * A boolean value indicates whether the live seekable range is a moving window. + * If false; it will be either a expanding range or a fixed range meaning live + * has ended. + */ + isMovingWindow?: boolean; +} + +/** + * Represents a data message containing item information for each requested ids. + */ +export interface ItemsInfo { + /** + * List of changed itemIds. + */ + items: QueueItem[]; + + /** + * The corresponding request id. + */ + requestId?: number; + + type: MessageType; +} + +/** + * An image that describes a receiver application or media item. + * This could be an application icon; cover art; or a thumbnail. + */ +export class Image { + constructor(url: string); + + /** + * The height of the image. + */ + height?: number; + + /** + * the URL to the image + */ + url: string; + + /** + * The width of the image + */ + width?: number; +} +/** Media event GET_STATUS request data. */ +export interface GetStatusRequestData extends RequestData { + /** + * The options of a GET_STATUS request. + */ + options: GetStatusOptions; +} + +/** + * Get items info request data. + */ +export class GetItemsInfoRequestData extends RequestData { + constructor(itemIds: number[]); + + /** + * List of item ids to be requested. + */ + itemIds: number[]; +} +/** + * A generic media description. + */ +export interface GenericMediaMetadata extends MediaMetadata { + /** + * Content images. Examples would include cover art or a thumbnail of the + * currently playing media. + */ + images: Image[]; + + /** + * ISO 8601 date and/or time when the content was released; e.g. 2014-02-10. + */ + releaseDate?: string; + + /** + * @deprecated - use @see{@link releaseDate} instead + */ + releaseYear?: number; + + /** + * Content subtitle. + */ + subtitle?: string; + + /** + * Content title. + */ + title?: string; +} + +/** + * Focus state change message. + */ +export interface FocusStateRequestData { + /** + * The focus state of the app. + */ + state: FocusState; +} + +/** Fetch items request data. */ +export class FetchItemsRequestData extends RequestData { + constructor(itemId: number, nextCount: number, prevCount: number); + + /** + * ID of the reference media item for fetching more items. + */ + itemId: number; + + /** + * Number of items after the reference item to be fetched. + */ + nextCount: number; + + /** + * Number of items before the reference item to be fetched. + */ + prevCount: number; +} + +/** + * Extended media status information + */ +export class ExtendedMediaStatus { + constructor( + playerState: MediaInformation, + opt_media?: MediaInformation + ); + + media: MediaInformation; + + playerState: ExtendedPlayerState; +} + +/** Event data for @see{@link EventType.ERROR} event. */ +export class ErrorEvent extends Event { + constructor(detailedErrorCode?: DetailedErrorCode, error?: any); + + /** + * An error code representing the cause of the error. + */ + detailedErrorCode?: DetailedErrorCode; + + /** + * The error object. + * This could be an Error object (e.g.; if an Error was thrown in an event handler) + * or an object with error information (e.g.; if the receiver received an invalid + * command). + */ + error?: any; +} + +export class ErrorData { + constructor(type: ErrorType); + + /** + * Application-specific data for this request. + * It enables the sender and receiver to easily extend the media protocol + * without having to use a new namespace with custom messages. + */ + customData?: any; + + /** + * Id of the request; used to correlate request/response. + */ + requestId?: number; +} + +/** Media event EDIT_TRACKS_INFO request data. */ +export interface EditTracksInfoRequestData extends RequestData { + /** + * Array of the Track trackIds that should be active. + * If it is not provided; the active tracks will not change. + * If the array is empty; no track will be active. + */ + activeTrackIds?: number[]; + + /** + * Flag to enable or disable text tracks. + * If false it will disable all text tracks; + * if true it will enable the first text track; or the previous active text tracks. + * This flag is ignored if activeTrackIds or language is provided. + */ + enableTextTracks?: boolean; + + /** + * Indicates that the provided language was not explicit user request; but rather + * inferred from used language in voice query. + * It allows receiver apps to use user saved preference instead of spoken language. + */ + isSuggestedLanguage?: boolean; + + /** + * Language for the tracks that should be active. The language field will take + * precedence over activeTrackIds if both are specified. + */ + language?: string; + + textTrackStyle?: TextTrackStyle; +} + +/** + * Media event EDIT_AUDIO_TRACKS request data. If language is not provided; + * the default audio track for the media will be enabled. + */ +export interface EditAudioTracksRequestData extends RequestData { + /** + * Indicates that the provided language was not explicit user request; + * but rather inferred from used language in voice query. + * It allows receiver apps to use user saved preference instead of spoken language. + */ + isSuggestedLanguage?: boolean; + + language?: string; +} + +/** DisplayStatus request data. */ +export interface DisplayStatusRequestData { + /** + * Optional request source. It contain the assistent query that initiate the request. + */ + source: string; +} + +/** CustomCommand request data. */ +export interface CustomCommandRequestData { + /** + * Custom Data; typically represented by a stringified JSON object. + */ + data: string; + + /** + * Optional request source. It contain the assistent query that initiate the request. + */ + source: string; +} + +export class BreakStatus { + constructor(currentBreakTime: number, currentBreakClipTime: number); + + /** + * Id of current break clip. + */ + breakClipId: string; + + /** + * Id of current break. + */ + breakId: string; + + /** + * Time in sec elapsed after current break clip starts. + */ + currentBreakClipTime: number; + + /** + * Time in sec elapsed after current break starts. + */ + currentBreakTime: number; + + /** + * The time in sec when this break clip becomes skippable. + * 5 means that end user can skip this break clip after 5 seconds. + * If this field is not defined; it means that current break clip is not skippable. + */ + whenSkippable: number; +} + +/** + * Represents break clip (e.g. a clip of ad during ad break) + */ +export class BreakClip { + constructor(id: string); + + /** + * Url of page that sender will display; when end user clicks link on sender UI; while receiver is playing this clip. + */ + clickThroughUrl?: string; + /** + * Typically the url of the break media (playing on the receiver). + */ + contentId?: string; + /** + * The content MIME type. + */ + contentType?: string; + /** + * Optional break media url; to allow using contentId for real id. + * If contentUrl is provided; it will be used as media url; + * otherwise the contentId will be used as the media url. + */ + contentUrl?: string; + /** + * Application-specific break clip data. + */ + customData?: any; + /** + * Duration of break clip in sec. + */ + duration?: number; + /** + * The format of the HLS media segment. + */ + hlsSegmentFormat?: HlsSegmentFormat; + /** + * Unique id of break clip. + */ + id: string; + /** + * Url of content that sender will display while receiver is playing this clip. + */ + posterUrl?: string; + /** + * Title of break clip. Sender might display this on its screen; if provided. + */ + title?: string; + /** + * VAST ad request configuration. Used if contentId or contentUrl is not provided. + */ + vastAdsRequest?: VastAdsRequest; + /** + * The time in sec when this break clip becomes skippable. + * 5 means that end user can skip this break clip after 5 seconds. + * If this field is not defined; it means that current break clip is not skippable. + */ + whenSkippable?: number; +} + +/** Represents break (e.g. ad break) included in main video. */ +export class Break { + constructor(id: string, breakClipIds: string[], position: number); + /** + * List of ids of break clip that this break includes. + */ + breakClipIds: string[]; + /** + * Duration of break in sec. + */ + duration?: number; + /** + * Unique id of break. + */ + id: string; + /** + * If true; indicates this is embedded break in main stream. + */ + + isEmbedded?: boolean; + /** + * Whether break is watched. + * Sender can change color of progress bar marker corresponding to this break once + * this field changes from false to true; + * denoting that the end-user already watched this break. + */ + isWatched: boolean; + + /** + * Where the break is located inside main video. -1 represents the end of main video. + */ + position: number; } diff --git a/types/chromecast-caf-receiver/cast.framework.system.d.ts b/types/chromecast-caf-receiver/cast.framework.system.d.ts index d055e252fb..1aacb05058 100644 --- a/types/chromecast-caf-receiver/cast.framework.system.d.ts +++ b/types/chromecast-caf-receiver/cast.framework.system.d.ts @@ -1,198 +1,196 @@ import { EventType } from "./cast.framework.events"; -export = cast.framework.system; -declare namespace cast.framework.system { - type EventType = - // Fired when the system is ready. - | "READY" - // Fired when the application is terminated - | "SHUTDOWN" - // Fired when a new sender has connected. - | "SENDER_CONNECTED" - // Fired when a sender has disconnected. - | "SENDER_DISCONNECTED" - // Fired when there is a system error. - | "ERROR" - // Fired when the system volume has changed. - | "SYSTEM_VOLUME_CHANGED" - // Fired when the visibility of the application has changed - // (for example after a HDMI Input change or when the TV is turned - // off/on and the cast device is externally powered). - // Note that this API has the same effect as the webkitvisibilitychange event raised - // by your document, we provided it as CastReceiverManager API for convenience and - // to avoid a dependency on a webkit-prefixed event. - | "VISIBILITY_CHANGED" - // Fired when the standby state of the TV has changed. - // This event is related to the visibility chnaged event, as if the TV is in standby - // the visibility will be false, the visibility is more granular - // (as it also detects that the TV has selected a different channel) - // but it is not reliably detected in all TVs, - // standby can be used in those cases as most TVs implement it. - | "STANDBY_CHANGED" - | "MAX_VIDEO_RESOLUTION_CHANGED" - | "FEEDBACK_STARTED"; +export as namespace system +export type EventType = + // Fired when the system is ready. + | "READY" + // Fired when the application is terminated + | "SHUTDOWN" + // Fired when a new sender has connected. + | "SENDER_CONNECTED" + // Fired when a sender has disconnected. + | "SENDER_DISCONNECTED" + // Fired when there is a system error. + | "ERROR" + // Fired when the system volume has changed. + | "SYSTEM_VOLUME_CHANGED" + // Fired when the visibility of the application has changed + // (for example after a HDMI Input change or when the TV is turned + // off/on and the cast device is externally powered). + // Note that this API has the same effect as the webkitvisibilitychange event raised + // by your document, we provided it as CastReceiverManager API for convenience and + // to avoid a dependency on a webkit-prefixed event. + | "VISIBILITY_CHANGED" + // Fired when the standby state of the TV has changed. + // This event is related to the visibility chnaged event, as if the TV is in standby + // the visibility will be false, the visibility is more granular + // (as it also detects that the TV has selected a different channel) + // but it is not reliably detected in all TVs, + // standby can be used in those cases as most TVs implement it. + | "STANDBY_CHANGED" + | "MAX_VIDEO_RESOLUTION_CHANGED" + | "FEEDBACK_STARTED"; - type SystemState = - | "NOT_STARTED" - | "STARTING_IN_BACKGROUND" - | "STARTING" - | "READY" - | "STOPPING_IN_BACKGROUND" - | "STOPPING"; +export type SystemState = + | "NOT_STARTED" + | "STARTING_IN_BACKGROUND" + | "STARTING" + | "READY" + | "STOPPING_IN_BACKGROUND" + | "STOPPING"; - type StandbyState = "STANDBY" | "NOT_STANDBY" | "UNKNOWN"; +export type StandbyState = "STANDBY" | "NOT_STANDBY" | "UNKNOWN"; - type DisconnectReason = "REQUESTED_BY_SENDER" | "ERROR" | "UNKNOWN"; +export type DisconnectReason = "REQUESTED_BY_SENDER" | "ERROR" | "UNKNOWN"; + +/** + * Event dispatched by @see{@link CastReceiverManager} when the visibility of the application changes (HDMI input change; TV is turned off). + */ +export class VisibilityChangedEvent { + constructor(isVisible: boolean); /** - * Event dispatched by @see{@link CastReceiverManager} when the visibility of the application changes (HDMI input change; TV is turned off). + * Whether the Cast device is the active input or not. */ - class VisibilityChangedEvent { - constructor(isVisible: boolean); + isVisible: boolean; +} - /** - * Whether the Cast device is the active input or not. - */ - isVisible: boolean; - } +/** + * Represents the system volume data. + */ +export interface SystemVolumeData { + /** + * The level (from 0.0 to 1.0) of the system volume + */ + level: number; + + /** + * Whether the system volume is muted or not. + */ + muted: boolean; +} +/** + * Event dispatched by @see{CastReceiverManager} when the system volume changes. + */ +export class SystemVolumeChangedEvent extends Event { + constructor(volume: SystemVolumeData); + + /** + * The system volume data + */ + data: SystemVolumeData; +} +/** + * Event dispatched by @see{@link CastReceiverManager} when the TV enters/leaves the standby state. + */ +export class StandbyChangedEvent { + constructor(isStandby: boolean); + + isStandby: boolean; +} +/** + * Whether the TV is in standby or not. + */ +export interface ShutdownEvent extends Event { + [key: string]: any; +} + +/** + * Event dispatched by @see{@link CastReceiverManager} when a sender is disconnected. + */ +export class SenderDisconnectedEvent extends Event { + constructor(senderId: string, userAgent: string); + /** + * The ID of the sender connected. + */ + senderId: string; /** - * Represents the system volume data. + * The user agent of the sender. */ - interface SystemVolumeData { - /** - * The level (from 0.0 to 1.0) of the system volume - */ - level: number; - - /** - * Whether the system volume is muted or not. - */ - muted: boolean; - } + userAgent: string; + /** - * Event dispatched by @see{CastReceiverManager} when the system volume changes. + * The reason the sender was disconnected. */ - class SystemVolumeChangedEvent extends Event { - constructor(volume: SystemVolumeData); - - /** - * The system volume data - */ - data: SystemVolumeData; - } + reason?: DisconnectReason; +} + +/** + * Event dispatched by @see{@link CastReceiverManager} when a sender is connected. + */ +export class SenderConnectedEvent extends Event { + constructor(senderId: string, userAgent: string); /** - * Event dispatched by @see{@link CastReceiverManager} when the TV enters/leaves the standby state. + * The ID of the sender connected. */ - class StandbyChangedEvent { - constructor(isStandby: boolean); + senderId: string; - isStandby: boolean; - } /** - * Whether the TV is in standby or not. + * The user agent of the sender. */ - interface ShutdownEvent extends Event { - [key: string]: any; - } + userAgent: string; +} +/** + * Represents the data of a connected sender device. + */ +export interface Sender { /** - * Event dispatched by @see{@link CastReceiverManager} when a sender is disconnected. + * The sender Id. */ - class SenderDisconnectedEvent extends Event { - constructor(senderId: string, userAgent: string); - /** - * The ID of the sender connected. - */ - senderId: string; - - /** - * The user agent of the sender. - */ - userAgent: string; - - /** - * The reason the sender was disconnected. - */ - reason?: DisconnectReason; - } + id: string; /** - * Event dispatched by @see{@link CastReceiverManager} when a sender is connected. + * Indicate the sender supports large messages (>64KB) */ - class SenderConnectedEvent extends Event { - constructor(senderId: string, userAgent: string); - /** - * The ID of the sender connected. - */ - senderId: string; - - /** - * The user agent of the sender. - */ - userAgent: string; - } + largeMessageSupported?: boolean; /** - * Represents the data of a connected sender device. + * The userAgent of the sender. */ - interface Sender { - /** - * The sender Id. - */ - id: string; - - /** - * Indicate the sender supports large messages (>64KB) - */ - largeMessageSupported?: boolean; - - /** - * The userAgent of the sender. - */ - userAgent?: string; - } + userAgent?: string; +} + +/** + * Event dispatched by CastReceiverManager when the system is ready. + */ +export class ReadyEvent { + constructor(applicationData: ApplicationData); /** - * Event dispatched by CastReceiverManager when the system is ready. + * The application data */ - class ReadyEvent { - constructor(applicationData: ApplicationData); + data: ApplicationData; +} - /** - * The application data - */ - data: ApplicationData; - } +/** + * Event dispatched by @see{@link CastReceiverManager} when the system needs to update the restriction on maximum video resolution. + */ +export class MaxVideoResolutionChangedEvent extends Event { + constructor(height: number); /** - * Event dispatched by @see{@link CastReceiverManager} when the system needs to update the restriction on maximum video resolution. + * Maximum video resolution requested by the system. The value of 0 means there is no restriction. */ - class MaxVideoResolutionChangedEvent extends Event { - constructor(height: number); - - /** - * Maximum video resolution requested by the system. The value of 0 means there is no restriction. - */ - height: number; - } - /** Event dispatched by @see{@link CastReceiverManager} when the systems starts to create feedback report. */ - interface FeedbackStartedEvent extends Event { - [key: string]: any; - } - /** Event dispatched by @see{@link CastReceiverContext} which contains system information. */ - class Event { - constructor(type: EventType, data?: any); - type: EventType; - data?: any; - } - - /** Represents the data of the launched application. */ - interface ApplicationData { - id(): string; - launchingSenderId(): string; - name(): string; - namespaces(): string[]; - sessionId(): number; - } + height: number; +} +/** Event dispatched by @see{@link CastReceiverManager} when the systems starts to create feedback report. */ +export interface FeedbackStartedEvent extends Event { + [key: string]: any; +} +/** Event dispatched by @see{@link CastReceiverContext} which contains system information. */ +export class Event { + constructor(type: EventType, data?: any); + type: EventType; + data?: any; +} + +/** Represents the data of the launched application. */ +export interface ApplicationData { + id(): string; + launchingSenderId(): string; + name(): string; + namespaces(): string[]; + sessionId(): number; } diff --git a/types/chromecast-caf-receiver/cast.framework.ui.d.ts b/types/chromecast-caf-receiver/cast.framework.ui.d.ts index 77d93c8082..9647fdc0ef 100644 --- a/types/chromecast-caf-receiver/cast.framework.ui.d.ts +++ b/types/chromecast-caf-receiver/cast.framework.ui.d.ts @@ -2,196 +2,194 @@ import { PlayerDataEventType } from "./cast.framework.ui"; import { MediaMetadata } from "./cast.framework.messages"; import { PlayerDataChangedEventHandler } from "./index"; -export = cast.framework.ui; -declare namespace cast.framework.ui { - type ContentType = "video" | "audio" | "image"; +export as namespace ui +export type ContentType = "video" | "audio" | "image"; - type State = - | "launching" - | "idle" - | "loading" - | "buffering" - | "paused" - | "playing"; +export type State = + | "launching" + | "idle" + | "loading" + | "buffering" + | "paused" + | "playing"; - type PlayerDataEventType = - | "ANY_CHANGE" - | "STATE_CHANGED" - | "IS_SEEKING_CHANGED" - | "DURATION_CHANGED" - | "CURRENT_TIME_CHANGED" - | "METADATA_CHANGED" - | "TITLE_CHANGED" - | "SUBTITLE_CHANGED" - | "THUMBNAIL_URL_CHANGED" - | "NEXT_TITLE_CHANGED" - | "NEXT_SUBTITLE_CHANGED" - | "NEXT_THUMBNAIL_URL_CHANGED" - | "PRELOADING_NEXT_CHANGED" - | "CONTENT_TYPE_CHANGED" - | "IS_LIVE_CHANGED" - | "BREAK_PERCENTAGE_POSITIONS_CHANGED" - | "IS_PLAYING_BREAK_CHANGED" - | "IS_BREAK_SKIPPABLE_CHANGED" - | "WHEN_SKIPPABLE_CHANGED" - | "NUMBER_BREAK_CLIPS_CHANGED" - | "CURRENT_BREAK_CLIP_NUMBER_CHANGED" - | "DISPLAY_STATUS_CHANGED"; +export type PlayerDataEventType = + | "ANY_CHANGE" + | "STATE_CHANGED" + | "IS_SEEKING_CHANGED" + | "DURATION_CHANGED" + | "CURRENT_TIME_CHANGED" + | "METADATA_CHANGED" + | "TITLE_CHANGED" + | "SUBTITLE_CHANGED" + | "THUMBNAIL_URL_CHANGED" + | "NEXT_TITLE_CHANGED" + | "NEXT_SUBTITLE_CHANGED" + | "NEXT_THUMBNAIL_URL_CHANGED" + | "PRELOADING_NEXT_CHANGED" + | "CONTENT_TYPE_CHANGED" + | "IS_LIVE_CHANGED" + | "BREAK_PERCENTAGE_POSITIONS_CHANGED" + | "IS_PLAYING_BREAK_CHANGED" + | "IS_BREAK_SKIPPABLE_CHANGED" + | "WHEN_SKIPPABLE_CHANGED" + | "NUMBER_BREAK_CLIPS_CHANGED" + | "CURRENT_BREAK_CLIP_NUMBER_CHANGED" + | "DISPLAY_STATUS_CHANGED"; + +/** + * Player data changed event. Provides the changed field (type); and new value. + */ +export class PlayerDataChangedEvent { + constructor(type: PlayerDataEventType, field: string, value: any); /** - * Player data changed event. Provides the changed field (type); and new value. + * The field name that was changed. */ - class PlayerDataChangedEvent { - constructor(type: PlayerDataEventType, field: string, value: any); + field: string; - /** - * The field name that was changed. - */ - field: string; + type: PlayerDataEventType; - type: PlayerDataEventType; - - /** - * The new field value. - */ - value: any; - } /** - * Player data binder. Bind a player data object to the player state. - * The player data will be updated to reflect correctly the current player state without firing any change event. + * The new field value. */ - class PlayerDataBinder { - constructor(playerData: PlayerData); - - /** - * Add listener to player data changes. - */ - addEventListener: ( - type: PlayerDataEventType, - listener: PlayerDataChangedEventHandler - ) => void; - - /** - * Remove listener to player data changes. - */ - removeEventListener: ( - type: PlayerDataEventType, - listener: PlayerDataChangedEventHandler - ) => void; - } - /** - * Player data. Provide the player media and break state. - */ - interface PlayerData { - /** - * Array of breaks positions in percentage. - */ - breakPercentagePositions: number[]; - - /** - * Content Type. - */ - contentType: ContentType; - - /** - * The number of the current playing break clip in the break. - */ - currentBreakClipNumber: number; - - /** - * Media current position in seconds; or break current position if playing break. - */ - currentTime: number; - - /** - * Whether the player metadata (ie: title; currentTime) should be displayed. - * This will be true if at least one field in the metadata should be displayed. - * In some cases; displayStatus will be true; but parts of the metadata should be hidden - * (ie: the media title while media is seeking). - * In these cases; additional css can be applied to hide those elements. - * For cases where the media is audio-only; this will almost always be true. - * In cases where the media is video; this will be true when: - * (1) the video is loading; buffering; or seeking - * (2) a play request was made in the last five seconds while media is already playing; - * (3) there is a request made to show the status in the last five seconds; or - * (4) the media was paused in the last five seconds. - */ - displayStatus: boolean; - - /** - * Media duration in seconds; Or break duration if playing break. - */ - duration: number; - - /** - * Indicate break clip can be skipped. - */ - isBreakSkippable: boolean; - - /** - * Indicate if the content is a live stream. - */ - isLive: boolean; - - /** - * Indicate that the receiver is playing a break. - */ - isPlayingBreak: boolean; - - /** - * Indicate the player is seeking (can be either during playing or pausing). - */ - isSeeking: boolean; - - /** - * Media metadata. - */ - metadata: MediaMetadata; - - /** - * Next Item subtitle. - */ - nextSubtitle: string; - - /** - * Next Item thumbnail url. - */ - nextThumbnailUrl: string; - - /** - * Next Item title. - */ - nextTitle: string; - - /** - * Number of break clips in current break. - */ - numberBreakClips: number; - - /** - * Flag to show/hide next item metadata. - */ - preloadingNext: boolean; - - /** - * Current player state. - */ - state: State; - - /** - * Content thumbnail url. - */ - thumbnailUrl: string; - - /** - * Content title. - */ - title: string; - - /** - * Provide the time a break is skipable - relative to current playback time. Undefined if not skippable. - */ - whenSkippable?: number; - } + value: any; +} +/** + * Player data binder. Bind a player data object to the player state. + * The player data will be updated to reflect correctly the current player state without firing any change event. + */ +export class PlayerDataBinder { + constructor(playerData: PlayerData); + + /** + * Add listener to player data changes. + */ + addEventListener: ( + type: PlayerDataEventType, + listener: PlayerDataChangedEventHandler + ) => void; + + /** + * Remove listener to player data changes. + */ + removeEventListener: ( + type: PlayerDataEventType, + listener: PlayerDataChangedEventHandler + ) => void; +} +/** + * Player data. Provide the player media and break state. + */ +export interface PlayerData { + /** + * Array of breaks positions in percentage. + */ + breakPercentagePositions: number[]; + + /** + * Content Type. + */ + contentType: ContentType; + + /** + * The number of the current playing break clip in the break. + */ + currentBreakClipNumber: number; + + /** + * Media current position in seconds; or break current position if playing break. + */ + currentTime: number; + + /** + * Whether the player metadata (ie: title; currentTime) should be displayed. + * This will be true if at least one field in the metadata should be displayed. + * In some cases; displayStatus will be true; but parts of the metadata should be hidden + * (ie: the media title while media is seeking). + * In these cases; additional css can be applied to hide those elements. + * For cases where the media is audio-only; this will almost always be true. + * In cases where the media is video; this will be true when: + * (1) the video is loading; buffering; or seeking + * (2) a play request was made in the last five seconds while media is already playing; + * (3) there is a request made to show the status in the last five seconds; or + * (4) the media was paused in the last five seconds. + */ + displayStatus: boolean; + + /** + * Media duration in seconds; Or break duration if playing break. + */ + duration: number; + + /** + * Indicate break clip can be skipped. + */ + isBreakSkippable: boolean; + + /** + * Indicate if the content is a live stream. + */ + isLive: boolean; + + /** + * Indicate that the receiver is playing a break. + */ + isPlayingBreak: boolean; + + /** + * Indicate the player is seeking (can be either during playing or pausing). + */ + isSeeking: boolean; + + /** + * Media metadata. + */ + metadata: MediaMetadata; + + /** + * Next Item subtitle. + */ + nextSubtitle: string; + + /** + * Next Item thumbnail url. + */ + nextThumbnailUrl: string; + + /** + * Next Item title. + */ + nextTitle: string; + + /** + * Number of break clips in current break. + */ + numberBreakClips: number; + + /** + * Flag to show/hide next item metadata. + */ + preloadingNext: boolean; + + /** + * Current player state. + */ + state: State; + + /** + * Content thumbnail url. + */ + thumbnailUrl: string; + + /** + * Content title. + */ + title: string; + + /** + * Provide the time a break is skipable - relative to current playback time. Undefined if not skippable. + */ + whenSkippable?: number; } diff --git a/types/chromecast-caf-receiver/chromecast-caf-receiver-tests.ts b/types/chromecast-caf-receiver/chromecast-caf-receiver-tests.ts index 08ce57cf86..6660a058ad 100644 --- a/types/chromecast-caf-receiver/chromecast-caf-receiver-tests.ts +++ b/types/chromecast-caf-receiver/chromecast-caf-receiver-tests.ts @@ -1,52 +1,20 @@ -import { - PlayerData, - PlayerDataBinder -} from "chromecast-caf-receiver/cast.framework.ui"; -import { - ReadyEvent, - ApplicationData -} from "chromecast-caf-receiver/cast.framework.system"; -import { - RequestEvent, - Event, - BreaksEvent -} from "chromecast-caf-receiver/cast.framework.events"; -import { - QueueBase, - TextTracksManager, - QueueManager, - PlayerManager -} from "chromecast-caf-receiver/cast.framework"; -import { - BreakSeekData, - BreakClipLoadInterceptorContext, - BreakManager -} from "chromecast-caf-receiver/cast.framework.breaks"; -import { - Break, - BreakClip, - LoadRequestData, - Track, - MediaMetadata -} from "chromecast-caf-receiver/cast.framework.messages"; - -const breaksEvent = new BreaksEvent('BREAK_STARTED'); +const breaksEvent = new cast.framework.events.BreaksEvent('BREAK_STARTED'); breaksEvent.breakId = 'some-break-id'; breaksEvent.breakClipId = 'some-break-clip-id'; -const track = new Track(1, "TEXT"); -const breakClip = new BreakClip("id"); -const adBreak = new Break("id", ["id"], 1); -const rEvent = new RequestEvent("BITRATE_CHANGED", { requestId: 2 }); -const pManager = new PlayerManager(); +const track = new cast.framework.messages.Track(1, "TEXT"); +const breakClip = new cast.framework.messages.BreakClip("id"); +const adBreak = new cast.framework.messages.Break("id", ["id"], 1); +const rEvent = new cast.framework.events.RequestEvent("BITRATE_CHANGED", { requestId: 2 }); +const pManager = new cast.framework.PlayerManager(); pManager.addEventListener("STALLED", () => { }); -const ttManager = new TextTracksManager(); -const qManager = new QueueManager(); -const qBase = new QueueBase(); +const ttManager = new cast.framework.TextTracksManager(); +const qManager = new cast.framework.QueueManager(); +const qBase = new cast.framework.QueueBase(); const items = qBase.fetchItems(1, 3, 4); -const breakSeekData = new BreakSeekData(0, 100, []); -const breakClipLoadContext = new BreakClipLoadInterceptorContext(adBreak); -const breakManager: BreakManager = { +const breakSeekData = new cast.framework.breaks.BreakSeekData(0, 100, []); +const breakClipLoadContext = new cast.framework.breaks.BreakClipLoadInterceptorContext(adBreak); +const breakManager: cast.framework.breaks.BreakManager = { getBreakById: () => adBreak, getBreakClipById: () => breakClip, getBreakClips: () => [breakClip], @@ -58,7 +26,7 @@ const breakManager: BreakManager = { setVastTrackingInterceptor: () => { } }; -const lrd: LoadRequestData = { +const lrd: cast.framework.messages.LoadRequestData = { requestId: 1, activeTrackIds: [1, 2], media: { @@ -75,7 +43,7 @@ const lrd: LoadRequestData = { queueData: {} }; -const appData: ApplicationData = { +const appData: cast.framework.system.ApplicationData = { id: () => "id", launchingSenderId: () => "launch-id", name: () => "name", @@ -83,9 +51,9 @@ const appData: ApplicationData = { sessionId: () => 1 }; -const readyEvent = new ReadyEvent(appData); +const readyEvent = new cast.framework.system.ReadyEvent(appData); const data = readyEvent.data; -const pData: PlayerData = { +const pData: cast.framework.ui.PlayerData = { breakPercentagePositions: [1], contentType: "video", currentBreakClipNumber: 2, @@ -96,7 +64,7 @@ const pData: PlayerData = { isLive: true, isPlayingBreak: false, isSeeking: true, - metadata: new MediaMetadata("GENERIC"), + metadata: new cast.framework.messages.MediaMetadata("GENERIC"), nextSubtitle: "sub", nextThumbnailUrl: "url", nextTitle: "title", @@ -107,5 +75,5 @@ const pData: PlayerData = { title: "title", whenSkippable: 321 }; -const binder = new PlayerDataBinder(pData); +const binder = new cast.framework.ui.PlayerDataBinder(pData); binder.addEventListener("ANY_CHANGE", e => { }); diff --git a/types/chromecast-caf-receiver/index.d.ts b/types/chromecast-caf-receiver/index.d.ts index 73a13f53ca..c716ad89ea 100644 --- a/types/chromecast-caf-receiver/index.d.ts +++ b/types/chromecast-caf-receiver/index.d.ts @@ -11,11 +11,14 @@ /// /// +import * as framework from "./cast.framework"; import { PlayerDataChangedEvent } from './cast.framework.ui'; import { NetworkRequestInfo } from './cast.framework'; import { Event } from './cast.framework.events'; + export as namespace cast; +export { framework }; export type EventHandler = (event: Event) => void; export type PlayerDataChangedEventHandler = ( event: PlayerDataChangedEvent From c0c4189a262e2b0607736dc8d042dcc9b891bc6f Mon Sep 17 00:00:00 2001 From: Kobi Cohen Date: Mon, 3 Dec 2018 12:04:55 +0200 Subject: [PATCH 269/608] updating isMatchWithCustomizer type to accept two more arguments: object and source per lodash docs https://lodash.com/docs/4.17.11#isMatchWith [add tests] --- types/lodash/lodash-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/lodash/lodash-tests.ts b/types/lodash/lodash-tests.ts index 4f7f229fe6..9d2547dcf4 100644 --- a/types/lodash/lodash-tests.ts +++ b/types/lodash/lodash-tests.ts @@ -4205,7 +4205,7 @@ fp.now(); // $ExpectType number // _.isMatchWith { - const testIsMatchCustiomizerFn = (value: any, other: any, indexOrKey: number|string|symbol) => true; + const testIsMatchCustiomizerFn = (value: any, other: any, indexOrKey: number|string|symbol, object: object, source: object) => true; _.isMatchWith({}, {}, testIsMatchCustiomizerFn); // $ExpectType boolean _({}).isMatchWith({}, testIsMatchCustiomizerFn); // $ExpectType boolean From 77643fb3e533e7689a0b4a742c67b48e283ec353 Mon Sep 17 00:00:00 2001 From: craig bruce Date: Mon, 3 Dec 2018 21:29:50 +1100 Subject: [PATCH 270/608] fix lint issues --- .../cast.framework.breaks.d.ts | 2 - .../cast.framework.d.ts | 124 +++++++----------- .../cast.framework.ui.d.ts | 2 - types/chromecast-caf-receiver/index.d.ts | 17 +-- 4 files changed, 57 insertions(+), 88 deletions(-) diff --git a/types/chromecast-caf-receiver/cast.framework.breaks.d.ts b/types/chromecast-caf-receiver/cast.framework.breaks.d.ts index 5ece1f15e9..bce1d6b71d 100644 --- a/types/chromecast-caf-receiver/cast.framework.breaks.d.ts +++ b/types/chromecast-caf-receiver/cast.framework.breaks.d.ts @@ -1,6 +1,5 @@ import { Break, BreakClip } from "./cast.framework.messages"; - export as namespace breaks export class BreakSeekData { constructor(seekFrom: number, seekTo: number, breaks: Break[]); @@ -88,4 +87,3 @@ export interface BreakManager { interceptor?: (trackingUrl: string) => void ): void; } - diff --git a/types/chromecast-caf-receiver/cast.framework.d.ts b/types/chromecast-caf-receiver/cast.framework.d.ts index 6e2be61eb0..13d2e52ce0 100644 --- a/types/chromecast-caf-receiver/cast.framework.d.ts +++ b/types/chromecast-caf-receiver/cast.framework.d.ts @@ -3,34 +3,6 @@ import * as events from "./cast.framework.events"; import * as messages from "./cast.framework.messages"; import * as system from "./cast.framework.system"; import * as ui from "./cast.framework.ui"; -import { EventType } from "./cast.framework.events"; -import { - PlayerState, - PlayStringId, - ErrorType, - ErrorReason, - IdleReason, - MessageType, - Track, - TextTrackStyle, - QueueItem, - LoadRequestData, - QueueData, - Break, - LiveSeekableRange, - MediaInformation, - ErrorData, - RequestData -} from "./cast.framework.messages"; -import { BreakManager } from "./cast.framework.breaks"; -import { EventHandler, RequestHandler, BinaryHandler } from "./index"; -import { - EventType as SystemEventType, - ApplicationData, - Sender, - StandbyState, - SystemState -} from "./cast.framework.system"; export import breaks = breaks; export import events = events; @@ -59,12 +31,12 @@ export class TextTracksManager { /** * Adds text tracks to the list. */ - addTracks(tracks: Track[]): void; + addTracks(tracks: messages.Track[]): void; /** * Creates a text track. */ - createTrack(): Track; + createTrack(): messages.Track; /** * Gets all active text ids. @@ -74,27 +46,27 @@ export class TextTracksManager { /** * Gets all active text tracks. */ - getActiveTracks(): Track[]; + getActiveTracks(): messages.Track[]; /** * Returns the current text track style. */ - getTextTracksStyle(): TextTrackStyle; + getTextTracksStyle(): messages.TextTrackStyle; /** * Gets text track by id. */ - getTrackById(id: number): Track; + getTrackById(id: number): messages.Track; /** * Returns all text tracks. */ - getTracks(): Track[]; + getTracks(): messages.Track[]; /** * Gets text tracks by language. */ - getTracksByLanguage(language: string): Track[]; + getTracksByLanguage(language: string): messages.Track[]; /** * Sets text tracks to be active by id. @@ -109,7 +81,7 @@ export class TextTracksManager { /** * Sets text track style. */ - setTextTrackStyle(style: TextTrackStyle): void; + setTextTrackStyle(style: messages.TextTrackStyle): void; } /** @@ -121,7 +93,7 @@ export class QueueManager { /** * Returns the current queue item. */ - getCurrentItem(): QueueItem; + getCurrentItem(): messages.QueueItem; /** * Returns the index of the current queue item. @@ -131,12 +103,12 @@ export class QueueManager { /** * Returns the queue items. */ - getItems(): QueueItem[]; + getItems(): messages.QueueItem[]; /** * Inserts items into the queue. */ - insertItems(items: QueueItem[], insertBefore?: number): void; + insertItems(items: messages.QueueItem[], insertBefore?: number): void; /** * Removes items from the queue. @@ -151,7 +123,7 @@ export class QueueManager { /** * Updates existing queue items by matching itemId. */ - updateItems(items: QueueItem[]): void; + updateItems(items: messages.QueueItem[]): void; } /** @@ -167,7 +139,7 @@ export class QueueBase { itemId: number, nextCount: number, prevCount: number - ): QueueItem[] | Promise; + ): messages.QueueItem[] | Promise; /** * Initializes the queue with the requestData. This is called when a new LOAD request comes in to the receiver. @@ -175,13 +147,13 @@ export class QueueBase { * in the load request data. */ initialize( - requestData: LoadRequestData - ): QueueData | Promise; + requestData: messages.LoadRequestData + ): messages.QueueData | Promise; /** * Returns next items after the reference item; often the end of the current queue; called by the receiver MediaManager. */ - nextItems(itemId?: number): QueueItem[] | Promise; + nextItems(itemId?: number): messages.QueueItem[] | Promise; /** * Sets the current item with the itemId; called by the receiver MediaManager when it changes the current playing item. @@ -192,7 +164,7 @@ export class QueueBase { * A callback for informing the following items have been inserted into the receiver queue in this session. * A cloud based implementation can optionally choose to update its queue based on the new information. */ - onItemsInserted(items: QueueItem[], insertBefore?: number): void; + onItemsInserted(items: messages.QueueItem[], insertBefore?: number): void; /** * A callback for informing the following items have been removed from the receiver queue in this session. @@ -203,12 +175,12 @@ export class QueueBase { /** * Returns previous items before the reference item; often at the beginning of the queue; called by the receiver MediaManager. */ - prevItems(itemId?: number): QueueItem[] | Promise; + prevItems(itemId?: number): messages.QueueItem[] | Promise; /** * Shuffles the queue and returns new queue items. Returns null if the operation is not supported. */ - shuffle(): QueueItem[] | Promise; + shuffle(): messages.QueueItem[] | Promise; } /** @@ -221,7 +193,7 @@ export class PlayerManager { * Adds an event listener for player event. */ addEventListener: ( - eventType: EventType | EventType[], + eventType: events.EventType | events.EventType[], eventListener: EventHandler ) => void; @@ -250,12 +222,12 @@ export class PlayerManager { /** * Obtain the breaks (Ads) manager. */ - getBreakManager(): BreakManager; + getBreakManager(): breaks.BreakManager; /** * Returns list of breaks. */ - getBreaks(): Break[]; + getBreaks(): messages.Break[]; /** * Gets current time in sec of current media. @@ -270,12 +242,12 @@ export class PlayerManager { /** * Returns live seekable range with start and end time in seconds. The values are media time based. */ - getLiveSeekableRange(): LiveSeekableRange; + getLiveSeekableRange(): messages.LiveSeekableRange; /** * Gets media information of current media. */ - getMediaInformation(): MediaInformation; + getMediaInformation(): messages.MediaInformation; /** * Returns playback configuration. @@ -290,7 +262,7 @@ export class PlayerManager { /** * Gets player state. */ - getPlayerState(): PlayerState; + getPlayerState(): messages.PlayerState; /** * Get the preferred playback rate. (Can be used on shutdown event to save latest preferred playback rate to a persistent storage; @@ -313,7 +285,7 @@ export class PlayerManager { /** * Loads media. */ - load(loadRequest: LoadRequestData): Promise; + load(loadRequest: messages.LoadRequestData): Promise; /** * Pauses currently playing media. @@ -328,7 +300,7 @@ export class PlayerManager { /** * Requests a text string to be played back locally on the receiver device. */ - playString(stringId: PlayStringId, args?: string[]): Promise; + playString(stringId: messages.PlayStringId, args?: string[]): Promise; /** * Request Google Assistant to refresh the credentials. Only works if the original credentials came from the assistant. @@ -339,7 +311,7 @@ export class PlayerManager { * Removes the event listener added for given player event. If event listener is not added; it will be ignored. */ removeEventListener( - eventType: EventType | EventType[], + eventType: events.EventType | events.EventType[], eventListener: EventHandler ): void; @@ -354,15 +326,15 @@ export class PlayerManager { sendError( senderId: string, requestId: number, - type: ErrorType, - reason?: ErrorReason, + type: messages.ErrorType, + reason?: messages.ErrorReason, customData?: any ): void; /** * Send local media request. */ - sendLocalMediaRequest(request: RequestData): void; + sendLocalMediaRequest(request: messages.RequestData): void; /** * Sends a media status message to a specific sender. @@ -381,7 +353,7 @@ export class PlayerManager { * it is only needed if they want to make the player go to IDLE in special circumstances and the default idleReason does not reflect their intended * behavior. */ - setIdleReason(idleReason: IdleReason): void; + setIdleReason(idleReason: messages.IdleReason): void; /** * Sets MediaElement to use. If Promise of MediaElement is set; media begins playback after Promise is resolved. @@ -392,7 +364,7 @@ export class PlayerManager { * Sets media information. */ setMediaInformation( - mediaInformation: MediaInformation, + mediaInformation: messages.MediaInformation, opt_broadcast?: boolean ): void; @@ -403,7 +375,7 @@ export class PlayerManager { */ setMediaPlaybackInfoHandler( handler: ( - loadRequestData: LoadRequestData, + loadRequestData: messages.LoadRequestData, playbackConfig: PlaybackConfig ) => void ): void; @@ -413,7 +385,7 @@ export class PlayerManager { * of the media status. By default the media contentId is used as the content url. */ setMediaUrlResolver( - resolver: (loadRequestData: LoadRequestData) => void + resolver: (loadRequestData: messages.LoadRequestData) => void ): void; /** @@ -424,8 +396,8 @@ export class PlayerManager { * the load interceptor will be called for preload messages. */ setMessageInterceptor( - type: MessageType, - interceptor: (requestData: RequestData) => Promise + type: messages.MessageType, + interceptor: (requestData: messages.RequestData) => Promise ): void; /** @@ -652,7 +624,7 @@ export class CastReceiverContext { * Add listener to cast system events. */ addEventListener( - type: SystemEventType | SystemEventType[], + type: system.EventType | system.EventType[], handler: EventHandler ): void; @@ -670,7 +642,7 @@ export class CastReceiverContext { /** * Provides application information once the system is ready; otherwise it will be null. */ - getApplicationData(): ApplicationData; + getApplicationData(): system.ApplicationData; /** * Provides device capabilities information once the system is ready; otherwise it will be null. @@ -686,22 +658,22 @@ export class CastReceiverContext { /** * Get a sender by sender id */ - getSender(senderId: string): Sender; + getSender(senderId: string): system.Sender; /** * Gets a list of currently-connected senders. */ - getSenders(): Sender[]; + getSenders(): system.Sender[]; /** * Reports if the cast application's HDMI input is in standby. */ - getStandbyState(): StandbyState; + getStandbyState(): system.StandbyState; /** * Provides application information about the system state. */ - getSystemState(): SystemState; + getSystemState(): system.SystemState; /** * Reports if the cast application is the HDMI active input. @@ -731,7 +703,7 @@ export class CastReceiverContext { /** * Remove listener to cast system events. */ - removeEventListener(type: EventType, handler: EventHandler): void; + removeEventListener(type: system.EventType, handler: EventHandler): void; /** * Sends a message to a specific sender. @@ -783,10 +755,10 @@ export class CastReceiverContext { export class AudioTracksManager { constructor(params: any); getActiveId(): number; - getActiveTrack(): Track; - getTrackById(id: number): Track; - getTracks(): Track[]; - getTracksByLanguage(language: string): Track[]; + getActiveTrack(): messages.Track; + getTrackById(id: number): messages.Track; + getTracks(): messages.Track[]; + getTracksByLanguage(language: string): messages.Track[]; setActiveById(id: number): void; setActiveByLanguage(language: string): void; } diff --git a/types/chromecast-caf-receiver/cast.framework.ui.d.ts b/types/chromecast-caf-receiver/cast.framework.ui.d.ts index 9647fdc0ef..cd3fb79e2a 100644 --- a/types/chromecast-caf-receiver/cast.framework.ui.d.ts +++ b/types/chromecast-caf-receiver/cast.framework.ui.d.ts @@ -1,7 +1,5 @@ import { PlayerDataEventType } from "./cast.framework.ui"; import { MediaMetadata } from "./cast.framework.messages"; -import { PlayerDataChangedEventHandler } from "./index"; - export as namespace ui export type ContentType = "video" | "audio" | "image"; diff --git a/types/chromecast-caf-receiver/index.d.ts b/types/chromecast-caf-receiver/index.d.ts index c716ad89ea..444dba0af4 100644 --- a/types/chromecast-caf-receiver/index.d.ts +++ b/types/chromecast-caf-receiver/index.d.ts @@ -13,15 +13,16 @@ import * as framework from "./cast.framework"; import { PlayerDataChangedEvent } from './cast.framework.ui'; -import { NetworkRequestInfo } from './cast.framework'; import { Event } from './cast.framework.events'; - export as namespace cast; export { framework }; -export type EventHandler = (event: Event) => void; -export type PlayerDataChangedEventHandler = ( - event: PlayerDataChangedEvent -) => void; -export type RequestHandler = (request: NetworkRequestInfo) => void; -export type BinaryHandler = (data: Uint8Array) => Uint8Array; + +declare global { + type EventHandler = (event: Event) => void; + type PlayerDataChangedEventHandler = ( + event: PlayerDataChangedEvent + ) => void; + type RequestHandler = (request: framework.NetworkRequestInfo) => void; + type BinaryHandler = (data: Uint8Array) => Uint8Array; +} From b405085866b0667cc4879a6013529255b071fbe5 Mon Sep 17 00:00:00 2001 From: Ceyhun Ozugur Date: Mon, 3 Dec 2018 11:41:36 +0100 Subject: [PATCH 271/608] Add missing StorybookUIOptions params --- types/storybook__react-native/index.d.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/types/storybook__react-native/index.d.ts b/types/storybook__react-native/index.d.ts index 3f46866129..5c71878c0c 100644 --- a/types/storybook__react-native/index.d.ts +++ b/types/storybook__react-native/index.d.ts @@ -4,6 +4,7 @@ // Anton Izmailov // Alec Hill // Kyle Roach +// Ceyhun Ozugur // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -16,6 +17,12 @@ export interface StorybookUIOptions { host?: string; port?: number; query?: string; + isUIHidden?: boolean; + tabOpen?: number; + initialSelection?: object; + shouldPersistSelection?: boolean; + shouldDisableKeyboardAvoidingView?: boolean; + keyboardAvoidingViewVerticalOffset?: number; } export function getStorybookUI( From df5456793b6f17352c30032132b1cd969e00f9fb Mon Sep 17 00:00:00 2001 From: Jessica Date: Mon, 3 Dec 2018 19:43:34 +0900 Subject: [PATCH 272/608] Refactor Suspense to be augmentable This is just so I can experiment with maxDuration locally with a type augmentation. --- types/react/index.d.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/types/react/index.d.ts b/types/react/index.d.ts index f525d7838c..431a1d75a4 100644 --- a/types/react/index.d.ts +++ b/types/react/index.d.ts @@ -322,11 +322,8 @@ declare namespace React { const Children: ReactChildren; const Fragment: ExoticComponent<{ children?: ReactNode }>; const StrictMode: ExoticComponent<{ children?: ReactNode }>; - /** - * This feature is not yet available for server-side rendering. - * Suspense support will be added in a later release. - */ - const Suspense: ExoticComponent<{ + + interface SuspenseProps { children?: ReactNode /** A fallback react tree to show when a Suspense child (like React.lazy) suspends */ @@ -338,7 +335,12 @@ declare namespace React { * Not implemented yet, requires unstable_ConcurrentMode */ // maxDuration?: number - }>; + } + /** + * This feature is not yet available for server-side rendering. + * Suspense support will be added in a later release. + */ + const Suspense: ExoticComponent; const version: string; // From 29d5465467fa53b37c0f408192006552d1a9c2bc Mon Sep 17 00:00:00 2001 From: Ceyhun Ozugur Date: Mon, 3 Dec 2018 12:05:36 +0100 Subject: [PATCH 273/608] Add docs --- types/storybook__react-native/index.d.ts | 73 ++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/types/storybook__react-native/index.d.ts b/types/storybook__react-native/index.d.ts index 5c71878c0c..fc308fa69b 100644 --- a/types/storybook__react-native/index.d.ts +++ b/types/storybook__react-native/index.d.ts @@ -11,17 +11,90 @@ import * as React from 'react'; export interface StorybookUIOptions { + /** + * display navigator and addons on the device + * + * @default true + */ onDeviceUI?: boolean; + + /** + * allows to display stories without running storybook server. Should be used with onDeviceUI + * + * @default false + */ disableWebsockets?: boolean; + + /** + * use wss/https instead of ws/http + * + * @default false + */ secured?: boolean; + + /** + * host to use + * + * @default NativeModules.SourceCode.scriptURL + */ host?: string; + + /** + * port to use + * + * @default 7007 + */ port?: number; + + /** + * additional query string to pass to websockets + * + * @default "" + */ query?: string; + + /** + * should the ui be closed initialy. + * + * @default false + */ isUIHidden?: boolean; + + /** + * which tab should be open. -1 Navigator, 0 Preview, 1 Addons + * + * @default 0 + */ tabOpen?: number; + + /** + * initialize storybook with a specific story. + * In case a valid object is passed, it will take precedence over `shouldPersistSelection`. + * ex: `{ kind: 'Knobs', story: 'with knobs' }` + * + * @default null + */ initialSelection?: object; + + /** + * initialize storybook with the last selected story. + * + * @default true + */ shouldPersistSelection?: boolean; + + /** + * disable KeyboardAvoidingView wrapping Storybook's view + * + * @default false + */ shouldDisableKeyboardAvoidingView?: boolean; + + /** + * this will set the keyboardverticaloffset (https://facebook.github.io/react-native/docs/keyboardavoidingview#keyboardverticaloffset) value for KeyboardAvoidingView wrapping Storybook's view + * + * @default 0 + */ keyboardAvoidingViewVerticalOffset?: number; } From 470e25094b33b97ea72ec2a9041e79ae509d09fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Den=C3=A8le?= Date: Mon, 3 Dec 2018 12:07:53 +0100 Subject: [PATCH 274/608] JSDoc: describe default value of page.setCacheEnabled --- types/puppeteer/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/puppeteer/index.d.ts b/types/puppeteer/index.d.ts index e48e29b7ec..1e71d1da08 100644 --- a/types/puppeteer/index.d.ts +++ b/types/puppeteer/index.d.ts @@ -1624,7 +1624,7 @@ export interface Page extends EventEmitter, FrameBase { /** * Determines whether cache is enabled on the page. - * @param enabled Whether or not to enable cache on the page. Defaults to true. + * @param [enabled=true] Whether or not to enable cache on the page. */ setCacheEnabled(enabled?: boolean): Promise; From d08aba397844405c08995fe0728d0d9c82ccf512 Mon Sep 17 00:00:00 2001 From: Jessica Date: Mon, 3 Dec 2018 20:11:17 +0900 Subject: [PATCH 275/608] Fix overly permissible first argument to css, styled() and createGlobalStyle --- types/styled-components/index.d.ts | 38 +++++------ types/styled-components/test/index.tsx | 91 ++++++++++++++++++++++++-- 2 files changed, 103 insertions(+), 26 deletions(-) diff --git a/types/styled-components/index.d.ts b/types/styled-components/index.d.ts index 2f6fa61317..ca3ff22c0e 100644 --- a/types/styled-components/index.d.ts +++ b/types/styled-components/index.d.ts @@ -73,7 +73,7 @@ export type SimpleInterpolation = | InterpolationValue | FlattenSimpleInterpolation; // must be an interface to be self-referential -interface FlattenSimpleInterpolation +export interface FlattenSimpleInterpolation extends ReadonlyArray {} export type InterpolationFunction

= (props: P) => Interpolation

; @@ -176,10 +176,9 @@ export interface ThemedStyledFunctionBase< ( first: | TemplateStringsArray - | NonNullable< - Interpolation< - ThemedStyledProps & O, T> - > + | CSSObject + | InterpolationFunction< + ThemedStyledProps & O, T> >, ...rest: Array< Interpolation< @@ -187,17 +186,12 @@ export interface ThemedStyledFunctionBase< > > ): StyledComponent; - // at least the first argument is required, whatever it is ( first: | TemplateStringsArray - | NonNullable< - Interpolation< - ThemedStyledProps< - StyledComponentPropsWithRef & O & U, - T - > - > + | CSSObject + | InterpolationFunction< + ThemedStyledProps & O & U, T> >, ...rest: Array< Interpolation< @@ -288,19 +282,21 @@ export type StyledInterface = ThemedStyledInterface; export interface BaseThemedCssFunction { ( - first: TemplateStringsArray | NonNullable, + first: TemplateStringsArray | CSSObject, ...interpolations: SimpleInterpolation[] ): FlattenSimpleInterpolation; ( first: | TemplateStringsArray - | NonNullable>>, + | CSSObject + | InterpolationFunction>, ...interpolations: Array>> ): FlattenInterpolation>;

( first: | TemplateStringsArray - | NonNullable>>, + | CSSObject + | InterpolationFunction>, ...interpolations: Array>> ): FlattenInterpolation>; } @@ -333,7 +329,8 @@ export interface ThemedStyledComponentsModule< createGlobalStyle

( first: | TemplateStringsArray - | NonNullable>>, + | CSSObject + | InterpolationFunction>, ...interpolations: Array>> ): GlobalStyleComponent; @@ -405,7 +402,8 @@ export function keyframes( export function createGlobalStyle

( first: | TemplateStringsArray - | NonNullable>>, + | CSSObject + | InterpolationFunction>, ...interpolations: Array>> ): GlobalStyleComponent; @@ -468,7 +466,7 @@ export class StyleSheetManager extends React.Component< */ // ONLY string literals and inline invocations of css`` are supported, anything else crashes the plugin export type CSSProp> = - string | - FlattenInterpolation>; + | string + | FlattenInterpolation>; export default styled; diff --git a/types/styled-components/test/index.tsx b/types/styled-components/test/index.tsx index 2d70f74106..d382b42628 100644 --- a/types/styled-components/test/index.tsx +++ b/types/styled-components/test/index.tsx @@ -14,7 +14,10 @@ import styled, { withTheme, ThemeConsumer, StyledComponent, - ThemedStyledComponentsModule + ThemedStyledComponentsModule, + FlattenSimpleInterpolation, + SimpleInterpolation, + FlattenInterpolation } from "styled-components"; import {} from "styled-components/cssprop"; @@ -101,13 +104,13 @@ const fadeIn = keyframes` `; const showAnimation = css` - opacity: 1; - transform: scale(1) translateY(0); + opacity: 1; + transform: scale(1) translateY(0); `; const hideAnimation = css` - opacity: 0; - transform: scale(0.95, 0.8) translateY(20px); + opacity: 0; + transform: scale(0.95, 0.8) translateY(20px); `; const entryAnimation = keyframes` @@ -694,6 +697,8 @@ async function typedThemes() { return props.theme.color; }}; `; + // can't use a FlattenInterpolation as the first argument, would make broken css + // $ExpectError const ThemedDiv4 = styled.div(themedCss); const themedCssWithNesting = css(props => ({ @@ -714,7 +719,6 @@ async function typedThemes() { - {theme => { // $ExpectType string @@ -867,3 +871,78 @@ function cssProp() { ); } + +function validateArgumentsAndReturns() { + const t1: FlattenSimpleInterpolation[] = [ + css({ color: "blue" }), + css` + color: blue; + `, + css` + color: ${"blue"}; + ` + ]; + const t4: FlattenInterpolation = [ + css` + color: ${() => "blue"}; + `, + css(() => ({ color: "blue" })), + css( + () => + css` + color: "blue"; + ` + ) + ]; + + // if the first argument is array-like it's always treated as a string[], this breaks things + css( + // $ExpectError + css` + ${{ color: "blue" }} + ` + ); + // _technically_ valid as styled-components doesn't look at .raw but best not to support it + // $ExpectError + css([]); + + styled.div({ color: "blue" }); + styled.div(props => ({ color: props.theme.color })); + styled.div` + color: ${"blue"}; + `; + // These don't work for the same reason css doesn't work + styled.div( + // $ExpectError + css` + ${{ color: "blue" }} + ` + ); + // $ExpectError + styled.div([]); + + createGlobalStyle({ + ":root": { + color: "blue" + } + }); + createGlobalStyle` + :root { + color: blue; + } + `; + createGlobalStyle(() => ({ + ":root": { + color: "blue" + } + })); + // these are invalid for the same reason as in styled.div + // $ExpectError + createGlobalStyle(css` + :root { + color: ${() => "blue"}; + } + `); + // $ExpectError + createGlobalStyle([]); +} From eda0aeb732af70c9406e6369115a902825ff0e8e Mon Sep 17 00:00:00 2001 From: Jessica Date: Mon, 3 Dec 2018 20:29:24 +0900 Subject: [PATCH 276/608] Fix lint warnings --- types/react/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/react/index.d.ts b/types/react/index.d.ts index 431a1d75a4..5be580c061 100644 --- a/types/react/index.d.ts +++ b/types/react/index.d.ts @@ -324,17 +324,17 @@ declare namespace React { const StrictMode: ExoticComponent<{ children?: ReactNode }>; interface SuspenseProps { - children?: ReactNode + children?: ReactNode; /** A fallback react tree to show when a Suspense child (like React.lazy) suspends */ - fallback: NonNullable|null + fallback: NonNullable|null; // I tried looking at the code but I have no idea what it does. // https://github.com/facebook/react/issues/13206#issuecomment-432489986 /** * Not implemented yet, requires unstable_ConcurrentMode */ - // maxDuration?: number + // maxDuration?: number; } /** * This feature is not yet available for server-side rendering. From f21619e43090a7a086f2ae54f021a0effa3ed59c Mon Sep 17 00:00:00 2001 From: polar-lukas Date: Mon, 3 Dec 2018 15:04:41 +0100 Subject: [PATCH 277/608] make iframeResizer default export "iframeResizer" is the default export of the typed library. Hence it should also be declared such. If you try to require iframeResizer as AMD module, the function "iframeResizer" is not provided within an object but as function. Using the provided types results in an undefined propery "iframeResizer" on the "define"d object. --- types/iframe-resizer/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/iframe-resizer/index.d.ts b/types/iframe-resizer/index.d.ts index 6e67a5b592..920c80b3a7 100644 --- a/types/iframe-resizer/index.d.ts +++ b/types/iframe-resizer/index.d.ts @@ -274,4 +274,4 @@ export interface IFrameScrollData { y: number; } -export function iframeResizer(options: IFrameOptions, target: string | HTMLElement): IFrameComponent[]; +export default function iframeResizer(options: IFrameOptions, target: string | HTMLElement): IFrameComponent[]; From d661dca171cdfa9265171c3dec4880521e07972b Mon Sep 17 00:00:00 2001 From: polar-lukas Date: Mon, 3 Dec 2018 15:24:07 +0100 Subject: [PATCH 278/608] iframe-resizer: update tests forgot to update the tests... --- types/iframe-resizer/iframe-resizer-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/iframe-resizer/iframe-resizer-tests.ts b/types/iframe-resizer/iframe-resizer-tests.ts index 218a7f71cd..1efe701f9a 100644 --- a/types/iframe-resizer/iframe-resizer-tests.ts +++ b/types/iframe-resizer/iframe-resizer-tests.ts @@ -1,4 +1,4 @@ -import { IFrameComponent, IFrameOptions, iframeResizer } from "iframe-resizer"; +import iframeResizer, { IFrameComponent, IFrameOptions } from "iframe-resizer"; function testOne(): void { const iframe: HTMLIFrameElement = document.createElement('iframe'); From db84d22b8b9b528f9708ced487b2cbf6c9d57ea3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Ba=C4=8D=C3=ADk?= Date: Mon, 3 Dec 2018 16:36:27 +0100 Subject: [PATCH 279/608] Improved param descriptions --- types/react-native/index.d.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index 15423558e4..65ed1d3088 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -3631,9 +3631,15 @@ interface ImagePropsAndroid { fadeDuration?: number; /** - * Required sizes if using native image resources on Android + * Required if loading images via 'uri' from drawable folder on Android. + * Explanation: https://medium.com/@adamjacobb/react-native-performance-images-adf5843e120 */ width?: number; + + /** + * Required if loading images via 'uri' from drawable folder on Android + * Explanation: https://medium.com/@adamjacobb/react-native-performance-images-adf5843e120 + */ height?: number; } From 1e504ef4e33ca627a9cf4999581e00b4ab066087 Mon Sep 17 00:00:00 2001 From: AlexKlimenkov Date: Mon, 3 Dec 2018 19:06:13 +0300 Subject: [PATCH 280/608] [dhtmlxgantt] update typedefs to include changes up to dhtmlxgantt v6.0 --- types/dhtmlxgantt/dhtmlxgantt-tests.ts | 4 +- types/dhtmlxgantt/index.d.ts | 720 +++++++++++++++++++++---- 2 files changed, 604 insertions(+), 120 deletions(-) diff --git a/types/dhtmlxgantt/dhtmlxgantt-tests.ts b/types/dhtmlxgantt/dhtmlxgantt-tests.ts index 6ea32b509d..e31665d486 100644 --- a/types/dhtmlxgantt/dhtmlxgantt-tests.ts +++ b/types/dhtmlxgantt/dhtmlxgantt-tests.ts @@ -28,10 +28,12 @@ gantt.locale.labels.new_task = "New task"; gantt.init("scheduler_here", start); gantt.load("/data/events"); +const wbs: string = gantt.getWBSCode(gantt.getTask(1)); + //events gantt.attachEvent("onBeforeLightbox", function (id?: string) { gantt.showTask(id); }); //gantt enterprise var gantt2 = Gantt.getGanttInstance(); -gantt2.config.api_date = "format"; +gantt2.config.xml_date = "format"; diff --git a/types/dhtmlxgantt/index.d.ts b/types/dhtmlxgantt/index.d.ts index 79d02cc181..2ce8793a25 100644 --- a/types/dhtmlxgantt/index.d.ts +++ b/types/dhtmlxgantt/index.d.ts @@ -1,18 +1,12 @@ -// Type definitions for dhtmlxGantt 4.0.0 -// Project: http://dhtmlx.com/docs/products/dhtmlxGantt +// Type definitions for dhtmlxGantt 6.0.0 +// Project: https://dhtmlx.com/docs/products/dhtmlxGantt // Definitions by: Maksim Kozhukh , Christophe Camicas // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - type GanttCallback = (...args: any[]) => any; -type GanttEventName = 'onAfterAutoSchedule'|'onAfterBatchUpdate'|'onAfterLightbox'|'onAfterLinkAdd'|'onAfterLinkDelete'|'onAfterLinkUpdate'|'onAfterRedo'|'onAfterTaskAdd'|'onAfterTaskAutoSchedule'|'onAfterTaskDelete'|'onAfterTaskDrag'|'onAfterTaskMove'|'onAfterTaskUpdate'|'onAfterUndo'|'onAjaxError'|'onBeforeAutoSchedule'|'onBeforeBatchUpdate'|'onBeforeCollapse'|'onBeforeDataRender'|'onBeforeExpand'|'onBeforeGanttReady'|'onBeforeGanttRender'|'onBeforeLightbox'|'onBeforeLinkAdd'|'onBeforeLinkDelete'|'onBeforeLinkDisplay'|'onBeforeLinkUpdate'|'onBeforeParse'|'onBeforeRedo'|'onBeforeRowDragEnd'|'onBeforeTaskAdd'|'onBeforeTaskAutoSchedule'|'onBeforeTaskChanged'|'onBeforeTaskDelete'|'onBeforeTaskDisplay'|'onBeforeTaskDrag'|'onBeforeTaskMove'|'onBeforeTaskSelected'|'onBeforeTaskUpdate'|'onBeforeUndo'|'onCircularLinkError'|'onClear'|'onCollapse'|'onColumnResize'|'onColumnResizeEnd'|'onColumnResizeStart'|'onContextMenu'|'onDataRender'|'onEmptyClick'|'onError'|'onExpand'|'onGanttReady'|'onGanttRender'|'onGanttScroll'|'onGridHeaderClick'|'onGridResize'|'onGridResizeEnd'|'onGridResizeStart'|'onLightbox'|'onLightboxButton'|'onLightboxCancel'|'onLightboxChange'|'onLightboxDelete'|'onLightboxSave'|'onLinkClick'|'onLinkDblClick'|'onLinkIdChange'|'onLinkValidation'|'onLoadEnd'|'onLoadStart'|'onMouseMove'|'onOptionsLoad'|'onParse'|'onRowDragEnd'|'onRowDragStart'|'onScaleAdjusted'|'onScaleClick'|'onTaskClick'|'onTaskClosed'|'onTaskCreated'|'onTaskDblClick'|'onTaskDrag'|'onTaskIdChange'|'onTaskLoading'|'onTaskOpened'|'onTaskRowClick'|'onTaskSelected'|'onTaskUnselected'|'onTemplatesReady'; +type GanttEventName = "onAfterAutoSchedule"|"onAfterBatchUpdate"|"onAfterLightbox"|"onAfterLinkAdd"|"onAfterLinkDelete"|"onAfterLinkUpdate"|"onAfterQuickInfo"|"onAfterRedo"|"onAfterSort"|"onAfterTaskAdd"|"onAfterTaskAutoSchedule"|"onAfterTaskDelete"|"onAfterTaskDrag"|"onAfterTaskMove"|"onAfterTaskUpdate"|"onAfterUndo"|"onAjaxError"|"onAutoScheduleCircularLink"|"onBeforeAutoSchedule"|"onBeforeBatchUpdate"|"onBeforeCollapse"|"onBeforeDataRender"|"onBeforeExpand"|"onBeforeGanttReady"|"onBeforeGanttRender"|"onBeforeLightbox"|"onBeforeLinkAdd"|"onBeforeLinkDelete"|"onBeforeLinkDisplay"|"onBeforeLinkUpdate"|"onBeforeMultiSelect"|"onBeforeParse"|"onBeforeRedo"|"onBeforeRedoStack"|"onBeforeRowDragEnd"|"onBeforeRowDragMove"|"onBeforeTaskAdd"|"onBeforeTaskAutoSchedule"|"onBeforeTaskChanged"|"onBeforeTaskDelete"|"onBeforeTaskDisplay"|"onBeforeTaskDrag"|"onBeforeTaskMove"|"onBeforeTaskMultiSelect"|"onBeforeTaskSelected"|"onBeforeTaskUpdate"|"onBeforeUndo"|"onBeforeUndoStack"|"onCircularLinkError"|"onClear"|"onCollapse"|"onColumnResize"|"onColumnResizeEnd"|"onColumnResizeStart"|"onContextMenu"|"onDataProcessorReady"|"onDataRender"|"onDestroy"|"onEmptyClick"|"onError"|"onExpand"|"onGanttLayoutReady"|"onGanttReady"|"onGanttRender"|"onGanttScroll"|"onGridHeaderClick"|"onGridResize"|"onGridResizeEnd"|"onGridResizeStart"|"onLightbox"|"onLightboxButton"|"onLightboxCancel"|"onLightboxChange"|"onLightboxDelete"|"onLightboxSave"|"onLinkClick"|"onLinkDblClick"|"onLinkIdChange"|"onLinkValidation"|"onLoadEnd"|"onLoadStart"|"onMouseMove"|"onMultiSelect"|"onOptionsLoad"|"onParse"|"onQuickInfo"|"onRowDragEnd"|"onRowDragStart"|"onScaleAdjusted"|"onScaleClick"|"onTaskClick"|"onTaskClosed"|"onTaskCreated"|"onTaskDblClick"|"onTaskDrag"|"onTaskIdChange"|"onTaskLoading"|"onTaskMultiSelect"|"onTaskOpened"|"onTaskRowClick"|"onTaskSelected"|"onTaskUnselected"|"onTemplatesReady"; interface GanttTemplates { - /** - * specifies the format of dates that are set by means of API methods. Used to parse incoming dates - * @param date the date which needs formatting - */ - api_date(date: Date): string; /** * specifies the content of start date or end date columns in grid @@ -37,7 +31,7 @@ interface GanttTemplates { drag_link(from: string|number, from_start: boolean, to: string|number, to_start: boolean): string; /** - * specifies the CSS class that will be applied to the link receiver (pop-up circle near the task bar) + * specifies the CSS class that will be applied to the pop-up that appears when a user drags a link * @param from the id of the source task * @param from_start true, if the link is being dragged from the start of the source task, false - if
from the end of the task * @param to the id of the target task( 'null' or 'undefined', if the target task isn't specified yet) @@ -96,6 +90,42 @@ interface GanttTemplates { */ grid_row_class(start: Date, end: Date, task: any): string; + /** + * defines the height of the filled area in the resourceHistogram + * @param start_date start date of the scale cell + * @param end_date end date of the scale cell + * @param resource the resource object + * @param tasks tasks that are assigned to the specified resource and overlap start/end dates of the cell + */ + histogram_cell_allocated(start_date: Date, end_date: Date, resource: any, tasks: any[]): void; + + /** + * specifies the height of the line that defines the available capacity of the resource + * @param start_date start date of the scale cell + * @param end_date end date of the scale cell + * @param resource the resource object + * @param tasks tasks that are assigned to the specified resource and overlap start/end dates of the cell + */ + histogram_cell_capacity(start_date: Date, end_date: Date, resource: any, tasks: any[]): void; + + /** + * defines the CSS class which is applied to a cell of the resource panel + * @param start_date start date of the scale cell + * @param end_date end date of the scale cell + * @param resource the resource object + * @param tasks tasks that are assigned to the specified resource and overlap start/end dates of the cell + */ + histogram_cell_class(start_date: Date, end_date: Date, resource: any, tasks: any[]): void; + + /** + * defines the label inside a cell + * @param start_date start date of the scale cell + * @param end_date end date of the scale cell + * @param resource the resource object + * @param tasks tasks that are assigned to the specified resource and overlap start/end dates of the cell + */ + histogram_cell_label(start_date: Date, end_date: Date, resource: any, tasks: any[]): void; + /** * specifies the CSS class that will be applied to a link * @param link the link object @@ -148,6 +178,24 @@ interface GanttTemplates { */ quick_info_title(start: Date, end: Date, task: any): string; + /** + * defines the CSS class names of cells in the resource timeline cells + * @param start_date start date of the scale cell + * @param end_date end date of the scale cell + * @param resource the resource object + * @param tasks tasks that are assigned to specified resource and overlap start/end dates of the cell + */ + resource_cell_class(start_date: Date, end_date: Date, resource: any, tasks: any[]): string; + + /** + * defines the HTML content of resource timeline cells + * @param start_date start date of the scale cell + * @param end_date end date of the scale cell + * @param resource the resource object + * @param tasks tasks that are assigned to specified resource and overlap start/end dates of the cell + */ + resource_cell_value(start_date: Date, end_date: Date, resource: any, tasks: any[]): string; + /** * specifies the CSS class that will be applied to cells of the time scale of the timeline area * @param date the date of a cell @@ -165,7 +213,7 @@ interface GanttTemplates { * @param item the task object assigned to the row * @param date the date of a cell */ - task_cell_class(item: Date, date: Date): string; + task_cell_class(item: any, date: Date): string; /** * specifies the CSS class that will be applied to task bars @@ -266,14 +314,9 @@ interface GanttTemplates { * @param task the task's object */ lightbox_header(start_date: Date, end_date: Date, task: any): string; - } interface GanttConfigOptions { - /** - * sets the date format for addTask() method to - */ - api_date: string; /** * enables auto scheduling @@ -281,7 +324,7 @@ interface GanttConfigOptions { auto_scheduling: boolean; /** - * allows or forbids creation of links from parent tasks (projects) to their children + * allows or forbids creating links from parent tasks (projects) to their children */ auto_scheduling_descendant_links: boolean; @@ -290,16 +333,36 @@ interface GanttConfigOptions { */ auto_scheduling_initial: boolean; + /** + * defines whether the whole project will be moved (see the details below) + */ + auto_scheduling_move_projects: boolean; + /** * enables the auto scheduling mode, in which tasks will always be rescheduled to the earliest possible date */ auto_scheduling_strict: boolean; + /** + * automatically converts tasks with subtasks to projects and projects without subtasks back to tasks + */ + auto_types: boolean; + /** * enables automatic adjusting of the grid's columns to the grid's width */ autofit: boolean; + /** + * enables autoscrolling while dragging a task or link out of the current browser screen + */ + autoscroll: boolean; + + /** + * defines the speed of autoscrolling (in ms) while dragging a task or link out of the current browser screen + */ + autoscroll_speed: number; + /** * forces the Gantt chart to automatically change its size to show all tasks without scrolling */ @@ -311,10 +374,15 @@ interface GanttConfigOptions { autosize_min_width: number; /** - * enables the dynamic loading in the Gantt chart + * enables dynamic loading in the Gantt chart */ branch_loading: boolean; + /** + * specifies that the task has children that are not yet loaded from the backend + */ + branch_loading_property: string; + /** * stores a collection of buttons resided in the left bottom corner of the lightbox */ @@ -325,6 +393,16 @@ interface GanttConfigOptions { */ buttons_right: any[]; + /** + * changes the name of the property that affects binding of a calendar to a task/group of tasks + */ + calendar_property: string; + + /** + * enables cascade deleting of nested tasks and links + */ + cascade_delete: boolean; + /** * configures the columns of the table */ @@ -380,6 +458,11 @@ interface GanttConfigOptions { */ drag_progress: boolean; + /** + * enables drag and drop of items of the project type + */ + drag_project: boolean; + /** * enables the possibility to resize tasks by drag-and-drop */ @@ -400,6 +483,11 @@ interface GanttConfigOptions { */ editable_property: string; + /** + * an object that contains definitions of inline editors + */ + editor_types: any; + /** * sets the end value of the time scale */ @@ -426,7 +514,7 @@ interface GanttConfigOptions { grid_resizer_column_attribute: string; /** - * sets the maximum width of the grid + * sets the width of the grid */ grid_width: number; @@ -446,15 +534,30 @@ interface GanttConfigOptions { initial_scroll: boolean; /** - * 'says' to preserve the initial grid's width during resizing the columns within + * 'says' to preserve the initial grid's width while resizing columns within */ keep_grid_width: boolean; + /** + * enables keyboard navigation in gantt + */ + keyboard_navigation: boolean; + + /** + * enables keyboard navigation by cells + */ + keyboard_navigation_cells: boolean; + /** * sets the name of the attribute of the task layer's DOM element */ layer_attribute: string; + /** + * specifies the layout object + */ + layout: any; + /** * specifies the lightbox object */ @@ -496,7 +599,7 @@ interface GanttConfigOptions { min_column_width: number; /** - * sets the minimum step (in milliseconds) for task's time values + * Sets the minimum duration (in milliseconds) that can be set for a task during resizing. */ min_duration: number; @@ -521,15 +624,20 @@ interface GanttConfigOptions { open_tree_initially: boolean; /** - * activates the 'branch' mode that allows dragging tasks only within the parent branch + * activates the 'branch' mode that allows reordering tasks within the same nesting level */ - order_branch: boolean; + order_branch: string|boolean; /** - * activates the 'branch' mode that allows dragging tasks within the whole gantt + * activates the 'branch' mode that allows reordering tasks within the whole gantt */ order_branch_free: boolean; + /** + * adds an empty row into the end of the list of tasks to simplify tasks editing via keyboard + */ + placeholder_task: boolean; + /** * preserves the current position of the vertical and horizontal scrolls while re-drawing the gantt chart */ @@ -565,6 +673,26 @@ interface GanttConfigOptions { */ redo: boolean; + /** + * defines a set of working calendars that can be assigned to a specific resource, e.g. a user + */ + resource_calendars: any; + + /** + * defines the property of a task object that stores a resource id associated with resourceGrid/Timeline/Histogram + */ + resource_property: string; + + /** + * tells the resource timeline to render elements and call templates for non-allocated cells + */ + resource_render_empty_cells: boolean; + + /** + * specifies the name of the dataStore connected to the resourceGrid/resourceTimeline/resourceHistogram views + */ + resource_store: string; + /** * sets the id of the virtual root element */ @@ -580,6 +708,11 @@ interface GanttConfigOptions { */ row_height: number; + /** + * switches gantt to the right-to-left mode + */ + rtl: boolean; + /** * sets the height of the time scale and the header of the grid */ @@ -600,6 +733,11 @@ interface GanttConfigOptions { */ scroll_on_click: boolean; + /** + * set the sizes of the vertical (width) and horizontal (height) scrolls + */ + scroll_size: number; + /** * enables selection of tasks in the Gantt chart */ @@ -665,6 +803,11 @@ interface GanttConfigOptions { */ smart_rendering: boolean; + /** + * specifies that only visible part of the time scale is rendered on the screen + */ + smart_scales: boolean; + /** * enables sorting in the table */ @@ -676,7 +819,7 @@ interface GanttConfigOptions { start_date: Date; /** - * sets the start day of weeks + * sets the starting day of the week */ start_on_monday: boolean; @@ -731,12 +874,12 @@ interface GanttConfigOptions { tooltip_hide_timeout: number; /** - * sets the the right (if positive) offset of the tooltip's position + * sets the right (if positive) offset of the tooltip's position */ tooltip_offset_x: number; /** - * sets the the top (if positive) offset of the tooltip's position + * sets the top (if positive) offset of the tooltip's position */ tooltip_offset_y: number; @@ -756,10 +899,15 @@ interface GanttConfigOptions { touch_drag: number|boolean; /** - * enables/disables vibration while moving tasks on touch devices + * returns vibration feedback before/after drag and drop on touch devices */ touch_feedback: boolean; + /** + * defines the duration of vibration feedback before/after drag and drop on touch devices (in milliseconds) + */ + touch_feedback_duration: number; + /** * redefines functions responsible for displaying different types of tasks */ @@ -790,33 +938,33 @@ interface GanttConfigOptions { */ undo_types: any; + /** + * enables WAI-ARIA support to make the component recognizable for screen readers + */ + wai_aria_attributes: boolean; + /** * enables calculating the duration of tasks in working time instead of calendar time */ work_time: boolean; /** - * sets the date format that is used to parse data from the data set + * defines date formats that are used to parse data from a data set and to send data to a server */ xml_date: string; - } interface GanttDateHelpers { add(origin: Date, count: number, unit: string): Date; copy(origin: Date): Date; - date_part(origin: Date): Date; time_part(origin: Date): Date; - day_start(origin: Date): Date; month_start(origin: Date): Date; week_start(origin: Date): Date; year_start(origin: Date): Date; - getISOWeek(origin: Date): number; getUTCISOWeek(origin: Date): number; - date_to_str(format: string): any; str_to_date(format: string): any; convert_to_utc(origin: Date): Date; @@ -828,8 +976,6 @@ interface GanttHotkeys { edit_cancel: number; } -//Gantt.locale - interface GanttLocaleDate { month_full: string[]; month_short: string[]; @@ -867,22 +1013,102 @@ interface GanttLocale { } interface GanttEnterprise { - /** - * Creates a new instance of Gantt - */ getGanttInstance(): GanttStatic; } interface GanttStatic { - templates: GanttTemplates; - config: GanttConfigOptions; - date: GanttDateHelpers; - keys: GanttHotkeys; - skin: string; - version: string; - locale: GanttLocale; + + /** + * redefines the default click behavior for buttons of the Gantt chart + */ $click: any; + /** + * dhtmlx ajax module + */ + ajax: any; + + /** + * the interface of the working calendar object + */ + calendar: any; + + /** + * defines configuration options for dates, scale, controls + */ + config: GanttConfigOptions; + + /** + * stores various constants to reduce the use of magic numbers in the code + */ + constants: any; + + /** + * a set of date formatting methods + */ + date: GanttDateHelpers; + + /** + * a set of flags which describe current environment + */ + env: any; + + /** + * an object that stores various extensions + */ + ext: any; + + /** + * specifies JSON serialization and parsing + */ + json: any; + + /** + * defines the hot keys for the Gantt chart + */ + keys: GanttHotkeys; + + /** + * a locale object (region-specific labels) of the Gantt chart + */ + locale: GanttLocale; + + /** + * specifies serialization and parsing in the XML format of dhtmlxGantt 1.0 + */ + oldxml: any; + + /** + * returns the current skin of the Gantt chart + */ + skin: string; + + /** + * returns objects of the available skins + */ + skins: any; + + /** + * defines formatting templates for dates, titles, tooltips in the Gantt chart + */ + templates: GanttTemplates; + + /** + * returns the version of dhtmlxGantt + */ + version: string; + + /** + * specifies XML serialization and parsing + */ + xml: any; + + /** + * adds a calendar into Gantt + * @param calendar an object with configuration of the calendar + */ + addCalendar(calendar: any): number; + /** * adds a new dependency link * @param link the link object @@ -890,10 +1116,10 @@ interface GanttStatic { addLink(link: any): string|number; /** - * displayes an additional layer with custom elements for a link in the timeline area - * @param func a render function or a config object + * displays an additional layer with custom elements for a link in the timeline area + * @param func a render function or a config object */ - addLinkLayer(func: GanttCallback|any): string; + addLinkLayer(func: any): string; /** * adds a marker to the timeline area @@ -901,25 +1127,33 @@ interface GanttStatic { */ addMarker(marker: any): string; + /** + * adds a new keyboard shortcut + * @param shortcut the key name or the name of keys combination for a shortcut (
shortcut syntax) + * @param handler the handler of the shortcut call + * @param scope the name of the context element to attach the handler function to (list of scopes) + */ + addShortcut(shortcut: string, handler: GanttCallback, scope: string): void; + /** * adds a new task * @param task the task object * @param parent the parent's id - * @param index optional, the position the task will be added into (0 or greater) + * @param index optional, optional, the position the task will be added into (0 or greater) */ addTask(task: any, parent: string, index?: number): string|number; /** - * displayes an additional layer with custom elements for a task in the timeline area - * @param func a render function or a config object + * displays an additional layer with custom elements for a task in the timeline area + * @param func a render function or a config object */ - addTaskLayer(func: GanttCallback|any): string; + addTaskLayer(func: any): string; /** * calls an alert message box * @param config the alert box's configuration */ - alert(config: any): void; + alert(config: any): HTMLElement; /** * if the specified expression is false, an errorMessage is shown in the red popup at the top right corner of the screen @@ -937,8 +1171,9 @@ interface GanttStatic { /** * recalculates the schedule of the project + * @param taskId optional, optional, the task id */ - autoSchedule(): void; + autoSchedule(taskId?: string|number): void; /** * updates multiple tasks/links at once @@ -955,18 +1190,15 @@ interface GanttStatic { /** * calculates the duration of a task - * @param start the date when a task is scheduled to begin - * @param end the date when a task is scheduled to be completed + * @param config the configuration object of a time span */ - calculateDuration(start: Date, end: Date): number; + calculateDuration(config: any): number; /** * calculates the end date of a task - * @param start the date when a task is scheduled to begin - * @param duration the duration of a task - * @param unit the time unit of the duration + * @param config the configuration object of a time span */ - calculateEndDate(start: Date, duration: number, unit: string): Date; + calculateEndDate(config: any): Date; /** * calculates the level of a task @@ -982,10 +1214,10 @@ interface GanttStatic { callEvent(name: string, params: any[]): boolean; /** - * changes the name of the lighbox's structure defined for of the task - * @param id the task id + * repaints the lighbox for the task according to its type + * @param type the task type */ - changeLightboxType(id: string|number): void; + changeLightboxType(type: string): void; /** * changes the link's id @@ -1008,10 +1240,20 @@ interface GanttStatic { checkEvent(name: GanttEventName): boolean; /** - * removes all tasks from the Gantt chart + * removes all tasks and additional elements (including markers) from the Gantt chart */ clearAll(): void; + /** + * clears the stack of stored redo commands + */ + clearRedoStack(): void; + + /** + * clears the stack of stored undo commands + */ + clearUndoStack(): void; + /** * closes the branch with the specified id * @param id the branch id @@ -1023,11 +1265,17 @@ interface GanttStatic { */ collapse(): void; + /** + * returns the index of the column by the date + * @param date a date object + */ + columnIndexByDate(date: Date): void; + /** * calls a confirm message box * @param config the confirm box's configuration */ - confirm(config: any): void; + confirm(config: any): HTMLElement; /** * creates a deep copy of provided object @@ -1041,11 +1289,23 @@ interface GanttStatic { */ correctTaskWorkTime(task: any): void; + /** + * creates a working calendar + * @param parentCalendar optional, (optional) an existing calendar that is used for creating a new one on the base of it + */ + createCalendar(parentCalendar?: any): void; + + /** + * creates a datastore according to the provided configuration + * @param config a configuration object of a datastore + */ + createDatastore(config: any): void; + /** * adds a new task and opens the lightbox to confirm * @param task the task object * @param parent the parent's id - * @param index optional, the position the task will be added into (0 or greater) + * @param index optional, optional, the position the task will be added into (0 or greater) */ createTask(task: any, parent: string, index?: number): string|number; @@ -1056,7 +1316,7 @@ interface GanttStatic { dataProcessor(url: string): void; /** - * returns the date of the specified horizontal position in the chart area + * gets the date of the specified horizontal position in the chart area * @param pos the relative horizontal position you want to know the date of */ dateFromPos(pos: number): Date; @@ -1067,6 +1327,12 @@ interface GanttStatic { */ defined(task: any): boolean; + /** + * deletes a task calendar by its id + * @param id the id of the calendar + */ + deleteCalendar(id: string|number): void; + /** * deletes the specified dependency link * @param id the dependency link's id @@ -1083,7 +1349,12 @@ interface GanttStatic { * deletes the specified task * @param id the task's id */ - deleteTask(id: string): void; + deleteTask(id: string|number): void; + + /** + * destroys the gantt instance + */ + destructor(): void; /** * detaches all events from dhtmlxGantt (both custom and inner) @@ -1096,6 +1367,14 @@ interface GanttStatic { */ detachEvent(id: string): void; + /** + * iterates over all parent tasks of the specified task in the Gantt chart + * @param code a function that will iterate over tasks. Takes a task object as a parameter + * @param startTask the id of the item the parent tasks of which should be iterated over + * @param master optional, the object, that 'this' will refer to + */ + eachParent(code: GanttCallback, startTask: string|number, master?: any): void; + /** * iterates over all selected tasks in the Gantt chart * @param code a function that will iterate over tasks. Takes a task id as a parameter @@ -1103,10 +1382,10 @@ interface GanttStatic { eachSelectedTask(code: GanttCallback): void; /** - * iterates over specified tasks in the Gantt chart + * iterates over all child tasks in the Gantt chart * @param code a function that will iterate over tasks. Takes a task object as a parameter - * @param parent the parent id. If specified, the function will iterate over childs of the
specified parent - * @param master the object, that 'this' will refer to + * @param parent optional, the parent id. If specified, the function will iterate over childs of the
specified parent + * @param master optional, the object, that 'this' will refer to */ eachTask(code: GanttCallback, parent?: string|number, master?: any): void; @@ -1115,21 +1394,81 @@ interface GanttStatic { * @param node the HTML node or its id * @param event the name of an HTML event (without the 'on' prefix) * @param handler the event handler - * @param master an object that the this keyword refers to + * @param options optional, optional, the value of either the useCapture or options parameter. Read details */ - event(node: HTMLElement|string, event: string, handler: GanttCallback, master?: any): string; + event(node: HTMLElement|string, event: string, handler: GanttCallback, options?: any): void; /** * removes an event handler from an HTML element - * @param id the id of an event handler + * @param node the HTML node or its id + * @param event the name of an HTML event (without the 'on' prefix) + * @param handler the event handler + * @param options optional, optional, the value of either the useCapture or options parameter. Read details */ - eventRemove(id: string): void; + eventRemove(node: HTMLElement|string, event: string, handler: GanttCallback, options?: any): void; /** * expands gantt to the full screen mode */ expand(): void; + /** + * exports data from the Gantt chart to an Excel document + * @param _export_ an object with export settings (see the details) + */ + exportToExcel(_export_: any): void; + + /** + * exports data from the Gantt chart to an iCal string + * @param _export_ an object with export settings (see the details) + */ + exportToICal(_export_: any): void; + + /** + * exports the structure and data of a Gantt chart into a JSON object + * @param config an object with Gantt configuration + */ + exportToJSON(config: any): void; + + /** + * exports data from the Gantt chart to MS Project + * @param _export_ an object with export settings (see the details) + */ + exportToMSProject(_export_: any): void; + + /** + * exports a Gantt chart into the PDF format + * @param _export_ an object with export settings (see the details) + */ + exportToPDF(_export_: any): void; + + /** + * exports a Gantt chart into the PNG format + * @param _export_ an object with export settings (see the details) + */ + exportToPNG(_export_: any): void; + + /** + * returns all dependency loops in the chart + */ + findCycles(): any[]; + + /** + * sets focus on the gantt + */ + focus(): void; + + /** + * gets worktime calendar by id + * @param calendarId the id of the global calendar or "global" + */ + getCalendar(calendarId: string|number): any; + + /** + * gets all the calendars added into Gantt + */ + getCalendars(): any[]; + /** * returns the 1st-level child tasks of the specified parent branch * @param id the parent branch's id @@ -1143,10 +1482,34 @@ interface GanttStatic { getClosestWorkTime(config: any): Date; /** - * get the index of a task in the tree + * returns the index of the column by its name + * @param name the name of the column + */ + getColumnIndex(name: string): number; + + /** + * returns all tasks and links that a task is connected with + * @param id optional, optional, the id of a task + */ + getConnectedGroup(id?: string|number): any; + + /** + * returns the configuration object of a datastore + * @param name the name of the datastore + */ + getDatastore(name: string): any; + + /** + * returns the free slack of a task + * @param task the object of a task + */ + getFreeSlack(task: any): number; + + /** + * gets the index of a task in the tree * @param id the task id */ - getGlobalTaskIndex(id: string|number): void; + getGlobalTaskIndex(id: string|number): number; /** * gets the configuration object of a column @@ -1251,10 +1614,21 @@ interface GanttStatic { getPrevSibling(id: string|number): string|number; /** - * returns the stack of stored redo commands + * returns the stack of stored redo user actions */ getRedoStack(): any[]; + /** + * returns all tasks assigned to the resource + * @param resourceId the id of the resource + */ + getResourceAssignments(resourceId: string|number): any[]; + + /** + * returns the configuration of the time scale + */ + getScale(): any; + /** * returns the scroll position */ @@ -1263,13 +1637,20 @@ interface GanttStatic { /** * returns the id of the selected task */ - getSelectedId(): string|number; + getSelectedId(): string; /** * returns an array of the currently selected tasks */ getSelectedTasks(): any[]; + /** + * gets a key navigation shortcut handler + * @param shortcut the key name or the name of keys combination for a shortcut (shortcut syntax) + * @param scope the name of the context element to attach the handler function to (list of scopes) + */ + getShortcutHandler(shortcut: string, scope: string): GanttCallback; + /** * returns siblings of the specified task (including itself) * @param id the task id @@ -1290,30 +1671,66 @@ interface GanttStatic { /** * calculates the combined start/end dates of tasks nested in a project or another task - * @param task_id the task's id, api/gantt_root_id_config.md will be used if not specified + * @param task_id optional, the task's id, api/gantt_root_id_config.md will be used if not specified */ getSubtaskDates(task_id?: string|number): any; + /** + * calculates the combined duration of tasks nested in a project or another task. + * @param task_id optional, the task's id, api/gantt_root_id_config.md will be used if not specified + */ + getSubtaskDuration(task_id?: string|number): number; + /** * returns the task object * @param id the task id */ getTask(id: string|number): any; + /** + * finds a task by the specified criteria + * @param propertyName the name of the property to match, or a filter function + * @param propertyValue the property value + */ + getTaskBy(propertyName: string|GanttCallback, propertyValue: any): any[]; + + /** + * returns a task by its index + * @param index the task index in the tree (zero-based numbering) + */ + getTaskByIndex(index: number): any; + /** * returns a collection of tasks which occur during the specified period - * @param from the start date of the period - * @param to the end date of the period + * @param from optional, the start date of the period + * @param to optional, the end date of the period */ getTaskByTime(from?: Date, to?: Date): any[]; + /** + * returns a task by its WBS code + * @param code the WBS code of the task + */ + getTaskByWBSCode(code: string): any; + + /** + * gets a calendar assigned to the specified task (a task level calendar) + * @param task the object of a task + */ + getTaskCalendar(task: any): any; + /** * gets the number of tasks that are currently loaded in the gantt */ getTaskCount(): number; /** - * get the index of a task in the branch + * returns the visible height of a task + */ + getTaskHeight(): number; + + /** + * gets the index of a task in the branch * @param id the task id */ getTaskIndex(id: string|number): number; @@ -1345,7 +1762,19 @@ interface GanttStatic { getTaskTop(id: number|string): number; /** - * returns the stack of stored undo commands + * returns the type of a task + * @param task the task object + */ + getTaskType(task: any): string; + + /** + * returns the total slack of a task + * @param task the object of a task + */ + getTotalSlack(task: any): number; + + /** + * returns the stack of stored undo user actions */ getUndoStack(): any[]; @@ -1354,6 +1783,12 @@ interface GanttStatic { */ getVisibleTaskCount(): number; + /** + * returns the WBS code (the outline number) of a task + * @param task the object of a task + */ + getWBSCode(task: any): string; + /** * returns the working hours of the specified date * @param date a date to check @@ -1374,7 +1809,7 @@ interface GanttStatic { /** * hides the lightbox modal overlay that blocks interactions with the remaining screen - * @param box an element to hide + * @param box optional, an element to hide */ hideCover(box?: HTMLElement): void; @@ -1388,11 +1823,23 @@ interface GanttStatic { */ hideQuickInfo(): void; + /** + * converts an Excel file to JSON + * @param config an object with configuration properties of an imported file + */ + importFromExcel(config: any): void; + + /** + * converts an XML or MPP MS Project file to JSON + * @param config an object with configuration properties of an imported file + */ + importFromMSProject(config: any): void; + /** * constructor. Initializes a dhtmlxGantt object * @param container an HTML container ( or its id) where a dhtmlxGantt object will be initialized - * @param from the start value of the time scale (X–Axis) - * @param to the end value of the time scale (X–Axis) + * @param from optional, the start value of the time scale (X–Axis) + * @param to optional, the end value of the time scale (X–Axis) */ init(container: string|HTMLElement, from?: Date, to?: Date): void; @@ -1403,6 +1850,12 @@ interface GanttStatic { */ isChildOf(childId: string|number, parentId: string|number): boolean; + /** + * checks whether the link is circular + * @param link the link object + */ + isCircularLink(link: any): boolean; + /** * checks whether the specified link is critical * @param link the link's object @@ -1427,12 +1880,30 @@ interface GanttStatic { */ isLinkExists(id: string|number): boolean; + /** + * checks whether the specified task or link is read-only + * @param id the task/link id + */ + isReadonly(id: string|number): boolean; + /** * checks whether the specified task is currently selected * @param task the task's id */ isSelectedTask(task: string|number): boolean; + /** + * checks whether the specified task is split + * @param task the object of a task + */ + isSplitTask(task: any): boolean; + + /** + * checks whether the specified task is summary + * @param task the object of a task + */ + isSummaryTask(task: any): boolean; + /** * checks whether the specified task exists * @param id the task id @@ -1453,16 +1924,15 @@ interface GanttStatic { /** * checks whether the specified date is working or not - * @param date a date to check - * @param timeunit a time unit: 'hour' or 'day'.
If not specified, the value of 'gantt.config.duration_unit' is used + * @param config the configuration object of a time span */ - isWorkTime(date: Date, timeunit: string): boolean; + isWorkTime(config: any): boolean; /** * loads data to the gantt from an external data source * @param url the server-side url (may be a static file or a server side script that outputs data) - * @param type ('json', 'xml', 'oldxml') the data type. The default value - 'json' - * @param callback the callback function + * @param type optional, ('json', 'xml', 'oldxml') the data type. The default value - 'json' + * @param callback optional, the callback function */ load(url: string, type?: string, callback?: GanttCallback): void; @@ -1476,7 +1946,7 @@ interface GanttStatic { * calls a message box of the specified type * @param config the message box's configuration */ - message(config: any): void; + message(config: any): HTMLElement; /** * adds properties of the 'source' object into the 'target' object @@ -1488,15 +1958,15 @@ interface GanttStatic { /** * calls a modalbox - * @param config the modal box' configuration + * @param config the modal box's configuration */ - modalbox(config: any): void; + modalbox(config: any): HTMLElement; /** * moves a task to a new position * @param sid the id of the task to move * @param tindex the index of the position that the task will be moved to
(the index within a branch) - * @param parent the parent id. If specified, the tindex will refer to the index in the
'parent' branch + * @param parent optional, the parent id. If specified, the tindex will refer to the index in the
'parent' branch */ moveTask(sid: string|number, tindex: number, parent?: string|number): void; @@ -1509,9 +1979,9 @@ interface GanttStatic { /** * loads data from a client-side resource * @param url a string or object which represents data - * @param type ( 'json', 'xml' ) the data type. The default value - 'json' + * @param type optional, optional, ('json', 'xml') the data type. The default value - 'json' */ - parse(url: string|any, type?: string): void; + parse(url: any, type?: string): void; /** * gets the relative horizontal position of the specified date in the chart area @@ -1538,8 +2008,9 @@ interface GanttStatic { /** * refreshes the task and its related links * @param id the task id + * @param refresh_links optional, optional, defines whether links related to the task should be refreshed, true by default */ - refreshTask(id: string|number): void; + refreshTask(id: string|number, refresh_links?: boolean): void; /** * removes the specified layer related to a link @@ -1547,6 +2018,13 @@ interface GanttStatic { */ removeLinkLayer(layerId: string): void; + /** + * removes a keyboard shortcut + * @param shortcut the key name or the name of keys combination for a shortcut (shortcut syntax) + * @param scope the element to which the shortcut is attached (list of scopes) + */ + removeShortcut(shortcut: string, scope: any): void; + /** * removes the specified layer related to a task * @param layerId a DOM element that will be displayed in the layer @@ -1569,7 +2047,7 @@ interface GanttStatic { resetLightbox(): void; /** - * re-calculates the duration of a project task depending on dates its childs + * re-calculates the duration of a project task depending on the dates of its children * @param task the task's object */ resetProjectDates(task: any): void; @@ -1598,8 +2076,8 @@ interface GanttStatic { /** * scrolls the Gantt container to the specified position - * @param x the value of the horizontal scroll or 'null' (to not display the horizontal scroll) - * @param y the value of the vertical scroll or 'null' (to not display the vertical scroll) + * @param x value of horizontal scroll or 'null' (if the scroll position shouldn't be changed) + * @param y value of vertical scroll or 'null' (if the scroll position shouldn't be changed) */ scrollTo(x: number, y: number): void; @@ -1611,16 +2089,16 @@ interface GanttStatic { /** * serializes the data into JSON or XML format - * @param type the format that the data will be serialized into.
Possible values: 'json' (default ), 'xml'. + * @param type optional, the format that the data will be serialized into.
Possible values: 'json' (default ), 'xml'. */ serialize(type?: string): void; /** * returns a list of options * @param list_name the name of a list - * @param options an array of options + * @param options optional, an array of options */ - serverList(list_name: string, options?: any[]): void; + serverList(list_name: string, options?: any[]): any[]; /** * set the parent for a task @@ -1642,7 +2120,7 @@ interface GanttStatic { /** * shows the lightbox modal overlay that blocks interactions with the remaining screen - * @param box an element to hide + * @param box optional, an element to hide */ showCover(box?: HTMLElement): void; @@ -1671,11 +2149,11 @@ interface GanttStatic { showTask(id: string|number): void; /** - * sorts the tasks in the grid - * @param field the name of the column that the grid will be sorted by or a custom
sorting function - * @param desc specifies the sorting direction: true - descending sort and false - ascending
sort. By default, false - * @param parent the id of the parent task. Specify the parameter if you want to sort tasks only in
the branch of the specified parent. - * @param silent specifies whether rendering shall be invoked after reordering items + * sorts tasks in the grid + * @param field the name of the column that the grid will be sorted by or a custom sorting function + * @param desc optional, specifies the sorting direction: true - descending sort and false - ascending
sort. By default, false + * @param parent optional, the id of the parent task. Specify the parameter if you want to sort tasks only in the branch of the specified parent. + * @param silent optional, specifies whether rendering should be invoked after reordering items */ sort(field: string|GanttCallback, desc?: boolean, parent?: string|number, silent?: boolean): void; @@ -1697,8 +2175,15 @@ interface GanttStatic { /** * removes selection from the selected task + * @param id optional, optional, the id of the task to remove selection from, see details */ - unselectTask(): void; + unselectTask(id?: string|number): void; + + /** + * unsets a working time in the Gantt Chart + * @param config the configuration object of a time span + */ + unsetWorkTime(config: any): void; /** * updates the specified collection with new options @@ -1724,11 +2209,8 @@ interface GanttStatic { * @param id the task id */ updateTask(id: string): void; - } - - declare var gantt: GanttStatic; declare var Gantt: GanttEnterprise; @@ -1737,5 +2219,5 @@ declare module "gantt" { } declare module "Gantt" { - export = GanttEnterprise; -} + export = Gantt; +} \ No newline at end of file From f76c861cc9a2aeeadf2e6373313b4b24f9549ba8 Mon Sep 17 00:00:00 2001 From: Tyler Date: Mon, 3 Dec 2018 09:23:25 -0700 Subject: [PATCH 281/608] drop children prop --- types/react-flatpickr/index.d.ts | 1 - types/react-flatpickr/react-flatpickr-tests.tsx | 13 ------------- 2 files changed, 14 deletions(-) diff --git a/types/react-flatpickr/index.d.ts b/types/react-flatpickr/index.d.ts index 5e3b12fdf8..c867527b06 100644 --- a/types/react-flatpickr/index.d.ts +++ b/types/react-flatpickr/index.d.ts @@ -20,7 +20,6 @@ export interface DateTimePickerProps { onValueUpdate?: flatpickr.Options.Hook; onDayCreate?: flatpickr.Options.Hook; value?: string | Date | number | ReadonlyArray; - children?: JSX.Element | JSX.Element[]; } export default class DatePicker extends Component {} diff --git a/types/react-flatpickr/react-flatpickr-tests.tsx b/types/react-flatpickr/react-flatpickr-tests.tsx index c51f527707..7a1c64c266 100644 --- a/types/react-flatpickr/react-flatpickr-tests.tsx +++ b/types/react-flatpickr/react-flatpickr-tests.tsx @@ -40,16 +40,3 @@ const valueDateArrayElement = ( const valueNumberArrayElement = ( ); - -const wrappedElement = ( - - - -); - -const wrappedElements = ( - - - - -); From 6323a5a8f02b82c5723bc2d807a64f7c7536bdb0 Mon Sep 17 00:00:00 2001 From: AlexKlimenkov Date: Mon, 3 Dec 2018 19:43:42 +0300 Subject: [PATCH 282/608] [dhtmlxgantt] restore calculateDuration/calculateEndDate/isWorkTime signatures --- types/dhtmlxgantt/index.d.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/types/dhtmlxgantt/index.d.ts b/types/dhtmlxgantt/index.d.ts index 2ce8793a25..f2e322b0e3 100644 --- a/types/dhtmlxgantt/index.d.ts +++ b/types/dhtmlxgantt/index.d.ts @@ -1188,12 +1188,27 @@ interface GanttStatic { */ bind(method: GanttCallback, thisArg: any): GanttCallback; + /** + * calculates the duration of a task + * @param start the date when a task is scheduled to begin + * @param end the date when a task is scheduled to be completed + */ + calculateDuration(start: Date, end: Date): number; + /** * calculates the duration of a task * @param config the configuration object of a time span */ calculateDuration(config: any): number; + /** + * calculates the end date of a task + * @param start the date when a task is scheduled to begin + * @param duration the duration of a task + * @param unit the time unit of the duration + */ + calculateEndDate(start: Date, duration: number, unit: string): Date; + /** * calculates the end date of a task * @param config the configuration object of a time span @@ -1922,6 +1937,13 @@ interface GanttStatic { */ isUnscheduledTask(task: any): boolean; + /** + * checks whether the specified date is working or not + * @param date a date to check + * @param timeunit a time unit: 'hour' or 'day'.
If not specified, the value of 'gantt.config.duration_unit' is used + */ + isWorkTime(date: Date, timeunit: string): boolean; + /** * checks whether the specified date is working or not * @param config the configuration object of a time span From 3c3c8d08c4731bb69d8a507a1a24741d107c7200 Mon Sep 17 00:00:00 2001 From: Jessica Franco Date: Tue, 4 Dec 2018 02:12:08 +0900 Subject: [PATCH 283/608] Remove useMutationEffect (#31013) https://github.com/facebook/react/pull/14336 --- types/react/index.d.ts | 11 ----------- types/react/test/hooks.tsx | 4 +--- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/types/react/index.d.ts b/types/react/index.d.ts index f525d7838c..71885b7253 100644 --- a/types/react/index.d.ts +++ b/types/react/index.d.ts @@ -834,17 +834,6 @@ declare namespace React { */ // TODO (TypeScript 3.0): function useRef(initialValue: T|null): RefObject; - /** - * The signature is identical to `useEffect`, but it fires synchronously during the same phase that - * React performs its DOM mutations, before sibling components have been updated. Use this to perform - * custom DOM mutations. - * - * Prefer the standard `useEffect` when possible to avoid blocking visual updates. - * - * @version experimental - * @see https://reactjs.org/docs/hooks-reference.html#usemutationeffect - */ - function useMutationEffect(effect: EffectCallback, inputs?: InputIdentityList): void; /** * The signature is identical to `useEffect`, but it fires synchronously after all DOM mutations. * Use this to read layout from the DOM and synchronously re-render. Updates scheduled inside diff --git a/types/react/test/hooks.tsx b/types/react/test/hooks.tsx index c3495dd717..5239d3b522 100644 --- a/types/react/test/hooks.tsx +++ b/types/react/test/hooks.tsx @@ -95,11 +95,9 @@ function useEveryHook(ref: React.Ref<{ id: number }>|undefined): () => boolean { // $ExpectError React.useImperativeMethods(ref, () => ({}), [id]); - React.useMutationEffect(() => { + React.useLayoutEffect(() => { setState(1); setState(prevState => prevState - 1); - }, []); - React.useLayoutEffect(() => { didLayout.current = true; }, []); React.useEffect(() => { From 90913fd842c38307b9a3ec9659e8c1695ddd8f6d Mon Sep 17 00:00:00 2001 From: Ilari Aarnio Date: Mon, 3 Dec 2018 19:47:33 +0200 Subject: [PATCH 284/608] Enhance type definitions for boxes and options --- types/imap-simple/index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/types/imap-simple/index.d.ts b/types/imap-simple/index.d.ts index a45629f234..398bcb6a26 100644 --- a/types/imap-simple/index.d.ts +++ b/types/imap-simple/index.d.ts @@ -52,8 +52,8 @@ export class ImapSimple extends NodeJS.EventEmitter { delBox(boxName: string): Promise; /** Returns the full list of mailboxes (folders). Upon success, either the provided callback will be called with signature (err, boxes), or the returned promise will be resolved with boxes. Boxes is the exact object returned from the node-imap getBoxes() result. */ - getBoxes(callback: (err: Error, boxes: any) => void): void; - getBoxes(): Promise; + getBoxes(callback: (err: Error, boxes: Imap.MailBoxes) => void): void; + getBoxes(): Promise; /** Search for and retrieve mail in the previously opened mailbox. */ search(searchCriteria: any[], fetchOptions: Imap.FetchOptions, callback: (err: Error, messages: Message[]) => void): void; @@ -71,8 +71,8 @@ export class ImapSimple extends NodeJS.EventEmitter { addMessageLabel(source: string | string[], label: string | string[]): Promise; /** Appends the argument message to the currently open mailbox or another mailbox. Message is a RFC-822 compatible MIME message. Valid options are mailbox, flags and date. When completed, either calls the provided callback with signature (err), or resolves the returned promise. */ - append(message: any, options: any, callback: (err: Error) => void): void; - append(message: any, options: any): Promise; + append(message: any, options: Imap.AppendOptions, callback: (err: Error) => void): void; + append(message: any, options: Imap.AppendOptions): Promise; /** Moves the specified message(s) in the currently open mailbox to another mailbox. source corresponds to a node-imap MessageSource which specifies the messages to be moved. When completed, either calls the provided callback with signature (err), or resolves the returned promise. */ moveMessage(source: string | string[], boxName: string, callback: (err: Error) => void): void; From 5a68ad88cdaf234bc74ee5a767ba637f3c2ae680 Mon Sep 17 00:00:00 2001 From: Mark Wolff Date: Mon, 3 Dec 2018 09:50:02 -0800 Subject: [PATCH 285/608] Change jsdoc links to url links --- types/applicationinsights-js/index.d.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/types/applicationinsights-js/index.d.ts b/types/applicationinsights-js/index.d.ts index ee509a0eb5..ea80ad1ddb 100644 --- a/types/applicationinsights-js/index.d.ts +++ b/types/applicationinsights-js/index.d.ts @@ -671,15 +671,15 @@ declare module Microsoft.ApplicationInsights { queue: Array<() => void>; /** * Starts the timer for tracking a page load time. Use this instead of `trackPageView` if you want to control when the page view timer starts and stops, - * but don't want to calculate the duration yourself. This method doesn't send any telemetry. Call `stopTrackPage` to log the end of the page view + * but don't want to calculate the duration yourself. This method doesn't send any telemetry. Call [`stopTrackPage`](https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#stoptrackpage) to log the end of the page view * and send the event. * @param name A string that idenfities this item, unique within this HTML document. Defaults to the document title. */ startTrackPage(name?: string): any; /** - * Stops the timer that was started by calling `startTrackPage` and sends the pageview load time telemetry with the specified properties and measurements. + * Stops the timer that was started by calling [`startTrackPage`](https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#starttrackpage) and sends the pageview load time telemetry with the specified properties and measurements. * The duration of the page view will be the time between calling `startTrackPage` and `stopTrackPage`. - * @param name The string you used as the name in startTrackPage. Defaults to the document title. + * @param name The string you used as the name in `startTrackPage`. Defaults to the document title. * @param url String - a relative or absolute URL that identifies the page or other item. Defaults to the window location. * @param properties map[string, string] - additional data used to filter pages and metrics in the portal. Defaults to empty. * @param measurements map[string, number] - metrics associated with this page, displayed in Metrics Explorer on the portal. Defaults to empty. @@ -691,7 +691,7 @@ declare module Microsoft.ApplicationInsights { measurements?: { [name: string]: number }): any; /** * Logs that a page or other item was viewed. - * @param name The string you used as the name in startTrackPage. Defaults to the document title. + * @param name The string you used as the name in `startTrackPage`. Defaults to the document title. * @param url String - a relative or absolute URL that identifies the page or other item. Defaults to the window location. * @param properties map[string, string] - additional data used to filter pages and metrics in the portal. Defaults to empty. * @param measurements map[string, number] - metrics associated with this page, displayed in Metrics Explorer on the portal. Defaults to empty. @@ -703,13 +703,13 @@ declare module Microsoft.ApplicationInsights { properties?: { [name: string]: string }, measurements?: { [name: string]: number }, duration?: number): any; /** - * Start timing an extended event. Call {@link stopTrackEvent} to log the event when it ends. + * Start timing an extended event. Call [`stopTrackEvent`](https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#stoptrackevent) to log the event when it ends. * @param name A string that identifies this event uniquely within the document. */ startTrackEvent(name: string): any; /** - * Log an extended event that you started timing with {@link startTrackEvent}. - * @param name The string you used to identify this event in startTrackEvent. + * Log an extended event that you started timing with [`startTrackEvent`](https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#starttrackevent). + * @param name The string you used to identify this event in `startTrackEvent`. * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty. * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty. */ From 9240926c4bc7dfe6fb7bcf4175fb7be93f7b35ad Mon Sep 17 00:00:00 2001 From: feinoujc Date: Mon, 3 Dec 2018 14:28:35 -0500 Subject: [PATCH 286/608] bump other packages --- types/pollyjs__adapter-fetch/index.d.ts | 2 +- types/pollyjs__adapter/index.d.ts | 2 +- types/pollyjs__persister-fs/index.d.ts | 2 +- types/pollyjs__persister/index.d.ts | 2 +- types/pollyjs__utils/index.d.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/types/pollyjs__adapter-fetch/index.d.ts b/types/pollyjs__adapter-fetch/index.d.ts index 3d93435d51..d38313db9d 100644 --- a/types/pollyjs__adapter-fetch/index.d.ts +++ b/types/pollyjs__adapter-fetch/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for @pollyjs/adapter-fetch 1.2 +// Type definitions for @pollyjs/adapter-fetch 1.3 // Project: https://github.com/netflix/pollyjs/tree/master/packages/@pollyjs/adapter-fetch // Definitions by: feinoujc // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped diff --git a/types/pollyjs__adapter/index.d.ts b/types/pollyjs__adapter/index.d.ts index b3810a67bb..0bc49fd73b 100644 --- a/types/pollyjs__adapter/index.d.ts +++ b/types/pollyjs__adapter/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for @pollyjs/adapter 1.2 +// Type definitions for @pollyjs/adapter 1.3 // Project: https://github.com/netflix/pollyjs/tree/master/packages/@pollyjs/adapter // Definitions by: feinoujc // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped diff --git a/types/pollyjs__persister-fs/index.d.ts b/types/pollyjs__persister-fs/index.d.ts index 3d97b382f7..fc7f9ad656 100644 --- a/types/pollyjs__persister-fs/index.d.ts +++ b/types/pollyjs__persister-fs/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for @pollyjs/persister-fs 1.2 +// Type definitions for @pollyjs/persister-fs 1.3 // Project: https://github.com/netflix/pollyjs/tree/master/packages/@pollyjs/persister-fs // Definitions by: feinoujc // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped diff --git a/types/pollyjs__persister/index.d.ts b/types/pollyjs__persister/index.d.ts index 45fc1fc250..87e1c27f5b 100644 --- a/types/pollyjs__persister/index.d.ts +++ b/types/pollyjs__persister/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for @pollyjs/persister 1.2 +// Type definitions for @pollyjs/persister 1.3 // Project: https://github.com/netflix/pollyjs/tree/master/packages/@pollyjs/persister // Definitions by: feinoujc // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped diff --git a/types/pollyjs__utils/index.d.ts b/types/pollyjs__utils/index.d.ts index e87392fcee..ca3e7735ef 100644 --- a/types/pollyjs__utils/index.d.ts +++ b/types/pollyjs__utils/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for @pollyjs/utils 1.2 +// Type definitions for @pollyjs/utils 1.3 // Project: https://github.com/netflix/pollyjs/tree/master/packages/@pollyjs/utils // Definitions by: feinoujc // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped From cddc81b89060175919cef11a02a6c65f6fd56500 Mon Sep 17 00:00:00 2001 From: Adam Misiorny Date: Mon, 3 Dec 2018 20:34:53 +0100 Subject: [PATCH 287/608] Fix name type --- types/rosie/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/rosie/index.d.ts b/types/rosie/index.d.ts index 63624ad3f2..01dc76c5af 100644 --- a/types/rosie/index.d.ts +++ b/types/rosie/index.d.ts @@ -166,7 +166,7 @@ declare namespace rosie { * @return {Factory} */ sequence(name: K, builder?: (i: number) => any): IFactory; - sequence(name: keyof T, dependencies: D[], builder: (i: number, ...args: any[]) => any): IFactory; + sequence(name: K, dependencies: D[], builder: (i: number, ...args: any[]) => any): IFactory; /** * Sets a post-processor callback that will receive built objects and the From 49afe7ce39261604a821ac875f57381375e58573 Mon Sep 17 00:00:00 2001 From: Dobes Vandermeer Date: Mon, 3 Dec 2018 11:42:33 -0800 Subject: [PATCH 288/608] Update index.d.ts Object -> object --- types/mongodb/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/mongodb/index.d.ts b/types/mongodb/index.d.ts index 11d425dc30..8d549d4f49 100644 --- a/types/mongodb/index.d.ts +++ b/types/mongodb/index.d.ts @@ -1294,7 +1294,7 @@ export interface CollectionAggregationOptions { * Allow driver to bypass schema validation in MongoDB 3.2 or higher. */ bypassDocumentValidation?: boolean; - hint?: string | Object; + hint?: string | object; raw?: boolean; promoteLongs?: boolean; promoteValues?: boolean; From 8c94850f861a22d8bfe85fc1a2cbccbaa7fa99ac Mon Sep 17 00:00:00 2001 From: Mark Wolff Date: Mon, 3 Dec 2018 12:07:38 -0800 Subject: [PATCH 289/608] Revert md links --- types/applicationinsights-js/index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/types/applicationinsights-js/index.d.ts b/types/applicationinsights-js/index.d.ts index ea80ad1ddb..002a950637 100644 --- a/types/applicationinsights-js/index.d.ts +++ b/types/applicationinsights-js/index.d.ts @@ -671,13 +671,13 @@ declare module Microsoft.ApplicationInsights { queue: Array<() => void>; /** * Starts the timer for tracking a page load time. Use this instead of `trackPageView` if you want to control when the page view timer starts and stops, - * but don't want to calculate the duration yourself. This method doesn't send any telemetry. Call [`stopTrackPage`](https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#stoptrackpage) to log the end of the page view + * but don't want to calculate the duration yourself. This method doesn't send any telemetry. Call `stopTrackPage` to log the end of the page view * and send the event. * @param name A string that idenfities this item, unique within this HTML document. Defaults to the document title. */ startTrackPage(name?: string): any; /** - * Stops the timer that was started by calling [`startTrackPage`](https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#starttrackpage) and sends the pageview load time telemetry with the specified properties and measurements. + * Stops the timer that was started by calling `startTrackPage` and sends the pageview load time telemetry with the specified properties and measurements. * The duration of the page view will be the time between calling `startTrackPage` and `stopTrackPage`. * @param name The string you used as the name in `startTrackPage`. Defaults to the document title. * @param url String - a relative or absolute URL that identifies the page or other item. Defaults to the window location. @@ -703,12 +703,12 @@ declare module Microsoft.ApplicationInsights { properties?: { [name: string]: string }, measurements?: { [name: string]: number }, duration?: number): any; /** - * Start timing an extended event. Call [`stopTrackEvent`](https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#stoptrackevent) to log the event when it ends. + * Start timing an extended event. Call `stopTrackEvent` to log the event when it ends. * @param name A string that identifies this event uniquely within the document. */ startTrackEvent(name: string): any; /** - * Log an extended event that you started timing with [`startTrackEvent`](https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#starttrackevent). + * Log an extended event that you started timing with `startTrackEvent`. * @param name The string you used to identify this event in `startTrackEvent`. * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty. * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty. From 55151250bf7bfc323aa397f67a7cd881f01ba934 Mon Sep 17 00:00:00 2001 From: Hernan Rajchert Date: Mon, 3 Dec 2018 18:20:46 -0300 Subject: [PATCH 290/608] fix: changed project url --- types/unist/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/unist/index.d.ts b/types/unist/index.d.ts index 023b1c11e3..ee61686f93 100644 --- a/types/unist/index.d.ts +++ b/types/unist/index.d.ts @@ -1,5 +1,5 @@ // Type definitions for Unist 2.0 -// Project: https://github.com/syntax-tree/unist-ts +// Project: https://github.com/syntax-tree/unist // Definitions by: bizen241 // Jun Lu // Hernan Rajchert From e6830ebd665443275d1f60d926f4df159d21362c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Alvergnat?= Date: Sat, 17 Nov 2018 19:11:58 +0100 Subject: [PATCH 291/608] Upgrade yeoman-test to 2.0 This adds support for resolved and namespace options in run method, and sets some callback functions to optional. --- types/yeoman-test/index.d.ts | 44 ++++++++++++++++++++------ types/yeoman-test/yeoman-test-tests.ts | 5 +++ 2 files changed, 40 insertions(+), 9 deletions(-) diff --git a/types/yeoman-test/index.d.ts b/types/yeoman-test/index.d.ts index d6b2d50a09..abaad9ddb3 100644 --- a/types/yeoman-test/index.d.ts +++ b/types/yeoman-test/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for yeoman-test 1.7 +// Type definitions for yeoman-test 2.0 // Project: https://github.com/yeoman/yeoman-test // Definitions by: Ika // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -10,10 +10,17 @@ import Generator = require('yeoman-generator'); export interface Dictionary { [key: string]: T; } + export interface Constructor { new (...args: any[]): T; } +// Environment from yeoman-environment +export interface Env extends EventEmitter { + queues: string[]; + enforceUpdate(env: Env): this; +} + /** * Dependecies can be path (autodiscovery) or an array [, ] */ @@ -37,7 +44,7 @@ export function setUpTestDirectory(dir: string): (done: (...args: any[]) => void * @param options - Grunt configuration * @param done - callback to call on completion */ -export function gruntfile(options: Dictionary, done: (...args: any[]) => void): void; +export function gruntfile(options: Dictionary, done?: (...args: any[]) => void): void; /** * Clean-up the test directory and cd into it. @@ -49,7 +56,7 @@ export function gruntfile(options: Dictionary, done: (...args: any[]) => vo * fs.writeFileSync('testfile', 'Roses are red.'); * }); */ -export function testDirectory(dir: string, cb: (error?: any) => void): void; +export function testDirectory(dir: string, cb?: (error?: any) => void): void; /** * Answer prompt questions for the passed-in generator @@ -60,7 +67,7 @@ export function testDirectory(dir: string, cb: (error?: any) => void): void; * @example * mockPrompt(angular, {'bootstrap': 'Y', 'compassBoostrap': 'Y'}); */ -export function mockPrompt(generator: Generator, answers: Dictionary): void; +export function mockPrompt(generator: Generator, answers: Generator.Answers): void; /** * Restore defaults prompts on a generator. @@ -105,7 +112,7 @@ export function createGenerator(name: string, dependencies: Dependency[], args?: * * @param dependencies - paths to the generators dependencies */ -export function registerDependencies(env: any, dependencies: Dependency[]): void; +export function registerDependencies(env: Env, dependencies: Dependency[]): void; /** * Run the provided Generator @@ -118,7 +125,18 @@ export interface RunContextSettings { * Automatically run this generator in a tmp dir * @default true */ - tmpdir: boolean; + tmpdir?: boolean; + + /** + * File path to the generator (only used if Generator is a constructor) + */ + resolved?: string; + + /** + * Namespace (only used if Generator is a constructor) + * @default 'gen:test' + */ + namespace?: string; } export interface RunContextConstructor { @@ -132,7 +150,15 @@ export interface RunContextConstructor { new (Generator: string | Constructor, settings?: RunContextSettings): RunContext; } -export interface RunContext extends EventEmitter { +export interface RunContext extends RunContextConstructor, EventEmitter { + ran: boolean; + inDirSet: boolean; + args: string[]; + options: {}; + answers: Generator.Answers; + localConfig: {}; + dependencies: Dependency[]; + /** * Hold the execution until the returned callback is triggered * @return Callback to notify the normal execution can resume @@ -162,7 +188,7 @@ export interface RunContext extends EventEmitter { * @param [cb] - callback who'll receive the folder path as argument * @return run context instance */ - inDir(dirPath: string, cb: (folderPath: string) => void): this; + inDir(dirPath: string, cb?: (folderPath: string) => void): this; /** * Change directory without deleting directory content. @@ -204,7 +230,7 @@ export interface RunContext extends EventEmitter { * Mock the prompt with dummy answers * @param answers - Answers to the prompt questions */ - withPrompts(answers: Dictionary): this; + withPrompts(answers: Generator.Answers): this; /** * Provide dependent generators diff --git a/types/yeoman-test/yeoman-test-tests.ts b/types/yeoman-test/yeoman-test-tests.ts index c5136c6089..2dba4923a2 100644 --- a/types/yeoman-test/yeoman-test-tests.ts +++ b/types/yeoman-test/yeoman-test-tests.ts @@ -57,6 +57,11 @@ helpers.run(path.join(__dirname, '../app')).withGenerators([ [helpers.createDummyGenerator(), 'karma:app'], ]); +helpers.run(Generator, { + resolved: '../app', + namespace: 'custom:generator' +}); + before(done => { helpers.run(path.join(__dirname, '../app')) .on('error', error => { /* ... */ }) From 2ac92c2d4c4947cb303d5e9aaa3160a0d6fd7352 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Alvergnat?= Date: Sat, 17 Nov 2018 13:56:59 +0100 Subject: [PATCH 292/608] Fix return type of methods and arguments of create method --- types/mem-fs/index.d.ts | 6 +++--- types/mem-fs/mem-fs-tests.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/types/mem-fs/index.d.ts b/types/mem-fs/index.d.ts index 4b1d8c4d14..6ab2c43c88 100644 --- a/types/mem-fs/index.d.ts +++ b/types/mem-fs/index.d.ts @@ -10,13 +10,13 @@ import { Transform } from 'stream'; import * as File from 'vinyl'; export interface Store extends EventEmitter { - add: (file: File, content: string) => void; - each: (callback: (file: File, index: number) => void) => void; get: (filepath: string) => File; + add: (file: File) => this; + each: (callback: (file: File, index: number) => void) => this; stream: () => Transform; } -export function create(...args: any[]): Store; +export function create(): Store; export namespace memFs { } diff --git a/types/mem-fs/mem-fs-tests.ts b/types/mem-fs/mem-fs-tests.ts index 9605c65ef7..3b20f30891 100644 --- a/types/mem-fs/mem-fs-tests.ts +++ b/types/mem-fs/mem-fs-tests.ts @@ -3,6 +3,6 @@ import * as fs from 'mem-fs'; const store: fs.Store = fs.create(); const file = store.get('hello'); -store.add(file, 'hahahahah'); - -store.each(file => console.dir(store.get(file.path))); +const file2 = store.add(file) + .each(file => console.dir(store.get(file.path))) + .get('test'); From 23e34b72cd427c2423a686b3b1674d09a3469578 Mon Sep 17 00:00:00 2001 From: Prashanth Date: Mon, 3 Dec 2018 16:01:26 -0800 Subject: [PATCH 293/608] Fix typo in index.d.ts: intsance -> instance --- types/socket.io/index.d.ts | 2 +- types/socket.io/v1/index.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/types/socket.io/index.d.ts b/types/socket.io/index.d.ts index f5e6c5fd00..70ef1d6a2c 100644 --- a/types/socket.io/index.d.ts +++ b/types/socket.io/index.d.ts @@ -169,7 +169,7 @@ declare namespace SocketIO { listen( port: number, opts?: ServerOptions ): Server; /** - * Binds socket.io to an engine.io intsance + * Binds socket.io to an engine.io instance * @param src The Engine.io (or compatible) server to bind to * @return This Server */ diff --git a/types/socket.io/v1/index.d.ts b/types/socket.io/v1/index.d.ts index 95a9ff1b4f..191680df46 100644 --- a/types/socket.io/v1/index.d.ts +++ b/types/socket.io/v1/index.d.ts @@ -169,7 +169,7 @@ declare namespace SocketIO { listen( port: number, opts?: ServerOptions ): Server; /** - * Binds socket.io to an engine.io intsance + * Binds socket.io to an engine.io instance * @param src The Engine.io (or compatible) server to bind to * @return This Server */ From 525506704738c79063afbf3f333d3b897690f248 Mon Sep 17 00:00:00 2001 From: Crispino Date: Mon, 3 Dec 2018 21:38:27 -0300 Subject: [PATCH 294/608] Add mongoose's `deleteModel` function type definitions --- types/mongoose/index.d.ts | 28 +++++++++++++++++++--------- types/mongoose/mongoose-tests.ts | 1 + types/mongoose/v4/index.d.ts | 10 ++++++++++ types/mongoose/v4/mongoose-tests.ts | 1 + 4 files changed, 31 insertions(+), 9 deletions(-) diff --git a/types/mongoose/index.d.ts b/types/mongoose/index.d.ts index 3672b75b8f..f08b8e0b5c 100644 --- a/types/mongoose/index.d.ts +++ b/types/mongoose/index.d.ts @@ -280,6 +280,16 @@ declare module "mongoose" { collection?: string ): U; + /** + * Removes the model named `name` from this connection, if it exists. You can + * use this function to clean up any models you created in your tests to + * prevent OverwriteModelErrors. + * + * @param name if string, the name of the model to remove. If regexp, removes all models whose name matches the regexp. + * @returns this + */ + deleteModel(name: string | RegExp): Connection; + /** Returns an array of model names created on this connection. */ modelNames(): string[]; @@ -511,7 +521,7 @@ declare module "mongoose" { /** * section error/notFound.js * https://mongoosejs.com/docs/api.html#mongooseerror_MongooseError.DocumentNotFoundError - * + * * An instance of this error class will be returned when `save()` fails * because the underlying * document was not found. The constructor takes one parameter, the @@ -524,7 +534,7 @@ declare module "mongoose" { /** * section error/cast.js * https://mongoosejs.com/docs/api.html#mongooseerror_MongooseError.CastError - * + * * An instance of this error class will be returned when mongoose failed to * cast a value. */ @@ -544,7 +554,7 @@ declare module "mongoose" { /** * section error/validation.js * https://mongoosejs.com/docs/api.html#mongooseerror_MongooseError.ValidationError - * + * * An instance of this error class will be returned when [validation](http://mongoosejs.com/docs/validation.html) failed. */ export class ValidationError extends Error { @@ -565,7 +575,7 @@ declare module "mongoose" { /** * section error/validator.js * https://mongoosejs.com/docs/api.html#mongooseerror_MongooseError.ValidatorError - * + * * A `ValidationError` has a hash of `errors` that contain individual `ValidatorError` instances */ export class ValidatorError extends Error { @@ -585,7 +595,7 @@ declare module "mongoose" { /** * section error/version.js * https://mongoosejs.com/docs/api.html#mongooseerror_MongooseError.VersionError - * + * * An instance of this error class will be returned when you call `save()` after * the document in the database was changed in a potentially unsafe way. See * the [`versionKey` option](http://mongoosejs.com/docs/guide.html#versionKey) for more information. @@ -600,7 +610,7 @@ declare module "mongoose" { /** * section error/parallelSave.js * https://mongoosejs.com/docs/api.html#mongooseerror_MongooseError.ParallelSaveError - * + * * An instance of this error class will be returned when you call `save()` multiple * times on the same document in parallel. See the [FAQ](http://mongoosejs.com/docs/faq.html) for more * information. @@ -612,7 +622,7 @@ declare module "mongoose" { /** * section error/overwriteModel.js * https://mongoosejs.com/docs/api.html#mongooseerror_MongooseError.OverwriteModelError - * + * * Thrown when a model with the given name was already registered on the connection. * See [the FAQ about `OverwriteModelError`](http://mongoosejs.com/docs/faq.html#overwrite-model-error). */ @@ -623,7 +633,7 @@ declare module "mongoose" { /** * section error/missingSchema.js * https://mongoosejs.com/docs/api.html#mongooseerror_MongooseError.MissingSchemaError - * + * * Thrown when you try to access a model that has not been registered yet */ export class MissingSchemaError extends Error { @@ -633,7 +643,7 @@ declare module "mongoose" { /** * section error/divergentArray.js * https://mongoosejs.com/docs/api.html#mongooseerror_MongooseError.DivergentArrayError - * + * * An instance of this error will be returned if you used an array projection * and then modified the array in an unsafe way. */ diff --git a/types/mongoose/mongoose-tests.ts b/types/mongoose/mongoose-tests.ts index f713ba8538..a660ce728f 100644 --- a/types/mongoose/mongoose-tests.ts +++ b/types/mongoose/mongoose-tests.ts @@ -145,6 +145,7 @@ conn1.close(function (err) {}); conn1.close(true, function (err) {}); conn1.collection('name').$format(999); conn1.model('myModel', new mongoose.Schema({}), 'myCol').find(); +conn1.deleteModel('myModel'); conn1.models.myModel.findOne().exec(); interface IStatics { staticMethod1: (a: number) => string; diff --git a/types/mongoose/v4/index.d.ts b/types/mongoose/v4/index.d.ts index ee3cd4c045..d8a9feb085 100644 --- a/types/mongoose/v4/index.d.ts +++ b/types/mongoose/v4/index.d.ts @@ -329,6 +329,16 @@ declare module "mongoose" { collection?: string ): U; + /** + * Removes the model named `name` from this connection, if it exists. You can + * use this function to clean up any models you created in your tests to + * prevent OverwriteModelErrors. + * + * @param name if string, the name of the model to remove. If regexp, removes all models whose name matches the regexp. + * @returns this + */ + deleteModel(name: string | RegExp): Connection; + /** Returns an array of model names created on this connection. */ modelNames(): string[]; diff --git a/types/mongoose/v4/mongoose-tests.ts b/types/mongoose/v4/mongoose-tests.ts index b2d2a834fd..633d3438a8 100644 --- a/types/mongoose/v4/mongoose-tests.ts +++ b/types/mongoose/v4/mongoose-tests.ts @@ -133,6 +133,7 @@ conn1.openSet('mongodb://localhost/test', 'db', { conn1.close().catch(function (err) {}); conn1.collection('name').$format(999); conn1.model('myModel', new mongoose.Schema({}), 'myCol').find(); +conn1.deleteModel('myModel'); interface IStatics { staticMethod1: (a: number) => string; } From dfc87fffb7ba49a1affdd1a17027dbf04a38b416 Mon Sep 17 00:00:00 2001 From: Matthew Lilley Date: Tue, 4 Dec 2018 01:30:12 +0000 Subject: [PATCH 295/608] Add missing serializeState and deserializeState options --- types/next-redux-wrapper/index.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/types/next-redux-wrapper/index.d.ts b/types/next-redux-wrapper/index.d.ts index 16af858743..835a9762ca 100644 --- a/types/next-redux-wrapper/index.d.ts +++ b/types/next-redux-wrapper/index.d.ts @@ -19,6 +19,8 @@ declare namespace nextReduxWrapper { interface Options { storeKey?: string; debug?: boolean; + serializeState: any; + deserializeState: any; } interface StoreCreatorOptions extends Options { From e915faa5936d8290416e1dedf93be9a8d3afcba1 Mon Sep 17 00:00:00 2001 From: jfeinour Date: Mon, 3 Dec 2018 21:15:42 -0500 Subject: [PATCH 296/608] types for 'accept' --- types/accept/accept-tests.ts | 29 +++++++++++++++++++++++++++++ types/accept/index.d.ts | 21 +++++++++++++++++++++ types/accept/tsconfig.json | 23 +++++++++++++++++++++++ types/accept/tslint.json | 1 + 4 files changed, 74 insertions(+) create mode 100644 types/accept/accept-tests.ts create mode 100644 types/accept/index.d.ts create mode 100644 types/accept/tsconfig.json create mode 100644 types/accept/tslint.json diff --git a/types/accept/accept-tests.ts b/types/accept/accept-tests.ts new file mode 100644 index 0000000000..011216ede4 --- /dev/null +++ b/types/accept/accept-tests.ts @@ -0,0 +1,29 @@ +import * as accept from 'accept'; + +accept.charsets("iso-8859-5, unicode-1-1;q=0.8"); // charset === "iso-8859-5" +accept.charset("iso-8859-5, unicode-1-1;q=0.8", ["unicode-1-1"]); // charset === "unicode-1-1" + +accept.encoding("gzip, deflate, sdch"); // encoding === "gzip" +accept.encoding("gzip, deflate, sdch", ["deflate", "identity"]); + +const encodings = accept.encodings("compress;q=0.5, gzip;q=1.0"); // encodings === ["gzip", "compress", "identity"] +encodings.lastIndexOf(''); + +accept.language("en;q=0.7, en-GB;q=0.8"); +accept.language("en;q=0.7, en-GB;q=0.8", ["en-gb"]); // language === "en-GB" +const languages = accept.languages("da, en;q=0.7, en-GB;q=0.8"); // languages === ["da", "en-GB", "en"] +languages.lastIndexOf(''); + +const mediaTypes = accept.mediaTypes("text/plain, application/json;q=0.5, text/html, */*;q=0.1"); +// mediaTypes === ["text/plain", "text/html", "application/json", "*/*"] +mediaTypes.lastIndexOf(''); +const headers = { + accept: 'text/plain, application/json;q=0.5, text/html, */*;q=0.1', + 'accept-language': 'da, en;q=0.7, en-GB;q=0.8' +}; + +const all = accept.parseAll(headers); +all.charsets.length; +all.encodings.length; +all.languages.length; +all.mediaTypes.length; diff --git a/types/accept/index.d.ts b/types/accept/index.d.ts new file mode 100644 index 0000000000..b067ea4306 --- /dev/null +++ b/types/accept/index.d.ts @@ -0,0 +1,21 @@ +// Type definitions for accept 3.1 +// Project: https://github.com/hapijs/accept#readme +// Definitions by: feinoujc +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +export function charset(charsetHeader?: string, preferences?: string[]): string; +export function charsets(charsetHeader?: string): string[]; +export function encoding(encodingHeader?: string, preferences?: string[]): string; +export function encodings(encodingHeader?: string): string[]; +export function language(languageHeader?: string, preferences?: string[]): string; +export function languages(languageHeader?: string): string[]; +export function mediaTypes(mediaTypeHeader?: string): string[]; +export function parseAll( + headers: Record +): { + charsets: string[]; + encodings: string[]; + languages: string[]; + mediaTypes: string[]; +}; diff --git a/types/accept/tsconfig.json b/types/accept/tsconfig.json new file mode 100644 index 0000000000..cb192697d5 --- /dev/null +++ b/types/accept/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "accept-tests.ts" + ] +} diff --git a/types/accept/tslint.json b/types/accept/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/accept/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From e3fd26e653b49682659f7441dd53996bb59afa00 Mon Sep 17 00:00:00 2001 From: Tim Trinidad Date: Mon, 3 Dec 2018 22:50:08 -0500 Subject: [PATCH 297/608] [react-qr-reader] update type declaration to use CommonJs exports --- types/react-qr-reader/index.d.ts | 13 ++++++------- types/react-qr-reader/react-qr-reader-tests.tsx | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/types/react-qr-reader/index.d.ts b/types/react-qr-reader/index.d.ts index de426667c0..908960f25c 100644 --- a/types/react-qr-reader/index.d.ts +++ b/types/react-qr-reader/index.d.ts @@ -6,11 +6,7 @@ import * as React from "react"; -export as namespace QrReader; - -export default QrReader; - -export namespace QrReader { +declare namespace QrReader { interface props { onScan: (data: string | null) => void; onError: (err: any) => void; @@ -26,5 +22,8 @@ export namespace QrReader { } } -declare class QrReader extends React.Component { -} +export as namespace QrReader; + +declare class QrReader extends React.Component {} + +export = QrReader; diff --git a/types/react-qr-reader/react-qr-reader-tests.tsx b/types/react-qr-reader/react-qr-reader-tests.tsx index 20632f8029..0a6796bfd9 100644 --- a/types/react-qr-reader/react-qr-reader-tests.tsx +++ b/types/react-qr-reader/react-qr-reader-tests.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import QrReader from "react-qr-reader"; +import * as QrReader from "react-qr-reader"; export class Test extends React.Component { render() { From 00fcc6eca2eaa5ffca41eeec000ff80b349030bf Mon Sep 17 00:00:00 2001 From: Junyoung Choi Date: Tue, 4 Dec 2018 15:23:12 +0900 Subject: [PATCH 298/608] Add vfile-message --- types/vfile-message/index.d.ts | 74 ++++++++++++++++++++++ types/vfile-message/tsconfig.json | 22 +++++++ types/vfile-message/tslint.json | 1 + types/vfile-message/vfile-message-tests.ts | 32 ++++++++++ 4 files changed, 129 insertions(+) create mode 100644 types/vfile-message/index.d.ts create mode 100644 types/vfile-message/tsconfig.json create mode 100644 types/vfile-message/tslint.json create mode 100644 types/vfile-message/vfile-message-tests.ts diff --git a/types/vfile-message/index.d.ts b/types/vfile-message/index.d.ts new file mode 100644 index 0000000000..a39d916a34 --- /dev/null +++ b/types/vfile-message/index.d.ts @@ -0,0 +1,74 @@ +// Type definitions for vfile-message 1.0 +// Project: https://github.com/vfile/vfile-message#readme +// Definitions by: Junyoung Choi +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import * as Unist from 'unist'; + +declare namespace vfileMessage { + /** + * Create a virtual message. + */ + interface VFileMessage extends Error { + /** + * Constructor of a message for `reason` at `position` from `origin`. + * When an error is passed in as `reason`, copies the `stack`. + * + * @param reason Reason for message (`string` or `Error`). Uses the stack and message of the error if given. + * @param position Place at which the message occurred in a file (`Node`, `Position`, or `Point`, optional). + * @param origin Place in code the message originates from (`string`, optional). + */ + (reason: string | Error, position?: Unist.Node | Unist.Position | Unist.Point, origin?: string): VFileMessage + /** + * Category of message. + */ + ruleId: string | null; + /** + * Reason for message. + */ + reason: string; + /** + * Starting line of error. + */ + line: number | null; + /** + * Starting column of error. + */ + column: number | null; + /** + * Full range information, when available. + * Has start and end properties, both set to an object with line and column, set to number?. + */ + location: Unist.Position; + /** + * Namespace of warning. + */ + source: string | null; + /** + * If true, marks associated file as no longer processable. + */ + fatal?: boolean | null; + /** + * You may add a file property with a path of a file (used throughout the VFile ecosystem). + */ + file?: string; + /** + * You may add a note property with a long form description of the message (supported by vfile-reporter). + */ + note?: string; + /** + * You may add a url property with a link to documentation for the message. + */ + url?: string; + /** + * It’s OK to store custom data directly on the VMessage, some of those are handled by utilities. + */ + [key: string]: unknown; + } +} + +declare const vfileMessage: vfileMessage.VFileMessage; + +export = vfileMessage; diff --git a/types/vfile-message/tsconfig.json b/types/vfile-message/tsconfig.json new file mode 100644 index 0000000000..e740952e79 --- /dev/null +++ b/types/vfile-message/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", + "vfile-message-tests.ts" + ] +} diff --git a/types/vfile-message/tslint.json b/types/vfile-message/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/vfile-message/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/vfile-message/vfile-message-tests.ts b/types/vfile-message/vfile-message-tests.ts new file mode 100644 index 0000000000..ed9086631f --- /dev/null +++ b/types/vfile-message/vfile-message-tests.ts @@ -0,0 +1,32 @@ +import vfileMessage = require('vfile-message'); + +const message = vfileMessage('Error!'); +vfileMessage(new Error()); +vfileMessage('Error!', { + type: 'random node' +}); +vfileMessage('Error!', { + start: { + line: 1, + column: 1 + }, + end: { + line: 1, + column: 1 + } +}); +vfileMessage('Error!', { + line: 1, + column: 1 +}); +vfileMessage('Error!', undefined, 'test'); + +message.file = ''; +message.name = ''; +message.reason = ''; +message.message = ''; +message.stack = ''; +message.fatal = null; +message.fatal = true; +message.column = 1; +message.line = 1; From b2d0033fff089a6373666d8619449d77cc37c239 Mon Sep 17 00:00:00 2001 From: Junyoung Choi Date: Tue, 4 Dec 2018 15:25:15 +0900 Subject: [PATCH 299/608] Discard local type definitions in vfile --- types/vfile/index.d.ts | 44 +++----------------------------------- types/vfile/vfile-tests.ts | 22 +++---------------- 2 files changed, 6 insertions(+), 60 deletions(-) diff --git a/types/vfile/index.d.ts b/types/vfile/index.d.ts index df729e0a49..d1f3321ab7 100644 --- a/types/vfile/index.d.ts +++ b/types/vfile/index.d.ts @@ -8,6 +8,7 @@ /// import * as Unist from 'unist'; +import * as vfileMessage from 'vfile-message'; declare namespace vfile { type VFileContents = string | Buffer; @@ -29,45 +30,6 @@ declare namespace vfile { [key: string]: any; } - /** - * File-related message describing something at certain position. - */ - interface VFileMessage { - /** - * File-path, when the message was triggered. - */ - file: string; - /** - * Category of message. - */ - ruleId: string | null; - /** - * Reason for message. - */ - reason: string; - /** - * Starting line of error. - */ - line: number | null; - /** - * Starting column of error. - */ - column: number | null; - /** - * Full range information, when available. - * Has start and end properties, both set to an object with line and column, set to number?. - */ - location: Unist.Position; - /** - * Namespace of warning. - */ - source: string | null; - /** - * If true, marks associated file as no longer processable. - */ - fatal?: boolean | null; - } - /** * Associates a message with the file for `reason` at `position`. * When an error is passed in as `reason`, copies the stack. @@ -76,7 +38,7 @@ declare namespace vfile { * @param position Place at which the message occurred in `vfile`. * @param ruleId Category of message. */ - type Message = (reason: string, position?: Unist.Point | Unist.Position | NodeWithPosition, ruleId?: string) => VFileMessage; + type Message = (reason: string, position?: Unist.Point | Unist.Position | NodeWithPosition, ruleId?: string) => vfileMessage.VFileMessage; /** * Associates a fatal message with the file, then immediately throws it. * Note: fatal errors mean a file is no longer processable. @@ -121,7 +83,7 @@ declare namespace vfile { /** * List of messages associated with the file. */ - messages: VFileMessage[]; + messages: vfileMessage.VFileMessage[]; /** * Raw value. */ diff --git a/types/vfile/vfile-tests.ts b/types/vfile/vfile-tests.ts index 5c14c8502b..36c0ac163e 100644 --- a/types/vfile/vfile-tests.ts +++ b/types/vfile/vfile-tests.ts @@ -1,5 +1,6 @@ import vfile = require('vfile'); import * as Unist from 'unist'; +import vfileMessage = require('vfile-message'); // Instantiation const file: vfile.VFile = vfile(); @@ -15,24 +16,7 @@ file.dirname = '~'; file.extname = '.md'; file.basename = 'test.text'; file.history = ['~/test.txt']; // => ['~/example.txt', '~/example.md', '~/index.text'] -file.messages = [{ - file: '~/test.txt', - ruleId: '', - reason: '', - line: 1, - column: 1, - location: { - start: { - line: 1, - column: 1, - }, - end: { - line: 1, - column: 1, - } - }, - source: '' -}]; +file.messages = [vfileMessage('random error')]; const startPoint: Unist.Point = { line: 1, @@ -46,7 +30,7 @@ const position: Unist.Position = { }, }; -file.message('test', startPoint); +const message: vfileMessage.VFileMessage = file.message('test', startPoint, 'test origin'); file.message('test', position); file.message('test', { type: 'ramdom node', From 10f75ca776a86365428d98762e361c95beed0afc Mon Sep 17 00:00:00 2001 From: Junyoung Choi Date: Tue, 4 Dec 2018 15:27:09 +0900 Subject: [PATCH 300/608] Fix type definition of info method --- types/vfile/index.d.ts | 2 +- types/vfile/vfile-tests.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/types/vfile/index.d.ts b/types/vfile/index.d.ts index d1f3321ab7..1d0b9f76d9 100644 --- a/types/vfile/index.d.ts +++ b/types/vfile/index.d.ts @@ -55,7 +55,7 @@ declare namespace vfile { * @param position Place at which the message occurred in `vfile`. * @param ruleId Category of message. */ - type Info = (reason: string, position?: Unist.Point | Unist.Position | NodeWithPosition, ruleId?: string) => void; + type Info = (reason: string, position?: Unist.Point | Unist.Position | NodeWithPosition, ruleId?: string) => vfileMessage.VFileMessage; /** * Convert contents of `vfile` to string. diff --git a/types/vfile/vfile-tests.ts b/types/vfile/vfile-tests.ts index 36c0ac163e..b89df6db23 100644 --- a/types/vfile/vfile-tests.ts +++ b/types/vfile/vfile-tests.ts @@ -40,6 +40,10 @@ file.message('test', { file.message('test', { start: 'invalid point' }); // $ExpectError +file.fail('test'); + +const infoMessage: vfileMessage.VFileMessage = file.info('test'); + // Using `data` prop interface CustomData { message: string; From cad3854ae499b17e4ec6d21686806be042f5199e Mon Sep 17 00:00:00 2001 From: Junyoung Choi Date: Tue, 4 Dec 2018 15:34:21 +0900 Subject: [PATCH 301/608] Clean up methods of vfile --- types/vfile/index.d.ts | 68 +++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 37 deletions(-) diff --git a/types/vfile/index.d.ts b/types/vfile/index.d.ts index 1d0b9f76d9..70ca5b8cd9 100644 --- a/types/vfile/index.d.ts +++ b/types/vfile/index.d.ts @@ -30,47 +30,11 @@ declare namespace vfile { [key: string]: any; } - /** - * Associates a message with the file for `reason` at `position`. - * When an error is passed in as `reason`, copies the stack. - * Each message has a `fatal` property which by default is set to `false` (ie. `warning`). - * @param reason Reason for message. Uses the stack and message of the error if given. - * @param position Place at which the message occurred in `vfile`. - * @param ruleId Category of message. - */ - type Message = (reason: string, position?: Unist.Point | Unist.Position | NodeWithPosition, ruleId?: string) => vfileMessage.VFileMessage; - /** - * Associates a fatal message with the file, then immediately throws it. - * Note: fatal errors mean a file is no longer processable. - * Calls `message()` internally. - * @param reason Reason for message. Uses the stack and message of the error if given. - * @param position Place at which the message occurred in `vfile`. - * @param ruleId Category of message. - */ - type Fail = (reason: string, position?: Unist.Point | Unist.Position | NodeWithPosition, ruleId?: string) => never; - /** - * Associates an informational message with the file, where `fatal` is set to `null`. - * Calls `message()` internally. - * @param reason Reason for message. Uses the stack and message of the error if given. - * @param position Place at which the message occurred in `vfile`. - * @param ruleId Category of message. - */ - type Info = (reason: string, position?: Unist.Point | Unist.Position | NodeWithPosition, ruleId?: string) => vfileMessage.VFileMessage; - - /** - * Convert contents of `vfile` to string. - * @param encoding If `contents` is a buffer, `encoding` is used to stringify buffers (default: `'utf8'`). - */ - type ToString = (encoding?: BufferEncoding) => string; - interface VFile { /** * @param options If `options` is `string` or `Buffer`, treats it as `{contents: options}`. If `options` is a `VFile`, returns it. All other options are set on the newly created `vfile`. */ (input?: VFileContents | F | VFileOptions): F; - message: Message; - fail: Fail; - info: Info; /** * List of file-paths the file moved between. */ @@ -119,7 +83,37 @@ declare namespace vfile { * Defaults to `process.cwd()`. */ cwd: string; - toString: ToString; + /** + * Convert contents of `vfile` to string. + * @param encoding If `contents` is a buffer, `encoding` is used to stringify buffers (default: `'utf8'`). + */ + toString: (encoding?: BufferEncoding) => string; + /** + * Associates a message with the file for `reason` at `position`. + * When an error is passed in as `reason`, copies the stack. + * Each message has a `fatal` property which by default is set to `false` (ie. `warning`). + * @param reason Reason for message. Uses the stack and message of the error if given. + * @param position Place at which the message occurred in `vfile`. + * @param ruleId Category of message. + */ + message: (reason: string, position?: Unist.Point | Unist.Position | NodeWithPosition, ruleId?: string) => vfileMessage.VFileMessage; + /** + * Associates a fatal message with the file, then immediately throws it. + * Note: fatal errors mean a file is no longer processable. + * Calls `message()` internally. + * @param reason Reason for message. Uses the stack and message of the error if given. + * @param position Place at which the message occurred in `vfile`. + * @param ruleId Category of message. + */ + fail: (reason: string, position?: Unist.Point | Unist.Position | NodeWithPosition, ruleId?: string) => never; + /** + * Associates an informational message with the file, where `fatal` is set to `null`. + * Calls `message()` internally. + * @param reason Reason for message. Uses the stack and message of the error if given. + * @param position Place at which the message occurred in `vfile`. + * @param ruleId Category of message. + */ + info: (reason: string, position?: Unist.Point | Unist.Position | NodeWithPosition, ruleId?: string) => vfileMessage.VFileMessage; } } From eb8e55df7132099491e230fd516599fd309c0d50 Mon Sep 17 00:00:00 2001 From: Forzoom MBP Date: Tue, 4 Dec 2018 14:35:18 +0800 Subject: [PATCH 302/608] fix: change onMenuShareQzone to onMenuShareQZone --- types/wx-js-sdk-dt/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/wx-js-sdk-dt/index.d.ts b/types/wx-js-sdk-dt/index.d.ts index cefc43887f..23b5388336 100644 --- a/types/wx-js-sdk-dt/index.d.ts +++ b/types/wx-js-sdk-dt/index.d.ts @@ -162,7 +162,7 @@ declare namespace wx { /** * 获取“分享到QQ空间”按钮点击状态及自定义分享内容接口 */ - function onMenuShareQzone(config: MenuShareWeibo): void; + function onMenuShareQZone(config: MenuShareWeibo): void; interface ChooseImageConfig { /** From 3844e52c09e513a8edc6d4bdfb4b7d8216697aa0 Mon Sep 17 00:00:00 2001 From: Junyoung Choi Date: Tue, 4 Dec 2018 15:45:09 +0900 Subject: [PATCH 303/608] Fix lint errors of vfile-message --- types/vfile-message/index.d.ts | 3 ++- types/vfile-message/tsconfig.json | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/types/vfile-message/index.d.ts b/types/vfile-message/index.d.ts index a39d916a34..5f4467e007 100644 --- a/types/vfile-message/index.d.ts +++ b/types/vfile-message/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/vfile/vfile-message#readme // Definitions by: Junyoung Choi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.0 /// @@ -20,7 +21,7 @@ declare namespace vfileMessage { * @param position Place at which the message occurred in a file (`Node`, `Position`, or `Point`, optional). * @param origin Place in code the message originates from (`string`, optional). */ - (reason: string | Error, position?: Unist.Node | Unist.Position | Unist.Point, origin?: string): VFileMessage + (reason: string | Error, position?: Unist.Node | Unist.Position | Unist.Point, origin?: string): VFileMessage; /** * Category of message. */ diff --git a/types/vfile-message/tsconfig.json b/types/vfile-message/tsconfig.json index e740952e79..9e35438c08 100644 --- a/types/vfile-message/tsconfig.json +++ b/types/vfile-message/tsconfig.json @@ -7,6 +7,7 @@ "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, + "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ "../" From 0383646a99e5f7021f782b07ee7675176b016356 Mon Sep 17 00:00:00 2001 From: Junyoung Choi Date: Tue, 4 Dec 2018 15:49:05 +0900 Subject: [PATCH 304/608] Update and move vfile constructor description so it can be seen in vscode hint --- types/vfile/index.d.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/types/vfile/index.d.ts b/types/vfile/index.d.ts index 70ca5b8cd9..459223d4b9 100644 --- a/types/vfile/index.d.ts +++ b/types/vfile/index.d.ts @@ -32,6 +32,13 @@ declare namespace vfile { interface VFile { /** + * Create a new virtual file. If `options` is `string` or `Buffer`, treats it as `{contents: options}`. + * If `options` is a `VFile`, returns it. All other options are set on the newly created `vfile`. + * + * Path related properties are set in the following order (least specific to most specific): `history`, `path`, `basename`, `stem`, `extname`, `dirname`. + * + * It’s not possible to set either `dirname` or `extname` without setting either `history`, `path`, `basename`, or `stem` as well. + * * @param options If `options` is `string` or `Buffer`, treats it as `{contents: options}`. If `options` is a `VFile`, returns it. All other options are set on the newly created `vfile`. */ (input?: VFileContents | F | VFileOptions): F; @@ -117,11 +124,6 @@ declare namespace vfile { } } -/** - * Create a new virtual file. - * Path related properties are set in the following order (least specific to most specific): `history`, `path`, `basename`, `stem`, `extname`, `dirname`. - * It’s not possible to set either `dirname` or `extname` without setting either `history`, `path`, `basename`, or `stem` as well. - */ declare const vfile: vfile.VFile; export = vfile; From 8144af436c041ca46587678cf907e81456fc4bf3 Mon Sep 17 00:00:00 2001 From: Junyoung Choi Date: Tue, 4 Dec 2018 16:27:52 +0900 Subject: [PATCH 305/608] Implement AnyNode type so position can accept any nodes --- types/vfile-message/index.d.ts | 6 +++++- types/vfile/index.d.ts | 11 +++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/types/vfile-message/index.d.ts b/types/vfile-message/index.d.ts index 5f4467e007..0ee47ee365 100644 --- a/types/vfile-message/index.d.ts +++ b/types/vfile-message/index.d.ts @@ -9,6 +9,10 @@ import * as Unist from 'unist'; declare namespace vfileMessage { + interface AnyNode extends Unist.Node{ + [key: string]: unknown + } + /** * Create a virtual message. */ @@ -21,7 +25,7 @@ declare namespace vfileMessage { * @param position Place at which the message occurred in a file (`Node`, `Position`, or `Point`, optional). * @param origin Place in code the message originates from (`string`, optional). */ - (reason: string | Error, position?: Unist.Node | Unist.Position | Unist.Point, origin?: string): VFileMessage; + (reason: string | Error, position?: AnyNode | Unist.Position | Unist.Point, origin?: string): VFileMessage; /** * Category of message. */ diff --git a/types/vfile/index.d.ts b/types/vfile/index.d.ts index 459223d4b9..efb07e288d 100644 --- a/types/vfile/index.d.ts +++ b/types/vfile/index.d.ts @@ -13,11 +13,6 @@ import * as vfileMessage from 'vfile-message'; declare namespace vfile { type VFileContents = string | Buffer; - interface NodeWithPosition extends Unist.Node { - position: Unist.Position; - [key: string]: any; - } - interface VFileOptions { contents?: VFileContents; path?: string; @@ -103,7 +98,7 @@ declare namespace vfile { * @param position Place at which the message occurred in `vfile`. * @param ruleId Category of message. */ - message: (reason: string, position?: Unist.Point | Unist.Position | NodeWithPosition, ruleId?: string) => vfileMessage.VFileMessage; + message: (reason: string, position?: Unist.Point | Unist.Position | vfileMessage.AnyNode, ruleId?: string) => vfileMessage.VFileMessage; /** * Associates a fatal message with the file, then immediately throws it. * Note: fatal errors mean a file is no longer processable. @@ -112,7 +107,7 @@ declare namespace vfile { * @param position Place at which the message occurred in `vfile`. * @param ruleId Category of message. */ - fail: (reason: string, position?: Unist.Point | Unist.Position | NodeWithPosition, ruleId?: string) => never; + fail: (reason: string, position?: Unist.Point | Unist.Position | vfileMessage.AnyNode, ruleId?: string) => never; /** * Associates an informational message with the file, where `fatal` is set to `null`. * Calls `message()` internally. @@ -120,7 +115,7 @@ declare namespace vfile { * @param position Place at which the message occurred in `vfile`. * @param ruleId Category of message. */ - info: (reason: string, position?: Unist.Point | Unist.Position | NodeWithPosition, ruleId?: string) => vfileMessage.VFileMessage; + info: (reason: string, position?: Unist.Point | Unist.Position | vfileMessage.AnyNode, ruleId?: string) => vfileMessage.VFileMessage; } } From 1e39558ee2231ad3df45859b81031da4d6425042 Mon Sep 17 00:00:00 2001 From: Lukas Elmer Date: Tue, 4 Dec 2018 08:27:55 +0100 Subject: [PATCH 306/608] Remove redundant typing --- types/superagent/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/superagent/index.d.ts b/types/superagent/index.d.ts index c10ff467bb..7c1898cdc2 100644 --- a/types/superagent/index.d.ts +++ b/types/superagent/index.d.ts @@ -46,7 +46,7 @@ declare namespace request { // tslint:disable-next-line:unified-signatures (method: string, url: string): SuperAgentRequest; - agent(): this & Request & SuperAgent; + agent(): this & Request; serialize: { [type: string]: Serializer }; parse: { [type: string]: Parser }; } From 123806795f7fb7ba4ece861fc2975f14d3bd96f5 Mon Sep 17 00:00:00 2001 From: Junyoung Choi Date: Tue, 4 Dec 2018 16:28:43 +0900 Subject: [PATCH 307/608] Fix lint errors in vfile-message --- types/vfile-message/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/vfile-message/index.d.ts b/types/vfile-message/index.d.ts index 0ee47ee365..908f72027b 100644 --- a/types/vfile-message/index.d.ts +++ b/types/vfile-message/index.d.ts @@ -9,8 +9,8 @@ import * as Unist from 'unist'; declare namespace vfileMessage { - interface AnyNode extends Unist.Node{ - [key: string]: unknown + interface AnyNode extends Unist.Node { + [key: string]: unknown; } /** From 36367f80e85149a55c441cf10f7bb094816631e6 Mon Sep 17 00:00:00 2001 From: Uladzimir Havenchyk Date: Tue, 4 Dec 2018 10:53:55 +0300 Subject: [PATCH 308/608] Add type definitions for "koa-log" package --- types/koa-log/index.d.ts | 33 +++++++++++++++++++++++++++++++++ types/koa-log/koa-log-tests.ts | 10 ++++++++++ types/koa-log/tsconfig.json | 23 +++++++++++++++++++++++ types/koa-log/tslint.json | 1 + 4 files changed, 67 insertions(+) create mode 100644 types/koa-log/index.d.ts create mode 100644 types/koa-log/koa-log-tests.ts create mode 100644 types/koa-log/tsconfig.json create mode 100644 types/koa-log/tslint.json diff --git a/types/koa-log/index.d.ts b/types/koa-log/index.d.ts new file mode 100644 index 0000000000..3e97ea155f --- /dev/null +++ b/types/koa-log/index.d.ts @@ -0,0 +1,33 @@ +// Type definitions for koa-log 2.1 +// Project: https://github.com/vicanso/koa-log#readme +// Definitions by: Uladzimir Havenchyk +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +import * as Koa from 'koa'; + +declare function koaLog(type: string): Koa.Middleware; + +declare namespace koaLog { + namespace morgan { + function cookie(ctx: Koa.BaseContext, key: string): string; + + function date(ctx: Koa.BaseContext, format: string): string; + + function format(name: string): string; + + function length(ctx: Koa.BaseContext): number | undefined; + + function method(ctx: Koa.BaseContext): string; + + function referrer(ctx: Koa.BaseContext): string; + + function status(ctx: Koa.BaseContext): number; + + function token(name: string, fn: (ctx: Koa.BaseContext) => string): void; + + function url(ctx: Koa.BaseContext): string; + } +} + +export = koaLog; diff --git a/types/koa-log/koa-log-tests.ts b/types/koa-log/koa-log-tests.ts new file mode 100644 index 0000000000..070ceabfe9 --- /dev/null +++ b/types/koa-log/koa-log-tests.ts @@ -0,0 +1,10 @@ +import Koa = require('koa'); +import koaLogger = require('koa-log'); + +koaLogger.morgan.token('request-body', (ctx: Koa.BaseContext) => JSON.stringify(ctx.request.body)); +koaLogger.morgan.token('response-body', (ctx: Koa.BaseContext) => JSON.stringify(ctx.body)); + +const app = new Koa(); +app.use( + koaLogger(':status :method :url took :response-time ms :request-body :response-body') +); diff --git a/types/koa-log/tsconfig.json b/types/koa-log/tsconfig.json new file mode 100644 index 0000000000..2e32dbc373 --- /dev/null +++ b/types/koa-log/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "koa-log-tests.ts" + ] +} diff --git a/types/koa-log/tslint.json b/types/koa-log/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/koa-log/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 2f0bb90c1610ef41f4b786ad2a67f081570c5282 Mon Sep 17 00:00:00 2001 From: Alex D'Andrea Date: Fri, 30 Nov 2018 17:06:10 +0100 Subject: [PATCH 309/608] Add function & interface declarations for CA handling Namely: - `pki.createCaStore()` - `pki.verifyCertificateChain()` - interface `CAStore` ... and fix a copy&paste error in the APIDoc of `pki.Certificate.setIssuer()`. --- types/node-forge/index.d.ts | 13 ++++++++++++- types/node-forge/node-forge-tests.ts | 19 +++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/types/node-forge/index.d.ts b/types/node-forge/index.d.ts index 1a2b028a90..5e38861db0 100644 --- a/types/node-forge/index.d.ts +++ b/types/node-forge/index.d.ts @@ -67,6 +67,8 @@ declare module "node-forge" { function privateKeyFromPem(pem: PEM): PrivateKey; function certificateToPem(cert: Certificate, maxline?: number): PEM; function certificateFromPem(pem: PEM, computeHash?: boolean, strict?: boolean): Certificate; + function createCaStore(): CAStore; + function verifyCertificateChain(caStore: CAStore, chain: Certificate[], customVerifyCallback?: (verified: boolean | string, depth: number, chain: Certificate[]) => boolean): boolean; interface oids { [key: string]: string; @@ -202,7 +204,7 @@ declare module "node-forge" { */ setSubject(attrs: CertificateField[], uniqueId?: string): void; /** - * Sets the subject of this certificate. + * Sets the issuer of this certificate. * * @param attrs the array of subject attributes to use. * @param uniqueId an optional a unique ID to use. @@ -244,6 +246,15 @@ declare module "node-forge" { } + interface CAStore { + addCertificate(cert: Certificate | string): any; + hasCertificate(cert: Certificate | string): boolean; + removeCertificate(cert: Certificate | string): Certificate | null; + listAllCertificates(): pki.Certificate[]; + getIssuer(subject: Certificate): Certificate | null; + getBySubject(subject: string): Certificate | null; + } + function certificateFromAsn1(obj: asn1.Asn1, computeHash?: boolean): Certificate; function decryptRsaPrivateKey(pem: PEM, passphrase?: string): PrivateKey; diff --git a/types/node-forge/node-forge-tests.ts b/types/node-forge/node-forge-tests.ts index a8d352ad1a..62f0718c21 100644 --- a/types/node-forge/node-forge-tests.ts +++ b/types/node-forge/node-forge-tests.ts @@ -203,3 +203,22 @@ if (forge.util.fillString('1', 5) !== '11111') throw Error('forge.util.fillStrin throw Error("rsa signature verification fail"); } } + +{ + const emptyStore = forge.pki.createCaStore(); + + const certificate = forge.pki.createCertificate(); + const pem = forge.pki.certificateToPem(certificate); + + const caStore = forge.pki.createCaStore(); + caStore.addCertificate(certificate); + caStore.removeCertificate(certificate); + + caStore.listAllCertificates(); + + caStore.removeCertificate(certificate); + + forge.pki.verifyCertificateChain(caStore, [certificate], (verified, depth, chain) => { + return true; + }); +} From b2e36c1f593ba01084bdb782c51df592dbfccbd9 Mon Sep 17 00:00:00 2001 From: Jan Dolezel Date: Tue, 4 Dec 2018 09:20:06 +0100 Subject: [PATCH 310/608] Updated types --- types/react-sortable-tree/index.d.ts | 70 +++++++++++-------- .../utils/tree-data-utils.d.ts | 18 ++++- 2 files changed, 54 insertions(+), 34 deletions(-) diff --git a/types/react-sortable-tree/index.d.ts b/types/react-sortable-tree/index.d.ts index bcc6596ee6..ed47df8460 100644 --- a/types/react-sortable-tree/index.d.ts +++ b/types/react-sortable-tree/index.d.ts @@ -46,6 +46,11 @@ export interface FullTree { export interface NodeData extends TreeNode, TreePath, TreeIndex { } +export interface FlatDataItem extends TreeNode, TreePath { + lowerSiblingsCounts: number[]; + parentNode: TreeItem; +} + export interface SearchData extends NodeData { searchQuery: any; } @@ -61,6 +66,11 @@ export interface OnVisibilityToggleData extends FullTree, TreeNode { expanded: boolean; } +export interface OnDragStateChangedData { + isDragging: boolean; + draggedNode: TreeItem; +} + interface PreviousAndNextLocation { prevTreeIndex: number; prevPath: NumberOrStringArray; @@ -96,7 +106,7 @@ export interface NodeRendererProps { toggleChildrenVisibility?(data: NodeData): void; buttons?: JSX.Element[]; className?: string; - style?: { [index: string]: any }; + style?: React.CSSProperties; title?: (data: NodeData) => JSX.Element | JSX.Element; subtitle?: (data: NodeData) => JSX.Element | JSX.Element; icons?: JSX.Element[]; @@ -109,12 +119,12 @@ export interface NodeRendererProps { connectDragPreview: ConnectDragPreview; connectDragSource: ConnectDragSource; - parentNode?: { [index: string]: any }; + parentNode?: TreeItem; startDrag: any; endDrag: any; isDragging: boolean; didDrop: boolean; - draggedNode?: { [index: string]: any }; + draggedNode?: TreeItem; isOver: boolean; canDrop?: boolean; } @@ -124,7 +134,7 @@ export type PlaceholderRenderer = React.ComponentClass export interface PlaceholderRendererProps { isOver: boolean; canDrop: boolean; - draggedNode: { [index: string]: any }; + draggedNode: TreeItem; } type NumberOrStringArray = Array; @@ -147,54 +157,52 @@ export interface TreeRendererProps { connectDropTarget: ConnectDropTarget; isOver: boolean; canDrop?: boolean; - draggedNode?: { [index: string]: any }; + draggedNode?: TreeItem; // used in dndManager - getPrevRow: any; // @TODO what is this method? + getPrevRow: () => FlatDataItem | null; node: TreeItem; path: NumberOrStringArray; } -export interface ThemeProps { - style?: { [index: string]: any }; - innerStyle?: { [index: string]: any }; +interface ThemeTreeProps { + style?: React.CSSProperties + innerStyle?: React.CSSProperties reactVirtualizedListProps?: Partial; scaffoldBlockPxWidth?: number; slideRegionSize?: number; rowHeight?: ((info: Index) => number) | number; - treeNodeRenderer?: TreeRenderer; nodeContentRenderer?: NodeRenderer; placeholderRenderer?: PlaceholderRenderer; } -export interface ReactSortableTreeProps { +export interface ThemeProps extends ThemeTreeProps { + treeNodeRenderer?: TreeRenderer; +} + +export interface ReactSortableTreeProps extends ThemeTreeProps { treeData: TreeItem[]; onChange(treeData: TreeItem[]): void; - style?: { [index: string]: any }; - className?: string; - innerStyle?: { [index: string]: any }; + getNodeKey?(data: TreeNode & TreeIndex): string | number; + generateNodeProps?(data: ExtendedNodeData): { [index: string]: any }; + onMoveNode?(data: NodeData & FullTree & OnMovePreviousAndNextLocation): void; + onVisibilityToggle?(data: OnVisibilityToggleData): void; + onDragStateChanged?(data: OnDragStateChangedData): void; maxDepth?: number; + rowDirection?: 'ltr' | 'rtl'; + canDrag?: ((data: ExtendedNodeData) => boolean) | boolean; + canDrop?(data: OnDragPreviousAndNextLocation & NodeData): boolean; + canNodeHaveChildren?(node: TreeItem): boolean; + theme?: ThemeProps; searchMethod?(data: SearchData): boolean; searchQuery?: string | any; searchFocusOffset?: number; - searchFinishCallback?(matches: NodeData[]): void; - generateNodeProps?(data: ExtendedNodeData): { [index: string]: any }; - getNodeKey?(data: TreeNode & TreeIndex): string | number; - onMoveNode?(data: NodeData & FullTree & OnMovePreviousAndNextLocation): void; - onVisibilityToggle?(data: OnVisibilityToggleData): void; - canDrag?: ((data: ExtendedNodeData) => boolean) | boolean; - canDrop?(data: OnDragPreviousAndNextLocation & NodeData): boolean; - reactVirtualizedListProps?: Partial; - rowHeight?: ((info: Index) => number) | number; - slideRegionSize?: number; - scaffoldBlockPxWidth?: number; - isVirtualized?: boolean; - nodeContentRenderer?: NodeRenderer; - dndType?: string; - placeholderRenderer?: PlaceholderRenderer; - theme?: ThemeProps; - shouldCopyOnOutsideDrop?: boolean | ((data: ShouldCopyData) => boolean); onlyExpandSearchedNodes?: boolean; + searchFinishCallback?(matches: NodeData[]): void; + dndType?: string; + shouldCopyOnOutsideDrop?: boolean | ((data: ShouldCopyData) => boolean); + className?: string; + isVirtualized?: boolean; } declare const SortableTree: React.ComponentClass; diff --git a/types/react-sortable-tree/utils/tree-data-utils.d.ts b/types/react-sortable-tree/utils/tree-data-utils.d.ts index b9c7bb94a0..19b9dcf177 100644 --- a/types/react-sortable-tree/utils/tree-data-utils.d.ts +++ b/types/react-sortable-tree/utils/tree-data-utils.d.ts @@ -1,4 +1,4 @@ -import { FullTree, TreePath, TreeItem, TreeIndex, SearchData, NodeData, TreeNode } from '..'; +import { FullTree, TreePath, TreeItem, TreeIndex, SearchData, NodeData, TreeNode, FlatDataItem } from '..'; export type GetNodeKeyFunction = (data: TreeIndex & TreeNode) => string | number; export type WalkAndMapFunctionParameters = FullTree & {getNodeKey: GetNodeKeyFunction, callback: Function, ignoreCollapsed?: boolean}; @@ -13,6 +13,11 @@ export function getVisibleNodeInfoAtIndex( }): TreeNode & TreePath & {lowerSiblingsCounts: number[]} | null; export function walk(data: WalkAndMapFunctionParameters): void; export function map(data: WalkAndMapFunctionParameters): TreeItem[]; +export function toggleExpandedForAll( + data: FullTree & { + expanded?: boolean, + }, +): TreeItem[]; export function changeNodeAtPath( data: FullTree & TreePath & { newNode: Function | any, @@ -26,12 +31,18 @@ export function removeNodeAtPath( ignoreCollapsed?: boolean, }, ): TreeItem[]; +export function removeNode( + data: FullTree & TreePath & { + getNodeKey: GetNodeKeyFunction, + ignoreCollapsed?: boolean, + }, +): (FullTree & TreeNode & TreeIndex) | null; export function getNodeAtPath( data: FullTree & TreePath & { getNodeKey: GetNodeKeyFunction, ignoreCollapsed?: boolean, }, -): TreeNode & TreeIndex | null; +): (TreeNode & TreeIndex) | null; export function addNodeUnderParent( data: FullTree & { newNode: TreeItem, @@ -39,6 +50,7 @@ export function addNodeUnderParent( getNodeKey: GetNodeKeyFunction, ignoreCollapsed?: boolean, expandParent?: boolean, + addAsFirstChild?: boolean, }, ): FullTree & TreeIndex; export function insertNode( @@ -56,7 +68,7 @@ export function getFlatDataFromTree( getNodeKey: GetNodeKeyFunction, ignoreCollapsed?: boolean, }, -): Array; +): Array; export function getTreeFromFlatData( data: { flatData: FlattenedData, From 9b44b24d63f883cbc8301ef4c1b7c30e170def74 Mon Sep 17 00:00:00 2001 From: Alex D'Andrea Date: Tue, 4 Dec 2018 09:25:52 +0100 Subject: [PATCH 311/608] Use void over any --- types/node-forge/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/node-forge/index.d.ts b/types/node-forge/index.d.ts index 5e38861db0..d2fcddc2d9 100644 --- a/types/node-forge/index.d.ts +++ b/types/node-forge/index.d.ts @@ -247,7 +247,7 @@ declare module "node-forge" { } interface CAStore { - addCertificate(cert: Certificate | string): any; + addCertificate(cert: Certificate | string): void; hasCertificate(cert: Certificate | string): boolean; removeCertificate(cert: Certificate | string): Certificate | null; listAllCertificates(): pki.Certificate[]; From 6ca0152bcd4ea671c1e8d52c799a1cd1c1bb4b82 Mon Sep 17 00:00:00 2001 From: Ziyu Wang Date: Tue, 4 Dec 2018 19:42:08 +1100 Subject: [PATCH 312/608] fix selenium-webdriver logginng type --- types/selenium-webdriver/index.d.ts | 33 ++++++++++++++++++++++++-- types/selenium-webdriver/test/index.ts | 6 +++++ 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/types/selenium-webdriver/index.d.ts b/types/selenium-webdriver/index.d.ts index aa8a696576..4fa0ccf7ac 100644 --- a/types/selenium-webdriver/index.d.ts +++ b/types/selenium-webdriver/index.d.ts @@ -4,7 +4,8 @@ // Yuki Kokubun , // Craig Nishina , // Simon Gellis , -// Ben Dixon +// Ben Dixon , +// Ziyu // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -540,7 +541,7 @@ export namespace logging { * @param {string} name the logger's name. * @return {!Logger} the requested logger. */ - getLogger(name: string): Logger; + getLogger(name?: string): Logger; /** * Creates a new logger. @@ -552,6 +553,34 @@ export namespace logging { */ createLogger_(name: string, parent: Logger): Logger; } + + /** + * Retrieves a named logger, creating it in the process. This function will + * implicitly create the requested logger, and any of its parents, if they + * do not yet exist. + * + * @param {string} name the logger's name. + * @return {!Logger} the requested logger. + */ + function getLogger(name?: string): Logger; + + /** + * Adds the console handler to the given logger. The console handler will log + * all messages using the JavaScript Console API. + * + * @param {Logger=} opt_logger The logger to add the handler to; defaults + * to the root logger. + */ + function addConsoleHandler(opt_logger?: Logger): void; + + /** + * Removes the console log handler from the given logger. + * + * @param {Logger=} opt_logger The logger to remove the handler from; defaults + * to the root logger. + * @see exports.addConsoleHandler + */ + function removeConsoleHandler(opt_logger?: Logger): void; } export namespace promise { diff --git a/types/selenium-webdriver/test/index.ts b/types/selenium-webdriver/test/index.ts index f8decdace1..84ffc6a8c2 100644 --- a/types/selenium-webdriver/test/index.ts +++ b/types/selenium-webdriver/test/index.ts @@ -758,6 +758,12 @@ function TestLogging() { type = webdriver.logging.Type.DRIVER; type = webdriver.logging.Type.PERFORMANCE; type = webdriver.logging.Type.SERVER; + + let logger: webdriver.logging.Logger = webdriver.logging.getLogger(); + webdriver.logging.addConsoleHandler(); + webdriver.logging.addConsoleHandler(logger); + webdriver.logging.removeConsoleHandler(); + webdriver.logging.removeConsoleHandler(logger); } function TestLoggingEntry() { From eb1f29cb8d023cb5ee81b85ecee3a3211456cdea Mon Sep 17 00:00:00 2001 From: Jan Dolezel Date: Tue, 4 Dec 2018 10:24:58 +0100 Subject: [PATCH 313/608] Fixed lint --- types/react-sortable-tree/index.d.ts | 4 ++-- types/react-sortable-tree/utils/tree-data-utils.d.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/types/react-sortable-tree/index.d.ts b/types/react-sortable-tree/index.d.ts index ed47df8460..0c0cc075e2 100644 --- a/types/react-sortable-tree/index.d.ts +++ b/types/react-sortable-tree/index.d.ts @@ -166,8 +166,8 @@ export interface TreeRendererProps { } interface ThemeTreeProps { - style?: React.CSSProperties - innerStyle?: React.CSSProperties + style?: React.CSSProperties; + innerStyle?: React.CSSProperties; reactVirtualizedListProps?: Partial; scaffoldBlockPxWidth?: number; slideRegionSize?: number; diff --git a/types/react-sortable-tree/utils/tree-data-utils.d.ts b/types/react-sortable-tree/utils/tree-data-utils.d.ts index 19b9dcf177..b80e82dd81 100644 --- a/types/react-sortable-tree/utils/tree-data-utils.d.ts +++ b/types/react-sortable-tree/utils/tree-data-utils.d.ts @@ -68,7 +68,7 @@ export function getFlatDataFromTree( getNodeKey: GetNodeKeyFunction, ignoreCollapsed?: boolean, }, -): Array; +): FlatDataItem[]; export function getTreeFromFlatData( data: { flatData: FlattenedData, From bc05cf043193f7e163c3c6f68773b70c1fdb6384 Mon Sep 17 00:00:00 2001 From: Grzegorz Rozdzialik Date: Sun, 25 Nov 2018 19:28:42 +0100 Subject: [PATCH 314/608] fix react-table interface names, relax component props requirements --- types/react-table/lib/hoc/selectTable.d.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/types/react-table/lib/hoc/selectTable.d.ts b/types/react-table/lib/hoc/selectTable.d.ts index d70d84eb78..a128e221fa 100644 --- a/types/react-table/lib/hoc/selectTable.d.ts +++ b/types/react-table/lib/hoc/selectTable.d.ts @@ -12,7 +12,7 @@ export interface SelectInputComponentProps { row: any; } -export interface SelectAllInputComponent { +export interface SelectAllInputComponentProps { selectType: SelectType; checked: boolean; onClick: () => any; @@ -28,7 +28,7 @@ export interface SelectTableAdditionalProps { selectAll?: boolean; - toggleAll?: SelectAllInputComponent['onClick']; + toggleAll?: SelectAllInputComponentProps['onClick']; toggleSelection?: SelectInputComponentProps['onClick']; @@ -37,8 +37,10 @@ export interface SelectTableAdditionalProps { */ selectType?: SelectType; - SelectInputComponent?: ComponentType; - SelectAllInputComponent?: ComponentType; + SelectInputComponent?: ComponentType>; + SelectAllInputComponent?: ComponentType< + Partial + >; } export interface SelectTableHOCOptions { From 1180f3973af2ef648954249adfa4ae4ff7329514 Mon Sep 17 00:00:00 2001 From: Grzegorz Rozdzialik Date: Sun, 25 Nov 2018 19:41:27 +0100 Subject: [PATCH 315/608] [react-table] fix select table props, add tests --- types/react-table/index.d.ts | 6 ++++- types/react-table/lib/hoc/selectTable.d.ts | 6 ++--- types/react-table/test/select-table-tests.tsx | 27 +++++++++++++++++-- 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/types/react-table/index.d.ts b/types/react-table/index.d.ts index d6b1679edd..b7192d3064 100644 --- a/types/react-table/index.d.ts +++ b/types/react-table/index.d.ts @@ -1,6 +1,10 @@ // Type definitions for react-table 6.7 // Project: https://github.com/react-tools/react-table -// Definitions by: Roy Xue , Pavel Sakalo , Krzysztof Porębski , Andy S +// Definitions by: Roy Xue , +// Pavel Sakalo , +// Krzysztof Porębski , +// Andy S , +// Grzegorz Rozdzialik // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-table/lib/hoc/selectTable.d.ts b/types/react-table/lib/hoc/selectTable.d.ts index a128e221fa..fd6d9bf42c 100644 --- a/types/react-table/lib/hoc/selectTable.d.ts +++ b/types/react-table/lib/hoc/selectTable.d.ts @@ -37,10 +37,8 @@ export interface SelectTableAdditionalProps { */ selectType?: SelectType; - SelectInputComponent?: ComponentType>; - SelectAllInputComponent?: ComponentType< - Partial - >; + SelectInputComponent?: ComponentType; + SelectAllInputComponent?: ComponentType; } export interface SelectTableHOCOptions { diff --git a/types/react-table/test/select-table-tests.tsx b/types/react-table/test/select-table-tests.tsx index 1a1b231292..a4ed4d4f25 100644 --- a/types/react-table/test/select-table-tests.tsx +++ b/types/react-table/test/select-table-tests.tsx @@ -3,18 +3,41 @@ import * as ReactDOM from 'react-dom'; import ReactTable, { Column } from 'react-table'; import selectTableHOC, { - SelectTableAdditionalProps + SelectTableAdditionalProps, + SelectInputComponentProps, + SelectAllInputComponentProps } from 'react-table/lib/hoc/selectTable'; const SelectTable = selectTableHOC(ReactTable); +const SelectInput: React.StatelessComponent = ({ + onClick, + id, + checked, + row +}) => ( + onClick(id, e.shiftKey, row)} + checked={checked} + /> +); + +const SelectAllInput: React.StatelessComponent< + SelectAllInputComponentProps +> = ({ onClick, checked }) => ( + +); + const selectTableAdditionalProps: SelectTableAdditionalProps = { isSelected: () => true, keyField: 'id', selectAll: true, selectType: 'checkbox', toggleAll: () => null, - toggleSelection: () => null + toggleSelection: () => null, + SelectInputComponent: SelectInput, + SelectAllInputComponent: SelectAllInput }; const data = [{ id: 1, name: 'Foo' }, { id: 2, name: 'Bar' }]; From 6ac8dea2213447ca6a8f431620d3184eeae7f025 Mon Sep 17 00:00:00 2001 From: Grzegorz Rozdzialik Date: Mon, 3 Dec 2018 19:09:19 +0100 Subject: [PATCH 316/608] add resolveData prop to react-table --- types/react-table/index.d.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/types/react-table/index.d.ts b/types/react-table/index.d.ts index b7192d3064..1afb6eb0fd 100644 --- a/types/react-table/index.d.ts +++ b/types/react-table/index.d.ts @@ -50,7 +50,7 @@ export interface SortingRule { desc?: true; } -export interface TableProps extends +export interface TableProps extends Partial, Partial, Partial, @@ -60,6 +60,8 @@ export interface TableProps extends /** Default: [] */ data: D[]; + resolveData?: (data: D[]) => ResolvedData[]; + /** Default: false */ loading: boolean; @@ -168,7 +170,7 @@ export interface TableProps extends column: Partial; /** Array of all Available Columns */ - columns?: Array>; + columns?: Array>; /** Expander defaults. */ expanderDefaults: Partial; @@ -184,9 +186,9 @@ export interface TableProps extends /** Control callback for functional rendering */ children: ( - state: FinalState, + state: FinalState, makeTable: () => React.ReactElement, - instance: Instance + instance: Instance ) => React.ReactNode; } From 823efa4650567f7cf040e6f6f0524df47ffbcd5e Mon Sep 17 00:00:00 2001 From: Jan Lohage Date: Tue, 4 Dec 2018 12:44:29 +0100 Subject: [PATCH 317/608] @feathersjs/feathers: make default export type generic --- types/feathersjs__feathers/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/feathersjs__feathers/index.d.ts b/types/feathersjs__feathers/index.d.ts index 5948eadc27..4da4dd49c6 100644 --- a/types/feathersjs__feathers/index.d.ts +++ b/types/feathersjs__feathers/index.d.ts @@ -12,7 +12,7 @@ import { EventEmitter } from 'events'; import * as self from '@feathersjs/feathers'; -declare const feathers: (() => Application) & typeof self; +declare const feathers: (() => Application) & typeof self; export default feathers; export const version: string; From a7c4d2a685848521cd17b9e83b949e9605aa0f4a Mon Sep 17 00:00:00 2001 From: Jan Lohage Date: Tue, 4 Dec 2018 13:00:49 +0100 Subject: [PATCH 318/608] fix tests and linting --- types/feathersjs__feathers/feathersjs__feathers-tests.ts | 2 +- types/feathersjs__feathers/index.d.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/types/feathersjs__feathers/feathersjs__feathers-tests.ts b/types/feathersjs__feathers/feathersjs__feathers-tests.ts index 7d0e961700..bf1cdf8aa7 100644 --- a/types/feathersjs__feathers/feathersjs__feathers-tests.ts +++ b/types/feathersjs__feathers/feathersjs__feathers-tests.ts @@ -9,7 +9,7 @@ interface Services { users: User; } -const app = feathers() as Application; +const app = feathers(); app.service('users').get(0).then(u => { const user: User = u; diff --git a/types/feathersjs__feathers/index.d.ts b/types/feathersjs__feathers/index.d.ts index 4da4dd49c6..4746b29ff7 100644 --- a/types/feathersjs__feathers/index.d.ts +++ b/types/feathersjs__feathers/index.d.ts @@ -12,6 +12,7 @@ import { EventEmitter } from 'events'; import * as self from '@feathersjs/feathers'; +// tslint:disable-next-line no-unnecessary-generics declare const feathers: (() => Application) & typeof self; export default feathers; From e16aad6c1749469a4d67573e7385ade64615c9e7 Mon Sep 17 00:00:00 2001 From: Akash Vishwakarma Date: Tue, 4 Dec 2018 18:01:01 +0530 Subject: [PATCH 319/608] local should be optional as per the Alt doc. As per the http://alt.js.org/docs/async/ document, the local function in the SourceModel Interface should be optional. --- types/alt/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/alt/index.d.ts b/types/alt/index.d.ts index 9094642e70..c95e1653b0 100644 --- a/types/alt/index.d.ts +++ b/types/alt/index.d.ts @@ -54,7 +54,7 @@ declare namespace AltJS { export type Source = {[name:string]: () => SourceModel}; export interface SourceModel { - local(state:any, ...args: any[]):any; + local?(state:any, ...args: any[]):any; remote(state:any, ...args: any[]):Promise; shouldFetch?(fetchFn:(...args:Array) => boolean):void; loading?:(args:any) => void; From fe1b9d65058b43a13bd1fbe955df3c3fa3b767c4 Mon Sep 17 00:00:00 2001 From: Leon Rinkel Date: Tue, 4 Dec 2018 14:16:26 +0100 Subject: [PATCH 320/608] Updated type definitions for rethinkdb --- types/rethinkdb/index.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/types/rethinkdb/index.d.ts b/types/rethinkdb/index.d.ts index 87293230a9..d54856f08c 100644 --- a/types/rethinkdb/index.d.ts +++ b/types/rethinkdb/index.d.ts @@ -377,7 +377,7 @@ declare module "rethinkdb" { /** * Turn a sequence into an array or object, necessary when merging a sequence. - * + * * See: https://www.rethinkdb.com/api/javascript/coerce_to/ */ coerceTo(key: 'array'): Expression; @@ -539,6 +539,7 @@ declare module "rethinkdb" { le(value: T): Expression; add(n: number): Expression; + add(n: Expression): Expression; /** * Subtract two numbers. From 424a73f8091f58a51b1b1f9fb5e0d3f8cb778f7e Mon Sep 17 00:00:00 2001 From: Ryosuke Ishizue Date: Tue, 4 Dec 2018 22:30:54 +0900 Subject: [PATCH 321/608] fix return type of isFocused() --- types/ace/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/ace/index.d.ts b/types/ace/index.d.ts index 7faa5da4f8..cd20b57f05 100644 --- a/types/ace/index.d.ts +++ b/types/ace/index.d.ts @@ -1223,7 +1223,7 @@ declare namespace AceAjax { /** * Returns `true` if the current `textInput` is in focus. **/ - isFocused(): void; + isFocused(): boolean; /** * Blurs the current `textInput`. From 98c3b9c6af9d4405288399a7a6af2ab9fb7b65ae Mon Sep 17 00:00:00 2001 From: Alan Plum Date: Tue, 4 Dec 2018 15:03:02 +0100 Subject: [PATCH 322/608] Simplify types --- types/json_ml/index.d.ts | 8 +------- types/json_ml/json_ml-tests.ts | 26 +++++++++++++++++--------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/types/json_ml/index.d.ts b/types/json_ml/index.d.ts index ba53b84cb4..e2eb2c7af4 100644 --- a/types/json_ml/index.d.ts +++ b/types/json_ml/index.d.ts @@ -5,13 +5,7 @@ /// -export type Node = string | Element; -export type SimpleElement = [string, Attributes] | [string]; -export interface NodeList extends Array {} -export type Element = SimpleElement & NodeList; -export interface Attributes { - [key: string]: string; -} +export type Node = string | [string, ...any[]]; export function parse(xml: string, trim?: boolean): Node[]; export function stringify( object: Node[], diff --git a/types/json_ml/json_ml-tests.ts b/types/json_ml/json_ml-tests.ts index ecc84d9d8b..05ca64da4a 100644 --- a/types/json_ml/json_ml-tests.ts +++ b/types/json_ml/json_ml-tests.ts @@ -1,12 +1,20 @@ /// -import { Attributes, Element, Node, parse, stringify } from "json_ml"; +import { Node, parse, stringify } from "json_ml"; -const nodes: Node[] = parse("
  • hello
"); -const node1: Node = nodes[0]; -if (typeof node1 !== "string") { - const el: Element = node1; - const attrs = el[1] as Attributes; - console.log(el[0], attrs); -} +const nodes: Node[] = parse( + '
  • First Item
  • Second Item
  • ThirdItem
' +); +stringify(nodes, el => (el.is("li") ? null : el), 2); -console.log(stringify(nodes, el => (el.is("li") ? null : el), 2)); +stringify( + [ + [ + "ul", + ["li", { style: "color: red" }], + ["li", { title: "Some hover text", style: "color: green" }], + ["li", ["span", { class: "code-example-third" }]] + ] + ], + null, + 2 +); From eae28b274e9bb589252eb928dd80b2992d01f09e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Maisse?= Date: Sat, 17 Nov 2018 12:59:44 +0100 Subject: [PATCH 323/608] Add new attributes and bump type definition version to 4.0 --- types/storybook__addon-options/index.d.ts | 7 +++- .../storybook__addon-options-tests.ts | 38 ++++++++++--------- 2 files changed, 26 insertions(+), 19 deletions(-) diff --git a/types/storybook__addon-options/index.d.ts b/types/storybook__addon-options/index.d.ts index ec3ba1e252..968b003543 100644 --- a/types/storybook__addon-options/index.d.ts +++ b/types/storybook__addon-options/index.d.ts @@ -1,13 +1,14 @@ -// Type definitions for @storybook/addon-options 3.2 +// Type definitions for @storybook/addon-options 4.0 // Project: https://github.com/storybooks/storybook // Definitions by: Joscha Feth // Simon Helle Nielsen // A.MacLeay +// Gaetan Maisse // Adam Misiorny // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 -import { StoryDecorator } from "@storybook/react"; +import { StoryDecorator } from '@storybook/react'; export interface Options { name?: string; @@ -23,7 +24,9 @@ export interface Options { sortStoriesByKind?: boolean; hierarchySeparator?: RegExp | string; hierarchyRootSeparator?: RegExp | string; + sidebarAnimations?: boolean; selectedAddonPanel?: string; + enableShortcuts?: boolean; } /** diff --git a/types/storybook__addon-options/storybook__addon-options-tests.ts b/types/storybook__addon-options/storybook__addon-options-tests.ts index 1fc49d18e0..4321ecd72d 100644 --- a/types/storybook__addon-options/storybook__addon-options-tests.ts +++ b/types/storybook__addon-options/storybook__addon-options-tests.ts @@ -1,5 +1,23 @@ -import { setOptions, withOptions } from '@storybook/addon-options'; import { addDecorator } from '@storybook/react'; +import { setOptions, withOptions } from '@storybook/addon-options'; + +addDecorator( + withOptions({ + name: 'My Storybook', + url: 'https://example.com', + goFullScreen: false, + showStoriesPanel: false, + showAddonPanel: false, + showSearchBox: false, + addonPanelInRight: false, + sortStoriesByKind: false, + hierarchySeparator: /\//, + hierarchyRootSeparator: /\|/, + sidebarAnimations: false, + selectedAddonPanel: 'storybook/actions/action-panel', + enableShortcuts: false + }) +); setOptions({ name: 'My Storybook', @@ -12,7 +30,9 @@ setOptions({ sortStoriesByKind: false, hierarchySeparator: /\//, hierarchyRootSeparator: /\|/, + sidebarAnimations: false, selectedAddonPanel: 'storybook/actions/action-panel', + enableShortcuts: false }); setOptions({ @@ -32,19 +52,3 @@ setOptions({ hierarchySeparator: '.', hierarchyRootSeparator: '#', }); - -addDecorator( - withOptions({ - name: "My Storybook", - url: "https://example.com", - goFullScreen: false, - showStoriesPanel: false, - showAddonPanel: false, - showSearchBox: false, - addonPanelInRight: false, - sortStoriesByKind: false, - hierarchySeparator: /\//, - hierarchyRootSeparator: /\|/, - selectedAddonPanel: "storybook/actions/action-panel" - }) -); From 08fe7e0d496f4d082123e4ec4a86e00a6c92db22 Mon Sep 17 00:00:00 2001 From: "Lukaschenko, Konstantin" Date: Tue, 4 Dec 2018 15:42:26 +0100 Subject: [PATCH 324/608] added tdsloader (autodesk 3ds max) support to three js. --- types/three/index.d.ts | 2 + .../three/test/examples/loaders/tdsloader.ts | 14 ++ types/three/three-tdsloader.d.ts | 195 ++++++++++++++++++ types/three/tsconfig.json | 1 + 4 files changed, 212 insertions(+) create mode 100644 types/three/test/examples/loaders/tdsloader.ts create mode 100644 types/three/three-tdsloader.d.ts diff --git a/types/three/index.d.ts b/types/three/index.d.ts index b8c5dfa961..2e4cad4929 100644 --- a/types/three/index.d.ts +++ b/types/three/index.d.ts @@ -23,6 +23,7 @@ // Dilip Ramirez // Julian Strecker // Zhang Hao +// Konstantin Lukaschenko // Definitions: https://github.com//DefinitelyTyped // TypeScript Version: 2.8 @@ -34,6 +35,7 @@ export * from "./three-copyshader"; export * from "./three-css3drenderer"; export * from "./three-ctmloader"; export * from "./three-ddsloader"; +export * from "./three-tdsloader"; export * from "./three-dragcontrols"; export * from "./three-editorcontrols"; export * from "./three-effectcomposer"; diff --git a/types/three/test/examples/loaders/tdsloader.ts b/types/three/test/examples/loaders/tdsloader.ts new file mode 100644 index 0000000000..72666d4003 --- /dev/null +++ b/types/three/test/examples/loaders/tdsloader.ts @@ -0,0 +1,14 @@ +import * as THREE from '../../../index' + +const onSuccess = (object3D: THREE.Object3D) => {}; +const onProgress = (progress: ProgressEvent) => {}; +const onError = (event: ErrorEvent) => {}; + +() => { + new THREE.TDSLoader(THREE).load( + 'folder/file.3ds', + onSuccess, + onProgress, + onError + ); +} \ No newline at end of file diff --git a/types/three/three-tdsloader.d.ts b/types/three/three-tdsloader.d.ts new file mode 100644 index 0000000000..3cd9df6443 --- /dev/null +++ b/types/three/three-tdsloader.d.ts @@ -0,0 +1,195 @@ +// https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/TDSLoader.js + +import * as THREE from "./index"; + +export class TDSLoader { + constructor(three: typeof THREE); + + /** + * Load 3ds file from url. + * + * @param url URL for the file. + * @param onLoad onLoad callback, receives group object3D as argument. + * @param onProgress onProgress callback. + * @param onError onError callback. + */ + load: (url: string, onLoad: (object3D: THREE.Object3D) => void, onProgress?: (progress: ProgressEvent) => void, onError?: (event: ErrorEvent) => void) => void; + + /** + * Parse arraybuffer data and load 3ds file. + * + * @param arraybuffer Arraybuffer data to be loaded. + * @param path Path for external resources. + * @return Group loaded from 3ds file. + */ + parse: (arraybuffer: ArrayBuffer, path: string) => THREE.Object3D; + + /** + * Decode file content to read 3ds data. + * + * @param arraybuffer Arraybuffer data to be loaded. + */ + readFile: (arraybuffer: ArrayBuffer, path: string) => void; + + /** + * Read mesh data chunk. + * + * @param data Dataview in use. + */ + readMeshData: (data: DataView, path: string) => void; + + /** + * Read named object chunk. + * + * @param data Dataview in use. + */ + readNamedobject: (data: DataView) => void; + + /** + * Read material data chunk and add it to the material list. + * + * @param data Dataview in use. + */ + readMaterialEntry: (data: DataView, path: string) => void; + + /** + * Read mesh data chunk. + * + * @param data Dataview in use. + */ + readMesh: (data: DataView) => void; + + /** + * Read face array data chunk. + * + * @param data Dataview in use. + * @param mesh Mesh to be filled with the data read. + */ + readFaceArray: (data: DataView, mesh: THREE.Mesh) => void; + + /** + * Read texture map data chunk. + * + * @param data Dataview in use. + * @return Texture read from this data chunk. + */ + readMap: (data: DataView, path: string) => THREE.Texture; + + /** + * Read material group data chunk. + * + * @param data Dataview in use. + * @return object with name and index of the object. + */ + readMaterialGroup: (data: DataView) => object; + + /** + * Read a color value. + * + * @param data Dataview. + * @return Color value read.. + */ + readColor: (data: DataView) => THREE.Color; + + /** + * Read next chunk of data. + * + * @param data Dataview. + * @return Chunk of data read. + */ + readChunk: (data: DataView) => object; + + /** + * Set position to the end of the current chunk of data. + * + * @param chunk Data chunk. + */ + endChunk: (chunk: object) => void; + + /** + * Move to the next data chunk. + * + * @param data Dataview. + * @param chunk Data chunk. + */ + nextChunk: (data: DataView, chunk: object) => number; + + /** + * Reset dataview position. + */ + resetPosition: () => void; + + /** + * Read byte value. + * + * @param data Dataview to read data from. + * @return Data read from the dataview. + */ + readByte: (data: DataView) => number; + + /** + * Read 32 bit float value. + * + * @param data Dataview to read data from. + * @return Data read from the dataview. + */ + readFloat: (data: DataView) => number; + + /** + * Read 32 bit signed integer value. + * + * @param data Dataview to read data from. + * @return Data read from the dataview. + */ + readInt: (data: DataView) => number; + + /** + * Read 16 bit signed integer value. + * + * @param data Dataview to read data from. + * @return Data read from the dataview. + */ + readShort: (data: DataView) => number; + + /** + * Read 64 bit unsigned integer value. + * + * @param data Dataview to read data from. + * @return Data read from the dataview. + */ + readDWord: (data: DataView) => number; + + /** + * Read 32 bit unsigned integer value. + * + * @param data Dataview to read data from. + * @return Data read from the dataview. + */ + readWord: (data: DataView) => number; + + /** + * Read string value. + * + * @param data Dataview to read data from. + * @param maxLength Max size of the string to be read. + * @return Data read from the dataview. + */ + readString: (data: DataView, maxLength: number) => string; + + /** + * Set resource path used to determine the file path to attached resources. + * + * @param path Path to resources. + * @return Self for chaining. + */ + setPath: (path: string) => TDSLoader; + + /** + * Print debug message to the console. + * + * Is controlled by a flag to show or hide debug messages. + * + * @param message Debug message to print to the console. + */ + debugMessage: (message: string) => void; +} \ No newline at end of file diff --git a/types/three/tsconfig.json b/types/three/tsconfig.json index a7a79e68f5..814dd8f824 100644 --- a/types/three/tsconfig.json +++ b/types/three/tsconfig.json @@ -57,6 +57,7 @@ "test/examples/ctm/ctmloader.ts", "test/examples/octree.ts", "test/examples/loaders/webgl_loader_obj_mtl.ts", + "test/examples/loaders/tdsloader.ts", "test/examples/exporters/gltf-exporter.ts", "test/webvr/webvr.ts" ] From b37be32b6890ab5e1269ba03d4cfbabb7a530848 Mon Sep 17 00:00:00 2001 From: MichaelTsafrir Date: Tue, 4 Dec 2018 16:45:20 +0200 Subject: [PATCH 325/608] Added missing blendStroke property to PieProps blendStroke property exists in the pie component, yet is not recognized by the ts definition --- types/recharts/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/recharts/index.d.ts b/types/recharts/index.d.ts index 34e3cbcb88..6426e0de5f 100644 --- a/types/recharts/index.d.ts +++ b/types/recharts/index.d.ts @@ -447,6 +447,7 @@ export interface PieProps extends EventAttributes, Partial | ContentRenderer | boolean; activeShape?: object | ContentRenderer | React.ReactElement; activeIndex?: number | number[]; + blendStroke?: boolean; } export class Pie extends React.Component { } From acbff25eb48b184944d57bcf9918c5309a427160 Mon Sep 17 00:00:00 2001 From: "Lukaschenko, Konstantin" Date: Tue, 4 Dec 2018 15:54:40 +0100 Subject: [PATCH 326/608] enhance reference. --- types/three/three-tdsloader.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/three/three-tdsloader.d.ts b/types/three/three-tdsloader.d.ts index 3cd9df6443..c1911a7003 100644 --- a/types/three/three-tdsloader.d.ts +++ b/types/three/three-tdsloader.d.ts @@ -1,4 +1,4 @@ -// https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/TDSLoader.js +// https://github.com/codetheorist/three-tds-loader/blob/master/src/index.js import * as THREE from "./index"; From 7b8c006a78eed82402b8ba6b8decb88736aa5ef6 Mon Sep 17 00:00:00 2001 From: Simon Schick Date: Tue, 4 Dec 2018 07:53:23 -0800 Subject: [PATCH 327/608] feat(puppeteer): add device descriptors --- types/puppeteer/DeviceDescriptors.d.ts | 22 ++++++++++++++++++++++ types/puppeteer/puppeteer-tests.ts | 2 ++ types/puppeteer/tsconfig.json | 1 + 3 files changed, 25 insertions(+) create mode 100644 types/puppeteer/DeviceDescriptors.d.ts diff --git a/types/puppeteer/DeviceDescriptors.d.ts b/types/puppeteer/DeviceDescriptors.d.ts new file mode 100644 index 0000000000..e457748fda --- /dev/null +++ b/types/puppeteer/DeviceDescriptors.d.ts @@ -0,0 +1,22 @@ +declare namespace devices { + interface Viewport { + width: number; + height: number; + deviceScaleFactor: number; + isMobile: boolean; + hasTouch: boolean; + isLandscape: boolean; + } + + interface Device { + name: string; + userAgent: string; + viewport: Viewport; + } +} + +declare const devices: { + [key: string]: devices.Device; +}; + +export = devices; diff --git a/types/puppeteer/puppeteer-tests.ts b/types/puppeteer/puppeteer-tests.ts index b708f1bc0c..66f8575583 100644 --- a/types/puppeteer/puppeteer-tests.ts +++ b/types/puppeteer/puppeteer-tests.ts @@ -1,5 +1,6 @@ import * as puppeteer from "puppeteer"; import { TimeoutError } from "puppeteer/Errors"; +import * as Devices from "puppeteer/DeviceDescriptors"; // Accessibility @@ -118,6 +119,7 @@ puppeteer.launch().then(async browser => { }); await page.emulateMedia("screen"); + await page.emulate(Devices['test']); await page.pdf({ path: "page.pdf" }); await page.setRequestInterception(true); diff --git a/types/puppeteer/tsconfig.json b/types/puppeteer/tsconfig.json index f253604e14..57b57e65aa 100644 --- a/types/puppeteer/tsconfig.json +++ b/types/puppeteer/tsconfig.json @@ -21,6 +21,7 @@ }, "files": [ "Errors.d.ts", + "DeviceDescriptors.d.ts", "index.d.ts", "puppeteer-tests.ts" ] From af00ad4606c8857202d840a1467834ca119ce192 Mon Sep 17 00:00:00 2001 From: Wassim Chegham Date: Tue, 4 Dec 2018 16:08:12 +0000 Subject: [PATCH 328/608] feat: add types for the SketchApp designer tool --- types/sketchapp/index.d.ts | 516 +++++++++++++++++++++++++++++ types/sketchapp/sketchapp-tests.ts | 5 + types/sketchapp/tsconfig.json | 24 ++ types/sketchapp/tslint.json | 3 + 4 files changed, 548 insertions(+) create mode 100644 types/sketchapp/index.d.ts create mode 100644 types/sketchapp/sketchapp-tests.ts create mode 100644 types/sketchapp/tsconfig.json create mode 100644 types/sketchapp/tslint.json diff --git a/types/sketchapp/index.d.ts b/types/sketchapp/index.d.ts new file mode 100644 index 0000000000..6d9776aaa7 --- /dev/null +++ b/types/sketchapp/index.d.ts @@ -0,0 +1,516 @@ +// Type definitions for the SketchApp 1.0 +// Project: https://github.com/xlayers/xlayers +// Definitions by: Wassim Chegham +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +type SketchMSBorderPositionEnum = 0 | 1 | 2 | 3; +type SketchMSBorderLineCapStyle = 0 | 1 | 2; +type SketchMSBorderLineJoinStyle = 0 | 1 | 2; +type SketchMSFillTypeEnum = 0 | 1 | 4 | 5; +type SketchMSPatternFillTypeEnum = 0 | 1 | 2 | 3; +type SketchMSBlendModeEnum = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15; +type SketchMSLineDecorationTypeEnum = 0 | 1 | 2 | 3; +type SketchMSBooleanOperation = -1 | 0 | 1 | 2 | 3; +type SketchMSCurveMode = 0 | 1 | 2 | 3 | 4; +type SketchMSResizingType = 0 | 1 | 2 | 3; +type SketchMSLayerListExpandedType = 0 | 1 | 2; +type SketchMSEncodedBase64BinaryPlist = string; +type SketchMSNSColorArchive = SketchMSKeyValueArchive; +type SketchMSLayer = SketchMSPage | SketchMSSymbolMaster; +interface SketchMSNestedSymbolOverride { + symbolID: string; +} +interface SketchMSStringAttribute { + _class: 'stringAttribute'; + attributes: { + MSAttributedStringFontAttribute: { + _class: 'fontDescriptor'; + attributes: { + name: string; + size: number; + } + }; + paragraphStyle: { + _class: 'paragraphStyle', + allowsDefaultTighteningForTruncation: number + }, + foregroundColor: SketchMSKeyValueArchive + }; +} +interface SketchMSAttributedString { + _class: 'attributedString'; + string: string; + attributes: SketchMSStringAttribute[]; + archivedAttributedString?: SketchMSKeyValueArchive; +} +interface SketchMSKeyValueArchive { + _archive: SketchMSEncodedBase64BinaryPlist; +} +interface SketchMSFontAttribute { + _class: 'fontDescriptor'; + _archive?: string; + attributes: { + name: string; + size: number; + }; +} +interface SketchMSBorder { + _class: 'border'; + isEnabled: boolean; + color: SketchMSColor; + fillType: SketchMSFillTypeEnum; + position: SketchMSBorderPositionEnum; + thickness: number; +} +interface SketchMSBorderOptions { + _class: 'borderOptions'; + isEnabled: boolean; + dashPattern: number[]; + lineCapStyle: SketchMSBorderLineCapStyle; + lineJoinStyle: SketchMSBorderLineJoinStyle; +} + +interface SketchMSImageDataReference { + _class: 'jSONOriginalDataReference'; + _ref: string; + _ref_class: 'imageData'; + data: { + _data: string; + }; + sha1: { + _data: string; + }; +} +type SketchMSPointString = string; +interface SketchMSPath { + _class: 'path'; + isClosed: boolean; + points: SketchMSCurvePoint[]; +} +interface SketchMSCurvePoint { + _class: 'curvePoint'; + cornerRadius: number; + curveFrom: SketchMSPointString; + curveMode: SketchMSCurveMode; + curveTo: SketchMSPointString; + hasCurveFrom: boolean; + hasCurveTo: boolean; + point: SketchMSPointString; +} + +interface SketchMSFill { + _class: 'fill'; + isEnabled: boolean; + color?: SketchMSColor; + fillType: SketchMSFillTypeEnum; + image?: SketchMSImageDataReference; + noiseIndex: number; + noiseIntensity: number; + patternFillType: SketchMSPatternFillTypeEnum; + patternTileScale: number; +} +interface SketchMSShadow { + _class: 'shadow' | 'MSInnerShadow'; + isEnabled: boolean; + blurRadius: number; + color: SketchMSColor; + contextSettings: SketchMSGraphicsContextSettings; + offsetX: number; + offsetY: number; + spread: number; +} +interface SketchMSImageCollection { + do_objectID?: string; + _class: 'imageCollection'; + images: any[]; +} +interface SketchMSAssetCollection { + do_objectID?: string; + _class: 'assetCollection'; + gradients: any[]; + colors: any[]; + imageCollection: SketchMSImageCollection; + images: any[]; +} +interface SketchMSStyleBorder { + position: number; + color: SketchMSColor; + do_objectID?: string; + _class: 'styleBorder'; + gradient: SketchMSGradient; + fillType: number; + thickness: number; + contextSettings: SketchMSGraphicsContextSettings; + isEnabled: number; +} +interface SketchMSGradientStop { + do_objectID?: string; + _class: 'gradientStop'; + color: SketchMSColor; + position: number; +} +interface SketchMSGradient { + from: { + x: number; + y: number; + }; + shouldSmoothenOpacity: boolean; + gradientType: number; + do_objectID?: string; + _class: 'gradient'; + stops: SketchMSGradientStop[]; + to: { + x: number; + y: number; + }; + elipseLength: number; +} +interface SketchMSStyleFill { + contextSettings: SketchMSGraphicsContextSettings; + color: SketchMSColor; + do_objectID?: string; + _class: 'styleFill'; + gradient: SketchMSGradient; + fillType: number; + noiseIntensity: number; + patternFillType: number; + patternTileScale: number; + noiseIndex: number; + isEnabled: number; +} +interface SketchMSStyleShadow { + spread: number; + color: SketchMSColor; + offsetY: number; + offsetX: number; + do_objectID?: string; + _class: 'styleShadow'; + blurRadius: number; + contextSettings: SketchMSGraphicsContextSettings; + isEnabled: number; +} +interface SketchMSSharedStyle { + do_objectID?: string; + _class: 'sharedStyle'; + value: SketchMSStyle; + objectID: string; + name: string; +} +interface SketchMSTextStyle { + _class: 'textStyle'; + encodedAttributes: { + MSAttributedStringColorAttribute?: SketchMSColor; + NSColor: SketchMSKeyValueArchive; + MSAttributedStringFontAttribute?: SketchMSFontAttribute; + NSParagraphStyle?: SketchMSKeyValueArchive; + NSKern: number; + }; +} +interface SketchMSSharedStyleContainer { + do_objectID?: string; + _class: 'sharedStyleContainer'; + objects: SketchMSSharedStyle[]; +} +interface SketchMSStyleBorderOptions { + lineJoinStyle: number; + do_objectID?: string; + _class: 'styleBorderOptions'; + isEnabled: number; + lineCapStyle: number; + dashPattern: any[]; +} +interface SketchMSGraphicsContextSettings { + do_objectID?: string; + _class: 'graphicsContextSettings'; + opacity: number; + blendMode: number; +} +interface SketchMSStyleBlur { + radius: number; + do_objectID?: string; + _class: 'styleBlur'; + motionAngle: number; + isEnabled: number; + type: number; + center: { + x: number; + y: number; + }; +} +interface SketchMSStyleReflection { + do_objectID?: string; + _class: 'styleReflection'; + strength: number; + isEnabled: number; + distance: number; +} +interface SketchMSStyleColorControls { + hue: number; + do_objectID?: string; + _class: 'styleColorControls'; + brightness: number; + contrast: number; + isEnabled: number; + saturation: number; +} +interface SketchMSStyle { + startDecorationType: number; + borderOptions: SketchMSStyleBorderOptions; + endDecorationType: number; + contextSettings: SketchMSGraphicsContextSettings; + blur: SketchMSStyleBlur; + textStyle: SketchMSTextStyle; + reflection: SketchMSStyleReflection; + do_objectID?: string; + _class: 'style'; + miterLimit: number; + colorControls: SketchMSStyleColorControls; + fills: SketchMSStyleFill[]; + borders: SketchMSStyleBorder[]; + innerShadows: SketchMSStyleShadow[]; + shadows: SketchMSStyleShadow[]; +} +interface SketchMSRulerData { + do_objectID?: string; + _class: 'rulerData'; + base: number; + guides: any[]; +} +interface SketchMSRect { + y: number; + do_objectID?: string; + _class: 'rect'; + constrainProportions: boolean; + height: number; + width: number; + x: number; +} +interface SketchMSExportOptions { + shouldTrim: boolean; + do_objectID?: string; + _class: 'exportOptions'; + includedLayerIds: any[]; + layerOptions: number; + exportFormats: any[]; +} +interface SketchMSColor { + do_objectID?: string; + _class: 'color'; + + /** + * ex: "#FFFFFF" + * ex: rgb(1,0,1) + */ + value: string; + red: number; + green: number; + blue: number; + alpha: number; +} +interface SketchMSSimpleGrid { + do_objectID?: string; + _class: 'simpleGrid'; + thickGridTimes: number; + objectID: string; + isEnabled: number; + gridSize: number; +} +interface SketchMSLayoutGrid { + columnWidth: number; + totalWidth: number; + drawHorizontalLines: number; + objectID: string; + gutterWidth: number; + horizontalOffset: number; + isEnabled: number; + do_objectID?: string; + _class: 'layoutGrid'; + gutterHeight: number; + drawHorizontal: number; + guttersOutside: number; + numberOfColumns: number; + drawVertical: number; + rowHeightMultiplication: number; +} +interface SketchMSSymbolMaster { + isFlippedHorizontal: number; + includeBackgroundColorInInstance: number; + objectID: string; + horizontalRulerData: SketchMSRulerData; + frame: SketchMSRect; + hasClickThrough: number; + includeInCloudUpload: number; + exportOptions: SketchMSExportOptions; + hasBackgroundColor: number; + layerListExpandedType: number; + resizesContent: number; + backgroundColor: SketchMSColor; + rotation: number; + style: SketchMSStyle; + verticalRulerData: SketchMSRulerData; + constrainProportions: boolean; + isFlippedVertical: number; + do_objectID?: string; + _class: 'symbolMaster'; + attributedString: SketchMSAttributedString; + name: string; + layers: SketchMSLayer[]; + isVisible: boolean; + nameIsFixed: boolean; + grid: SketchMSSimpleGrid; + resizingType: number; + userInfo: any; + isLocked: boolean; + layout: SketchMSLayoutGrid; + shouldBreakMaskChain: number; + resizingConstraint: 63 | number; + includeBackgroundColorInExport: number; + flow?: SketchMSImmutableFlowConnection; + + // add this property to hold all CSS properties + // of the current layer + css?: { [key: string]: string }; +} +interface SketchMSSymbolInstanceLayer { + _class: 'symbolInstance'; + frame: SketchMSRect; + horizontalSpacing: number; + verticalSpacing: number; + masterInfluenceEdgeMinXPadding?: number; + masterInfluenceEdgeMaxXPadding?: number; + masterInfluenceEdgeMinYPadding?: number; + masterInfluenceEdgeMaxYPadding?: number; + symbolID: string; + overrides?: { + [objectId: string]: string | SketchMSNestedSymbolOverride | SketchMSImageDataReference; + }; + isFlippedHorizontal: number; + includeBackgroundColorInInstance: number; + objectID: string; + horizontalRulerData: SketchMSRulerData; + hasClickThrough: number; + includeInCloudUpload: number; + exportOptions: SketchMSExportOptions; + hasBackgroundColor: number; + layerListExpandedType: number; + resizesContent: number; + backgroundColor: SketchMSColor; + rotation: number; + style: SketchMSStyle; + verticalRulerData: SketchMSRulerData; + isFlippedVertical: number; + do_objectID?: string; + name: string; + layers: SketchMSLayer[]; + isVisible: boolean; + nameIsFixed: boolean; + grid: SketchMSSimpleGrid; + resizingType: number; + userInfo: any; + isLocked: boolean; + layout: SketchMSLayoutGrid; + shouldBreakMaskChain: number; + resizingConstraint: 63 | number; + includeBackgroundColorInExport: number; + flow?: SketchMSImmutableFlowConnection; +} +interface SketchMSPage { + isFlippedHorizontal: number; + style: SketchMSStyle; + horizontalRulerData: SketchMSRulerData; + frame: SketchMSRect; + hasClickThrough: number; + includeInCloudUpload: number; + exportOptions: SketchMSExportOptions; + objectID: string; + id: string; + rotation: number; + layerListExpandedType: number; + verticalRulerData: SketchMSRulerData; + isFlippedVertical: number; + resizingType: number; + do_objectID?: string; + _class: 'page' | 'layer'; + layers: SketchMSLayer[]; + isVisible: boolean; + nameIsFixed: number; + name: string; + constrainProportions: boolean; + attributedString: SketchMSAttributedString; + isLocked: boolean; + shouldBreakMaskChain: number; + resizingConstraint: number; + fixedRadius: number; + + // add this property to hold all CSS properties + // of the current layer + css?: { [key: string]: string }; +} +interface SketchMSSharedTextStyleContainer { + do_objectID?: string; + _class: 'sharedTextStyleContainer'; + objects: any[]; +} +interface SketchMSSymbolContainers { + do_objectID?: string; + _class: 'symbolContainer'; + objects: any[]; +} +interface SketchMSDocumentData { + assets: SketchMSAssetCollection; + currentPageIndex: number; + foreignSymbols: any[]; + layerStyles: SketchMSSharedStyleContainer; + pages: SketchMSPage[]; + enableSliceInteraction: number; + do_objectID?: string; + _class: 'documentData'; + layerTextStyles: SketchMSSharedTextStyleContainer; + enableLayerInteraction: number; + layerSymbols: SketchMSSymbolContainers; + objectID: string; +} +interface SketchMSArtboards { + name: string; + artboards: SketchMSArtboard; +} +interface SketchMSArtboard { + frame: SketchMSRect; + backgroundColor: SketchMSColor; + hasBackgroundColor: boolean; + horizontalRulerData?: SketchMSRulerData; + verticalRulerData?: SketchMSRulerData; + includeBackgroundColorInExport?: boolean; + includeInCloudUpload?: boolean; + isFlowHome?: boolean; +} +interface SketchMSPagesAndArtboards { + [key: string]: SketchMSArtboards; +} +interface SketchMSMetadata { + commit: string; + pagesAndArtboards: SketchMSPagesAndArtboards; + version: number; + fonts: string[]; + compatibilityVersion: number; + app: string; + autosaved: number; + variant: string; + created: { + commit: string; + appVersion: string; + build: number; + app: string; + compatibilityVersion: number; + version: number; + variant: string; + }; + saveHistory: string[]; + appVersion: string; + build: number; +} +interface SketchMSImmutableFlowConnection { + _class: 'immutableFlowConnection'; + animationType: number; + destinationArtboardID?: string | 'back'; +} diff --git a/types/sketchapp/sketchapp-tests.ts b/types/sketchapp/sketchapp-tests.ts new file mode 100644 index 0000000000..14a2be96a9 --- /dev/null +++ b/types/sketchapp/sketchapp-tests.ts @@ -0,0 +1,5 @@ +console.log(` +In order to test thie SketchApp types, we need to parse a SketchApp file. +See the following repo for a real worl test case: +https://github.com/xlayers/xlayers/blob/develop/src/app/editor/viewer/lib/parsers/sketch-style-parser.service.spec.ts +`); diff --git a/types/sketchapp/tsconfig.json b/types/sketchapp/tsconfig.json new file mode 100644 index 0000000000..6f22fec54b --- /dev/null +++ b/types/sketchapp/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "sketchapp-tests.ts" + ] +} diff --git a/types/sketchapp/tslint.json b/types/sketchapp/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/sketchapp/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} From 3161ba19195b79562c5d6d4dd03421a3cd81f339 Mon Sep 17 00:00:00 2001 From: "Lukaschenko, Konstantin" Date: Tue, 4 Dec 2018 17:23:02 +0100 Subject: [PATCH 329/608] added types for three-tds-loader. --- types/three-tds-loader/index.d.ts | 200 ++++++++++++++++++ .../three-tds-loader-tests.ts | 15 ++ types/three-tds-loader/tsconfig.json | 24 +++ types/three-tds-loader/tslint.json | 1 + 4 files changed, 240 insertions(+) create mode 100644 types/three-tds-loader/index.d.ts create mode 100644 types/three-tds-loader/three-tds-loader-tests.ts create mode 100644 types/three-tds-loader/tsconfig.json create mode 100644 types/three-tds-loader/tslint.json diff --git a/types/three-tds-loader/index.d.ts b/types/three-tds-loader/index.d.ts new file mode 100644 index 0000000000..379a2de8af --- /dev/null +++ b/types/three-tds-loader/index.d.ts @@ -0,0 +1,200 @@ +// Type definitions for three-tds-loader 1.1 +// Project: https://github.com/codetheorist/three-tds-loader +// Definitions by: Konstantin Lukaschenko +// Stefan Schönsee +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +import * as THREE from 'three'; + +export default class TDSLoader { + constructor(three: typeof THREE); + + /** + * Load 3ds file from url. + * + * @param url URL for the file. + * @param onLoad onLoad callback, receives group object3D as argument. + * @param onProgress onProgress callback. + * @param onError onError callback. + */ + load: (url: string, onLoad: (object3D: THREE.Object3D) => void, onProgress?: (progress: ProgressEvent) => void, onError?: (event: ErrorEvent) => void) => void; + + /** + * Parse arraybuffer data and load 3ds file. + * + * @param arraybuffer Arraybuffer data to be loaded. + * @param path Path for external resources. + * @return Group loaded from 3ds file. + */ + parse: (arraybuffer: ArrayBuffer, path: string) => THREE.Object3D; + + /** + * Decode file content to read 3ds data. + * + * @param arraybuffer Arraybuffer data to be loaded. + */ + readFile: (arraybuffer: ArrayBuffer, path: string) => void; + + /** + * Read mesh data chunk. + * + * @param data Dataview in use. + */ + readMeshData: (data: DataView, path: string) => void; + + /** + * Read named object chunk. + * + * @param data Dataview in use. + */ + readNamedobject: (data: DataView) => void; + + /** + * Read material data chunk and add it to the material list. + * + * @param data Dataview in use. + */ + readMaterialEntry: (data: DataView, path: string) => void; + + /** + * Read mesh data chunk. + * + * @param data Dataview in use. + */ + readMesh: (data: DataView) => void; + + /** + * Read face array data chunk. + * + * @param data Dataview in use. + * @param mesh Mesh to be filled with the data read. + */ + readFaceArray: (data: DataView, mesh: THREE.Mesh) => void; + + /** + * Read texture map data chunk. + * + * @param data Dataview in use. + * @return Texture read from this data chunk. + */ + readMap: (data: DataView, path: string) => THREE.Texture; + + /** + * Read material group data chunk. + * + * @param data Dataview in use. + * @return object with name and index of the object. + */ + readMaterialGroup: (data: DataView) => object; + + /** + * Read a color value. + * + * @param data Dataview. + * @return Color value read.. + */ + readColor: (data: DataView) => THREE.Color; + + /** + * Read next chunk of data. + * + * @param data Dataview. + * @return Chunk of data read. + */ + readChunk: (data: DataView) => object; + + /** + * Set position to the end of the current chunk of data. + * + * @param chunk Data chunk. + */ + endChunk: (chunk: object) => void; + + /** + * Move to the next data chunk. + * + * @param data Dataview. + * @param chunk Data chunk. + */ + nextChunk: (data: DataView, chunk: object) => number; + + /** + * Reset dataview position. + */ + resetPosition: () => void; + + /** + * Read byte value. + * + * @param data Dataview to read data from. + * @return Data read from the dataview. + */ + readByte: (data: DataView) => number; + + /** + * Read 32 bit float value. + * + * @param data Dataview to read data from. + * @return Data read from the dataview. + */ + readFloat: (data: DataView) => number; + + /** + * Read 32 bit signed integer value. + * + * @param data Dataview to read data from. + * @return Data read from the dataview. + */ + readInt: (data: DataView) => number; + + /** + * Read 16 bit signed integer value. + * + * @param data Dataview to read data from. + * @return Data read from the dataview. + */ + readShort: (data: DataView) => number; + + /** + * Read 64 bit unsigned integer value. + * + * @param data Dataview to read data from. + * @return Data read from the dataview. + */ + readDWord: (data: DataView) => number; + + /** + * Read 32 bit unsigned integer value. + * + * @param data Dataview to read data from. + * @return Data read from the dataview. + */ + readWord: (data: DataView) => number; + + /** + * Read string value. + * + * @param data Dataview to read data from. + * @param maxLength Max size of the string to be read. + * @return Data read from the dataview. + */ + readString: (data: DataView, maxLength: number) => string; + + /** + * Set resource path used to determine the file path to attached resources. + * + * @param path Path to resources. + * @return Self for chaining. + */ + setPath: (path: string) => TDSLoader; + + /** + * Print debug message to the console. + * + * Is controlled by a flag to show or hide debug messages. + * + * @param message Debug message to print to the console. + */ + debugMessage: (message: string) => void; +} diff --git a/types/three-tds-loader/three-tds-loader-tests.ts b/types/three-tds-loader/three-tds-loader-tests.ts new file mode 100644 index 0000000000..f61eeb92e3 --- /dev/null +++ b/types/three-tds-loader/three-tds-loader-tests.ts @@ -0,0 +1,15 @@ +import * as THREE from 'three'; +import TDSLoader from 'three-tds-loader'; + +const loader = new TDSLoader(THREE); + +const onSuccess = (object3D: THREE.Object3D) => {}; +const onProgress = (progress: ProgressEvent) => {}; +const onError = (event: ErrorEvent) => {}; + +loader.load( + 'folder/file.3ds', + onSuccess, + onProgress, + onError +); diff --git a/types/three-tds-loader/tsconfig.json b/types/three-tds-loader/tsconfig.json new file mode 100644 index 0000000000..cab037513c --- /dev/null +++ b/types/three-tds-loader/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "three-tds-loader-tests.ts" + ] +} diff --git a/types/three-tds-loader/tslint.json b/types/three-tds-loader/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/three-tds-loader/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From bb24e03c2562980f80ff243656740865ce28b773 Mon Sep 17 00:00:00 2001 From: Vincent Pizzo Date: Tue, 4 Dec 2018 08:39:02 -0800 Subject: [PATCH 330/608] Message should accept string or function --- types/yup/index.d.ts | 58 ++++++++++++++++++++++-------------------- types/yup/yup-tests.ts | 46 +++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+), 28 deletions(-) diff --git a/types/yup/index.d.ts b/types/yup/index.d.ts index 821b0e3526..5d8713db68 100644 --- a/types/yup/index.d.ts +++ b/types/yup/index.d.ts @@ -5,6 +5,7 @@ // Moreton Bay Regional Council , // Sindre Seppola // Yash Kulshrestha +// Vincent Pizzo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -47,6 +48,9 @@ export type AnySchemaConstructor = | ArraySchemaConstructor | ObjectSchemaConstructor; +export type TestOptionsMessage = string + | ((params: object & Partial) => string); + export interface Schema { clone(): this; label(label: string): this; @@ -67,11 +71,11 @@ export interface Schema { withMutation(fn: (current: this) => void): void; default(value?: any): this; nullable(isNullable: boolean): this; - required(message?: string): this; + required(message?: TestOptionsMessage): this; notRequired(): this; - typeError(message?: string): this; - oneOf(arrayOfValues: any[], message?: string): this; - notOneOf(arrayOfValues: any[], message?: string): this; + typeError(message?: TestOptionsMessage): this; + oneOf(arrayOfValues: any[], message?: TestOptionsMessage): this; + notOneOf(arrayOfValues: any[], message?: TestOptionsMessage): this; when(keys: string | any[], builder: WhenOptions): this; test( name: string, @@ -102,20 +106,20 @@ export interface StringSchemaConstructor { } export interface StringSchema extends Schema { - min(limit: number | Ref, message?: string): StringSchema; - max(limit: number | Ref, message?: string): StringSchema; + min(limit: number | Ref, message?: TestOptionsMessage): StringSchema; + max(limit: number | Ref, message?: TestOptionsMessage): StringSchema; matches( regex: RegExp, messageOrOptions?: - | string - | { message?: string; excludeEmptyString?: boolean } + | TestOptionsMessage + | { message?: TestOptionsMessage; excludeEmptyString?: boolean } ): StringSchema; - email(message?: string): StringSchema; - url(message?: string): StringSchema; + email(message?: TestOptionsMessage): StringSchema; + url(message?: TestOptionsMessage): StringSchema; ensure(): StringSchema; - trim(message?: string): StringSchema; - lowercase(message?: string): StringSchema; - uppercase(message?: string): StringSchema; + trim(message?: TestOptionsMessage): StringSchema; + lowercase(message?: TestOptionsMessage): StringSchema; + uppercase(message?: TestOptionsMessage): StringSchema; } export interface NumberSchemaConstructor { @@ -124,13 +128,13 @@ export interface NumberSchemaConstructor { } export interface NumberSchema extends Schema { - min(limit: number | Ref, message?: string): NumberSchema; - max(limit: number | Ref, message?: string): NumberSchema; - lessThan(limit: number | Ref, message?: string): NumberSchema; - moreThan(limit: number | Ref, message?: string): NumberSchema; - positive(message?: string): NumberSchema; - negative(message?: string): NumberSchema; - integer(message?: string): NumberSchema; + min(limit: number | Ref, message?: TestOptionsMessage): NumberSchema; + max(limit: number | Ref, message?: TestOptionsMessage): NumberSchema; + lessThan(limit: number | Ref, message?: TestOptionsMessage): NumberSchema; + moreThan(limit: number | Ref, message?: TestOptionsMessage): NumberSchema; + positive(message?: TestOptionsMessage): NumberSchema; + negative(message?: TestOptionsMessage): NumberSchema; + integer(message?: TestOptionsMessage): NumberSchema; truncate(): NumberSchema; round(type: "floor" | "ceil" | "trunc" | "round"): NumberSchema; } @@ -149,8 +153,8 @@ export interface DateSchemaConstructor { } export interface DateSchema extends Schema { - min(limit: Date | string | Ref, message?: string): DateSchema; - max(limit: Date | string | Ref, message?: string): DateSchema; + min(limit: Date | string | Ref, message?: TestOptionsMessage): DateSchema; + max(limit: Date | string | Ref, message?: TestOptionsMessage): DateSchema; } export interface ArraySchemaConstructor { @@ -160,8 +164,8 @@ export interface ArraySchemaConstructor { export interface ArraySchema extends Schema { of(type: Schema): ArraySchema; - min(limit: number | Ref, message?: string): ArraySchema; - max(limit: number | Ref, message?: string): ArraySchema; + min(limit: number | Ref, message?: TestOptionsMessage): ArraySchema; + max(limit: number | Ref, message?: TestOptionsMessage): ArraySchema; ensure(): ArraySchema; compact(rejector?: (value: any) => boolean): ArraySchema; } @@ -177,7 +181,7 @@ export interface ObjectSchema extends Schema { noSortEdges?: Array<[string, string]> ): ObjectSchema; from(fromKey: string, toKey: string, alias?: boolean): ObjectSchema; - noUnknown(onlyKnownKeys?: boolean, message?: string): ObjectSchema; + noUnknown(onlyKnownKeys?: boolean, message?: TestOptionsMessage): ObjectSchema; transformKeys(callback: (key: any) => any): void; camelCase(): ObjectSchema; constantCase(): ObjectSchema; @@ -256,9 +260,7 @@ export interface TestOptions { /** * The validation error message */ - message?: - | string - | ((params: object & Partial) => string); + message?: TestOptionsMessage; /** * Values passed to message for interpolation diff --git a/types/yup/yup-tests.ts b/types/yup/yup-tests.ts index efef78d319..4a6ecae98f 100644 --- a/types/yup/yup-tests.ts +++ b/types/yup/yup-tests.ts @@ -126,10 +126,15 @@ mixed.default(() => ({ number: 5 })); mixed.default(); mixed.nullable(true); mixed.required(); +mixed.required('Foo'); +mixed.required(() => 'Foo'); mixed.notRequired(); // $ExpectType MixedSchema mixed.typeError("type error"); +mixed.typeError(() => "type error"); mixed.oneOf(["hello", "world"], "message"); +mixed.oneOf(["hello", "world"], () => "message"); mixed.notOneOf(["hello", "world"], "message"); +mixed.notOneOf(["hello", "world"], () => "message"); mixed.when("isBig", { is: value => true, then: yup.number().min(5), @@ -255,26 +260,56 @@ yup.object() const strSchema = yup.string(); // $ExpectType StringSchema strSchema.isValid("hello"); // => true strSchema.required(); +strSchema.required("req"); +strSchema.required(() => "req"); strSchema.min(5, "message"); +strSchema.min(5, () => "message"); strSchema.max(5, "message"); +strSchema.max(5, () => "message"); strSchema.matches(/(hi|bye)/); +strSchema.matches(/(hi|bye)/, "invalid"); +strSchema.matches(/(hi|bye)/, () => "invalid"); strSchema.email(); +strSchema.email("invalid"); +strSchema.email(() => "invalid"); strSchema.url(); +strSchema.url("bad url"); +strSchema.url(() => "bad url"); strSchema.ensure(); strSchema.trim(); +strSchema.trim("trimmed"); +strSchema.trim(() => "trimmed"); strSchema.lowercase(); +strSchema.lowercase("lower"); +strSchema.lowercase(() => "lower"); strSchema.uppercase(); +strSchema.uppercase("upper"); +strSchema.uppercase(() => "upper"); // Number schema const numSchema = yup.number(); // $ExpectType NumberSchema numSchema.isValid(10); // => true +numSchema.min(5); numSchema.min(5, "message"); +numSchema.min(5, () => "message"); +numSchema.max(5); numSchema.max(5, "message"); +numSchema.max(5, () => "message"); numSchema.positive(); +numSchema.positive("pos"); +numSchema.positive(() => "pos"); numSchema.negative(); +numSchema.negative("neg"); +numSchema.negative(() => "neg"); numSchema.lessThan(5); +numSchema.lessThan(5, "lt"); +numSchema.lessThan(5, () => "lt"); numSchema.moreThan(5); +numSchema.moreThan(5, "mt"); +numSchema.moreThan(5, () => "mt"); numSchema.integer(); +numSchema.integer("int"); +numSchema.integer(() => "int"); numSchema.truncate(); numSchema.round("floor"); numSchema @@ -293,17 +328,27 @@ dateSchema.min(new Date()); dateSchema.min("2017-11-12"); dateSchema.min(new Date(), "message"); dateSchema.min("2017-11-12", "message"); +dateSchema.min("2017-11-12", () => "message"); dateSchema.max(new Date()); dateSchema.max("2017-11-12"); dateSchema.max(new Date(), "message"); dateSchema.max("2017-11-12", "message"); +dateSchema.max("2017-11-12", () => "message"); // Array Schema const arrSchema = yup.array().of(yup.number().min(2)); arrSchema.isValid([2, 3]); // => true arrSchema.isValid([1, -24]); // => false arrSchema.required(); +arrSchema.required("req"); +arrSchema.required(() => "req"); arrSchema.ensure(); +arrSchema.max(5); +arrSchema.max(5, "max"); +arrSchema.max(5, () => "max"); +arrSchema.min(5); +arrSchema.min(5, "min"); +arrSchema.min(5, () => "min"); arrSchema.compact(value => value === null); yup.array(); // $ExpectType ArraySchema<{}> @@ -334,6 +379,7 @@ objSchema.from("prop", "myProp", true); objSchema.noUnknown(); objSchema.noUnknown(true); objSchema.noUnknown(true, "message"); +objSchema.noUnknown(true, () => "message"); objSchema.transformKeys(key => key.toUpperCase()); objSchema.camelCase(); objSchema.constantCase(); From 85aef6800f1be89ac31513f6efcfd4124a86c1e5 Mon Sep 17 00:00:00 2001 From: Silas Rech Date: Tue, 4 Dec 2018 17:53:55 +0100 Subject: [PATCH 331/608] [hapi-auth-cookie] add typings --- .../hapi-auth-cookie-tests.ts | 33 ++++ types/hapi-auth-cookie/index.d.ts | 142 ++++++++++++++++++ types/hapi-auth-cookie/tsconfig.json | 23 +++ types/hapi-auth-cookie/tslint.json | 1 + 4 files changed, 199 insertions(+) create mode 100644 types/hapi-auth-cookie/hapi-auth-cookie-tests.ts create mode 100644 types/hapi-auth-cookie/index.d.ts create mode 100644 types/hapi-auth-cookie/tsconfig.json create mode 100644 types/hapi-auth-cookie/tslint.json diff --git a/types/hapi-auth-cookie/hapi-auth-cookie-tests.ts b/types/hapi-auth-cookie/hapi-auth-cookie-tests.ts new file mode 100644 index 0000000000..155bb928e3 --- /dev/null +++ b/types/hapi-auth-cookie/hapi-auth-cookie-tests.ts @@ -0,0 +1,33 @@ +import * as hapi from 'hapi'; +import * as auth from 'hapi-auth-cookie'; + +const server = new hapi.Server({ port: 8000 }); + +server.register({ + plugin: auth, +}); + +const options: auth.Options = { + clearInvalid: true, + cookie: 'session', + domain: '.typescript.org', + keepAlive: true, + password: 'abcdef', + redirectTo: '/login', + isSecure: true, + appendNext: false, + ttl: 259200000, + validateFunc: async () => { + return { valid: true }; + }, +}; + +server.auth.strategy('session', 'cookie', options); + +server.route({ method: 'get', path: '/', handler: async (request) => { + request.cookieAuth.set('key', 'value'); + request.cookieAuth.set({ user: request.params.user }); + request.cookieAuth.clear(); + request.cookieAuth.clear('key'); + request.cookieAuth.ttl(1000); +}}); diff --git a/types/hapi-auth-cookie/index.d.ts b/types/hapi-auth-cookie/index.d.ts new file mode 100644 index 0000000000..8184ffd2fe --- /dev/null +++ b/types/hapi-auth-cookie/index.d.ts @@ -0,0 +1,142 @@ +// Type definitions for hapi-auth-cookie 9.1 +// Project: https://github.com/hapijs/hapi-auth-cookie +// Definitions by: Silas Rech +// Simon Schick +// Matt Erickson +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +import { Request, ResponseObject, Plugin, ResponseToolkit, AuthCredentials, ServerStateCookieOptions } from 'hapi'; + +declare module 'hapi' { + interface ServerAuth { + strategy(name: string, scheme: 'cookie', options?: hapiAuthCookie.Options): void; + } + + interface PluginSpecificConfiguration { + 'hapi-auth-cookie'?: { + redirectTo?: boolean; + }; + } + + interface Request { + cookieAuth: { + set(session: object): void; + set(key: string, value: object | string): void; + clear(key?: string): void; + ttl(milliseconds: number): void; + }; + } +} + +declare namespace hapiAuthCookie { + interface ValidateResponse { valid: boolean; credentials?: AuthCredentials; } + type ValidateFunction = (request?: Request, session?: object) => Promise; + type RedirectToFunction = (request?: Request) => void; + + /** + * Options passed to 'hapi.auth.strategy' when this plugin is used + */ + interface Options { + /** + * The cookie name. + * + * @default 'sid' + */ + cookie?: string; + + /** + * Used for Iron cookie encoding. + * Should be at least 32 characters long. + */ + password: string; + + /** + * Sets the cookie expires time in milliseconds. + * Required when 'keepAlive' is true. + * Defaults to single browser session (ends when browser closes). + */ + ttl?: number; + + /** + * Sets the cookie Domain value. + * Defaults to none. + */ + domain?: string; + + /** + * Sets the cookie path value. + * + * @default '/' + */ + path?: string; + + /** + * Any authentication cookie that fails validation will be marked as expired in the response and cleared. + * + * @default false + */ + clearInvalid?: boolean; + + /** + * Automatically sets the session cookie after validation to extend the current session for a new TTL duration. + * + * @default false + */ + keepAlive?: boolean; + + /** + * If false omitted. + * Other options Strict or Lax. + * + * @default 'Strict' + */ + isSameSite?: ServerStateCookieOptions['isSameSite']; + + /** + * If false, the cookie is allowed to be transmitted over insecure connections which exposes it to attacks. + * + * @default true + */ + isSecure?: boolean; + + /** + * If false, the cookie will not include the 'HttpOnly' flag. + * + * @default true + */ + isHttpOnly?: boolean; + + /** + * Login URI or function that returns a URI to redirect unauthenticated requests to. + * Note that it will only trigger when the authentication mode is 'required'. + * Defaults to no redirection. + */ + redirectTo?: string | RedirectToFunction; + + /** + * Only works if 'redirectTo' is true + * If set to true, a string, or an object, appends the current request path to the query component of the 'redirectTo' URI. + */ + appendNext?: boolean | string; + + /** + * An optional session validation function used to validate the content of the session cookie on each request. + * Used to verify that the internal session state is still valid (e.g. user account still exists). + */ + validateFunc?: ValidateFunction; + + /** + * A name to use with decorating the request object. + * Using multiple decorator names for separate authentication strategies could allow a developer to call the methods for the wrong strategy. + * Potentially resulting in unintended authorized access. + * + * @default 'cookieAuth' + */ + requestDecoratorName?: string; + } +} + +declare const hapiAuthCookie: Plugin; + +export = hapiAuthCookie; diff --git a/types/hapi-auth-cookie/tsconfig.json b/types/hapi-auth-cookie/tsconfig.json new file mode 100644 index 0000000000..ae04bf4a42 --- /dev/null +++ b/types/hapi-auth-cookie/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "hapi-auth-cookie-tests.ts" + ] +} diff --git a/types/hapi-auth-cookie/tslint.json b/types/hapi-auth-cookie/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/hapi-auth-cookie/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 35d220e617240652c73768d8282b684f96e36840 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Mon, 26 Nov 2018 22:21:48 +0100 Subject: [PATCH 332/608] Add types for randombytes --- types/randombytes/index.d.ts | 12 ++++++++++++ types/randombytes/randombytes-tests.ts | 11 +++++++++++ types/randombytes/tsconfig.json | 23 +++++++++++++++++++++++ types/randombytes/tslint.json | 1 + 4 files changed, 47 insertions(+) create mode 100644 types/randombytes/index.d.ts create mode 100644 types/randombytes/randombytes-tests.ts create mode 100644 types/randombytes/tsconfig.json create mode 100644 types/randombytes/tslint.json diff --git a/types/randombytes/index.d.ts b/types/randombytes/index.d.ts new file mode 100644 index 0000000000..049f893870 --- /dev/null +++ b/types/randombytes/index.d.ts @@ -0,0 +1,12 @@ +// Type definitions for randombytes 2.0 +// Project: https://github.com/crypto-browserify/randombytes +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import { randomBytes as _randomBytes } from 'crypto'; + +export = randomBytes; + +declare const randomBytes: typeof _randomBytes; diff --git a/types/randombytes/randombytes-tests.ts b/types/randombytes/randombytes-tests.ts new file mode 100644 index 0000000000..583fa685ec --- /dev/null +++ b/types/randombytes/randombytes-tests.ts @@ -0,0 +1,11 @@ +import randomBytes = require('randombytes'); + +// $ExpectType Buffer +randomBytes(16); +// $ExpectType void +randomBytes(16, (err, resp) => { + // $ExpectType Error | null + err; + // $ExpectType Buffer + resp; +}); diff --git a/types/randombytes/tsconfig.json b/types/randombytes/tsconfig.json new file mode 100644 index 0000000000..31ecde389d --- /dev/null +++ b/types/randombytes/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "randombytes-tests.ts" + ] +} diff --git a/types/randombytes/tslint.json b/types/randombytes/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/randombytes/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From e7f4d0148e3d4e7e3e60a68f83ab5c02b3f114b4 Mon Sep 17 00:00:00 2001 From: Ivan Fernandes Date: Tue, 4 Dec 2018 16:16:29 -0200 Subject: [PATCH 333/608] add missing scopeSeparator option and tests --- types/passport-oauth2/index.d.ts | 1 + .../passport-oauth2/passport-oauth2-tests.ts | 33 ++++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/types/passport-oauth2/index.d.ts b/types/passport-oauth2/index.d.ts index c3723b50b7..a6d519bf6a 100644 --- a/types/passport-oauth2/index.d.ts +++ b/types/passport-oauth2/index.d.ts @@ -67,6 +67,7 @@ declare namespace OAuth2Strategy { callbackURL?: string; customHeaders?: OutgoingHttpHeaders; scope?: string | string[]; + scopeSeparator?: string; sessionKey?: string; store?: StateStore; state?: any; diff --git a/types/passport-oauth2/passport-oauth2-tests.ts b/types/passport-oauth2/passport-oauth2-tests.ts index 864b2cb9d6..57dcfa56d9 100644 --- a/types/passport-oauth2/passport-oauth2-tests.ts +++ b/types/passport-oauth2/passport-oauth2-tests.ts @@ -1,5 +1,5 @@ import OAuth2Strategy = require('passport-oauth2'); -import { Strategy, StrategyOptions, StrategyOptionsWithRequest, VerifyCallback, AuthorizationError, TokenError, InternalOAuthError } from 'passport-oauth2'; +import { Strategy, StrategyOptions, StrategyOptionsWithRequest, VerifyCallback, AuthorizationError, TokenError, InternalOAuthError, Metadata, StateStore, StateStoreStoreCallback, StateStoreVerifyCallback } from 'passport-oauth2'; import { Strategy as PassportStrategy } from 'passport'; import { Request } from 'express'; @@ -56,3 +56,34 @@ class MyStrategy extends OAuth2Strategy { this._oauth2.get('http://www.example.com/profile', 'token', (err, result, response) => response); } } + +const metadata: Metadata = { + authorizationURL: 'http://www.example.com/auth', + clientID: 'dummy', + tokenURL: 'http://www.example.com/token' +} + +class MyStore implements StateStore { + store(req: Request, meta: StateStoreStoreCallback | Metadata, callback?: StateStoreStoreCallback): void {} + verify(req: Request, state: string, meta: StateStoreVerifyCallback | Metadata, callback?: StateStoreVerifyCallback): void {} +} + +const myStore = new MyStore; + +const strategyOptions3: StrategyOptions = { + authorizationURL: 'http://www.example.com/auth', + clientID: 'dummy', + clientSecret: 'secret', + tokenURL: 'http://www.example.com/token', + callbackURL: 'http://www.example.com/callback', + customHeaders: { + 'content-type': 'text/html' + }, + scope: ['scope1', 'scope2'], + scopeSeparator: ' ', + sessionKey: 'oauth', + state: {id: 1}, + store: myStore +}; + +const strategy5: Strategy = new Strategy(strategyOptions3, verifyFunction2); From ee619a0597282ea6de017ff65ec13523dc5c9d38 Mon Sep 17 00:00:00 2001 From: Ivan Fernandes Date: Tue, 4 Dec 2018 16:19:40 -0200 Subject: [PATCH 334/608] correcting code style --- types/passport-oauth2/index.d.ts | 2 +- types/passport-oauth2/passport-oauth2-tests.ts | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/types/passport-oauth2/index.d.ts b/types/passport-oauth2/index.d.ts index a6d519bf6a..cd78f377c2 100644 --- a/types/passport-oauth2/index.d.ts +++ b/types/passport-oauth2/index.d.ts @@ -40,7 +40,7 @@ declare namespace OAuth2Strategy { } type StateStoreStoreCallback = (err: Error | null, state: any) => void; - type StateStoreVerifyCallback = (err: Error, ok: boolean, state: any) => void + type StateStoreVerifyCallback = (err: Error, ok: boolean, state: any) => void; interface StateStore { store(req: Request, callback: StateStoreStoreCallback): void; diff --git a/types/passport-oauth2/passport-oauth2-tests.ts b/types/passport-oauth2/passport-oauth2-tests.ts index 57dcfa56d9..30faeebda0 100644 --- a/types/passport-oauth2/passport-oauth2-tests.ts +++ b/types/passport-oauth2/passport-oauth2-tests.ts @@ -1,5 +1,6 @@ import OAuth2Strategy = require('passport-oauth2'); -import { Strategy, StrategyOptions, StrategyOptionsWithRequest, VerifyCallback, AuthorizationError, TokenError, InternalOAuthError, Metadata, StateStore, StateStoreStoreCallback, StateStoreVerifyCallback } from 'passport-oauth2'; +import { Strategy, StrategyOptions, StrategyOptionsWithRequest, VerifyCallback, AuthorizationError, TokenError, + InternalOAuthError, Metadata, StateStore, StateStoreStoreCallback, StateStoreVerifyCallback } from 'passport-oauth2'; import { Strategy as PassportStrategy } from 'passport'; import { Request } from 'express'; @@ -61,14 +62,14 @@ const metadata: Metadata = { authorizationURL: 'http://www.example.com/auth', clientID: 'dummy', tokenURL: 'http://www.example.com/token' -} +}; class MyStore implements StateStore { store(req: Request, meta: StateStoreStoreCallback | Metadata, callback?: StateStoreStoreCallback): void {} verify(req: Request, state: string, meta: StateStoreVerifyCallback | Metadata, callback?: StateStoreVerifyCallback): void {} } -const myStore = new MyStore; +const myStore = new MyStore(); const strategyOptions3: StrategyOptions = { authorizationURL: 'http://www.example.com/auth', From d41d8be7e0642bab9a770f5c8609b9bdaa107a71 Mon Sep 17 00:00:00 2001 From: Max Bernardy Date: Tue, 4 Dec 2018 13:57:49 -0500 Subject: [PATCH 335/608] Correct types for user.archive, requestPermanentDeletion, and requestPermanentDeletionByParams --- types/intercom-client/index.d.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/types/intercom-client/index.d.ts b/types/intercom-client/index.d.ts index b776165c55..f897622894 100644 --- a/types/intercom-client/index.d.ts +++ b/types/intercom-client/index.d.ts @@ -59,9 +59,14 @@ export class Users { scroll: Scroll; - archive(): Promise; + archive(identifier: UserIdentifier): Promise>; + archive(identifier: UserIdentifier, cb: callback>): void; - requestPermanentDeletion(): Promise<{id: number}>; + requestPermanentDeletion(id: string): Promise<{ id: number }>; + requestPermanentDeletion(id: string, cb: callback<{ id: number }>): void; + + requestPermanentDeletionByParams(identifier: UserIdentifier): Promise<{ id: number }>; + requestPermanentDeletionByParams(identifier: UserIdentifier, cb: callback<{ id: number }>): void; } export class Companies { From f304573e356f9f89125ba2ef8397216e7fe1a953 Mon Sep 17 00:00:00 2001 From: Ivan Fernandes Date: Tue, 4 Dec 2018 17:06:54 -0200 Subject: [PATCH 336/608] removing type utilities in favor of a simpler solution --- types/passport-bnet/index.d.ts | 12 ++++-------- types/passport-bnet/passport-bnet-tests.ts | 2 -- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/types/passport-bnet/index.d.ts b/types/passport-bnet/index.d.ts index c8e6dd923c..e7ffaaedce 100644 --- a/types/passport-bnet/index.d.ts +++ b/types/passport-bnet/index.d.ts @@ -12,15 +12,11 @@ declare class BnetStrategy extends OAuth2Strategy { } declare namespace BnetStrategy { - - //Utility types for excluding properties from interfaces - type Diff = ({ [P in T]: P } & { [P in U]: never } & { [x: string]: never })[T]; - type Omit = Pick>; - // passport--bnet accepts any options that passport-oauth2 accepts, but add the option region and makes authorizationURL and tokenURL optional - interface _BaseBnetOptions - extends Partial>, Omit<_StrategyOptionsBase, 'authorizationURL' | 'tokenURL'> { - + interface _BaseBnetOptions extends Partial<_StrategyOptionsBase> { + clientID: string; + clientSecret: string; + region?: string; } diff --git a/types/passport-bnet/passport-bnet-tests.ts b/types/passport-bnet/passport-bnet-tests.ts index 06c0ffccec..b02cf40519 100644 --- a/types/passport-bnet/passport-bnet-tests.ts +++ b/types/passport-bnet/passport-bnet-tests.ts @@ -6,11 +6,9 @@ import { Strategy as OAuth2Strategy, VerifyCallback } from "passport-oauth2"; import { Request } from "express"; const strategyOptions1: StrategyOptions = { - authorizationURL: 'http://www.example.com/auth', callbackURL: 'http://www.example.com/callback', clientID: 'dummy', clientSecret: 'secret', - tokenURL: 'http://www.example.com/token', region: 'us', scope: "email", scopeSeparator: ' ', From b5088e9b92f809bbdef5e51deed7847bb836178c Mon Sep 17 00:00:00 2001 From: Alex Duka Date: Tue, 4 Dec 2018 21:36:47 +0200 Subject: [PATCH 337/608] added types to `rabbitmq-schema` --- types/rabbitmq-schema/index.d.ts | 72 +++++++++++++++++++ .../rabbitmq-schema/rabbitmq-schema-tests.ts | 37 ++++++++++ types/rabbitmq-schema/tsconfig.json | 22 ++++++ types/rabbitmq-schema/tslint.json | 1 + 4 files changed, 132 insertions(+) create mode 100644 types/rabbitmq-schema/index.d.ts create mode 100644 types/rabbitmq-schema/rabbitmq-schema-tests.ts create mode 100644 types/rabbitmq-schema/tsconfig.json create mode 100644 types/rabbitmq-schema/tslint.json diff --git a/types/rabbitmq-schema/index.d.ts b/types/rabbitmq-schema/index.d.ts new file mode 100644 index 0000000000..ccd76b68c5 --- /dev/null +++ b/types/rabbitmq-schema/index.d.ts @@ -0,0 +1,72 @@ +// Type definitions for rabbitmq-schema 2.0 +// Project: https://github.com/tjmehta/rabbitmq-schema +// Definitions by: Alex Duka +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace rabbitMqSchemaNc { + interface Binding { + destination: Topology; + source: Exchange; + args?: object; + routingPattern?: string; + } + + interface TopicBinding extends Binding { + routingPattern: string; + } + + interface DirectBinding extends Binding { + routingPattern: string; + } + + + interface Topology { + options?: object; + } + + interface Exchange extends Topology { + exchange: string; + type: string; + bindings: Binding[]; + } + + interface FanoutExchange extends Exchange { + type: 'fanout'; + } + + interface TopicExchange extends Exchange { + type: 'topic'; + bindings: TopicBinding[]; + } + + interface DirectExchange extends Exchange { + type: 'direct'; + bindings: DirectBinding[]; + } + + interface Queue extends Topology { + queue: string; + messageSchema: object; + } + + interface RabbitMQSchema { + new (schema: Topology | Topology[], parentPath?: string): RabbitMQSchema; + + getExchanges(): Exchange[]; + getBindings(): Binding[]; + getQueues(): Queue[]; + getDirectBindings(): DirectBinding[]; + + validate(schema: Topology | Topology[], parentPath?: string): void; + validateMessage(exchangeName: string, routingPattern: string, message: T): T; + + getQueueByName(name: string): Queue | void; + getExchangeByName(name: string): Exchange | void; + } + +} + +declare module 'rabbitmq-schema' { + const schema: rabbitMqSchemaNc.RabbitMQSchema; + export = schema; +} \ No newline at end of file diff --git a/types/rabbitmq-schema/rabbitmq-schema-tests.ts b/types/rabbitmq-schema/rabbitmq-schema-tests.ts new file mode 100644 index 0000000000..50b36b2e21 --- /dev/null +++ b/types/rabbitmq-schema/rabbitmq-schema-tests.ts @@ -0,0 +1,37 @@ +import RabbitMqSchema = require('rabbitmq-schema'); + +const topology: rabbitMqSchemaNc.Topology = { + exchange: 'images', + type: 'topic', + vhost: '/', + bindings: [ + { + routingPattern: 'images.jpeg.get', + destination: { + queue: 'images.image.get', + messageSchema: { + type: 'object', + properties: { + testMsg: { + type: "string" + } + } + }, + args: { 'message-ttl': 10000 } + } + } + ] +} + +const rabbitSchema = new RabbitMqSchema(topology, ''); + +const exchanges: rabbitMqSchemaNc.Exchange[] = rabbitSchema.getExchanges(); +const bindings: rabbitMqSchemaNc.Binding[] = rabbitSchema.getBindings(); +const queues: rabbitMqSchemaNc.Queue[] = rabbitSchema.getQueues(); +const directBindings: rabbitMqSchemaNc.DirectBinding[] = rabbitSchema.getDirectBindings(); + +const jpgQueue: rabbitMqSchemaNc.Queue = rabbitSchema.getQueueByName('images.jpeg.get'); +const exchange: rabbitMqSchemaNc.Exchange = rabbitSchema.getExchangeByName('images'); + +rabbitSchema.validate(topology); +rabbitSchema.validateMessage('images', 'images.jpeg.get', {testMsg: 'ok'}); \ No newline at end of file diff --git a/types/rabbitmq-schema/tsconfig.json b/types/rabbitmq-schema/tsconfig.json new file mode 100644 index 0000000000..96c7293272 --- /dev/null +++ b/types/rabbitmq-schema/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", + "rabbitmq-schema-tests.ts" + ] +} diff --git a/types/rabbitmq-schema/tslint.json b/types/rabbitmq-schema/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/rabbitmq-schema/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From e2a4a22af587be3c8b0e885a6bd6aa39ef580970 Mon Sep 17 00:00:00 2001 From: arichter83 <36486293+arichter83@users.noreply.github.com> Date: Tue, 4 Dec 2018 20:58:56 +0100 Subject: [PATCH 338/608] Revert "Added dependencies file" This reverts commit 3ba1ae85e26eea8062509b406ad1baf9e5092355. --- types/react-bootstrap-typeahead/package.json | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 types/react-bootstrap-typeahead/package.json diff --git a/types/react-bootstrap-typeahead/package.json b/types/react-bootstrap-typeahead/package.json deleted file mode 100644 index 4d9ec4a338..0000000000 --- a/types/react-bootstrap-typeahead/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "private": true, - "dependencies": { - "csstype": "^2.2.0" - } -} From 1d261238349a1013a4495654a1dd187bbfa64a1d Mon Sep 17 00:00:00 2001 From: arichter83 <36486293+arichter83@users.noreply.github.com> Date: Tue, 4 Dec 2018 21:00:21 +0100 Subject: [PATCH 339/608] Revert "Added definitions for Highlighter, Menu and MenuItem" This reverts commit d944d9c929913c6c3bce93eea1ecc485dfa2bc5d. --- types/react-bootstrap-typeahead/index.d.ts | 56 ++++--------------- .../react-bootstrap-typeahead-tests.tsx | 27 +-------- 2 files changed, 11 insertions(+), 72 deletions(-) diff --git a/types/react-bootstrap-typeahead/index.d.ts b/types/react-bootstrap-typeahead/index.d.ts index 2c0495ce03..9fa23ac5f5 100644 --- a/types/react-bootstrap-typeahead/index.d.ts +++ b/types/react-bootstrap-typeahead/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-bootstrap-typeahead 3.4 +// Type definitions for react-bootstrap-typeahead 3.3 // Project: https://github.com/ericgio/react-bootstrap-typeahead // Definitions by: Guymestef // Rajab Shakirov @@ -6,23 +6,18 @@ // Andreas Richter // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 -// TODO: components +// TODO: , , , components import * as React from 'react'; -import * as CSS from 'csstype'; export interface TypeaheadFilterbyProps { - filterBy: string[]; - labelKey: (string | (() => void)); - multiple: boolean; - selected: any[]; - caseSensitive: boolean; - ignoreDiacritics: boolean; - text: string; -} - -export interface TypeaheadMenuProps { - text: string; + filterBy: string[]; + labelKey: (string | (() => void)); + multiple: boolean; + selected: any[]; + caseSensitive: boolean; + ignoreDiacritics: boolean; + text: string; } export interface TypeaheadProps { @@ -154,7 +149,7 @@ export interface TypeaheadProps { renderMenu?: (results: Array, menuProps: any) => any; /* Provides a hook for customized rendering of menu item contents. */ - renderMenuItemChildren?: (option: T, props: TypeaheadMenuProps, index: number) => any; + renderMenuItemChildren?: (option: T, props: TypeaheadProps, index: number) => any; /* Provides a hook for customized rendering of tokens when multiple selections are enabled. */ renderToken?: (selectedItem: T | string, onRemove: () => void) => any; @@ -189,34 +184,3 @@ export interface AsyncTypeaheadProps extends TypeaheadProps { } export const AsyncTypeahead: React.ClassicComponentClass>; - -export interface HighligherProps { - key: string; - search: string; -} - -export const Highlighter: React.ClassicComponentClass>; - -export interface MenuProps { - id: string; - className?: string; - emptyLabel?: string; - innerRef?: string; - maxHeight?: string; - style?: CSS.Properties; -} - -export const Menu: React.ClassicComponentClass>; - -export interface MenuItemProps { - option: T; - position: number; - label?: string; - active?: boolean; - className?: string; - disabled?: boolean; - onClick?: (e: Event) => any; - onMouseDown?: (e: Event) => any; -} - -export const MenuItem: React.ClassicComponentClass>; diff --git a/types/react-bootstrap-typeahead/react-bootstrap-typeahead-tests.tsx b/types/react-bootstrap-typeahead/react-bootstrap-typeahead-tests.tsx index 5fcbe15328..6c9143dfea 100644 --- a/types/react-bootstrap-typeahead/react-bootstrap-typeahead-tests.tsx +++ b/types/react-bootstrap-typeahead/react-bootstrap-typeahead-tests.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { Typeahead, Highlighter, Menu, MenuItem } from 'react-bootstrap-typeahead'; +import { Typeahead } from 'react-bootstrap-typeahead'; const options = [ { name: 'Alabama', population: 4780127, capital: 'Montgomery', region: 'South' }, @@ -36,31 +36,6 @@ class BasicExample extends React.Component { filterBy={(option, props) => (props.text.indexOf(option) !== -1) } placeholder="Choose a state..." /> - - - {option.name} - - } - /> - - - {options.map((o, idx) => ( - - {o.name} - - ))} - - ); } From 66aa94c11c723e0409ac274b4f62a0d4f3d20dab Mon Sep 17 00:00:00 2001 From: arichter83 <36486293+arichter83@users.noreply.github.com> Date: Tue, 4 Dec 2018 21:00:59 +0100 Subject: [PATCH 340/608] Revert "Fixed version..." This reverts commit 4b872aca1265d8ba44347fbdc33c204d9c123f33. --- types/react-bootstrap-typeahead/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-bootstrap-typeahead/index.d.ts b/types/react-bootstrap-typeahead/index.d.ts index 9fa23ac5f5..89188c8b86 100644 --- a/types/react-bootstrap-typeahead/index.d.ts +++ b/types/react-bootstrap-typeahead/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-bootstrap-typeahead 3.3 +// Type definitions for react-bootstrap-typeahead 3.2.2 // Project: https://github.com/ericgio/react-bootstrap-typeahead // Definitions by: Guymestef // Rajab Shakirov From bc6d1691571d6e8fe6808fe075d3249e3b5fd185 Mon Sep 17 00:00:00 2001 From: arichter83 <36486293+arichter83@users.noreply.github.com> Date: Tue, 4 Dec 2018 21:01:03 +0100 Subject: [PATCH 341/608] Revert "Increase version" This reverts commit 672ec749ab95fa2893469c2a2ebd6badb4336d58. --- types/react-bootstrap-typeahead/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-bootstrap-typeahead/index.d.ts b/types/react-bootstrap-typeahead/index.d.ts index 89188c8b86..d0bfcea9a7 100644 --- a/types/react-bootstrap-typeahead/index.d.ts +++ b/types/react-bootstrap-typeahead/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-bootstrap-typeahead 3.2.2 +// Type definitions for react-bootstrap-typeahead 3.2 // Project: https://github.com/ericgio/react-bootstrap-typeahead // Definitions by: Guymestef // Rajab Shakirov From 40dac65f4ed3e1cd7151714a2a9c88d44b7bbc00 Mon Sep 17 00:00:00 2001 From: arichter83 <36486293+arichter83@users.noreply.github.com> Date: Tue, 4 Dec 2018 21:01:06 +0100 Subject: [PATCH 342/608] Revert "Changed filterBy" This reverts commit f425f279923d7409a31bbdfdf2816db13ad454f4. --- types/react-bootstrap-typeahead/index.d.ts | 13 +------------ .../react-bootstrap-typeahead-tests.tsx | 8 -------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/types/react-bootstrap-typeahead/index.d.ts b/types/react-bootstrap-typeahead/index.d.ts index d0bfcea9a7..fa970bc5b3 100644 --- a/types/react-bootstrap-typeahead/index.d.ts +++ b/types/react-bootstrap-typeahead/index.d.ts @@ -3,23 +3,12 @@ // Definitions by: Guymestef // Rajab Shakirov // Paito Anderson -// Andreas Richter // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 // TODO: , , , components import * as React from 'react'; -export interface TypeaheadFilterbyProps { - filterBy: string[]; - labelKey: (string | (() => void)); - multiple: boolean; - selected: any[]; - caseSensitive: boolean; - ignoreDiacritics: boolean; - text: string; -} - export interface TypeaheadProps { /* For localized accessibility: Should return a string indicating the number of results for screen readers. Receives the current results. */ a11yNumResults?: () => void; @@ -69,7 +58,7 @@ export interface TypeaheadProps { emptyLabel?: string; /* Either an array of fields in option to search, or a custom filtering callback. */ - filterBy?: (string[] | ((option: T | string, props: TypeaheadFilterbyProps) => boolean)); + filterBy?: (string[] | ((option: T | string, text: string) => boolean)); /* Highlights the menu item if there is only one result and allows selecting that item by hitting enter. Does not work with allowNew. */ diff --git a/types/react-bootstrap-typeahead/react-bootstrap-typeahead-tests.tsx b/types/react-bootstrap-typeahead/react-bootstrap-typeahead-tests.tsx index 6c9143dfea..10237b1fa0 100644 --- a/types/react-bootstrap-typeahead/react-bootstrap-typeahead-tests.tsx +++ b/types/react-bootstrap-typeahead/react-bootstrap-typeahead-tests.tsx @@ -28,14 +28,6 @@ class BasicExample extends React.Component { onInputChange={(value, e) => {}} placeholder="Choose a state..." /> - (props.text.indexOf(option) !== -1) } - placeholder="Choose a state..." - /> ); } From d01679afa6d11acd93f6adaa914d2ab74cf52afd Mon Sep 17 00:00:00 2001 From: arichter83 <36486293+arichter83@users.noreply.github.com> Date: Tue, 4 Dec 2018 21:02:19 +0100 Subject: [PATCH 343/608] Basic version of Simpl-Schema definition --- types/simpl-schema/index.d.ts | 195 +++++++++++++++++++++++ types/simpl-schema/simpl-schema-tests.ts | 96 +++++++++++ types/simpl-schema/tsconfig.json | 23 +++ types/simpl-schema/tslint.json | 1 + 4 files changed, 315 insertions(+) create mode 100644 types/simpl-schema/index.d.ts create mode 100644 types/simpl-schema/simpl-schema-tests.ts create mode 100644 types/simpl-schema/tsconfig.json create mode 100644 types/simpl-schema/tslint.json diff --git a/types/simpl-schema/index.d.ts b/types/simpl-schema/index.d.ts new file mode 100644 index 0000000000..32dd8d7b66 --- /dev/null +++ b/types/simpl-schema/index.d.ts @@ -0,0 +1,195 @@ +// Type definitions for simpl-schema 0.1 +// Project: https://github.com/aldeed/simple-schema-js +// Definitions by: Andreas Richter +// Qkramer +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export class ValidationContext { + constructor(ss: any); + addValidationErrors(errors: any): void; + clean(...args: any[]): any; + getErrorForKey(key: any, ...args: any[]): any; + isValid(): any; + keyErrorMessage(key: any, ...args: any[]): any; + keyIsInvalid(key: any, ...args: any[]): any; + reset(): void; + setValidationErrors(errors: any): void; + validate(obj: any, ...args: any[]): any; + validationErrors(): any; +} + +interface CustomValidationContext { + value: any; +} + +interface SchemaDefinition { + type: any; + label?: string | (() => string); + optional?: boolean | (() => boolean); + min?: number | boolean | Date | (() => number | boolean | Date); + max?: number | boolean | Date | (() => number | boolean | Date); + minCount?: number | (() => number); + maxCount?: number | (() => number); + allowedValues?: any[] | (() => any[]); + decimal?: boolean; + exclusiveMax?: boolean; + exclusiveMin?: boolean; + regEx?: RegExp | RegExp[]; + custom?: () => any; + blackbox?: boolean; + autoValue?: () => any; + defaultValue?: any; + trim?: boolean; +} + +interface CleanOption { + filter?: boolean; + autoConvert?: boolean; + removeEmptyStrings?: boolean; + trimStrings?: boolean; + getAutoValues?: boolean; + isModifier?: boolean; + extendAutoValueContext?: boolean; +} + +// ??? +interface SimpleSchemaStatic { + new(schema: {[key: string]: SchemaDefinition} | any[]): SimpleSchema; + namedContext(name?: string): SimpleSchemaValidationContextStatic; + addValidator(validator: () => boolean): any; + pick(...fields: string[]): SimpleSchemaStatic; + omit(...fields: string[]): SimpleSchemaStatic; + clean(doc: any, options?: CleanOption): any; + schema(key?: string): SchemaDefinition | SchemaDefinition[]; + getDefinition(key: string, propList?: any, functionContext?: any): any; + keyIsInBlackBox(key: string): boolean; + labels(labels: {[key: string]: string}): void; + label(key: any): any; + Integer: RegExp; + messages(messages: any): any; + messageForError(type: any, key: any, def: any, value: any): string; + allowsKey(key: any): string; + newContext(): SimpleSchemaValidationContextStatic; + objectKeys(keyPrefix: any): any[]; + validate(obj: any, options?: ValidationOption): void; + validator(options: ValidationOption): () => boolean; + RegEx: { + Email: RegExp; + EmailWithTLD: RegExp; + Domain: RegExp; + WeakDomain: RegExp; + IP: RegExp; + IPv4: RegExp; + IPv6: RegExp; + Url: RegExp; + Id: RegExp; + ZipCode: RegExp; + Phone: RegExp; + }; + ErrorTypes: { + REQUIRED: string, + MIN_STRING: string, + MAX_STRING: string, + MIN_NUMBER: string, + MAX_NUMBER: string, + MIN_NUMBER_EXCLUSIVE: string, + MAX_NUMBER_EXCLUSIVE: string, + MIN_DATE: string, + MAX_DATE: string, + BAD_DATE: string, + MIN_COUNT: string, + MAX_COUNT: string, + MUST_BE_INTEGER: string, + VALUE_NOT_ALLOWED: string, + EXPECTED_TYPE: string, + FAILED_REGULAR_EXPRESSION: string, + KEY_NOT_IN_SCHEMA: string + }; +} + +interface ValidationOption { + modifier?: boolean; + upsert?: boolean; + clean?: boolean; + filter?: boolean; + upsertextendedCustomContext?: boolean; +} + +interface SimpleSchemaValidationContextStaticKeys { + name: string; + type: string; + value?: any; +} + +interface SimpleSchemaError { + name: string; + type: string; +} + +interface SimpleSchemaValidationContextStatic { + validate(obj: any, options?: ValidationOption): boolean; + validateOne(doc: any, keyName: string, options?: ValidationOption): boolean; + resetValidation(): void; + isValid(): boolean; + invalidKeys(): SimpleSchemaValidationContextStaticKeys[]; + addInvalidKeys(errors: SimpleSchemaError[]): void; + keyIsInvalid(name: any): boolean; + keyErrorMessage(name: any): string; + getErrorObject(): any; +} + +interface MongoObjectStatic { + forEachNode(func: (() => void), options?: {endPointsOnly: boolean}): void; + getValueForPosition(position: string): any; + setValueForPosition(position: string, value: any): void; + removeValueForPosition(position: string): void; + getKeyForPosition(position: string): any; + getGenericKeyForPosition(position: string): any; + getInfoForKey(key: string): any; + getPositionForKey(key: string): string; + getPositionsForGenericKey(key: string): string[]; + getValueForKey(key: string): any; + addKey(key: string, val: any, op: string): any; + removeGenericKeys(keys: string[]): void; + removeGenericKey(key: string): void; + removeKey(key: string): void; + removeKeys(keys: string[]): void; + filterGenericKeys(test: (() => boolean)): void; + setValueForKey(key: string, val: any): void; + setValueForGenericKey(key: string, val: any): void; + getObject(): any; + getFlatObject(options?: {keepArrays?: boolean}): any; + affectsKey(key: string): any; + affectsGenericKey(key: string): any; + affectsGenericKeyImplicit(key: string): any; +} + +export const SimpleSchema: SimpleSchemaStatic; +export const SimpleSchemaValidationContext: SimpleSchemaValidationContextStatic; +export const MongoObject: MongoObjectStatic; + +export interface SimpleSchema { + debug: boolean; + validate(obj: any, options?: ValidationOption): void; + addValidator(validator: () => boolean): any; + extendOptions(options: {[key: string]: any}): void; + messages(messages: any): void; + RegEx: { + Email: RegExp; + Domain: RegExp; + WeakDomain: RegExp; + IP: RegExp; + IPv4: RegExp; + IPv6: RegExp; + Url: RegExp; + Id: RegExp; + ZipCode: RegExp; + Phone: RegExp; + }; +} + +export interface MongoObject { + expandKey(val: any, key: string, obj: any): void; +} + +export default SimpleSchema; diff --git a/types/simpl-schema/simpl-schema-tests.ts b/types/simpl-schema/simpl-schema-tests.ts new file mode 100644 index 0000000000..3c40f0c4bb --- /dev/null +++ b/types/simpl-schema/simpl-schema-tests.ts @@ -0,0 +1,96 @@ +import SimpleSchema from 'simpl-schema'; + +const StringSchema = new SimpleSchema({ + basicString: { + type: String + }, + limitedString: { + type: String, + allowedValues: ['pro', 'con'] + }, + regExpString: { + type: String, + regEx: SimpleSchema.RegEx.Id + }, + createdAt: { + type: Date, + autoValue: () => new Date(), + }, + title: { + type: String, + label: "Argument", + /* TODO, this does not work: "The containing arrow function captures the global value of 'this' which implicitly has type 'any'." + custom: () => { + const text = this.value; + if (text.length > 10) return { type: SimpleSchema.ErrorTypes.MAX_STRING, max: 10 }; + } + */ + }, +}); + +StringSchema.validate({ + basicString: "Test", + limitedString: "pro", + regExpString: "id" +}); + + /* + , + title: { + type: String, + label: "Argument", + custom: function () { + var text = this.value; + text = text.replace(/https?:\/\/(www\.)?([-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6})\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/gi, '$2'); + + if(text.length > MAX_ARGUMENT_LENGTH) return { type: SimpleSchema.ErrorTypes.MAX_STRING, max: MAX_ARGUMENT_LENGTH } + else if(text.length < MIN_ARGUMENT_LENGTH) return { type: SimpleSchema.ErrorTypes.MIN_STRING, min: MIN_ARGUMENT_LENGTH } + } + }, + questionId: { + type: String, + regEx: SimpleSchema.RegEx.Id + }, + side: { + type: String, + allowedValues: ['pro', 'con'] + }, + userId: { + type: String, + regEx: SimpleSchema.RegEx.Id + }, + createdAt: { + type: Date, + autoValue: () => new Date(), + }, + clapCount: { + type: SimpleSchema.Integer, + defaultValue: 0 + }, + highlight: { + type: Array, + optional: true + }, + 'highlight.$': { + type: Object + }, + 'highlight.$.start': SimpleSchema.Integer, + 'highlight.$.end': SimpleSchema.Integer, + 'highlight.$.text': { + type: String, + trim: false + } + */ + /* + , + { + clean: { + filter: true, + autoConvert: true, + removeEmptyStrings: true, + trimStrings: true, + getAutoValues: true, + removeNullsFromArrays: true, + } + } + */ diff --git a/types/simpl-schema/tsconfig.json b/types/simpl-schema/tsconfig.json new file mode 100644 index 0000000000..d079496f4e --- /dev/null +++ b/types/simpl-schema/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "simpl-schema-tests.ts" + ] +} diff --git a/types/simpl-schema/tslint.json b/types/simpl-schema/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/simpl-schema/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From aecc62b24ec21fc324edb746ce659cd70b1fbd45 Mon Sep 17 00:00:00 2001 From: Max Bernardy Date: Tue, 4 Dec 2018 16:02:26 -0500 Subject: [PATCH 344/608] Add Leads --- types/intercom-client/Lead.d.ts | 53 ++++++++++++++++++++++++++++++++ types/intercom-client/index.d.ts | 31 +++++++++++++++++-- 2 files changed, 82 insertions(+), 2 deletions(-) create mode 100644 types/intercom-client/Lead.d.ts diff --git a/types/intercom-client/Lead.d.ts b/types/intercom-client/Lead.d.ts new file mode 100644 index 0000000000..97285c36fe --- /dev/null +++ b/types/intercom-client/Lead.d.ts @@ -0,0 +1,53 @@ +import { Company } from "./Company"; +import { Avatar, LocationData, Segment, SocialProfile, Tag } from './User'; + +export type LeadIdentifier = { "id": string } | { "user_id": string }; + +export interface Lead { + "type": "user" | "contact", + readonly "id": string, + "user_id": string | null, + "email": string | null, + "app_id"?: string, + "phone": string | null, + "name": string | null, + readonly "updated_at": number, + "last_seen_ip": string | null, + "unsubscribed_from_emails": boolean, + "last_request_at": number | null, + "signed_up_at": number | null, + readonly "created_at": number, + "session_count": number, + "user_agent_data": string | null, + "pseudonym": string | null, + "anonymous": boolean, + "custom_attributes": { + [key: string]: any + }, + "avatar": Avatar, + "location_data": LocationData | {}, + "social_profiles": { + "type": "social_profile.list", + "social_profiles": SocialProfile[] + }, + "companies": { + "type": "company.list", + "companies": Company[] + }, + "segments": { + "type": "segment.list", + "segments": Segment[] + + }, + "tags": { + "type": "tag.list", + "tags": Tag[] + } +} + +export interface List { + "type": "user.list", + "total_count": number, + "contacts": Lead[], + "pages": { "next"?: string, "page": number, "per_page": number, "total_pages": number } +} diff --git a/types/intercom-client/index.d.ts b/types/intercom-client/index.d.ts index f897622894..890dabcfb2 100644 --- a/types/intercom-client/index.d.ts +++ b/types/intercom-client/index.d.ts @@ -6,6 +6,7 @@ /// import { List as UserList, User, UserIdentifier } from './User'; +import { List as LeadList, Lead, LeadIdentifier } from './Lead'; import { CompanyIdentifier, List as CompanyList, Company } from './Company'; import { TagIdentifier, List as TagList, Tag, TagOper } from './Tag'; import { List as EventList, Event, ListParam as EventListParam } from './Event'; @@ -33,6 +34,8 @@ export class Client { companies: Companies; tags: Tags; events: Events; + contacts: Leads; + leads: Leads; } export class ApiResponse extends IncomingMessage { @@ -51,8 +54,8 @@ export class Users { find(identifier: UserIdentifier): Promise>; find(identifier: UserIdentifier, cb: callback>): void; - list(): Promise>; - list(cb: callback>): void; + list(): Promise>; + list(cb: callback>): void; listBy(params: {tag_id?: string, segment_id?: string}): Promise>; listBy(params: {tag_id?: string, segment_id?: string}, cb: callback>): void; @@ -69,6 +72,30 @@ export class Users { requestPermanentDeletionByParams(identifier: UserIdentifier, cb: callback<{ id: number }>): void; } +export class Leads { + create(user: Partial): Promise>; + create(user: Partial, cb: callback>): void; + + update(user: UserIdentifier & Partial): Promise>; + update(user: UserIdentifier & Partial, cb: callback>): void; + + list(): Promise>; + list(cb: callback>): void; + + listBy(params: { email?: string, tag_id?: string, segment_id?: string }): Promise>; + listBy(params: { email?: string, tag_id?: string, segment_id?: string }, cb: callback>): void; + + find(identifier: LeadIdentifier): Promise> + find(identifier: LeadIdentifier, cb: callback>): void; + + delete(id: string): Promise>; + delete(id: string, cb: callback>): void; + + convert(params: { contact: LeadIdentifier, user: UserIdentifier }): Promise>; + convert(params: { contact: LeadIdentifier, user: UserIdentifier }, cb: callback>): void; + +} + export class Companies { create(company: CompanyIdentifier & Partial): Promise>; create(company: CompanyIdentifier & Partial, cb: callback>): void; From d193908af2783f374190537c35a971750153ddf0 Mon Sep 17 00:00:00 2001 From: Max Bernardy Date: Tue, 4 Dec 2018 16:10:59 -0500 Subject: [PATCH 345/608] Fix param name --- types/intercom-client/index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/types/intercom-client/index.d.ts b/types/intercom-client/index.d.ts index 890dabcfb2..8c81fd989c 100644 --- a/types/intercom-client/index.d.ts +++ b/types/intercom-client/index.d.ts @@ -73,11 +73,11 @@ export class Users { } export class Leads { - create(user: Partial): Promise>; - create(user: Partial, cb: callback>): void; + create(lead: Partial): Promise>; + create(lead: Partial, cb: callback>): void; - update(user: UserIdentifier & Partial): Promise>; - update(user: UserIdentifier & Partial, cb: callback>): void; + update(lead: UserIdentifier & Partial): Promise>; + update(lead: UserIdentifier & Partial, cb: callback>): void; list(): Promise>; list(cb: callback>): void; From 8224466cf9c14356ec77c4a5d18aca9e4715c384 Mon Sep 17 00:00:00 2001 From: Max Bernardy Date: Tue, 4 Dec 2018 16:14:01 -0500 Subject: [PATCH 346/608] Tweak Lead interface --- types/intercom-client/Lead.d.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/types/intercom-client/Lead.d.ts b/types/intercom-client/Lead.d.ts index 97285c36fe..b8403f775c 100644 --- a/types/intercom-client/Lead.d.ts +++ b/types/intercom-client/Lead.d.ts @@ -8,19 +8,14 @@ export interface Lead { readonly "id": string, "user_id": string | null, "email": string | null, - "app_id"?: string, "phone": string | null, "name": string | null, readonly "updated_at": number, "last_seen_ip": string | null, "unsubscribed_from_emails": boolean, "last_request_at": number | null, - "signed_up_at": number | null, readonly "created_at": number, - "session_count": number, "user_agent_data": string | null, - "pseudonym": string | null, - "anonymous": boolean, "custom_attributes": { [key: string]: any }, @@ -42,7 +37,8 @@ export interface Lead { "tags": { "type": "tag.list", "tags": Tag[] - } + }, + "referrer": string | null, } export interface List { From b9ca29afba5459e1826c8427c961c724fea98c3a Mon Sep 17 00:00:00 2001 From: Mike Wickett Date: Tue, 4 Dec 2018 11:51:04 -0500 Subject: [PATCH 347/608] Add inlineLexer function to marked types --- types/marked/index.d.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/types/marked/index.d.ts b/types/marked/index.d.ts index d558348db9..7eddfb4919 100644 --- a/types/marked/index.d.ts +++ b/types/marked/index.d.ts @@ -1,8 +1,9 @@ -// Type definitions for Marked 0.4 +// Type definitions for Marked 0.5 // Project: https://github.com/markedjs/marked // Definitions by: William Orr // BendingBender // CrossR +// Mike Wickett // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped export as namespace marked; @@ -34,6 +35,15 @@ declare namespace marked { */ function lexer(src: string, options?: MarkedOptions): TokensList; + /** + * @param src String of markdown source to be compiled + * @param links Array of links + * @param options Hash of options + * @return String of compiled HTML + */ + + function inlineLexer(src: string, links: string[], options?: MarkedOptions): string; + /** * Compiles markdown to HTML. * From b7a61e55c8406749b2ef9ef32ed612b9c0dd96b6 Mon Sep 17 00:00:00 2001 From: Konstantin Lukaschenko Date: Tue, 4 Dec 2018 22:30:53 +0100 Subject: [PATCH 348/608] enhance module definition. --- types/three-tds-loader/index.d.ts | 4 +++- types/three-tds-loader/three-tds-loader-tests.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/types/three-tds-loader/index.d.ts b/types/three-tds-loader/index.d.ts index 379a2de8af..33e679a377 100644 --- a/types/three-tds-loader/index.d.ts +++ b/types/three-tds-loader/index.d.ts @@ -7,7 +7,9 @@ import * as THREE from 'three'; -export default class TDSLoader { +export = TDSLoader; + +declare class TDSLoader { constructor(three: typeof THREE); /** diff --git a/types/three-tds-loader/three-tds-loader-tests.ts b/types/three-tds-loader/three-tds-loader-tests.ts index f61eeb92e3..a4e9d61797 100644 --- a/types/three-tds-loader/three-tds-loader-tests.ts +++ b/types/three-tds-loader/three-tds-loader-tests.ts @@ -1,5 +1,5 @@ import * as THREE from 'three'; -import TDSLoader from 'three-tds-loader'; +import TDSLoader = require('three-tds-loader'); const loader = new TDSLoader(THREE); From 4ca42304a5ea6ce7429dce947b65be1459083811 Mon Sep 17 00:00:00 2001 From: Justin Francos Date: Tue, 4 Dec 2018 16:54:53 -0500 Subject: [PATCH 349/608] update MongoStore to include close() as per: https://github.com/jdesboeufs/connect-mongo/blob/9cbc56d5c35ce0a169ba4290549793979955433e/src/index.js#L315 --- types/connect-mongo/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/connect-mongo/index.d.ts b/types/connect-mongo/index.d.ts index ea39a13f42..7173cb50dc 100644 --- a/types/connect-mongo/index.d.ts +++ b/types/connect-mongo/index.d.ts @@ -110,6 +110,7 @@ declare namespace connectMongo { length: (callback: (err: any, length: number) => void) => void; clear: (callback?: (err?: any) => void) => void; touch: (sid: string, session: Express.SessionData, callback?: (err: any) => void) => void; + close: () => void; } } From 734b931c87758515eac1db3dab4f53a826db5aff Mon Sep 17 00:00:00 2001 From: TeamworkGuy2 Date: Tue, 4 Dec 2018 22:06:53 +0000 Subject: [PATCH 350/608] [shasum] Add shasum@1.0 definition --- types/shasum/index.d.ts | 14 ++++++++++++++ types/shasum/shasum-tests.ts | 7 +++++++ types/shasum/tsconfig.json | 23 +++++++++++++++++++++++ types/shasum/tslint.json | 1 + 4 files changed, 45 insertions(+) create mode 100644 types/shasum/index.d.ts create mode 100644 types/shasum/shasum-tests.ts create mode 100644 types/shasum/tsconfig.json create mode 100644 types/shasum/tslint.json diff --git a/types/shasum/index.d.ts b/types/shasum/index.d.ts new file mode 100644 index 0000000000..500c811d07 --- /dev/null +++ b/types/shasum/index.d.ts @@ -0,0 +1,14 @@ +// Type definitions for shasum 1.0 +// Project: https://github.com/dominictarr/shasum +// Definitions by: TeamworkGuy2 +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * Single function that return the sha1sum. Installing this is just a little bit quicker than reading the crypto documentation. + * var shasum = require('shasum') + * shasum(string || buffer || object) + * It also works in the browser with browserify. + */ +declare function shasum(str: any, alg?: string | null, format?: "hex" | "latin1" | "base64"): string; + +export = shasum; diff --git a/types/shasum/shasum-tests.ts b/types/shasum/shasum-tests.ts new file mode 100644 index 0000000000..01c0ba32fc --- /dev/null +++ b/types/shasum/shasum-tests.ts @@ -0,0 +1,7 @@ +import shasum = require("shasum"); + +function test(): string { + const res1 = shasum("source"); + const res2 = shasum({ prop: "source" }, null, "hex"); + return res1 || res2; +} diff --git a/types/shasum/tsconfig.json b/types/shasum/tsconfig.json new file mode 100644 index 0000000000..a0be2a9c4b --- /dev/null +++ b/types/shasum/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "shasum-tests.ts" + ] +} \ No newline at end of file diff --git a/types/shasum/tslint.json b/types/shasum/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/shasum/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From f24094176065b5757b817f420b86f86729ae9fd9 Mon Sep 17 00:00:00 2001 From: Ivan Fernandes Date: Tue, 4 Dec 2018 20:10:08 -0200 Subject: [PATCH 351/608] changing github2 customHeaders option to correct type --- types/passport-github2/index.d.ts | 6 ++++-- types/passport-oauth2/index.d.ts | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/types/passport-github2/index.d.ts b/types/passport-github2/index.d.ts index 0b2c1f6a5d..4ca8e93124 100644 --- a/types/passport-github2/index.d.ts +++ b/types/passport-github2/index.d.ts @@ -3,12 +3,14 @@ // Definitions by: Yasunori Ohoka // Maarten Mulders // Christoph Werner +// Ivan Fernandes // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 import passport = require('passport'); import oauth2 = require('passport-oauth2'); import express = require('express'); +import { OutgoingHttpHeaders } from 'http'; export interface Profile extends passport.Profile { profileUrl: string; @@ -25,7 +27,7 @@ export interface StrategyOption extends passport.AuthenticateOptions { authorizationURL?: string; tokenURL?: string; scopeSeparator?: string; - customHeaders?: string; + customHeaders?: OutgoingHttpHeaders; userProfileURL?: string; } @@ -46,7 +48,7 @@ export interface _StrategyOptionsBase extends OAuth2StrategyOptionsWithoutRequir authorizationURL?: string; tokenURL?: string; scopeSeparator?: string; - customHeaders?: string; + customHeaders?: OutgoingHttpHeaders; userProfileURL?: string; } diff --git a/types/passport-oauth2/index.d.ts b/types/passport-oauth2/index.d.ts index cd78f377c2..28a1a06348 100644 --- a/types/passport-oauth2/index.d.ts +++ b/types/passport-oauth2/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: Pasi Eronen // Wang Zishi // Eduardo AC +// Ivan Fernandes // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 From 3a3cfab723c1559cfa995c43f24b8b6017be3acf Mon Sep 17 00:00:00 2001 From: Max Bernardy Date: Tue, 4 Dec 2018 17:21:15 -0500 Subject: [PATCH 352/608] correct type --- types/intercom-client/Lead.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/intercom-client/Lead.d.ts b/types/intercom-client/Lead.d.ts index b8403f775c..aa4e4a2cfa 100644 --- a/types/intercom-client/Lead.d.ts +++ b/types/intercom-client/Lead.d.ts @@ -4,7 +4,7 @@ import { Avatar, LocationData, Segment, SocialProfile, Tag } from './User'; export type LeadIdentifier = { "id": string } | { "user_id": string }; export interface Lead { - "type": "user" | "contact", + "type": "contact", readonly "id": string, "user_id": string | null, "email": string | null, From 53ddbc865809cedd7e91bf173df78fe44735a7f2 Mon Sep 17 00:00:00 2001 From: Avi Vahl Date: Wed, 5 Dec 2018 00:47:46 +0200 Subject: [PATCH 353/608] puppeteer: allow disabling default viewport null disables the default viewport (verified locally). comment already mentions that, but it wasn't accepted in the type. --- types/puppeteer/index.d.ts | 2 +- types/puppeteer/puppeteer-tests.ts | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/types/puppeteer/index.d.ts b/types/puppeteer/index.d.ts index ff05cc4de0..2051603f69 100644 --- a/types/puppeteer/index.d.ts +++ b/types/puppeteer/index.d.ts @@ -2044,7 +2044,7 @@ export interface BrowserOptions { * @default false */ isLandscape?: boolean; - }; + } | null; /** * Slows down Puppeteer operations by the specified amount of milliseconds. * Useful so that you can see what is going on. diff --git a/types/puppeteer/puppeteer-tests.ts b/types/puppeteer/puppeteer-tests.ts index b708f1bc0c..1f587d470e 100644 --- a/types/puppeteer/puppeteer-tests.ts +++ b/types/puppeteer/puppeteer-tests.ts @@ -200,6 +200,13 @@ puppeteer.launch().then(async browser => { browser.close(); })(); +// Launching with default viewport disabled +(async () => { + await puppeteer.launch({ + defaultViewport: null + }); +})(); + // Test v0.12 features (async () => { const browser = await puppeteer.launch({ From ce4d4743b791628819b26327c19169bb9f25f687 Mon Sep 17 00:00:00 2001 From: Alex Duka Date: Wed, 5 Dec 2018 00:50:04 +0200 Subject: [PATCH 354/608] improved tests and typings --- types/rabbitmq-schema/index.d.ts | 96 +++++++++---------- .../rabbitmq-schema/rabbitmq-schema-tests.ts | 29 ++---- 2 files changed, 54 insertions(+), 71 deletions(-) diff --git a/types/rabbitmq-schema/index.d.ts b/types/rabbitmq-schema/index.d.ts index ccd76b68c5..a577d9c36a 100644 --- a/types/rabbitmq-schema/index.d.ts +++ b/types/rabbitmq-schema/index.d.ts @@ -4,69 +4,69 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace rabbitMqSchemaNc { - interface Binding { - destination: Topology; - source: Exchange; - args?: object; - routingPattern?: string; - } + interface Binding { + destination: Topology; + source: Exchange; + args?: object; + routingPattern?: string; + } - interface TopicBinding extends Binding { - routingPattern: string; - } + interface TopicBinding extends Binding { + routingPattern: string; + } - interface DirectBinding extends Binding { - routingPattern: string; - } + interface DirectBinding extends Binding { + routingPattern: string; + } - interface Topology { - options?: object; - } + interface Topology { + options?: object; + } - interface Exchange extends Topology { - exchange: string; - type: string; - bindings: Binding[]; - } + interface Exchange extends Topology { + exchange: string; + type: string; + bindings: Binding[]; + } - interface FanoutExchange extends Exchange { - type: 'fanout'; - } + interface FanoutExchange extends Exchange { + type: 'fanout'; + } - interface TopicExchange extends Exchange { - type: 'topic'; - bindings: TopicBinding[]; - } + interface TopicExchange extends Exchange { + type: 'topic'; + bindings: TopicBinding[]; + } - interface DirectExchange extends Exchange { - type: 'direct'; - bindings: DirectBinding[]; - } + interface DirectExchange extends Exchange { + type: 'direct'; + bindings: DirectBinding[]; + } - interface Queue extends Topology { - queue: string; - messageSchema: object; - } + interface Queue extends Topology { + queue: string; + messageSchema: object; + } - interface RabbitMQSchema { - new (schema: Topology | Topology[], parentPath?: string): RabbitMQSchema; + interface RabbitMQSchema { + new (schema: Topology | Topology[], parentPath?: string): RabbitMQSchema; - getExchanges(): Exchange[]; - getBindings(): Binding[]; - getQueues(): Queue[]; - getDirectBindings(): DirectBinding[]; + getExchanges(): Exchange[]; + getBindings(): Binding[]; + getQueues(): Queue[]; + getDirectBindings(): DirectBinding[]; - validate(schema: Topology | Topology[], parentPath?: string): void; - validateMessage(exchangeName: string, routingPattern: string, message: T): T; + validate(schema: Topology | Topology[], parentPath?: string): void; + validateMessage(exchangeName: string, routingPattern: string, message: T): T; - getQueueByName(name: string): Queue | void; - getExchangeByName(name: string): Exchange | void; - } + getQueueByName(name: string): Queue | void; + getExchangeByName(name: string): Exchange | void; + } } declare module 'rabbitmq-schema' { - const schema: rabbitMqSchemaNc.RabbitMQSchema; - export = schema; + const schema: rabbitMqSchemaNc.RabbitMQSchema; + export = schema; } \ No newline at end of file diff --git a/types/rabbitmq-schema/rabbitmq-schema-tests.ts b/types/rabbitmq-schema/rabbitmq-schema-tests.ts index 50b36b2e21..e02dc29bae 100644 --- a/types/rabbitmq-schema/rabbitmq-schema-tests.ts +++ b/types/rabbitmq-schema/rabbitmq-schema-tests.ts @@ -1,27 +1,10 @@ import RabbitMqSchema = require('rabbitmq-schema'); -const topology: rabbitMqSchemaNc.Topology = { +const topology: rabbitMqSchemaNc.Exchange = { exchange: 'images', type: 'topic', - vhost: '/', - bindings: [ - { - routingPattern: 'images.jpeg.get', - destination: { - queue: 'images.image.get', - messageSchema: { - type: 'object', - properties: { - testMsg: { - type: "string" - } - } - }, - args: { 'message-ttl': 10000 } - } - } - ] -} + bindings: [] +}; const rabbitSchema = new RabbitMqSchema(topology, ''); @@ -30,8 +13,8 @@ const bindings: rabbitMqSchemaNc.Binding[] = rabbitSchema.getBindings(); const queues: rabbitMqSchemaNc.Queue[] = rabbitSchema.getQueues(); const directBindings: rabbitMqSchemaNc.DirectBinding[] = rabbitSchema.getDirectBindings(); -const jpgQueue: rabbitMqSchemaNc.Queue = rabbitSchema.getQueueByName('images.jpeg.get'); -const exchange: rabbitMqSchemaNc.Exchange = rabbitSchema.getExchangeByName('images'); +const jpgQueue: rabbitMqSchemaNc.Queue | unknown = rabbitSchema.getQueueByName('images.jpeg.get'); +const exchange: rabbitMqSchemaNc.Exchange | unknown = rabbitSchema.getExchangeByName('images'); rabbitSchema.validate(topology); -rabbitSchema.validateMessage('images', 'images.jpeg.get', {testMsg: 'ok'}); \ No newline at end of file +rabbitSchema.validateMessage('images', 'images.jpeg.get', {testMsg: 'ok'}); From 89f8981d7941ccdc5ba0680ff05c2068e112abfe Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Tue, 4 Dec 2018 23:52:20 +0100 Subject: [PATCH 355/608] Add types for interpret --- types/interpret/index.d.ts | 26 ++++++++++++++++ types/interpret/interpret-tests.ts | 50 ++++++++++++++++++++++++++++++ types/interpret/tsconfig.json | 23 ++++++++++++++ types/interpret/tslint.json | 1 + 4 files changed, 100 insertions(+) create mode 100644 types/interpret/index.d.ts create mode 100644 types/interpret/interpret-tests.ts create mode 100644 types/interpret/tsconfig.json create mode 100644 types/interpret/tslint.json diff --git a/types/interpret/index.d.ts b/types/interpret/index.d.ts new file mode 100644 index 0000000000..de51c842f8 --- /dev/null +++ b/types/interpret/index.d.ts @@ -0,0 +1,26 @@ +// Type definitions for interpret 1.1 +// Project: https://github.com/tkellen/node-interpret +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +export interface Hook { + (m: { extensions: string } | NodeModule): any; + install(m?: { extension: string; [key: string]: any }): void; +} + +export type RegisterFn = (hook: Hook) => void; + +export interface ExtensionDescriptor { + module: string; + register: RegisterFn; +} + +export type Extension = string | ExtensionDescriptor | Array; +export interface Extensions { + [extension: string]: Extension | null; +} + +export const extensions: Extensions; +export const jsVariants: Extensions; diff --git a/types/interpret/interpret-tests.ts b/types/interpret/interpret-tests.ts new file mode 100644 index 0000000000..2ac4cc0081 --- /dev/null +++ b/types/interpret/interpret-tests.ts @@ -0,0 +1,50 @@ +import { extensions, jsVariants, Extensions } from 'interpret'; + +// $ExpectType Extensions +extensions; +// $ExpectType Extensions +jsVariants; + +const myExts: Extensions = { + '.babel.js': [ + { + module: 'babel-register', + register(hook) { + hook({ extensions: '.js' }); + }, + }, + ], + '.co': 'coco', + '.coffee': ['coffeescript/register', 'coffee-script/register', 'coffeescript', 'coffee-script'], + '.esm.js': { + module: 'esm', + register(hook) { + const esmLoader = hook(module); + require.extensions['.js'] = esmLoader('module')._extensions['.js']; + }, + }, + '.js': null, + '.jsx': [ + { + module: 'node-jsx', + register(hook) { + hook.install({ extension: '.jsx', harmony: true }); + }, + }, + ], + '.toml': { + module: 'toml-require', + register(hook) { + hook.install(); + }, + }, + '.ts': [ + 'typescript-require', + { + module: '@babel/register', + register(hook) { + hook({ extensions: '.ts' }); + }, + }, + ], +}; diff --git a/types/interpret/tsconfig.json b/types/interpret/tsconfig.json new file mode 100644 index 0000000000..970cf59fd9 --- /dev/null +++ b/types/interpret/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "interpret-tests.ts" + ] +} diff --git a/types/interpret/tslint.json b/types/interpret/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/interpret/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From c85e8d550f1679ea945d820313f05a9cc1d8ce0f Mon Sep 17 00:00:00 2001 From: Alex Duka Date: Wed, 5 Dec 2018 00:56:07 +0200 Subject: [PATCH 356/608] added strictFunctionTypes option to tsconfig --- types/rabbitmq-schema/tsconfig.json | 1 + 1 file changed, 1 insertion(+) diff --git a/types/rabbitmq-schema/tsconfig.json b/types/rabbitmq-schema/tsconfig.json index 96c7293272..81e519bb47 100644 --- a/types/rabbitmq-schema/tsconfig.json +++ b/types/rabbitmq-schema/tsconfig.json @@ -4,6 +4,7 @@ "lib": [ "es6" ], + "strictFunctionTypes": true, "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, From 14300e779916b1f19be8334f4a5c135de76d464b Mon Sep 17 00:00:00 2001 From: Alex Duka Date: Wed, 5 Dec 2018 01:45:49 +0200 Subject: [PATCH 357/608] fix tslint issues, updated tests --- types/rabbitmq-schema/index.d.ts | 128 +++++++++--------- .../rabbitmq-schema/rabbitmq-schema-tests.ts | 20 ++- 2 files changed, 72 insertions(+), 76 deletions(-) diff --git a/types/rabbitmq-schema/index.d.ts b/types/rabbitmq-schema/index.d.ts index a577d9c36a..29c12b3c99 100644 --- a/types/rabbitmq-schema/index.d.ts +++ b/types/rabbitmq-schema/index.d.ts @@ -3,70 +3,70 @@ // Definitions by: Alex Duka // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare namespace rabbitMqSchemaNc { - interface Binding { - destination: Topology; - source: Exchange; - args?: object; - routingPattern?: string; - } - - interface TopicBinding extends Binding { - routingPattern: string; - } - - interface DirectBinding extends Binding { - routingPattern: string; - } - - - interface Topology { - options?: object; - } - - interface Exchange extends Topology { - exchange: string; - type: string; - bindings: Binding[]; - } - - interface FanoutExchange extends Exchange { - type: 'fanout'; - } - - interface TopicExchange extends Exchange { - type: 'topic'; - bindings: TopicBinding[]; - } - - interface DirectExchange extends Exchange { - type: 'direct'; - bindings: DirectBinding[]; - } - - interface Queue extends Topology { - queue: string; - messageSchema: object; - } - - interface RabbitMQSchema { - new (schema: Topology | Topology[], parentPath?: string): RabbitMQSchema; - - getExchanges(): Exchange[]; - getBindings(): Binding[]; - getQueues(): Queue[]; - getDirectBindings(): DirectBinding[]; - - validate(schema: Topology | Topology[], parentPath?: string): void; - validateMessage(exchangeName: string, routingPattern: string, message: T): T; - - getQueueByName(name: string): Queue | void; - getExchangeByName(name: string): Exchange | void; - } +interface Binding { + destination: Topology; + source: Exchange; + args?: object; + routingPattern?: string; } -declare module 'rabbitmq-schema' { - const schema: rabbitMqSchemaNc.RabbitMQSchema; - export = schema; -} \ No newline at end of file +interface TopicBinding extends Binding { + routingPattern: string; +} + +interface DirectBinding extends Binding { + routingPattern: string; +} + + +interface Topology { + options?: object; +} + +interface Exchange extends Topology { + exchange: string; + type: string; + bindings: Binding[]; +} + +interface FanoutExchange extends Exchange { + type: 'fanout'; +} + +interface TopicExchange extends Exchange { + type: 'topic'; + bindings: TopicBinding[]; +} + +interface DirectExchange extends Exchange { + type: 'direct'; + bindings: DirectBinding[]; +} + +interface Queue extends Topology { + queue: string; + messageSchema: object; +} + +declare class RabbitMQSchema { + constructor(schema: Topology | Topology[], parentPath?: string); + + getExchanges(): Exchange[]; + + getBindings(): Binding[]; + + getQueues(): Queue[]; + + getDirectBindings(): DirectBinding[]; + + validate(schema: Topology | Topology[], parentPath?: string): void; + + validateMessage(exchangeName: string, routingPattern: string, message: T): T; + + getQueueByName(name: string): Queue | void; + + getExchangeByName(name: string): Exchange | void; +} + +export = RabbitMQSchema; \ No newline at end of file diff --git a/types/rabbitmq-schema/rabbitmq-schema-tests.ts b/types/rabbitmq-schema/rabbitmq-schema-tests.ts index e02dc29bae..067c9c3c5a 100644 --- a/types/rabbitmq-schema/rabbitmq-schema-tests.ts +++ b/types/rabbitmq-schema/rabbitmq-schema-tests.ts @@ -1,20 +1,16 @@ import RabbitMqSchema = require('rabbitmq-schema'); -const topology: rabbitMqSchemaNc.Exchange = { - exchange: 'images', - type: 'topic', - bindings: [] -}; +const topology = {}; -const rabbitSchema = new RabbitMqSchema(topology, ''); +const rabbitSchema = new RabbitMqSchema({}, ''); -const exchanges: rabbitMqSchemaNc.Exchange[] = rabbitSchema.getExchanges(); -const bindings: rabbitMqSchemaNc.Binding[] = rabbitSchema.getBindings(); -const queues: rabbitMqSchemaNc.Queue[] = rabbitSchema.getQueues(); -const directBindings: rabbitMqSchemaNc.DirectBinding[] = rabbitSchema.getDirectBindings(); +rabbitSchema.getExchanges(); +rabbitSchema.getBindings(); +rabbitSchema.getQueues(); +rabbitSchema.getDirectBindings(); -const jpgQueue: rabbitMqSchemaNc.Queue | unknown = rabbitSchema.getQueueByName('images.jpeg.get'); -const exchange: rabbitMqSchemaNc.Exchange | unknown = rabbitSchema.getExchangeByName('images'); +rabbitSchema.getQueueByName('images.jpeg.get'); +rabbitSchema.getExchangeByName('images'); rabbitSchema.validate(topology); rabbitSchema.validateMessage('images', 'images.jpeg.get', {testMsg: 'ok'}); From 539736fa10140c46156aa34e4918a4648ca3c72c Mon Sep 17 00:00:00 2001 From: Alex Duka Date: Wed, 5 Dec 2018 01:52:42 +0200 Subject: [PATCH 358/608] fixed linting issues, ts version > 2.2 --- types/rabbitmq-schema/index.d.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/types/rabbitmq-schema/index.d.ts b/types/rabbitmq-schema/index.d.ts index 29c12b3c99..e2814066ee 100644 --- a/types/rabbitmq-schema/index.d.ts +++ b/types/rabbitmq-schema/index.d.ts @@ -1,9 +1,9 @@ +// TypeScript Version: 2.2' just under the header. // Type definitions for rabbitmq-schema 2.0 // Project: https://github.com/tjmehta/rabbitmq-schema // Definitions by: Alex Duka // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - interface Binding { destination: Topology; source: Exchange; @@ -19,7 +19,6 @@ interface DirectBinding extends Binding { routingPattern: string; } - interface Topology { options?: object; } @@ -69,4 +68,4 @@ declare class RabbitMQSchema { getExchangeByName(name: string): Exchange | void; } -export = RabbitMQSchema; \ No newline at end of file +export = RabbitMQSchema; From 83debe8fbdfb225dfbfc0dd3ebe4dffdd3e7a673 Mon Sep 17 00:00:00 2001 From: Alex Duka Date: Wed, 5 Dec 2018 01:57:10 +0200 Subject: [PATCH 359/608] ts version > 2.2 --- types/rabbitmq-schema/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/rabbitmq-schema/index.d.ts b/types/rabbitmq-schema/index.d.ts index e2814066ee..49d20ea14b 100644 --- a/types/rabbitmq-schema/index.d.ts +++ b/types/rabbitmq-schema/index.d.ts @@ -1,8 +1,8 @@ -// TypeScript Version: 2.2' just under the header. // Type definitions for rabbitmq-schema 2.0 // Project: https://github.com/tjmehta/rabbitmq-schema // Definitions by: Alex Duka // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 interface Binding { destination: Topology; From fe58906ce37ef41075bbf68e3209962d6a1dc3c1 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Wed, 5 Dec 2018 01:17:22 +0100 Subject: [PATCH 360/608] Add types for flagged-respawn --- .../flagged-respawn/flagged-respawn-tests.ts | 14 +++++++++++ types/flagged-respawn/index.d.ts | 24 +++++++++++++++++++ types/flagged-respawn/tsconfig.json | 23 ++++++++++++++++++ types/flagged-respawn/tslint.json | 1 + 4 files changed, 62 insertions(+) create mode 100644 types/flagged-respawn/flagged-respawn-tests.ts create mode 100644 types/flagged-respawn/index.d.ts create mode 100644 types/flagged-respawn/tsconfig.json create mode 100644 types/flagged-respawn/tslint.json diff --git a/types/flagged-respawn/flagged-respawn-tests.ts b/types/flagged-respawn/flagged-respawn-tests.ts new file mode 100644 index 0000000000..12f949f9fb --- /dev/null +++ b/types/flagged-respawn/flagged-respawn-tests.ts @@ -0,0 +1,14 @@ +import flaggedRespawn = require('flagged-respawn'); + +const flags = ['--flag']; + +flaggedRespawn(flags, process.argv, (ready, child, argv) => { + // $ExpectType boolean + ready; + // $ExpectType Process + child; + // $ExpectType string[] + argv; +}); +flaggedRespawn(flags, process.argv, '--flag', () => {}); +flaggedRespawn(flags, process.argv, ['--flag'], () => {}); diff --git a/types/flagged-respawn/index.d.ts b/types/flagged-respawn/index.d.ts new file mode 100644 index 0000000000..eea62b2e8c --- /dev/null +++ b/types/flagged-respawn/index.d.ts @@ -0,0 +1,24 @@ +// Type definitions for flagged-respawn 1.0 +// Project: https://github.com/js-cli/js-flagged-respawn +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +export = flaggedRespawn; + +declare function flaggedRespawn( + flags: string[], + argv: string[], + callback: flaggedRespawn.Callback +): void; +declare function flaggedRespawn( + flags: string[], + argv: string[], + forcedFlags: string | string[], + callback: flaggedRespawn.Callback +): void; + +declare namespace flaggedRespawn { + type Callback = (ready: boolean, proc: NodeJS.Process, argv: string[]) => void; +} diff --git a/types/flagged-respawn/tsconfig.json b/types/flagged-respawn/tsconfig.json new file mode 100644 index 0000000000..91fce74324 --- /dev/null +++ b/types/flagged-respawn/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "flagged-respawn-tests.ts" + ] +} diff --git a/types/flagged-respawn/tslint.json b/types/flagged-respawn/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/flagged-respawn/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 57130b66948fb84ede0ee3f92dac60e45afd0c29 Mon Sep 17 00:00:00 2001 From: Craig Bruce Date: Wed, 5 Dec 2018 11:25:09 +1100 Subject: [PATCH 361/608] Add test to help differentiate between different import techniques --- .../chromecast-caf-receiver-tests.ts | 37 +++++++++++++------ 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/types/chromecast-caf-receiver/chromecast-caf-receiver-tests.ts b/types/chromecast-caf-receiver/chromecast-caf-receiver-tests.ts index 6660a058ad..8d12320e0a 100644 --- a/types/chromecast-caf-receiver/chromecast-caf-receiver-tests.ts +++ b/types/chromecast-caf-receiver/chromecast-caf-receiver-tests.ts @@ -1,29 +1,44 @@ -const breaksEvent = new cast.framework.events.BreaksEvent('BREAK_STARTED'); -breaksEvent.breakId = 'some-break-id'; -breaksEvent.breakClipId = 'some-break-clip-id'; +import { MediaMetadata } from "chromecast-caf-receiver/cast.framework.messages"; + +// The following test showcases how you can import individual types directly from the namespace: + +const mediaMetadata = new MediaMetadata(); +mediaMetadata.metadataType = "TV_SHOW"; + +// The following tests showcase how you can globally access 'cast' types using +// the nested namespace style. This is the preferred method as it +// conforms exactly to the CAF documentation. + +const breaksEvent = new cast.framework.events.BreaksEvent("BREAK_STARTED"); +breaksEvent.breakId = "some-break-id"; +breaksEvent.breakClipId = "some-break-clip-id"; const track = new cast.framework.messages.Track(1, "TEXT"); const breakClip = new cast.framework.messages.BreakClip("id"); const adBreak = new cast.framework.messages.Break("id", ["id"], 1); -const rEvent = new cast.framework.events.RequestEvent("BITRATE_CHANGED", { requestId: 2 }); +const rEvent = new cast.framework.events.RequestEvent("BITRATE_CHANGED", { + requestId: 2 +}); const pManager = new cast.framework.PlayerManager(); -pManager.addEventListener("STALLED", () => { }); +pManager.addEventListener("STALLED", () => {}); const ttManager = new cast.framework.TextTracksManager(); const qManager = new cast.framework.QueueManager(); const qBase = new cast.framework.QueueBase(); const items = qBase.fetchItems(1, 3, 4); const breakSeekData = new cast.framework.breaks.BreakSeekData(0, 100, []); -const breakClipLoadContext = new cast.framework.breaks.BreakClipLoadInterceptorContext(adBreak); +const breakClipLoadContext = new cast.framework.breaks.BreakClipLoadInterceptorContext( + adBreak +); const breakManager: cast.framework.breaks.BreakManager = { getBreakById: () => adBreak, getBreakClipById: () => breakClip, getBreakClips: () => [breakClip], getBreaks: () => [adBreak], getPlayWatchedBreak: () => true, - setBreakClipLoadInterceptor: () => { }, - setBreakSeekInterceptor: () => { }, - setPlayWatchedBreak: () => { }, - setVastTrackingInterceptor: () => { } + setBreakClipLoadInterceptor: () => {}, + setBreakSeekInterceptor: () => {}, + setPlayWatchedBreak: () => {}, + setVastTrackingInterceptor: () => {} }; const lrd: cast.framework.messages.LoadRequestData = { @@ -76,4 +91,4 @@ const pData: cast.framework.ui.PlayerData = { whenSkippable: 321 }; const binder = new cast.framework.ui.PlayerDataBinder(pData); -binder.addEventListener("ANY_CHANGE", e => { }); +binder.addEventListener("ANY_CHANGE", e => {}); From 6a11af78c9f8d8f78c9ae611464f305b11139e62 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Wed, 5 Dec 2018 01:30:16 +0100 Subject: [PATCH 362/608] Add types for v8flags --- types/v8flags/index.d.ts | 13 +++++++++++++ types/v8flags/tsconfig.json | 23 +++++++++++++++++++++++ types/v8flags/tslint.json | 1 + types/v8flags/v8flags-tests.ts | 6 ++++++ 4 files changed, 43 insertions(+) create mode 100644 types/v8flags/index.d.ts create mode 100644 types/v8flags/tsconfig.json create mode 100644 types/v8flags/tslint.json create mode 100644 types/v8flags/v8flags-tests.ts diff --git a/types/v8flags/index.d.ts b/types/v8flags/index.d.ts new file mode 100644 index 0000000000..409b51d60b --- /dev/null +++ b/types/v8flags/index.d.ts @@ -0,0 +1,13 @@ +// Type definitions for v8flags 3.1 +// Project: https://github.com/tkellen/node-v8flags +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = v8flags; + +declare function v8flags(cb: (err: any, flags: string[]) => void): void; + +declare namespace v8flags { + const configfile: string; + const configPath: string; +} diff --git a/types/v8flags/tsconfig.json b/types/v8flags/tsconfig.json new file mode 100644 index 0000000000..e0673d15d0 --- /dev/null +++ b/types/v8flags/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "v8flags-tests.ts" + ] +} diff --git a/types/v8flags/tslint.json b/types/v8flags/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/v8flags/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/v8flags/v8flags-tests.ts b/types/v8flags/v8flags-tests.ts new file mode 100644 index 0000000000..cc95ac734d --- /dev/null +++ b/types/v8flags/v8flags-tests.ts @@ -0,0 +1,6 @@ +import v8flags = require('v8flags'); + +v8flags((err, results) => { + // $ExpectType string[] + results; +}); From 5b92e6f79cd8c387921efa99dda8aa6b923f877d Mon Sep 17 00:00:00 2001 From: Craig Bruce Date: Wed, 5 Dec 2018 11:32:33 +1100 Subject: [PATCH 363/608] Had do disable tslint rules for global import in tests as it defeats the object --- .../chromecast-caf-receiver-tests.ts | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/types/chromecast-caf-receiver/chromecast-caf-receiver-tests.ts b/types/chromecast-caf-receiver/chromecast-caf-receiver-tests.ts index 8d12320e0a..0df790c5f7 100644 --- a/types/chromecast-caf-receiver/chromecast-caf-receiver-tests.ts +++ b/types/chromecast-caf-receiver/chromecast-caf-receiver-tests.ts @@ -2,33 +2,45 @@ import { MediaMetadata } from "chromecast-caf-receiver/cast.framework.messages"; // The following test showcases how you can import individual types directly from the namespace: -const mediaMetadata = new MediaMetadata(); +const mediaMetadata = new MediaMetadata("GENERIC"); mediaMetadata.metadataType = "TV_SHOW"; // The following tests showcase how you can globally access 'cast' types using // the nested namespace style. This is the preferred method as it // conforms exactly to the CAF documentation. +// tslint:disable-next-line const breaksEvent = new cast.framework.events.BreaksEvent("BREAK_STARTED"); breaksEvent.breakId = "some-break-id"; breaksEvent.breakClipId = "some-break-clip-id"; +// tslint:disable-next-line const track = new cast.framework.messages.Track(1, "TEXT"); +// tslint:disable-next-line const breakClip = new cast.framework.messages.BreakClip("id"); +// tslint:disable-next-line const adBreak = new cast.framework.messages.Break("id", ["id"], 1); +// tslint:disable-next-line const rEvent = new cast.framework.events.RequestEvent("BITRATE_CHANGED", { requestId: 2 }); +// tslint:disable-next-line const pManager = new cast.framework.PlayerManager(); pManager.addEventListener("STALLED", () => {}); +// tslint:disable-next-line const ttManager = new cast.framework.TextTracksManager(); +// tslint:disable-next-line const qManager = new cast.framework.QueueManager(); +// tslint:disable-next-line const qBase = new cast.framework.QueueBase(); const items = qBase.fetchItems(1, 3, 4); +// tslint:disable-next-line const breakSeekData = new cast.framework.breaks.BreakSeekData(0, 100, []); +// tslint:disable-next-line const breakClipLoadContext = new cast.framework.breaks.BreakClipLoadInterceptorContext( adBreak ); +// tslint:disable-next-line const breakManager: cast.framework.breaks.BreakManager = { getBreakById: () => adBreak, getBreakClipById: () => breakClip, @@ -41,6 +53,7 @@ const breakManager: cast.framework.breaks.BreakManager = { setVastTrackingInterceptor: () => {} }; +// tslint:disable-next-line const lrd: cast.framework.messages.LoadRequestData = { requestId: 1, activeTrackIds: [1, 2], @@ -58,6 +71,7 @@ const lrd: cast.framework.messages.LoadRequestData = { queueData: {} }; +// tslint:disable-next-line const appData: cast.framework.system.ApplicationData = { id: () => "id", launchingSenderId: () => "launch-id", @@ -66,8 +80,10 @@ const appData: cast.framework.system.ApplicationData = { sessionId: () => 1 }; +// tslint:disable-next-line const readyEvent = new cast.framework.system.ReadyEvent(appData); const data = readyEvent.data; +// tslint:disable-next-line const pData: cast.framework.ui.PlayerData = { breakPercentagePositions: [1], contentType: "video", @@ -79,6 +95,7 @@ const pData: cast.framework.ui.PlayerData = { isLive: true, isPlayingBreak: false, isSeeking: true, + // tslint:disable-next-line metadata: new cast.framework.messages.MediaMetadata("GENERIC"), nextSubtitle: "sub", nextThumbnailUrl: "url", @@ -90,5 +107,6 @@ const pData: cast.framework.ui.PlayerData = { title: "title", whenSkippable: 321 }; +// tslint:disable-next-line const binder = new cast.framework.ui.PlayerDataBinder(pData); binder.addEventListener("ANY_CHANGE", e => {}); From 57b78900c18241543bc0657972ae935769438015 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Wed, 5 Dec 2018 02:08:09 +0100 Subject: [PATCH 364/608] Add types for fined --- types/fined/fined-tests.ts | 18 ++++++++++++++++++ types/fined/index.d.ts | 23 +++++++++++++++++++++++ types/fined/tsconfig.json | 23 +++++++++++++++++++++++ types/fined/tslint.json | 1 + 4 files changed, 65 insertions(+) create mode 100644 types/fined/fined-tests.ts create mode 100644 types/fined/index.d.ts create mode 100644 types/fined/tsconfig.json create mode 100644 types/fined/tslint.json diff --git a/types/fined/fined-tests.ts b/types/fined/fined-tests.ts new file mode 100644 index 0000000000..5ee4e79bc6 --- /dev/null +++ b/types/fined/fined-tests.ts @@ -0,0 +1,18 @@ +import fined = require('fined'); + +// $ExpectType Result | null +fined({ path: 'path/to/file', extensions: ['.js', '.json'] }); + +const opts = { + name: '.app', + cwd: '.', + extensions: { + rc: 'default-rc-loader', + '.yml': 'default-yml-loader', + }, +}; + +fined({ path: '.' }, opts); +fined({ path: '~', extensions: { rc: 'some-special-rc-loader' } }, opts); +fined({ path: '~' }, {}); +fined({ path: '~' }, { extensions: '.ext' }); diff --git a/types/fined/index.d.ts b/types/fined/index.d.ts new file mode 100644 index 0000000000..e19bad318a --- /dev/null +++ b/types/fined/index.d.ts @@ -0,0 +1,23 @@ +// Type definitions for fined 1.1 +// Project: https://github.com/js-cli/fined#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = fined; + +declare function fined(path: string | fined.PathSpec, opts?: fined.PathSpec): fined.Result | null; + +declare namespace fined { + interface PathSpec { + path?: string; + name?: string; + extensions?: string | string[] | { [extension: string]: string }; + cwd?: string; + findUp?: boolean; + } + + interface Result { + path: string; + extension: string | { [extension: string]: string }; + } +} diff --git a/types/fined/tsconfig.json b/types/fined/tsconfig.json new file mode 100644 index 0000000000..ce11eba9be --- /dev/null +++ b/types/fined/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "fined-tests.ts" + ] +} diff --git a/types/fined/tslint.json b/types/fined/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/fined/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 9be998dd15a67fbae8b3abe19ec8ef6d64775803 Mon Sep 17 00:00:00 2001 From: tassadarliu Date: Wed, 5 Dec 2018 10:05:27 +0800 Subject: [PATCH 365/608] add other ctors --- types/convict/index.d.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/types/convict/index.d.ts b/types/convict/index.d.ts index 8be23f1547..fd605f5077 100644 --- a/types/convict/index.d.ts +++ b/types/convict/index.d.ts @@ -49,7 +49,11 @@ declare namespace convict { | 'duration' | 'timestamp' | 'nat' - | String; + | String + | Object + | Number + | RegExp + | Boolean; interface SchemaObj { default: T; From 31ce11023c76648245baacec6dbe51778a10d7e2 Mon Sep 17 00:00:00 2001 From: Malash Date: Wed, 5 Dec 2018 11:04:01 +0800 Subject: [PATCH 366/608] fix wrong type in weixin-app --- types/weixin-app/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/weixin-app/index.d.ts b/types/weixin-app/index.d.ts index 2e2eb35481..408e434441 100644 --- a/types/weixin-app/index.d.ts +++ b/types/weixin-app/index.d.ts @@ -3306,7 +3306,7 @@ declare namespace wx { function openCard(options: OpenCardOptions): void; interface OpenSettingOptions extends BaseOptions { - success?(res: { authSetting: { [key in Scope]: string} }): void; + success?(res: { authSetting: { [key in Scope]: boolean } }): void; } /** * 调起客户端小程序设置界面,返回用户设置的操作结果。 From c5b361c9d1cd5092ec3c4ebb3c946ea1e8cbb5b4 Mon Sep 17 00:00:00 2001 From: Junyoung Choi Date: Wed, 5 Dec 2018 12:55:08 +0900 Subject: [PATCH 367/608] Add unknown props to Node --- types/unist/index.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/types/unist/index.d.ts b/types/unist/index.d.ts index ee61686f93..a7f6cc639d 100644 --- a/types/unist/index.d.ts +++ b/types/unist/index.d.ts @@ -26,6 +26,8 @@ export interface Node { * Must not be present if a node is generated. */ position?: Position; + + [key: string]: unknown; } /** From 95f292b29e49669cea79eb318de4945b9bf9853a Mon Sep 17 00:00:00 2001 From: Junyoung Choi Date: Wed, 5 Dec 2018 12:55:18 +0900 Subject: [PATCH 368/608] Discard AnyNode type --- types/vfile-message/index.d.ts | 6 +----- types/vfile/index.d.ts | 6 +++--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/types/vfile-message/index.d.ts b/types/vfile-message/index.d.ts index 908f72027b..5f4467e007 100644 --- a/types/vfile-message/index.d.ts +++ b/types/vfile-message/index.d.ts @@ -9,10 +9,6 @@ import * as Unist from 'unist'; declare namespace vfileMessage { - interface AnyNode extends Unist.Node { - [key: string]: unknown; - } - /** * Create a virtual message. */ @@ -25,7 +21,7 @@ declare namespace vfileMessage { * @param position Place at which the message occurred in a file (`Node`, `Position`, or `Point`, optional). * @param origin Place in code the message originates from (`string`, optional). */ - (reason: string | Error, position?: AnyNode | Unist.Position | Unist.Point, origin?: string): VFileMessage; + (reason: string | Error, position?: Unist.Node | Unist.Position | Unist.Point, origin?: string): VFileMessage; /** * Category of message. */ diff --git a/types/vfile/index.d.ts b/types/vfile/index.d.ts index efb07e288d..aec7ca88f9 100644 --- a/types/vfile/index.d.ts +++ b/types/vfile/index.d.ts @@ -98,7 +98,7 @@ declare namespace vfile { * @param position Place at which the message occurred in `vfile`. * @param ruleId Category of message. */ - message: (reason: string, position?: Unist.Point | Unist.Position | vfileMessage.AnyNode, ruleId?: string) => vfileMessage.VFileMessage; + message: (reason: string, position?: Unist.Point | Unist.Position | Unist.Node, ruleId?: string) => vfileMessage.VFileMessage; /** * Associates a fatal message with the file, then immediately throws it. * Note: fatal errors mean a file is no longer processable. @@ -107,7 +107,7 @@ declare namespace vfile { * @param position Place at which the message occurred in `vfile`. * @param ruleId Category of message. */ - fail: (reason: string, position?: Unist.Point | Unist.Position | vfileMessage.AnyNode, ruleId?: string) => never; + fail: (reason: string, position?: Unist.Point | Unist.Position | Unist.Node, ruleId?: string) => never; /** * Associates an informational message with the file, where `fatal` is set to `null`. * Calls `message()` internally. @@ -115,7 +115,7 @@ declare namespace vfile { * @param position Place at which the message occurred in `vfile`. * @param ruleId Category of message. */ - info: (reason: string, position?: Unist.Point | Unist.Position | vfileMessage.AnyNode, ruleId?: string) => vfileMessage.VFileMessage; + info: (reason: string, position?: Unist.Point | Unist.Position | Unist.Node, ruleId?: string) => vfileMessage.VFileMessage; } } From 980d2c30563cd8825c947ae72c33337307d0c3a6 Mon Sep 17 00:00:00 2001 From: dominikeinkemmer Date: Wed, 5 Dec 2018 14:03:01 +0900 Subject: [PATCH 369/608] add missing methods to typings --- types/jest-when/index.d.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/types/jest-when/index.d.ts b/types/jest-when/index.d.ts index af62a95830..f484502f4d 100644 --- a/types/jest-when/index.d.ts +++ b/types/jest-when/index.d.ts @@ -8,6 +8,11 @@ export interface PartialMockInstance { mockReturnValue: jest.MockInstance['mockReturnValue']; + mockReturnValueOnce: jest.MockInstance['mockReturnValueOnce']; + mockResolvedValue: jest.MockInstance['mockResolvedValue']; + mockResolvedValueOnce: jest.MockInstance['mockResolvedValueOnce']; + mockRejectedValue: jest.MockInstance['mockRejectedValue']; + mockRejectedValueOnce: jest.MockInstance['mockRejectedValueOnce']; } export interface When { From 3c1d73bddbe0f8b771798a2ce355846425b6f3e5 Mon Sep 17 00:00:00 2001 From: Minjie Shen Date: Wed, 5 Dec 2018 16:57:56 +1100 Subject: [PATCH 370/608] Add typing for netease-captcha package --- types/netease-captcha/index.d.ts | 72 +++++++++++++++++++ .../netease-captcha/netease-captcha-tests.ts | 21 ++++++ types/netease-captcha/tsconfig.json | 22 ++++++ types/netease-captcha/tslint.json | 1 + 4 files changed, 116 insertions(+) create mode 100644 types/netease-captcha/index.d.ts create mode 100644 types/netease-captcha/netease-captcha-tests.ts create mode 100644 types/netease-captcha/tsconfig.json create mode 100644 types/netease-captcha/tslint.json diff --git a/types/netease-captcha/index.d.ts b/types/netease-captcha/index.d.ts new file mode 100644 index 0000000000..7a199b6d85 --- /dev/null +++ b/types/netease-captcha/index.d.ts @@ -0,0 +1,72 @@ +// Type definitions for netease-captcha x.x +// Project: https://cstaticdun.126.net/load.min.js +// Definitions by: Minjie Shen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + + +declare interface Window { + initNECaptcha?: NeteaseCaptcha.InitFunction; +} + +declare namespace NeteaseCaptcha { + declare type InitFunction = (config: Config, onLoad?: onLoad, onError?: onError) => void; + + declare type Config = { + /** + * Verification code id + */ + captchaId: string, + + /** + * Selector string or HTMLElement to render widget into + */ + element: string | HTMLElement, + + /** + * Defaults to 'float' on desktop, and 'popup' on mobile + */ + mode?: 'float' | 'embed' | 'popup', + + /** + * Defaults to page protocol + */ + protocol?: 'http' | 'https', + + /** + * Defaults to 'auto' + */ + width?: number | string, + + /** + * Defaults to 'zh-CN' + */ + lang?: 'zh-CN' | 'en'; + + onReady?(instance: Instance): void; + + onVerify?(error: any, data: Data): void; + }; + + type Instance = { + /** + * Refresh the instance to get new verification information + */ + refresh(): void; + + /** + * Destroy the current instance + */ + destroy(): void; + + /** + * Available when the mode is set to 'popup' - opens the popup to accept verification + */ + popUp?(): void; + }; + + type Data = { validate: string }; + + type onLoad = (instance: Instance) => void; + + type onError = (error: any) => void; +} diff --git a/types/netease-captcha/netease-captcha-tests.ts b/types/netease-captcha/netease-captcha-tests.ts new file mode 100644 index 0000000000..05ed51c2bb --- /dev/null +++ b/types/netease-captcha/netease-captcha-tests.ts @@ -0,0 +1,21 @@ +const config : NeteaseCaptcha.Config = { + captchaId: 'FAKE ID', + element: '#captcha', + mode: 'popup', + protocol: 'https', + width: '200px', + lang: 'en', + onVerify: (error: any, data?: NeteaseCaptcha.Data) => { + console.log(error, data); + } + }; + +const onLoad : NeteaseCaptcha.onLoad = (instance : NeteaseCaptcha.Instance) => void { + instance.refresh(); + instance.destroy(); +} + +function init(initNECaptcha : NeteaseCaptcha.InitFunction) => void { + initNECaptcha(config, onLoad); +} + diff --git a/types/netease-captcha/tsconfig.json b/types/netease-captcha/tsconfig.json new file mode 100644 index 0000000000..67a7f5dd64 --- /dev/null +++ b/types/netease-captcha/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", + "netease-captcha-tests.ts" + ] +} diff --git a/types/netease-captcha/tslint.json b/types/netease-captcha/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/netease-captcha/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 1b11a2dd3567606a25656c3a32137515127290b7 Mon Sep 17 00:00:00 2001 From: Ben Talbot Date: Tue, 4 Dec 2018 22:10:35 -0800 Subject: [PATCH 371/608] Add types for @google-cloud/kms --- .../google-cloud__kms-tests.ts | 117 ++++++++ types/google-cloud__kms/index.d.ts | 275 ++++++++++++++++++ types/google-cloud__kms/tsconfig.json | 28 ++ types/google-cloud__kms/tslint.json | 7 + 4 files changed, 427 insertions(+) create mode 100644 types/google-cloud__kms/google-cloud__kms-tests.ts create mode 100644 types/google-cloud__kms/index.d.ts create mode 100644 types/google-cloud__kms/tsconfig.json create mode 100644 types/google-cloud__kms/tslint.json diff --git a/types/google-cloud__kms/google-cloud__kms-tests.ts b/types/google-cloud__kms/google-cloud__kms-tests.ts new file mode 100644 index 0000000000..e3f6648310 --- /dev/null +++ b/types/google-cloud__kms/google-cloud__kms-tests.ts @@ -0,0 +1,117 @@ +import kms = require('@google-cloud/kms'); + +let kmsClientV1: kms.v1.KeyManagementServiceClient; +kmsClientV1 = new kms.v1.KeyManagementServiceClient(); + +const credentials = { + type: 'service_account', + project_id: '****', + private_key_id: '****', + private_key: '****', + client_email: '****', + client_id: '****', + auth_uri: 'https://accounts.google.com/o/oauth2/auth', + token_uri: 'https://oauth2.googleapis.com/token', + auth_provider_x509_cert_url: 'https://www.googleapis.com/oauth2/v1/certs', + client_x509_cert_url: '****' +}; + +let kmsClient: kms.KeyManagementServiceClient; +kmsClient = new kms.KeyManagementServiceClient({ credentials }); + +async function exampleListKeyRings() { + const locationPath = kmsClient.locationPath('[PROJECT_ID]', '[LOCATION]'); + const [ asyncKeyRings ] = await kmsClient.listKeyRings({parent: locationPath}); + if (asyncKeyRings.length > 0) { + const keyRing = asyncKeyRings[ 0 ]; + console.log(`KeyRing: ${keyRing.name}`); + } + + kmsClient.listKeyRings({parent: locationPath}, (err, [ callbackKeyRings ]) => { + if (callbackKeyRings.length > 0) { + const keyRing = callbackKeyRings[ 0 ]; + console.log(`KeyRing: ${keyRing.name}`); + } + }); + + kmsClient.listKeyRings({parent: locationPath}, { timeout: 1000 }, (err, [ callbackWithOptionsKeyRings ]) => { + if (callbackWithOptionsKeyRings.length > 0) { + const keyRing = callbackWithOptionsKeyRings[ 0 ]; + console.log(`KeyRing: ${keyRing.name}`); + } + }); +} + +async function exampleListCryptoKeys() { + const keyRingPath = kmsClient.keyRingPath('[PROJECT_ID]', '[LOCATION]', '[KEYRING_ID]'); + const [ asyncKeys ] = await kmsClient.listCryptoKeys({parent: keyRingPath}); + if (asyncKeys.length > 0) { + const key = asyncKeys[ 0 ]; + console.log(`CryptoKey: ${key.name} Version: ${key.primary.name}`); + } + + kmsClient.listCryptoKeys({parent: keyRingPath}, (err, [ callbackKeys ]) => { + if (callbackKeys.length > 0) { + const key = callbackKeys[ 0 ]; + console.log(`CryptoKey: ${key.name} Version: ${key.primary.name}`); + } + }); + + kmsClient.listCryptoKeys({parent: keyRingPath}, { timeout: 1000 }, (err, [ callbackWithOptionsKeys ]) => { + if (callbackWithOptionsKeys.length > 0) { + const key = callbackWithOptionsKeys[ 0 ]; + console.log(`CryptoKey: ${key.name} Version: ${key.primary.name}`); + } + }); +} + +async function exampleEncrypt() { + const formattedName = kmsClient.cryptoKeyPath('[PROJECT_ID]', '[LOCATION]', '[KEYRING_ID]', '[KEY_ID]'); + const unencryptedText = new Buffer('Hello World'); + + const [ asyncEncryptResult ] = await kmsClient.encrypt({ name: formattedName, plaintext: unencryptedText.toString('base64') }); + if (asyncEncryptResult != null) { + console.log(`Encrypted: ${asyncEncryptResult.ciphertext.toString('base64')}`); + } + + kmsClient.encrypt({ name: formattedName, plaintext: unencryptedText.toString('base64') }, (err, [ callbackEncryptResult ]) => { + if (callbackEncryptResult != null) { + console.log(`Encrypted: ${callbackEncryptResult.ciphertext.toString('base64')}`); + } + }); + + kmsClient.encrypt({ name: formattedName, plaintext: unencryptedText.toString('base64') }, { timeout: 1000 }, (err, [ callbackWithOptionsEncryptResult ]) => { + if (callbackWithOptionsEncryptResult != null) { + console.log(`Encrypted: ${callbackWithOptionsEncryptResult.ciphertext.toString('base64')}`); + } + }); +} + +async function exampleDecrypt() { + // Example pulling a file from Cloud Storage + // const secretsStorage = new Storage({ credentials }); + // const bucket = secretsStorage.bucket('[KMS_STORAGE_BUCKET]'); + // const filePath = '[PATH_TO_KMS_ENCRYPTED_FILE'; + // const file = bucket.file(filePath); + // const buffers = await file.download(); + // const buffer = buffers[ 0 ]; + + const buffer = new Buffer('[ENCRYPTED_SOURCE_BUFFER]'); + const formattedName = kmsClient.cryptoKeyPath('[PROJECT_ID]', '[LOCATION]', '[KEYRING_ID]', '[KEY_ID]'); + const [ asyncDecryptResult ] = await kmsClient.decrypt({name: formattedName, ciphertext: buffer.toString('base64') }); + if (asyncDecryptResult != null) { + console.log(`Decrypted: ${asyncDecryptResult.plaintext}`); + } + + kmsClient.decrypt({ name: formattedName, ciphertext: buffer.toString('base64') }, (err, [ callbackDecryptResult ]) => { + if (callbackDecryptResult != null) { + console.log(`Decrypted: ${callbackDecryptResult.plaintext}`); + } + }); + + kmsClient.decrypt({ name: formattedName, ciphertext: buffer.toString('base64') }, (err, [ callbackWithOptionsDecryptResult ]) => { + if (callbackWithOptionsDecryptResult != null) { + console.log(`Decrypted: ${callbackWithOptionsDecryptResult.plaintext}`); + } + }); +} diff --git a/types/google-cloud__kms/index.d.ts b/types/google-cloud__kms/index.d.ts new file mode 100644 index 0000000000..7f14a731bd --- /dev/null +++ b/types/google-cloud__kms/index.d.ts @@ -0,0 +1,275 @@ +// Type definitions for @google-cloud/kms 0.2 +// Project: https://github.com/googleapis/nodejs-kms +// Definitions by: Ben Talbot +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +/// + +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; + +declare module '@google-cloud/kms' { + namespace v1 { + enum CryptoKeyVersionAlgorithm { + // Not specified. + CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0, + + // Creates symmetric encryption keys. + GOOGLE_SYMMETRIC_ENCRYPTION = 1, + + // RSASSA-PSS 2048 bit key with a SHA256 digest. + RSA_SIGN_PSS_2048_SHA256 = 2, + + // RSASSA-PSS 3072 bit key with a SHA256 digest. + RSA_SIGN_PSS_3072_SHA256 = 3, + + // RSASSA-PSS 4096 bit key with a SHA256 digest. + RSA_SIGN_PSS_4096_SHA256 = 4, + + // RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest. + RSA_SIGN_PKCS1_2048_SHA256 = 5, + + // RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest. + RSA_SIGN_PKCS1_3072_SHA256 = 6, + + // RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest. + RSA_SIGN_PKCS1_4096_SHA256 = 7, + + // RSAES-OAEP 2048 bit key with a SHA256 digest. + RSA_DECRYPT_OAEP_2048_SHA256 = 8, + + // RSAES-OAEP 3072 bit key with a SHA256 digest. + RSA_DECRYPT_OAEP_3072_SHA256 = 9, + + // RSAES-OAEP 4096 bit key with a SHA256 digest. + RSA_DECRYPT_OAEP_4096_SHA256 = 10, + + // ECDSA on the NIST P-256 curve with a SHA256 digest. + EC_SIGN_P256_SHA256 = 12, + + // ECDSA on the NIST P-384 curve with a SHA384 digest. + EC_SIGN_P384_SHA384 = 13, + } + + enum CryptoKeyVersionState { + // Not specified. + CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0, + + // This version is still being generated. It may not be used, enabled, + // disabled, or destroyed yet. Cloud KMS will automatically mark this + // version [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] as soon as the version is ready. + PENDING_GENERATION = 5, + + // This version may be used for cryptographic operations. + ENABLED = 1, + + // This version may not be used, but the key material is still available, + // and the version can be placed back into the [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] state. + DISABLED = 2, + + // This version is destroyed, and the key material is no longer stored. + // A version may not leave this state once entered. + DESTROYED = 3, + + // This version is scheduled for destruction, and will be destroyed soon. + // Call + // [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] + // to put it back into the [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED] state. + DESTROY_SCHEDULED = 4, + } + + enum CryptoKeyVersionView { + // Default view for each [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Does not include + // the [attestation][google.cloud.kms.v1.CryptoKeyVersion.attestation] field. + CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0, + + // Provides all fields in each [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], including the + // [attestation][google.cloud.kms.v1.CryptoKeyVersion.attestation]. + FULL = 1, + } + + enum ProtectionLevel { + // Not specified. + PROTECTION_LEVEL_UNSPECIFIED = 0, + + // Crypto operations are performed in software. + SOFTWARE = 1, + + // Crypto operations are performed in a Hardware Security Module. + HSM = 2, + } + + enum AttestationFormat { + ATTESTATION_FORMAT_UNSPECIFIED = 0, + + // Cavium HSM attestation compressed with gzip. Note that this format is + // defined by Cavium and subject to change at any time. + CAVIUM_V1_COMPRESSED = 3, + } + + interface KeyOperationAttestation { + format: AttestationFormat; + } + + interface CryptoKeyVersion { + name: string; + state: CryptoKeyVersionState; + protectionLevel: ProtectionLevel; + algorithm: CryptoKeyVersionAlgorithm; + attestation?: KeyOperationAttestation; + createTime: google_protobuf_timestamp_pb.Timestamp.AsObject; + generateTime: google_protobuf_timestamp_pb.Timestamp.AsObject; + destroyTime?: google_protobuf_timestamp_pb.Timestamp.AsObject; + destroyEventTime?: google_protobuf_timestamp_pb.Timestamp.AsObject; + } + + interface CryptoKeyVersionTemplate { + protectionLevel: ProtectionLevel; + algorithm: CryptoKeyVersionAlgorithm; + } + + enum CryptoKeyPurpose { + // Not specified. + CRYPTO_KEY_PURPOSE_UNSPECIFIED = 0, + + // [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used with + // [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] and + // [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt]. + ENCRYPT_DECRYPT = 1, + + // [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used with + // [AsymmetricSign][google.cloud.kms.v1.KeyManagementService.AsymmetricSign] and + // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]. + ASYMMETRIC_SIGN = 5, + + // [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used with + // [AsymmetricDecrypt][google.cloud.kms.v1.KeyManagementService.AsymmetricDecrypt] and + // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]. + ASYMMETRIC_DECRYPT = 6, + } + + interface CryptoKey { + name: string; + primary: CryptoKeyVersion; + purpose: CryptoKeyPurpose; + createTime: google_protobuf_timestamp_pb.Timestamp.AsObject; + nextRotationTime?: google_protobuf_timestamp_pb.Timestamp.AsObject; + versionTemplate: CryptoKeyVersionTemplate; + labels: { [s: string]: string; }; + } + + interface KeyRing { + name: string; + createTime: google_protobuf_timestamp_pb.Timestamp.AsObject; + } + + namespace KeyManagementServiceClient { + interface ConfigurationObject { + credentials?: { + client_email?: string; + private_key?: string + }; + email?: string; + keyFilename?: string; + port?: number; + projectId?: string; + promise?: any; + servicePath?: string; + } + + interface EncryptRequest { + name: string; + plaintext: string; + additionalAuthenticatedData?: string; + } + interface EncryptResponse { + name: string; + ciphertext: Buffer; + } + type EncryptCallback = (err: Error | null, apiResponse: [EncryptResponse, any, any]) => void; + + interface DecryptRequest { + name: string; + ciphertext: string; + additionalAuthenticatedData?: string; + } + interface DecryptResponse { + plaintext: Buffer; + } + type DecryptCallback = (err: Error | null, apiResponse: [DecryptResponse, any, any]) => void; + + interface ListKeyRingsRequest { + parent: string; + page_size?: number; + page_token?: string; + } + type ListKeyRingsCallback = (err: Error | null, apiResponse: [KeyRing[], any, any]) => void; + + interface ListCryptoKeysRequest { + parent: string; + page_size?: number; + page_token?: string; + } + type ListCryptoKeysCallback = (err: Error | null, apiResponse: [CryptoKey[], any, any]) => void; + } + + class KeyManagementServiceClient { + constructor(options?: KeyManagementServiceClient.ConfigurationObject); + + keyRingPath(project: string, location: string, keyRing: string): string; + cryptoKeyPathPath(project: string, location: string, keyRing: string, cryptoKeyPath: string): string; + locationPath(project: string, location: string): string; + cryptoKeyPath(project: string, location: string, keyRing: string, cryptoKey: string): string; + cryptoKeyVersionPath(project: string, location: string, keyRing: string, cryptoKey: string, cryptoKeyVersion: string): string; + + encrypt(request: KeyManagementServiceClient.EncryptRequest, gaxOpts?: GAX.CallOptions): Promise<[KeyManagementServiceClient.EncryptResponse, any, any]>; + encrypt(request: KeyManagementServiceClient.EncryptRequest, callback: KeyManagementServiceClient.EncryptCallback): void; + encrypt(request: KeyManagementServiceClient.EncryptRequest, gaxOpts: GAX.CallOptions, callback: KeyManagementServiceClient.EncryptCallback): void; + + decrypt(request: KeyManagementServiceClient.DecryptRequest, gaxOpts?: GAX.CallOptions): Promise<[KeyManagementServiceClient.DecryptResponse, any, any]>; + decrypt(request: KeyManagementServiceClient.DecryptRequest, callback: KeyManagementServiceClient.DecryptCallback): void; + decrypt(request: KeyManagementServiceClient.DecryptRequest, gaxOpts: GAX.CallOptions, callback: KeyManagementServiceClient.DecryptCallback): void; + + listKeyRings(request: KeyManagementServiceClient.ListKeyRingsRequest, gaxOpts?: GAX.CallOptions): Promise<[KeyRing[], any, any]>; + listKeyRings(request: KeyManagementServiceClient.ListKeyRingsRequest, callback: KeyManagementServiceClient.ListKeyRingsCallback): void; + listKeyRings(request: KeyManagementServiceClient.ListKeyRingsRequest, gaxOpts: GAX.CallOptions, callback: KeyManagementServiceClient.ListKeyRingsCallback): void; + + listCryptoKeys(request: KeyManagementServiceClient.ListCryptoKeysRequest, gaxOpts?: GAX.CallOptions): Promise<[CryptoKey[], any, any]>; + listCryptoKeys(request: KeyManagementServiceClient.ListCryptoKeysRequest, callback: KeyManagementServiceClient.ListCryptoKeysCallback): void; + listCryptoKeys(request: KeyManagementServiceClient.ListCryptoKeysRequest, gaxOpts: GAX.CallOptions, callback: KeyManagementServiceClient.ListCryptoKeysCallback): void; + } + } + + class KeyManagementServiceClient extends v1.KeyManagementServiceClient { + constructor(options?: v1.KeyManagementServiceClient.ConfigurationObject); + } + + namespace GAX { + /** https://googleapis.github.io/gax-nodejs/global.html#CallOptions */ + interface CallOptions { + timeout?: number; + retry?: RetryOptions; + autoPaginate?: boolean; + pageToken?: object; + isBundling?: boolean; + longrunning?: BackoffSettings; + promise?: PromiseConstructor; // FIXME Unsure if this is the correct type; remove this comment if it is + } + + /** https://googleapis.github.io/gax-nodejs/global.html#RetryOptions */ + interface RetryOptions { + retryCodes: string[]; + backoffSettings: BackoffSettings; + } + + /** https://googleapis.github.io/gax-nodejs/global.html#BackoffSettings */ + interface BackoffSettings { + initialRetryDelayMillis: number; + retryDelayMultiplier: number; + maxRetryDelayMillis: number; + initialRpcTimeoutMillis: number; + maxRpcTimeoutMillis: number; + totalTimeoutMillis: number; + } + } +} diff --git a/types/google-cloud__kms/tsconfig.json b/types/google-cloud__kms/tsconfig.json new file mode 100644 index 0000000000..bb1ba097cc --- /dev/null +++ b/types/google-cloud__kms/tsconfig.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "paths": { + "@google-cloud/kms": [ + "google-cloud__kms" + ] + }, + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "google-cloud__kms-tests.ts" + ] +} \ No newline at end of file diff --git a/types/google-cloud__kms/tslint.json b/types/google-cloud__kms/tslint.json new file mode 100644 index 0000000000..1f75469243 --- /dev/null +++ b/types/google-cloud__kms/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "indent": [true, "tabs"], + "no-single-declare-module": false + } +} From 6f7086044fba04f62991fcbf961911f746d15b62 Mon Sep 17 00:00:00 2001 From: Ben Talbot Date: Tue, 4 Dec 2018 22:21:22 -0800 Subject: [PATCH 372/608] Remove "no-single-declare-module": false from tslint.json --- types/google-cloud__kms/tslint.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/types/google-cloud__kms/tslint.json b/types/google-cloud__kms/tslint.json index 1f75469243..ffaae9bd46 100644 --- a/types/google-cloud__kms/tslint.json +++ b/types/google-cloud__kms/tslint.json @@ -1,7 +1,6 @@ { "extends": "dtslint/dt.json", "rules": { - "indent": [true, "tabs"], - "no-single-declare-module": false + "indent": [true, "tabs"] } } From 78de2a5f211671214c2aa94c5f3e2adcac0f25b1 Mon Sep 17 00:00:00 2001 From: Robert Stigsson Date: Wed, 5 Dec 2018 08:25:02 +0100 Subject: [PATCH 373/608] recharts: moved ifOverflow-types to IfOverflowType. --- types/recharts/index.d.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/types/recharts/index.d.ts b/types/recharts/index.d.ts index 7054b18e08..d18a846c56 100644 --- a/types/recharts/index.d.ts +++ b/types/recharts/index.d.ts @@ -46,6 +46,7 @@ export type StackOffsetType = 'sign' | 'expand' | 'none' | 'wiggle' | 'silhouett export type LineType = 'basis' | 'basisClosed' | 'basisOpen' | 'linear' | 'linearClosed' | 'natural' | 'monotoneX' | 'monotoneY' | 'monotone' | 'step' | 'stepBefore' | 'stepAfter' | CurveFactory; +export type IfOverflowType = 'hidden' | 'visible' | 'discard' | 'extendDomain'; export type AxisInterval = number | 'preserveStart' | 'preserveEnd' | 'preserveStartEnd'; export type PickedCSSStyleDeclarationKeys = @@ -635,7 +636,7 @@ export interface ReferenceAreaProps extends Partial { yAxis?: object; isFront?: boolean; alwaysShow?: boolean; - ifOverflow?: 'hidden' | 'visible' | 'discard' | 'extendDomain'; + ifOverflow?: IfOverflowType; x1?: number | string; x2?: number | string; y1?: number | string; @@ -659,7 +660,7 @@ export interface ReferenceDotProps extends EventAttributes, Partial | React.ReactElement; From f047781c2fa912f136447ac7bcdd54140ff8fc0b Mon Sep 17 00:00:00 2001 From: Christian Sporer Date: Wed, 5 Dec 2018 08:27:11 +0100 Subject: [PATCH 374/608] Using real name in the definitions file as per "convention" (and it is now anyways visible on my profile) --- types/list-stream/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/list-stream/index.d.ts b/types/list-stream/index.d.ts index f92eb5f917..2b3fd1da28 100644 --- a/types/list-stream/index.d.ts +++ b/types/list-stream/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for list-stream 1.0 // Project: https://github.com/rvagg/list-stream -// Definitions by: IanStorm +// Definitions by: Christian Sporer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.7 From 3e46e7059c10dd0d23bbfe8e83e7f635d161d943 Mon Sep 17 00:00:00 2001 From: Christian Sporer Date: Wed, 5 Dec 2018 08:28:48 +0100 Subject: [PATCH 375/608] Explicit mentioning of support for "import-" and "require-style" by providing more tests, as per discussion (https://github.com/DefinitelyTyped/DefinitelyTyped/pull/30669#discussion_r238432884) --- types/list-stream/list-stream-tests.ts | 56 +----------------------- types/list-stream/tests/import-tests.ts | 54 +++++++++++++++++++++++ types/list-stream/tests/require-tests.ts | 54 +++++++++++++++++++++++ 3 files changed, 110 insertions(+), 54 deletions(-) create mode 100644 types/list-stream/tests/import-tests.ts create mode 100644 types/list-stream/tests/require-tests.ts diff --git a/types/list-stream/list-stream-tests.ts b/types/list-stream/list-stream-tests.ts index 3648097ad6..89b0d6c236 100644 --- a/types/list-stream/list-stream-tests.ts +++ b/types/list-stream/list-stream-tests.ts @@ -1,54 +1,2 @@ -import ListStream from "list-stream"; - -let chunk: any = "chunk"; -let listStream: ListStream; -let num = 1; - -listStream = ListStream((err: Error, data: any[]) => { - if (err) { throw err; } - console.log(data.length); - for (const date of data) { - console.log(date); - } -}); -listStream = ListStream({ objectMode: true }, (err: Error, data: any[]) => { - if (err) { throw err; } - console.log(data.length); - for (const date of data) { - console.log(date); - } -}); -listStream = new ListStream((err: Error, data: any[]) => { - if (err) { throw err; } - console.log(data.length); - for (const date of data) { - console.log(date); - } -}); -listStream = new ListStream({ objectMode: true }, (err: Error, data: any[]) => { - if (err) { throw err; } - console.log(data.length); - for (const date of data) { - console.log(date); - } -}); -listStream = ListStream.obj((err: Error, data: any[]) => { - if (err) { throw err; } - console.log(data.length); - for (const date of data) { - console.log(date); - } -}); - -listStream = ListStream.obj(); -listStream.write({ key: "value" }); - -listStream.append(chunk); - -listStream = listStream.duplicate(); - -listStream.end(); - -chunk = listStream.get(num); - -num = listStream.length; +import "./tests/import-tests"; +import "./tests/require-tests"; diff --git a/types/list-stream/tests/import-tests.ts b/types/list-stream/tests/import-tests.ts new file mode 100644 index 0000000000..3648097ad6 --- /dev/null +++ b/types/list-stream/tests/import-tests.ts @@ -0,0 +1,54 @@ +import ListStream from "list-stream"; + +let chunk: any = "chunk"; +let listStream: ListStream; +let num = 1; + +listStream = ListStream((err: Error, data: any[]) => { + if (err) { throw err; } + console.log(data.length); + for (const date of data) { + console.log(date); + } +}); +listStream = ListStream({ objectMode: true }, (err: Error, data: any[]) => { + if (err) { throw err; } + console.log(data.length); + for (const date of data) { + console.log(date); + } +}); +listStream = new ListStream((err: Error, data: any[]) => { + if (err) { throw err; } + console.log(data.length); + for (const date of data) { + console.log(date); + } +}); +listStream = new ListStream({ objectMode: true }, (err: Error, data: any[]) => { + if (err) { throw err; } + console.log(data.length); + for (const date of data) { + console.log(date); + } +}); +listStream = ListStream.obj((err: Error, data: any[]) => { + if (err) { throw err; } + console.log(data.length); + for (const date of data) { + console.log(date); + } +}); + +listStream = ListStream.obj(); +listStream.write({ key: "value" }); + +listStream.append(chunk); + +listStream = listStream.duplicate(); + +listStream.end(); + +chunk = listStream.get(num); + +num = listStream.length; diff --git a/types/list-stream/tests/require-tests.ts b/types/list-stream/tests/require-tests.ts new file mode 100644 index 0000000000..8966e1e5a3 --- /dev/null +++ b/types/list-stream/tests/require-tests.ts @@ -0,0 +1,54 @@ +import ListStream = require("list-stream"); + +let chunk: any = "chunk"; +let listStream: ListStream; +let num = 1; + +listStream = ListStream((err: Error, data: any[]) => { + if (err) { throw err; } + console.log(data.length); + for (const date of data) { + console.log(date); + } +}); +listStream = ListStream({ objectMode: true }, (err: Error, data: any[]) => { + if (err) { throw err; } + console.log(data.length); + for (const date of data) { + console.log(date); + } +}); +listStream = new ListStream((err: Error, data: any[]) => { + if (err) { throw err; } + console.log(data.length); + for (const date of data) { + console.log(date); + } +}); +listStream = new ListStream({ objectMode: true }, (err: Error, data: any[]) => { + if (err) { throw err; } + console.log(data.length); + for (const date of data) { + console.log(date); + } +}); +listStream = ListStream.obj((err: Error, data: any[]) => { + if (err) { throw err; } + console.log(data.length); + for (const date of data) { + console.log(date); + } +}); + +listStream = ListStream.obj(); +listStream.write({ key: "value" }); + +listStream.append(chunk); + +listStream = listStream.duplicate(); + +listStream.end(); + +chunk = listStream.get(num); + +num = listStream.length; From 0421278faec4e63ee3e4aa6d13fe275091999468 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Wed, 5 Dec 2018 00:26:45 +0100 Subject: [PATCH 376/608] Add types for rechoir --- types/rechoir/index.d.ts | 18 ++++++++++++++++++ types/rechoir/rechoir-tests.ts | 6 ++++++ types/rechoir/tsconfig.json | 23 +++++++++++++++++++++++ types/rechoir/tslint.json | 1 + 4 files changed, 48 insertions(+) create mode 100644 types/rechoir/index.d.ts create mode 100644 types/rechoir/rechoir-tests.ts create mode 100644 types/rechoir/tsconfig.json create mode 100644 types/rechoir/tslint.json diff --git a/types/rechoir/index.d.ts b/types/rechoir/index.d.ts new file mode 100644 index 0000000000..2cb3bbb7ab --- /dev/null +++ b/types/rechoir/index.d.ts @@ -0,0 +1,18 @@ +// Type definitions for rechoir 0.6 +// Project: https://github.com/tkellen/node-rechoir +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import { Extensions } from 'interpret'; + +export function prepare( + config: Extensions, + filepath: string, + requireFrom?: string +): true | Attempt[]; + +export interface Attempt { + moduleName: string; + module: any; + error: Error | null; +} diff --git a/types/rechoir/rechoir-tests.ts b/types/rechoir/rechoir-tests.ts new file mode 100644 index 0000000000..de4b18c74f --- /dev/null +++ b/types/rechoir/rechoir-tests.ts @@ -0,0 +1,6 @@ +import { extensions as config } from 'interpret'; +import { prepare } from 'rechoir'; + +// $ExpectType true | Attempt[] +prepare(config, './test/fixtures/test.coffee'); +prepare(config, './test/fixtures/test.coffee', './'); diff --git a/types/rechoir/tsconfig.json b/types/rechoir/tsconfig.json new file mode 100644 index 0000000000..03a006d997 --- /dev/null +++ b/types/rechoir/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "rechoir-tests.ts" + ] +} diff --git a/types/rechoir/tslint.json b/types/rechoir/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/rechoir/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From f225c53dc1ac9c8b10cf69fa6ce74c623246c9ab Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sun, 25 Nov 2018 23:56:28 +0100 Subject: [PATCH 377/608] Add types for sasl-anonymous --- types/sasl-anonymous/index.d.ts | 29 ++++++++++++++++++++ types/sasl-anonymous/sasl-anonymous-tests.ts | 22 +++++++++++++++ types/sasl-anonymous/tsconfig.json | 23 ++++++++++++++++ types/sasl-anonymous/tslint.json | 1 + 4 files changed, 75 insertions(+) create mode 100644 types/sasl-anonymous/index.d.ts create mode 100644 types/sasl-anonymous/sasl-anonymous-tests.ts create mode 100644 types/sasl-anonymous/tsconfig.json create mode 100644 types/sasl-anonymous/tslint.json diff --git a/types/sasl-anonymous/index.d.ts b/types/sasl-anonymous/index.d.ts new file mode 100644 index 0000000000..b438a411d7 --- /dev/null +++ b/types/sasl-anonymous/index.d.ts @@ -0,0 +1,29 @@ +// Type definitions for sasl-anonymous 0.1 +// Project: https://github.com/jaredhanson/js-sasl-anonymous +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import { Mechanism } from 'saslmechanisms'; + +export = AnonymousMechanism; + +declare class AnonymousMechanism implements Mechanism { + static Mechanism: typeof AnonymousMechanism; + static prototype: { + name: 'ANONYMOUS'; + clientFirst: true; + }; + + name: 'ANONYMOUS'; + clientFirst: true; + + response(cred: AnonymousMechanism.Credentials): string; + + challenge(chal: string): void; +} + +declare namespace AnonymousMechanism { + interface Credentials { + trace?: string; + } +} diff --git a/types/sasl-anonymous/sasl-anonymous-tests.ts b/types/sasl-anonymous/sasl-anonymous-tests.ts new file mode 100644 index 0000000000..dd993fa49d --- /dev/null +++ b/types/sasl-anonymous/sasl-anonymous-tests.ts @@ -0,0 +1,22 @@ +import AnonymousMechanism = require('sasl-anonymous'); +import { Mechanism } from 'sasl-anonymous'; +import { Factory } from 'saslmechanisms'; + +new Factory().use(AnonymousMechanism); +new Factory().use(Mechanism); + +// $ExpectType "ANONYMOUS" +AnonymousMechanism.prototype.name; +// $ExpectType true +AnonymousMechanism.prototype.clientFirst; + +const m = new AnonymousMechanism(); + +// $ExpectType "ANONYMOUS" +m.name; +// $ExpectType true +m.clientFirst; +// $ExpectType string +m.response({ trace: 't' }); +// $ExpectType void +m.challenge('challenge'); diff --git a/types/sasl-anonymous/tsconfig.json b/types/sasl-anonymous/tsconfig.json new file mode 100644 index 0000000000..5a9ebd2f35 --- /dev/null +++ b/types/sasl-anonymous/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "sasl-anonymous-tests.ts" + ] +} diff --git a/types/sasl-anonymous/tslint.json b/types/sasl-anonymous/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/sasl-anonymous/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 0eebf91a2d2ac25a45eeeb8e60dbff0c8c8059cd Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sun, 25 Nov 2018 23:57:42 +0100 Subject: [PATCH 378/608] Add types for sasl-digest-md5 --- types/sasl-digest-md5/index.d.ts | 41 +++++++++++++++++++ .../sasl-digest-md5/sasl-digest-md5-tests.ts | 30 ++++++++++++++ types/sasl-digest-md5/tsconfig.json | 23 +++++++++++ types/sasl-digest-md5/tslint.json | 1 + 4 files changed, 95 insertions(+) create mode 100644 types/sasl-digest-md5/index.d.ts create mode 100644 types/sasl-digest-md5/sasl-digest-md5-tests.ts create mode 100644 types/sasl-digest-md5/tsconfig.json create mode 100644 types/sasl-digest-md5/tslint.json diff --git a/types/sasl-digest-md5/index.d.ts b/types/sasl-digest-md5/index.d.ts new file mode 100644 index 0000000000..001875f330 --- /dev/null +++ b/types/sasl-digest-md5/index.d.ts @@ -0,0 +1,41 @@ +// Type definitions for sasl-digest-md5 0.1 +// Project: https://github.com/jaredhanson/js-sasl-digest-md5 +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import { Mechanism } from 'saslmechanisms'; + +export = DigestMd5Mechanism; + +declare class DigestMd5Mechanism implements Mechanism { + static Mechanism: typeof DigestMd5Mechanism; + static prototype: { + name: 'DIGEST-MD5'; + clientFirst: false; + }; + + name: 'DIGEST-MD5'; + clientFirst: false; + + constructor(options?: DigestMd5Mechanism.Options); + + response(cred: DigestMd5Mechanism.Credentials): string; + + challenge(chal: string): this; +} + +declare namespace DigestMd5Mechanism { + interface Options { + genNonce?: () => number; + } + + interface Credentials { + serviceType: string; + host: string; + username: string; + password: string; + serviceName?: string; + realm?: string; + authzid?: string; + } +} diff --git a/types/sasl-digest-md5/sasl-digest-md5-tests.ts b/types/sasl-digest-md5/sasl-digest-md5-tests.ts new file mode 100644 index 0000000000..f63c4b7359 --- /dev/null +++ b/types/sasl-digest-md5/sasl-digest-md5-tests.ts @@ -0,0 +1,30 @@ +import DigestMd5Mechanism = require('sasl-digest-md5'); +import { Mechanism } from 'sasl-digest-md5'; +import { Factory } from 'saslmechanisms'; + +new Factory().use(DigestMd5Mechanism); +new Factory().use(Mechanism); + +// $ExpectType "DIGEST-MD5" +DigestMd5Mechanism.prototype.name; +// $ExpectType false +DigestMd5Mechanism.prototype.clientFirst; + +const m = new DigestMd5Mechanism(); +new DigestMd5Mechanism({ + genNonce() { + return 1; + }, +}); + +// $ExpectType "DIGEST-MD5" +m.name; +// $ExpectType false +m.clientFirst; +// $ExpectType string +m.response({ serviceType: 's', host: 'h', username: 'u', password: 'p' }); +m.response({ serviceType: 's', host: 'h', username: 'u', password: 'p', serviceName: 'sn' }); +m.response({ serviceType: 's', host: 'h', username: 'u', password: 'p', realm: 'r' }); +m.response({ serviceType: 's', host: 'h', username: 'u', password: 'p', authzid: 'a' }); +// $ExpectType DigestMd5Mechanism +m.challenge('challenge'); diff --git a/types/sasl-digest-md5/tsconfig.json b/types/sasl-digest-md5/tsconfig.json new file mode 100644 index 0000000000..84059391b2 --- /dev/null +++ b/types/sasl-digest-md5/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "sasl-digest-md5-tests.ts" + ] +} diff --git a/types/sasl-digest-md5/tslint.json b/types/sasl-digest-md5/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/sasl-digest-md5/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 50db82783af95ccf7ee14596963360a84b790393 Mon Sep 17 00:00:00 2001 From: Christian Sporer Date: Wed, 5 Dec 2018 08:39:16 +0100 Subject: [PATCH 379/608] Fixed "unused file" error while running `npm test` --- types/list-stream/list-stream-tests.ts | 4 ++-- types/list-stream/{tests => test}/import-tests.ts | 0 types/list-stream/{tests => test}/require-tests.ts | 0 types/list-stream/tsconfig.json | 2 ++ 4 files changed, 4 insertions(+), 2 deletions(-) rename types/list-stream/{tests => test}/import-tests.ts (100%) rename types/list-stream/{tests => test}/require-tests.ts (100%) diff --git a/types/list-stream/list-stream-tests.ts b/types/list-stream/list-stream-tests.ts index 89b0d6c236..8b6ae25435 100644 --- a/types/list-stream/list-stream-tests.ts +++ b/types/list-stream/list-stream-tests.ts @@ -1,2 +1,2 @@ -import "./tests/import-tests"; -import "./tests/require-tests"; +import "./test/import-tests"; +import "./test/require-tests"; diff --git a/types/list-stream/tests/import-tests.ts b/types/list-stream/test/import-tests.ts similarity index 100% rename from types/list-stream/tests/import-tests.ts rename to types/list-stream/test/import-tests.ts diff --git a/types/list-stream/tests/require-tests.ts b/types/list-stream/test/require-tests.ts similarity index 100% rename from types/list-stream/tests/require-tests.ts rename to types/list-stream/test/require-tests.ts diff --git a/types/list-stream/tsconfig.json b/types/list-stream/tsconfig.json index 060c211379..00fe9a2e23 100644 --- a/types/list-stream/tsconfig.json +++ b/types/list-stream/tsconfig.json @@ -18,6 +18,8 @@ "esModuleInterop": true }, "files": [ + "test/import-tests.ts", + "test/require-tests.ts", "index.d.ts", "list-stream-tests.ts" ] From 2133ee8e4c24f7c242f77d1680e77073a6e0b771 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sun, 25 Nov 2018 23:58:42 +0100 Subject: [PATCH 380/608] Add types for sasl-external --- types/sasl-external/index.d.ts | 29 ++++++++++++++++++++++ types/sasl-external/sasl-external-tests.ts | 22 ++++++++++++++++ types/sasl-external/tsconfig.json | 23 +++++++++++++++++ types/sasl-external/tslint.json | 1 + 4 files changed, 75 insertions(+) create mode 100644 types/sasl-external/index.d.ts create mode 100644 types/sasl-external/sasl-external-tests.ts create mode 100644 types/sasl-external/tsconfig.json create mode 100644 types/sasl-external/tslint.json diff --git a/types/sasl-external/index.d.ts b/types/sasl-external/index.d.ts new file mode 100644 index 0000000000..06a90ce3a4 --- /dev/null +++ b/types/sasl-external/index.d.ts @@ -0,0 +1,29 @@ +// Type definitions for sasl-external 0.1 +// Project: https://github.com/jaredhanson/js-sasl-external +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import { Mechanism } from 'saslmechanisms'; + +export = ExternalMechanism; + +declare class ExternalMechanism implements Mechanism { + static Mechanism: typeof ExternalMechanism; + static prototype: { + name: 'EXTERNAL'; + clientFirst: true; + }; + + name: 'EXTERNAL'; + clientFirst: true; + + response(cred: ExternalMechanism.Credentials): string; + + challenge(chal: string): void; +} + +declare namespace ExternalMechanism { + interface Credentials { + authzid?: string; + } +} diff --git a/types/sasl-external/sasl-external-tests.ts b/types/sasl-external/sasl-external-tests.ts new file mode 100644 index 0000000000..919721aec5 --- /dev/null +++ b/types/sasl-external/sasl-external-tests.ts @@ -0,0 +1,22 @@ +import ExternalMechanism = require('sasl-external'); +import { Mechanism } from 'sasl-external'; +import { Factory } from 'saslmechanisms'; + +new Factory().use(ExternalMechanism); +new Factory().use(Mechanism); + +// $ExpectType "EXTERNAL" +ExternalMechanism.prototype.name; +// $ExpectType true +ExternalMechanism.prototype.clientFirst; + +const m = new ExternalMechanism(); + +// $ExpectType "EXTERNAL" +m.name; +// $ExpectType true +m.clientFirst; +// $ExpectType string +m.response({ authzid: 'a' }); +// $ExpectType void +m.challenge('challenge'); diff --git a/types/sasl-external/tsconfig.json b/types/sasl-external/tsconfig.json new file mode 100644 index 0000000000..b319008559 --- /dev/null +++ b/types/sasl-external/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "sasl-external-tests.ts" + ] +} diff --git a/types/sasl-external/tslint.json b/types/sasl-external/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/sasl-external/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 0b80d92a10d2e643ec871e8ba80a0ab18ebd2a8e Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sun, 25 Nov 2018 23:59:27 +0100 Subject: [PATCH 381/608] Add types for sasl-plain --- types/sasl-plain/index.d.ts | 31 ++++++++++++++++++++++++++++ types/sasl-plain/sasl-plain-tests.ts | 23 +++++++++++++++++++++ types/sasl-plain/tsconfig.json | 23 +++++++++++++++++++++ types/sasl-plain/tslint.json | 1 + 4 files changed, 78 insertions(+) create mode 100644 types/sasl-plain/index.d.ts create mode 100644 types/sasl-plain/sasl-plain-tests.ts create mode 100644 types/sasl-plain/tsconfig.json create mode 100644 types/sasl-plain/tslint.json diff --git a/types/sasl-plain/index.d.ts b/types/sasl-plain/index.d.ts new file mode 100644 index 0000000000..a1c5f61467 --- /dev/null +++ b/types/sasl-plain/index.d.ts @@ -0,0 +1,31 @@ +// Type definitions for sasl-plain 0.1 +// Project: https://github.com/jaredhanson/js-sasl-plain +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import { Mechanism } from 'saslmechanisms'; + +export = PlainMechanism; + +declare class PlainMechanism implements Mechanism { + static Mechanism: typeof PlainMechanism; + static prototype: { + name: 'PLAIN'; + clientFirst: true; + }; + + name: 'PLAIN'; + clientFirst: true; + + response(cred: PlainMechanism.Credentials): string; + + challenge(chal: string): this; +} + +declare namespace PlainMechanism { + interface Credentials { + authzid?: string; + username: string; + password: string; + } +} diff --git a/types/sasl-plain/sasl-plain-tests.ts b/types/sasl-plain/sasl-plain-tests.ts new file mode 100644 index 0000000000..144d21451f --- /dev/null +++ b/types/sasl-plain/sasl-plain-tests.ts @@ -0,0 +1,23 @@ +import PlainMechanism = require('sasl-plain'); +import { Mechanism } from 'sasl-plain'; +import { Factory } from 'saslmechanisms'; + +new Factory().use(PlainMechanism); +new Factory().use(Mechanism); + +// $ExpectType "PLAIN" +PlainMechanism.prototype.name; +// $ExpectType true +PlainMechanism.prototype.clientFirst; + +const m = new PlainMechanism(); + +// $ExpectType "PLAIN" +m.name; +// $ExpectType true +m.clientFirst; +// $ExpectType string +m.response({ username: 'u', password: 'pw' }); +m.response({ username: 'u', password: 'pw', authzid: 'a' }); +// $ExpectType PlainMechanism +m.challenge('challenge'); diff --git a/types/sasl-plain/tsconfig.json b/types/sasl-plain/tsconfig.json new file mode 100644 index 0000000000..3e33152c74 --- /dev/null +++ b/types/sasl-plain/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "sasl-plain-tests.ts" + ] +} diff --git a/types/sasl-plain/tslint.json b/types/sasl-plain/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/sasl-plain/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 2e722d3138e0103158de95c755376085e01a030f Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Mon, 26 Nov 2018 00:01:17 +0100 Subject: [PATCH 382/608] Add types for sasl-scram-sha-1 --- types/sasl-scram-sha-1/index.d.ts | 41 +++++++++++++++++++ .../sasl-scram-sha-1-tests.ts | 33 +++++++++++++++ types/sasl-scram-sha-1/tsconfig.json | 23 +++++++++++ types/sasl-scram-sha-1/tslint.json | 1 + 4 files changed, 98 insertions(+) create mode 100644 types/sasl-scram-sha-1/index.d.ts create mode 100644 types/sasl-scram-sha-1/sasl-scram-sha-1-tests.ts create mode 100644 types/sasl-scram-sha-1/tsconfig.json create mode 100644 types/sasl-scram-sha-1/tslint.json diff --git a/types/sasl-scram-sha-1/index.d.ts b/types/sasl-scram-sha-1/index.d.ts new file mode 100644 index 0000000000..d332b6126a --- /dev/null +++ b/types/sasl-scram-sha-1/index.d.ts @@ -0,0 +1,41 @@ +// Type definitions for sasl-scram-sha-1 1.2 +// Project: https://github.com/legastero/js-sasl-scram-sha-1 +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import { Mechanism } from 'saslmechanisms'; + +export = ScramSha1Mechanism; + +declare class ScramSha1Mechanism implements Mechanism { + static Mechanism: typeof ScramSha1Mechanism; + static prototype: { + name: 'SCRAM-SHA-1'; + clientFirst: true; + }; + + name: 'SCRAM-SHA-1'; + clientFirst: true; + + constructor(options?: ScramSha1Mechanism.Options); + + response(cred: ScramSha1Mechanism.Credentials): string; + + challenge(chal: string): this; +} + +declare namespace ScramSha1Mechanism { + interface Options { + genNonce?: () => number; + } + + interface Credentials { + authzid?: string; + username?: string; + password?: string; + salt?: string; + saltedPassword?: string; + clientKey?: string; + serverKey?: string; + } +} diff --git a/types/sasl-scram-sha-1/sasl-scram-sha-1-tests.ts b/types/sasl-scram-sha-1/sasl-scram-sha-1-tests.ts new file mode 100644 index 0000000000..85eb648193 --- /dev/null +++ b/types/sasl-scram-sha-1/sasl-scram-sha-1-tests.ts @@ -0,0 +1,33 @@ +import ScramSha1Mechanism = require('sasl-scram-sha-1'); +import { Mechanism } from 'sasl-scram-sha-1'; +import { Factory } from 'saslmechanisms'; + +new Factory().use(ScramSha1Mechanism); +new Factory().use(Mechanism); + +// $ExpectType "SCRAM-SHA-1" +ScramSha1Mechanism.prototype.name; +// $ExpectType true +ScramSha1Mechanism.prototype.clientFirst; + +const m = new ScramSha1Mechanism(); +new ScramSha1Mechanism({ + genNonce() { + return 1; + }, +}); + +// $ExpectType "SCRAM-SHA-1" +m.name; +// $ExpectType true +m.clientFirst; +// $ExpectType string +m.response({ authzid: 'a' }); +m.response({ username: 'u' }); +m.response({ password: 'pw' }); +m.response({ salt: 's' }); +m.response({ saltedPassword: 'sp' }); +m.response({ clientKey: 'ck' }); +m.response({ serverKey: 'sk' }); +// $ExpectType ScramSha1Mechanism +m.challenge('challenge'); diff --git a/types/sasl-scram-sha-1/tsconfig.json b/types/sasl-scram-sha-1/tsconfig.json new file mode 100644 index 0000000000..80181379ea --- /dev/null +++ b/types/sasl-scram-sha-1/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "sasl-scram-sha-1-tests.ts" + ] +} diff --git a/types/sasl-scram-sha-1/tslint.json b/types/sasl-scram-sha-1/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/sasl-scram-sha-1/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 345782feb2525373689bc8de68ea52777ac8533c Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Wed, 21 Nov 2018 01:09:59 +0100 Subject: [PATCH 383/608] Add types for @xmpp/xml --- types/xmpp__xml/index.d.ts | 66 +++++++++++++++++++++++++++++ types/xmpp__xml/tsconfig.json | 30 +++++++++++++ types/xmpp__xml/tslint.json | 1 + types/xmpp__xml/xmpp__xml-tests.ts | 46 ++++++++++++++++++++ types/xmpp__xml/xmpp__xml-tests.tsx | 26 ++++++++++++ 5 files changed, 169 insertions(+) create mode 100644 types/xmpp__xml/index.d.ts create mode 100644 types/xmpp__xml/tsconfig.json create mode 100644 types/xmpp__xml/tslint.json create mode 100644 types/xmpp__xml/xmpp__xml-tests.ts create mode 100644 types/xmpp__xml/xmpp__xml-tests.tsx diff --git a/types/xmpp__xml/index.d.ts b/types/xmpp__xml/index.d.ts new file mode 100644 index 0000000000..b69eacee0f --- /dev/null +++ b/types/xmpp__xml/index.d.ts @@ -0,0 +1,66 @@ +// Type definitions for @xmpp/xml 0.6 +// Project: https://github.com/xmppjs/xmpp.js/tree/master/packages/xml +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +/// + +export = xml; + +import * as ltx from 'ltx'; +import * as escape from 'ltx/lib/escape'; +import { EventEmitter } from 'events'; + +declare function xml( + name: string, + attrs?: string | { [key: string]: any }, + ...children: xml.ElementChild[] +): xml.Element; + +declare namespace xml { + function x( + name: string, + attrs?: string | { [key: string]: any }, + ...children: ElementChild[] + ): Element; + + const escapeXML: typeof escape.escapeXML; + const unescapeXML: typeof escape.unescapeXML; + const escapeXMLText: typeof escape.escapeXMLText; + const unescapeXMLText: typeof escape.unescapeXMLText; + + class Element extends ltx.Element { + attrs: { [key: string]: any }; + append(nodes: ElementChild): Element; + prepend(nodes: ElementChild): Element; + } + type ElementChild = Element | Element[] | string | number | boolean; + + class Parser extends EventEmitter { + readonly XMLError: typeof XMLError; + readonly parser: ltx.Parser; + root: Element | null; + cursor: Element | null; + + onStartElement(name: string, attrs?: string | { [attrName: string]: any }): void; + onEndElement(name: string): void; + onText(str: string): void; + write(data: Buffer): void; + end(data: Buffer): void; + } +} + +declare class XMLError extends Error { + readonly name: 'XMLError'; +} + +declare global { + namespace JSX { + interface IntrinsicElements { + [elemName: string]: any; + } + + type Element = xml.Element; + } +} diff --git a/types/xmpp__xml/tsconfig.json b/types/xmpp__xml/tsconfig.json new file mode 100644 index 0000000000..3fbf44dc71 --- /dev/null +++ b/types/xmpp__xml/tsconfig.json @@ -0,0 +1,30 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "paths": { + "@xmpp/xml": [ + "xmpp__xml" + ] + }, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "jsx": "preserve" + }, + "files": [ + "index.d.ts", + "xmpp__xml-tests.ts", + "xmpp__xml-tests.tsx" + ] +} diff --git a/types/xmpp__xml/tslint.json b/types/xmpp__xml/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/xmpp__xml/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/xmpp__xml/xmpp__xml-tests.ts b/types/xmpp__xml/xmpp__xml-tests.ts new file mode 100644 index 0000000000..84820feaaa --- /dev/null +++ b/types/xmpp__xml/xmpp__xml-tests.ts @@ -0,0 +1,46 @@ +import xml = require('@xmpp/xml'); + +xml.escapeXML(''); +xml.unescapeXML(''); +xml.escapeXMLText(''); +xml.unescapeXMLText(''); + +const parser = new xml.Parser(); +parser.onStartElement('el'); +parser.onEndElement('el'); +parser.onText('text'); +parser.write((null as any) as Buffer); +parser.end((null as any) as Buffer); + +const recipient = 'user@example.com'; +const days = ['Monday', 'Tuesday']; +const message = xml( + 'message', + { to: recipient }, + xml('body', {}, 1 + 2), + xml('days', days.map(day => xml('day', {}, day))) +); +xml.x( + 'message', + { to: recipient }, + xml('body', {}, 1 + 2), + xml('days', days.map(day => xml('day', {}, day))) +); + +message.attrs; +message.getChild('body')!.text(); +message.getChild('body')!.toString(); +message.getChild('days')!.getChildren('day'); +message.getChildText('body'); + +message.attrs.type = 'chat'; +Object.assign(message.attrs, { type: 'chat' }); +message.getChild('body')!.text('Hello world'); +message.append(xml('foo')); +message.append('bar'); +message.append(days.map(day => xml('day', {}, day))); +message.prepend(xml('foo')); +message.prepend('bar'); +message.prepend(days.map(day => xml('day', {}, day))); +const body = message.getChild('body'); +message.remove(body!); diff --git a/types/xmpp__xml/xmpp__xml-tests.tsx b/types/xmpp__xml/xmpp__xml-tests.tsx new file mode 100644 index 0000000000..010cc43f2a --- /dev/null +++ b/types/xmpp__xml/xmpp__xml-tests.tsx @@ -0,0 +1,26 @@ +/** @jsx xml */ + +import xml = require('@xmpp/xml'); + +const recipient = 'user@example.com'; +const days = ['Monday', 'Tuesday']; +const message = ( + + {1 + 2} + + {days.map(day => ( + ${day} + ))} + + +); + +// write +message.append( + + {JSON.stringify(days)} + +); + +// read +JSON.parse(message.getChild('myevent', 'xmpp:example.org')!.getChildText('json', 'urn:xmpp:json:0')!); From 138fc3747c5eca96c27fae8ded65640d83979fa7 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sun, 2 Dec 2018 22:36:19 +0100 Subject: [PATCH 384/608] Add types for web-resource-inliner --- types/web-resource-inliner/index.d.ts | 129 ++++++++++++++++++ types/web-resource-inliner/tsconfig.json | 23 ++++ types/web-resource-inliner/tslint.json | 1 + .../web-resource-inliner-tests.ts | 49 +++++++ 4 files changed, 202 insertions(+) create mode 100644 types/web-resource-inliner/index.d.ts create mode 100644 types/web-resource-inliner/tsconfig.json create mode 100644 types/web-resource-inliner/tslint.json create mode 100644 types/web-resource-inliner/web-resource-inliner-tests.ts diff --git a/types/web-resource-inliner/index.d.ts b/types/web-resource-inliner/index.d.ts new file mode 100644 index 0000000000..009f3a5dda --- /dev/null +++ b/types/web-resource-inliner/index.d.ts @@ -0,0 +1,129 @@ +// Type definitions for web-resource-inliner 4.2 +// Project: https://github.com/jrit/web-resource-inliner#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +import { CoreOptions, RequiredUriUrl } from 'request'; + +export function html(options: Options, callback: Callback): string; +export function css(options: Options, callback: Callback): string; + +export type Callback = (error: any, result: any) => void; + +export interface Options { + /** + * This is the HTML or CSS content to be inlined, you should provide HTML to the html() method and CSS to the css() method or you will get errors or garbage output. + */ + fileContent: string; + /** + * Sets the attribute that is used to include/exclude specific resources based on the default behavior for the resource type. + * + * For example, if scripts is set to false, an individual script can be inlined by adding the attribute to the script tag like . + * On the other hand, if images are set to be inlined by default, + * a specific image can be excluded by adding -ignore to the end of the inlineAttribute like . + * + * In CSS, a comment is required at the end of the line to perform the same thing, such as \/*data-inline*\/ or \/*data-inline-ignore*\/. + * + * @default "data-inline" + */ + inlineAttribute?: string; + /** + * When true, inline images unless they have an exclusion attribute (see inlineAttribute option). + * + * When false, exclude images unless they have an inclusion attribute (see inlineAttribute option). + * + * When a number, inline images only when the base64 content size is less than the number of KBs. + * + * For example, the default is to only inline images less than 8KB. + * + * @default 8 + */ + images?: boolean | number; + /** + * When true, inline SVG unless they have an exclusion attribute (see inlineAttribute option). + * + * When false, exclude SVG unless they have an inclusion attribute (see inlineAttribute option). + * + * When a number, inline SVG only when the content size is less than the number of KBs. + * + * For example, the default is to only inline SVGs less than 8KB. + * + * @default 8 + */ + svgs?: boolean | number; + /** + * When true, inline scripts unless they have an exclusion attribute (see inlineAttribute option). + * + * When false, exclude scripts unless they have an inclusion attribute (see inlineAttribute option). + * + * When a number, inline scripts only when the base64 content size is less than the number of KBs. + * + * @default true + */ + scripts?: boolean | number; + /** + * When true, inline stylesheet links unless they have an exclusion attribute (see inlineAttribute option). + * + * When false, exclude stylesheet links unless they have an inclusion attribute (see inlineAttribute option). + * + * When a number, inline stylesheet links only when the base64 content size is less than the number of KBs. + * + * @default true + */ + links?: boolean | number; + /** + * Describes the path relationship between where web-resource-inliner is running and what the relative paths in fileContent or href/src urls refer to. + * + * For example, the tests cases in this package are in test/cases/ so their relative paths start by referring to that folder, + * but the root of this project and where npm test runs from is 2 folders up, so relativeTo is set to test/cases/ in test/spec.js. + * Likewise, with href="content.css" and a relativeTo of http://github.com/ the resource retrieved would be http://github.com/content.css. + * + * @default "" + */ + relativeTo?: string; + /** + * Describes the path relationship between CSS content and the context it will be loaded in. + * + * For example, when a CSS file contains url(some-file.png) and the file is moved from a location in a folder like /css to / + * then the path to the image needs to be changed to url(css/some-file.png). + * In this case, rebaseRelativeTo would be css. You probably don't want to set this when you are using html(). + * + * @default "" + */ + rebaseRelativeTo?: string; + /** + * When strict is true, a missing resource will cause the inliner to halt and return an error in the callback. + * + * The default behavior is to log a warning to the console and continue inlining with the available resources, which is more similar to how a web page behaves. + * + * @default false + */ + strict?: boolean; + /** + * Allows to adjust issued requests. + * + * E.g., add authentication tokens to requested URLs. + * + * The function is called with the request options object as its parameter. + * + * It can modify this object or return a new one. + * + * See the [list of available options](https://www.npmjs.com/package/request#request-options-callback). + */ + requestTransform?: ( + requestOptions: RequiredUriUrl & CoreOptions + ) => RequiredUriUrl & CoreOptions; + /** + * Allows to make changes to scripts before they are inlined, such as minifying. + * + * Callback is standard node error first, second argument is transformed value. + */ + scriptTransform?: (content: string, done: Callback) => any; + /** + * Allows to make changes to links before they are inlined, such as CSS pre-and-post-processors. + * + * Callback is standard node error first, second argument is transformed value. + */ + linkTransform?: (content: string, done: Callback) => any; +} diff --git a/types/web-resource-inliner/tsconfig.json b/types/web-resource-inliner/tsconfig.json new file mode 100644 index 0000000000..cdfd6e6a41 --- /dev/null +++ b/types/web-resource-inliner/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "web-resource-inliner-tests.ts" + ] +} diff --git a/types/web-resource-inliner/tslint.json b/types/web-resource-inliner/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/web-resource-inliner/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/web-resource-inliner/web-resource-inliner-tests.ts b/types/web-resource-inliner/web-resource-inliner-tests.ts new file mode 100644 index 0000000000..a0410e151f --- /dev/null +++ b/types/web-resource-inliner/web-resource-inliner-tests.ts @@ -0,0 +1,49 @@ +import { html, css } from 'web-resource-inliner'; + +const fileContent = '

some content

'; +const cb = (error: any, result: any) => null; + +html({ fileContent }, cb); +html({ fileContent, inlineAttribute: 'foo' }, cb); +html({ fileContent, images: true }, cb); +html({ fileContent, images: 8 }, cb); +html({ fileContent, svgs: true }, cb); +html({ fileContent, svgs: 8 }, cb); +html({ fileContent, scripts: true }, cb); +html({ fileContent, scripts: 8 }, cb); +html({ fileContent, links: true }, cb); +html({ fileContent, links: 8 }, cb); +html({ fileContent, relativeTo: 'http://foo.bar' }, cb); +html({ fileContent, rebaseRelativeTo: 'css' }, cb); +html({ fileContent, strict: true }, cb); +html( + { + fileContent, + requestTransform(options) { + // $ExpectType (UriOptions & CoreOptions) | (UrlOptions & CoreOptions) + options; + return options; + }, + }, + cb +); +html( + { + fileContent, + scriptTransform(content, done) { + done(null, content); + }, + }, + cb +); +html( + { + fileContent, + linkTransform(content, done) { + done(null, content); + }, + }, + cb +); + +css({ fileContent }, cb); From 321271c1c3e0337fe42005e8e0425ad69664f77c Mon Sep 17 00:00:00 2001 From: Daniel Rose Date: Wed, 5 Dec 2018 09:21:57 +0100 Subject: [PATCH 385/608] Use standard dtslint settings. --- types/fleximap/index.d.ts | 2 +- types/fleximap/tslint.json | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/types/fleximap/index.d.ts b/types/fleximap/index.d.ts index 9bce180c66..8481134ffe 100644 --- a/types/fleximap/index.d.ts +++ b/types/fleximap/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for fleximap 0.9.10 +// Type definitions for fleximap 0.9 // Project: https://github.com/SocketCluster/fleximap // Definitions by: Daniel Rose // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped diff --git a/types/fleximap/tslint.json b/types/fleximap/tslint.json index 65c83fb1e3..f93cf8562a 100644 --- a/types/fleximap/tslint.json +++ b/types/fleximap/tslint.json @@ -1,6 +1,3 @@ { - "extends": "dtslint/dt.json", - "rules": { - "dt-header": false - } + "extends": "dtslint/dt.json" } From e7b92554e7ca0731739069c8c02e43bfb2279ddd Mon Sep 17 00:00:00 2001 From: Junyoung Choi Date: Wed, 5 Dec 2018 17:27:19 +0900 Subject: [PATCH 386/608] Add me to contributors :smile: --- types/unist/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/unist/index.d.ts b/types/unist/index.d.ts index a7f6cc639d..2d7d37e17f 100644 --- a/types/unist/index.d.ts +++ b/types/unist/index.d.ts @@ -4,6 +4,7 @@ // Jun Lu // Hernan Rajchert // Titus Wormer +// Junyoung Choi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 3.0 From f3ba892a8346f8d5b2c69206d7eb195dbdc216da Mon Sep 17 00:00:00 2001 From: Junyoung Choi Date: Wed, 5 Dec 2018 18:06:30 +0900 Subject: [PATCH 387/608] Add unist-util-is --- types/unist-util-is/index.d.ts | 36 ++++++++++++++++++++++ types/unist-util-is/tsconfig.json | 23 ++++++++++++++ types/unist-util-is/tslint.json | 1 + types/unist-util-is/unist-util-is-tests.ts | 34 ++++++++++++++++++++ 4 files changed, 94 insertions(+) create mode 100644 types/unist-util-is/index.d.ts create mode 100644 types/unist-util-is/tsconfig.json create mode 100644 types/unist-util-is/tslint.json create mode 100644 types/unist-util-is/unist-util-is-tests.ts diff --git a/types/unist-util-is/index.d.ts b/types/unist-util-is/index.d.ts new file mode 100644 index 0000000000..831b06f0e4 --- /dev/null +++ b/types/unist-util-is/index.d.ts @@ -0,0 +1,36 @@ +// Type definitions for unist-util-is 2.1 +// Project: https://github.com/syntax-tree/unist-util-is#readme +// Definitions by: Junyoung Choi +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.0 + +/// + +import * as Unist from 'unist'; + +declare namespace unistUtilIs { + /** + * @param node Node to test + * @param index Position of node in parent + * @param parent Parent of node + */ + type TestFunction = (this: C, node: unknown, index: number, parent: Unist.Parent) => boolean | void; + type Test = TestFunction | Partial | string | null; +} + +/** + * Unist utility to check if a node passes a test. + * + * @param test When not given, checks if `node` is a `Node`. + * When `string`, works like passing `function (node) {return node.type === test}`. + * When `array`, checks any one of the subtests pass. + * When `object`, checks that all keys in test are in node, and that they have (strictly) equal values + * @param node Node to check. `false` is returned + * @param index Position of `node` in `parent` + * @param parent Parent of `node` + * @param context Context object to invoke `test` with + * @returns Whether test passed and `node` is a `Node` (object with `type` set to non-empty `string`). + */ +declare function unistUtilIs(test: unistUtilIs.Test | Array>, node: unknown, index?: number, parent?: Unist.Parent, context?: any): boolean; + +export = unistUtilIs; diff --git a/types/unist-util-is/tsconfig.json b/types/unist-util-is/tsconfig.json new file mode 100644 index 0000000000..dbe499fef0 --- /dev/null +++ b/types/unist-util-is/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "unist-util-is-tests.ts" + ] +} diff --git a/types/unist-util-is/tslint.json b/types/unist-util-is/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/unist-util-is/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/unist-util-is/unist-util-is-tests.ts b/types/unist-util-is/unist-util-is-tests.ts new file mode 100644 index 0000000000..430d58746d --- /dev/null +++ b/types/unist-util-is/unist-util-is-tests.ts @@ -0,0 +1,34 @@ +import is = require('unist-util-is'); + +const node = {type: 'strong'}; +const parent = {type: 'paragraph', children: [node]}; + +function test(node: unknown, n: number) { + return n === 5; +} + +is(null, {children: []}); +is(null, node); +is('strong', node); +is('emphasis', node); + +is(node, node); +is({type: 'paragraph'}, parent); +is({type: 'strong'}, parent); + +is(test, node); +is(test, node, 4, parent); +is(test, node, 5, parent); + +interface TestContext { + some: string; +} +function testWithContext(this: TestContext, node: unknown) {} +is(testWithContext, node); + +const wrongTestFunc: is.TestFunction = (node: unknown, n: string) => {}; // $ExpectError + +interface OtherTestContext { + some: number; +} +is(testWithContext, node); // $ExpectError From 8a416301e43da9cdb89db2b7c1d17ac8c6389f24 Mon Sep 17 00:00:00 2001 From: Junyoung Choi Date: Wed, 5 Dec 2018 18:17:45 +0900 Subject: [PATCH 388/608] Make index and parent optional --- types/unist-util-is/index.d.ts | 2 +- types/unist-util-is/unist-util-is-tests.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/types/unist-util-is/index.d.ts b/types/unist-util-is/index.d.ts index 831b06f0e4..ae92217c6e 100644 --- a/types/unist-util-is/index.d.ts +++ b/types/unist-util-is/index.d.ts @@ -14,7 +14,7 @@ declare namespace unistUtilIs { * @param index Position of node in parent * @param parent Parent of node */ - type TestFunction = (this: C, node: unknown, index: number, parent: Unist.Parent) => boolean | void; + type TestFunction = (this: C, node: unknown, index?: number, parent?: Unist.Parent) => boolean | void; type Test = TestFunction | Partial | string | null; } diff --git a/types/unist-util-is/unist-util-is-tests.ts b/types/unist-util-is/unist-util-is-tests.ts index 430d58746d..4d355c90ec 100644 --- a/types/unist-util-is/unist-util-is-tests.ts +++ b/types/unist-util-is/unist-util-is-tests.ts @@ -3,7 +3,7 @@ import is = require('unist-util-is'); const node = {type: 'strong'}; const parent = {type: 'paragraph', children: [node]}; -function test(node: unknown, n: number) { +function test(node: unknown, n?: number) { return n === 5; } From b3ae835f65271d63ca326e287b419b6a2d08d234 Mon Sep 17 00:00:00 2001 From: arichter83 Date: Wed, 5 Dec 2018 10:44:07 +0100 Subject: [PATCH 389/608] Extended test case --- types/simpl-schema/index.d.ts | 13 ++++- types/simpl-schema/simpl-schema-tests.ts | 73 +++++++----------------- 2 files changed, 31 insertions(+), 55 deletions(-) diff --git a/types/simpl-schema/index.d.ts b/types/simpl-schema/index.d.ts index 32dd8d7b66..d5527b0697 100644 --- a/types/simpl-schema/index.d.ts +++ b/types/simpl-schema/index.d.ts @@ -50,11 +50,20 @@ interface CleanOption { getAutoValues?: boolean; isModifier?: boolean; extendAutoValueContext?: boolean; + removeNullsFromArrays?: boolean; +} + +interface SimpleSchemaOptions { + check?: boolean; + clean?: CleanOption; + defaultLabel?: string; + humanizeAutoLabels?: boolean; + requiredByDefault?: boolean; + tracker?: any; } -// ??? interface SimpleSchemaStatic { - new(schema: {[key: string]: SchemaDefinition} | any[]): SimpleSchema; + new(schema: {[key: string]: SchemaDefinition} | any[], options?: SimpleSchemaOptions): SimpleSchema; namedContext(name?: string): SimpleSchemaValidationContextStatic; addValidator(validator: () => boolean): any; pick(...fields: string[]): SimpleSchemaStatic; diff --git a/types/simpl-schema/simpl-schema-tests.ts b/types/simpl-schema/simpl-schema-tests.ts index 3c40f0c4bb..49c166070d 100644 --- a/types/simpl-schema/simpl-schema-tests.ts +++ b/types/simpl-schema/simpl-schema-tests.ts @@ -34,63 +34,30 @@ StringSchema.validate({ regExpString: "id" }); - /* - , - title: { - type: String, - label: "Argument", - custom: function () { - var text = this.value; - text = text.replace(/https?:\/\/(www\.)?([-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6})\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/gi, '$2'); - - if(text.length > MAX_ARGUMENT_LENGTH) return { type: SimpleSchema.ErrorTypes.MAX_STRING, max: MAX_ARGUMENT_LENGTH } - else if(text.length < MIN_ARGUMENT_LENGTH) return { type: SimpleSchema.ErrorTypes.MIN_STRING, min: MIN_ARGUMENT_LENGTH } - } +const StringSchemaWithOptions = new SimpleSchema({ + basicString: { + type: String }, - questionId: { - type: String, - regEx: SimpleSchema.RegEx.Id - }, - side: { - type: String, - allowedValues: ['pro', 'con'] + limitedString: { + type: String, + allowedValues: ['pro', 'con'] }, userId: { - type: String, - regEx: SimpleSchema.RegEx.Id + type: String, + regEx: SimpleSchema.RegEx.Id }, createdAt: { - type: Date, - autoValue: () => new Date(), + type: Date, + autoValue: () => new Date(), }, - clapCount: { - type: SimpleSchema.Integer, - defaultValue: 0 - }, - highlight: { - type: Array, - optional: true - }, - 'highlight.$': { - type: Object - }, - 'highlight.$.start': SimpleSchema.Integer, - 'highlight.$.end': SimpleSchema.Integer, - 'highlight.$.text': { - type: String, - trim: false +}, +{ + clean: { + filter: true, + autoConvert: true, + removeEmptyStrings: true, + trimStrings: true, + getAutoValues: true, + removeNullsFromArrays: true, } - */ - /* - , - { - clean: { - filter: true, - autoConvert: true, - removeEmptyStrings: true, - trimStrings: true, - getAutoValues: true, - removeNullsFromArrays: true, - } - } - */ +}); From 334c888710c049fcef0a362b3993e24fb3cffd36 Mon Sep 17 00:00:00 2001 From: Jonas Kugelmann Date: Wed, 5 Dec 2018 11:09:31 +0100 Subject: [PATCH 390/608] Made StepProps augmentable according to docs --- types/react-albus/index.d.ts | 13 ++++++++++++- types/react-albus/react-albus-tests.tsx | 8 ++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/types/react-albus/index.d.ts b/types/react-albus/index.d.ts index be546011d4..371a50cca7 100644 --- a/types/react-albus/index.d.ts +++ b/types/react-albus/index.d.ts @@ -47,8 +47,19 @@ export interface StepsProps { export const Steps: React.ComponentType; -export type StepProps = { id: string } & ( +export type StepProps = WizardStepObject & ( | { render?: (wizard: WizardContext) => React.ReactNode } | { children: (wizard: WizardContext) => React.ReactNode }); +/** + * In addition to id, any additional props added to will be available on each step object. + * This can be used to add names, descriptions, or other metadata to each step. + * To use this feature generally you need to augment the WizardStepObject + * @example + * declare module "react-albus" { + * interface WizardStepObject { + * propName: string; + * } + * } + */ export const Step: React.ComponentType; diff --git a/types/react-albus/react-albus-tests.tsx b/types/react-albus/react-albus-tests.tsx index 2f31733b1d..f03e57cc2e 100644 --- a/types/react-albus/react-albus-tests.tsx +++ b/types/react-albus/react-albus-tests.tsx @@ -1,6 +1,12 @@ import * as React from "react"; import { Wizard, Step, Steps, withWizard } from "react-albus"; +declare module "react-albus" { + interface WizardStepObject { + quote?: string; + } +} + const Example = () => ( ( (

Merlin

@@ -28,6 +35,7 @@ const Example = () => ( /> (

Gandalf

From 250e3e9de236d4c4d74a8c3ce5f08aff00b13f60 Mon Sep 17 00:00:00 2001 From: arichter83 Date: Wed, 5 Dec 2018 12:31:05 +0100 Subject: [PATCH 391/608] Further test cases, short hand support --- types/simpl-schema/index.d.ts | 15 ++++++++++++++- types/simpl-schema/simpl-schema-tests.ts | 13 +++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/types/simpl-schema/index.d.ts b/types/simpl-schema/index.d.ts index d5527b0697..1317b50d45 100644 --- a/types/simpl-schema/index.d.ts +++ b/types/simpl-schema/index.d.ts @@ -4,6 +4,8 @@ // Qkramer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +declare module 'simpl-schema' { + export class ValidationContext { constructor(ss: any); addValidationErrors(errors: any): void; @@ -63,7 +65,16 @@ interface SimpleSchemaOptions { } interface SimpleSchemaStatic { - new(schema: {[key: string]: SchemaDefinition} | any[], options?: SimpleSchemaOptions): SimpleSchema; + new( + schema: { + [key: string]: SchemaDefinition + | BooleanConstructor | StringConstructor | NumberConstructor | DateConstructor + | ArrayConstructor + | string | RegExp + | SimpleSchema + } | any[], + options?: SimpleSchemaOptions + ): SimpleSchema; namedContext(name?: string): SimpleSchemaValidationContextStatic; addValidator(validator: () => boolean): any; pick(...fields: string[]): SimpleSchemaStatic; @@ -202,3 +213,5 @@ export interface MongoObject { } export default SimpleSchema; + +} diff --git a/types/simpl-schema/simpl-schema-tests.ts b/types/simpl-schema/simpl-schema-tests.ts index 49c166070d..50181c373f 100644 --- a/types/simpl-schema/simpl-schema-tests.ts +++ b/types/simpl-schema/simpl-schema-tests.ts @@ -42,6 +42,9 @@ const StringSchemaWithOptions = new SimpleSchema({ type: String, allowedValues: ['pro', 'con'] }, + subschema: { + type: StringSchema + }, userId: { type: String, regEx: SimpleSchema.RegEx.Id @@ -61,3 +64,13 @@ const StringSchemaWithOptions = new SimpleSchema({ removeNullsFromArrays: true, } }); + +new SimpleSchema({ + shortBoolean: Boolean, + shortString: String, + shortNumber: Number, + shortInteger: SimpleSchema.Integer, + shortDate: Date, + shortArray: Array, + subSchema: StringSchemaWithOptions +}); From 84f45b6af38fa445a3fcf6099121e7e253fb69c2 Mon Sep 17 00:00:00 2001 From: pawkrol Date: Wed, 5 Dec 2018 12:59:45 +0100 Subject: [PATCH 392/608] Fix tests --- types/mathjs/index.d.ts | 7 ++++++- types/mathjs/mathjs-tests.ts | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/types/mathjs/index.d.ts b/types/mathjs/index.d.ts index 7917ce417e..e335421701 100644 --- a/types/mathjs/index.d.ts +++ b/types/mathjs/index.d.ts @@ -2578,7 +2578,8 @@ declare namespace math { * @param object An object with functions to be imported. * @param options An object with import options. */ - import(object: object | Array, options: ImportOptions); + import(object: ImportObject | ImportObject[], options: ImportOptions): void; + // TypeScript Version: 2.4 /** * It may not exists - this is _only_ for import functionality. @@ -4561,4 +4562,8 @@ declare namespace math { silent?: boolean; wrap?: boolean; } + + interface ImportObject { + [key: string]: any; + } } diff --git a/types/mathjs/mathjs-tests.ts b/types/mathjs/mathjs-tests.ts index babfa3ff37..c5eadb82a5 100644 --- a/types/mathjs/mathjs-tests.ts +++ b/types/mathjs/mathjs-tests.ts @@ -392,3 +392,21 @@ JSON serialization/deserialization const parsed = JSON.parse(stringified, math.json.reviver); parsed.bigNumber === math.bignumber('1.5'); // true } + +/* +Extend functionality with import + */ +{ + const testFun = function() { + return 5; + }; + + math.import({ + testFun, + value: 10 + }, {}); + + math.testFun(); + + const a = math.value * 2; +} From 237b96f0783ee45dc9d82d3b121e1f01e59c7aab Mon Sep 17 00:00:00 2001 From: arichter83 Date: Wed, 5 Dec 2018 13:11:30 +0100 Subject: [PATCH 393/608] Fixes validate(..., {keys: []}) with keys selection --- types/simpl-schema/index.d.ts | 17 ++--------------- types/simpl-schema/simpl-schema-tests.ts | 2 +- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/types/simpl-schema/index.d.ts b/types/simpl-schema/index.d.ts index 1317b50d45..b3445ed2d3 100644 --- a/types/simpl-schema/index.d.ts +++ b/types/simpl-schema/index.d.ts @@ -5,7 +5,6 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare module 'simpl-schema' { - export class ValidationContext { constructor(ss: any); addValidationErrors(errors: any): void; @@ -133,6 +132,7 @@ interface ValidationOption { clean?: boolean; filter?: boolean; upsertextendedCustomContext?: boolean; + keys?: string[]; } interface SimpleSchemaValidationContextStaticKeys { @@ -188,24 +188,12 @@ export const SimpleSchema: SimpleSchemaStatic; export const SimpleSchemaValidationContext: SimpleSchemaValidationContextStatic; export const MongoObject: MongoObjectStatic; -export interface SimpleSchema { +export interface SimpleSchema extends SimpleSchemaStatic { debug: boolean; validate(obj: any, options?: ValidationOption): void; addValidator(validator: () => boolean): any; extendOptions(options: {[key: string]: any}): void; messages(messages: any): void; - RegEx: { - Email: RegExp; - Domain: RegExp; - WeakDomain: RegExp; - IP: RegExp; - IPv4: RegExp; - IPv6: RegExp; - Url: RegExp; - Id: RegExp; - ZipCode: RegExp; - Phone: RegExp; - }; } export interface MongoObject { @@ -213,5 +201,4 @@ export interface MongoObject { } export default SimpleSchema; - } diff --git a/types/simpl-schema/simpl-schema-tests.ts b/types/simpl-schema/simpl-schema-tests.ts index 50181c373f..6373107aa3 100644 --- a/types/simpl-schema/simpl-schema-tests.ts +++ b/types/simpl-schema/simpl-schema-tests.ts @@ -32,7 +32,7 @@ StringSchema.validate({ basicString: "Test", limitedString: "pro", regExpString: "id" -}); +}, {keys: ['basicString']}); const StringSchemaWithOptions = new SimpleSchema({ basicString: { From b725a1d28c75f0d59a76f4abe6da95e695a55977 Mon Sep 17 00:00:00 2001 From: Lukas Schmidt Date: Wed, 5 Dec 2018 13:37:16 +0100 Subject: [PATCH 394/608] iframe-resizer: declare namespace --- types/iframe-resizer/iframe-resizer-tests.ts | 8 +- types/iframe-resizer/index.d.ts | 580 ++++++++++--------- 2 files changed, 314 insertions(+), 274 deletions(-) diff --git a/types/iframe-resizer/iframe-resizer-tests.ts b/types/iframe-resizer/iframe-resizer-tests.ts index 1efe701f9a..2f459c16a7 100644 --- a/types/iframe-resizer/iframe-resizer-tests.ts +++ b/types/iframe-resizer/iframe-resizer-tests.ts @@ -1,9 +1,9 @@ -import iframeResizer, { IFrameComponent, IFrameOptions } from "iframe-resizer"; +import iframeResizer = require("iframe-resizer"); function testOne(): void { const iframe: HTMLIFrameElement = document.createElement('iframe'); - const options: IFrameOptions = {log: true}; - const components: IFrameComponent[] = iframeResizer(options, iframe); + const options: iframeResizer.IFrameOptions = {log: true}; + const components: iframeResizer.IFrameComponent[] = iframeResizer(options, iframe); if (components) { components.forEach(component => console.log(component.iFrameResizer)); } else { @@ -13,7 +13,7 @@ function testOne(): void { function testTwo(): void { const iframe: HTMLIFrameElement = document.createElement('iframe'); - const components: IFrameComponent[] = iframeResizer({ + const components: iframeResizer.IFrameComponent[] = iframeResizer({ initCallback: () => { console.log('Init'); }, diff --git a/types/iframe-resizer/index.d.ts b/types/iframe-resizer/index.d.ts index 920c80b3a7..5f3cb19c7d 100644 --- a/types/iframe-resizer/index.d.ts +++ b/types/iframe-resizer/index.d.ts @@ -3,275 +3,315 @@ // Definitions by: Armin Baljic // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// tslint:disable-next-line:interface-name -export interface IFrameObject { - close(): void; - moveToAnchor(anchor: string): void; - resize(): void; - sendMessage(message: any, targetOrigin?: string): void; +declare namespace iframeResizer { + // tslint:disable-next-line:interface-name + interface IFrameObject { + close(): void; + + moveToAnchor(anchor: string): void; + + resize(): void; + + sendMessage( + message: any, + targetOrigin?: string + ): void; + } + + // tslint:disable-next-line:interface-name + interface IFrameComponent extends HTMLIFrameElement { + iFrameResizer: IFrameObject; + } + + // tslint:disable-next-line:interface-name + interface IFrameOptions { + /** + * When enabled changes to the Window size or the DOM will cause the iFrame to resize to the new content size. + * Disable if using size method with custom dimensions. + */ + autoResize?: boolean; + /** + * Override the body background style in the iFrame. + */ + bodyBackground?: string; + /** + * Override the default body margin style in the iFrame. A string can be any valid value for the + * CSS margin attribute, for example '8px 3em'. A number value is converted into px. + */ + bodyMargin?: number | string; + /** + * Override the default body padding style in the iFrame. A string can be any valid value for the + * CSS margin attribute, for example '8px 3em'. A number value is converted into px. + */ + bodyPadding?: number | string; + /** + * When set to true, only allow incoming messages from the domain listed in the src property of the iFrame tag. + * If your iFrame navigates between different domains, ports or protocols; then you will need to + * provide an array of URLs or disable this option. + */ + checkOrigin?: boolean | string[]; + /** + * When enabled in page linking inside the iFrame and from the iFrame to the parent page will be enabled. + */ + inPageLinks?: boolean; + /** + * Height calculation method. + */ + heightCalculationMethod?: HeightCalculationMethod; + /** + * Set iFrame Id + */ + id?: string; + /** + * In browsers that don't support mutationObserver, such as IE10, the library falls back to using + * setInterval, to check for changes to the page size. + */ + interval?: number; + /** + * Setting the log option to true will make the scripts in both the host page and the iFrame output + * everything they do to the JavaScript console so you can see the communication between the two scripts. + */ + log?: boolean; + /** + * Set maximum height of iFrame. + */ + maxHeight?: number; + /** + * Set maximum width of iFrame. + */ + maxWidth?: number; + /** + * Set minimum height of iFrame. + */ + minHeight?: number; + /** + * Set minimum width of iFrame. + */ + minWidth?: number; + /** + * Listen for resize events from the parent page, or the iFrame. Select the 'child' value if the iFrame + * can be resized independently of the browser window. Selecting this value can cause issues with some + * height calculation methods on mobile devices. + */ + resizeFrom?: 'parent' | 'child'; + /** + * Enable scroll bars in iFrame. + */ + scrolling?: boolean | 'auto'; + /** + * Resize iFrame to content height. + */ + sizeHeight?: boolean; + /** + * Resize iFrame to content width. + */ + sizeWidth?: boolean; + /** + * Set the number of pixels the iFrame content size has to change by, before triggering a resize of the iFrame. + */ + tolerance?: number; + /** + * Width calculation method. + */ + widthCalculationMethod?: WidthCalculationMethod; + + /** + * Called when iFrame is closed via parentIFrame.close() or iframe.iframeResizer.close() methods. + */ + closedCallback?(iframeId: string): void; + + /** + * Initial setup callback function. + */ + initCallback?(iframe: IFrameComponent): void; + + /** + * Receive message posted from iFrame with the parentIFrame.sendMessage() method. + */ + messageCallback?(data: IFrameMessageData): void; + + /** + * Function called after iFrame resized. Passes in messageData object containing the iFrame, height, width + * and the type of event that triggered the iFrame to resize. + */ + resizedCallback?(data: IFrameResizedData): void; + + /** + * Called before the page is repositioned after a request from the iFrame, due to either an in page link, + * or a direct request from either parentIFrame.scrollTo() or parentIFrame.scrollToOffset(). + * If this callback function returns false, it will stop the library from repositioning the page, so that + * you can implement your own animated page scrolling instead. + */ + scrollCallback?(data: IFrameScrollData): boolean; + } + + // tslint:disable-next-line:interface-name + interface IFramePageOptions { + /** + * This option allows you to restrict the domain of the parent page, + * to prevent other sites mimicking your parent page. + */ + targetOrigin?: string; + + /** + * Receive message posted from the parent page with the iframe.iFrameResizer.sendMessage() method. + */ + messageCallback?(message: any): void; + + /** + * This function is called once iFrame-Resizer has been initialized after receiving a call from the parent page. + */ + readyCallback?(): void; + + /** + * These option can be used to override the option set in the parent page + */ + heightCalculationMethod?: HeightCalculationMethod | (() => number); + /** + * These option can be used to override the option set in the parent page + */ + widthCalculationMethod?: WidthCalculationMethod | (() => number); + } + + type HeightCalculationMethod = 'bodyOffset' | 'bodyScroll' | 'documentElementOffset' | 'documentElementScroll' | + 'max' | 'min' | 'grow' | 'lowestElement' | 'taggedElement'; + + type WidthCalculationMethod = 'bodyOffset' | 'bodyScroll' | 'documentElementOffset' | 'documentElementScroll' | + 'max' | 'min' | 'scroll' | 'rightMostElement' | 'taggedElement'; + + // tslint:disable-next-line:interface-name + interface IFramePage { + /** + * Turn autoResizing of the iFrame on and off. Returns bool of current state. + */ + autoResize(resize?: boolean): boolean; + + /** + * Remove the iFrame from the parent page. + */ + close(): void; + + /** + * Returns the ID of the iFrame that the page is contained in. + */ + getId(): string; + + /** + * Ask the containing page for its positioning coordinates. + * + * Your callback function will be recalled when the parent page is scrolled or resized. + * + * Pass false to disable the callback. + */ + getPageInfo(callback: ((data: PageInfo) => void) | false): void; + + /** + * Scroll the parent page to the coordinates x and y + */ + scrollTo( + x: number, + y: number + ): void; + + /** + * Scroll the parent page to the coordinates x and y relative to the position of the iFrame. + */ + scrollToOffset( + x: number, + y: number + ): void; + + /** + * Send data to the containing page, message can be any data type that can be serialized into JSON. The `targetOrigin` + * option is used to restrict where the message is sent to; to stop an attacker mimicking your parent page. + * See the MDN documentation on postMessage for more details. + */ + sendMessage( + message: any, + targetOrigin?: string + ): void; + + /** + * Change the method use to workout the height of the iFrame. + */ + setHeightCalculationMethod(method: HeightCalculationMethod): void; + + /** + * Change the method use to workout the width of the iFrame. + */ + setWidthCalculationMethod(method: WidthCalculationMethod): void; + + /** + * Set default target origin. + */ + setTargetOrigin(targetOrigin: string): void; + + /** + * Manually force iFrame to resize. To use passed arguments you need first to disable the `autoResize` option to + * prevent auto resizing and enable the `sizeWidth` option if you wish to set the width. + */ + size( + customHeight?: string, + customWidth?: string + ): void; + } + + interface PageInfo { + /** + * The height of the iframe in pixels + */ + iframeHeight: number; + /** + * The width of the iframe in pixels + */ + iframeWidth: number; + /** + * The height of the viewport in pixels + */ + clientHeight: number; + /** + * The width of the viewport in pixels + */ + clientWidth: number; + /** + * The number of pixels between the left edge of the containing page and the left edge of the iframe + */ + offsetLeft: number; + /** + * The number of pixels between the top edge of the containing page and the top edge of the iframe + */ + offsetTop: number; + /** + * The number of pixels between the left edge of the iframe and the left edge of the iframe viewport + */ + scrollLeft: number; + /** + * The number of pixels between the top edge of the iframe and the top edge of the iframe viewport + */ + scrollTop: number; + } + + // tslint:disable-next-line:interface-name + interface IFrameResizedData { + iframe: IFrameComponent; + height: number; + width: number; + type: string; + } + + // tslint:disable-next-line:interface-name + interface IFrameMessageData { + iframe: IFrameComponent; + message: any; + } + + // tslint:disable-next-line:interface-name + interface IFrameScrollData { + x: number; + y: number; + } } -// tslint:disable-next-line:interface-name -export interface IFrameComponent extends HTMLIFrameElement { - iFrameResizer: IFrameObject; -} - -// tslint:disable-next-line:interface-name -export interface IFrameOptions { - /** - * When enabled changes to the Window size or the DOM will cause the iFrame to resize to the new content size. - * Disable if using size method with custom dimensions. - */ - autoResize?: boolean; - /** - * Override the body background style in the iFrame. - */ - bodyBackground?: string; - /** - * Override the default body margin style in the iFrame. A string can be any valid value for the - * CSS margin attribute, for example '8px 3em'. A number value is converted into px. - */ - bodyMargin?: number | string; - /** - * Override the default body padding style in the iFrame. A string can be any valid value for the - * CSS margin attribute, for example '8px 3em'. A number value is converted into px. - */ - bodyPadding?: number | string; - /** - * When set to true, only allow incoming messages from the domain listed in the src property of the iFrame tag. - * If your iFrame navigates between different domains, ports or protocols; then you will need to - * provide an array of URLs or disable this option. - */ - checkOrigin?: boolean | string[]; - /** - * When enabled in page linking inside the iFrame and from the iFrame to the parent page will be enabled. - */ - inPageLinks?: boolean; - /** - * Height calculation method. - */ - heightCalculationMethod?: HeightCalculationMethod; - /** - * Set iFrame Id - */ - id?: string; - /** - * In browsers that don't support mutationObserver, such as IE10, the library falls back to using - * setInterval, to check for changes to the page size. - */ - interval?: number; - /** - * Setting the log option to true will make the scripts in both the host page and the iFrame output - * everything they do to the JavaScript console so you can see the communication between the two scripts. - */ - log?: boolean; - /** - * Set maximum height of iFrame. - */ - maxHeight?: number; - /** - * Set maximum width of iFrame. - */ - maxWidth?: number; - /** - * Set minimum height of iFrame. - */ - minHeight?: number; - /** - * Set minimum width of iFrame. - */ - minWidth?: number; - /** - * Listen for resize events from the parent page, or the iFrame. Select the 'child' value if the iFrame - * can be resized independently of the browser window. Selecting this value can cause issues with some - * height calculation methods on mobile devices. - */ - resizeFrom?: 'parent' | 'child'; - /** - * Enable scroll bars in iFrame. - */ - scrolling?: boolean | 'auto'; - /** - * Resize iFrame to content height. - */ - sizeHeight?: boolean; - /** - * Resize iFrame to content width. - */ - sizeWidth?: boolean; - /** - * Set the number of pixels the iFrame content size has to change by, before triggering a resize of the iFrame. - */ - tolerance?: number; - /** - * Width calculation method. - */ - widthCalculationMethod?: WidthCalculationMethod; - /** - * Called when iFrame is closed via parentIFrame.close() or iframe.iframeResizer.close() methods. - */ - closedCallback?(iframeId: string): void; - /** - * Initial setup callback function. - */ - initCallback?(iframe: IFrameComponent): void; - /** - * Receive message posted from iFrame with the parentIFrame.sendMessage() method. - */ - messageCallback?(data: IFrameMessageData): void; - /** - * Function called after iFrame resized. Passes in messageData object containing the iFrame, height, width - * and the type of event that triggered the iFrame to resize. - */ - resizedCallback?(data: IFrameResizedData): void; - /** - * Called before the page is repositioned after a request from the iFrame, due to either an in page link, - * or a direct request from either parentIFrame.scrollTo() or parentIFrame.scrollToOffset(). - * If this callback function returns false, it will stop the library from repositioning the page, so that - * you can implement your own animated page scrolling instead. - */ - scrollCallback?(data: IFrameScrollData): boolean; -} - -// tslint:disable-next-line:interface-name -export interface IFramePageOptions { - /** - * This option allows you to restrict the domain of the parent page, - * to prevent other sites mimicking your parent page. - */ - targetOrigin?: string; - /** - * Receive message posted from the parent page with the iframe.iFrameResizer.sendMessage() method. - */ - messageCallback?(message: any): void; - /** - * This function is called once iFrame-Resizer has been initialized after receiving a call from the parent page. - */ - readyCallback?(): void; - /** - * These option can be used to override the option set in the parent page - */ - heightCalculationMethod?: HeightCalculationMethod | (() => number); - /** - * These option can be used to override the option set in the parent page - */ - widthCalculationMethod?: WidthCalculationMethod | (() => number); -} - -export type HeightCalculationMethod = 'bodyOffset' | 'bodyScroll' | 'documentElementOffset' | 'documentElementScroll' | - 'max' | 'min' | 'grow' | 'lowestElement' | 'taggedElement'; - - export type WidthCalculationMethod = 'bodyOffset' | 'bodyScroll' | 'documentElementOffset' | 'documentElementScroll' | - 'max' | 'min' | 'scroll' | 'rightMostElement' | 'taggedElement'; - -// tslint:disable-next-line:interface-name -export interface IFramePage { - /** - * Turn autoResizing of the iFrame on and off. Returns bool of current state. - */ - autoResize(resize?: boolean): boolean; - /** - * Remove the iFrame from the parent page. - */ - close(): void; - /** - * Returns the ID of the iFrame that the page is contained in. - */ - getId(): string; - /** - * Ask the containing page for its positioning coordinates. - * - * Your callback function will be recalled when the parent page is scrolled or resized. - * - * Pass false to disable the callback. - */ - getPageInfo(callback: ((data: PageInfo) => void) | false): void; - /** - * Scroll the parent page to the coordinates x and y - */ - scrollTo(x: number, y: number): void; - /** - * Scroll the parent page to the coordinates x and y relative to the position of the iFrame. - */ - scrollToOffset(x: number, y: number): void; - /** - * Send data to the containing page, message can be any data type that can be serialized into JSON. The `targetOrigin` - * option is used to restrict where the message is sent to; to stop an attacker mimicking your parent page. - * See the MDN documentation on postMessage for more details. - */ - sendMessage(message: any, targetOrigin?: string): void; - /** - * Change the method use to workout the height of the iFrame. - */ - setHeightCalculationMethod(method: HeightCalculationMethod): void; - /** - * Change the method use to workout the width of the iFrame. - */ - setWidthCalculationMethod(method: WidthCalculationMethod): void; - /** - * Set default target origin. - */ - setTargetOrigin(targetOrigin: string): void; - /** - * Manually force iFrame to resize. To use passed arguments you need first to disable the `autoResize` option to - * prevent auto resizing and enable the `sizeWidth` option if you wish to set the width. - */ - size(customHeight?: string, customWidth?: string): void; -} - -export interface PageInfo { - /** - * The height of the iframe in pixels - */ - iframeHeight: number; - /** - * The width of the iframe in pixels - */ - iframeWidth: number; - /** - * The height of the viewport in pixels - */ - clientHeight: number; - /** - * The width of the viewport in pixels - */ - clientWidth: number; - /** - * The number of pixels between the left edge of the containing page and the left edge of the iframe - */ - offsetLeft: number; - /** - * The number of pixels between the top edge of the containing page and the top edge of the iframe - */ - offsetTop: number; - /** - * The number of pixels between the left edge of the iframe and the left edge of the iframe viewport - */ - scrollLeft: number; - /** - * The number of pixels between the top edge of the iframe and the top edge of the iframe viewport - */ - scrollTop: number; -} - -// tslint:disable-next-line:interface-name -export interface IFrameResizedData { - iframe: IFrameComponent; - height: number; - width: number; - type: string; -} - -// tslint:disable-next-line:interface-name -export interface IFrameMessageData { - iframe: IFrameComponent; - message: any; -} - -// tslint:disable-next-line:interface-name -export interface IFrameScrollData { - x: number; - y: number; -} - -export default function iframeResizer(options: IFrameOptions, target: string | HTMLElement): IFrameComponent[]; +declare function iframeResizer(options: iframeResizer.IFrameOptions, target: string | HTMLElement): iframeResizer.IFrameComponent[]; +export = iframeResizer; +export as namespace iframeResizer; From 2837928c08099a1a520fd27bb26ab0bb6bdee711 Mon Sep 17 00:00:00 2001 From: arichter83 Date: Wed, 5 Dec 2018 13:59:13 +0100 Subject: [PATCH 395/608] Worked on ValidationContext --- types/simpl-schema/index.d.ts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/types/simpl-schema/index.d.ts b/types/simpl-schema/index.d.ts index b3445ed2d3..54d0a5665d 100644 --- a/types/simpl-schema/index.d.ts +++ b/types/simpl-schema/index.d.ts @@ -4,18 +4,13 @@ // Qkramer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare module 'simpl-schema' { -export class ValidationContext { - constructor(ss: any); +export interface ValidationContext extends SimpleSchemaValidationContextStatic { + // constructor(ss: any); addValidationErrors(errors: any): void; clean(...args: any[]): any; getErrorForKey(key: any, ...args: any[]): any; - isValid(): any; - keyErrorMessage(key: any, ...args: any[]): any; - keyIsInvalid(key: any, ...args: any[]): any; reset(): void; setValidationErrors(errors: any): void; - validate(obj: any, ...args: any[]): any; validationErrors(): any; } @@ -88,7 +83,7 @@ interface SimpleSchemaStatic { messages(messages: any): any; messageForError(type: any, key: any, def: any, value: any): string; allowsKey(key: any): string; - newContext(): SimpleSchemaValidationContextStatic; + newContext(): ValidationContext; objectKeys(keyPrefix: any): any[]; validate(obj: any, options?: ValidationOption): void; validator(options: ValidationOption): () => boolean; @@ -201,4 +196,3 @@ export interface MongoObject { } export default SimpleSchema; -} From d595e11e17d9fef0f90b531be473942a544c42d6 Mon Sep 17 00:00:00 2001 From: Hanna Date: Wed, 5 Dec 2018 14:07:26 +0100 Subject: [PATCH 396/608] Fix incorrect method name --- types/slate/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/slate/index.d.ts b/types/slate/index.d.ts index a8ed67d541..8c20d89cdd 100644 --- a/types/slate/index.d.ts +++ b/types/slate/index.d.ts @@ -319,7 +319,7 @@ export class Text extends Immutable.Record({}) { addMark(index: number, length: number, mark: Mark): Text; addMarks(index: number, lenght: number, marks: Immutable.Set): Text; getLeaves(decorations?: Range[]): Immutable.List; - getActiveMarksBetweenOffset( + getActiveMarksBetweenOffsets( startOffset: number, endOffset: number ): Immutable.Set; From b73032965927680102116ccb597ea89f80836372 Mon Sep 17 00:00:00 2001 From: Hanna Date: Wed, 5 Dec 2018 14:10:22 +0100 Subject: [PATCH 397/608] Fix my name Might as well while Im here --- types/slate/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/slate/index.d.ts b/types/slate/index.d.ts index 8c20d89cdd..9494aef1c0 100644 --- a/types/slate/index.d.ts +++ b/types/slate/index.d.ts @@ -7,7 +7,7 @@ // Kalley Powell // Francesco Agnoletto // Irwan Fario Subastian -// Sebastian Greaves +// Hanna Greaves // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 import * as Immutable from "immutable"; From d5106d2476ef23245b736d3cee33886dd1af43db Mon Sep 17 00:00:00 2001 From: Silas Rech Date: Wed, 5 Dec 2018 15:31:15 +0100 Subject: [PATCH 398/608] =?UTF-8?q?[sass]=20add=20missing=20=E2=80=98forma?= =?UTF-8?q?tted=E2=80=99=20property?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/sass/dart-sass/blob/f914c390676b97fc8de86a24072e0112095dd4ce/lib/src/node.dart#L384 --- types/sass/index.d.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/types/sass/index.d.ts b/types/sass/index.d.ts index 0131836143..bd416d9718 100644 --- a/types/sass/index.d.ts +++ b/types/sass/index.d.ts @@ -136,6 +136,11 @@ export interface SassException extends Error { */ message: string; + /** + * The formatted error. + */ + formatted: string; + /** * The line number of error. */ From b4cc8ebfabdeea13b386a57e34e641867fd99dd9 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Wed, 5 Dec 2018 15:25:22 +0100 Subject: [PATCH 399/608] Fix toobusy-js types, add docs --- types/toobusy-js/index.d.ts | 55 ++++++++++++++++++++++++++-- types/toobusy-js/toobusy-js-tests.ts | 18 ++++++--- 2 files changed, 64 insertions(+), 9 deletions(-) diff --git a/types/toobusy-js/index.d.ts b/types/toobusy-js/index.d.ts index 2d7f2688a7..2e6aca6c4b 100644 --- a/types/toobusy-js/index.d.ts +++ b/types/toobusy-js/index.d.ts @@ -1,19 +1,66 @@ // Type definitions for toobusy-js 0.5 // Project: https://github.com/STRML/node-toobusy // Definitions by: Arne Schubert +// BendingBender // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped export = toobusy_js; +/** + * Main export function. + * @return True if node process is too busy. + */ declare function toobusy_js(): boolean; declare namespace toobusy_js { - function interval(newInterval: number): number; + /** + * Sets or gets the current check interval. + * If you want more sensitive checking, set a faster (lower) interval. A lower maxLag can also create a more + * sensitive check. + * @param [newInterval] New interval to set. If not provided, will return the existing interval. + * @return New or existing interval. + */ + function interval(newInterval?: number): number; + /** + * Returns last lag reading from last check interval. + * @return Lag in ms. + */ function lag(): number; - function maxLag(newLag: number): number; - function smoothingFactor(newFactor: number): number; + /** + * Set or get the current max latency threshold. Default is 70ms. + * + * Note that if event loop lag goes over this threshold, the process is not always 'too busy' - the farther + * it goes over the threshold, the more likely the process will be considered too busy. + * + * The percentage is equal to the percent over the max lag threshold. So 1.25x over the maxLag will indicate + * too busy 25% of the time. 2x over the maxLag threshold will indicate too busy 100% of the time. + * @param [newLag] New maxLag (highwater) threshold. + * @return New or existing maxLag (highwater) threshold. + */ + function maxLag(newLag?: number): number; + /** + * Set or get the smoothing factor. Default is 0.3333.... + * + * The smoothing factor per the standard exponential smoothing formula "αtn + (1-α)tn-1" + * See: https://en.wikipedia.org/wiki/Exponential_smoothing + * + * @param [newFactor] New smoothing factor. + * @return New or existing smoothing factor. + */ + function smoothingFactor(newFactor?: number): number; + /** + * Shuts down toobusy. + * + * Not necessary to call this manually, only do this if you know what you're doing. `unref()` is called + * on toobusy's check interval, so it will never keep the server open. + */ function shutdown(): void; + /** + * Registers an event listener for lag events, + * optionally specify a minimum value threshold for events being emitted + * @param fn Function of form onLag(value: number) => void + * @param [threshold=maxLag] Optional minimum lag value for events to be emitted + */ function onLag(fn: (lag: number) => void, threshold?: number): void; - function started(): boolean; } diff --git a/types/toobusy-js/toobusy-js-tests.ts b/types/toobusy-js/toobusy-js-tests.ts index 121b84ddb4..2678dcc777 100644 --- a/types/toobusy-js/toobusy-js-tests.ts +++ b/types/toobusy-js/toobusy-js-tests.ts @@ -1,4 +1,4 @@ -import toobusy = require("toobusy-js"); +import toobusy = require('toobusy-js'); let numberValue = 1; let booleanValue = true; @@ -7,11 +7,19 @@ booleanValue = toobusy(); booleanValue = toobusy.started(); numberValue = toobusy.interval(numberValue); +numberValue = toobusy.interval(); numberValue = toobusy.lag(); numberValue = toobusy.maxLag(numberValue); +numberValue = toobusy.maxLag(); numberValue = toobusy.smoothingFactor(numberValue); - -toobusy.onLag((duration: number) => {}); -toobusy.onLag((duration: number) => {}, numberValue); - +numberValue = toobusy.smoothingFactor(); toobusy.shutdown(); + +toobusy.onLag(duration => { + // $ExpectType number + duration; +}); +toobusy.onLag(duration => { + // $ExpectType number + duration; +}, numberValue); From 3f3542a24e52d34680e07a0fd988e42111f99367 Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Wed, 5 Dec 2018 10:07:08 -0500 Subject: [PATCH 400/608] Add SessionEntityClient service calls --- types/dialogflow/index.d.ts | 54 ++++++++++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 7 deletions(-) diff --git a/types/dialogflow/index.d.ts b/types/dialogflow/index.d.ts index c421c47f68..8329021bb8 100644 --- a/types/dialogflow/index.d.ts +++ b/types/dialogflow/index.d.ts @@ -23,12 +23,7 @@ export namespace v2 { searchAgents( request: SearchAgentRequest, options?: gax.CallOptions, - cb?: ( - err: Error, - agents: Agent[], - arg3: any, - response: any - ) => void + cb?: (err: Error, agents: Agent[], arg3: any, response: any) => void ): Promise; searchAgentsStream( request: SearchAgentRequest, @@ -213,7 +208,28 @@ export namespace v2 { getProjectId(): Promise; getProjectId(callback?: (error: Error, id: string) => string): void; - // TODO: add Session Entity Types service methods + // TODO: add streaming calls + + listSessionEntityTypes( + request: ListSessionEntityTypesRequest, + options?: gax.CallOptions + ): Promise<[SessionEntityType[]]>; + getSessionEntityType( + request: GetSessionEntityTypeRequest, + options?: gax.CallOptions + ): Promise<[SessionEntityType]>; + createSessionEntityType( + request: CreateSessionEntityTypeRequest, + options?: gax.CallOptions + ): Promise<[SessionEntityType]>; + updateSessionEntityType( + request: UpdateSessionEntityTypeRequest, + options?: gax.CallOptions + ): Promise<[SessionEntityType]>; + deleteSessionEntityType( + request: DeleteSessionEntityTypeRequest, + options?: gax.CallOptions + ): Promise; } class SessionsClient { @@ -504,6 +520,30 @@ export interface DeleteEntityTypeRequest { name: string; } +export interface ListSessionEntityTypesRequest { + parent: string; + pageSize?: number; +} + +export interface GetSessionEntityTypeRequest { + name: string; +} + +export interface CreateSessionEntityTypeRequest { + parent: string; + sessionEntityType: SessionEntityType; +} + +export interface UpdateSessionEntityTypeRequest { + sessionEntityType: SessionEntityType; + /** @link https://github.com/google/protobuf/blob/master/src/google/protobuf/field_mask.proto */ + updateMask: any; +} + +export interface DeleteSessionEntityTypeRequest { + name: string; +} + export interface ListIntentsRequest { parent: string; languageCode?: string; From 2ef5b8cb2dea6a9baa53d62f10ce10a4d84dc3ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20J=2E=20Over=C3=A5?= Date: Wed, 5 Dec 2018 16:36:34 +0100 Subject: [PATCH 401/608] Update eureka-js-client to 4.4 typing --- .../eureka-js-client-tests.ts | 24 +++++++++++++++++++ types/eureka-js-client/index.d.ts | 11 ++++++--- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/types/eureka-js-client/eureka-js-client-tests.ts b/types/eureka-js-client/eureka-js-client-tests.ts index 109dab0278..b4b5c5f54e 100644 --- a/types/eureka-js-client/eureka-js-client-tests.ts +++ b/types/eureka-js-client/eureka-js-client-tests.ts @@ -19,3 +19,27 @@ const client = new Eureka({ port: 32768, } }); + +// example configuration against newer Eureka (https://www.npmjs.com/package/eureka-js-client#400-bad-request-errors-from-eureka-server) +const newerClient = new Eureka({ + // application instance information + instance: { + app: 'jqservice', + hostName: 'localhost', + ipAddr: '127.0.0.1', + port: { + $: 443, + '@enabled': true + }, + vipAddress: 'jq.test.something.com', + dataCenterInfo: { + '@class': 'com.netflix.appinfo.InstanceInfo$DefaultDataCenterInfo', + name: 'MyOwn', + }, + }, + eureka: { + // eureka server host / port + host: '192.168.99.100', + port: 32768, + } +}); diff --git a/types/eureka-js-client/index.d.ts b/types/eureka-js-client/index.d.ts index bfd9f10666..693e1b8ec8 100644 --- a/types/eureka-js-client/index.d.ts +++ b/types/eureka-js-client/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for eureka-js-client 4.3 +// Type definitions for eureka-js-client 4.4 // Project: https://github.com/jquatier/eureka-js-client -// Definitions by: Ilko Hoffmann +// Definitions by: Ilko Hoffmann , Karl O. // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped export class Eureka { @@ -26,7 +26,7 @@ export namespace EurekaClient { ipAddr: string; vipAddress: string; dataCenterInfo: DataCenterInfo; - port?: number; + port?: number | LegacyPortWrapper; instanceId?: string; appGroupName?: string; sid?: string; @@ -61,6 +61,10 @@ export namespace EurekaClient { useLocalMetadata?: boolean; preferIpAddress?: boolean; } + interface LegacyPortWrapper { + '$': number; + '@enabled': boolean; + } interface PortWrapper { enabled: boolean; port: number; @@ -71,5 +75,6 @@ export namespace EurekaClient { } interface DataCenterInfo { name: DataCenterName; + '@class'?: string; } } From 0e0d9592b38a2a7ae549b61435e233bc5fb87312 Mon Sep 17 00:00:00 2001 From: Dmitry Guketlev Date: Wed, 5 Dec 2018 17:34:04 +0300 Subject: [PATCH 402/608] Typings for punycode package --- types/punycode/index.d.ts | 16 ++++++++++++++++ types/punycode/punycode-tests.ts | 11 +++++++++++ types/punycode/tsconfig.json | 23 +++++++++++++++++++++++ types/punycode/tslint.json | 1 + 4 files changed, 51 insertions(+) create mode 100644 types/punycode/index.d.ts create mode 100644 types/punycode/punycode-tests.ts create mode 100644 types/punycode/tsconfig.json create mode 100644 types/punycode/tslint.json diff --git a/types/punycode/index.d.ts b/types/punycode/index.d.ts new file mode 100644 index 0000000000..a3048a5e28 --- /dev/null +++ b/types/punycode/index.d.ts @@ -0,0 +1,16 @@ +// Type definitions for punycode 2.1 +// Project: https://mths.be/punycode +// Definitions by: Dmitry Guketlev +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export function decode(input: string): string; +export function encode(input: string): string; +export function toUnicode(input: string): string; +export function toASCII(input: string): string; + +export namespace ucs2 { + function decode(string: string): number[]; + function encode(array: ReadonlyArray): string; +} + +export const version: string; diff --git a/types/punycode/punycode-tests.ts b/types/punycode/punycode-tests.ts new file mode 100644 index 0000000000..4de954fbc7 --- /dev/null +++ b/types/punycode/punycode-tests.ts @@ -0,0 +1,11 @@ +import punycode = require('punycode'); + +const result1: string = punycode.decode('x'); +const result2: string = punycode.encode('x'); +const result3: string = punycode.toASCII('x'); +const result4: string = punycode.toUnicode('x'); + +const ucs2result1: number[] = punycode.ucs2.decode('x'); +const ucs2result2: string = punycode.ucs2.encode([1, 2, 3]); + +const version: string = punycode.version; diff --git a/types/punycode/tsconfig.json b/types/punycode/tsconfig.json new file mode 100644 index 0000000000..0474c0a874 --- /dev/null +++ b/types/punycode/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "punycode-tests.ts" + ] +} diff --git a/types/punycode/tslint.json b/types/punycode/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/punycode/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From fa7edccac867cee4a397160e164e1bfae2f3b90f Mon Sep 17 00:00:00 2001 From: Ari Lotter Date: Wed, 5 Dec 2018 11:36:51 -0500 Subject: [PATCH 403/608] [three] Euler.onChange returns the Euler instance. As per https://github.com/mrdoob/three.js/blob/1675680a7763a16010bf1254a8576e5c1b149b55/src/math/Euler.js#L339-L345 --- types/three/three-core.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/three/three-core.d.ts b/types/three/three-core.d.ts index 955eb45faf..003c6a70f6 100755 --- a/types/three/three-core.d.ts +++ b/types/three/three-core.d.ts @@ -3562,7 +3562,7 @@ export class Euler { fromArray(xyzo: any[]): Euler; toArray(array?: number[], offset?: number): number[]; toVector3(optionalResult?: Vector3): Vector3; - onChange(callback: Function): void; + onChange(callback: Function): this; static RotationOrders: string[]; static DefaultOrder: string; From 8b75a98c101dc69ca2ccfbe8c195c25e9f300e9c Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Wed, 5 Dec 2018 19:08:30 +0100 Subject: [PATCH 404/608] Update types for common-tags to v1.8 --- types/common-tags/common-tags-tests.ts | 333 +++++++++++++++---------- types/common-tags/index.d.ts | 271 +++++++++++++++----- types/common-tags/tslint.json | 78 +----- 3 files changed, 417 insertions(+), 265 deletions(-) diff --git a/types/common-tags/common-tags-tests.ts b/types/common-tags/common-tags-tests.ts index e504624943..37a1fba789 100644 --- a/types/common-tags/common-tags-tests.ts +++ b/types/common-tags/common-tags-tests.ts @@ -1,167 +1,242 @@ -import * as commonTags from 'common-tags'; +import { + html, + safeHtml, + oneLine, + oneLineTrim, + stripIndent, + stripIndents, + inlineLists, + oneLineInlineLists, + commaLists, + commaListsOr, + commaListsAnd, + oneLineCommaLists, + oneLineCommaListsOr, + oneLineCommaListsAnd, + id, + TemplateTag, + trimResultTransformer, + stripIndentTransformer, + replaceResultTransformer, + replaceSubstitutionTransformer, + inlineArrayTransformer, + splitStringTransformer, + createTag, + TemplateTransformer, + replaceStringTransformer, +} from 'common-tags'; -/* Test Built-in Tags */ - -commonTags.commaLists ` - I like ${['apples', 'bananas', 'watermelons']} - They're good! +const userMessages = ['hi', 'what are you up to?', '']; +html` +
+
    + ${userMessages.map(message => safeHtml`
  • ${message}
  • `)} +
+
`; -commonTags.commaListsAnd` - I like ${['apples', 'bananas', 'watermelons']} - They're good! -`; - -commonTags.commaListsOr` - I like ${['apples', 'bananas', 'watermelons']} - They're good! -`; - -let fruits = ['apple', 'orange', 'watermelon']; - -commonTags.html` -
-
    - ${fruits.map(fruit => `
  • ${fruit}
  • `)} - ${'
  • kiwi
  • \n
  • guava
  • '} -
-
-`; - -commonTags.codeBlock` -
-
    - ${fruits.map(fruit => `
  • ${fruit}
  • `)} - ${'
  • kiwi
  • \n
  • guava
  • '} -
-
-`; - -commonTags.source` -
-
    - ${fruits.map(fruit => `
  • ${fruit}
  • `)} - ${'
  • kiwi
  • \n
  • guava
  • '} -
-
-`; - -let userMessages = ['hi', 'what are you up to?', ''] -commonTags.html` -
-
    - ${userMessages.map(message => commonTags.safeHtml`
  • ${message}
  • `)} -
-
-` - -commonTags.oneLine` +oneLine` foo bar baz `; -commonTags.oneLineTrim` +oneLineTrim` https://news.com/article ?utm_source=designernews.co `; -commonTags.oneLineCommaLists` - I like ${['apples', 'bananas', 'watermelons']} - They're good! -`; - -commonTags.oneLineCommaListsOr` - I like ${['apples', 'bananas', 'watermelons']} - They're good! -`; - -commonTags.oneLineCommaListsAnd` - I like ${['apples', 'bananas', 'watermelons']} - They're good! -`; - -commonTags.inlineLists` - I like ${['apples', 'bananas', 'watermelons']} - They're good! -`; - -commonTags.oneLineInlineLists` - I like ${['apples', 'bananas', 'watermelons']} - They're good! -`; - -let verb = 'notice'; - -commonTags.stripIndent` +const verb = 'notice'; +stripIndent` This is a multi-line string. You'll ${verb} that it is indented. We don't want to output this indentation. But we do want to keep this line indented. `; -commonTags.stripIndents` +stripIndents` This is a multi-line string. You'll ${verb} that it is indented. We don't want to output this indentation. We don't want to keep this line indented either. `; -/* Test Tag Constructor */ +inlineLists` + I like ${['apples', 'bananas', 'watermelons']} + They're good! +`; -new commonTags.TemplateTag(); +oneLineInlineLists` + I like ${['apples', 'bananas', 'watermelons']} + They're good! +`; -const substitutionReplacer = (oldValue : string, newValue : string) => ({ - onSubstitution(substitution : string, resultSoFar : string) { +commaLists` + I like ${['apples', 'bananas', 'watermelons']} + They're good! +`; + +commaListsOr` + I like ${['apples', 'bananas', 'watermelons']} + They're good! +`; + +commaListsAnd` + I like ${['apples', 'bananas', 'watermelons']} + They're good! +`; + +oneLineCommaLists` + I like ${['apples', 'bananas', 'watermelons']} + They're good! +`; + +oneLineCommaListsOr` + I like ${['apples', 'bananas', 'watermelons']} + They're good! +`; + +oneLineCommaListsAnd` + I like ${['apples', 'bananas', 'watermelons']} + They're good! +`; + +id`hello ${'world'}`; + +oneLine(String.raw)` + foo + bar\nbaz +`; + +stripIndent(' foo\n bar'); + +const doNothing = createTag(); +doNothing`foo bar`; + +const substitutionReplacer = (oldValue: string, newValue: string): TemplateTransformer => ({ + onSubstitution(substitution, resultSoFar) { if (substitution === oldValue) { return newValue; } return substitution; - } + }, }); -new commonTags.TemplateTag(substitutionReplacer('fizz', 'buzz')); +const replaceFizzWithBuzz = createTag(substitutionReplacer('fizz', 'buzz')); +replaceFizzWithBuzz`foo bar ${'fizz'}`; -new commonTags.TemplateTag( - substitutionReplacer('fizz', 'buzz'), - substitutionReplacer('foo', 'bar') +createTag(); +createTag(substitutionReplacer('fizz', 'buzz')); +createTag(substitutionReplacer('fizz', 'buzz'), substitutionReplacer('foo', 'bar')); +createTag([substitutionReplacer('fizz', 'buzz'), substitutionReplacer('foo', 'bar')]); +new TemplateTag(); +new TemplateTag(substitutionReplacer('fizz', 'buzz')); +new TemplateTag(substitutionReplacer('fizz', 'buzz'), substitutionReplacer('foo', 'bar')); +new TemplateTag([substitutionReplacer('fizz', 'buzz'), substitutionReplacer('foo', 'bar')]); + +const tt: TemplateTransformer<{ foo: string }> = { + getInitialContext() { + return { foo: 'bar' }; + }, + onString(str, context) { + // $ExpectType string + str; + // $ExpectType { foo: string; } + context; + return ''; + }, + onSubstitution(substitution, resultSoFar, context) { + // $ExpectType string + substitution; + // $ExpectType string + resultSoFar; + // $ExpectType { foo: string; } + context; + return ''; + }, + onEndResult(endResult, context) { + // $ExpectType string + endResult; + // $ExpectType { foo: string; } + context; + return ''; + }, +}; + +createTag({}); +createTag(tt); +createTag({ + onString: str => `${str}!`, +}); +createTag({ + onSubstitution: substitution => `${substitution}!`, +}); +createTag({ + onEndResult: endResult => `${endResult}!`, +}); +new TemplateTag({}); +new TemplateTag(tt); +new TemplateTag({ + onString: str => `${str}!`, +}); +new TemplateTag({ + onSubstitution: substitution => `${substitution}!`, +}); +new TemplateTag({ + onEndResult: endResult => `${endResult}!`, +}); + +createTag(trimResultTransformer()); +createTag(trimResultTransformer('')); +createTag(trimResultTransformer('start')); +createTag(trimResultTransformer('end')); +createTag(trimResultTransformer('left')); +createTag(trimResultTransformer('right')); + +createTag(stripIndentTransformer()); +createTag(stripIndentTransformer('initial')); +createTag(stripIndentTransformer('all')); + +createTag(replaceResultTransformer('foo', 'bar')); +createTag(replaceResultTransformer(/baz/g, 'bar')); +createTag( + replaceResultTransformer(/baz/g, (substring, ...matches) => { + // $ExpectType string + substring; + // $ExpectType any[] + matches; + return ''; + }) ); -new commonTags.TemplateTag([ - substitutionReplacer('fizz', 'buzz'), - substitutionReplacer('foo', 'bar') -]); +createTag(replaceSubstitutionTransformer('foo', 'bar')); +createTag(replaceSubstitutionTransformer(/baz/g, 'bar')); +createTag( + replaceSubstitutionTransformer(/baz/g, (substring, ...matches) => { + // $ExpectType string + substring; + // $ExpectType any[] + matches; + return ''; + }) +); -new commonTags.TemplateTag({}); +createTag(replaceStringTransformer('foo', 'bar')); +createTag(replaceStringTransformer(/baz/g, 'bar')); +createTag( + replaceStringTransformer(/baz/g, (substring, ...matches) => { + // $ExpectType string + substring; + // $ExpectType any[] + matches; + return ''; + }) +); -new commonTags.TemplateTag({ - onEndResult: endResult => `${endResult}!` -}); +createTag(inlineArrayTransformer()); +createTag(inlineArrayTransformer({})); +createTag(inlineArrayTransformer({ separator: 'foo' })); +createTag(inlineArrayTransformer({ conjunction: 'bar' })); +createTag(inlineArrayTransformer({ serial: true })); -new commonTags.TemplateTag({ - onSubstitution: substitution => `${substitution}!`, - onEndResult: endResult => `${endResult}!` -}); - -/* Tests Built-in Transformers */ - -new commonTags.TemplateTag(commonTags.trimResultTransformer()); -new commonTags.TemplateTag(commonTags.trimResultTransformer('left')); -new commonTags.TemplateTag(commonTags.trimResultTransformer('right')); - -new commonTags.TemplateTag(commonTags.stripIndentTransformer()); -new commonTags.TemplateTag(commonTags.stripIndentTransformer('initial')); -new commonTags.TemplateTag(commonTags.stripIndentTransformer('all')); - -new commonTags.TemplateTag(commonTags.replaceResultTransformer('foo', 'bar')); -new commonTags.TemplateTag(commonTags.replaceSubstitutionTransformer(/baz/g, 'bar')); - -new commonTags.TemplateTag(commonTags.replaceSubstitutionTransformer('foo', 'bar')); -new commonTags.TemplateTag(commonTags.replaceSubstitutionTransformer(/baz/g, 'bar')); - -new commonTags.TemplateTag(commonTags.inlineArrayTransformer()); -new commonTags.TemplateTag(commonTags.inlineArrayTransformer({})); -new commonTags.TemplateTag(commonTags.inlineArrayTransformer({separator: 'foo'})); -new commonTags.TemplateTag(commonTags.inlineArrayTransformer({conjunction: 'bar'})); - -new commonTags.TemplateTag(commonTags.splitStringTransformer('foo')); +createTag(splitStringTransformer('foo')); diff --git a/types/common-tags/index.d.ts b/types/common-tags/index.d.ts index 65f0b61673..3a12c91109 100644 --- a/types/common-tags/index.d.ts +++ b/types/common-tags/index.d.ts @@ -1,67 +1,220 @@ -// Type definitions for common-tags v1.4.0 +// Type definitions for common-tags 1.8 // Project: https://github.com/declandewet/common-tags // Definitions by: Viktor Zozuliak // Paul Wang +// BendingBender // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 -declare module 'common-tags' { - type TemplateTag = (literals: TemplateStringsArray, ...placeholders: any[]) => string; +export as namespace commonTags; - type TemplateTransformer = { - onSubstitution?: (substitution: string, resultSoFar: string) => string; - onEndResult?: (endResult : string) => string; - } +export type JSTag = (literals: TemplateStringsArray, ...placeholders: any[]) => string; - /* Built-in Tags */ - export var commaLists: TemplateTag; - - export var commaListsAnd: TemplateTag; - - export var commaListsOr: TemplateTag; - - export var html: TemplateTag; - - export var codeBlock: TemplateTag; - - export var source: TemplateTag; - - export var safeHtml: TemplateTag; - - export var oneLine: TemplateTag; - - export var oneLineTrim: TemplateTag; - - export var oneLineCommaLists: TemplateTag; - - export var oneLineCommaListsOr: TemplateTag; - - export var oneLineCommaListsAnd: TemplateTag; - - export var inlineLists: TemplateTag; - - export var oneLineInlineLists: TemplateTag; - - export var stripIndent: TemplateTag; - - export var stripIndents: TemplateTag; - - /* New Tag Constructor */ - export var TemplateTag: { - new(): TemplateTag; - new(...transformers: TemplateTransformer[]): TemplateTag; - new(transformers: TemplateTransformer[]): TemplateTag; - }; - - /* Built-in Transformers */ - export var trimResultTransformer: (side?: 'left'|'right') => TemplateTransformer; - - export var stripIndentTransformer: (type?: 'initial'|'all') => TemplateTransformer; - - export var replaceResultTransformer: (replaceWhat: string|RegExp, replaceWith: string) => TemplateTransformer; - - export var replaceSubstitutionTransformer: (replaceWhat: string|RegExp, replaceWith: string) => TemplateTransformer; - - export var inlineArrayTransformer: (opts?: {separator?: string, conjunction?: string}) => TemplateTransformer; - - export var splitStringTransformer: (splitBy: string) => TemplateTransformer; +export interface TemplateTag { + (str: string): string; + (tag: JSTag): TemplateTag; + (literals: TemplateStringsArray, ...placeholders: any[]): string; } + +/** + * You'll often find that you might want to include an array in a template. + * Typically, doing something like `${array.join(', ')}` would work - but what if you're printing a list of items + * in an HTML template and want to maintain the indentation? You'd have to count the spaces manually and include + * them in the `.join()` call - which is a bit ugly for my taste. + * This tag properly indents arrays, as well as newline characters in string substitutions, + * by converting them to an array split by newline and re-using the same array inclusion logic. + */ +export const html: TemplateTag; + +/** + * alias for `html` + */ +export const codeBlock: TemplateTag; + +/** + * alias for `html` + */ +export const source: TemplateTag; + +/** + * A tag very similar to `html` but it does safe HTML escaping for strings coming from substitutions. + * When combined with regular `html` tag, you can do basic HTML templating that is safe from + * XSS (Cross-Site Scripting) attacks. + */ +export const safeHtml: TemplateTag; + +/** + * Allows you to keep your single-line strings under 80 characters without resorting to crazy string concatenation. + */ +export const oneLine: TemplateTag; + +/** + * Allows you to keep your single-line strings under 80 characters while trimming the new lines. + */ +export const oneLineTrim: TemplateTag; + +/** + * If you want to strip the initial indentation from the beginning of each line in a multiline string. + * Important note: this tag will not indent multiline strings coming from the substitutions. + * If you want that behavior, use the `html` tag (aliases: `source`, `codeBlock`). + */ +export const stripIndent: TemplateTag; + +/** + * If you want to strip *all* of the indentation from the beginning of each line in a multiline string. + */ +export const stripIndents: TemplateTag; + +/** + * Allows you to inline an array substitution as a list. + */ +export const inlineLists: TemplateTag; + +/** + * Allows you to inline an array substitution as a list, rendered out on a single line. + */ +export const oneLineInlineLists: TemplateTag; + +/** + * Allows you to inline an array substitution as a comma-separated list. + */ +export const commaLists: TemplateTag; + +/** + * Allows you to inline an array substitution as a comma-separated list, the last of which is preceded by the word "or". + */ +export const commaListsOr: TemplateTag; + +/** + * Allows you to inline an array substitution as a comma-separated list, the last of which is preceded by the word "and". + */ +export const commaListsAnd: TemplateTag; + +/** + * Allows you to inline an array substitution as a comma-separated list, and is rendered out on to a single line. + */ +export const oneLineCommaLists: TemplateTag; + +/** + * Allows you to inline an array substitution as a comma-separated list, the last of which is preceded by the word "or", and is rendered out on to a single line. + */ +export const oneLineCommaListsOr: TemplateTag; + +/** + * Allows you to inline an array substitution as a comma-separated list, the last of which is preceded by the word "and", and is rendered out on to a single line. + */ +export const oneLineCommaListsAnd: TemplateTag; + +/** + * A no-op tag that might come in useful in some scenarios, e.g. mocking. + */ +export const id: TemplateTag; + +export interface TemplateTransformer { + /** + * Called before everything else. + * The result of this hook will be passed to other hooks as `context`. + * If omitted, `context` will be an empty object. + */ + getInitialContext?: () => TCtx; + /** + * Called when the tag encounters a string. + * (a string is whatever's not inside "${}" in your template literal) + * `str` is the value of the current string + */ + onString?: (str: string, context: TCtx) => string; + /** + * Called when the tag encounters a substitution. + * (a substitution is whatever's inside "${}" in your template literal) + * `substitution` is the value of the current substitution + * `resultSoFar` is the end result up to the point of this substitution + */ + onSubstitution?: (substitution: string, resultSoFar: string, context: TCtx) => string; + /** + * Called when all substitutions have been parsed + * `endResult` is the final value. + */ + onEndResult?: (endResult: string, context: TCtx) => string; +} + +export type PluginFunction = (oldValue: string, newValue: string) => TemplateTransformer; + +/** + * New Tag factory + */ +export function createTag(transformers?: Array>): TemplateTag; +export function createTag(...transformers: Array>): TemplateTag; +export function createTag(...pluginFunctions: PluginFunction[]): TemplateTag; + +export const TemplateTag: { + /** + * New Tag Constructor + * @deprecated + */ + new (transformers?: Array>): TemplateTag; + new (...transformers: Array>): TemplateTag; + new (...pluginFunctions: PluginFunction[]): TemplateTag; +}; + +/** + * TemplateTag transformer that trims whitespace on the end result of a tagged template + * @param [side=''] The side of the string to trim. Can be 'start' or 'end' (alternatively 'left' or 'right') + * @return a TemplateTag transformer + */ +export function trimResultTransformer( + side?: 'start' | 'end' | 'left' | 'right' | '' +): TemplateTransformer; + +/** + * strips indentation from a template literal + * @param [type='initial'] whether to remove all indentation or just leading indentation. can be 'all' or 'initial' + * @return a TemplateTag transformer + */ +export function stripIndentTransformer(type?: 'initial' | 'all'): TemplateTransformer; + +/** + * Replaces a value or pattern in the end result with a new value. + * @param replaceWhat the value or pattern that should be replaced + * @param replaceWith the replacement value + * @return a TemplateTag transformer + */ +export function replaceResultTransformer( + replaceWhat: string | RegExp, + replaceWith: string | ((substring: string, ...args: any[]) => string) +): TemplateTransformer; + +/** + * Replaces the result of all substitutions (results of calling ${ ... }) with a new value. + * Same as for `replaceResultTransformer`, replaceWhat can be a string or regular expression and replaceWith is the new value. + */ +export function replaceSubstitutionTransformer( + replaceWhat: string | RegExp, + replaceWith: string | ((substring: string, ...args: any[]) => string) +): TemplateTransformer; + +/** + * Replaces the result of all strings (what's not in ${ ... }) with a new value. + * Same as for `replaceResultTransformer`, replaceWhat can be a string or regular expression and replaceWith is the new value. + */ +export function replaceStringTransformer( + replaceWhat: string | RegExp, + replaceWith: string | ((substring: string, ...args: any[]) => string) +): TemplateTransformer; + +/** + * Converts an array substitution to a string containing a list + * @param [opts.separator=''] what to separate each item with (always followed by a space) + * @param [opts.conjunction=''] replace the last separator with this value + * @param [opts.serial=false] should the separator be included before the conjunction? As in the case of serial/oxford commas + * @return a TemplateTag transformer + */ +export function inlineArrayTransformer(opts?: { + separator?: string; + conjunction?: string; + serial?: boolean; +}): TemplateTransformer; + +/** + * Splits a string substitution into an array by the provided splitBy substring, only if the string contains the splitBy substring. + */ +export function splitStringTransformer(splitBy: string): TemplateTransformer; diff --git a/types/common-tags/tslint.json b/types/common-tags/tslint.json index a41bf5d19a..f93cf8562a 100644 --- a/types/common-tags/tslint.json +++ b/types/common-tags/tslint.json @@ -1,79 +1,3 @@ { - "extends": "dtslint/dt.json", - "rules": { - "adjacent-overload-signatures": false, - "array-type": false, - "arrow-return-shorthand": false, - "ban-types": false, - "callable-types": false, - "comment-format": false, - "dt-header": false, - "eofline": false, - "export-just-namespace": false, - "import-spacing": false, - "interface-name": false, - "interface-over-type-literal": false, - "jsdoc-format": false, - "max-line-length": false, - "member-access": false, - "new-parens": false, - "no-any-union": false, - "no-boolean-literal-compare": false, - "no-conditional-assignment": false, - "no-consecutive-blank-lines": false, - "no-construct": false, - "no-declare-current-package": false, - "no-duplicate-imports": false, - "no-duplicate-variable": false, - "no-empty-interface": false, - "no-for-in-array": false, - "no-inferrable-types": false, - "no-internal-module": false, - "no-irregular-whitespace": false, - "no-mergeable-namespace": false, - "no-misused-new": false, - "no-namespace": false, - "no-object-literal-type-assertion": false, - "no-padding": false, - "no-redundant-jsdoc": false, - "no-redundant-jsdoc-2": false, - "no-redundant-undefined": false, - "no-reference-import": false, - "no-relative-import-in-test": false, - "no-self-import": false, - "no-single-declare-module": false, - "no-string-throw": false, - "no-unnecessary-callback-wrapper": false, - "no-unnecessary-class": false, - "no-unnecessary-generics": false, - "no-unnecessary-qualifier": false, - "no-unnecessary-type-assertion": false, - "no-useless-files": false, - "no-var-keyword": false, - "no-var-requires": false, - "no-void-expression": false, - "no-trailing-whitespace": false, - "object-literal-key-quotes": false, - "object-literal-shorthand": false, - "one-line": false, - "one-variable-per-declaration": false, - "only-arrow-functions": false, - "prefer-conditional-expression": false, - "prefer-const": false, - "prefer-declare-function": false, - "prefer-for-of": false, - "prefer-method-signature": false, - "prefer-template": false, - "radix": false, - "semicolon": false, - "space-before-function-paren": false, - "space-within-parens": false, - "strict-export-declare-modifiers": false, - "trim-file": false, - "triple-equals": false, - "typedef-whitespace": false, - "unified-signatures": false, - "void-return": false, - "whitespace": false - } + "extends": "dtslint/dt.json" } From 56218fdbce266c90154f8f9934e25305cc1563b2 Mon Sep 17 00:00:00 2001 From: Gordon Date: Wed, 5 Dec 2018 12:58:37 -0600 Subject: [PATCH 405/608] Define connectCurrentRefinements --- types/react-instantsearch-core/index.d.ts | 44 ++++++++++++++++++- .../react-instantsearch-core-tests.tsx | 19 +++++++- 2 files changed, 61 insertions(+), 2 deletions(-) diff --git a/types/react-instantsearch-core/index.d.ts b/types/react-instantsearch-core/index.d.ts index e76be4ee08..71305a2406 100644 --- a/types/react-instantsearch-core/index.d.ts +++ b/types/react-instantsearch-core/index.d.ts @@ -128,7 +128,49 @@ export class Configure extends React.Component {} export function connectAutoComplete(Composed: React.ComponentType): React.ComponentClass; export function connectBreadcrumb(Composed: React.ComponentType): React.ComponentClass; export function connectConfigure(Composed: React.ComponentType): React.ComponentClass; -export function connectCurrentRefinements(Composed: React.ComponentType): React.ComponentClass; + +export interface Refinement { + label: string; + attribute: string; + currentRefinement: string | object; + items?: Array<{ label: string, value: RefinementValue }>; + index: string; + id: string; + value: RefinementValue; +} + +type RefinementValue = (searchState: SearchState) => SearchState; + +export interface CurrentRefinementsExposed { + /** + * Function to modify the items being displayed, e.g. for filtering or sorting them. + * Takes an items as parameter and expects it back in return. + */ + transformItems?: (...args: any[]) => any; + /** Pass true to also clear the search query */ + clearsQuery?: boolean; +} + +export interface CurrentRefinementsProvided { + /** a function to remove a single filter */ + refine: (refinement: RefinementValue | RefinementValue[]) => void; + /** + * all the filters, the value is to pass to the refine function for removing all currentrefinements, + * label is for the display. When existing several refinements for the same atribute name, then you + * get a nested items object that contains a label and a value function to use to remove a single filter. + * attribute and currentRefinement are metadata containing row values. + */ + items: Refinement[]; + /** the search query */ + query: string; +} + +export function connectCurrentRefinements( + stateless: React.StatelessComponent, +): React.ComponentClass; +export function connectCurrentRefinements>( + Composed: React.ComponentType, +): ConnectedComponentClass; export interface NESW { northEast: { lat: number, lng: number }; diff --git a/types/react-instantsearch-core/react-instantsearch-core-tests.tsx b/types/react-instantsearch-core/react-instantsearch-core-tests.tsx index 62bf99e3d4..d18e5a78e6 100644 --- a/types/react-instantsearch-core/react-instantsearch-core-tests.tsx +++ b/types/react-instantsearch-core/react-instantsearch-core-tests.tsx @@ -7,7 +7,9 @@ import { connectStateResults, SearchBoxProvided, connectSearchBox, - connectRefinementList + connectRefinementList, + CurrentRefinementsProvided, + connectCurrentRefinements } from 'react-instantsearch-core'; () => { @@ -153,3 +155,18 @@ import { // reading and manipulating the current query of the search. const ConnectedSearchBox = connectSearchBox(MySearchBox); }; + +() => { + const MyCurrentRefinements = ({refine, items, query}: CurrentRefinementsProvided) => + <> + {items.map((refinement) => ( +
refine(refinement.value) }> + +
+ ))} + ; + + const ConnectedCurrentRefinements = connectCurrentRefinements(MyCurrentRefinements); + + item} />; +}; From 30e6b2c00df6d694dab9d7f0315caf41b0eb1dbd Mon Sep 17 00:00:00 2001 From: Gordon Date: Wed, 5 Dec 2018 13:02:29 -0600 Subject: [PATCH 406/608] Improve _highlightResult on Hit --- types/react-instantsearch-core/index.d.ts | 8 +++++++- .../react-instantsearch-core-tests.tsx | 6 ++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/types/react-instantsearch-core/index.d.ts b/types/react-instantsearch-core/index.d.ts index 71305a2406..af86139fde 100644 --- a/types/react-instantsearch-core/index.d.ts +++ b/types/react-instantsearch-core/index.d.ts @@ -497,12 +497,18 @@ export interface SearchResults { */ export type Hit = TDoc & { objectID: string; + /** + * Contains the searchable attributes within the document and shows which part of the + * attribute was matched by the search terms. Note that if the index has defined + * any searchable attributes, this object will only contain those keys and others + * will not exist. + */ '_highlightResult': HighlightResult; }; export type HighlightResult = TDoc extends { [k: string]: any } ? - { [K in keyof TDoc]: HighlightResultField } : + { [K in keyof TDoc]?: HighlightResultField } : never; type HighlightResultField = diff --git a/types/react-instantsearch-core/react-instantsearch-core-tests.tsx b/types/react-instantsearch-core/react-instantsearch-core-tests.tsx index d18e5a78e6..1ced5dee69 100644 --- a/types/react-instantsearch-core/react-instantsearch-core-tests.tsx +++ b/types/react-instantsearch-core/react-instantsearch-core-tests.tsx @@ -102,9 +102,7 @@ import {

{additionalProp}

{searchResults.hits.map((h) => { // $ExpectType string - const compound = h._highlightResult.field3.compound.value; - // $ExpectType never - const field2 = h._highlightResult.field2; + const compound = h._highlightResult.field3!.compound!.value; return {compound}; })} ; @@ -121,7 +119,7 @@ import {

{additionalProp}

{searchResults.hits.map((h) => { // $ExpectType string[] - const words = h._highlightResult.field3.compound.matchedWords; + const words = h._highlightResult.field3!.compound!.matchedWords; return {h.field2}: {words.join(',')}; })} ; From 4801f891a4e5ea41cfa8aa246e3a45e9a6fcfff1 Mon Sep 17 00:00:00 2001 From: Gordon Date: Wed, 5 Dec 2018 13:03:20 -0600 Subject: [PATCH 407/608] Improve events on SearchBox --- types/react-instantsearch-dom/index.d.ts | 5 +++-- .../react-instantsearch-dom-tests.tsx | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/types/react-instantsearch-dom/index.d.ts b/types/react-instantsearch-dom/index.d.ts index f1dec59118..6ecb03c981 100644 --- a/types/react-instantsearch-dom/index.d.ts +++ b/types/react-instantsearch-dom/index.d.ts @@ -118,8 +118,9 @@ export interface SearchBoxProps extends CommonWidgetProps { reset?: JSX.Element; loadingIndicator?: JSX.Element; - onSubmit?: (...args: any[]) => any; - onReset?: (...args: any[]) => any; + onSubmit?: (event: React.SyntheticEvent) => any; + onReset?: (event: React.SyntheticEvent) => any; + onChange?: (event: React.SyntheticEvent) => any; } /** * The SearchBox component displays a search box that lets the user search for a specific query. diff --git a/types/react-instantsearch-dom/react-instantsearch-dom-tests.tsx b/types/react-instantsearch-dom/react-instantsearch-dom-tests.tsx index 6d9b7b55f8..e10d3fde08 100644 --- a/types/react-instantsearch-dom/react-instantsearch-dom-tests.tsx +++ b/types/react-instantsearch-dom/react-instantsearch-dom-tests.tsx @@ -216,6 +216,21 @@ import { Hit, connectRefinementList, connectMenu } from 'react-instantsearch-cor ; }; +(() => { + function onSearchBoxChange(event: React.SyntheticEvent) { + } + + function onSearchBoxReset(event: React.SyntheticEvent) { + } + + function onSearchBoxSubmit(event: React.SyntheticEvent) { + } + + } />; +}); + import { createInstantSearch } from 'react-instantsearch-dom/server'; // import { createServer } from 'http'; declare function createServer(handler: (req: any, res: any) => any): any; From 33ace784b8444eeb85e60cee92fd51a4eb601a74 Mon Sep 17 00:00:00 2001 From: Abhi Aiyer Date: Wed, 5 Dec 2018 11:36:54 -0800 Subject: [PATCH 408/608] fix typings for chatter and metadata for finally --- types/jsforce/api/chatter.d.ts | 2 ++ types/jsforce/api/metadata.d.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/types/jsforce/api/chatter.d.ts b/types/jsforce/api/chatter.d.ts index 4e0982ca24..5c300a7b4e 100644 --- a/types/jsforce/api/chatter.d.ts +++ b/types/jsforce/api/chatter.d.ts @@ -41,6 +41,8 @@ export class Request implements Promise { then(onfulfilled?: ((value: T) => (PromiseLike | TResult1)) | null | undefined, onrejected?: ((reason: any) => (PromiseLike | TResult2)) | null | undefined): Promise; + finally(onfinally?: () => void): Promise + thenCall(callback?: (err: Error, records: T) => void): Query; readonly [Symbol.toStringTag]: 'Promise'; diff --git a/types/jsforce/api/metadata.d.ts b/types/jsforce/api/metadata.d.ts index 15f0fe249e..ce7476a731 100644 --- a/types/jsforce/api/metadata.d.ts +++ b/types/jsforce/api/metadata.d.ts @@ -124,6 +124,8 @@ export class AsyncResultLocator extends EventEmitter implements Promise { then(onfulfilled?: ((value: T) => (PromiseLike | TResult1)) | null | undefined, onrejected?: ((reason: any) => (PromiseLike | TResult2)) | null | undefined): Promise; + finally(onfinally?: () => void): Promise + readonly [Symbol.toStringTag]: "Promise"; } From 17211a0628a38a868f68ebc0cb624deed4648734 Mon Sep 17 00:00:00 2001 From: Alex Duka Date: Wed, 5 Dec 2018 21:38:50 +0200 Subject: [PATCH 409/608] improved Binding field types --- types/rabbitmq-schema/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/rabbitmq-schema/index.d.ts b/types/rabbitmq-schema/index.d.ts index 49d20ea14b..3c607115ab 100644 --- a/types/rabbitmq-schema/index.d.ts +++ b/types/rabbitmq-schema/index.d.ts @@ -5,7 +5,7 @@ // TypeScript Version: 2.2 interface Binding { - destination: Topology; + destination: Exchange | Queue; source: Exchange; args?: object; routingPattern?: string; From 622559c8f6adfaf6f2c469e3bb856500f196d42d Mon Sep 17 00:00:00 2001 From: Michael Utech Date: Wed, 5 Dec 2018 17:51:24 +0100 Subject: [PATCH 410/608] add types for caniuse-lite --- types/caniuse-lite/caniuse-lite-tests.ts | 48 +++++++ types/caniuse-lite/index.d.ts | 159 +++++++++++++++++++++++ types/caniuse-lite/tsconfig.json | 23 ++++ types/caniuse-lite/tslint.json | 1 + 4 files changed, 231 insertions(+) create mode 100644 types/caniuse-lite/caniuse-lite-tests.ts create mode 100644 types/caniuse-lite/index.d.ts create mode 100644 types/caniuse-lite/tsconfig.json create mode 100644 types/caniuse-lite/tslint.json diff --git a/types/caniuse-lite/caniuse-lite-tests.ts b/types/caniuse-lite/caniuse-lite-tests.ts new file mode 100644 index 0000000000..38b09230de --- /dev/null +++ b/types/caniuse-lite/caniuse-lite-tests.ts @@ -0,0 +1,48 @@ +import { + agents, features, feature, Agent, Feature, PackedFeature, StatsByAgentID, SupportStatusByVersion, SupportStatus +} from "caniuse-lite"; + +const chrome: Agent | undefined = agents.chrome; +if (chrome !== undefined) { + const browser: string = chrome.browser; + const prefix: string = chrome.prefix; + const prefixExceptions: any = chrome.prefix_exceptions; + const usageGlobal: { [version: string]: number | undefined } = chrome.usage_global; + const releaseDate: { [version: string]: number | undefined } = chrome.release_date; + const versions: Array = chrome.versions; + consume(browser, prefix, prefixExceptions, usageGlobal, releaseDate, versions); +} + +const unpackedFeatures = Object.keys(features).map((id: string) => { + const packed: PackedFeature = features[id]; + const unpacked: Feature = feature(packed); + + const status: string = unpacked.status; + const title: string = unpacked.title; + const stats: StatsByAgentID = unpacked.stats; + Object.keys(stats).forEach((agentID: string) => { + const byVersion: SupportStatusByVersion = stats[agentID]; + Object.keys(byVersion).forEach(version => { + const supportStatus: SupportStatus = byVersion[version]; + consume(supportStatus); + }); + + const supportStatusByVersion: SupportStatusByVersion = stats[agentID]; + const agent: Agent = agents[agentID]!; + return { + feature: unpacked, + agent, + versions: Object.keys(supportStatusByVersion).map(version => { + return { + version, + releaseDate: agent.release_date[version], + [`feature_${id}`]: supportStatusByVersion[version] + }; + }) + }; + }); +}); + +function consume(...anything: any[]): void { + // ... +} diff --git a/types/caniuse-lite/index.d.ts b/types/caniuse-lite/index.d.ts new file mode 100644 index 0000000000..ce4f91a35f --- /dev/null +++ b/types/caniuse-lite/index.d.ts @@ -0,0 +1,159 @@ +// Type definitions for caniuse-lite 1.0 +// Project: https://github.com/ben-eb/caniuse-lite#readme +// Definitions by: Michael Utech +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +/** + * Information about user agents (browsers, platforms) indexed by their ID. + */ +export const agents: AgentsByID; + +/** + * Features index by their ID. The feature ID is a human readable identifier. The + * associated value is a packed version of information about the feature that + * can be unpacked using the function `feature(packed)` + */ +export const features: { [featureID: string]: PackedFeature; }; + +/** + * @param packedFeature a packed feature obtained from `features[key]` for some valid key. + * @return the unpacked information as `Feature`. + */ +export function feature(packedFeature: PackedFeature): Feature; + +/** + * @param packedRegion a packed version of regional usage data by agent OD. + * @return the unpacked usage data indexed by agent ID and then version. + */ +export function region(packedRegion: PackedRegion): { [agentID: string]: UsageByVersion }; + +/** + * Agents indexed by their ID. . + */ +export type AgentsByID = Readonly<{ [id: string]: Readonly | undefined }>; + +/** + * Feature support status by version indexed by agent ID. + */ +export type StatsByAgentID = Readonly<{ [agentID: string]: SupportStatusByVersion }>; + +/** + * Feature support status indexed by an agent's versions. + */ +export type SupportStatusByVersion = Readonly<{ [version: string]: SupportStatus }>; + +/** + * Usage (percentage/market share) indexed by an agent's versions. + */ +export type UsageByVersion = Readonly<{ [version: string]: number | undefined }>; + +/** + * The standardization status of a feature: + * * ls - WHATWG living standard + * * rec - W3C recommendation + * * pr - W3C proposed recommendation + * * cr - W3C candidate recommendation + * * wd - W3C working draft + * * other - Non-W3C, but reputable + * * unoff - Unofficial + */ +export type FeatureStatus = "ls" | "rec" | "pr" | "cr" | "wd" | "other" | "unoff" | string; + +/** + * Encoded support status: + * * `n` - not supported + * * `p` - not supported, polyfill available + * * `u` - unknown + * * `a x` - partially supported, vendor prefix + * * `a` - partially supported + * * `y x` - fully supported, vendor prefix + * * `y` - fully supported + * + * The support status can additionally have one or more footnote references as `#`, f.e. + * `a x #1 #3`. + */ +export type SupportStatus = 'n' | 'p' | 'u' | "a x" | 'a' | "y x" | 'y' | string; + +/** + * Provides information about the Agent. + */ +export interface Agent { + /** + * Global agent usage by version + */ + usage_global: UsageByVersion; + + /** + * The agents vendor prefix + */ + prefix: string; + + /** + * Version matrix. See [caniuse](https://caniuse.com) + */ + versions: [ // Tuple of 70 version slots: + string|null, string|null, string|null, string|null, string|null, + string|null, string|null, string|null, string|null, string|null, + string|null, string|null, string|null, string|null, string|null, + string|null, string|null, string|null, string|null, string|null, + string|null, string|null, string|null, string|null, string|null, + string|null, string|null, string|null, string|null, string|null, + string|null, string|null, string|null, string|null, string|null, + string|null, string|null, string|null, string|null, string|null, + string|null, string|null, string|null, string|null, string|null, + string|null, string|null, string|null, string|null, string|null, + string|null, string|null, string|null, string|null, string|null, + string|null, string|null, string|null, string|null, string|null, + string|null, string|null, string|null, string|null, string|null, + string|null, string|null, string|null, string|null, string|null ]; + + /** + * The agent's name + */ + browser: string; + + /** + * Release dates as seconds since epoch by version. + */ + release_date: { [version: string]: number | undefined }; + + /** + * Exceptions to vendor prefix use. + */ + prefix_exceptions?: { [version: string]: string | undefined }; +} + +/** + * Specifies a feature and its support status in all known agent versions. + */ +export interface Feature { + /** + * Specification status of the feature. + */ + status: FeatureStatus; + + /** + * Descriptive title of the feature. + */ + title: string; + + /** + * Agent support matrix for this feature. + */ + stats: StatsByAgentID; +} + +/** + * A space optimized version of Feature that can be unpacked using `feature(PackedFeature)`. + */ +export interface PackedFeature { + [encodedKey: string]: any; +} + +/** + * A space optimized version of Region that can be unpacked using `region(PackedFeature)`. + */ +export interface PackedRegion { + [encodedKey: string]: any; +} diff --git a/types/caniuse-lite/tsconfig.json b/types/caniuse-lite/tsconfig.json new file mode 100644 index 0000000000..adcea4d555 --- /dev/null +++ b/types/caniuse-lite/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "caniuse-lite-tests.ts" + ] +} diff --git a/types/caniuse-lite/tslint.json b/types/caniuse-lite/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/caniuse-lite/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From b81e520dc29fb85d68891b348d26556374d3e35c Mon Sep 17 00:00:00 2001 From: Abhi Aiyer Date: Wed, 5 Dec 2018 12:11:31 -0800 Subject: [PATCH 411/608] fix typings for chatter and metadata for finally --- types/jsforce/api/chatter.d.ts | 4 ++-- types/jsforce/api/metadata.d.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/types/jsforce/api/chatter.d.ts b/types/jsforce/api/chatter.d.ts index 5c300a7b4e..c712187559 100644 --- a/types/jsforce/api/chatter.d.ts +++ b/types/jsforce/api/chatter.d.ts @@ -41,8 +41,8 @@ export class Request implements Promise { then(onfulfilled?: ((value: T) => (PromiseLike | TResult1)) | null | undefined, onrejected?: ((reason: any) => (PromiseLike | TResult2)) | null | undefined): Promise; - finally(onfinally?: () => void): Promise - + finally(onfinally?: () => void): Promise; + thenCall(callback?: (err: Error, records: T) => void): Query; readonly [Symbol.toStringTag]: 'Promise'; diff --git a/types/jsforce/api/metadata.d.ts b/types/jsforce/api/metadata.d.ts index ce7476a731..c6aec12e7e 100644 --- a/types/jsforce/api/metadata.d.ts +++ b/types/jsforce/api/metadata.d.ts @@ -124,8 +124,8 @@ export class AsyncResultLocator extends EventEmitter implements Promise { then(onfulfilled?: ((value: T) => (PromiseLike | TResult1)) | null | undefined, onrejected?: ((reason: any) => (PromiseLike | TResult2)) | null | undefined): Promise; - finally(onfinally?: () => void): Promise - + finally(onfinally?: () => void): Promise; + readonly [Symbol.toStringTag]: "Promise"; } From 36e268033babcc716200192c72ba839daa43d7f9 Mon Sep 17 00:00:00 2001 From: jeremy Date: Wed, 5 Dec 2018 23:21:11 +0100 Subject: [PATCH 412/608] Add types for json-server --- types/json-server/index.d.ts | 72 ++++++++++++++++++++++++++ types/json-server/json-server-tests.ts | 41 +++++++++++++++ types/json-server/tsconfig.json | 16 ++++++ types/json-server/tslint.json | 1 + 4 files changed, 130 insertions(+) create mode 100644 types/json-server/index.d.ts create mode 100644 types/json-server/json-server-tests.ts create mode 100644 types/json-server/tsconfig.json create mode 100644 types/json-server/tslint.json diff --git a/types/json-server/index.d.ts b/types/json-server/index.d.ts new file mode 100644 index 0000000000..c52a4b220e --- /dev/null +++ b/types/json-server/index.d.ts @@ -0,0 +1,72 @@ +// Type definitions for json-server 0.14 +// Project: https://github.com/typicode/json-server +// Definitions by: Jeremy Bensimon +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +import { NextHandleFunction } from 'connect'; +import { Application, RequestHandler, Router } from 'express'; + +/** + * Returns an Express server. + */ +export function create(): Application; + +/** + * Returns middlewares used by JSON Server. + */ +export function defaults(options?: MiddlewaresOptions): RequestHandler[]; + +/** + * Returns JSON Server router. + * @param source Either a path to a json file (e.g. `'db.json'`) or an object in memory + * @param options Set foreign key suffix (default: `'Id'`) + */ +export function router(source: string | object, options?: { foreignKeySuffix: string }): Router; + +/** + * Add custom rewrite rules. + */ +export function rewriter(rules: { [rule: string]: string }): Router; + +/** + * Returns body-parser middleware used by JSON Server router. + * + * @returns + * ``` + * [bodyParser.json({ limit: '10mb', extended: false }), bodyParser.urlencoded({ extended: false })] + * ``` + */ +export const bodyParser: [NextHandleFunction, NextHandleFunction]; + +export interface MiddlewaresOptions { + /** + * Path to static files + * @default "public" (if folder exists) + */ + static?: string; + + /** + * Enable logger middleware + * @default true + */ + logger?: boolean; + + /** + * Enable body-parser middleware + * @default true + */ + bodyParser?: boolean; + + /** + * Disable CORS + * @default false + */ + noCors?: boolean; + + /** + * Accept only GET requests + * @default false + */ + readOnly?: boolean; +} diff --git a/types/json-server/json-server-tests.ts b/types/json-server/json-server-tests.ts new file mode 100644 index 0000000000..d68484b1ff --- /dev/null +++ b/types/json-server/json-server-tests.ts @@ -0,0 +1,41 @@ +import * as jsonServer from 'json-server'; + +const server = jsonServer.create(); + +const inMemoryDbRouter = jsonServer.router({ todos: [] as any[], users: [] as any[] }); + +const router = jsonServer.router('db.json', { foreignKeySuffix: '_id' }); + +const middlewaresOptions: jsonServer.MiddlewaresOptions = { + bodyParser: true, + logger: false, + noCors: true, + readOnly: true, + static: 'assets', +}; + +const middlewares = jsonServer.defaults(middlewaresOptions); + +const rewriter = jsonServer.rewriter({ + '/api/*': '/$1', + '/blog/:resource/:id/show': '/:resource/:id', +}); + +server.use(jsonServer.bodyParser); + +server.use((req, res, next) => { + if (req.method === 'POST') { + req.body.createdAt = Date.now(); + } + next(); +}); + +server.use(rewriter); + +server.use(middlewares); + +server.use(router); + +server.listen(3000, () => { + console.log('JSON Server is running'); +}); diff --git a/types/json-server/tsconfig.json b/types/json-server/tsconfig.json new file mode 100644 index 0000000000..e923ac1d7a --- /dev/null +++ b/types/json-server/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "json-server-tests.ts"] +} diff --git a/types/json-server/tslint.json b/types/json-server/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/json-server/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From b95a55fbe079cbd34adf870f68b4780a9373bde5 Mon Sep 17 00:00:00 2001 From: Minjie Shen Date: Thu, 6 Dec 2018 09:36:54 +1100 Subject: [PATCH 413/608] Update style according to linter --- types/netease-captcha/index.d.ts | 29 ++++++++++--------- .../netease-captcha/netease-captcha-tests.ts | 9 +++--- types/netease-captcha/tsconfig.json | 5 ++-- 3 files changed, 21 insertions(+), 22 deletions(-) diff --git a/types/netease-captcha/index.d.ts b/types/netease-captcha/index.d.ts index 7a199b6d85..fbdfb03e7d 100644 --- a/types/netease-captcha/index.d.ts +++ b/types/netease-captcha/index.d.ts @@ -1,41 +1,40 @@ -// Type definitions for netease-captcha x.x +// Type definitions for netease-captcha 2.1 // Project: https://cstaticdun.126.net/load.min.js // Definitions by: Minjie Shen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -declare interface Window { +interface Window { initNECaptcha?: NeteaseCaptcha.InitFunction; } declare namespace NeteaseCaptcha { - declare type InitFunction = (config: Config, onLoad?: onLoad, onError?: onError) => void; + type InitFunction = (config: Config, onLoad?: onLoad, onError?: onError) => void; - declare type Config = { + interface Config { /** * Verification code id */ - captchaId: string, + captchaId: string; /** * Selector string or HTMLElement to render widget into */ - element: string | HTMLElement, + element: string | HTMLElement; /** * Defaults to 'float' on desktop, and 'popup' on mobile */ - mode?: 'float' | 'embed' | 'popup', + mode?: 'float' | 'embed' | 'popup'; /** * Defaults to page protocol */ - protocol?: 'http' | 'https', + protocol?: 'http' | 'https'; /** * Defaults to 'auto' */ - width?: number | string, + width?: number | string; /** * Defaults to 'zh-CN' @@ -45,9 +44,9 @@ declare namespace NeteaseCaptcha { onReady?(instance: Instance): void; onVerify?(error: any, data: Data): void; - }; + } - type Instance = { + interface Instance { /** * Refresh the instance to get new verification information */ @@ -62,9 +61,11 @@ declare namespace NeteaseCaptcha { * Available when the mode is set to 'popup' - opens the popup to accept verification */ popUp?(): void; - }; + } - type Data = { validate: string }; + interface Data { + validate: string; + } type onLoad = (instance: Instance) => void; diff --git a/types/netease-captcha/netease-captcha-tests.ts b/types/netease-captcha/netease-captcha-tests.ts index 05ed51c2bb..c174affdf0 100644 --- a/types/netease-captcha/netease-captcha-tests.ts +++ b/types/netease-captcha/netease-captcha-tests.ts @@ -1,4 +1,4 @@ -const config : NeteaseCaptcha.Config = { +const config: NeteaseCaptcha.Config = { captchaId: 'FAKE ID', element: '#captcha', mode: 'popup', @@ -10,12 +10,11 @@ const config : NeteaseCaptcha.Config = { } }; -const onLoad : NeteaseCaptcha.onLoad = (instance : NeteaseCaptcha.Instance) => void { +const onLoad: NeteaseCaptcha.onLoad = (instance: NeteaseCaptcha.Instance) => { instance.refresh(); instance.destroy(); -} +}; -function init(initNECaptcha : NeteaseCaptcha.InitFunction) => void { +function init(initNECaptcha: NeteaseCaptcha.InitFunction): void { initNECaptcha(config, onLoad); } - diff --git a/types/netease-captcha/tsconfig.json b/types/netease-captcha/tsconfig.json index 67a7f5dd64..11afad945f 100644 --- a/types/netease-captcha/tsconfig.json +++ b/types/netease-captcha/tsconfig.json @@ -1,12 +1,11 @@ { "compilerOptions": { "module": "commonjs", - "lib": [ - "es6" - ], + "lib": ["es6", "dom"], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, + "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ "../" From 8b5e6afb2fee6cb6ae8b31845d18e4ff85bc49ba Mon Sep 17 00:00:00 2001 From: Alan Plum Date: Wed, 5 Dec 2018 23:39:57 +0100 Subject: [PATCH 414/608] Unbreak the build --- types/json_ml/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/json_ml/index.d.ts b/types/json_ml/index.d.ts index e2eb2c7af4..7cab812880 100644 --- a/types/json_ml/index.d.ts +++ b/types/json_ml/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/59naga/json-ml // Definitions by: Alan Plum // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.0 /// From 5d5e47bc5aa15e8f499bd35b033ec297dabda48b Mon Sep 17 00:00:00 2001 From: Minjie Shen Date: Thu, 6 Dec 2018 10:59:44 +1100 Subject: [PATCH 415/608] Add test for window attribute --- types/netease-captcha/netease-captcha-tests.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/types/netease-captcha/netease-captcha-tests.ts b/types/netease-captcha/netease-captcha-tests.ts index c174affdf0..ee73302cc1 100644 --- a/types/netease-captcha/netease-captcha-tests.ts +++ b/types/netease-captcha/netease-captcha-tests.ts @@ -13,8 +13,11 @@ const config: NeteaseCaptcha.Config = { const onLoad: NeteaseCaptcha.onLoad = (instance: NeteaseCaptcha.Instance) => { instance.refresh(); instance.destroy(); + if (instance.popUp) { + instance.popUp(); + } }; -function init(initNECaptcha: NeteaseCaptcha.InitFunction): void { - initNECaptcha(config, onLoad); +if (window.initNECaptcha) { + window.initNECaptcha(config, onLoad); } From f2733e26dfcb127c4dfe19f19211c8989c62f3b4 Mon Sep 17 00:00:00 2001 From: Kamontat Chantrachirathumrong Date: Thu, 6 Dec 2018 01:02:35 +0100 Subject: [PATCH 416/608] fix lint error --- types/prompts/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/prompts/index.d.ts b/types/prompts/index.d.ts index 0db58ea435..7dc3a928a7 100644 --- a/types/prompts/index.d.ts +++ b/types/prompts/index.d.ts @@ -89,7 +89,7 @@ declare namespace prompts { type Falsy = false | null | undefined; - type PromptType = "text" | "password" | "invisible" | "number" | "confirm" | "list" | "toggle" | "select" | "multiselect" | "autocomplete" | Falsy + type PromptType = "text" | "password" | "invisible" | "number" | "confirm" | "list" | "toggle" | "select" | "multiselect" | "autocomplete"; type ValueOrFunc = T | PrevCaller; } From 83a6d98e96ae9f8c173e40592b4f6e3cf2d071f1 Mon Sep 17 00:00:00 2001 From: Mark Lee Date: Wed, 5 Dec 2018 18:51:54 -0800 Subject: [PATCH 417/608] Update types for Electron Packager to 13.0 --- .../electron-packager-tests.ts | 37 ++++++----------- types/electron-packager/index.d.ts | 41 +++++++++---------- 2 files changed, 33 insertions(+), 45 deletions(-) diff --git a/types/electron-packager/electron-packager-tests.ts b/types/electron-packager/electron-packager-tests.ts index 06cadf97f0..6b10ea4bf3 100644 --- a/types/electron-packager/electron-packager-tests.ts +++ b/types/electron-packager/electron-packager-tests.ts @@ -13,25 +13,6 @@ function ignoreFunction(path: string) { return true; } -// this is the obsolete API and will be removed in a future version - -packager({ - dir: ".", - name: "myapplication", - platform: "win32", - arch: "all", - electronVersion: "0.34.0", - win32metadata: { - CompanyName: "Acme CO", - FileDescription: "My application", - OriginalFilename: "myapp.exe", - ProductName: "Application", - InternalName: "roadrunner", - "requested-execution-level": "highestAvailable", - "application-manifest": "manifest.xml" - } -}, callback); - function onCompleted(appPaths: string | string[]) { } @@ -102,7 +83,7 @@ packager({ afterExtract: [ completeFunction ], - afterPrune: [ + afterPrune: [ completeFunction ], appCopyright: "Copyright", @@ -122,7 +103,6 @@ packager({ ignore: /ab+c/, out: "out", overwrite: true, - packageManager: false, prune: true, quiet: true, tmpdir: "/tmp", @@ -157,7 +137,6 @@ packager({ new RegExp('abc') ], overwrite: false, - packageManager: "npm", platform: "darwin", prune: false, quiet: false, @@ -184,7 +163,14 @@ packager({ strictSSL: false }, ignore: ignoreFunction, - packageManager: "cnpm", + platform: "linux" +}).then(onCompleted).catch(onError); + +packager({ + dir: ".", + arch: "mips64el", + electronVersion: "1.8.8", + prebuiltAsar: "prebuilt.asar", platform: "linux" }).then(onCompleted).catch(onError); @@ -200,11 +186,14 @@ packager({ quiet: true, strictSSL: false }, - packageManager: "yarn", platform: "mas", extendInfo: { foo: "bar" }, + osxNotarize: { + appleId: "My ID", + appleIdPassword: "Bad Password" + }, osxSign: { identity: "myidentity", entitlements: "path/to/my.entitlements", diff --git a/types/electron-packager/index.d.ts b/types/electron-packager/index.d.ts index 0e438ebc6e..04e62a28b5 100644 --- a/types/electron-packager/index.d.ts +++ b/types/electron-packager/index.d.ts @@ -1,9 +1,10 @@ -// Type definitions for electron-packager 12.0 +// Type definitions for electron-packager 13.0 // Project: https://github.com/electron-userland/electron-packager // Definitions by: Maxime LUCE // Juan Jimenez-Anca // John Kleinschmidt // Brendan Forster +// Mark Lee // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -23,20 +24,6 @@ export = electronPackager; */ declare function electronPackager(opts: electronPackager.Options): Promise; -/** - * This will: - * - Find or download the correct release of Electron - * - Use that version of electron to create a app in /-- - * - * You should be able to launch the app on the platform you built for. If not, check your settings and try again. - * - * @param opts - Options to configure packaging. - * @param callback - Callback which is called when packaging is done or an error occured. - * - * @deprecated since version 12.0 - */ -declare function electronPackager(opts: electronPackager.Options, callback: electronPackager.finalCallback): void; - declare namespace electronPackager { /** * Callback which is called when electron-packager is done. @@ -48,8 +35,7 @@ declare namespace electronPackager { type ignoreFunction = (path: string) => boolean; type onCompleteFn = (buildPath: string, electronVersion: string, platform: string, arch: string, callbackFn: () => void) => void; - type arch = "ia32" | "x64" | "armv7l" | "arm64" |"all"; - type packageManager = "npm" | "cnpm" | "yarn" | false; + type arch = "ia32" | "x64" | "armv7l" | "arm64" | "mips64el" | "all"; type platform = "linux" | "win32" | "darwin" | "mas" | "all"; interface AsarOptions { @@ -65,6 +51,11 @@ declare namespace electronPackager { strictSSL?: boolean; } + interface ElectronNotarizeOptions { + appleId: string; + appleIdPassword: string; + } + interface ElectronOsXSignOptions { identity?: string; entitlements?: string; @@ -116,6 +107,10 @@ declare namespace electronPackager { * Whether to package the application's source code into an archive, using Electron's archive format */ asar?: boolean | AsarOptions; + /** + * The path to a prebuilt ASAR file. + */ + prebuiltAsar?: string; /** * The build version of the application. Defaults to the value of appVersion. * Maps to the FileVersion metadata property on Windows, and CFBundleVersion on OS X. @@ -160,10 +155,6 @@ declare namespace electronPackager { * Whether to replace an already existing output directory for a given platform (true) or skip recreating it (false). */ overwrite?: boolean; - /** - * The package manager used to prune devDependencies modules from the outputted Electron app - */ - packageManager?: packageManager; /** * The target platform(s) to build for. Not required if the all option is set. */ @@ -202,6 +193,14 @@ declare namespace electronPackager { * The bundle identifier to use in the application helper's plist. */ helperBundleId?: string; + /** + * Forces support for Mojave (macOS 10.14) dark mode in the packaged app. + */ + darwinDarkModeSupport?: boolean; + /** + * If present, notarizes OS X target apps when the host platform is OS X and XCode is installed. + */ + osxNotarize?: ElectronNotarizeOptions; /** * If present, signs OS X target apps when the host platform is OS X and XCode is installed. */ From fa958ebb69b88685129d6f7fc8f081ed6f3485ab Mon Sep 17 00:00:00 2001 From: danford Date: Thu, 6 Dec 2018 15:50:48 +1100 Subject: [PATCH 418/608] remove stray semicolon --- types/react-css-collapse/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-css-collapse/index.d.ts b/types/react-css-collapse/index.d.ts index aa17200367..0fb568beef 100644 --- a/types/react-css-collapse/index.d.ts +++ b/types/react-css-collapse/index.d.ts @@ -1,5 +1,5 @@ // Type definitions for react-css-collapse 3.6.0 -// Project: https://github.com/SparebankenVest/react-css-collapse; +// Project: https://github.com/SparebankenVest/react-css-collapse // Definitions by: Daniel Ford // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 From 4facac46480208ba90e13d2c5f27beca147e5107 Mon Sep 17 00:00:00 2001 From: danford Date: Thu, 6 Dec 2018 15:51:13 +1100 Subject: [PATCH 419/608] Re-enforce nullchecks --- types/react-css-collapse/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-css-collapse/tsconfig.json b/types/react-css-collapse/tsconfig.json index 4af49b9769..efb2921718 100644 --- a/types/react-css-collapse/tsconfig.json +++ b/types/react-css-collapse/tsconfig.json @@ -7,7 +7,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ From f75ae9b0aede62bef173d5fa6de0ed94fbbd8fa4 Mon Sep 17 00:00:00 2001 From: danford Date: Thu, 6 Dec 2018 15:51:45 +1100 Subject: [PATCH 420/608] Only disable necessary lint rule --- types/react-css-collapse/tslint.json | 75 +--------------------------- 1 file changed, 1 insertion(+), 74 deletions(-) diff --git a/types/react-css-collapse/tslint.json b/types/react-css-collapse/tslint.json index a41bf5d19a..9ce242b768 100644 --- a/types/react-css-collapse/tslint.json +++ b/types/react-css-collapse/tslint.json @@ -1,79 +1,6 @@ { "extends": "dtslint/dt.json", "rules": { - "adjacent-overload-signatures": false, - "array-type": false, - "arrow-return-shorthand": false, - "ban-types": false, - "callable-types": false, - "comment-format": false, - "dt-header": false, - "eofline": false, - "export-just-namespace": false, - "import-spacing": false, - "interface-name": false, - "interface-over-type-literal": false, - "jsdoc-format": false, - "max-line-length": false, - "member-access": false, - "new-parens": false, - "no-any-union": false, - "no-boolean-literal-compare": false, - "no-conditional-assignment": false, - "no-consecutive-blank-lines": false, - "no-construct": false, - "no-declare-current-package": false, - "no-duplicate-imports": false, - "no-duplicate-variable": false, - "no-empty-interface": false, - "no-for-in-array": false, - "no-inferrable-types": false, - "no-internal-module": false, - "no-irregular-whitespace": false, - "no-mergeable-namespace": false, - "no-misused-new": false, - "no-namespace": false, - "no-object-literal-type-assertion": false, - "no-padding": false, - "no-redundant-jsdoc": false, - "no-redundant-jsdoc-2": false, - "no-redundant-undefined": false, - "no-reference-import": false, - "no-relative-import-in-test": false, - "no-self-import": false, - "no-single-declare-module": false, - "no-string-throw": false, - "no-unnecessary-callback-wrapper": false, - "no-unnecessary-class": false, - "no-unnecessary-generics": false, - "no-unnecessary-qualifier": false, - "no-unnecessary-type-assertion": false, - "no-useless-files": false, - "no-var-keyword": false, - "no-var-requires": false, - "no-void-expression": false, - "no-trailing-whitespace": false, - "object-literal-key-quotes": false, - "object-literal-shorthand": false, - "one-line": false, - "one-variable-per-declaration": false, - "only-arrow-functions": false, - "prefer-conditional-expression": false, - "prefer-const": false, - "prefer-declare-function": false, - "prefer-for-of": false, - "prefer-method-signature": false, - "prefer-template": false, - "radix": false, - "semicolon": false, - "space-before-function-paren": false, - "space-within-parens": false, - "strict-export-declare-modifiers": false, - "trim-file": false, - "triple-equals": false, - "typedef-whitespace": false, - "unified-signatures": false, - "void-return": false, - "whitespace": false + "no-duplicate-imports": false } } From 3f45d4caeb3ac5da6c74f4065c810da141df8b45 Mon Sep 17 00:00:00 2001 From: danford Date: Thu, 6 Dec 2018 16:24:18 +1100 Subject: [PATCH 421/608] lint adjustments --- types/react-css-collapse/index.d.ts | 4 ++-- types/react-css-collapse/tslint.json | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/types/react-css-collapse/index.d.ts b/types/react-css-collapse/index.d.ts index 0fb568beef..e454d5946b 100644 --- a/types/react-css-collapse/index.d.ts +++ b/types/react-css-collapse/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-css-collapse 3.6.0 +// Type definitions for react-css-collapse 3.6 // Project: https://github.com/SparebankenVest/react-css-collapse // Definitions by: Daniel Ford // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -12,7 +12,7 @@ declare module 'react-css-collapse' { transition?: string | null; } class Collapse extends React.Component { - public render(): React.ReactElement; + render(): React.ReactElement; } export default Collapse; } diff --git a/types/react-css-collapse/tslint.json b/types/react-css-collapse/tslint.json index 9ce242b768..9e934cc4fe 100644 --- a/types/react-css-collapse/tslint.json +++ b/types/react-css-collapse/tslint.json @@ -1,6 +1,8 @@ { "extends": "dtslint/dt.json", "rules": { - "no-duplicate-imports": false + "no-single-declare-module": false, + "no-declare-current-package": false, + "no-duplicate-imports": false } } From 951ef11442daac4b5873e84bcfac1b262e75299d Mon Sep 17 00:00:00 2001 From: Leko Date: Thu, 6 Dec 2018 16:29:51 +0900 Subject: [PATCH 422/608] Add type definitions for ghauth 3.2 --- types/ghauth/ghauth-tests.ts | 27 ++++++++++++++++++++++ types/ghauth/index.d.ts | 45 ++++++++++++++++++++++++++++++++++++ types/ghauth/tsconfig.json | 23 ++++++++++++++++++ types/ghauth/tslint.json | 1 + 4 files changed, 96 insertions(+) create mode 100644 types/ghauth/ghauth-tests.ts create mode 100644 types/ghauth/index.d.ts create mode 100644 types/ghauth/tsconfig.json create mode 100644 types/ghauth/tslint.json diff --git a/types/ghauth/ghauth-tests.ts b/types/ghauth/ghauth-tests.ts new file mode 100644 index 0000000000..7757cf24dd --- /dev/null +++ b/types/ghauth/ghauth-tests.ts @@ -0,0 +1,27 @@ +import ghauth, { AuthOptions, TokenData } from "ghauth"; + +// Full +const authOptions1: AuthOptions = { + configName: "awesome", + noSave: true, + authUrl: "https://api.github.com/authorizations", + promptName: "GitHub", + scopes: ["user"], + note: "This token is for my awesome app", + userAgent: "My Awesome App", +}; + +ghauth(authOptions1, (err: Error, authData: TokenData) => { + authData.user; + authData.token; +}); + +// Required +const authOptions2: AuthOptions = { + configName: "awesome", +}; + +ghauth(authOptions2, (err: Error, authData: TokenData) => { + authData.user; + authData.token; +}); diff --git a/types/ghauth/index.d.ts b/types/ghauth/index.d.ts new file mode 100644 index 0000000000..e21afdf3fa --- /dev/null +++ b/types/ghauth/index.d.ts @@ -0,0 +1,45 @@ +// Type definitions for ghauth 3.2 +// Project: https://github.com/rvagg/ghauth +// Definitions by: Leko +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export interface AuthOptions { + configName: string; + + /** + * @default false + */ + noSave?: boolean; + + /** + * @default "https://api.github.com/authorizations" + */ + authUrl?: string; + + /** + * @default "GitHub" + */ + promptName?: string; + + /** + * @default [] + */ + scopes?: ReadonlyArray; + + /** + * @default "Node.js command-line app with ghauth" + */ + note?: string; + + /** + * @default "Magic Node.js application that does magic things with ghauth" + */ + userAgent?: string; +} + +export interface TokenData { + user: string; + token: string; +} + +export default function ghauth(authOptions: AuthOptions, callback: (err: Error, tokenData: TokenData) => void): void; diff --git a/types/ghauth/tsconfig.json b/types/ghauth/tsconfig.json new file mode 100644 index 0000000000..0b946b4ae8 --- /dev/null +++ b/types/ghauth/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "ghauth-tests.ts" + ] +} diff --git a/types/ghauth/tslint.json b/types/ghauth/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/ghauth/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 00f0ac3ca31598c7d723ec7c3dc58c1128c02e30 Mon Sep 17 00:00:00 2001 From: kiliw Date: Wed, 5 Dec 2018 11:06:45 +0100 Subject: [PATCH 423/608] Add ifElse overload to accept binary functions and link to ramda REPL. --- types/ramda/index.d.ts | 1 + types/ramda/ramda-tests.ts | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/types/ramda/index.d.ts b/types/ramda/index.d.ts index a3bc51c8ca..b28b2ec540 100644 --- a/types/ramda/index.d.ts +++ b/types/ramda/index.d.ts @@ -1122,6 +1122,7 @@ declare namespace R { * of the condition predicate. */ ifElse(fn: Pred, onTrue: Arity1Fn, onFalse: Arity1Fn): Arity1Fn; + ifElse(fn: Pred, onTrue: Arity2Fn, onFalse: Arity2Fn): Arity2Fn; /** * Increments its argument. diff --git a/types/ramda/ramda-tests.ts b/types/ramda/ramda-tests.ts index 2f68808d17..495fe3dd54 100644 --- a/types/ramda/ramda-tests.ts +++ b/types/ramda/ramda-tests.ts @@ -2650,6 +2650,17 @@ class Rectangle { flattenArrays([[[10], 123], [8, [10]], "hello"]); // => [[10, 123], [8, 10], "hello"] }; +() => { + const incCount = R.ifElse( + R.has('count'), + R.over(R.lensProp('count'), R.inc), + R.assoc('count', 1) + ); + incCount({}); // => { count: 1 } + incCount({ count: 1 }); // => { count: 2 } + R.ifElse(R.identical, R.add as (a: number, b: number) => number, R.always(""))(2, 2); // https://goo.gl/CVUSs9 +}; + () => { R.isEmpty([1, 2, 3]); // => false R.isEmpty([]); // => true From 0df59a63921c700104afd1b1baeb0c07e3707aa3 Mon Sep 17 00:00:00 2001 From: pawkrol Date: Thu, 6 Dec 2018 09:11:42 +0100 Subject: [PATCH 424/608] Change semantics for import --- types/mathjs/index.d.ts | 16 ++++++++++------ types/mathjs/mathjs-tests.ts | 15 ++++++++++++--- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/types/mathjs/index.d.ts b/types/mathjs/index.d.ts index e335421701..a8ec6114eb 100644 --- a/types/mathjs/index.d.ts +++ b/types/mathjs/index.d.ts @@ -2575,16 +2575,20 @@ declare namespace math { /** * Import functions from an object or a module + * To avoid errors when using one of the imported functions extend module like this: + * + * @example + * // imported_math_functions.ts + * declare module 'mathjs' { + * interface MathJsStatic { + * hello(a: number): number; + * } + * } + * * @param object An object with functions to be imported. * @param options An object with import options. */ import(object: ImportObject | ImportObject[], options: ImportOptions): void; - // TypeScript Version: 2.4 - - /** - * It may not exists - this is _only_ for import functionality. - */ - [key: string]: any; } interface Matrix { diff --git a/types/mathjs/mathjs-tests.ts b/types/mathjs/mathjs-tests.ts index c5eadb82a5..0d21be817e 100644 --- a/types/mathjs/mathjs-tests.ts +++ b/types/mathjs/mathjs-tests.ts @@ -1,3 +1,6 @@ +// Import needed for mathjs.import functionality (declaring/extending module) +import * as math from 'mathjs'; + /* Basic usage examples */ @@ -396,10 +399,16 @@ JSON serialization/deserialization /* Extend functionality with import */ + +declare module 'mathjs' { + interface MathJsStatic { + testFun(): number; + value: number; + } +} + { - const testFun = function() { - return 5; - }; + const testFun = () => 5; math.import({ testFun, From 3458e059eb3bc46ae19f6486e2899bbb93edbdf0 Mon Sep 17 00:00:00 2001 From: Jonas Kugelmann Date: Thu, 6 Dec 2018 09:18:05 +0100 Subject: [PATCH 425/608] Adjusted naming of WizardStepObject to StepObject --- types/react-albus/index.d.ts | 14 +++++++------- types/react-albus/react-albus-tests.tsx | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/types/react-albus/index.d.ts b/types/react-albus/index.d.ts index 371a50cca7..ccc0ac8582 100644 --- a/types/react-albus/index.d.ts +++ b/types/react-albus/index.d.ts @@ -9,13 +9,13 @@ import * as React from "react"; import { History } from "history"; -export interface WizardStepObject { +export interface StepObject { id: string; } export interface WizardContext { - step: WizardStepObject; - steps: WizardStepObject[]; + step: StepObject; + steps: StepObject[]; history: History; next: () => void; previous: () => void; @@ -42,22 +42,22 @@ export interface WizardProps { export const Wizard: React.ComponentType; export interface StepsProps { - step?: WizardStepObject; + step?: StepObject; } export const Steps: React.ComponentType; -export type StepProps = WizardStepObject & ( +export type StepProps = StepObject & ( | { render?: (wizard: WizardContext) => React.ReactNode } | { children: (wizard: WizardContext) => React.ReactNode }); /** * In addition to id, any additional props added to will be available on each step object. * This can be used to add names, descriptions, or other metadata to each step. - * To use this feature generally you need to augment the WizardStepObject + * To use this feature globally in your project you need to augment the StepObject * @example * declare module "react-albus" { - * interface WizardStepObject { + * interface StepObject { * propName: string; * } * } diff --git a/types/react-albus/react-albus-tests.tsx b/types/react-albus/react-albus-tests.tsx index f03e57cc2e..57fe8147d1 100644 --- a/types/react-albus/react-albus-tests.tsx +++ b/types/react-albus/react-albus-tests.tsx @@ -2,7 +2,7 @@ import * as React from "react"; import { Wizard, Step, Steps, withWizard } from "react-albus"; declare module "react-albus" { - interface WizardStepObject { + interface StepObject { quote?: string; } } From 5536ed5c7108a7a5baac3e283fcc636c45529183 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Wed, 5 Dec 2018 01:49:38 +0100 Subject: [PATCH 426/608] Add types for liftoff --- types/fined/index.d.ts | 2 +- types/liftoff/index.d.ts | 203 +++++++++++++++++++++++++++++++++ types/liftoff/liftoff-tests.ts | 182 +++++++++++++++++++++++++++++ types/liftoff/tsconfig.json | 23 ++++ types/liftoff/tslint.json | 1 + 5 files changed, 410 insertions(+), 1 deletion(-) create mode 100644 types/liftoff/index.d.ts create mode 100644 types/liftoff/liftoff-tests.ts create mode 100644 types/liftoff/tsconfig.json create mode 100644 types/liftoff/tslint.json diff --git a/types/fined/index.d.ts b/types/fined/index.d.ts index e19bad318a..107a40760c 100644 --- a/types/fined/index.d.ts +++ b/types/fined/index.d.ts @@ -11,7 +11,7 @@ declare namespace fined { interface PathSpec { path?: string; name?: string; - extensions?: string | string[] | { [extension: string]: string }; + extensions?: string | string[] | { [extension: string]: string | null }; cwd?: string; findUp?: boolean; } diff --git a/types/liftoff/index.d.ts b/types/liftoff/index.d.ts new file mode 100644 index 0000000000..91316ead82 --- /dev/null +++ b/types/liftoff/index.d.ts @@ -0,0 +1,203 @@ +// Type definitions for liftoff 2.5 +// Project: https://github.com/js-cli/js-liftoff#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import { Extensions, Extension, ExtensionDescriptor } from 'interpret'; +import { PathSpec } from 'fined'; +import { EventEmitter } from 'events'; + +export = Liftoff; + +declare class Liftoff extends EventEmitter { + /** + * Create an instance of Liftoff to invoke your application. + */ + constructor(options?: Liftoff.Options); + + /** + * Launches your application with provided options, builds an environment, + * and invokes your callback, passing the calculated environment as the first argument. + */ + launch( + opts: Liftoff.LaunchOptions, + callback: (this: this, env: Liftoff.LiftoffEnv) => void + ): void; + + addListener( + event: 'require', + listener: (name: string, module: ExtensionDescriptor) => void + ): this; + addListener(event: 'requireFail', listener: (name: string, err: any) => void): this; + addListener(event: 'respawn', listener: (flags: string[], child: NodeJS.Process) => void): this; + on(event: 'require', listener: (name: string, module: ExtensionDescriptor) => void): this; + on(event: 'requireFail', listener: (name: string, err: any) => void): this; + on(event: 'respawn', listener: (flags: string[], child: NodeJS.Process) => void): this; + once(event: 'require', listener: (name: string, module: ExtensionDescriptor) => void): this; + once(event: 'requireFail', listener: (name: string, err: any) => void): this; + once(event: 'respawn', listener: (flags: string[], child: NodeJS.Process) => void): this; + prependListener( + event: 'require', + listener: (name: string, module: ExtensionDescriptor) => void + ): this; + prependListener(event: 'requireFail', listener: (name: string, err: any) => void): this; + prependListener( + event: 'respawn', + listener: (flags: string[], child: NodeJS.Process) => void + ): this; + prependOnceListener( + event: 'require', + listener: (name: string, module: ExtensionDescriptor) => void + ): this; + prependOnceListener(event: 'requireFail', listener: (name: string, err: any) => void): this; + prependOnceListener( + event: 'respawn', + listener: (flags: string[], child: NodeJS.Process) => void + ): this; + removeListener( + event: 'require', + listener: (name: string, module: ExtensionDescriptor) => void + ): this; + removeListener(event: 'requireFail', listener: (name: string, err: any) => void): this; + removeListener( + event: 'respawn', + listener: (flags: string[], child: NodeJS.Process) => void + ): this; + off(event: 'require', listener: (name: string, module: ExtensionDescriptor) => void): this; + off(event: 'requireFail', listener: (name: string, err: any) => void): this; + off(event: 'respawn', listener: (flags: string[], child: NodeJS.Process) => void): this; + removeAllListeners(event?: 'require' | 'requireFail' | 'respawn'): this; + listeners(event: 'require' | 'requireFail' | 'respawn'): Function[]; // tslint:disable-line:ban-types + rawListeners(event: 'require' | 'requireFail' | 'respawn'): Function[]; // tslint:disable-line:ban-types + emit(event: 'require', name: string, module: ExtensionDescriptor): boolean; + emit(event: 'requireFail', name: string, err: any): boolean; + emit(event: 'respawn', flags: string[], child: NodeJS.Process): boolean; + eventNames(): Array<'require' | 'requireFail' | 'respawn'>; + listenerCount(type: 'require' | 'requireFail' | 'respawn'): number; +} + +declare namespace Liftoff { + interface Options { + /** + * Sugar for setting processTitle, moduleName, configName automatically. + * @default null + */ + name?: string; + /** + * Sets which module your application expects to find locally when being run. + * @default null + */ + moduleName?: string; + /** + * Sets the name of the configuration file Liftoff will attempt to find. Case-insensitive. + * @default null + */ + configName?: string; + /** + * Set extensions to include when searching for a configuration file. + * If an external module is needed to load a given extension (e.g. .coffee), + * the module name should be specified as the value for the key. + * @default {".js":null,".json":null} + */ + extensions?: Extensions; + /** + * Any flag specified here will be applied to node, not your program. + * Useful for supporting invocations like myapp --harmony command, + * where --harmony should be passed to node, not your program. + * This functionality is implemented using flagged-respawn. + * To support all v8flags, see `v8flags`. + * @default null + */ + v8flags?: string[] | ((cb: (err: any, flags: string[]) => void) => void); + /** + * Sets what the process title will be. + * @default null + */ + processTitle?: string; + /** + * A method to handle bash/zsh/whatever completions. + * @default null + */ + completions?: (completion: string) => any; + /** + * An object of configuration files to find. Each property is keyed by the + * default basename of the file being found, and the value is an object + * of path arguments keyed by unique names. + * @default null + */ + configFiles?: { + [extension: string]: { [locationName: string]: string | PathSpec }; + }; + } + + interface LaunchOptions { + /** + * Change the current working directory for this launch. Relative paths are calculated against `process.cwd()`. + * @default process.cwd() + */ + cwd?: string; + + /** + * Don't search for a config, use the one provided. + * **Note**: Liftoff will assume the current working directory is the directory containing the config file + * unless an alternate location is explicitly specified using `cwd`. + * @default null + */ + configPath?: string; + + /** + * A string or array of modules to attempt requiring from the local + * working directory before invoking the launch callback. + * @default null + */ + require?: string | any[]; + + /** + * Allows you to force node or V8 flags during the launch. + * This is useful if you need to make sure certain flags will always be enabled + * or if you need to enable flags that don't show up in `opts.v8flags` + * (as these flags aren't validated against opts.v8flags). + * @default null + */ + forcedFlags?: string | string[] | ((env: LiftoffEnv) => string | string[]); + + completion?: string; + } + + interface LiftoffEnv { + /** + * the current working directory + */ + cwd: string; + /** + * an array of modules that liftoff tried to pre-load + */ + require: string[]; + /** + * the config files searched for + */ + configNameSearch: string[]; + /** + * the full path to your configuration file (if found) + */ + configPath: string | undefined; + /** + * the base directory of your configuration file (if found) + */ + configBase: string | undefined; + /** + * the full path to the local module your project relies on (if found) + */ + modulePath: string | undefined; + /** + * the contents of the local module's package.json (if found) + */ + modulePackage: { [key: string]: any } | undefined; + /** + * an object of filepaths for each found config file (filepath values will be null if not found) + */ + configFiles: { [extensions: string]: { [path: string]: string | null } } | undefined; + } +} diff --git a/types/liftoff/liftoff-tests.ts b/types/liftoff/liftoff-tests.ts new file mode 100644 index 0000000000..bfc960eb62 --- /dev/null +++ b/types/liftoff/liftoff-tests.ts @@ -0,0 +1,182 @@ +import Liftoff = require('liftoff'); +import v8flags = require('v8flags'); + +new Liftoff({ + name: 'hacker', + processTitle: 'hacker', + moduleName: 'hacker', + configName: 'hackerfile', + extensions: { + '.js': null, + '.json': null, + '.coffee': 'coffee-script/register', + }, + v8flags: ['--harmony'], +}); +new Liftoff({ + name: 'hacker', + processTitle: 'hacker', + moduleName: 'hacker', + configName: 'hackerfile', + extensions: { + '.js': null, + '.json': null, + '.coffee': 'coffee-script/register', + }, + v8flags, +}); +new Liftoff({ name: 'hacker' }); +new Liftoff({ + name: 'myapp', + extensions: { + '.js': null, + '.json': null, + '.coffee': 'coffee-script/register', + }, +}); +new Liftoff({ + name: 'myapp', + configName: '.myapp', + extensions: { + rc: null, + }, +}); +new Liftoff({ + name: 'myapp', + extensions: require('interpret').jsVariants, +}); +new Liftoff({ + v8flags: ['--trace-deprecation'], +}); +new Liftoff({ + v8flags(cb) { + cb(null, ['--trace-deprecation']); + }, +}); +new Liftoff({ + name: 'hacker', + configFiles: { + '.hacker': { + cwd: '.', + }, + }, +}); +new Liftoff({ + name: 'hacker', + configFiles: { + '.hacker': { + home: { + path: '~', + extensions: { + rc: null, + }, + }, + }, + }, +}); +new Liftoff({ + name: 'hacker', + configFiles: { + '.hacker': { + up: { + path: '.', + findUp: true, + }, + }, + }, +}); +new Liftoff({ + name: 'hacker', + configFiles: { + hacker: { + override: { + path: '.', + name: '.override', + }, + }, + }, +}); +new Liftoff({ + name: 'hacker', + configFiles: { + '.hacker': { + home: { + path: '.', + cwd: '~', + }, + }, + }, +}); + +new Liftoff().launch( + { + cwd: '', + configPath: '', + require: '', + completion: '', + }, + env => { + // $ExpectType LiftoffEnv + env; + + // $ExpectType string + env.cwd; + // $ExpectType string[] + env.require; + // $ExpectType string[] + env.configNameSearch; + // $ExpectType string | undefined + env.configPath; + // $ExpectType string | undefined + env.configBase; + // $ExpectType string | undefined + env.modulePath; + // $ExpectType { [key: string]: any; } | undefined + env.modulePackage; + // $ExpectType { [extensions: string]: { [path: string]: string | null; }; } | undefined + env.configFiles; + } +); +new Liftoff().launch({ cwd: '' }, () => {}); +new Liftoff().launch({ configPath: '' }, () => {}); +new Liftoff().launch({ require: '' }, () => {}); +new Liftoff().launch({ forcedFlags: ['--trace-deprecation'] }, () => {}); +new Liftoff().launch({ forcedFlags: '--trace-deprecation' }, () => {}); +new Liftoff().launch( + { + forcedFlags: env => { + // $ExpectType LiftoffEnv + env; + return ['--trace-deprecation']; + }, + }, + () => {} +); +new Liftoff().launch( + { + forcedFlags: env => { + return '--trace-deprecation'; + }, + }, + () => {} +); +new Liftoff().launch({ completion: '' }, () => {}); + +new Liftoff().on('require', (name, module) => { + // $ExpectType string + name; + // $ExpectType ExtensionDescriptor + module; +}); +new Liftoff().on('requireFail', (name, err) => { + // $ExpectType string + name; + // $ExpectType any + err; +}); +new Liftoff().on('respawn', (flags, child) => { + // $ExpectType string[] + flags; + // $ExpectType Process + child; +}); diff --git a/types/liftoff/tsconfig.json b/types/liftoff/tsconfig.json new file mode 100644 index 0000000000..771c8ce2ed --- /dev/null +++ b/types/liftoff/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "liftoff-tests.ts" + ] +} diff --git a/types/liftoff/tslint.json b/types/liftoff/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/liftoff/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 75d166174fbe3f62941034bd5288a450e150a65a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20Unneb=C3=A4ck?= Date: Thu, 6 Dec 2018 12:01:30 +0000 Subject: [PATCH 427/608] [assert] Fix passing RegEx to .throws --- types/assert/assert-tests.ts | 1 + types/assert/index.d.ts | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/types/assert/assert-tests.ts b/types/assert/assert-tests.ts index 22248c18bd..3f795f0552 100644 --- a/types/assert/assert-tests.ts +++ b/types/assert/assert-tests.ts @@ -5,6 +5,7 @@ assert(true, "it's working"); assert.ok(true, "inner functions work as well"); assert.throws(() => {}); +assert.throws(() => {}, /Regex test/); assert.throws(() => {}, () => {}, "works wonderfully"); assert['fail'](true, true, "works like a charm"); diff --git a/types/assert/index.d.ts b/types/assert/index.d.ts index d79805f5af..f04158bbd3 100644 --- a/types/assert/index.d.ts +++ b/types/assert/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for commonjs-assert 1.4 // Project: https://github.com/browserify/commonjs-assert // Definitions by: Nico Gallinal +// Linus Unnebäck // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare function assert(value: any, message?: string): void; @@ -23,10 +24,10 @@ declare namespace assert { function notStrictEqual(actual: any, expected: any, message?: string): void; function throws(block: () => void, message?: string): void; - function throws(block: () => void, error: () => void | ((err: any) => boolean) | RegExp, message?: string): void; + function throws(block: () => void, error: (() => void) | ((err: any) => boolean) | RegExp, message?: string): void; function doesNotThrow(block: () => void, message?: string): void; - function doesNotThrow(block: () => void, error: () => void | ((err: any) => boolean) | RegExp, message?: string): void; + function doesNotThrow(block: () => void, error: (() => void) | ((err: any) => boolean) | RegExp, message?: string): void; function ifError(value: any): void; From c05467793ee17920d4122e30bc5d6a2bdf8900ae Mon Sep 17 00:00:00 2001 From: Wu Haotian Date: Thu, 6 Dec 2018 21:11:20 +0800 Subject: [PATCH 428/608] Add type definitation for debounce-promise --- .../debounce-promise-tests.ts | 25 ++++++++++++++++++ types/debounce-promise/index.d.ts | 26 +++++++++++++++++++ types/debounce-promise/tsconfig.json | 16 ++++++++++++ types/debounce-promise/tslint.json | 1 + 4 files changed, 68 insertions(+) create mode 100644 types/debounce-promise/debounce-promise-tests.ts create mode 100644 types/debounce-promise/index.d.ts create mode 100644 types/debounce-promise/tsconfig.json create mode 100644 types/debounce-promise/tslint.json diff --git a/types/debounce-promise/debounce-promise-tests.ts b/types/debounce-promise/debounce-promise-tests.ts new file mode 100644 index 0000000000..75b53dc764 --- /dev/null +++ b/types/debounce-promise/debounce-promise-tests.ts @@ -0,0 +1,25 @@ +import debounce = require("debounce-promise"); +import { DebounceOptions } from "debounce-promise"; + +const options: DebounceOptions = {}; +const optionsA: DebounceOptions = { leading: true }; +const f = async () => 2; +const f2 = (a: string) => 2; +debounce(f, 100); +debounce(f, 0, options); +debounce(f, 100, optionsA); +debounce(f, 10, { accumulate: true }); +const foo = debounce(async () => f2, 10, { + leading: true, + accumulate: true +}); +foo().then(f => f("2")); +const bar = debounce(async () => [1, 2, 3], 100); +bar().then(ar => ar.concat()); + +// Converts the return value from the producer function to a promise +const two = debounce((a: string, b: number, c: { d: boolean }) => [4], 10, { + leading: true, + accumulate: true +}); +two("1", 2, { d: false }).then(ar => ar.pop(), () => 2); diff --git a/types/debounce-promise/index.d.ts b/types/debounce-promise/index.d.ts new file mode 100644 index 0000000000..2356d30060 --- /dev/null +++ b/types/debounce-promise/index.d.ts @@ -0,0 +1,26 @@ +// Type definitions for debounce-promise 3.1 +// Project: https://github.com/bjoerge/debounce-promise +// Definitions by: Wu Haotian +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.0 + +declare namespace debounce { + interface DebounceOptions { + leading?: boolean; + accumulate?: boolean; + } +} + +type ArgumentsType = T extends (...args: infer A) => any ? A : never; + +declare function debounce any>( + func: T, + wait?: number, + options?: debounce.DebounceOptions +): ( + ...args: ArgumentsType +) => ReturnType extends Promise + ? ReturnType + : Promise>; + +export = debounce; diff --git a/types/debounce-promise/tsconfig.json b/types/debounce-promise/tsconfig.json new file mode 100644 index 0000000000..7e41251117 --- /dev/null +++ b/types/debounce-promise/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "debounce-promise-tests.ts"] +} diff --git a/types/debounce-promise/tslint.json b/types/debounce-promise/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/debounce-promise/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 6adc4768d8b6afddc14c4f47c80bdbf314a82a36 Mon Sep 17 00:00:00 2001 From: arichter83 Date: Thu, 6 Dec 2018 14:50:37 +0100 Subject: [PATCH 429/608] Fixed SimpleSchema.custom validation Function with correct context --- types/simpl-schema/index.d.ts | 38 +++++++++++++++++++++++- types/simpl-schema/simpl-schema-tests.ts | 15 +++++----- 2 files changed, 45 insertions(+), 8 deletions(-) diff --git a/types/simpl-schema/index.d.ts b/types/simpl-schema/index.d.ts index 54d0a5665d..30b33f0b94 100644 --- a/types/simpl-schema/index.d.ts +++ b/types/simpl-schema/index.d.ts @@ -15,7 +15,33 @@ export interface ValidationContext extends SimpleSchemaValidationContextStatic { } interface CustomValidationContext { + /** The name of the schema key (e.g., "addresses.0.street") */ + key: string; + + /** The generic name of the schema key (e.g., "addresses.$.street") */ + genericKey: string; + + /** The schema definition object. */ + definition: SchemaDefinition; + + /** Does the object being validated have this key set? */ + isSet: boolean; + + /** Value to validate */ value: any; + + /** The Mongo operator for which we're doing validation. Might be null. */ + operator: any; + validationContext: ValidationContext; + + /** Use this method to get information about other fields. Pass a field name (non-generic schema key) as the only argument. The return object will have isSet, value, and operator properties for that field. */ + field(): any; + + /** Use this method to get information about other fields that have the same parent object. Works the same way as field(). This is helpful when you use sub-schemas or when you're dealing with arrays of objects. */ + siblingField(): any; + + /** Call this to add validation errors for any key. In general, you should use this to add errors for other keys. To add an error for the current key, return the error type string. If you do use this to add an error for the current key, return false from your custom validation function. */ + addValidationErrors(errors: SimpleSchemaValidationError): any; } interface SchemaDefinition { @@ -31,7 +57,11 @@ interface SchemaDefinition { exclusiveMax?: boolean; exclusiveMin?: boolean; regEx?: RegExp | RegExp[]; - custom?: () => any; + + /** For custom validation function. If you use an arrow function the context + for "this" will not be available. + Use "custom: function() { return something(this.value); }" instead." */ + custom?: (this: CustomValidationContext) => undefined | string | SimpleSchemaValidationError; blackbox?: boolean; autoValue?: () => any; defaultValue?: any; @@ -58,6 +88,11 @@ interface SimpleSchemaOptions { tracker?: any; } +interface SimpleSchemaValidationError { + type: string; + [key: string]: number | string; +} + interface SimpleSchemaStatic { new( schema: { @@ -185,6 +220,7 @@ export const MongoObject: MongoObjectStatic; export interface SimpleSchema extends SimpleSchemaStatic { debug: boolean; + /** Validate a data object. Options: {keys: []} to limit */ validate(obj: any, options?: ValidationOption): void; addValidator(validator: () => boolean): any; extendOptions(options: {[key: string]: any}): void; diff --git a/types/simpl-schema/simpl-schema-tests.ts b/types/simpl-schema/simpl-schema-tests.ts index 6373107aa3..55be71ec6e 100644 --- a/types/simpl-schema/simpl-schema-tests.ts +++ b/types/simpl-schema/simpl-schema-tests.ts @@ -14,18 +14,19 @@ const StringSchema = new SimpleSchema({ }, createdAt: { type: Date, - autoValue: () => new Date(), + autoValue: () => new Date() }, title: { type: String, - label: "Argument", - /* TODO, this does not work: "The containing arrow function captures the global value of 'this' which implicitly has type 'any'." - custom: () => { + label: "Title", + /* Can't use arrow function here, else the context won't be available */ + custom: function() { const text = this.value; - if (text.length > 10) return { type: SimpleSchema.ErrorTypes.MAX_STRING, max: 10 }; + + if (text.length > 100) return { type: SimpleSchema.ErrorTypes.MAX_STRING, max: 100 }; + else if (text.length <10) return SimpleSchema.ErrorTypes.MIN_STRING } - */ - }, + } }); StringSchema.validate({ From 34bd9bc71df60692e286c4a216549ae7c29290ac Mon Sep 17 00:00:00 2001 From: arichter83 Date: Thu, 6 Dec 2018 15:00:46 +0100 Subject: [PATCH 430/608] Fix doc format --- types/simpl-schema/index.d.ts | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/types/simpl-schema/index.d.ts b/types/simpl-schema/index.d.ts index 30b33f0b94..8ac1a04cc7 100644 --- a/types/simpl-schema/index.d.ts +++ b/types/simpl-schema/index.d.ts @@ -34,13 +34,20 @@ interface CustomValidationContext { operator: any; validationContext: ValidationContext; - /** Use this method to get information about other fields. Pass a field name (non-generic schema key) as the only argument. The return object will have isSet, value, and operator properties for that field. */ + /** Use this method to get information about other fields. Pass a field name + (non-generic schema key) as the only argument. The return object will + have isSet, value, and operator properties for that field. */ field(): any; - /** Use this method to get information about other fields that have the same parent object. Works the same way as field(). This is helpful when you use sub-schemas or when you're dealing with arrays of objects. */ + /** Use this method to get information about other fields that have the same + parent object. Works the same way as field(). This is helpful when you use + sub-schemas or when you're dealing with arrays of objects. */ siblingField(): any; - /** Call this to add validation errors for any key. In general, you should use this to add errors for other keys. To add an error for the current key, return the error type string. If you do use this to add an error for the current key, return false from your custom validation function. */ + /** Call this to add validation errors for any key. In general, you should use + this to add errors for other keys. To add an error for the current key, + return the error type string. If you do use this to add an error for the + current key, return false from your custom validation function. */ addValidationErrors(errors: SimpleSchemaValidationError): any; } @@ -59,8 +66,8 @@ interface SchemaDefinition { regEx?: RegExp | RegExp[]; /** For custom validation function. If you use an arrow function the context - for "this" will not be available. - Use "custom: function() { return something(this.value); }" instead." */ + for "this" will not be available. Use "custom: function() { return + something(this.value); }" instead. */ custom?: (this: CustomValidationContext) => undefined | string | SimpleSchemaValidationError; blackbox?: boolean; autoValue?: () => any; From 4c382097c7414d6d9d11ec32dcf9d8dcd8d7debf Mon Sep 17 00:00:00 2001 From: arichter83 Date: Thu, 6 Dec 2018 15:15:50 +0100 Subject: [PATCH 431/608] Again fixing linting need to disable object-literal-shorthand for SimpleSchema.custom --- types/simpl-schema/index.d.ts | 36 ++++++++++++++---------- types/simpl-schema/simpl-schema-tests.ts | 2 +- types/simpl-schema/tslint.json | 7 ++++- 3 files changed, 28 insertions(+), 17 deletions(-) diff --git a/types/simpl-schema/index.d.ts b/types/simpl-schema/index.d.ts index 8ac1a04cc7..afd841e0c9 100644 --- a/types/simpl-schema/index.d.ts +++ b/types/simpl-schema/index.d.ts @@ -34,20 +34,25 @@ interface CustomValidationContext { operator: any; validationContext: ValidationContext; - /** Use this method to get information about other fields. Pass a field name - (non-generic schema key) as the only argument. The return object will - have isSet, value, and operator properties for that field. */ + /** + * Use this method to get information about other fields. Pass a field name + * (non-generic schema key) as the only argument. The return object will + * have isSet, value, and operator properties for that field. + */ field(): any; - - /** Use this method to get information about other fields that have the same - parent object. Works the same way as field(). This is helpful when you use - sub-schemas or when you're dealing with arrays of objects. */ + /** + * Use this method to get information about other fields that have the same + * parent object. Works the same way as field(). This is helpful when you use + * sub-schemas or when you're dealing with arrays of objects. + */ siblingField(): any; - /** Call this to add validation errors for any key. In general, you should use - this to add errors for other keys. To add an error for the current key, - return the error type string. If you do use this to add an error for the - current key, return false from your custom validation function. */ + /** + * Call this to add validation errors for any key. In general, you should use + * this to add errors for other keys. To add an error for the current key, + * return the error type string. If you do use this to add an error for the + * current key, return false from your custom validation function. + */ addValidationErrors(errors: SimpleSchemaValidationError): any; } @@ -64,10 +69,11 @@ interface SchemaDefinition { exclusiveMax?: boolean; exclusiveMin?: boolean; regEx?: RegExp | RegExp[]; - - /** For custom validation function. If you use an arrow function the context - for "this" will not be available. Use "custom: function() { return - something(this.value); }" instead. */ + /** + * For custom validation function. If you use an arrow function the context + * for "this" will not be available. Use "custom: function() { return + * something(this.value); }" instead. + */ custom?: (this: CustomValidationContext) => undefined | string | SimpleSchemaValidationError; blackbox?: boolean; autoValue?: () => any; diff --git a/types/simpl-schema/simpl-schema-tests.ts b/types/simpl-schema/simpl-schema-tests.ts index 55be71ec6e..a3555c4428 100644 --- a/types/simpl-schema/simpl-schema-tests.ts +++ b/types/simpl-schema/simpl-schema-tests.ts @@ -24,7 +24,7 @@ const StringSchema = new SimpleSchema({ const text = this.value; if (text.length > 100) return { type: SimpleSchema.ErrorTypes.MAX_STRING, max: 100 }; - else if (text.length <10) return SimpleSchema.ErrorTypes.MIN_STRING + else if (text.length < 10) return SimpleSchema.ErrorTypes.MIN_STRING; } } }); diff --git a/types/simpl-schema/tslint.json b/types/simpl-schema/tslint.json index 3db14f85ea..3043773b06 100644 --- a/types/simpl-schema/tslint.json +++ b/types/simpl-schema/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "object-literal-shorthand": false + } +} From 5f098b2d6ad61c2712e5dc8b87bf0487654cacc6 Mon Sep 17 00:00:00 2001 From: Shaun Burdick Date: Thu, 6 Dec 2018 10:33:05 -0500 Subject: [PATCH 432/608] [@types/amqp-connection-manager] Added missing `ChannelWrapper.removeSetup()` --- types/amqp-connection-manager/index.d.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/types/amqp-connection-manager/index.d.ts b/types/amqp-connection-manager/index.d.ts index ab69aadeb1..e2907b67ee 100644 --- a/types/amqp-connection-manager/index.d.ts +++ b/types/amqp-connection-manager/index.d.ts @@ -136,7 +136,16 @@ export interface ChannelWrapper extends EventEmitter { * Setup functions should, ideally, not throw errors, but if they do then the ChannelWrapper will emit an 'error' event. * @param func */ - addSetup(func: SetupFunc): Promise; + addSetup(func: SetupFunc): Promise; + + /** + * Remove a setup function added with `addSetup`. If there is currently a + * connection, `teardown(channel, [cb])` will be run immediately, and the + * returned Promise will not resolve until it completes. + * @param func + * @param [tearDown] + */ + removeSetup(func: SetupFunc, tearDown?: SetupFunc): Promise; /** * @see amqplib From e5ca27ce79a05eb554ac478f97d034cceb43324d Mon Sep 17 00:00:00 2001 From: Bradley Hill Date: Thu, 6 Dec 2018 09:46:39 -0600 Subject: [PATCH 433/608] Fabric - Cross origin is a string everywhere. Type as such so don't have to downcast as any. --- types/fabric/fabric-impl.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/fabric/fabric-impl.d.ts b/types/fabric/fabric-impl.d.ts index 39b3e45757..60ec11648f 100644 --- a/types/fabric/fabric-impl.d.ts +++ b/types/fabric/fabric-impl.d.ts @@ -4529,7 +4529,7 @@ interface IUtilMisc { * @param [context] Context to invoke callback in * @param [crossOrigin] crossOrigin value to set image element to */ - loadImage(url: string, callback: (image: HTMLImageElement) => void, context?: any, crossOrigin?: boolean): void; + loadImage(url: string, callback: (image: HTMLImageElement) => void, context?: any, crossOrigin?: string): void; /** * Creates corresponding fabric instances from their object representations From 07c66081db673014a3617144e4e8036dc0249d28 Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Thu, 6 Dec 2018 16:00:23 +0100 Subject: [PATCH 434/608] Add orFail method --- types/mongoose/index.d.ts | 24 ++++++++++++++++++++++++ types/mongoose/mongoose-tests.ts | 1 + 2 files changed, 25 insertions(+) diff --git a/types/mongoose/index.d.ts b/types/mongoose/index.d.ts index f08b8e0b5c..ad515a1806 100644 --- a/types/mongoose/index.d.ts +++ b/types/mongoose/index.d.ts @@ -2021,6 +2021,30 @@ declare module "mongoose" { */ or(array: any[]): this; + /** + * Make this query throw an error if no documents match the given `filter`. + * This is handy for integrating with async/await, because `orFail()` saves you + * an extra `if` statement to check if no document was found. + * + * ####Example: + * + * // Throws if no doc returned + * await Model.findOne({ foo: 'bar' }).orFail(); + * + * // Throws if no document was updated + * await Model.updateOne({ foo: 'bar' }, { name: 'test' }).orFail(); + * + * // Throws "No docs found!" error if no docs match `{ foo: 'bar' }` + * await Model.find({ foo: 'bar' }).orFail(new Error('No docs found!')); + * + * // Throws "Not found" error if no document was found + * await Model.findOneAndUpdate({ foo: 'bar' }, { name: 'test' }). + * orFail(() => Error('Not found')); + * + * @param err optional error to throw if no docs match `filter` + */ + orFail(err?: Error | (() => Error)): this; + /** Specifies a $polygon condition */ polygon(...coordinatePairs: number[][]): this; polygon(path: string, ...coordinatePairs: number[][]): this; diff --git a/types/mongoose/mongoose-tests.ts b/types/mongoose/mongoose-tests.ts index a660ce728f..f4fec31101 100644 --- a/types/mongoose/mongoose-tests.ts +++ b/types/mongoose/mongoose-tests.ts @@ -1080,6 +1080,7 @@ query.find().where('age').in([20, 21]); query.find().in('age', [20, 21]); query.nor([{ color: 'green' }, { status: 'ok' }]).nor([]); query.or([{ color: 'red' }, { status: 'emergency' }]).or([]); +query.find({ color: 'blue' }).orFail(); query.where('loc').within().polygon([10,20], [13, 25], [7,15]); query.polygon('loc', [10,20], [13, 25], [7,15]); query.findOne().populate('owner').exec(function (err, kitten) { From c95a21430b2dd21b55e3146b9940565f0fd7ef38 Mon Sep 17 00:00:00 2001 From: Ben James Date: Thu, 6 Dec 2018 17:48:58 +0000 Subject: [PATCH 435/608] Add types for @atlaskit/tree --- types/atlaskit__tree/atlaskit__tree-tests.tsx | 42 +++++ types/atlaskit__tree/index.d.ts | 153 ++++++++++++++++++ types/atlaskit__tree/tsconfig.json | 20 +++ types/atlaskit__tree/tslint.json | 1 + 4 files changed, 216 insertions(+) create mode 100644 types/atlaskit__tree/atlaskit__tree-tests.tsx create mode 100644 types/atlaskit__tree/index.d.ts create mode 100644 types/atlaskit__tree/tsconfig.json create mode 100644 types/atlaskit__tree/tslint.json diff --git a/types/atlaskit__tree/atlaskit__tree-tests.tsx b/types/atlaskit__tree/atlaskit__tree-tests.tsx new file mode 100644 index 0000000000..b99647a7c6 --- /dev/null +++ b/types/atlaskit__tree/atlaskit__tree-tests.tsx @@ -0,0 +1,42 @@ +import Tree from "@atlaskit/tree"; + +import * as React from "react"; +import { render } from "react-dom"; + +declare const container: Element; + +render( +
} + onExpand={() => {}} + onCollapse={() => {}} + onDragStart={() => {}} + onDragEnd={() => {}} + offsetPerLevel={20} + isDragEnabled + isNestingEnabled + />, + container +); + +// Check that default props work too. +render(
} />, container); diff --git a/types/atlaskit__tree/index.d.ts b/types/atlaskit__tree/index.d.ts new file mode 100644 index 0000000000..4d6a952b76 --- /dev/null +++ b/types/atlaskit__tree/index.d.ts @@ -0,0 +1,153 @@ +// Type definitions for @atlaskit/tree 4.1 +// Project: https://bitbucket.org/atlassian/atlaskit-mk-2/ +// Definitions by: Ben James +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.0 + +import { Component, ReactNode } from "react"; + +import { + DraggingStyle, + DraggableProvidedDragHandleProps, + DraggableStateSnapshot, + NotDraggingStyle +} from "react-beautiful-dnd"; + +export type ItemId = any; + +export type Path = number[]; + +export interface TreeData { + rootId: ItemId; + items: { [key: string]: TreeItem; [key: number]: TreeItem }; +} + +export type TreeItemData = any; + +export interface TreeItem { + id: ItemId; + children: ItemId[]; + hasChildren?: boolean; + isExpanded?: boolean; + isChildrenLoading?: boolean; + data?: TreeItemData; +} + +export interface TreeSourcePosition { + parentId: ItemId; + index: number; +} + +export interface TreeDestinationPosition { + parentId: ItemId; + index?: number; +} + +type Omit = Pick>; + +interface TreeDraggingStyle extends Omit { + paddingLeft: number; + transition: "none" | string; +} + +type TreeDraggableStyle = NotDraggingStyle | TreeDraggingStyle; + +interface TreeDraggableProps { + // Props that can be spread onto the element directly + // inline style + style?: TreeDraggableStyle; + // used for shared global styles + "data-react-beautiful-dnd-draggable": string; +} + +interface TreeDraggableProvided { + draggableProps: TreeDraggableProps; + // will be null if the draggable is disabled + dragHandleProps?: DraggableProvidedDragHandleProps; + // The following props will be removed once we move to react 16 + innerRef: (element?: HTMLElement) => void; +} + +export interface RenderItemParams { + item: TreeItem; + depth: number; + onExpand: (itemId: ItemId) => void; + onCollapse: (itemId: ItemId) => void; + provided: TreeDraggableProvided; + snapshot: DraggableStateSnapshot; +} + +interface TreeItemMutation { + id?: ItemId; + children?: ItemId[]; + hasChildren?: boolean; + isExpanded?: boolean; + isChildrenLoading?: boolean; + data?: TreeItemData; +} + +export function mutateTree( + tree: TreeData, + itemId: ItemId, + mutation: TreeItemMutation +): TreeData; + +export function moveItemOnTree( + tree: TreeData, + from: TreeSourcePosition, + to: TreeDestinationPosition +): TreeData; + +interface TreeProps { + /** The tree data structure. */ + tree: TreeData; + /** Function that will be called when a parent item needs to be expanded. */ + onExpand: (itemId: ItemId, path: Path) => void; + /** Function that will be called when a parent item needs to be collapsed. */ + onCollapse: (itemId: ItemId, path: Path) => void; + /** Function that will be called when the user starts dragging. */ + onDragStart: (itemId: ItemId) => void; + /** Function that will be called when the user finishes dragging. */ + onDragEnd: ( + sourcePosition: TreeSourcePosition, + destinationPosition: TreeDestinationPosition | undefined + ) => void; + /** Function that will be called to render a single item. */ + renderItem: (itemProps: RenderItemParams) => ReactNode; + /** Number of pixel is used to scaffold the tree by the consumer. */ + offsetPerLevel: number; + /** Boolean to turn on drag&drop re-ordering on the tree */ + isDragEnabled: boolean; + /** Boolean to turn on hovering while dragging */ + isNestingEnabled: boolean; +} + +interface FlattenedItem { + item: TreeItem; + path: Path; +} + +type FlattenedTree = FlattenedItem[]; + +interface TreeState { + /** The flattened tree data structure transformed from props.tree */ + flattenedTree: FlattenedTree; + // Id of the currently dragged item + draggedItemId: ItemId; +} + +declare class Tree extends Component { + static defaultProps: { + tree: { children: [] }; + onExpand: () => void; + onCollapse: () => void; + onDragStart: () => void; + onDragEnd: () => void; + renderItem: () => void; + offsetPerLevel: 35; + isDragEnabled: false; + isNestingEnabled: false; + }; +} + +export default Tree; diff --git a/types/atlaskit__tree/tsconfig.json b/types/atlaskit__tree/tsconfig.json new file mode 100644 index 0000000000..b6d581fa0d --- /dev/null +++ b/types/atlaskit__tree/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6", "dom"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "jsx": "react", + "paths": { + "@atlaskit/tree": ["atlaskit__tree"] + } + }, + "files": ["index.d.ts", "atlaskit__tree-tests.tsx"] +} diff --git a/types/atlaskit__tree/tslint.json b/types/atlaskit__tree/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/atlaskit__tree/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 0710a3b0f6f506c78ae5056403952f7a06798096 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Thu, 6 Dec 2018 19:07:31 +0100 Subject: [PATCH 436/608] Add types for empty-dir --- types/empty-dir/empty-dir-tests.ts | 25 +++++++++++++++++++++++++ types/empty-dir/index.d.ts | 22 ++++++++++++++++++++++ types/empty-dir/tsconfig.json | 23 +++++++++++++++++++++++ types/empty-dir/tslint.json | 1 + 4 files changed, 71 insertions(+) create mode 100644 types/empty-dir/empty-dir-tests.ts create mode 100644 types/empty-dir/index.d.ts create mode 100644 types/empty-dir/tsconfig.json create mode 100644 types/empty-dir/tslint.json diff --git a/types/empty-dir/empty-dir-tests.ts b/types/empty-dir/empty-dir-tests.ts new file mode 100644 index 0000000000..63700ae87b --- /dev/null +++ b/types/empty-dir/empty-dir-tests.ts @@ -0,0 +1,25 @@ +import emptyDir = require('empty-dir'); + +emptyDir('./', (err, isEmpty) => { + // $ExpectType ErrnoException + err; + // $ExpectType boolean + isEmpty; +}); + +// $ExpectType boolean +emptyDir.sync('./test/empty'); + +function filter(filepath: string) { + return !/(Thumbs\.db|\.DS_Store)$/i.test(filepath); +} + +emptyDir('./', filter, (err, isEmpty) => { + // $ExpectType ErrnoException + err; + // $ExpectType boolean + isEmpty; +}); + +// $ExpectType boolean +emptyDir.sync('./test/empty', filter); diff --git a/types/empty-dir/index.d.ts b/types/empty-dir/index.d.ts new file mode 100644 index 0000000000..0f623a991d --- /dev/null +++ b/types/empty-dir/index.d.ts @@ -0,0 +1,22 @@ +// Type definitions for empty-dir 1.0 +// Project: https://github.com/js-cli/js-empty-dir +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +export = emptyDir; + +declare function emptyDir( + dir: string, + cb: (err: NodeJS.ErrnoException, isEmpty: boolean) => void +): void; +declare function emptyDir( + dir: string, + filter: (path: string) => boolean, + cb: (err: NodeJS.ErrnoException, isEmpty: boolean) => void +): void; + +declare namespace emptyDir { + function sync(dir: string, filter?: (path: string) => boolean): boolean; +} diff --git a/types/empty-dir/tsconfig.json b/types/empty-dir/tsconfig.json new file mode 100644 index 0000000000..cb73470ad8 --- /dev/null +++ b/types/empty-dir/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "empty-dir-tests.ts" + ] +} diff --git a/types/empty-dir/tslint.json b/types/empty-dir/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/empty-dir/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From b19ba7a9a3b4f548bc350956847a5b6644c7ce8b Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Thu, 6 Dec 2018 19:27:28 +0100 Subject: [PATCH 437/608] Add types for tildify --- types/tildify/index.d.ts | 8 ++++++++ types/tildify/tildify-tests.ts | 4 ++++ types/tildify/tsconfig.json | 23 +++++++++++++++++++++++ types/tildify/tslint.json | 1 + 4 files changed, 36 insertions(+) create mode 100644 types/tildify/index.d.ts create mode 100644 types/tildify/tildify-tests.ts create mode 100644 types/tildify/tsconfig.json create mode 100644 types/tildify/tslint.json diff --git a/types/tildify/index.d.ts b/types/tildify/index.d.ts new file mode 100644 index 0000000000..a0dd100bf9 --- /dev/null +++ b/types/tildify/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for tildify 1.2 +// Project: https://github.com/sindresorhus/tildify#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = tildify; + +declare function tildify(str: string): string; diff --git a/types/tildify/tildify-tests.ts b/types/tildify/tildify-tests.ts new file mode 100644 index 0000000000..109f5f6c6e --- /dev/null +++ b/types/tildify/tildify-tests.ts @@ -0,0 +1,4 @@ +import tildify = require('tildify'); + +// $ExpectType string +tildify('/Users/sindresorhus/dev'); diff --git a/types/tildify/tsconfig.json b/types/tildify/tsconfig.json new file mode 100644 index 0000000000..4375409ba0 --- /dev/null +++ b/types/tildify/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "tildify-tests.ts" + ] +} diff --git a/types/tildify/tslint.json b/types/tildify/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/tildify/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 11ec8b0e410c1e83c2b6011a7aa30dddbc154c26 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Thu, 6 Dec 2018 10:41:09 -0800 Subject: [PATCH 438/608] Add shelljs/make The make utility script: 1. Adds an object named target to the global namespace. 2. Dumps the contents of shelljs into the global namespace. --- types/shelljs/make.d.ts | 41 +++++++++++++++++++++++++++++++++++++ types/shelljs/tsconfig.json | 3 ++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 types/shelljs/make.d.ts diff --git a/types/shelljs/make.d.ts b/types/shelljs/make.d.ts new file mode 100644 index 0000000000..2ebded5a99 --- /dev/null +++ b/types/shelljs/make.d.ts @@ -0,0 +1,41 @@ +import * as shelljs from './' +declare global { + type Target = { + (...args: any[]): void, + result?: any, + done?: boolean + }; + export const target: { + all?: Target; + [s: string]: Target; + }; + export const cd: typeof shelljs.cd; + export const pwd: typeof shelljs.pwd; + export const ls: typeof shelljs.ls; + export const find: typeof shelljs.find; + export const cp: typeof shelljs.cp; + export const rm: typeof shelljs.rm; + export const mv: typeof shelljs.mv; + export const mkdir: typeof shelljs.mkdir; + export const cat: typeof shelljs.cat; + export const sed: typeof shelljs.sed; + export const grep: typeof shelljs.grep; + export const echo: typeof shelljs.echo; + export const pushd: typeof shelljs.pushd; + export const popd: typeof shelljs.popd; + export const dirs: typeof shelljs.dirs; + export const ln: typeof shelljs.ln; + export const exit: typeof shelljs.exit; + export const env: typeof shelljs.env; + export const exec: typeof shelljs.exec; + export const chmod: typeof shelljs.chmod; + export const tempdir: typeof shelljs.tempdir; + export const error: typeof shelljs.error; + export const touch: typeof shelljs.touch; + export const head: typeof shelljs.head; + export const sort: typeof shelljs.sort; + export const tail: typeof shelljs.tail; + export const uniq: typeof shelljs.uniq; + export const set: typeof shelljs.set; + export const config: typeof shelljs.config; +} diff --git a/types/shelljs/tsconfig.json b/types/shelljs/tsconfig.json index 7343a42a7e..51937bc2c0 100644 --- a/types/shelljs/tsconfig.json +++ b/types/shelljs/tsconfig.json @@ -18,6 +18,7 @@ }, "files": [ "index.d.ts", + "make.d.ts", "shelljs-tests.ts" ] -} \ No newline at end of file +} From 6b035ca04e5a9cc16c5b846f7f3ea10bde4d1911 Mon Sep 17 00:00:00 2001 From: Paul Sherman Date: Thu, 6 Dec 2018 12:48:16 -0600 Subject: [PATCH 439/608] [react] Deduplicate HTMLElements in global.d.ts --- types/react/global.d.ts | 49 ++++------------------------------------- 1 file changed, 4 insertions(+), 45 deletions(-) diff --git a/types/react/global.d.ts b/types/react/global.d.ts index 0c7a24070a..2ea2b7ca91 100644 --- a/types/react/global.d.ts +++ b/types/react/global.d.ts @@ -34,6 +34,7 @@ interface HTMLBodyElement extends HTMLElement { } interface HTMLBRElement extends HTMLElement { } interface HTMLButtonElement extends HTMLElement { } interface HTMLCanvasElement extends HTMLElement { } +interface HTMLDataListElement extends HTMLElement { } interface HTMLDialogElement extends HTMLElement { } interface HTMLDivElement extends HTMLElement { } interface HTMLDListElement extends HTMLElement { } @@ -43,8 +44,6 @@ interface HTMLFormElement extends HTMLElement { } interface HTMLHeadingElement extends HTMLElement { } interface HTMLHeadElement extends HTMLElement { } interface HTMLHRElement extends HTMLElement { } -interface HTMLTableColElement extends HTMLElement { } -interface HTMLDataListElement extends HTMLElement { } interface HTMLHtmlElement extends HTMLElement { } interface HTMLIFrameElement extends HTMLElement { } interface HTMLImageElement extends HTMLElement { } @@ -71,53 +70,13 @@ interface HTMLSourceElement extends HTMLElement { } interface HTMLSpanElement extends HTMLElement { } interface HTMLStyleElement extends HTMLElement { } interface HTMLTableElement extends HTMLElement { } -interface HTMLTableSectionElement extends HTMLElement { } -interface HTMLTableDataCellElement extends HTMLElement { } -interface HTMLTextAreaElement extends HTMLElement { } -interface HTMLTableSectionElement extends HTMLElement { } -interface HTMLTableHeaderCellElement extends HTMLElement { } -interface HTMLTableSectionElement extends HTMLElement { } -interface HTMLTitleElement extends HTMLElement { } -interface HTMLTableRowElement extends HTMLElement { } -interface HTMLTrackElement extends HTMLElement { } -interface HTMLUListElement extends HTMLElement { } -interface HTMLVideoElement extends HTMLElement { } interface HTMLTableColElement extends HTMLElement { } -interface HTMLDataListElement extends HTMLElement { } -interface HTMLHtmlElement extends HTMLElement { } -interface HTMLIFrameElement extends HTMLElement { } -interface HTMLImageElement extends HTMLElement { } -interface HTMLInputElement extends HTMLElement { } -interface HTMLModElement extends HTMLElement { } -interface HTMLLabelElement extends HTMLElement { } -interface HTMLLegendElement extends HTMLElement { } -interface HTMLLIElement extends HTMLElement { } -interface HTMLLinkElement extends HTMLElement { } -interface HTMLMapElement extends HTMLElement { } -interface HTMLMetaElement extends HTMLElement { } -interface HTMLObjectElement extends HTMLElement { } -interface HTMLOListElement extends HTMLElement { } -interface HTMLOptGroupElement extends HTMLElement { } -interface HTMLOptionElement extends HTMLElement { } -interface HTMLParagraphElement extends HTMLElement { } -interface HTMLParamElement extends HTMLElement { } -interface HTMLPreElement extends HTMLElement { } -interface HTMLProgressElement extends HTMLElement { } -interface HTMLQuoteElement extends HTMLElement { } -interface HTMLScriptElement extends HTMLElement { } -interface HTMLSelectElement extends HTMLElement { } -interface HTMLSourceElement extends HTMLElement { } -interface HTMLSpanElement extends HTMLElement { } -interface HTMLStyleElement extends HTMLElement { } -interface HTMLTableElement extends HTMLElement { } -interface HTMLTableSectionElement extends HTMLElement { } interface HTMLTableDataCellElement extends HTMLElement { } -interface HTMLTextAreaElement extends HTMLElement { } -interface HTMLTableSectionElement extends HTMLElement { } interface HTMLTableHeaderCellElement extends HTMLElement { } -interface HTMLTableSectionElement extends HTMLElement { } -interface HTMLTitleElement extends HTMLElement { } interface HTMLTableRowElement extends HTMLElement { } +interface HTMLTableSectionElement extends HTMLElement { } +interface HTMLTextAreaElement extends HTMLElement { } +interface HTMLTitleElement extends HTMLElement { } interface HTMLTrackElement extends HTMLElement { } interface HTMLUListElement extends HTMLElement { } interface HTMLVideoElement extends HTMLElement { } From c9ed1594d67e7a632b308e1a483a7c667fe4c844 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Thu, 6 Dec 2018 10:50:51 -0800 Subject: [PATCH 440/608] Fix some lint --- types/shelljs/make.d.ts | 66 ++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/types/shelljs/make.d.ts b/types/shelljs/make.d.ts index 2ebded5a99..0db5320b72 100644 --- a/types/shelljs/make.d.ts +++ b/types/shelljs/make.d.ts @@ -1,41 +1,41 @@ -import * as shelljs from './' +import * as shelljs from './'; declare global { - type Target = { + interface Target { (...args: any[]): void, result?: any, done?: boolean - }; - export const target: { + } + const target: { all?: Target; [s: string]: Target; }; - export const cd: typeof shelljs.cd; - export const pwd: typeof shelljs.pwd; - export const ls: typeof shelljs.ls; - export const find: typeof shelljs.find; - export const cp: typeof shelljs.cp; - export const rm: typeof shelljs.rm; - export const mv: typeof shelljs.mv; - export const mkdir: typeof shelljs.mkdir; - export const cat: typeof shelljs.cat; - export const sed: typeof shelljs.sed; - export const grep: typeof shelljs.grep; - export const echo: typeof shelljs.echo; - export const pushd: typeof shelljs.pushd; - export const popd: typeof shelljs.popd; - export const dirs: typeof shelljs.dirs; - export const ln: typeof shelljs.ln; - export const exit: typeof shelljs.exit; - export const env: typeof shelljs.env; - export const exec: typeof shelljs.exec; - export const chmod: typeof shelljs.chmod; - export const tempdir: typeof shelljs.tempdir; - export const error: typeof shelljs.error; - export const touch: typeof shelljs.touch; - export const head: typeof shelljs.head; - export const sort: typeof shelljs.sort; - export const tail: typeof shelljs.tail; - export const uniq: typeof shelljs.uniq; - export const set: typeof shelljs.set; - export const config: typeof shelljs.config; + const cd: typeof shelljs.cd; + const pwd: typeof shelljs.pwd; + const ls: typeof shelljs.ls; + const find: typeof shelljs.find; + const cp: typeof shelljs.cp; + const rm: typeof shelljs.rm; + const mv: typeof shelljs.mv; + const mkdir: typeof shelljs.mkdir; + const cat: typeof shelljs.cat; + const sed: typeof shelljs.sed; + const grep: typeof shelljs.grep; + const echo: typeof shelljs.echo; + const pushd: typeof shelljs.pushd; + const popd: typeof shelljs.popd; + const dirs: typeof shelljs.dirs; + const ln: typeof shelljs.ln; + const exit: typeof shelljs.exit; + const env: typeof shelljs.env; + const exec: typeof shelljs.exec; + const chmod: typeof shelljs.chmod; + const tempdir: typeof shelljs.tempdir; + const error: typeof shelljs.error; + const touch: typeof shelljs.touch; + const head: typeof shelljs.head; + const sort: typeof shelljs.sort; + const tail: typeof shelljs.tail; + const uniq: typeof shelljs.uniq; + const set: typeof shelljs.set; + const config: typeof shelljs.config; } From 52aee928af894837bf24f71bb2621a710f6e804a Mon Sep 17 00:00:00 2001 From: Chris Wilcox Date: Thu, 6 Dec 2018 11:09:51 -0800 Subject: [PATCH 441/608] Remove google-cloud__storage as it is now Typescript. --- notNeededPackages.json | 6 + .../google-cloud__storage-tests.ts | 592 ------------------ types/google-cloud__storage/index.d.ts | 469 -------------- types/google-cloud__storage/tsconfig.json | 28 - types/google-cloud__storage/tslint.json | 8 - 5 files changed, 6 insertions(+), 1097 deletions(-) delete mode 100644 types/google-cloud__storage/google-cloud__storage-tests.ts delete mode 100644 types/google-cloud__storage/index.d.ts delete mode 100644 types/google-cloud__storage/tsconfig.json delete mode 100644 types/google-cloud__storage/tslint.json diff --git a/notNeededPackages.json b/notNeededPackages.json index 53ff6a7124..c64738aa8d 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -642,6 +642,12 @@ "sourceRepoURL": "https://github.com/jdalrymple/node-gitlab", "asOfVersion": "2.0.0" }, + { + "libraryName": "Google Cloud Storage", + "typingsPackageName": "google-cloud__storage", + "sourceRepoURL": "https://github.com/googleapis/nodejs-storage", + "asOfVersion": "2.3.0" + }, { "libraryName": "graphene-pk11", "typingsPackageName": "graphene-pk11", diff --git a/types/google-cloud__storage/google-cloud__storage-tests.ts b/types/google-cloud__storage/google-cloud__storage-tests.ts deleted file mode 100644 index 1db3e73284..0000000000 --- a/types/google-cloud__storage/google-cloud__storage-tests.ts +++ /dev/null @@ -1,592 +0,0 @@ -// import file system i/o api -import * as fs from "fs"; - -// import Google Cloud Storage -import { - Acl, - Bucket, - Channel, - File, - ApiResponse, - BucketConfig, - BucketFileOptions, - BucketGetOptions, - BucketMetadata, - BucketPrivacyOptions, - BucketQuery, - ChannelConfig, - DownloadOptions, - FileMetadata, - FilePrivateOptions, - ReadStreamOptions, - ResumableUploadOptions, - SignedPolicy, - SignedPolicyOptions, - SignedUrlConfig, - WriteStreamOptions, - UploadOptions -} from "@google-cloud/storage"; -import Storage = require("@google-cloud/storage"); - -/** - * Test the storage service. - */ -export class TestStorage { - // constants - static BUCKET_CONFIG: BucketConfig = { - multiRegional: true - }; - - // import Storage class - static gcs = new Storage(); - - constructor() { - // nothing to do - } - - /** Returns the bucket. */ - bucket(name: string): Bucket { - return TestStorage.gcs.bucket(name); - } - - /** Create a new bucket. */ - createBucket(name: string, config?: BucketConfig): Promise<[Bucket, ApiResponse]> { - // overwrite default values with custom config - config = Object.assign(TestStorage.BUCKET_CONFIG, config); - - return TestStorage.gcs.createBucket(name, config); - } - - /** - * Query for buckets. - */ - getBuckets(query?: BucketQuery): Promise<[Bucket[]]> { - return TestStorage.gcs.getBuckets(query); - } -} - -/** The bucket API wrapper. */ -export class TestBucket { - // the bucket in the cloud - bucket: Bucket; - - /** Create a bucket. */ - create(config?: BucketConfig): Promise<[Bucket, ApiResponse]> { - return this.bucket.create(config); - } - - /** Create a channel that will be notified when objects in this bucket changes. */ - createChannel(id: string, config: ChannelConfig): Promise<[Channel, ApiResponse]> { - return this.bucket.createChannel(id, config); - } - - /** Delete the bucket. */ - delete(): Promise<[ApiResponse]> { - return this.bucket.delete(); - } - - /** Iterate over the bucket's files, calling file.delete() on each. */ - deleteFiles(query?: BucketQuery): Promise { - return this.bucket.deleteFiles(query); - } - - /** Check if the bucket exists. */ - exists(): Promise<[boolean]> { - return this.bucket.exists(); - } - - /** Create a File object. */ - file(name: string, options?: BucketFileOptions): File { - return this.bucket.file(name); - } - - /** Get a bucket if it exists. */ - get(options?: BucketGetOptions): Promise<[Bucket, ApiResponse]> { - return this.bucket.get(options); - } - - /** Get File objects for the files currently in the bucket */ - getFiles(query?: BucketQuery): Promise<[File[]]> { - return this.bucket.getFiles(query); - } - - /** Get File objects for the files currently in the bucket as a readable object stream. */ - getFilesStream(query?: BucketQuery): fs.ReadStream { - return this.bucket.getFilesStream(query); - } - - /** Get the bucket's metadata. */ - getMetadata(): Promise<[BucketMetadata, ApiResponse]> { - return this.bucket.getMetadata(); - } - - /** Make the bucket listing private. */ - makePrivate(options?: BucketPrivacyOptions): Promise<[File[]]> { - return this.bucket.makePrivate(options); - } - - /** Make the bucket publicly readable. */ - makePublic(options?: BucketPrivacyOptions): Promise<[File[]]> { - return this.bucket.makePublic(options); - } - - /** Set the bucket's metadata. */ - setMetadata(metadata?: BucketMetadata): Promise<[ApiResponse]> { - return this.bucket.setMetadata(metadata); - } - - /** Upload a file. */ - upload(localPath: string, options?: UploadOptions): Promise<[File]> { - return this.bucket.upload(localPath, options); - } -} - -/** The file API wrapper. */ -export class TestFile { - // the file in the cloud - file: File; - - /** - * Copy this file to another file. - * By default, this will copy the file to the same bucket, but you can choose to copy it to another - * Bucket by providing a Bucket or File object or a URL starting with "gs:// ". - */ - copy(destination: string | Bucket | File): Promise<[File, ApiResponse]> { - return this.file.copy(destination); - } - - /** Create a unique resumable upload session URI. This is the first step when performing a resumable upload. */ - createResumableUpload(options?: ResumableUploadOptions): Promise<[string]> { - return this.file.createResumableUpload(options); - } - - /** - * Create a readable stream to read the contents of the remote file. - * It can be piped to a writable stream or listened to for 'data' events to read a file's contents. - */ - createReadStream(options?: ReadStreamOptions): fs.ReadStream { - return this.file.createReadStream(options); - } - - /** Create a writable stream to overwrite the contents of the file in your bucket. */ - createWriteStream(options?: WriteStreamOptions): fs.WriteStream { - return this.file.createWriteStream(options); - } - - /** Delete the file. */ - delete(): Promise<[ApiResponse]> { - return this.file.delete(); - } - - /** Convenience method to download a file into memory or to a local destination. */ - download(options?: DownloadOptions): Promise<[Buffer]> { - return this.file.download(options); - } - - /** Check if the file exists. */ - exists(): Promise<[boolean]> { - return this.file.exists(); - } - - /** Get a file object and its metadata if it exists. */ - get(): Promise<[File, ApiResponse]> { - return this.file.get(); - } - - /** Get the file's metadata. */ - getMetadata(): Promise<[FileMetadata, ApiResponse]> { - return this.file.getMetadata(); - } - - /** Get a signed policy document to allow a user to upload data with a POST request */ - getSignedPolicy(options?: SignedPolicyOptions): Promise<[SignedPolicy]> { - return this.file.getSignedPolicy(options); - } - - /** Get a signed URL to allow limited time access to the file */ - getSignedUrl(config: SignedUrlConfig): Promise<[string]> { - return this.file.getSignedUrl(config); - } - - /** Make a file private to the project and remove all other permissions. */ - makePrivate(options?: FilePrivateOptions): Promise<[ApiResponse]> { - return this.file.makePrivate(options); - } - - /** Set a file to be publicly readable and maintain all previous permissions. */ - makePublic(): Promise<[ApiResponse]> { - return this.file.makePublic(); - } - - /** - * Move this file to another location. - * By default, this will move the file to the same bucket, but you can choose to move it to - * another Bucket by providing a Bucket or File object or a URL beginning with "gs:// ". - */ - move(destination: string | Bucket | File): Promise<[File, ApiResponse]> { - return this.file.move(destination); - } - - /** Write arbitrary data to a file. */ - save(data: string, options?: WriteStreamOptions): Promise { - return this.file.save(data); - } - - /** The Storage API allows you to use a custom key for server-side encryption. */ - setEncryptionKey(encryptionKey: string | Buffer): File { - return this.file.setEncryptionKey(encryptionKey); - } - - /** - * Merge the given metadata with the current remote file's metadata. - * This will set metadata if it was previously unset or update previously set metadata. - * To unset previously set metadata, set its value to null. - */ - setMetadata(metadata: FileMetadata): Promise<[ApiResponse]> { - return this.file.setMetadata(metadata); - } -} - -const testStorage = new TestStorage().bucket("examplebucketname"); - -testStorage.iam.getPolicy(); - -testStorage.iam.setPolicy({ - bindings: [ - { - role: "roles/storage.admin", - members: ['serviceAccount:myotherproject@appspot.gserviceaccount.com'] - } - ] - }); - -testStorage.iam.testPermissions('storage.buckets.delete'); - -testStorage.iam.testPermissions(['storage.buckets.delete', 'storage.buckets.get']); - -// Example from https://cloud.google.com/storage/docs/creating-buckets#storage-create-bucket-code_samples -{ - // Creates a client - const storage = new Storage(); - - const bucketName = 'Name of a bucket, e.g. my-bucket'; - - // Creates a new bucket - storage - .createBucket(bucketName, { - location: 'ASIA', - storageClass: 'COLDLINE', - }) - .then(() => { - console.log(`Bucket ${bucketName} created.`); - }) - .catch(err => { - console.error('ERROR:', err); - }); -} - -// Example from https://cloud.google.com/storage/docs/listing-buckets#storage-list-buckets-nodejs -{ - // Creates a client - const storage = new Storage(); - - // Lists all buckets in the current project - storage - .getBuckets() - .then(results => { - const buckets = results[0]; - - console.log('Buckets:'); - buckets.forEach(bucket => { - console.log(bucket.name); - }); - }) - .catch(err => { - console.error('ERROR:', err); - }); -} - -// Example from https://cloud.google.com/storage/docs/moving-buckets#storage-create-bucket-nodejs -{ - // Creates a client - const storage = new Storage(); - - const bucketName = 'Name of a bucket, e.g. my-bucket'; - - // Creates a new bucket - storage - .createBucket(bucketName, { - location: 'ASIA', - storageClass: 'COLDLINE', - }) - .then(() => { - console.log(`Bucket ${bucketName} created.`); - }) - .catch(err => { - console.error('ERROR:', err); - }); -} - -// Example from https://cloud.google.com/storage/docs/deleting-buckets -{ - // Creates a client - const storage = new Storage(); - - const bucketName = 'Name of a bucket, e.g. my-bucket'; - - // Deletes the bucket - storage - .bucket(bucketName) - .delete() - .then(() => { - console.log(`Bucket ${bucketName} deleted.`); - }) - .catch(err => { - console.error('ERROR:', err); - }); -} - -// Example from https://cloud.google.com/storage/docs/uploading-objects -{ - // Creates a client - const storage = new Storage(); - - const bucketName = 'Name of a bucket, e.g. my-bucket'; - const filename = 'Local file to upload, e.g. ./local/path/to/file.txt'; - - // Uploads a local file to the bucket - storage - .bucket(bucketName) - .upload(filename, { - // Support for HTTP requests made with `Accept-Encoding: gzip` - gzip: true, - metadata: { - // Enable long-lived HTTP caching headers - // Use only if the contents of the file will never change - // (If the contents will change, use cacheControl: 'no-cache') - cacheControl: 'public, max-age=31536000', - }, - }) - .then(() => { - console.log(`${filename} uploaded to ${bucketName}.`); - }) - .catch(err => { - console.error('ERROR:', err); - }); -} - -// Example from https://cloud.google.com/storage/docs/listing-objects -{ - // Creates a client - const storage = new Storage(); - - const bucketName = 'Name of a bucket, e.g. my-bucket'; - - // Lists files in the bucket - storage - .bucket(bucketName) - .getFiles() - .then(results => { - const files = results[0]; - - console.log('Files:'); - files.forEach(file => { - console.log(file.name); - }); - }) - .catch(err => { - console.error('ERROR:', err); - }); -} - -// Example from https://cloud.google.com/storage/docs/listing-objects -{ - // Creates a client - const storage = new Storage(); - - const bucketName = 'Name of a bucket, e.g. my-bucket'; - const prefix = 'Prefix by which to filter, e.g. public/'; - const delimiter = 'Delimiter to use, e.g. /'; - - /** - * This can be used to list all blobs in a "folder", e.g. "public/". - * - * The delimiter argument can be used to restrict the results to only the - * "files" in the given "folder". Without the delimiter, the entire tree under - * the prefix is returned. For example, given these blobs: - * - * /a/1.txt - * /a/b/2.txt - * - * If you just specify prefix = '/a', you'll get back: - * - * /a/1.txt - * /a/b/2.txt - * - * However, if you specify prefix='/a' and delimiter='/', you'll get back: - * - * /a/1.txt - */ - const options = { - prefix, - delimiter - }; - - // Lists files in the bucket, filtered by a prefix - storage - .bucket(bucketName) - .getFiles(options) - .then(results => { - const files = results[0]; - - console.log('Files:'); - files.forEach(file => { - console.log(file.name); - }); - }) - .catch(err => { - console.error('ERROR:', err); - }); -} - -// Example from https://cloud.google.com/storage/docs/downloading-objects#storage-download-object-nodejs -{ - // Creates a client - const storage = new Storage(); - - const bucketName = 'Name of a bucket, e.g. my-bucket'; - const srcFilename = 'Remote file to download, e.g. file.txt'; - const destFilename = 'Local destination for file, e.g. ./local/path/to/file.txt'; - - const options = { - // The path to which the file should be downloaded, e.g. "./file.txt" - destination: destFilename, - }; - - // Downloads the file - storage - .bucket(bucketName) - .file(srcFilename) - .download(options) - .then(() => { - console.log( - `gs://${bucketName}/${srcFilename} downloaded to ${destFilename}.` - ); - }) - .catch(err => { - console.error('ERROR:', err); - }); -} - -// Example from https://cloud.google.com/storage/docs/renaming-copying-moving-objects -{ - // Creates a client - const storage = new Storage(); - - const bucketName = 'Name of a bucket, e.g. my-bucket'; - const srcFilename = 'File to move, e.g. file.txt'; - const destFilename = 'Destination for file, e.g. moved.txt'; - - // Moves the file within the bucket - storage - .bucket(bucketName) - .file(srcFilename) - .move(destFilename) - .then(() => { - console.log( - `gs://${bucketName}/${srcFilename} moved to gs://${bucketName}/${destFilename}.` - ); - }) - .catch(err => { - console.error('ERROR:', err); - }); -} - -// Example from https://cloud.google.com/storage/docs/renaming-copying-moving-objects -{ - // Creates a client - const storage = new Storage(); - - const srcBucketName = 'Name of the source bucket, e.g. my-bucket'; - const srcFilename = 'Name of the source file, e.g. file.txt'; - const destBucketName = 'Name of the destination bucket, e.g. my-other-bucket'; - const destFilename = 'Destination name of file, e.g. file.txt'; - - // Copies the file to the other bucket - storage - .bucket(srcBucketName) - .file(srcFilename) - .copy(storage.bucket(destBucketName).file(destFilename)) - .then(() => { - console.log( - `gs://${srcBucketName}/${srcFilename} copied to gs://${destBucketName}/${destFilename}.` - ); - }) - .catch(err => { - console.error('ERROR:', err); - }); -} - -// Example from https://cloud.google.com/storage/docs/viewing-editing-metadata -{ - // Creates a client - const storage = new Storage(); - - const bucketName = 'Name of a bucket, e.g. my-bucket'; - const filename = 'File to access, e.g. file.txt'; - - // Gets the metadata for the file - storage - .bucket(bucketName) - .file(filename) - .getMetadata() - .then(results => { - const metadata = results[0]; - - console.log(`File: ${metadata.name}`); - console.log(`Bucket: ${metadata.bucket}`); - console.log(`Storage class: ${metadata.storageClass}`); - console.log(`Self link: ${metadata.selfLink}`); - console.log(`ID: ${metadata.id}`); - console.log(`Size: ${metadata.size}`); - console.log(`Updated: ${metadata.updated}`); - console.log(`Generation: ${metadata.generation}`); - console.log(`Metageneration: ${metadata.metageneration}`); - console.log(`Etag: ${metadata.etag}`); - console.log(`Owner: ${metadata.owner}`); - console.log(`Component count: ${metadata.component_count}`); - console.log(`Crc32c: ${metadata.crc32c}`); - console.log(`md5Hash: ${metadata.md5Hash}`); - console.log(`Cache-control: ${metadata.cacheControl}`); - console.log(`Content-type: ${metadata.contentType}`); - console.log(`Content-disposition: ${metadata.contentDisposition}`); - console.log(`Content-encoding: ${metadata.contentEncoding}`); - console.log(`Content-language: ${metadata.contentLanguage}`); - console.log(`Metadata: ${metadata.metadata}`); - console.log(`Media link: ${metadata.mediaLink}`); - }) - .catch(err => { - console.error('ERROR:', err); - }); -} - -// Example from https://cloud.google.com/storage/docs/deleting-objects -{ - // Creates a client - const storage = new Storage(); - - const bucketName = 'Name of a bucket, e.g. my-bucket'; - const filename = 'File to delete, e.g. file.txt'; - - // Deletes the file from the bucket - storage - .bucket(bucketName) - .file(filename) - .delete() - .then(() => { - console.log(`gs://${bucketName}/${filename} deleted.`); - }) - .catch(err => { - console.error('ERROR:', err); - }); -} diff --git a/types/google-cloud__storage/index.d.ts b/types/google-cloud__storage/index.d.ts deleted file mode 100644 index 2053abcc62..0000000000 --- a/types/google-cloud__storage/index.d.ts +++ /dev/null @@ -1,469 +0,0 @@ -// Type definitions for @google-cloud/storage 1.7 -// Project: https://github.com/googleapis/nodejs-storage -// Definitions by: Brian Love -// Nathan Brooker Perry -// Matt Welke -// Futa Ogawa -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 - -/// - -import { ReadStream, WriteStream } from "fs"; -import { CoreOptions } from "request"; - -type PromiseLibrary = () => PromiseLike; - -declare namespace Storage { - /** - * A bucket in the cloud. - */ - class Bucket { - constructor(storage: Storage, name: string); - acl: Acl; - combine(sources: string[] | File[], destination: string | File): Promise<[File, ApiResponse]>; - create(config?: BucketConfig): Promise<[Bucket, ApiResponse]>; - createChannel(id: string, config: ChannelConfig): Promise<[Channel, ApiResponse]>; - delete(): Promise<[ApiResponse]>; - deleteFiles(query?: BucketQuery): Promise; - exists(): Promise<[boolean]>; - file(name: string, options?: BucketFileOptions): File; - get(options?: BucketGetOptions): Promise<[Bucket, ApiResponse]>; - getFiles(query?: BucketQuery): Promise<[File[]]>; - getFilesStream(query?: BucketQuery): ReadStream; - getMetadata(): Promise<[BucketMetadata, ApiResponse]>; - id: string; - iam: Iam; - makePrivate(options?: BucketPrivacyOptions): Promise<[File[]]>; - makePublic(options?: BucketPrivacyOptions): Promise<[File[]]>; - metadata: BucketMetadata; - name: string; - setMetadata(metadata?: BucketMetadata): Promise<[ApiResponse]>; - upload(localPath: string, options?: UploadOptions): Promise<[File]>; - } - - /** - * Bucket configuration. - */ - interface BucketConfig { - coldline?: boolean; - dra?: boolean; - location?: string; - multiRegional?: boolean; - nearline?: boolean; - regional?: boolean; - versioning?: { - enabled?: boolean - }; - // Note: This is not documented, but it is used in examples (https://cloud.google.com/nodejs/docs/reference/storage/1.7.x/Storage) - storageClass?: 'COLDLINE' | 'DURABLE_REDUCED_AVAILABILITY' | 'MULTI_REGIONAL' | 'NEARLINE' | 'REGIONAL'; - } - - /** - * Options for getting a file. - */ - interface BucketFileOptions { - generation?: string | number; - } - - /** - * Options for getting a bucket. - */ - interface BucketGetOptions { - autoCreate?: boolean; - } - - /** - * Bucket metadata. - */ - interface BucketMetadata { - etag?: string; - id?: string; - kind?: string; - location?: string; - metageneration?: string; - name?: string; - projectNumber?: string; - selfLink?: string; - storageClass?: string; - timeCreated?: string; - updated?: string; - } - - /** - * The options for making the bucket private. - */ - interface BucketPrivacyOptions { - includeFiles?: boolean; - force?: boolean; - } - - /** - * Query a bucket. - */ - interface BucketQuery { - autoPaginate?: boolean; - delimiter?: string; - directory?: string; - prefix?: string; - maxApiCalls?: number; - maxResults?: number; - pageToken?: string; - userProject?: string; - versions?: boolean; - } - - /** - * Options for specifying the content length range. - */ - interface ContentLengthRange { - max?: number; - min?: number; - } - - /** - * A file in the cloud. - */ - class File { - constructor(bucket: Bucket, name: string, options?: BucketFileOptions); - acl: Acl; - copy(destination: string | Bucket | File): Promise<[File, ApiResponse]>; - createReadStream(options?: ReadStreamOptions): ReadStream; - createResumableUpload(options?: ResumableUploadOptions): Promise<[string]>; - createWriteStream(options?: WriteStreamOptions): WriteStream; - delete(): Promise<[ApiResponse]>; - download(options?: DownloadOptions): Promise<[Buffer]>; - exists(): Promise<[boolean]>; - get(): Promise<[File, ApiResponse]>; - getMetadata(): Promise<[FileMetadata, ApiResponse]>; - getSignedPolicy(options?: SignedPolicyOptions): Promise<[SignedPolicy]>; - getSignedUrl(config: SignedUrlConfig): Promise<[string]>; - makePrivate(options?: FilePrivateOptions): Promise<[ApiResponse]>; - makePublic(): Promise<[ApiResponse]>; - move(destination: string | Bucket | File): Promise<[File, ApiResponse]>; - name: string; - save(data: string | Buffer, options?: WriteStreamOptions): Promise; - setEncryptionKey(encryptionKey: string | Buffer): File; - setMetadata(metadata: FileMetadata): Promise<[ApiResponse]>; - metadata?: FileMetadata; - } - - /** - * Access controls on the object, containing one or more objectAccessControls Resources. - */ - interface AclFileMetadata { - bucket?: string; - domain?: string; - email?: string; - entity?: string; - entityId?: string; - etag?: string; - generation?: number; - id?: string; - kind?: string; - object?: string; - projectTeam?: ProjectTeam; - role?: string; - selfLink?: string; - } - - /** - * The project team associated with the entity, if any. - */ - interface ProjectTeam { - projectNumber?: string; - team?: string; - } - - /** - * Metadata of customer-supplied encryption key, if the object is encrypted by such a key. - */ - interface CustomerEncryption { - encryptionAlgorithm?: string; - keySha256?: string; - } - - /** - * User-defined metadata. - */ - interface CustomFileMetadata { - [key: string]: string; - } - - /** - * The owner of the object. This will always be the uploader of the object. - */ - interface Owner { - entity?: string; - entityId?: string; - } - - /** - * File metadata. - */ - interface FileMetadata { - acl?: AclFileMetadata[]; - bucket?: string; - cacheControl?: string; - componentCount?: number; - // Note: this property is accessed in one of the examples - component_count?: number; - contentDisposition?: string; - contentEncoding?: string; - contentLanguage?: string; - contentType?: string; - crc32c?: string; - customerEncryption?: CustomerEncryption; - etag?: string; - generation?: number; - id?: string; - kind?: string; - kmsKeyName?: string; - md5Hash?: string; - mediaLink?: string; - metadata?: CustomFileMetadata; - metageneration?: number; - name?: string; - owner?: Owner; - selfLink?: string; - size?: null | number; - storageClass?: string; - timeCreated?: string; - timeDeleted?: string; - timeStorageClassUpdated?: string; - updated?: string; - } - - /** - * Options when setting the file as private. - */ - interface FilePrivateOptions { - strict?: boolean; - } - - /** - * A signed policy allowing a user to upload a file with a POST. - */ - interface SignedPolicy { - base64?: string; - signature?: string; - string?: string; - } - - /** - * Options when obtaining the signed policy. - */ - interface SignedPolicyOptions { - acl?: string; - contentLengthRange?: ContentLengthRange; - equals?: string[] | [string[]]; - expires?: number | string; - max?: number; - min?: number; - startsWith?: string[] | [string[]]; - successRedirect?: string; - successStatus?: string; - } - - /** - * Options when obtaining a temporary signed URL for a file. - */ - interface SignedUrlConfig { - action: string; - cname?: string; - contentMd5?: string; - contentType?: string; - expires: any; - extensionHeaders?: { [key: string]: string }; - promptSaveAs?: string; - responseDisposition?: string; - responseType?: string; - } - - /** - * Options when obtaining a resumable upload URI. - */ - interface ResumableUploadOptions { - metadata?: FileMetadata; - origin?: string; - predefinedAcl?: string; - private?: boolean; - public?: boolean; - } - - /** - * Access control list for storage buckets and files. - */ - interface Acl extends AclActions { - default: AclEntity; - owners: AclEntity; - readers: AclEntity; - writers: AclEntity; - } - - /** - * Actions that can be performed on all ACL entities, including the root Acl. - */ - interface AclActions { - add(options: AclOptions): Promise<[Acl, ApiResponse]>; - delete(options: AclOptions): Promise<[Acl, ApiResponse]>; - get(options: AclOptions): Promise<[Acl, ApiResponse]>; - update(options: AclOptions): Promise<[Acl, ApiResponse]>; - } - - /** - * An object of convenience methods to add or delete reader ACL permissions for a given entity. - */ - interface AclEntity extends AclActions { - addAllAuthenticatedUsers(): Promise<[Acl, ApiResponse]>; - addAllUsers(): Promise<[Acl, ApiResponse]>; - addDomain(entity: string): Promise<[Acl, ApiResponse]>; - addGroup(entity: string): Promise<[Acl, ApiResponse]>; - addProject(entity: string): Promise<[Acl, ApiResponse]>; - addUser(entity: string): Promise<[Acl, ApiResponse]>; - deleteAllAuthenticatedUsers(): Promise<[Acl, ApiResponse]>; - deleteAllUsers(): Promise<[Acl, ApiResponse]>; - deleteDomain(entity: string): Promise<[Acl, ApiResponse]>; - deleteGroup(entity: string): Promise<[Acl, ApiResponse]>; - deleteProject(entity: string): Promise<[Acl, ApiResponse]>; - deleteUser(entity: string): Promise<[Acl, ApiResponse]>; - } - - /** - * ACL options. - */ - interface AclOptions { - entity?: string; - role?: string; - generation?: number; - } - - /** - * The response object. - */ - interface ApiResponse { - etag?: string; - id?: string; - kind?: string; - location?: string; - metageneration?: string; - name?: string; - projectNumber?: string; - selfLink?: string; - storageClass?: string; - timeCreated?: string; - updated?: string; - } - - interface Credentials { - client_email?: string; - private_key?: string; - } - - interface ConfigurationObject { - autoRetry?: boolean; - credentials?: Credentials; - email?: string; - keyFilename?: string; - maxRetries?: number; - projectId?: string; - promise?: PromiseLibrary; - } - - /** - * The options when downloading a file. - */ - interface DownloadOptions extends ReadStreamOptions { - destination?: string; - } - - /** - * Options when reading a file stream. - */ - interface ReadStreamOptions { - end?: number; - start?: number; - validation?: string | boolean; - } - - /** - * Options when uploading file to bucket. - */ - interface UploadOptions extends WriteStreamOptions { - destination?: string | File; - encryptionKey?: string; - kmsKeyName?: string; - requestOptions?: CoreOptions; - } - - /** - * Options when writing to a file stream. - */ - interface WriteStreamOptions { - contentType?: string; - gzip?: string | boolean; - metadata?: FileMetadata; - offset?: string; - predefinedAcl?: string; - private?: boolean; - public?: boolean; - resumable?: boolean; - uri?: string; - userProject?: string; - validation?: string | boolean; - } - - /** - * This class allows you interact with Google Cloud Storage. - */ - class Channel { - constructor(storage: Storage, id: string, resourceId: string); - stop(): Promise<[ApiResponse]>; - } - - /** - * Channel configuration. - */ - interface ChannelConfig { - address: string; - } - - /** - * This class allows you to get Identity Access Management information. - */ - class Iam { - getPolicy(): Promise; - setPolicy(policy: IamPolicy): Promise<[IamPolicy, ApiResponse]>; - testPermissions(permission: string | string[]): Promise<[{[key: string]: boolean}, ApiResponse]>; - } - - /** - * IAM policy - */ - interface IamPolicy { - bindings: IamBinding[]; - } - - interface IamBinding { - role: string; - members: string[]; - } -} - -/** - * The Storage class allows you interact with Google Cloud Storage. - */ -declare class Storage { - constructor(config?: Storage.ConfigurationObject); - acl: Storage.Acl; - bucket(name: string | Storage.Bucket): Storage.Bucket; - channel(id: string, resourceId: string): Storage.Channel; - createBucket(name: string, metadata?: Storage.BucketConfig): Promise<[Storage.Bucket, Storage.ApiResponse]>; - getBuckets(query?: Storage.BucketQuery): Promise<[Storage.Bucket[]]>; - getBucketsStream(query?: Storage.BucketQuery): Promise<[ReadStream]>; - Channel: (storage: Storage, id: string, resourceId: string) => Storage.Channel; - File: (bucket: Storage.Bucket, name: string, opts: Storage.BucketFileOptions) => Storage.File; - Bucket: (storage: Storage, name: string) => Storage.Bucket; -} - -export = Storage; diff --git a/types/google-cloud__storage/tsconfig.json b/types/google-cloud__storage/tsconfig.json deleted file mode 100644 index fe05cce995..0000000000 --- a/types/google-cloud__storage/tsconfig.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "paths": { - "@google-cloud/storage": [ - "google-cloud__storage" - ] - }, - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "google-cloud__storage-tests.ts" - ] -} \ No newline at end of file diff --git a/types/google-cloud__storage/tslint.json b/types/google-cloud__storage/tslint.json deleted file mode 100644 index b3dfb39122..0000000000 --- a/types/google-cloud__storage/tslint.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "dtslint/dt.json", - "rules": { - // TODOs - "no-duplicate-imports": false, - "prefer-object-spread": false - } -} From d00ce6dfdf92472f320222dab32d8a8eb149b402 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Thu, 6 Dec 2018 11:39:44 -0800 Subject: [PATCH 442/608] Add semi-colons --- types/shelljs/make.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/shelljs/make.d.ts b/types/shelljs/make.d.ts index 0db5320b72..ca4c2b6135 100644 --- a/types/shelljs/make.d.ts +++ b/types/shelljs/make.d.ts @@ -1,9 +1,9 @@ import * as shelljs from './'; declare global { interface Target { - (...args: any[]): void, - result?: any, - done?: boolean + (...args: any[]): void; + result?: any; + done?: boolean; } const target: { all?: Target; From 225b004f4a13bfde2ce2e847aeda60262a8d9f65 Mon Sep 17 00:00:00 2001 From: Esteban Ibarra Date: Thu, 6 Dec 2018 15:01:57 -0500 Subject: [PATCH 443/608] Revert "Revert changes of react-native-draggable-flatlist" This reverts commit ca53c065a52c288b7d8d3fb3bde5709c6d496f7c. --- .../index.d.ts | 59 +++++++++++++++++++ .../react-native-draggable-flatlist-tests.tsx | 44 ++++++++++++++ .../tsconfig.json | 24 ++++++++ .../tslint.json | 1 + 4 files changed, 128 insertions(+) create mode 100644 types/react-native-draggable-flatlist/index.d.ts create mode 100644 types/react-native-draggable-flatlist/react-native-draggable-flatlist-tests.tsx create mode 100644 types/react-native-draggable-flatlist/tsconfig.json create mode 100644 types/react-native-draggable-flatlist/tslint.json diff --git a/types/react-native-draggable-flatlist/index.d.ts b/types/react-native-draggable-flatlist/index.d.ts new file mode 100644 index 0000000000..0b96f0b3cd --- /dev/null +++ b/types/react-native-draggable-flatlist/index.d.ts @@ -0,0 +1,59 @@ +// Type definitions for react-native-draggable-flatlist 1.1 +// Project: https://github.com/computerjazz/react-native-draggable-flatlist#readme +// Definitions by: Stack Builders +// Esteban Ibarra +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +import { VirtualizedListWithoutRenderItemProps } from "react-native"; +import { Component } from "react"; + +export interface RenderItemInfo { + item: ItemR; + index: number; + move: () => void; + moveEnd: () => void; + isActive: boolean; +} + +export interface OnMoveEndInfo { + data: ReadonlyArray | null; + to: number; + from: number; + row: ItemM; +} + +interface DraggableFlatListProps extends VirtualizedListWithoutRenderItemProps { + /** + * Items to be rendered. + */ + data: ReadonlyArray | null; + + /** + * Function that returns updated ordering of data + */ + onMoveEnd?: (info: OnMoveEndInfo) => void; + + /** + * Function that is called when row becomes active. + */ + onMoveBegin?: (index: number) => void; + + /** + * Sets where scrolling begins. + * + * Default is 5 + */ + scrollPercent?: number; + + /** + * Function that calls move when the row should become active (in an onPress, onLongPress, etc). Calls moveEnd when the gesture is complete (in onPressOut). + */ + renderItem: (info: RenderItemInfo) => React.ReactElement | null; +} + +declare class DraggableFlatList extends Component> { + constructor(props: DraggableFlatListProps); +} + +export default DraggableFlatList; diff --git a/types/react-native-draggable-flatlist/react-native-draggable-flatlist-tests.tsx b/types/react-native-draggable-flatlist/react-native-draggable-flatlist-tests.tsx new file mode 100644 index 0000000000..40d613e4ea --- /dev/null +++ b/types/react-native-draggable-flatlist/react-native-draggable-flatlist-tests.tsx @@ -0,0 +1,44 @@ +import * as React from 'react'; +import { TouchableOpacity, Text } from 'react-native'; +import DraggableFlatList, { RenderItemInfo } from 'react-native-draggable-flatlist'; + +interface Item { + name: string; + mail: string; +} + +class Example extends React.Component { + state = { + data: [ + { name: 'Esteban', mail: 'foo@foo.com' }, + { name: 'Xavier', mail: 'foo2@foo.com' }, + ] + }; + + renderItem({ item, index, move, moveEnd, isActive }: RenderItemInfo) { + return ( + + {index} + {item.name} + {item.mail} + + ); + } + + render() { + const { data } = this.state; + return ( + `draggable-item-${index}`} + scrollPercent={10} + onMoveEnd={({ data }) => this.setState({ data })} + ListFooterComponent={{'Hello'}} + /> + ); + } +} diff --git a/types/react-native-draggable-flatlist/tsconfig.json b/types/react-native-draggable-flatlist/tsconfig.json new file mode 100644 index 0000000000..b3c009feac --- /dev/null +++ b/types/react-native-draggable-flatlist/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "jsx": "react-native" + }, + "files": [ + "index.d.ts", + "react-native-draggable-flatlist-tests.tsx" + ] +} diff --git a/types/react-native-draggable-flatlist/tslint.json b/types/react-native-draggable-flatlist/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/react-native-draggable-flatlist/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From d4a69ca49c36d33554b56b5b161ff98c53fb97db Mon Sep 17 00:00:00 2001 From: Kelvin Jin Date: Thu, 6 Dec 2018 11:57:50 -0800 Subject: [PATCH 444/608] [node] add node inspector protocol extensions --- types/node/inspector.d.ts | 264 ++++++++++++++++++ types/node/node-tests.ts | 4 + .../generate-inspector/event-emitter.ts | 5 +- .../generate-substitute-args.ts | 14 +- .../node/scripts/generate-inspector/index.ts | 80 ++++-- 5 files changed, 341 insertions(+), 26 deletions(-) diff --git a/types/node/inspector.d.ts b/types/node/inspector.d.ts index 3a2bb35afe..a9d0f1140a 100644 --- a/types/node/inspector.d.ts +++ b/types/node/inspector.d.ts @@ -1912,6 +1912,90 @@ declare module "inspector" { } } + namespace NodeTracing { + interface TraceConfig { + /** + * Controls how the trace buffer stores data. + */ + recordMode?: string; + /** + * Included category filters. + */ + includedCategories: string[]; + } + + interface StartParameterType { + traceConfig: TraceConfig; + } + + interface GetCategoriesReturnType { + /** + * A list of supported tracing categories. + */ + categories: string[]; + } + + interface DataCollectedEventDataType { + value: Array<{}>; + } + } + + namespace NodeWorker { + type WorkerID = string; + + /** + * Unique identifier of attached debugging session. + */ + type SessionID = string; + + interface WorkerInfo { + workerId: WorkerID; + type: string; + title: string; + url: string; + } + + interface SendMessageToWorkerParameterType { + message: string; + /** + * Identifier of the session. + */ + sessionId: SessionID; + } + + interface EnableParameterType { + /** + * Whether to new workers should be paused until the frontend sends `Runtime.runIfWaitingForDebugger` + * message to run them. + */ + waitForDebuggerOnStart: boolean; + } + + interface AttachedToWorkerEventDataType { + /** + * Identifier assigned to the session used to send/receive messages. + */ + sessionId: SessionID; + workerInfo: WorkerInfo; + waitingForDebugger: boolean; + } + + interface DetachedFromWorkerEventDataType { + /** + * Detached session identifier. + */ + sessionId: SessionID; + } + + interface ReceivedMessageFromWorkerEventDataType { + /** + * Identifier of a session which sends a message. + */ + sessionId: SessionID; + message: string; + } + } + /** * The inspector.Session is used for dispatching messages to the V8 inspector back-end and receiving message responses and notifications. */ @@ -1958,6 +2042,7 @@ declare module "inspector" { * `messageAdded` notification. */ post(method: "Console.enable", callback?: (err: Error | null) => void): void; + /** * Continues execution until specific location is reached. */ @@ -2155,6 +2240,7 @@ declare module "inspector" { * Steps over the statement. */ post(method: "Debugger.stepOver", callback?: (err: Error | null) => void): void; + /** * Enables console to refer to the node with given id via $x (see Command Line API for more details * $x functions). @@ -2193,6 +2279,7 @@ declare module "inspector" { post(method: "HeapProfiler.takeHeapSnapshot", params?: HeapProfiler.TakeHeapSnapshotParameterType, callback?: (err: Error | null) => void): void; post(method: "HeapProfiler.takeHeapSnapshot", callback?: (err: Error | null) => void): void; + post(method: "Profiler.disable", callback?: (err: Error | null) => void): void; post(method: "Profiler.enable", callback?: (err: Error | null) => void): void; @@ -2250,6 +2337,7 @@ declare module "inspector" { * @experimental */ post(method: "Profiler.takeTypeProfile", callback?: (err: Error | null, params: Profiler.TakeTypeProfileReturnType) => void): void; + /** * Add handler to promise with given promise object id. */ @@ -2360,11 +2448,47 @@ declare module "inspector" { * @experimental */ post(method: "Runtime.terminateExecution", callback?: (err: Error | null) => void): void; + /** * Returns supported domains. */ post(method: "Schema.getDomains", callback?: (err: Error | null, params: Schema.GetDomainsReturnType) => void): void; + /** + * Gets supported tracing categories. + */ + post(method: "NodeTracing.getCategories", callback?: (err: Error | null, params: NodeTracing.GetCategoriesReturnType) => void): void; + + /** + * Start trace events collection. + */ + post(method: "NodeTracing.start", params?: NodeTracing.StartParameterType, callback?: (err: Error | null) => void): void; + post(method: "NodeTracing.start", callback?: (err: Error | null) => void): void; + + /** + * Stop trace events collection. Remaining collected events will be sent as a sequence of + * dataCollected events followed by tracingComplete event. + */ + post(method: "NodeTracing.stop", callback?: (err: Error | null) => void): void; + + /** + * Sends protocol message over session with given id. + */ + post(method: "NodeWorker.sendMessageToWorker", params?: NodeWorker.SendMessageToWorkerParameterType, callback?: (err: Error | null) => void): void; + post(method: "NodeWorker.sendMessageToWorker", callback?: (err: Error | null) => void): void; + + /** + * Instructs the inspector to attach to running workers. Will also attach to new workers + * as they start + */ + post(method: "NodeWorker.enable", params?: NodeWorker.EnableParameterType, callback?: (err: Error | null) => void): void; + post(method: "NodeWorker.enable", callback?: (err: Error | null) => void): void; + + /** + * Detaches from all running workers and disables attaching to new workers as they are started. + */ + post(method: "NodeWorker.disable", callback?: (err: Error | null) => void): void; + // Events addListener(event: string, listener: (...args: any[]) => void): this; @@ -2464,6 +2588,33 @@ declare module "inspector" { */ addListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + /** + * Contains an bucket of collected trace events. + */ + addListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + addListener(event: "NodeTracing.tracingComplete", listener: () => void): this; + + /** + * Issued when attached to a worker. + */ + addListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when detached from the worker. + */ + addListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + addListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + emit(event: string | symbol, ...args: any[]): boolean; emit(event: "inspectorNotification", message: InspectorNotification<{}>): boolean; emit(event: "Console.messageAdded", message: InspectorNotification): boolean; @@ -2486,6 +2637,11 @@ declare module "inspector" { emit(event: "Runtime.executionContextDestroyed", message: InspectorNotification): boolean; emit(event: "Runtime.executionContextsCleared"): boolean; emit(event: "Runtime.inspectRequested", message: InspectorNotification): boolean; + emit(event: "NodeTracing.dataCollected", message: InspectorNotification): boolean; + emit(event: "NodeTracing.tracingComplete"): boolean; + emit(event: "NodeWorker.attachedToWorker", message: InspectorNotification): boolean; + emit(event: "NodeWorker.detachedFromWorker", message: InspectorNotification): boolean; + emit(event: "NodeWorker.receivedMessageFromWorker", message: InspectorNotification): boolean; on(event: string, listener: (...args: any[]) => void): this; @@ -2584,6 +2740,33 @@ declare module "inspector" { */ on(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + /** + * Contains an bucket of collected trace events. + */ + on(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + on(event: "NodeTracing.tracingComplete", listener: () => void): this; + + /** + * Issued when attached to a worker. + */ + on(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when detached from the worker. + */ + on(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + on(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + once(event: string, listener: (...args: any[]) => void): this; /** @@ -2681,6 +2864,33 @@ declare module "inspector" { */ once(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + /** + * Contains an bucket of collected trace events. + */ + once(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + once(event: "NodeTracing.tracingComplete", listener: () => void): this; + + /** + * Issued when attached to a worker. + */ + once(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when detached from the worker. + */ + once(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + once(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; /** @@ -2778,6 +2988,33 @@ declare module "inspector" { */ prependListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + /** + * Contains an bucket of collected trace events. + */ + prependListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + prependListener(event: "NodeTracing.tracingComplete", listener: () => void): this; + + /** + * Issued when attached to a worker. + */ + prependListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when detached from the worker. + */ + prependListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + prependListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; /** @@ -2874,6 +3111,33 @@ declare module "inspector" { * call). */ prependOnceListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + + /** + * Contains an bucket of collected trace events. + */ + prependOnceListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + prependOnceListener(event: "NodeTracing.tracingComplete", listener: () => void): this; + + /** + * Issued when attached to a worker. + */ + prependOnceListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when detached from the worker. + */ + prependOnceListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + prependOnceListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; } // Top Level API diff --git a/types/node/node-tests.ts b/types/node/node-tests.ts index c0f80728fc..f1fd836697 100644 --- a/types/node/node-tests.ts +++ b/types/node/node-tests.ts @@ -4673,6 +4673,10 @@ import * as constants from 'constants'; const pauseReason: string = message.params.reason; }); session.on('Debugger.resumed', () => {}); + // Node Inspector events + session.on('NodeTracing.dataCollected', (message: inspector.InspectorNotification) => { + const value: Array<{}> = message.params.value; + }); } } diff --git a/types/node/scripts/generate-inspector/event-emitter.ts b/types/node/scripts/generate-inspector/event-emitter.ts index 658109d6b2..3d3410633f 100644 --- a/types/node/scripts/generate-inspector/event-emitter.ts +++ b/types/node/scripts/generate-inspector/event-emitter.ts @@ -66,10 +66,11 @@ export const createListeners = (events: Event[]): string[] => { "", ...createListenerBlockFn("prependOnceListener")(events), ].reduce((acc, next, index, arr) => { - // removes trailing and consecutive empty lines + // removes leading, trailing and consecutive empty lines + const isFirst = index === 0; const isLast = index === arr.length - 1; const followsEmptyLine = acc.length > 0 && acc[acc.length - 1] === ""; - if ((isLast || followsEmptyLine) && next === "") { + if ((isFirst || isLast || followsEmptyLine) && next === "") { return acc; } else { acc.push(next); diff --git a/types/node/scripts/generate-inspector/generate-substitute-args.ts b/types/node/scripts/generate-inspector/generate-substitute-args.ts index 0054e9a85c..cd12eff1a8 100644 --- a/types/node/scripts/generate-inspector/generate-substitute-args.ts +++ b/types/node/scripts/generate-inspector/generate-substitute-args.ts @@ -4,17 +4,21 @@ import { capitalize, createDocs, flattenArgs, hasElements, isObjectReference } f const INDENT = " "; +// Turns a type into a type representing an array of that type +const arrify = (typeString: string) => { + return typeString === '{}' ? `Array<${typeString}>` : `${typeString}[]`; +} + // Converts DevTools type to TS type const createTypeString = (type: schema.Field, domain?: string): string => { return isObjectReference(type) ? type.$ref : - type.type === "any" ? "any" : + type.type === "any" ? "any" : type.type === "integer" ? "number" : type.type === "number" ? "number" : type.type === "boolean" ? "boolean" : type.type === "string" ? "string" : - type.type === "array" ? `${createTypeString(type.items, domain)}[]` : - type.type === "object" ? "{}" // this code path is likely never exercised - : "never"; + type.type === "array" ? arrify(createTypeString(type.items, domain)) : + type.type === "object" ? "{}" : "never"; // "never" has yet to be observed }; // Helper for createInterface -- constructs a list of interface fields @@ -138,7 +142,7 @@ export const generateSubstituteArgs = (protocol: schema.Schema): { [propName: st .map(item => item.commands .map(command => createPostFunctions(command, item.domain)) .reduce(flattenArgs(""), [])) - .reduce(flattenArgs(), []); + .reduce(flattenArgs(""), []); const eventOverloads: string[] = createListeners(protocol.domains .map(item => { diff --git a/types/node/scripts/generate-inspector/index.ts b/types/node/scripts/generate-inspector/index.ts index eb5da5ef2e..f555105e37 100644 --- a/types/node/scripts/generate-inspector/index.ts +++ b/types/node/scripts/generate-inspector/index.ts @@ -2,25 +2,55 @@ // [tag] corresponds to a tag name in the node-core repository. import { execSync } from "child_process"; -import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs"; +import { existsSync, readFileSync, writeFileSync } from "fs"; import * as https from "https"; import * as schema from "./devtools-protocol-schema"; import { generateSubstituteArgs } from "./generate-substitute-args"; -import { flattenArgs, substitute, trimRight } from "./utils"; +import { substitute, trimRight } from "./utils"; +import { string } from "parsimmon"; + +const httpsGet = (url: string) => new Promise((resolve, reject) => { + https.get(url, res => { + const frames: Buffer[] = []; + res.on("data", (data: Buffer) => { + frames.push(data); + }); + res.on("end", () => { + resolve(Buffer.concat(frames).toString("utf8")); + }); + res.on("error", (err: Error) => { + reject(err); + }); + }); +}); // Input arguments const tag = process.argv[2] || process.version; -const PROTOCOL_URL = `https://raw.githubusercontent.com/nodejs/node/${tag}/deps/v8/src/inspector/js_protocol.json`; - -const devToolsPath = `${__dirname}/../../node_modules/devtools-protocol`; - -function writeProtocolToFile(json: string) { - const protocol: schema.Schema = JSON.parse(json); +const V8_PROTOCOL_URL = `https://raw.githubusercontent.com/nodejs/node/${tag}/deps/v8/src/inspector/js_protocol.json`; +const NODE_PROTOCOL_URL = `https://raw.githubusercontent.com/nodejs/node/${tag}/src/inspector/node_protocol.pdl`; +const INSPECTOR_PROTOCOL_REMOTE = `https://chromium.googlesource.com/deps/inspector_protocol`; +const INSPECTOR_PROTOCOL_LOCAL_DIR = "/tmp/inspector_protocol"; +/** + * Given a list of Inspector protocol definitions, write an inspector.d.ts + * containing all of those definitions merged together. + * @param jsonProtocols A list of Inspector protocol definitions. + */ +function writeProtocolsToFile(jsonProtocols: string[]) { + const combinedProtocol: schema.Schema = { + version: { major: '', minor: '' }, // doesn't matter + domains: [] + }; + for (const json of jsonProtocols) { + if (json) { + const protocol: schema.Schema = JSON.parse(json); + combinedProtocol.domains.push(...protocol.domains); + } + } + const substituteArgs = generateSubstituteArgs(combinedProtocol); const template = readFileSync(`${__dirname}/inspector.d.ts.template`, "utf8"); - - const substituteArgs = generateSubstituteArgs(protocol); + const inspectorDts = substitute(template, substituteArgs).split("\n") .map(line => trimRight(line)) .join("\n"); @@ -28,12 +58,24 @@ function writeProtocolToFile(json: string) { writeFileSync("./inspector.d.ts", inspectorDts, "utf8"); } -https.get(PROTOCOL_URL, res => { - const frames: Buffer[] = []; - res.on("data", (data: Buffer) => { - frames.push(data); - }); - res.on("end", () => { - writeProtocolToFile(Buffer.concat(frames).toString("utf8")); - }); -}); +/** + * Given a PDL-formatted string, return a JSON-formatted string. + * Note that this function run blocking shell commands, as it depends on an + * external script to do the conversion. + * @param pdl A PDL-formatted string. + */ +function convertPdlToJson(pdl: string): string { + if (!existsSync(INSPECTOR_PROTOCOL_LOCAL_DIR)) { + execSync(`git clone ${INSPECTOR_PROTOCOL_REMOTE} ${INSPECTOR_PROTOCOL_LOCAL_DIR}`); + } + writeFileSync("/tmp/inspector_protocol.pdl", pdl); + execSync(`${INSPECTOR_PROTOCOL_LOCAL_DIR}/convert_protocol_to_json.py /tmp/inspector_protocol.pdl /tmp/inspector_protocol.json`); + return readFileSync("/tmp/inspector_protocol.json", 'utf8'); +} + +// "Main" -- get the V8 built-in inspector protocol definition, as well as the +// Node extensions, and then write this to inspector.d.ts. +Promise.all([ + httpsGet(V8_PROTOCOL_URL), + httpsGet(NODE_PROTOCOL_URL).then(convertPdlToJson).catch(() => '') +]).then(writeProtocolsToFile).catch(console.error); From 57229d3354ac1b10b5b4e1d0799729e82691cfbe Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Thu, 6 Dec 2018 16:15:32 -0500 Subject: [PATCH 445/608] Add fill-extrusion-vertical-gradient --- types/mapbox-gl/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/mapbox-gl/index.d.ts b/types/mapbox-gl/index.d.ts index f3389876b9..384cea55b6 100644 --- a/types/mapbox-gl/index.d.ts +++ b/types/mapbox-gl/index.d.ts @@ -1319,6 +1319,7 @@ declare namespace mapboxgl { 'fill-extrusion-height-transition'?: Transition; 'fill-extrusion-base'?: number | StyleFunction | Expression; 'fill-extrusion-base-transition'?: Transition; + 'fill-extrusion-vertical-gradient'?: boolean; } export interface LineLayout { From 83f02a128bbc3fb2752af6861233fdfc93fb10fb Mon Sep 17 00:00:00 2001 From: Gordon Date: Thu, 6 Dec 2018 16:07:45 -0600 Subject: [PATCH 446/608] Improve react-instantsearch Refinements --- types/react-instantsearch-core/index.d.ts | 22 +++++--- .../react-instantsearch-core-tests.tsx | 53 ++++++++++++++++++- .../react-instantsearch-tests.tsx | 2 +- 3 files changed, 67 insertions(+), 10 deletions(-) diff --git a/types/react-instantsearch-core/index.d.ts b/types/react-instantsearch-core/index.d.ts index af86139fde..bceb91ca85 100644 --- a/types/react-instantsearch-core/index.d.ts +++ b/types/react-instantsearch-core/index.d.ts @@ -129,17 +129,20 @@ export function connectAutoComplete(Composed: React.ComponentType): React.C export function connectBreadcrumb(Composed: React.ComponentType): React.ComponentClass; export function connectConfigure(Composed: React.ComponentType): React.ComponentClass; -export interface Refinement { +export type Refinement = { label: string; attribute: string; - currentRefinement: string | object; - items?: Array<{ label: string, value: RefinementValue }>; index: string; id: string; value: RefinementValue; -} +} & ({ + currentRefinement: string; +} | { + items: Array<{ label: string, value: RefinementValue }>; + currentRefinement: string[]; +}); -type RefinementValue = (searchState: SearchState) => SearchState; +export type RefinementValue = (searchState: SearchState) => SearchState; export interface CurrentRefinementsExposed { /** @@ -305,13 +308,16 @@ export function connectRange(Composed: React.ComponentType): React.Componen export interface RefinementListProvided { /** a function to toggle a refinement */ - refine: (...args: any[]) => any; + refine: (value: string[]) => any; /** a function to generate a URL for the corresponding search state */ createURL: (...args: any[]) => any; /** the refinement currently applied */ currentRefinement: string[]; - /** the list of items the RefinementList can display. */ - items: Array>; + /** + * The list of items the RefinementList can display. + * If isFromSearch is false, the hit properties like _highlightResult are undefined + */ + items: Array>; /** a function to toggle a search inside items values */ searchForItems: (...args: any[]) => any; /** a boolean that says if the items props contains facet values from the global search or from the search inside items. */ diff --git a/types/react-instantsearch-core/react-instantsearch-core-tests.tsx b/types/react-instantsearch-core/react-instantsearch-core-tests.tsx index 1ced5dee69..e39a9f53e6 100644 --- a/types/react-instantsearch-core/react-instantsearch-core-tests.tsx +++ b/types/react-instantsearch-core/react-instantsearch-core-tests.tsx @@ -9,7 +9,9 @@ import { connectSearchBox, connectRefinementList, CurrentRefinementsProvided, - connectCurrentRefinements + connectCurrentRefinements, + RefinementListProvided, + Refinement } from 'react-instantsearch-core'; () => { @@ -168,3 +170,52 @@ import { item} />; }; + +() => { + function renderRefinement( + label: string, + value: Refinement['value'], + refine: CurrentRefinementsProvided['refine'], + ) { + return ; + } + + const MyCurrentRefinements = connectCurrentRefinements(({refine, items, query}: CurrentRefinementsProvided) => { + return <> + {items.map((refinement) => { + let str: string = refinement.currentRefinement; // $ExpectError + /* + * When existing several refinements for the same atribute name, then you get a + * nested items object that contains a label and a value function to use to remove a single filter. + * https://community.algolia.com/react-instantsearch/connectors/connectCurrentRefinements.html + */ + if ('items' in refinement) { + str = refinement.currentRefinement; // $ExpectError + return <> + {refinement.items.map((i) => renderRefinement(i.label, i.value, refine))} + ; + } + + console.log(refinement.items); // $ExpectError + return renderRefinement(refinement.currentRefinement, refinement.value, refine); + })} + ; + }); +}; + +() => { + const MyRefinementList = ({items, refine}: RefinementListProvided) => + <> + {items.map((item) => ( + + ))} + ; + const ConnectedRefinementList = connectRefinementList(MyRefinementList); + + ; +}; diff --git a/types/react-instantsearch/react-instantsearch-tests.tsx b/types/react-instantsearch/react-instantsearch-tests.tsx index 82672b7a60..9abf91c0ef 100644 --- a/types/react-instantsearch/react-instantsearch-tests.tsx +++ b/types/react-instantsearch/react-instantsearch-tests.tsx @@ -348,7 +348,7 @@ import { createInstantSearch } from "react-instantsearch-core"; : item.label; return ( -
  • +
  • props.refine(item.value)}> {label} {item.isRefined ? '- selected' : ''} From 8cfbfbf4be20e8dfe1288d1cf5d7879815882e4e Mon Sep 17 00:00:00 2001 From: Alex Deas Date: Thu, 6 Dec 2018 22:10:03 +0000 Subject: [PATCH 447/608] Support infinitary functions in cond type type def --- types/ramda/index.d.ts | 3 ++- types/ramda/ramda-tests.ts | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/types/ramda/index.d.ts b/types/ramda/index.d.ts index 77dcdb05a0..48888c6ee5 100644 --- a/types/ramda/index.d.ts +++ b/types/ramda/index.d.ts @@ -776,7 +776,8 @@ declare namespace R { * point fn returns the result of applying its arguments to the corresponding transformer. If none of the predicates * matches, fn returns undefined. */ - cond(fns: ReadonlyArray<[SafePred, (a: A) => B]>): (a: A) => B; + cond(fns: ReadonlyArray<[Pred, (...a: any[]) => any]>): (...a: any[]) => any; + cond(fns: ReadonlyArray<[SafePred, (...a: A[]) => B]>): (...a: A[]) => B; /** * Wraps a constructor function inside a curried function that can be called with the same arguments and returns the same type. diff --git a/types/ramda/ramda-tests.ts b/types/ramda/ramda-tests.ts index 61f09c1f40..2bd9a55d2f 100644 --- a/types/ramda/ramda-tests.ts +++ b/types/ramda/ramda-tests.ts @@ -1312,13 +1312,15 @@ type Pair = KeyValuePair; ]); f(0); // $ExpectType string f(""); // $ExpectError + f(1, 2); // $ExpectType string const g = R.cond([ - [x => x === 0, () => "a"], + [(a, b) => a === b, () => "a"], [() => true, () => "b"], ]); g(0); g(""); + g(1, ""); }; () => { From 7a8e5bafe41890916d50d37ea3c34c6890449569 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Thu, 6 Dec 2018 23:22:53 +0100 Subject: [PATCH 448/608] Add types for command-exists --- types/command-exists/command-exists-tests.ts | 14 ++++++++++++ types/command-exists/index.d.ts | 16 ++++++++++++++ types/command-exists/tsconfig.json | 23 ++++++++++++++++++++ types/command-exists/tslint.json | 1 + 4 files changed, 54 insertions(+) create mode 100644 types/command-exists/command-exists-tests.ts create mode 100644 types/command-exists/index.d.ts create mode 100644 types/command-exists/tsconfig.json create mode 100644 types/command-exists/tslint.json diff --git a/types/command-exists/command-exists-tests.ts b/types/command-exists/command-exists-tests.ts new file mode 100644 index 0000000000..60efc1e0e5 --- /dev/null +++ b/types/command-exists/command-exists-tests.ts @@ -0,0 +1,14 @@ +import commandExists = require('command-exists'); + +commandExists('ls', (err, commandExists) => { + // $ExpectType boolean + commandExists; +}); + +commandExists('ls').then(command => { + // $ExpectType string + command; +}); + +// $ExpectType boolean +commandExists.sync('ls'); diff --git a/types/command-exists/index.d.ts b/types/command-exists/index.d.ts new file mode 100644 index 0000000000..634d2a035e --- /dev/null +++ b/types/command-exists/index.d.ts @@ -0,0 +1,16 @@ +// Type definitions for command-exists 1.2 +// Project: https://github.com/mathisonian/command-exists +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = commandExists; + +declare function commandExists(commandName: string): Promise; +declare function commandExists( + commandName: string, + cb: (error: null, exists: boolean) => void +): void; + +declare namespace commandExists { + function sync(commandName: string): boolean; +} diff --git a/types/command-exists/tsconfig.json b/types/command-exists/tsconfig.json new file mode 100644 index 0000000000..9782cd2715 --- /dev/null +++ b/types/command-exists/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "command-exists-tests.ts" + ] +} diff --git a/types/command-exists/tslint.json b/types/command-exists/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/command-exists/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 3027a7b01e9fbf82b7c0fc7cdeaf05a6ff4da7d4 Mon Sep 17 00:00:00 2001 From: Roman Rogowski Date: Thu, 6 Dec 2018 17:48:12 -0500 Subject: [PATCH 449/608] added @types/cryptr --- types/cryptr/cryptr-tests.ts | 10 ++++++++++ types/cryptr/index.d.ts | 20 ++++++++++++++++++++ types/cryptr/tsconfig.json | 23 +++++++++++++++++++++++ types/cryptr/tslint.json | 1 + 4 files changed, 54 insertions(+) create mode 100644 types/cryptr/cryptr-tests.ts create mode 100644 types/cryptr/index.d.ts create mode 100644 types/cryptr/tsconfig.json create mode 100644 types/cryptr/tslint.json diff --git a/types/cryptr/cryptr-tests.ts b/types/cryptr/cryptr-tests.ts new file mode 100644 index 0000000000..3c655d7288 --- /dev/null +++ b/types/cryptr/cryptr-tests.ts @@ -0,0 +1,10 @@ +import Cryptr = require('cryptr'); + +// $ExpectType Cryptr +const cryptr = new Cryptr('myTotallySecretKey'); + +// $ExpectType string +const encrypted_string = cryptr.encrypt('bacon'); + +// $ExpectType string +cryptr.decrypt(encrypted_string); diff --git a/types/cryptr/index.d.ts b/types/cryptr/index.d.ts new file mode 100644 index 0000000000..4aec15c419 --- /dev/null +++ b/types/cryptr/index.d.ts @@ -0,0 +1,20 @@ +// Type definitions for cryptr 4.0 +// Project: https://github.com/MauriceButler/cryptr +// Definitions by: Roman Rogowski +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare class Cryptr { + /** + * Cryptr provides a mechanism for aes-256-ctr encryption/decryption. + * @param secret key used for encryption/decryption + */ + constructor(secret: string); + + /** Encrypt a string. */ + encrypt(value: string): string; + + /** Decrypt a string. */ + decrypt(value: string): string; +} + +export = Cryptr; diff --git a/types/cryptr/tsconfig.json b/types/cryptr/tsconfig.json new file mode 100644 index 0000000000..2727c48e08 --- /dev/null +++ b/types/cryptr/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "cryptr-tests.ts" + ] +} diff --git a/types/cryptr/tslint.json b/types/cryptr/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/cryptr/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 894be3cb10fbcb232d788f57efd2bb0c6f994e8a Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Thu, 6 Dec 2018 15:26:02 -0800 Subject: [PATCH 450/608] Update types-publisher dependency --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 09fe064d48..caf101cbc6 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,6 @@ }, "devDependencies": { "dtslint": "github:Microsoft/dtslint#production", - "types-publisher": "Microsoft/types-publisher#production" + "types-publisher": "github:Microsoft/types-publisher#production" } } From a92893734238656a2defff936d017a33e39a9b11 Mon Sep 17 00:00:00 2001 From: Kylie Stewart Date: Thu, 6 Dec 2018 17:29:35 -0700 Subject: [PATCH 451/608] Update Spectacle types to reflect latest API, remove the 'any's --- types/spectacle/index.d.ts | 377 +++++++++++++++------- types/spectacle/package.json | 6 + types/spectacle/spectacle-tests.tsx | 484 +++++++++++++++++++++------- 3 files changed, 637 insertions(+), 230 deletions(-) create mode 100644 types/spectacle/package.json diff --git a/types/spectacle/index.d.ts b/types/spectacle/index.d.ts index e00b5dd3c0..285ed6cbe4 100644 --- a/types/spectacle/index.d.ts +++ b/types/spectacle/index.d.ts @@ -1,164 +1,321 @@ // Type definitions for Spectacle 1.2.0 -// Project: https://github.com/FormidableLabs/victory +// Project: https://github.com/FormidableLabs/spectacle // Definitions by: Zachary Maybury +// Kylie Stewart // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 /// declare module "spectacle" { - import * as React from "react"; + import * as React from "react"; + import * as CSS from "csstype"; + /** + * Alignment Types for Spectacle + */ + type alignType = + | "flex-start flex-start" + | "flex-start center" + | "flex-start flex-end" + | "center flex-start" + | "center center" + | "center flex-end" + | "flex-end flex-start" + | "flex-end center" + | "flex-end flex-end"; - /** - * Transition Types for Spectacle - */ - type transitionType = "slide"|"zoom"|"fade"|"spin"; + /** + * Animation Types for Spectacle + */ + type easeType = + | "back" + | "backIn" + | "backOut" + | "backInOut" + | "bounce" + | "bounceIn" + | "bounceOut" + | "bounceInOut" + | "circle" + | "circleIn" + | "circleOut" + | "circleInOut" + | "linear" + | "linearIn" + | "linearOut" + | "linearInOut" + | "cubic" + | "cubicIn" + | "cubicOut" + | "cubicInOut" + | "elastic" + | "elasticIn" + | "elasticOut" + | "elasticInOut" + | "exp" + | "expIn" + | "expOut" + | "expInOut" + | "poly" + | "polyIn" + | "polyOut" + | "polyInOut" + | "quad" + | "quadIn" + | "quadOut" + | "quadInOut" + | "sin" + | "sinIn" + | "sinOut" + | "sinInOut"; - /** - * Progress Types for Spectacle - */ - type progressType = "pacman"|"bar"|"number"|"none"; + /** + * Progress Types for Spectacle + */ + type progressType = "pacman" | "bar" | "number" | "none"; - /** - * Alignment Types for Spectacle - */ - type alignType = - "flex-start flex-start"|"flex-start center"|"flex-start flex-end"| - "center flex-start"|"center center"|"center flex-end"| - "flex-end flex-start"|"flex-end center"|"flex-end flex-end"; + /** + * S Types for StyledS in Spectacle + */ + type sType = "italic" | "bold" | "line-through" | "underline"; - /** - * Base props for many Spectacle components - */ - export interface BaseProps { - italic?:boolean, - bold?:boolean, - caps?:boolean, - margin?:number|string, - padding?:number|string, - textColor?:string, - textSize?:string, - textAlign?:string, - textFont?:string, - bgColor?:string, - bgImage?:string, - bgDarken?:number - } + /** + * Target Types for links + */ + type targetType = "_blank" | "_self" | "_parent" | "_top"; - export type Theme = { [key: string ]: string | number } + /** + * Theme Types for CodePane in Spectacle + */ + type themeType = "dark" | "light" | "external"; - export interface SpectacleProps { - theme?: Theme - } + /** + * Transition Types for Spectacle + */ + type transitionType = "slide" | "zoom" | "fade" | "spin"; - export interface DeckProps { - transition?:transitionType[], - transitionDuration?:number, - progress?:progressType, - controls?:boolean, - theme?: Theme - } + /** + * All available DOM style properties and their types + * https://www.npmjs.com/package/csstype + */ + export interface CSSProperties extends CSS.Properties {} - export interface SlideProps extends BaseProps { - align?:alignType, - transition?:transitionType[], - transitionDuration?:number, - notes?:string, - id?:string - } + export interface AnimProps { + easing: easeType; + fromStyle: CSSProperties | CSSProperties[]; + onAnim?: (forwards?: boolean, animIndex?: number) => void; + order?: number; + route?: object; + style?: CSSProperties; + toStyle: CSSProperties | CSSProperties[]; + transitionDuration: number; + } - export interface MarkdownProps { - source?:string, - mdastConfig?:{ [key: string ]: string | number } - } + export interface AppearProps { + easing?: easeType; + endValue?: object; + fid?: string; + order?: number; + startValue?: object; + style?: BaseProps["style"]; + transitionDuration?: number; + } - export interface CodePaneProps extends BaseProps { - lang?:string, - source?:string - } + /** + * Base props for many Spectacle components + */ + export interface BaseProps { + bgColor?: string; + bgDarken?: number; + bgImage?: string; + bold?: boolean; + caps?: boolean; + className?: string; + italic?: boolean; + margin?: number | string; + padding?: number | string; + style?: CSSProperties; + textAlign?: string; + textColor?: string; + textFont?: string; + textSize?: string; + } + export interface CodePaneProps { + className?: BaseProps["className"]; + contentEditable?: boolean; + lang?: string; + source?: string; + style?: BaseProps["style"]; + theme?: themeType; + } - export interface HeadingProps extends BaseProps { - fit?:boolean, - lineHeight?:number - size?:number; - } + export interface ComponentPlaygroundProps { + code?: string; + previewBackgroundColor?: string; + scope?: object; + theme?: themeType; + transformCode?: (code: string) => string; + } - export interface ImageProps extends BaseProps { - display?:string, - height?:number, - src?:string, - width?:number|string - } + export interface DeckProps { + autoplay?: boolean; + autoplayDuration?: number; + autoplayLoop?: boolean; + controls?: boolean; + globalStyles?: boolean; + history?: any; // Needs a type, see https://github.com/ReactTraining/history + progress?: progressType; + theme?: Theme; + transition?: transitionType[]; + transitionDuration?: number; + } - export interface LinkProps extends BaseProps { - href?:string - } + export interface FillProps { + className?: string; + style?: CSSProperties; + } - export interface SProps extends BaseProps { - type?:string - } + export interface FitProps extends FillProps {} - export interface TextProps extends BaseProps { - fit?:boolean, - lineHeight?:number - } + export interface GoToActionProps { + margin?: BaseProps["margin"]; + padding?: BaseProps["padding"]; + render?: (goToSlide?: (slide: number | string) => void) => void; + slide?: number | string; + style?: BaseProps["style"]; + } - export class Spectacle extends React.Component {} + export interface HeadingProps extends BaseProps { + fit?: boolean; + lineHeight?: number; + size?: number; + } - export class Deck extends React.Component {} + export interface ImageProps { + alt?: string; + className?: BaseProps["className"]; + display?: string; + height?: number | string; + margin?: BaseProps["margin"]; + padding?: BaseProps["padding"]; + src?: string; + width?: number | string; + } - export class Slide extends React.Component {} + export interface LayoutProps { + style?: CSSProperties; + } - export class Layout extends React.Component {} + export interface LinkProps extends BaseProps { + href?: string; + target?: targetType; + } - export class Fit extends React.Component {} + export interface MarkdownProps { + mdastConfig?: { [key: string]: number | string }; + source?: string; + } - export class Fill extends React.Component {} + export interface SlideProps extends BaseProps { + align?: alignType; + contentStyles?: CSSProperties; + controlColor?: string; + dispatch?: () => void; + hash?: number | string; + progressColor?: string; + history?: any; // Needs a type, see https://github.com/ReactTraining/history + id?: string; + lastSlideIndex?: number; + notes?: string; + onActive?: (slideIndex: string | number) => void; + slideIndex?: number; + transition?: transitionType[]; + transitionDuration?: number; + transitionIn?: transitionType[]; + transitionOut?: transitionType[]; + } - export class Markdown extends React.Component {} + export interface SProps extends BaseProps { + type?: sType | sType[]; + } - export class Appear extends React.Component {} + export interface TextProps extends BaseProps { + fit?: boolean; + lineHeight?: number; + } - export class BlockQuote extends React.Component {} + export type Theme = { [key: string]: number | string }; - export class Quote extends React.Component {} + export class Anim extends React.Component {} - export class Cite extends React.Component {} + export class Appear extends React.Component {} - export class CodePane extends React.Component {} + export class BlockQuote extends React.Component {} - export class Code extends React.Component {} + export class Cite extends React.Component {} - export class Heading extends React.Component {} + export class Code extends React.Component {} - export class Image extends React.Component {} + export class CodePane extends React.Component {} - export class Link extends React.Component {} + export class ComponentPlayground extends React.Component< + ComponentPlaygroundProps + > {} - export class List extends React.Component {} + export class Deck extends React.Component {} - export class ListItem extends React.Component {} + export class Fill extends React.Component {} - export class S extends React.Component {} + export class Fit extends React.Component {} - export class Table extends React.Component {} + export class GoToAction extends React.Component {} - export class TableRow extends React.Component {} + export class Heading extends React.Component {} - export class TableHeaderItem extends React.Component {} + export class Image extends React.Component {} - export class TableItem extends React.Component {} + export class Layout extends React.Component {} - export class Text extends React.Component {} + export class Link extends React.Component {} + + export class List extends React.Component {} + + export class ListItem extends React.Component {} + + export class Markdown extends React.Component {} + + export class Notes extends React.Component {} + + export class Quote extends React.Component {} + + export class S extends React.Component {} + + export class Slide extends React.Component {} + + export class SlideSet extends React.Component {} + + export class Table extends React.Component {} + + export class TableBody extends React.Component {} + + export class TableHeader extends React.Component {} + + export class TableHeaderItem extends React.Component {} + + export class TableItem extends React.Component {} + + export class TableRow extends React.Component {} + + export class Text extends React.Component {} } declare module "spectacle/lib/utils/preloader" { - const preloader: (obj: object) => void; - export default preloader; + const preloader: (obj: object) => void; + export default preloader; } declare module "spectacle/lib/themes/default" { - import { Theme } from "spectacle"; - const createTheme: (...args: object[]) => Theme; - export default createTheme; + import { Theme } from "spectacle"; + const createTheme: (...args: object[]) => Theme; + export default createTheme; } diff --git a/types/spectacle/package.json b/types/spectacle/package.json new file mode 100644 index 0000000000..9de3dd17fa --- /dev/null +++ b/types/spectacle/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "csstype": "^2.2.0" + } + } diff --git a/types/spectacle/spectacle-tests.tsx b/types/spectacle/spectacle-tests.tsx index f0a0b65e5a..04c3403f41 100644 --- a/types/spectacle/spectacle-tests.tsx +++ b/types/spectacle/spectacle-tests.tsx @@ -1,133 +1,377 @@ -/** - * Spectacle Test Examples - * - */ - -import * as React from 'react'; +import * as React from "react"; import { - Appear, - BlockQuote, - Cite, - Deck, - Fill, - Heading, - Layout, - Link, - ListItem, - List, - Quote, - Slide, - Spectacle, - Text + Anim, + Appear, + BlockQuote, + Cite, + CodePane, + ComponentPlayground, + Deck, + Fill, + GoToAction, + Heading, + Image, + Layout, + Link, + List, + ListItem, + Markdown, + Notes, + Quote, + Slide, + SlideSet, + Table, + TableBody, + TableHeader, + TableHeaderItem, + TableItem, + TableRow, + Text } from "spectacle"; // Import image preloader util -import preloader from 'spectacle/lib/utils/preloader' +import preloader from "spectacle/lib/utils/preloader"; // Import theme -import createTheme from 'spectacle/lib/themes/default' +import createTheme from "spectacle/lib/themes/default"; const images = { - city: 'a-url' -} + city: "a-url", + logo: "another-url" +}; -preloader(images) +preloader(images); -const theme = createTheme({ - primary: 'white', - secondary: '#1F2022', - tertiary: '#03A9FC', - quartenary: '#CECECE' -}, { - primary: 'Montserrat', - secondary: 'Helvetica' -}) +const theme = createTheme( + { + primary: "white", + secondary: "#1F2022", + tertiary: "#03A9FC", + quartenary: "#CECECE" + }, + { + primary: "Montserrat", + secondary: "Helvetica" + } +); export class SpectacleTest extends React.Component { - callback() { - alert('Callback: ' + JSON.stringify(arguments)); - } - - public render() { - return ( - - - - Spectacle - - - A ReactJS Presentation Library - - - Where You Can Write Your Decks In JSX - - - View on Github - - Hit Your Right Arrow To Begin! - - - - Wait what? - - - - - - Full Width - - - - - Adjustable Darkness - - - - - Background Imagery - - - - - Flexible Layouts - - - - Left - - - - - Right - - - - - -
    - Wonderfully formatted quotes - Ken Wheeler -
    -
    - - - Smooth - - - Combinable Transitions - - - - - Inline style based theme system - Autofit text - Flexbox layout system - React-Router navigation - PDF export - And... - - -
    -
    ); - } + public render() { + return ( + + + + Spectacle + + + A ReactJS Presentation Library + + + Where You Can Write Your Decks In JSX + + + + View on Github + + + + Hit Your Right Arrow To Begin! + + + + + Wait what? + + + + + + Full Width + + + + + Adjustable Darkness + + + + + Background Imagery + + + + + + + + + This is a component playground + + + + Flexible Layouts + + + + + Left + + + + + Right + + + + + + + Inline Markdown + + + {` + You can write inline images, [Markdown Links](http://commonmark.org), paragraph text and most other markdown syntax + * Lists too! + * With ~~strikethrough~~ and _italic_ + * And let's not forget **bold** + * Add some \`inline code\` to your sldes! + `} + + + + { + /* eslint-disable */ + console.log("forwards ", forwards); + console.log("animIndex ", animIndex); + /* eslint-enable */ + }} + fromStyle={{ + opacity: 0, + transform: + "translate3d(0px, -100px, 0px) scale(1) rotate(0deg)" + }} + toStyle={[ + { + opacity: 1, + transform: + "translate3d(0px, 0px, 0px) scale(1) rotate(0deg)" + }, + { + opacity: 1, + transform: + "translate3d(0px, 0px, 0px) scale(1.6) rotate(-15deg)" + }, + { + opacity: 1, + transform: + "translate3d(0px, 0px, 0px) scale(0.8) rotate(0deg)" + } + ]} + easing={"bounceOut"} + transitionDuration={500} + > + + + Flexible +
    + animations +
    +
    +
    +
    + + + Mix it up! + + + You can even jump to different slides with a standard + button or custom component! + + + Jump to Slide 8 + + ( + + )} + /> + + +
    + Wonderfully formatted quotes + Ken Wheeler +
    +
    + +
    + Wonderfully formatted quotes + Ken Wheeler +
    +
    + + + + + + Inline style based theme system + + + + Autofit text + + + Flexbox layout system + + + PDF export + + + And... + + + + + + You can even share styles with SlideSet + + + + + + Pizza Toppings + + + + + + + 2011 + 2013 + 2015 + + + + + None + 61.8% + 39.6% + 35.0% + + + Pineapple + 28.3% + 54.5% + 61.5% + + + Pepperoni + + 50.2% + 77.2% + + + Olives + + 24.9% + 55.9% + + +
    +
    +
    + + + Made with love in Seattle by + + + + + +
    + ); + } } From 42a5abdf16075d754a8532601a3ee4539d12536b Mon Sep 17 00:00:00 2001 From: Kylie Stewart Date: Thu, 6 Dec 2018 17:35:02 -0700 Subject: [PATCH 452/608] Bump Spectacle version to latest --- types/spectacle/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/spectacle/index.d.ts b/types/spectacle/index.d.ts index 285ed6cbe4..621f08f67e 100644 --- a/types/spectacle/index.d.ts +++ b/types/spectacle/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Spectacle 1.2.0 +// Type definitions for Spectacle 5.2.2 // Project: https://github.com/FormidableLabs/spectacle // Definitions by: Zachary Maybury // Kylie Stewart From e009d1c3c0747b1147c077e1b1ac6ef4a91f01ea Mon Sep 17 00:00:00 2001 From: Kent Wong Date: Thu, 6 Dec 2018 16:43:14 -0800 Subject: [PATCH 453/608] Typings for cli-box (https://github.com/IonicaBizau/node-cli-box). --- types/cli-box/cli-box-tests.ts | 47 +++++++++++++++++++++++ types/cli-box/index.d.ts | 70 ++++++++++++++++++++++++++++++++++ types/cli-box/tsconfig.json | 23 +++++++++++ types/cli-box/tslint.json | 1 + 4 files changed, 141 insertions(+) create mode 100644 types/cli-box/cli-box-tests.ts create mode 100644 types/cli-box/index.d.ts create mode 100644 types/cli-box/tsconfig.json create mode 100644 types/cli-box/tslint.json diff --git a/types/cli-box/cli-box-tests.ts b/types/cli-box/cli-box-tests.ts new file mode 100644 index 0000000000..a26b436e21 --- /dev/null +++ b/types/cli-box/cli-box-tests.ts @@ -0,0 +1,47 @@ +import Box = require('cli-box'); + +// Create a simple box +const b1: Box = Box("20x10"); +// console.log(b1.toString()); + +// Set custom marks +const b2: Box = new Box({ + w: 10 + , h: 10 + , stringify: false + , marks: { + nw: "╔" + , n: "══" + , ne: "╗" + , e: "║" + , se: "╝" + , s: "══" + , sw: "╚" + , w: "║" + , b: "░░" + } +}); +// console.log(b2.stringify()); + +// Box with text and use the stringify +const b3: Box = Box("20x10", "I will be \u001b[31mdis\u001b[0mplayed inside! \n A\u001b[34mnd I'm in a\u001b[0m new line!"); +// console.log(b3); + +// Box with aligned text to top-right +const b4: Box = Box("30x20", { + text: "Box content" + , stretch: true + , autoEOL: true + , vAlign: "top" + , hAlign: "right" +}); +// console.log(b4); + +// Full screen box +const b5: Box = Box({fullscreen: true, marks: {}}, "Hello World!"); +// console.log(b5.toString()); + +const b5s: string = Box({stringify: true, fullscreen: true, marks: {}}, "Hello World!"); +const b5ns: Box = Box({stringify: false, fullscreen: true, marks: {}}, "Hello World!"); + +const defaults = Box.defaults; diff --git a/types/cli-box/index.d.ts b/types/cli-box/index.d.ts new file mode 100644 index 0000000000..c2466853a6 --- /dev/null +++ b/types/cli-box/index.d.ts @@ -0,0 +1,70 @@ +// Type definitions for cli-box 6.0 +// Project: https://github.com/IonicaBizau/node-cli-box +// Definitions by: Kent Wong +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +/*~ Note that ES6 modules cannot directly export callable functions. + *~ This file should be imported using the CommonJS-style: + *~ import x = require('someLibrary'); + *~ + *~ Refer to the documentation to understand common + *~ workarounds for this limitation of ES6 modules. + */ + +/*~ This declaration specifies that the function + *~ is the exported object from the file + */ +export = Box; + +type MarksKeys = 'nw' | 'n' | 'ne' | 'e' | 'se' | 's' | 'sw' | 'w' | 'b'; +type Marks = Record; + +interface Options { + w?: number; + width?: number; + h?: number; + height?: number; + fullscreen?: boolean; + stringify?: boolean; + marks?: Partial; +} + +interface Text { + text?: string; + stretch?: boolean; + autoEOL?: boolean; + hAlign?: 'left' | 'middle' | 'right'; + vAlign?: 'top' | 'center' | 'bottom'; +} + +interface Box { + stringify(): string; + settings: { + width: number; + height: number; + marks: Marks; + lines: Array<{ + text: string; + offset: { + y: number; + } + }> + }; + options: { + width: number; + height: number; + marks: Marks; + fullscreen: boolean; + stringify: boolean; + }; +} + +interface BoxConstructor { + new(options: Options | string, text?: Text | string): Box; + (options: (Exclude & { stringify: true }), text?: Text | string): string; + (options: Options | string, text?: Text | string): Box; + defaults: { marks: Marks }; +} + +declare const Box: BoxConstructor; diff --git a/types/cli-box/tsconfig.json b/types/cli-box/tsconfig.json new file mode 100644 index 0000000000..d9a3d38876 --- /dev/null +++ b/types/cli-box/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "cli-box-tests.ts" + ] +} diff --git a/types/cli-box/tslint.json b/types/cli-box/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/cli-box/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 2b5740f7d28b9acf379c75e79ae857dae1534e5d Mon Sep 17 00:00:00 2001 From: Matthew Lilley Date: Fri, 7 Dec 2018 02:05:09 +0000 Subject: [PATCH 454/608] Make serializeState and deserializeState options, optional. --- types/next-redux-wrapper/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/next-redux-wrapper/index.d.ts b/types/next-redux-wrapper/index.d.ts index 835a9762ca..84d71b46c1 100644 --- a/types/next-redux-wrapper/index.d.ts +++ b/types/next-redux-wrapper/index.d.ts @@ -19,8 +19,8 @@ declare namespace nextReduxWrapper { interface Options { storeKey?: string; debug?: boolean; - serializeState: any; - deserializeState: any; + serializeState?: any; + deserializeState?: any; } interface StoreCreatorOptions extends Options { From e8127e09dfdaeaf1f7995f9a5ada2bfdfac936a7 Mon Sep 17 00:00:00 2001 From: Leko Date: Fri, 7 Dec 2018 11:35:23 +0900 Subject: [PATCH 455/608] Move types into a namespace --- types/ghauth/ghauth-tests.ts | 4 ++- types/ghauth/index.d.ts | 68 +++++++++++++++++++----------------- 2 files changed, 39 insertions(+), 33 deletions(-) diff --git a/types/ghauth/ghauth-tests.ts b/types/ghauth/ghauth-tests.ts index 7757cf24dd..56bc0cd1b0 100644 --- a/types/ghauth/ghauth-tests.ts +++ b/types/ghauth/ghauth-tests.ts @@ -1,4 +1,6 @@ -import ghauth, { AuthOptions, TokenData } from "ghauth"; +/// +import ghauth = require("ghauth"); +import { AuthOptions, TokenData } from "ghauth"; // Full const authOptions1: AuthOptions = { diff --git a/types/ghauth/index.d.ts b/types/ghauth/index.d.ts index e21afdf3fa..3d91ab8ef5 100644 --- a/types/ghauth/index.d.ts +++ b/types/ghauth/index.d.ts @@ -3,43 +3,47 @@ // Definitions by: Leko // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -export interface AuthOptions { - configName: string; +declare function ghauth(authOptions: ghauth.AuthOptions, callback: (err: Error, tokenData: ghauth.TokenData) => void): void; - /** - * @default false - */ - noSave?: boolean; +declare namespace ghauth { + interface AuthOptions { + configName: string; - /** - * @default "https://api.github.com/authorizations" - */ - authUrl?: string; + /** + * @default false + */ + noSave?: boolean; - /** - * @default "GitHub" - */ - promptName?: string; + /** + * @default "https://api.github.com/authorizations" + */ + authUrl?: string; - /** - * @default [] - */ - scopes?: ReadonlyArray; + /** + * @default "GitHub" + */ + promptName?: string; - /** - * @default "Node.js command-line app with ghauth" - */ - note?: string; + /** + * @default [] + */ + scopes?: ReadonlyArray; - /** - * @default "Magic Node.js application that does magic things with ghauth" - */ - userAgent?: string; + /** + * @default "Node.js command-line app with ghauth" + */ + note?: string; + + /** + * @default "Magic Node.js application that does magic things with ghauth" + */ + userAgent?: string; + } + + interface TokenData { + user: string; + token: string; + } } -export interface TokenData { - user: string; - token: string; -} - -export default function ghauth(authOptions: AuthOptions, callback: (err: Error, tokenData: TokenData) => void): void; +export = ghauth; From 0920b0ca86aa58a6513d69ee80e89634a2034369 Mon Sep 17 00:00:00 2001 From: Wu Haotian Date: Fri, 7 Dec 2018 15:53:43 +0800 Subject: [PATCH 456/608] use Parameters --- types/debounce-promise/index.d.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/types/debounce-promise/index.d.ts b/types/debounce-promise/index.d.ts index 2356d30060..905ca7fc50 100644 --- a/types/debounce-promise/index.d.ts +++ b/types/debounce-promise/index.d.ts @@ -11,14 +11,12 @@ declare namespace debounce { } } -type ArgumentsType = T extends (...args: infer A) => any ? A : never; - declare function debounce any>( func: T, wait?: number, options?: debounce.DebounceOptions ): ( - ...args: ArgumentsType + ...args: Parameters ) => ReturnType extends Promise ? ReturnType : Promise>; From 6ef208779f54941e7bce5900ba37e6f8ca3d15ef Mon Sep 17 00:00:00 2001 From: Meno Abels Date: Fri, 7 Dec 2018 09:35:08 +0100 Subject: [PATCH 457/608] add typings for resolve-pkg --- types/resolve-pkg/index.d.ts | 14 ++++++++++++++ types/resolve-pkg/resolve-pkg-tests.ts | 5 +++++ types/resolve-pkg/tsconfig.json | 23 +++++++++++++++++++++++ types/resolve-pkg/tslint.json | 1 + 4 files changed, 43 insertions(+) create mode 100644 types/resolve-pkg/index.d.ts create mode 100644 types/resolve-pkg/resolve-pkg-tests.ts create mode 100644 types/resolve-pkg/tsconfig.json create mode 100644 types/resolve-pkg/tslint.json diff --git a/types/resolve-pkg/index.d.ts b/types/resolve-pkg/index.d.ts new file mode 100644 index 0000000000..06a706acbe --- /dev/null +++ b/types/resolve-pkg/index.d.ts @@ -0,0 +1,14 @@ +// Type definitions for resolve-pkg 1.0 +// Project: https://github.com/sindresorhus/resolve-pkg +// Definitions by: Meno Abels +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.9 + +interface ResolvePkgOptions { + cwd?: boolean; +} + +type ResolveFunction = (moduleId: string, options?: ResolvePkgOptions) => string; +declare const resolveFunction: ResolveFunction; + +export = resolveFunction; diff --git a/types/resolve-pkg/resolve-pkg-tests.ts b/types/resolve-pkg/resolve-pkg-tests.ts new file mode 100644 index 0000000000..8794b0cc03 --- /dev/null +++ b/types/resolve-pkg/resolve-pkg-tests.ts @@ -0,0 +1,5 @@ +import * as rpkg from 'resolve-pkg'; + +const test1 = rpkg('hello'); +const test2 = rpkg('hello', {}); +const test3 = rpkg('hello', { cwd: true }); diff --git a/types/resolve-pkg/tsconfig.json b/types/resolve-pkg/tsconfig.json new file mode 100644 index 0000000000..04c11fa02f --- /dev/null +++ b/types/resolve-pkg/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "resolve-pkg-tests.ts" + ] +} diff --git a/types/resolve-pkg/tslint.json b/types/resolve-pkg/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/resolve-pkg/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From e8cf8f320760d232858101a0be4b2b6f7f1865dc Mon Sep 17 00:00:00 2001 From: Vincent Date: Fri, 7 Dec 2018 12:12:31 +0100 Subject: [PATCH 458/608] react-syntax-highlighter styles moved to dist/ See https://github.com/conorhastings/react-syntax-highlighter/blob/master/CHANGELOG.MD#1000 --- types/react-syntax-highlighter/index.d.ts | 412 +++++++++--------- .../react-syntax-highlighter-tests.tsx | 4 +- 2 files changed, 208 insertions(+), 208 deletions(-) diff --git a/types/react-syntax-highlighter/index.d.ts b/types/react-syntax-highlighter/index.d.ts index c631dea9f7..825608fe92 100644 --- a/types/react-syntax-highlighter/index.d.ts +++ b/types/react-syntax-highlighter/index.d.ts @@ -42,626 +42,626 @@ declare module 'react-syntax-highlighter/prism-light' { export default class SyntaxHighlighter extends React.Component {} } -declare module 'react-syntax-highlighter/styles/hljs' { - export { default as agate } from 'react-syntax-highlighter/styles/hljs/agate'; - export { default as androidstudio } from 'react-syntax-highlighter/styles/hljs/androidstudio'; - export { default as arduinoLight } from 'react-syntax-highlighter/styles/hljs/arduino-light'; - export { default as arta } from 'react-syntax-highlighter/styles/hljs/arta'; - export { default as ascetic } from 'react-syntax-highlighter/styles/hljs/ascetic'; - export { default as atelierCaveDark } from 'react-syntax-highlighter/styles/hljs/atelier-cave-dark'; - export { default as atelierCaveLight } from 'react-syntax-highlighter/styles/hljs/atelier-cave-light'; - export { default as atelierDuneDark } from 'react-syntax-highlighter/styles/hljs/atelier-dune-dark'; - export { default as atelierDuneLight } from 'react-syntax-highlighter/styles/hljs/atelier-dune-light'; - export { default as atelierEstuaryDark } from 'react-syntax-highlighter/styles/hljs/atelier-estuary-dark'; - export { default as atelierEstuaryLight } from 'react-syntax-highlighter/styles/hljs/atelier-estuary-light'; - export { default as atelierForestDark } from 'react-syntax-highlighter/styles/hljs/atelier-forest-dark'; - export { default as atelierForestLight } from 'react-syntax-highlighter/styles/hljs/atelier-forest-light'; - export { default as atelierHeathDark } from 'react-syntax-highlighter/styles/hljs/atelier-heath-dark'; - export { default as atelierHeathLight } from 'react-syntax-highlighter/styles/hljs/atelier-heath-light'; - export { default as atelierLakesideDark } from 'react-syntax-highlighter/styles/hljs/atelier-lakeside-dark'; - export { default as atelierLakesideLight } from 'react-syntax-highlighter/styles/hljs/atelier-lakeside-light'; - export { default as atelierPlateauDark } from 'react-syntax-highlighter/styles/hljs/atelier-plateau-dark'; - export { default as atelierPlateauLight } from 'react-syntax-highlighter/styles/hljs/atelier-plateau-light'; - export { default as atelierSavannaDark } from 'react-syntax-highlighter/styles/hljs/atelier-savanna-dark'; - export { default as atelierSavannaLight } from 'react-syntax-highlighter/styles/hljs/atelier-savanna-light'; - export { default as atelierSeasideDark } from 'react-syntax-highlighter/styles/hljs/atelier-seaside-dark'; - export { default as atelierSeasideLight } from 'react-syntax-highlighter/styles/hljs/atelier-seaside-light'; - export { default as atelierSulphurpoolDark } from 'react-syntax-highlighter/styles/hljs/atelier-sulphurpool-dark'; - export { default as atelierSulphurpoolLight } from 'react-syntax-highlighter/styles/hljs/atelier-sulphurpool-light'; - export { default as atomOneDark } from 'react-syntax-highlighter/styles/hljs/atom-one-dark'; - export { default as atomOneLight } from 'react-syntax-highlighter/styles/hljs/atom-one-light'; - export { default as brownPaper } from 'react-syntax-highlighter/styles/hljs/brown-paper'; - export { default as codepenEmbed } from 'react-syntax-highlighter/styles/hljs/codepen-embed'; - export { default as colorBrewer } from 'react-syntax-highlighter/styles/hljs/color-brewer'; - export { default as darcula } from 'react-syntax-highlighter/styles/hljs/darcula'; - export { default as dark } from 'react-syntax-highlighter/styles/hljs/dark'; - export { default as darkula } from 'react-syntax-highlighter/styles/hljs/darkula'; - export { default as defaultStyle } from 'react-syntax-highlighter/styles/hljs/default-style'; - export { default as docco } from 'react-syntax-highlighter/styles/hljs/docco'; - export { default as dracula } from 'react-syntax-highlighter/styles/hljs/dracula'; - export { default as far } from 'react-syntax-highlighter/styles/hljs/far'; - export { default as foundation } from 'react-syntax-highlighter/styles/hljs/foundation'; - export { default as githubGist } from 'react-syntax-highlighter/styles/hljs/github-gist'; - export { default as github } from 'react-syntax-highlighter/styles/hljs/github'; - export { default as googlecode } from 'react-syntax-highlighter/styles/hljs/googlecode'; - export { default as grayscale } from 'react-syntax-highlighter/styles/hljs/grayscale'; - export { default as gruvboxDark } from 'react-syntax-highlighter/styles/hljs/gruvbox-dark'; - export { default as gruvboxLight } from 'react-syntax-highlighter/styles/hljs/gruvbox-light'; - export { default as hopscotch } from 'react-syntax-highlighter/styles/hljs/hopscotch'; - export { default as hybrid } from 'react-syntax-highlighter/styles/hljs/hybrid'; - export { default as idea } from 'react-syntax-highlighter/styles/hljs/idea'; - export { default as irBlack } from 'react-syntax-highlighter/styles/hljs/ir-black'; - export { default as kimbieDark } from 'react-syntax-highlighter/styles/hljs/kimbie.dark'; - export { default as kimbieLight } from 'react-syntax-highlighter/styles/hljs/kimbie.light'; - export { default as magula } from 'react-syntax-highlighter/styles/hljs/magula'; - export { default as monoBlue } from 'react-syntax-highlighter/styles/hljs/mono-blue'; - export { default as monokaiSublime } from 'react-syntax-highlighter/styles/hljs/monokai-sublime'; - export { default as monokai } from 'react-syntax-highlighter/styles/hljs/monokai'; - export { default as obsidian } from 'react-syntax-highlighter/styles/hljs/obsidian'; - export { default as ocean } from 'react-syntax-highlighter/styles/hljs/ocean'; - export { default as paraisoDark } from 'react-syntax-highlighter/styles/hljs/paraiso-dark'; - export { default as paraisoLight } from 'react-syntax-highlighter/styles/hljs/paraiso-light'; - export { default as pojoaque } from 'react-syntax-highlighter/styles/hljs/pojoaque'; - export { default as purebasic } from 'react-syntax-highlighter/styles/hljs/purebasic'; - export { default as qtcreatorDark } from 'react-syntax-highlighter/styles/hljs/qtcreator_dark'; - export { default as qtcreatorLight } from 'react-syntax-highlighter/styles/hljs/qtcreator_light'; - export { default as railscasts } from 'react-syntax-highlighter/styles/hljs/railscasts'; - export { default as rainbow } from 'react-syntax-highlighter/styles/hljs/rainbow'; - export { default as routeros } from 'react-syntax-highlighter/styles/hljs/routeros'; - export { default as schoolBook } from 'react-syntax-highlighter/styles/hljs/school-book'; - export { default as solarizedDark } from 'react-syntax-highlighter/styles/hljs/solarized-dark'; - export { default as solarizedLight } from 'react-syntax-highlighter/styles/hljs/solarized-light'; - export { default as sunburst } from 'react-syntax-highlighter/styles/hljs/sunburst'; - export { default as tomorrowNightBlue } from 'react-syntax-highlighter/styles/hljs/tomorrow-night-blue'; - export { default as tomorrowNightBright } from 'react-syntax-highlighter/styles/hljs/tomorrow-night-bright'; - export { default as tomorrowNightEighties } from 'react-syntax-highlighter/styles/hljs/tomorrow-night-eighties'; - export { default as tomorrowNight } from 'react-syntax-highlighter/styles/hljs/tomorrow-night'; - export { default as tomorrow } from 'react-syntax-highlighter/styles/hljs/tomorrow'; - export { default as vs } from 'react-syntax-highlighter/styles/hljs/vs'; - export { default as vs2015 } from 'react-syntax-highlighter/styles/hljs/vs2015'; - export { default as xcode } from 'react-syntax-highlighter/styles/hljs/xcode'; - export { default as xt256 } from 'react-syntax-highlighter/styles/hljs/xt256'; - export { default as zenburn } from 'react-syntax-highlighter/styles/hljs/zenburn'; +declare module 'react-syntax-highlighter/dist/styles/hljs' { + export { default as agate } from 'react-syntax-highlighter/dist/styles/hljs/agate'; + export { default as androidstudio } from 'react-syntax-highlighter/dist/styles/hljs/androidstudio'; + export { default as arduinoLight } from 'react-syntax-highlighter/dist/styles/hljs/arduino-light'; + export { default as arta } from 'react-syntax-highlighter/dist/styles/hljs/arta'; + export { default as ascetic } from 'react-syntax-highlighter/dist/styles/hljs/ascetic'; + export { default as atelierCaveDark } from 'react-syntax-highlighter/dist/styles/hljs/atelier-cave-dark'; + export { default as atelierCaveLight } from 'react-syntax-highlighter/dist/styles/hljs/atelier-cave-light'; + export { default as atelierDuneDark } from 'react-syntax-highlighter/dist/styles/hljs/atelier-dune-dark'; + export { default as atelierDuneLight } from 'react-syntax-highlighter/dist/styles/hljs/atelier-dune-light'; + export { default as atelierEstuaryDark } from 'react-syntax-highlighter/dist/styles/hljs/atelier-estuary-dark'; + export { default as atelierEstuaryLight } from 'react-syntax-highlighter/dist/styles/hljs/atelier-estuary-light'; + export { default as atelierForestDark } from 'react-syntax-highlighter/dist/styles/hljs/atelier-forest-dark'; + export { default as atelierForestLight } from 'react-syntax-highlighter/dist/styles/hljs/atelier-forest-light'; + export { default as atelierHeathDark } from 'react-syntax-highlighter/dist/styles/hljs/atelier-heath-dark'; + export { default as atelierHeathLight } from 'react-syntax-highlighter/dist/styles/hljs/atelier-heath-light'; + export { default as atelierLakesideDark } from 'react-syntax-highlighter/dist/styles/hljs/atelier-lakeside-dark'; + export { default as atelierLakesideLight } from 'react-syntax-highlighter/dist/styles/hljs/atelier-lakeside-light'; + export { default as atelierPlateauDark } from 'react-syntax-highlighter/dist/styles/hljs/atelier-plateau-dark'; + export { default as atelierPlateauLight } from 'react-syntax-highlighter/dist/styles/hljs/atelier-plateau-light'; + export { default as atelierSavannaDark } from 'react-syntax-highlighter/dist/styles/hljs/atelier-savanna-dark'; + export { default as atelierSavannaLight } from 'react-syntax-highlighter/dist/styles/hljs/atelier-savanna-light'; + export { default as atelierSeasideDark } from 'react-syntax-highlighter/dist/styles/hljs/atelier-seaside-dark'; + export { default as atelierSeasideLight } from 'react-syntax-highlighter/dist/styles/hljs/atelier-seaside-light'; + export { default as atelierSulphurpoolDark } from 'react-syntax-highlighter/dist/styles/hljs/atelier-sulphurpool-dark'; + export { default as atelierSulphurpoolLight } from 'react-syntax-highlighter/dist/styles/hljs/atelier-sulphurpool-light'; + export { default as atomOneDark } from 'react-syntax-highlighter/dist/styles/hljs/atom-one-dark'; + export { default as atomOneLight } from 'react-syntax-highlighter/dist/styles/hljs/atom-one-light'; + export { default as brownPaper } from 'react-syntax-highlighter/dist/styles/hljs/brown-paper'; + export { default as codepenEmbed } from 'react-syntax-highlighter/dist/styles/hljs/codepen-embed'; + export { default as colorBrewer } from 'react-syntax-highlighter/dist/styles/hljs/color-brewer'; + export { default as darcula } from 'react-syntax-highlighter/dist/styles/hljs/darcula'; + export { default as dark } from 'react-syntax-highlighter/dist/styles/hljs/dark'; + export { default as darkula } from 'react-syntax-highlighter/dist/styles/hljs/darkula'; + export { default as defaultStyle } from 'react-syntax-highlighter/dist/styles/hljs/default-style'; + export { default as docco } from 'react-syntax-highlighter/dist/styles/hljs/docco'; + export { default as dracula } from 'react-syntax-highlighter/dist/styles/hljs/dracula'; + export { default as far } from 'react-syntax-highlighter/dist/styles/hljs/far'; + export { default as foundation } from 'react-syntax-highlighter/dist/styles/hljs/foundation'; + export { default as githubGist } from 'react-syntax-highlighter/dist/styles/hljs/github-gist'; + export { default as github } from 'react-syntax-highlighter/dist/styles/hljs/github'; + export { default as googlecode } from 'react-syntax-highlighter/dist/styles/hljs/googlecode'; + export { default as grayscale } from 'react-syntax-highlighter/dist/styles/hljs/grayscale'; + export { default as gruvboxDark } from 'react-syntax-highlighter/dist/styles/hljs/gruvbox-dark'; + export { default as gruvboxLight } from 'react-syntax-highlighter/dist/styles/hljs/gruvbox-light'; + export { default as hopscotch } from 'react-syntax-highlighter/dist/styles/hljs/hopscotch'; + export { default as hybrid } from 'react-syntax-highlighter/dist/styles/hljs/hybrid'; + export { default as idea } from 'react-syntax-highlighter/dist/styles/hljs/idea'; + export { default as irBlack } from 'react-syntax-highlighter/dist/styles/hljs/ir-black'; + export { default as kimbieDark } from 'react-syntax-highlighter/dist/styles/hljs/kimbie.dark'; + export { default as kimbieLight } from 'react-syntax-highlighter/dist/styles/hljs/kimbie.light'; + export { default as magula } from 'react-syntax-highlighter/dist/styles/hljs/magula'; + export { default as monoBlue } from 'react-syntax-highlighter/dist/styles/hljs/mono-blue'; + export { default as monokaiSublime } from 'react-syntax-highlighter/dist/styles/hljs/monokai-sublime'; + export { default as monokai } from 'react-syntax-highlighter/dist/styles/hljs/monokai'; + export { default as obsidian } from 'react-syntax-highlighter/dist/styles/hljs/obsidian'; + export { default as ocean } from 'react-syntax-highlighter/dist/styles/hljs/ocean'; + export { default as paraisoDark } from 'react-syntax-highlighter/dist/styles/hljs/paraiso-dark'; + export { default as paraisoLight } from 'react-syntax-highlighter/dist/styles/hljs/paraiso-light'; + export { default as pojoaque } from 'react-syntax-highlighter/dist/styles/hljs/pojoaque'; + export { default as purebasic } from 'react-syntax-highlighter/dist/styles/hljs/purebasic'; + export { default as qtcreatorDark } from 'react-syntax-highlighter/dist/styles/hljs/qtcreator_dark'; + export { default as qtcreatorLight } from 'react-syntax-highlighter/dist/styles/hljs/qtcreator_light'; + export { default as railscasts } from 'react-syntax-highlighter/dist/styles/hljs/railscasts'; + export { default as rainbow } from 'react-syntax-highlighter/dist/styles/hljs/rainbow'; + export { default as routeros } from 'react-syntax-highlighter/dist/styles/hljs/routeros'; + export { default as schoolBook } from 'react-syntax-highlighter/dist/styles/hljs/school-book'; + export { default as solarizedDark } from 'react-syntax-highlighter/dist/styles/hljs/solarized-dark'; + export { default as solarizedLight } from 'react-syntax-highlighter/dist/styles/hljs/solarized-light'; + export { default as sunburst } from 'react-syntax-highlighter/dist/styles/hljs/sunburst'; + export { default as tomorrowNightBlue } from 'react-syntax-highlighter/dist/styles/hljs/tomorrow-night-blue'; + export { default as tomorrowNightBright } from 'react-syntax-highlighter/dist/styles/hljs/tomorrow-night-bright'; + export { default as tomorrowNightEighties } from 'react-syntax-highlighter/dist/styles/hljs/tomorrow-night-eighties'; + export { default as tomorrowNight } from 'react-syntax-highlighter/dist/styles/hljs/tomorrow-night'; + export { default as tomorrow } from 'react-syntax-highlighter/dist/styles/hljs/tomorrow'; + export { default as vs } from 'react-syntax-highlighter/dist/styles/hljs/vs'; + export { default as vs2015 } from 'react-syntax-highlighter/dist/styles/hljs/vs2015'; + export { default as xcode } from 'react-syntax-highlighter/dist/styles/hljs/xcode'; + export { default as xt256 } from 'react-syntax-highlighter/dist/styles/hljs/xt256'; + export { default as zenburn } from 'react-syntax-highlighter/dist/styles/hljs/zenburn'; } -declare module 'react-syntax-highlighter/styles/hljs/agate' { +declare module 'react-syntax-highlighter/dist/styles/hljs/agate' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/androidstudio' { +declare module 'react-syntax-highlighter/dist/styles/hljs/androidstudio' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/arduino-light' { +declare module 'react-syntax-highlighter/dist/styles/hljs/arduino-light' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/arta' { +declare module 'react-syntax-highlighter/dist/styles/hljs/arta' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/ascetic' { +declare module 'react-syntax-highlighter/dist/styles/hljs/ascetic' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/atelier-cave-dark' { +declare module 'react-syntax-highlighter/dist/styles/hljs/atelier-cave-dark' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/atelier-cave-light' { +declare module 'react-syntax-highlighter/dist/styles/hljs/atelier-cave-light' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/atelier-dune-dark' { +declare module 'react-syntax-highlighter/dist/styles/hljs/atelier-dune-dark' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/atelier-dune-light' { +declare module 'react-syntax-highlighter/dist/styles/hljs/atelier-dune-light' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/atelier-estuary-dark' { +declare module 'react-syntax-highlighter/dist/styles/hljs/atelier-estuary-dark' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/atelier-estuary-light' { +declare module 'react-syntax-highlighter/dist/styles/hljs/atelier-estuary-light' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/atelier-forest-dark' { +declare module 'react-syntax-highlighter/dist/styles/hljs/atelier-forest-dark' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/atelier-forest-light' { +declare module 'react-syntax-highlighter/dist/styles/hljs/atelier-forest-light' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/atelier-heath-dark' { +declare module 'react-syntax-highlighter/dist/styles/hljs/atelier-heath-dark' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/atelier-heath-light' { +declare module 'react-syntax-highlighter/dist/styles/hljs/atelier-heath-light' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/atelier-lakeside-dark' { +declare module 'react-syntax-highlighter/dist/styles/hljs/atelier-lakeside-dark' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/atelier-lakeside-light' { +declare module 'react-syntax-highlighter/dist/styles/hljs/atelier-lakeside-light' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/atelier-plateau-dark' { +declare module 'react-syntax-highlighter/dist/styles/hljs/atelier-plateau-dark' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/atelier-plateau-light' { +declare module 'react-syntax-highlighter/dist/styles/hljs/atelier-plateau-light' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/atelier-savanna-dark' { +declare module 'react-syntax-highlighter/dist/styles/hljs/atelier-savanna-dark' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/atelier-savanna-light' { +declare module 'react-syntax-highlighter/dist/styles/hljs/atelier-savanna-light' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/atelier-seaside-dark' { +declare module 'react-syntax-highlighter/dist/styles/hljs/atelier-seaside-dark' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/atelier-seaside-light' { +declare module 'react-syntax-highlighter/dist/styles/hljs/atelier-seaside-light' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/atelier-sulphurpool-dark' { +declare module 'react-syntax-highlighter/dist/styles/hljs/atelier-sulphurpool-dark' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/atelier-sulphurpool-light' { +declare module 'react-syntax-highlighter/dist/styles/hljs/atelier-sulphurpool-light' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/atom-one-dark' { +declare module 'react-syntax-highlighter/dist/styles/hljs/atom-one-dark' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/atom-one-light' { +declare module 'react-syntax-highlighter/dist/styles/hljs/atom-one-light' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/brown-paper' { +declare module 'react-syntax-highlighter/dist/styles/hljs/brown-paper' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/codepen-embed' { +declare module 'react-syntax-highlighter/dist/styles/hljs/codepen-embed' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/color-brewer' { +declare module 'react-syntax-highlighter/dist/styles/hljs/color-brewer' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/darcula' { +declare module 'react-syntax-highlighter/dist/styles/hljs/darcula' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/dark' { +declare module 'react-syntax-highlighter/dist/styles/hljs/dark' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/darkula' { +declare module 'react-syntax-highlighter/dist/styles/hljs/darkula' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/default-style' { +declare module 'react-syntax-highlighter/dist/styles/hljs/default-style' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/docco' { +declare module 'react-syntax-highlighter/dist/styles/hljs/docco' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/dracula' { +declare module 'react-syntax-highlighter/dist/styles/hljs/dracula' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/far' { +declare module 'react-syntax-highlighter/dist/styles/hljs/far' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/foundation' { +declare module 'react-syntax-highlighter/dist/styles/hljs/foundation' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/github-gist' { +declare module 'react-syntax-highlighter/dist/styles/hljs/github-gist' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/github' { +declare module 'react-syntax-highlighter/dist/styles/hljs/github' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/googlecode' { +declare module 'react-syntax-highlighter/dist/styles/hljs/googlecode' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/grayscale' { +declare module 'react-syntax-highlighter/dist/styles/hljs/grayscale' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/gruvbox-dark' { +declare module 'react-syntax-highlighter/dist/styles/hljs/gruvbox-dark' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/gruvbox-light' { +declare module 'react-syntax-highlighter/dist/styles/hljs/gruvbox-light' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/hopscotch' { +declare module 'react-syntax-highlighter/dist/styles/hljs/hopscotch' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/hybrid' { +declare module 'react-syntax-highlighter/dist/styles/hljs/hybrid' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/idea' { +declare module 'react-syntax-highlighter/dist/styles/hljs/idea' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/ir-black' { +declare module 'react-syntax-highlighter/dist/styles/hljs/ir-black' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/kimbie.dark' { +declare module 'react-syntax-highlighter/dist/styles/hljs/kimbie.dark' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/kimbie.light' { +declare module 'react-syntax-highlighter/dist/styles/hljs/kimbie.light' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/magula' { +declare module 'react-syntax-highlighter/dist/styles/hljs/magula' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/mono-blue' { +declare module 'react-syntax-highlighter/dist/styles/hljs/mono-blue' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/monokai-sublime' { +declare module 'react-syntax-highlighter/dist/styles/hljs/monokai-sublime' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/monokai' { +declare module 'react-syntax-highlighter/dist/styles/hljs/monokai' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/obsidian' { +declare module 'react-syntax-highlighter/dist/styles/hljs/obsidian' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/ocean' { +declare module 'react-syntax-highlighter/dist/styles/hljs/ocean' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/paraiso-dark' { +declare module 'react-syntax-highlighter/dist/styles/hljs/paraiso-dark' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/paraiso-light' { +declare module 'react-syntax-highlighter/dist/styles/hljs/paraiso-light' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/pojoaque' { +declare module 'react-syntax-highlighter/dist/styles/hljs/pojoaque' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/purebasic' { +declare module 'react-syntax-highlighter/dist/styles/hljs/purebasic' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/qtcreator_dark' { +declare module 'react-syntax-highlighter/dist/styles/hljs/qtcreator_dark' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/qtcreator_light' { +declare module 'react-syntax-highlighter/dist/styles/hljs/qtcreator_light' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/railscasts' { +declare module 'react-syntax-highlighter/dist/styles/hljs/railscasts' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/rainbow' { +declare module 'react-syntax-highlighter/dist/styles/hljs/rainbow' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/routeros' { +declare module 'react-syntax-highlighter/dist/styles/hljs/routeros' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/school-book' { +declare module 'react-syntax-highlighter/dist/styles/hljs/school-book' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/solarized-dark' { +declare module 'react-syntax-highlighter/dist/styles/hljs/solarized-dark' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/solarized-light' { +declare module 'react-syntax-highlighter/dist/styles/hljs/solarized-light' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/sunburst' { +declare module 'react-syntax-highlighter/dist/styles/hljs/sunburst' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/tomorrow-night-blue' { +declare module 'react-syntax-highlighter/dist/styles/hljs/tomorrow-night-blue' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/tomorrow-night-bright' { +declare module 'react-syntax-highlighter/dist/styles/hljs/tomorrow-night-bright' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/tomorrow-night-eighties' { +declare module 'react-syntax-highlighter/dist/styles/hljs/tomorrow-night-eighties' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/tomorrow-night' { +declare module 'react-syntax-highlighter/dist/styles/hljs/tomorrow-night' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/tomorrow' { +declare module 'react-syntax-highlighter/dist/styles/hljs/tomorrow' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/vs' { +declare module 'react-syntax-highlighter/dist/styles/hljs/vs' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/vs2015' { +declare module 'react-syntax-highlighter/dist/styles/hljs/vs2015' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/xcode' { +declare module 'react-syntax-highlighter/dist/styles/hljs/xcode' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/xt256' { +declare module 'react-syntax-highlighter/dist/styles/hljs/xt256' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/hljs/zenburn' { +declare module 'react-syntax-highlighter/dist/styles/hljs/zenburn' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/prism' { - export { default as atomDark } from 'react-syntax-highlighter/styles/prism/atom-dark'; - export { default as base16AteliersulphurpoolLight } from 'react-syntax-highlighter/styles/prism/base16-ateliersulphurpool.light'; - export { default as cb } from 'react-syntax-highlighter/styles/prism/cb'; - export { default as coy } from 'react-syntax-highlighter/styles/prism/coy'; - export { default as darcula } from 'react-syntax-highlighter/styles/prism/darcula'; - export { default as dark } from 'react-syntax-highlighter/styles/prism/dark'; - export { default as duotoneDark } from 'react-syntax-highlighter/styles/prism/duotone-dark'; - export { default as duotoneEarth } from 'react-syntax-highlighter/styles/prism/duotone-earth'; - export { default as duotoneForest } from 'react-syntax-highlighter/styles/prism/duotone-forest'; - export { default as duotoneLight } from 'react-syntax-highlighter/styles/prism/duotone-light'; - export { default as duotoneSea } from 'react-syntax-highlighter/styles/prism/duotone-sea'; - export { default as duotoneSpace } from 'react-syntax-highlighter/styles/prism/duotone-space'; - export { default as funky } from 'react-syntax-highlighter/styles/prism/funky'; - export { default as ghcolors } from 'react-syntax-highlighter/styles/prism/ghcolors'; - export { default as hopscotch } from 'react-syntax-highlighter/styles/prism/hopscotch'; - export { default as okaidia } from 'react-syntax-highlighter/styles/prism/okaidia'; - export { default as pojoaque } from 'react-syntax-highlighter/styles/prism/pojoaque'; - export { default as prism } from 'react-syntax-highlighter/styles/prism/prism'; - export { default as solarizedlight } from 'react-syntax-highlighter/styles/prism/solarizedlight'; - export { default as tomorrow } from 'react-syntax-highlighter/styles/prism/tomorrow'; - export { default as twilight } from 'react-syntax-highlighter/styles/prism/twilight'; - export { default as vs } from 'react-syntax-highlighter/styles/prism/vs'; - export { default as xonokai } from 'react-syntax-highlighter/styles/prism/xonokai'; +declare module 'react-syntax-highlighter/dist/styles/prism' { + export { default as atomDark } from 'react-syntax-highlighter/dist/styles/prism/atom-dark'; + export { default as base16AteliersulphurpoolLight } from 'react-syntax-highlighter/dist/styles/prism/base16-ateliersulphurpool.light'; + export { default as cb } from 'react-syntax-highlighter/dist/styles/prism/cb'; + export { default as coy } from 'react-syntax-highlighter/dist/styles/prism/coy'; + export { default as darcula } from 'react-syntax-highlighter/dist/styles/prism/darcula'; + export { default as dark } from 'react-syntax-highlighter/dist/styles/prism/dark'; + export { default as duotoneDark } from 'react-syntax-highlighter/dist/styles/prism/duotone-dark'; + export { default as duotoneEarth } from 'react-syntax-highlighter/dist/styles/prism/duotone-earth'; + export { default as duotoneForest } from 'react-syntax-highlighter/dist/styles/prism/duotone-forest'; + export { default as duotoneLight } from 'react-syntax-highlighter/dist/styles/prism/duotone-light'; + export { default as duotoneSea } from 'react-syntax-highlighter/dist/styles/prism/duotone-sea'; + export { default as duotoneSpace } from 'react-syntax-highlighter/dist/styles/prism/duotone-space'; + export { default as funky } from 'react-syntax-highlighter/dist/styles/prism/funky'; + export { default as ghcolors } from 'react-syntax-highlighter/dist/styles/prism/ghcolors'; + export { default as hopscotch } from 'react-syntax-highlighter/dist/styles/prism/hopscotch'; + export { default as okaidia } from 'react-syntax-highlighter/dist/styles/prism/okaidia'; + export { default as pojoaque } from 'react-syntax-highlighter/dist/styles/prism/pojoaque'; + export { default as prism } from 'react-syntax-highlighter/dist/styles/prism/prism'; + export { default as solarizedlight } from 'react-syntax-highlighter/dist/styles/prism/solarizedlight'; + export { default as tomorrow } from 'react-syntax-highlighter/dist/styles/prism/tomorrow'; + export { default as twilight } from 'react-syntax-highlighter/dist/styles/prism/twilight'; + export { default as vs } from 'react-syntax-highlighter/dist/styles/prism/vs'; + export { default as xonokai } from 'react-syntax-highlighter/dist/styles/prism/xonokai'; } -declare module 'react-syntax-highlighter/styles/prism/atom-dark' { +declare module 'react-syntax-highlighter/dist/styles/prism/atom-dark' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/prism/base16-ateliersulphurpool.light' { +declare module 'react-syntax-highlighter/dist/styles/prism/base16-ateliersulphurpool.light' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/prism/cb' { +declare module 'react-syntax-highlighter/dist/styles/prism/cb' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/prism/coy' { +declare module 'react-syntax-highlighter/dist/styles/prism/coy' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/prism/darcula' { +declare module 'react-syntax-highlighter/dist/styles/prism/darcula' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/prism/dark' { +declare module 'react-syntax-highlighter/dist/styles/prism/dark' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/prism/duotone-dark' { +declare module 'react-syntax-highlighter/dist/styles/prism/duotone-dark' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/prism/duotone-earth' { +declare module 'react-syntax-highlighter/dist/styles/prism/duotone-earth' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/prism/duotone-forest' { +declare module 'react-syntax-highlighter/dist/styles/prism/duotone-forest' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/prism/duotone-light' { +declare module 'react-syntax-highlighter/dist/styles/prism/duotone-light' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/prism/duotone-sea' { +declare module 'react-syntax-highlighter/dist/styles/prism/duotone-sea' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/prism/duotone-space' { +declare module 'react-syntax-highlighter/dist/styles/prism/duotone-space' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/prism/funky' { +declare module 'react-syntax-highlighter/dist/styles/prism/funky' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/prism/ghcolors' { +declare module 'react-syntax-highlighter/dist/styles/prism/ghcolors' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/prism/hopscotch' { +declare module 'react-syntax-highlighter/dist/styles/prism/hopscotch' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/prism/okaidia' { +declare module 'react-syntax-highlighter/dist/styles/prism/okaidia' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/prism/pojoaque' { +declare module 'react-syntax-highlighter/dist/styles/prism/pojoaque' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/prism/prism' { +declare module 'react-syntax-highlighter/dist/styles/prism/prism' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/prism/solarizedlight' { +declare module 'react-syntax-highlighter/dist/styles/prism/solarizedlight' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/prism/tomorrow' { +declare module 'react-syntax-highlighter/dist/styles/prism/tomorrow' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/prism/twilight' { +declare module 'react-syntax-highlighter/dist/styles/prism/twilight' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/prism/vs' { +declare module 'react-syntax-highlighter/dist/styles/prism/vs' { const style: any; export default style; } -declare module 'react-syntax-highlighter/styles/prism/xonokai' { +declare module 'react-syntax-highlighter/dist/styles/prism/xonokai' { const style: any; export default style; } diff --git a/types/react-syntax-highlighter/react-syntax-highlighter-tests.tsx b/types/react-syntax-highlighter/react-syntax-highlighter-tests.tsx index c516d9f610..36a55aedc1 100644 --- a/types/react-syntax-highlighter/react-syntax-highlighter-tests.tsx +++ b/types/react-syntax-highlighter/react-syntax-highlighter-tests.tsx @@ -3,8 +3,8 @@ import SyntaxHighlighter from "react-syntax-highlighter"; import PrismSyntaxHighlighter from "react-syntax-highlighter/prism"; import PrismLightHighlighter, { registerLanguage } from "react-syntax-highlighter/prism-light"; import jsx from 'react-syntax-highlighter/languages/prism/jsx'; -import { docco } from "react-syntax-highlighter/styles/hljs"; -import { atomDark } from "react-syntax-highlighter/styles/prism"; +import { docco } from "react-syntax-highlighter/dist/styles/hljs"; +import { atomDark } from "react-syntax-highlighter/dist/styles/prism"; function hljsHighlighter(): JSX.Element { const codeString: string = `class CPP { From 0f73bf3034f5138fec401e9f629ade0124dc8403 Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Fri, 7 Dec 2018 12:13:41 +0100 Subject: [PATCH 459/608] Update method documentation ####Example: => Example: --- types/mongoose/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/mongoose/index.d.ts b/types/mongoose/index.d.ts index ad515a1806..83aaa33b2b 100644 --- a/types/mongoose/index.d.ts +++ b/types/mongoose/index.d.ts @@ -2026,7 +2026,7 @@ declare module "mongoose" { * This is handy for integrating with async/await, because `orFail()` saves you * an extra `if` statement to check if no document was found. * - * ####Example: + * Example: * * // Throws if no doc returned * await Model.findOne({ foo: 'bar' }).orFail(); From 9a7b2dc7d0e741a3dde3f816805b7acb89bde49f Mon Sep 17 00:00:00 2001 From: webcarrot Date: Fri, 7 Dec 2018 12:19:47 +0100 Subject: [PATCH 460/608] [mailgun-js] inline and multiple attachments 1. Allow array of `attachment`s in SendData interface. 2. Add `inline` to SendData interface. --- types/mailgun-js/index.d.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/types/mailgun-js/index.d.ts b/types/mailgun-js/index.d.ts index 0c6ef0eef3..32af61b68c 100644 --- a/types/mailgun-js/index.d.ts +++ b/types/mailgun-js/index.d.ts @@ -49,6 +49,8 @@ declare namespace Mailgun { contentType?: string; getType(): string; } + + type AttachmentData = string | Buffer | NodeJS.ReadWriteStream | Attachment; interface MailgunExport { new (options: ConstructorParams): Mailgun; @@ -64,7 +66,8 @@ declare namespace Mailgun { subject?: string; text?: string; html?: string; - attachment?: string | Buffer | NodeJS.ReadWriteStream | Attachment; + attachment?: AttachmentData | AttachmentData[]; + inline?: AttachmentData | AttachmentData[]; } interface BatchData extends SendData { From a4e765a77684407f0637e66369be02abb58f5437 Mon Sep 17 00:00:00 2001 From: AlexeyTokmakov Date: Fri, 7 Dec 2018 14:35:30 +0300 Subject: [PATCH 461/608] Update index.d.ts Add Class "Polyline" , Interface "IPolylineOptions" and change IGeoObjectFeature, field takes type "object" . --- types/yandex-maps/index.d.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/types/yandex-maps/index.d.ts b/types/yandex-maps/index.d.ts index 94806b9254..1986a5238c 100644 --- a/types/yandex-maps/index.d.ts +++ b/types/yandex-maps/index.d.ts @@ -2126,7 +2126,7 @@ declare namespace ymaps { } interface IGeoObjectFeature { - geometry?: IGeometry | IGeometryJson; + geometry?: IGeometry | IGeometryJson | object; properties?: IDataManager | object; } @@ -3036,6 +3036,7 @@ declare namespace ymaps { shift(offset: number[]): IShape; } + class Monitor { constructor(dataManager: IDataManager | IOptionManager); add(name: string[] | string, changeCallback: (event: (object | IEvent)) => void, context?: any, params?: any): Monitor; @@ -3044,4 +3045,13 @@ declare namespace ymaps { remove(name: string): Monitor; removeAll(): Monitor; } + + class Polyline extends GeoObject { + constructor(geometry: number[][] | object | ILineStringGeometry, properties: object | IDataManager, options?: IPolylineOptions); + } + + interface IPolylineOptions { + cursor?: string; + [index: string]: any; + } } From 8b4d0980ef3f4e2e54ee0d4eb0d7e9262edab195 Mon Sep 17 00:00:00 2001 From: webcarrot Date: Fri, 7 Dec 2018 12:37:40 +0100 Subject: [PATCH 462/608] [] to ReadonlyArray --- types/mailgun-js/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/mailgun-js/index.d.ts b/types/mailgun-js/index.d.ts index 32af61b68c..a9ea40bc93 100644 --- a/types/mailgun-js/index.d.ts +++ b/types/mailgun-js/index.d.ts @@ -66,8 +66,8 @@ declare namespace Mailgun { subject?: string; text?: string; html?: string; - attachment?: AttachmentData | AttachmentData[]; - inline?: AttachmentData | AttachmentData[]; + attachment?: AttachmentData | ReadonlyArray; + inline?: AttachmentData | ReadonlyArray; } interface BatchData extends SendData { From a7a41699ea7a37bfaf06a323ba3a00f55bbbda86 Mon Sep 17 00:00:00 2001 From: webcarrot Date: Fri, 7 Dec 2018 12:44:26 +0100 Subject: [PATCH 463/608] update tests --- types/mailgun-js/mailgun-js-tests.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/types/mailgun-js/mailgun-js-tests.ts b/types/mailgun-js/mailgun-js-tests.ts index e06e683248..2dc7629050 100644 --- a/types/mailgun-js/mailgun-js-tests.ts +++ b/types/mailgun-js/mailgun-js-tests.ts @@ -25,7 +25,14 @@ const exampleSendData: mailgunFactory.messages.SendData = { attachment: new mailgun.Attachment({ data: "filepath", filename: "my_custom_name.png" - }) + }), + inline: [ + new mailgun.Attachment({ + data: "filepath", + filename: "my_custom_name_2.png" + }), + "my_custom_file_3.png" + ] }; mailgun.messages().send(exampleSendData, (err, body) => {}); From 00bd8dbd716931469e1a357ada78542b50f2aeec Mon Sep 17 00:00:00 2001 From: webcarrot Date: Fri, 7 Dec 2018 12:50:01 +0100 Subject: [PATCH 464/608] add buffer to test --- types/mailgun-js/mailgun-js-tests.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/types/mailgun-js/mailgun-js-tests.ts b/types/mailgun-js/mailgun-js-tests.ts index 2dc7629050..0d830308d1 100644 --- a/types/mailgun-js/mailgun-js-tests.ts +++ b/types/mailgun-js/mailgun-js-tests.ts @@ -31,7 +31,8 @@ const exampleSendData: mailgunFactory.messages.SendData = { data: "filepath", filename: "my_custom_name_2.png" }), - "my_custom_file_3.png" + "my_custom_file_3.png", + Buffer.from("plain text") ] }; From 7f3016822d1107d9b565ddc55f279f6431b790fa Mon Sep 17 00:00:00 2001 From: webcarrot Date: Fri, 7 Dec 2018 12:50:40 +0100 Subject: [PATCH 465/608] remove spaces --- types/mailgun-js/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/mailgun-js/index.d.ts b/types/mailgun-js/index.d.ts index a9ea40bc93..7c6284059e 100644 --- a/types/mailgun-js/index.d.ts +++ b/types/mailgun-js/index.d.ts @@ -49,7 +49,7 @@ declare namespace Mailgun { contentType?: string; getType(): string; } - + type AttachmentData = string | Buffer | NodeJS.ReadWriteStream | Attachment; interface MailgunExport { From c9b217ba146aeaacb33ce9340a6d36446bb0a064 Mon Sep 17 00:00:00 2001 From: Ilia Beliaev Date: Fri, 7 Dec 2018 14:52:26 +0300 Subject: [PATCH 466/608] Added missing options. --- types/pretty-ms/index.d.ts | 6 +++++- types/pretty-ms/pretty-ms-tests.ts | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/types/pretty-ms/index.d.ts b/types/pretty-ms/index.d.ts index b1e151cd65..ca9bf663e2 100644 --- a/types/pretty-ms/index.d.ts +++ b/types/pretty-ms/index.d.ts @@ -1,7 +1,8 @@ -// Type definitions for pretty-ms 3.2 +// Type definitions for pretty-ms 4.0 // Project: https://github.com/sindresorhus/pretty-ms#readme // Definitions by: BendingBender // ocboogie +// silh // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped export = prettyMs; @@ -14,6 +15,9 @@ declare namespace prettyMs { msDecimalDigits?: number; keepDecimalsOnWholeSeconds?: boolean; compact?: boolean; + unitCount?: number; verbose?: boolean; + separateMs?: boolean; + formatSubMs?: boolean; } } diff --git a/types/pretty-ms/pretty-ms-tests.ts b/types/pretty-ms/pretty-ms-tests.ts index ae5e8120b2..bb5e8a69ec 100644 --- a/types/pretty-ms/pretty-ms-tests.ts +++ b/types/pretty-ms/pretty-ms-tests.ts @@ -7,4 +7,7 @@ str = prettyMs(1335669000, {verbose: true}); str = prettyMs(1335669000, {keepDecimalsOnWholeSeconds: true}); str = prettyMs(1335669000, {secDecimalDigits: 1}); str = prettyMs(1335669000, {msDecimalDigits: 2}); +str = prettyMs(1335669000, {unitCount: 2}); +str = prettyMs(1335669000, {separateMs: true}); +str = prettyMs(1335669000, {formatSubMs: true}); str = prettyMs(new Date(2014, 0, 1, 10, 40).getTime() - new Date(2014, 0, 1, 10, 5).getTime()); From 8ead6efef7d8c8a03df12bdf113e1749cd6488a0 Mon Sep 17 00:00:00 2001 From: Jiri Marsicek Date: Fri, 7 Dec 2018 11:40:41 +0000 Subject: [PATCH 467/608] Add typings for more highchart modules - bullet, heatmap, solid-gauge, treemap, wordcloud --- types/highcharts/modules/bullet.d.ts | 5 ++++ types/highcharts/modules/heatmap.d.ts | 5 ++++ types/highcharts/modules/solid-gauge.d.ts | 5 ++++ types/highcharts/modules/treemap.d.ts | 5 ++++ types/highcharts/modules/wordcloud.d.ts | 5 ++++ types/highcharts/test/bullet.ts | 1 + types/highcharts/test/heatmap.ts | 1 + types/highcharts/test/solid-gauge.ts | 1 + types/highcharts/test/treemap.ts | 1 + types/highcharts/test/wordcloud.ts | 1 + types/highcharts/tsconfig.json | 28 +++++++++++++++-------- 11 files changed, 49 insertions(+), 9 deletions(-) create mode 100644 types/highcharts/modules/bullet.d.ts create mode 100644 types/highcharts/modules/heatmap.d.ts create mode 100644 types/highcharts/modules/solid-gauge.d.ts create mode 100644 types/highcharts/modules/treemap.d.ts create mode 100644 types/highcharts/modules/wordcloud.d.ts create mode 100644 types/highcharts/test/bullet.ts create mode 100644 types/highcharts/test/heatmap.ts create mode 100644 types/highcharts/test/solid-gauge.ts create mode 100644 types/highcharts/test/treemap.ts create mode 100644 types/highcharts/test/wordcloud.ts diff --git a/types/highcharts/modules/bullet.d.ts b/types/highcharts/modules/bullet.d.ts new file mode 100644 index 0000000000..98819c1963 --- /dev/null +++ b/types/highcharts/modules/bullet.d.ts @@ -0,0 +1,5 @@ +import { Static } from 'highcharts'; + +declare function HighchartsBullet(H: Static): Static; +export = HighchartsBullet; +export as namespace HighchartsBullet; diff --git a/types/highcharts/modules/heatmap.d.ts b/types/highcharts/modules/heatmap.d.ts new file mode 100644 index 0000000000..46ae5ff3e1 --- /dev/null +++ b/types/highcharts/modules/heatmap.d.ts @@ -0,0 +1,5 @@ +import { Static } from 'highcharts'; + +declare function HighchartsHeatMap(H: Static): Static; +export = HighchartsHeatMap; +export as namespace HighchartsHeatMap; diff --git a/types/highcharts/modules/solid-gauge.d.ts b/types/highcharts/modules/solid-gauge.d.ts new file mode 100644 index 0000000000..4fa17d62cd --- /dev/null +++ b/types/highcharts/modules/solid-gauge.d.ts @@ -0,0 +1,5 @@ +import { Static } from 'highcharts'; + +declare function HighchartsSolidGauge(H: Static): Static; +export = HighchartsSolidGauge; +export as namespace HighchartsSolidGauge; diff --git a/types/highcharts/modules/treemap.d.ts b/types/highcharts/modules/treemap.d.ts new file mode 100644 index 0000000000..25a2c58f2e --- /dev/null +++ b/types/highcharts/modules/treemap.d.ts @@ -0,0 +1,5 @@ +import { Static } from 'highcharts'; + +declare function HighchartsTreeMap(H: Static): Static; +export = HighchartsTreeMap; +export as namespace HighchartsTreeMap; diff --git a/types/highcharts/modules/wordcloud.d.ts b/types/highcharts/modules/wordcloud.d.ts new file mode 100644 index 0000000000..f6a9141057 --- /dev/null +++ b/types/highcharts/modules/wordcloud.d.ts @@ -0,0 +1,5 @@ +import { Static } from 'highcharts'; + +declare function HighchartsWordcloud(H: Static): Static; +export = HighchartsWordcloud; +export as namespace HighchartsWordcloud; diff --git a/types/highcharts/test/bullet.ts b/types/highcharts/test/bullet.ts new file mode 100644 index 0000000000..6a82c891bf --- /dev/null +++ b/types/highcharts/test/bullet.ts @@ -0,0 +1 @@ +HighchartsBullet(Highcharts); diff --git a/types/highcharts/test/heatmap.ts b/types/highcharts/test/heatmap.ts new file mode 100644 index 0000000000..d42454d447 --- /dev/null +++ b/types/highcharts/test/heatmap.ts @@ -0,0 +1 @@ +HighchartsHeatMap(Highcharts); diff --git a/types/highcharts/test/solid-gauge.ts b/types/highcharts/test/solid-gauge.ts new file mode 100644 index 0000000000..3d5c2245dc --- /dev/null +++ b/types/highcharts/test/solid-gauge.ts @@ -0,0 +1 @@ +HighchartsSolidGauge(Highcharts); diff --git a/types/highcharts/test/treemap.ts b/types/highcharts/test/treemap.ts new file mode 100644 index 0000000000..c7772a4dbf --- /dev/null +++ b/types/highcharts/test/treemap.ts @@ -0,0 +1 @@ +HighchartsTreeMap(Highcharts); diff --git a/types/highcharts/test/wordcloud.ts b/types/highcharts/test/wordcloud.ts new file mode 100644 index 0000000000..037d54eb7f --- /dev/null +++ b/types/highcharts/test/wordcloud.ts @@ -0,0 +1 @@ +HighchartsWordcloud(Highcharts); diff --git a/types/highcharts/tsconfig.json b/types/highcharts/tsconfig.json index e69f0eeb57..60bbecc1fa 100644 --- a/types/highcharts/tsconfig.json +++ b/types/highcharts/tsconfig.json @@ -18,23 +18,33 @@ "forceConsistentCasingInFileNames": true }, "files": [ - "index.d.ts", - "modules/map/index.d.ts", - "modules/boost.d.ts", - "modules/drilldown.d.ts", - "modules/exporting.d.ts", - "modules/no-data-to-display.d.ts", - "modules/offline-exporting.d.ts", "highcharts-more.d.ts", "highstock.d.ts", + "index.d.ts", "js/highcharts/index.d.ts", + "modules/boost.d.ts", + "modules/bullet.d.ts", + "modules/drilldown.d.ts", + "modules/exporting.d.ts", + "modules/heatmap.d.ts", + "modules/map/index.d.ts", + "modules/no-data-to-display.d.ts", + "modules/offline-exporting.d.ts", + "modules/solid-gauge.d.ts", + "modules/treemap.d.ts", + "modules/wordcloud.d.ts", "test/boost.ts", + "test/bullet.ts", "test/drilldown.ts", "test/exporting.ts", + "test/heatmap.ts", "test/highstock.ts", "test/index.ts", "test/more.ts", "test/no-data-to-display.ts", - "test/offline-exporting.ts" + "test/offline-exporting.ts", + "test/solid-gauge.ts", + "test/treemap.ts", + "test/wordcloud.ts" ] -} \ No newline at end of file +} From 633d626edbb517d9fd8fd80c2c4a45f2331eec95 Mon Sep 17 00:00:00 2001 From: AlexeyTokmakov Date: Fri, 7 Dec 2018 15:04:14 +0300 Subject: [PATCH 468/608] Update index.d.ts --- types/yandex-maps/index.d.ts | 4112 +++++++++++++++++----------------- 1 file changed, 2056 insertions(+), 2056 deletions(-) diff --git a/types/yandex-maps/index.d.ts b/types/yandex-maps/index.d.ts index 1986a5238c..e7078b4b28 100644 --- a/types/yandex-maps/index.d.ts +++ b/types/yandex-maps/index.d.ts @@ -5,3053 +5,3053 @@ // TypeScript Version: 2.4 declare namespace ymaps { - interface IClassConstructor { - new (): T; - } + interface IClassConstructor { + new(): T; + } - type ControlSingleKey = "fullscreenControl" | "geolocationControl" | "routeEditor" | "rulerControl" | "searchControl" | "trafficControl" | "typeSelector" | "zoomControl"; - type ControlSetKey = "smallMapDefaultSet" | "mediumMapDefaultSet" | "largeMapDefaultSet" | "default"; - type ControlKey = ControlSingleKey | ControlSetKey; + type ControlSingleKey = "fullscreenControl" | "geolocationControl" | "routeEditor" | "rulerControl" | "searchControl" | "trafficControl" | "typeSelector" | "zoomControl"; + type ControlSetKey = "smallMapDefaultSet" | "mediumMapDefaultSet" | "largeMapDefaultSet" | "default"; + type ControlKey = ControlSingleKey | ControlSetKey; - type OverlayKey = - "default#placemark" | "default#pin" | "default#circle" | "default#rectangle" | "default#polyline" | "default#polygon" | - "hotspot#placemark" | "hotspot#circle" | "hotspot#rectangle" | "hotspot#polyline" | "hotspot#polygon" | "html#balloon" | "html#hint" | - "html#placemark" | "html#rectangle" | - string | IClassConstructor | ((geometry: IPixelLineStringGeometry, - data: IDataManager | object, - options: object) => Promise>); - type InteractivityModelKey = "default#opaque" | "default#geoObject" | "default#layer" | "default#transparent" | "default#silent" | string; + type OverlayKey = + "default#placemark" | "default#pin" | "default#circle" | "default#rectangle" | "default#polyline" | "default#polygon" | + "hotspot#placemark" | "hotspot#circle" | "hotspot#rectangle" | "hotspot#polyline" | "hotspot#polygon" | "html#balloon" | "html#hint" | + "html#placemark" | "html#rectangle" | + string | IClassConstructor | ((geometry: IPixelLineStringGeometry, + data: IDataManager | object, + options: object) => Promise>); + type InteractivityModelKey = "default#opaque" | "default#geoObject" | "default#layer" | "default#transparent" | "default#silent" | string; - type PresetKey = string; //option.presetStorage - //[number, number] - //[[number, number], [number, number]] + type PresetKey = string; //option.presetStorage + //[number, number] + //[[number, number], [number, number]] - namespace behavior { - class DblClickZoom implements IBehavior { - constructor(options?: IDblClickZoomOptions); + namespace behavior { + class DblClickZoom implements IBehavior { + constructor(options?: IDblClickZoomOptions); - events: IEventManager; - options: IOptionManager; + events: IEventManager; + options: IOptionManager; - disable(): void; + disable(): void; - enable(): void; + enable(): void; - isEnabled(): boolean; + isEnabled(): boolean; - getParent(): IControlParent | null; + getParent(): IControlParent | null; - setParent(parent: IControlParent): this; - } + setParent(parent: IControlParent): this; + } - interface IDblClickZoomOptions extends IMapMarginOptions { - centering?: boolean; - duration?: number; - } + interface IDblClickZoomOptions extends IMapMarginOptions { + centering?: boolean; + duration?: number; + } - class Drag implements IBehavior { - constructor(options?: IDragOptions) + class Drag implements IBehavior { + constructor(options?: IDragOptions) - events: IEventManager; - options: IOptionManager; + events: IEventManager; + options: IOptionManager; - disable(): void; + disable(): void; - enable(): void; + enable(): void; - isEnabled(): boolean; + isEnabled(): boolean; - getParent(): null | IControlParent; + getParent(): null | IControlParent; - setParent(parent: IControlParent): this; - } + setParent(parent: IControlParent): this; + } - interface IDragOptions { - actionCursor?: string; - cursor?: string; - inertia?: boolean; - inertiaDuration?: number; - tremor?: number; - } + interface IDragOptions { + actionCursor?: string; + cursor?: string; + inertia?: boolean; + inertiaDuration?: number; + tremor?: number; + } - class LeftMouseButtonMagnifier implements IBehavior { - constructor(options?: ILeftMouseButtonMagnifierOptions) + class LeftMouseButtonMagnifier implements IBehavior { + constructor(options?: ILeftMouseButtonMagnifierOptions) - events: IEventManager; - options: IOptionManager; + events: IEventManager; + options: IOptionManager; - disable(): void; + disable(): void; - enable(): void; + enable(): void; - isEnabled(): boolean; + isEnabled(): boolean; - getParent(): null | IControlParent; + getParent(): null | IControlParent; - setParent(parent: IControlParent): this; - } + setParent(parent: IControlParent): this; + } - interface ILeftMouseButtonMagnifierOptions { - actionCursor?: string; - cursor?: string; - duration?: number; - } + interface ILeftMouseButtonMagnifierOptions { + actionCursor?: string; + cursor?: string; + duration?: number; + } - class MultiTouch implements IBehavior { - constructor(options?: IMultiTouchOptions) + class MultiTouch implements IBehavior { + constructor(options?: IMultiTouchOptions) - events: IEventManager; - options: IOptionManager; + events: IEventManager; + options: IOptionManager; - disable(): void; + disable(): void; - enable(): void; + enable(): void; - isEnabled(): boolean; + isEnabled(): boolean; - getParent(): null | IControlParent; + getParent(): null | IControlParent; - setParent(parent: IControlParent): this; - } + setParent(parent: IControlParent): this; + } - interface IMultiTouchOptions { - tremor?: number; - } + interface IMultiTouchOptions { + tremor?: number; + } - class RightMouseButtonMagnifier implements IBehavior { - constructor(options?: IRightMouseButtonMagnifierOptions) + class RightMouseButtonMagnifier implements IBehavior { + constructor(options?: IRightMouseButtonMagnifierOptions) - events: IEventManager; - options: IOptionManager; + events: IEventManager; + options: IOptionManager; - disable(): void; + disable(): void; - enable(): void; + enable(): void; - isEnabled(): boolean; + isEnabled(): boolean; - getParent(): null | IControlParent; + getParent(): null | IControlParent; - setParent(parent: IControlParent): this; - } + setParent(parent: IControlParent): this; + } - interface IRightMouseButtonMagnifierOptions { - actionCursor?: string; - duration?: number; - } + interface IRightMouseButtonMagnifierOptions { + actionCursor?: string; + duration?: number; + } - class RouteEditor implements IBehavior { - events: IEventManager; - options: IOptionManager; + class RouteEditor implements IBehavior { + events: IEventManager; + options: IOptionManager; - disable(): void; + disable(): void; - enable(): void; + enable(): void; - isEnabled(): boolean; + isEnabled(): boolean; - getParent(): null | IControlParent; + getParent(): null | IControlParent; - setParent(parent: IControlParent): this; + setParent(parent: IControlParent): this; - getRoute(): router.Route; + getRoute(): router.Route; - getState(): string; + getState(): string; - setState(state: string | null): void; - } + setState(state: string | null): void; + } - class Ruler implements IBehavior { - constructor(options?: IRulerOptions) + class Ruler implements IBehavior { + constructor(options?: IRulerOptions) - events: IEventManager; - options: IOptionManager; + events: IEventManager; + options: IOptionManager; - disable(): void; + disable(): void; - enable(): void; + enable(): void; - isEnabled(): boolean; + isEnabled(): boolean; - getParent(): null | IControlParent; + getParent(): null | IControlParent; - setParent(parent: IControlParent): this; + setParent(parent: IControlParent): this; - close(): boolean; + close(): boolean; - getState(): string; + getState(): string; - setState(state: string | null): void; - } + setState(state: string | null): void; + } - interface IRulerOptions { - balloonAutoPan?: boolean; - } + interface IRulerOptions { + balloonAutoPan?: boolean; + } - class ScrollZoom implements IBehavior { - constructor(options?: IScrollZoomOptions) + class ScrollZoom implements IBehavior { + constructor(options?: IScrollZoomOptions) - events: IEventManager; - options: IOptionManager; + events: IEventManager; + options: IOptionManager; - disable(): void; + disable(): void; - enable(): void; + enable(): void; - isEnabled(): boolean; + isEnabled(): boolean; - getParent(): null | IControlParent; + getParent(): null | IControlParent; - setParent(parent: IControlParent): this; - } + setParent(parent: IControlParent): this; + } - interface IScrollZoomOptions { - maximumDelta?: number; - speed?: number; - } + interface IScrollZoomOptions { + maximumDelta?: number; + speed?: number; + } - const storage: util.Storage; - } + const storage: util.Storage; + } - namespace clusterer { - class Balloon implements IBalloonManager { //tslint:disable-line no-shadowed-variable - constructor(clusterer: Clusterer); + namespace clusterer { + class Balloon implements IBalloonManager { //tslint:disable-line no-shadowed-variable + constructor(clusterer: Clusterer); - events: IEventManager; + events: IEventManager; - autoPan(): Promise; + autoPan(): Promise; - close(force?: boolean): Promise; + close(force?: boolean): Promise; - destroy(): void; + destroy(): void; - getData(): object | null; + getData(): object | null; - getOptions(): IOptionManager | null; + getOptions(): IOptionManager | null; - getOverlay(): Promise; + getOverlay(): Promise; - getOverlaySync(): IOverlay | null; + getOverlaySync(): IOverlay | null; - getPosition(): number[] | null; + getPosition(): number[] | null; - isOpen(): boolean; + isOpen(): boolean; - open(position?: number[], data?: object | string | HTMLElement, options?: object): Promise; + open(position?: number[], data?: object | string | HTMLElement, options?: object): Promise; - setData(data: object | string | HTMLElement): Promise; + setData(data: object | string | HTMLElement): Promise; - setOptions(options: object): Promise; + setOptions(options: object): Promise; - setPosition(position: number[]): Promise; - } + setPosition(position: number[]): Promise; + } - class Hint implements IHintManager { - constructor(clusterer: Clusterer); + class Hint implements IHintManager { + constructor(clusterer: Clusterer); - events: IEventManager; + events: IEventManager; - close(force?: boolean): Promise; + close(force?: boolean): Promise; - destroy(): void; + destroy(): void; - getData(): object | null; + getData(): object | null; - getOptions(): IOptionManager | null; + getOptions(): IOptionManager | null; - getOverlay(): Promise; + getOverlay(): Promise; - getOverlaySync(): IOverlay | null; + getOverlaySync(): IOverlay | null; - getPosition(): number[] | null; + getPosition(): number[] | null; - isOpen(): boolean; + isOpen(): boolean; - open(position?: number[], data?: object | string | HTMLElement, options?: object): Promise; + open(position?: number[], data?: object | string | HTMLElement, options?: object): Promise; - setData(data: object | string | HTMLElement): Promise; + setData(data: object | string | HTMLElement): Promise; - setOptions(options: object): Promise; + setOptions(options: object): Promise; - setPosition(position: number[]): Promise; - } - } + setPosition(position: number[]): Promise; + } + } - namespace collection { - class Item implements IChildOnMap, ICustomizable, IEventEmitter, IParentOnMap { - constructor(options?: object); + namespace collection { + class Item implements IChildOnMap, ICustomizable, IEventEmitter, IParentOnMap { + constructor(options?: object); - events: IEventManager; - options: IOptionManager; + events: IEventManager; + options: IOptionManager; - getParent(): null | IControlParent; + getParent(): null | IControlParent; - setParent(parent: IControlParent): this; + setParent(parent: IControlParent): this; - getMap(): Map; + getMap(): Map; - onAddToMap(map: Map): void; + onAddToMap(map: Map): void; - onRemoveFromMap(oldMap: Map): void; - } - } + onRemoveFromMap(oldMap: Map): void; + } + } - namespace control { - class Button implements ICustomizable, ISelectableControl { - constructor(parameters?: IButtonParameters | string); + namespace control { + class Button implements ICustomizable, ISelectableControl { + constructor(parameters?: IButtonParameters | string); - options: IOptionManager; - events: IEventManager; - data: data.Manager; - state: data.Manager; + options: IOptionManager; + events: IEventManager; + data: data.Manager; + state: data.Manager; - deselect(): void; + deselect(): void; - disable(): void; + disable(): void; - enable(): void; + enable(): void; - isEnabled(): boolean; + isEnabled(): boolean; - isSelected(): boolean; + isSelected(): boolean; - select(): void; + select(): void; - getParent(): null | IControlParent; + getParent(): null | IControlParent; - setParent(parent: IControlParent): this; - } + setParent(parent: IControlParent): this; + } - interface IBaseButtonParametersOptions { - adjustMapMargin?: boolean; - float?: "none" | "left" | "right"; - floatIndex?: number; - layout?: IClassConstructor | string; - maxWidth?: number[][] | number[] | number; - position?: { - bottom?: number | string; - left?: number | string; - right?: number | string; - top?: number | string; - }; - visible?: boolean; - } + interface IBaseButtonParametersOptions { + adjustMapMargin?: boolean; + float?: "none" | "left" | "right"; + floatIndex?: number; + layout?: IClassConstructor | string; + maxWidth?: number[][] | number[] | number; + position?: { + bottom?: number | string; + left?: number | string; + right?: number | string; + top?: number | string; + }; + visible?: boolean; + } - interface IButtonParameters { - data?: { - content?: string; - image?: string; - title?: string; - }; - options?: IBaseButtonParametersOptions & { - selectOnClick?: boolean; - size?: "auto" | "small" | "medium" | "large"; - }; - state?: { - enabled?: boolean; - selected?: boolean; - }; - } + interface IButtonParameters { + data?: { + content?: string; + image?: string; + title?: string; + }; + options?: IBaseButtonParametersOptions & { + selectOnClick?: boolean; + size?: "auto" | "small" | "medium" | "large"; + }; + state?: { + enabled?: boolean; + selected?: boolean; + }; + } - class FullscreenControl extends Button { - constructor(parameters?: IFullscreenControlParameters); + class FullscreenControl extends Button { + constructor(parameters?: IFullscreenControlParameters); - enterFullscreen(): void; + enterFullscreen(): void; - exitFullscreen(): void; - } + exitFullscreen(): void; + } - interface IFullscreenControlParameters { - data?: { - title?: string; - }; - options?: IBaseButtonParametersOptions & { - collapseOnBlur?: boolean; - expandOnClick?: boolean; - popupFloat?: "left" | "right"; - }; - state?: { - expanded?: boolean; - }; - } + interface IFullscreenControlParameters { + data?: { + title?: string; + }; + options?: IBaseButtonParametersOptions & { + collapseOnBlur?: boolean; + expandOnClick?: boolean; + popupFloat?: "left" | "right"; + }; + state?: { + expanded?: boolean; + }; + } - class GeolocationControl extends Button { - constructor(parameters?: IGeolocationControlParameters); - } + class GeolocationControl extends Button { + constructor(parameters?: IGeolocationControlParameters); + } - interface IGeolocationControlParameters extends IButtonParameters { - data?: { - image?: string; - title?: string; - }; - options?: IBaseButtonParametersOptions; - } + interface IGeolocationControlParameters extends IButtonParameters { + data?: { + image?: string; + title?: string; + }; + options?: IBaseButtonParametersOptions; + } - class ListBox implements ICollection, IControl, ICustomizable { - constructor(parameters?: IListBoxParameters); + class ListBox implements ICollection, IControl, ICustomizable { + constructor(parameters?: IListBoxParameters); - events: IEventManager; - options: IOptionManager; - data: data.Manager; - state: data.Manager; + events: IEventManager; + options: IOptionManager; + data: data.Manager; + state: data.Manager; - add(object: object): this; + add(object: object): this; - getIterator(): IIterator; + getIterator(): IIterator; - remove(object: object): this; + remove(object: object): this; - getParent(): null | IControlParent; + getParent(): null | IControlParent; - setParent(parent: IControlParent): this; - } + setParent(parent: IControlParent): this; + } - interface IListBoxParameters extends IButtonParameters { - options?: IBaseButtonParametersOptions & { - noPlacemark?: boolean; - }; - } - - class ListBoxItem implements ICustomizable, ISelectableControl { - constructor(parameters?: IListBoxItemParameters); - - options: IOptionManager; - events: IEventManager; - data: data.Manager; - state: data.Manager; - - deselect(): void; - - disable(): void; - - enable(): void; - - isEnabled(): boolean; - - isSelected(): boolean; - - select(): void; - - getParent(): null | IControlParent; - - setParent(parent: IControlParent): this; - - getMap(): Map; - } - - interface IListBoxItemParameters { - data?: { - content?: string; - }; - options?: { - layout?: string | IClassConstructor; - selectableLayout?: string | IClassConstructor; - selectOnClick?: boolean; - separatorLayout?: string | IClassConstructor; - type?: "selectable" | "separator"; - visible?: boolean; - }; - state?: { - selected?: boolean; - }; - } - - class Manager { - constructor(map: Map, controls?: Array, options?: IManagerOptions); - - events: event.Manager; - options: option.Manager; - state: data.Manager; - - add(control: IControl | ControlKey, options?: IManagerControlOptions): this; - - each(callback: (control: IControl) => void, context: object): this; - - get(index: number | string): IControl | null; - - getChildElement(control: IControl): Promise; - - getContainer(): HTMLElement; - - getMap(): Map; - - indexOf(childToFind: IControl | string): number; - - remove(control: IControl | string): this; - } - - interface IManagerOptions { - margin?: number; - pane?: IPane; - states?: string[]; - } + interface IListBoxParameters extends IButtonParameters { + options?: IBaseButtonParametersOptions & { + noPlacemark?: boolean; + }; + } + + class ListBoxItem implements ICustomizable, ISelectableControl { + constructor(parameters?: IListBoxItemParameters); + + options: IOptionManager; + events: IEventManager; + data: data.Manager; + state: data.Manager; + + deselect(): void; + + disable(): void; + + enable(): void; + + isEnabled(): boolean; + + isSelected(): boolean; + + select(): void; + + getParent(): null | IControlParent; + + setParent(parent: IControlParent): this; + + getMap(): Map; + } + + interface IListBoxItemParameters { + data?: { + content?: string; + }; + options?: { + layout?: string | IClassConstructor; + selectableLayout?: string | IClassConstructor; + selectOnClick?: boolean; + separatorLayout?: string | IClassConstructor; + type?: "selectable" | "separator"; + visible?: boolean; + }; + state?: { + selected?: boolean; + }; + } + + class Manager { + constructor(map: Map, controls?: Array, options?: IManagerOptions); + + events: event.Manager; + options: option.Manager; + state: data.Manager; + + add(control: IControl | ControlKey, options?: IManagerControlOptions): this; + + each(callback: (control: IControl) => void, context: object): this; + + get(index: number | string): IControl | null; + + getChildElement(control: IControl): Promise; + + getContainer(): HTMLElement; + + getMap(): Map; + + indexOf(childToFind: IControl | string): number; + + remove(control: IControl | string): this; + } + + interface IManagerOptions { + margin?: number; + pane?: IPane; + states?: string[]; + } - interface IManagerControlOptions { - float?: "none" | "left" | "right"; - floatIndex?: number; - position?: { - bottom?: number | string; - left?: number | string; - right?: number | string; - top?: number | string; - }; - } + interface IManagerControlOptions { + float?: "none" | "left" | "right"; + floatIndex?: number; + position?: { + bottom?: number | string; + left?: number | string; + right?: number | string; + top?: number | string; + }; + } - class RouteButton implements IControl, ICustomizable { - constructor(parameters?: IRouteButtonParameters); + class RouteButton implements IControl, ICustomizable { + constructor(parameters?: IRouteButtonParameters); - events: IEventManager; - options: IOptionManager; - routePanel: IRoutePanel; + events: IEventManager; + options: IOptionManager; + routePanel: IRoutePanel; - getParent(): null | IControlParent; + getParent(): null | IControlParent; - setParent(parent: IControlParent): this; - } + setParent(parent: IControlParent): this; + } - interface IRouteButtonParameters { - options?: { - adjustMapMargin?: boolean; - collapseOnBlur?: boolean; - float?: "none" | "left" | "right"; - floatIndex?: number; - popupAnimate?: boolean; - popupFloat?: "auto" | "left" | "right"; - popupWidth?: string; - position?: { - bottom?: number | string; - left?: number | string; - right?: number | string; - top?: number | string; - }; - size?: "auto" | "small" | "medium" | "large"; - visible?: boolean; - }; - state?: { - expanded?: boolean; - }; - } - - class RouteEditor extends Button { - constructor(parameters?: IRouteEditorParameters); - - getRoute(): router.Route; - } - - interface IRouteEditorParameters { - data?: { - image?: string; - title?: string; - }; - options?: IBaseButtonParametersOptions; - state?: {}; - } - - class RulerControl extends Button { - constructor(parameters?: IRulerControlParameters); - } - - interface IRulerControlParameters { - data?: {}; - options?: { - adjustMapMargin?: boolean; - position?: { - bottom?: number | string; - left?: number | string; - right?: number | string; - top?: number | string; - }; - scaleLine?: boolean; - visible?: boolean; - }; - state?: {}; - } - - class SearchControl implements IControl, ICustomizable { - constructor(parameters?: ISearchControlParameters); - - events: IEventManager; - options: IOptionManager; - state: data.Manager; - - getParent(): null | IControlParent; - - setParent(parent: IControlParent): this; - - clear(): void; - - getMap(): Map; - - getRequestString(): string; - - getResponseMetaData(): object; - - getResult(index: number): Promise; - - getResultsArray(): object[]; - - getResultsCount(): number; + interface IRouteButtonParameters { + options?: { + adjustMapMargin?: boolean; + collapseOnBlur?: boolean; + float?: "none" | "left" | "right"; + floatIndex?: number; + popupAnimate?: boolean; + popupFloat?: "auto" | "left" | "right"; + popupWidth?: string; + position?: { + bottom?: number | string; + left?: number | string; + right?: number | string; + top?: number | string; + }; + size?: "auto" | "small" | "medium" | "large"; + visible?: boolean; + }; + state?: { + expanded?: boolean; + }; + } + + class RouteEditor extends Button { + constructor(parameters?: IRouteEditorParameters); + + getRoute(): router.Route; + } + + interface IRouteEditorParameters { + data?: { + image?: string; + title?: string; + }; + options?: IBaseButtonParametersOptions; + state?: {}; + } + + class RulerControl extends Button { + constructor(parameters?: IRulerControlParameters); + } + + interface IRulerControlParameters { + data?: {}; + options?: { + adjustMapMargin?: boolean; + position?: { + bottom?: number | string; + left?: number | string; + right?: number | string; + top?: number | string; + }; + scaleLine?: boolean; + visible?: boolean; + }; + state?: {}; + } + + class SearchControl implements IControl, ICustomizable { + constructor(parameters?: ISearchControlParameters); + + events: IEventManager; + options: IOptionManager; + state: data.Manager; + + getParent(): null | IControlParent; + + setParent(parent: IControlParent): this; + + clear(): void; + + getMap(): Map; + + getRequestString(): string; + + getResponseMetaData(): object; + + getResult(index: number): Promise; + + getResultsArray(): object[]; + + getResultsCount(): number; - getSelectedIndex(): number; + getSelectedIndex(): number; - hideResult(): void; + hideResult(): void; - search(request: string): Promise; + search(request: string): Promise; - showResult(index: number): this; - } + showResult(index: number): this; + } - interface ISearchControlParameters { - data?: {}; - options?: { - adjustMapMargin?: boolean; - boundedBy?: number[][]; - fitMaxWidth?: boolean; - float?: "none" | "left" | "right"; - floatIndex?: number; - formLayout?: string | IClassConstructor; - kind?: "house" | "street" | "metro" | "district" | "locality"; - layout?: string | IClassConstructor; - maxWidth?: number[][] | number[] | number; - noCentering?: boolean; - noPlacemark?: boolean; - noPopup?: boolean; - noSelect?: boolean; - noSuggestPanel?: boolean; - placeholderContent?: string; - popupItemLayout?: string | IClassConstructor; - popupLayout?: string | IClassConstructor; - position?: { - bottom?: number | string; - left?: number | string; - right?: number | string; - top?: number | string; - }; - provider?: IGeocodeProvider | "yandex#map" | "yandex#search"; - searchCoordOrder?: "latlong" | "longlat"; - size?: "auto" | "small" | "medium" | "large"; - strictBounds?: boolean; - suppressYandexSearch?: boolean; - useMapBounds?: boolean; - zoomMargin?: number; - visible?: boolean; - }; - state?: {}; - } - } + interface ISearchControlParameters { + data?: {}; + options?: { + adjustMapMargin?: boolean; + boundedBy?: number[][]; + fitMaxWidth?: boolean; + float?: "none" | "left" | "right"; + floatIndex?: number; + formLayout?: string | IClassConstructor; + kind?: "house" | "street" | "metro" | "district" | "locality"; + layout?: string | IClassConstructor; + maxWidth?: number[][] | number[] | number; + noCentering?: boolean; + noPlacemark?: boolean; + noPopup?: boolean; + noSelect?: boolean; + noSuggestPanel?: boolean; + placeholderContent?: string; + popupItemLayout?: string | IClassConstructor; + popupLayout?: string | IClassConstructor; + position?: { + bottom?: number | string; + left?: number | string; + right?: number | string; + top?: number | string; + }; + provider?: IGeocodeProvider | "yandex#map" | "yandex#search"; + searchCoordOrder?: "latlong" | "longlat"; + size?: "auto" | "small" | "medium" | "large"; + strictBounds?: boolean; + suppressYandexSearch?: boolean; + useMapBounds?: boolean; + zoomMargin?: number; + visible?: boolean; + }; + state?: {}; + } + } - namespace data { - class Manager implements IDataManager, IFreezable { - constructor(data?: object); + namespace data { + class Manager implements IDataManager, IFreezable { + constructor(data?: object); - events: IEventManager; + events: IEventManager; - get(path: string, defaultValue: object): object; + get(path: string, defaultValue: object): object; - getAll(): object; + getAll(): object; - set(path: object | string, value: object): this; + set(path: object | string, value: object): this; - setAll(): this; + setAll(): this; - unset(path: object | string): this; + unset(path: object | string): this; - unsetAll(): this; + unsetAll(): this; - freeze(): IFreezable; + freeze(): IFreezable; - isFrozen(): boolean; + isFrozen(): boolean; - unfreeze(): IFreezable; + unfreeze(): IFreezable; - add(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; + add(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; - getParent(): IEventManager | null; + getParent(): IEventManager | null; - group(): IEventGroup; + group(): IEventGroup; - remove(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; + remove(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; - setParent(parent: IEventManager | null): this; + setParent(parent: IEventManager | null): this; - fire(type: string, eventobject: object | IEvent): this; - } - } + fire(type: string, eventobject: object | IEvent): this; + } + } - namespace event { - class Manager implements IEventManager { - constructor(params?: { context?: object; controllers?: IEventWorkflowController[]; parent?: IEventManager }); + namespace event { + class Manager implements IEventManager { + constructor(params?: { context?: object; controllers?: IEventWorkflowController[]; parent?: IEventManager }); - add(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; + add(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; - getParent(): IEventManager | null; + getParent(): IEventManager | null; - group(): IEventGroup; + group(): IEventGroup; - remove(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; + remove(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; - setParent(parent: IEventManager | null): this; + setParent(parent: IEventManager | null): this; - fire(type: string, eventobject: object | IEvent): this; + fire(type: string, eventobject: object | IEvent): this; - createEventobject(type: string, event: object, target: object): Event; + createEventobject(type: string, event: object, target: object): Event; - once(types: string[][] | string[] | string, callback: (event: IEvent) => any, context?: object, priority?: number): this; - } - } + once(types: string[][] | string[] | string, callback: (event: IEvent) => any, context?: object, priority?: number): this; + } + } - namespace geometry { - namespace base { - class LineString implements IBaseLineStringGeometry { //tslint:disable-line no-shadowed-variable - static fromEncodedCoordinates(encodedCoordinates: string): geometry.LineString; //tslint:disable-line function-name + namespace geometry { + namespace base { + class LineString implements IBaseLineStringGeometry { //tslint:disable-line no-shadowed-variable + static fromEncodedCoordinates(encodedCoordinates: string): geometry.LineString; //tslint:disable-line function-name - static toEncodedCoordinates(geometry: geometry.LineString): string; //tslint:disable-line function-name + static toEncodedCoordinates(geometry: geometry.LineString): string; //tslint:disable-line function-name - events: IEventManager; + events: IEventManager; - getBounds(): number[][] | null; + getBounds(): number[][] | null; - getType(): string; + getType(): string; - get(index: number): number[]; + get(index: number): number[]; - getChildGeometry(index: number): IPointGeometryAccess; + getChildGeometry(index: number): IPointGeometryAccess; - getClosest(anchorPosition: number[]): object; + getClosest(anchorPosition: number[]): object; - getCoordinates(): number[][]; + getCoordinates(): number[][]; - getLength(): number; + getLength(): number; - insert(index: number, coordinates: number[][]): ILineStringGeometryAccess; + insert(index: number, coordinates: number[][]): ILineStringGeometryAccess; - remove(index: number): number[]; + remove(index: number): number[]; - remove(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; + remove(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; - set(index: number, coordinates: number[]): ILineStringGeometryAccess; + set(index: number, coordinates: number[]): ILineStringGeometryAccess; - setCoordinates(coordinates: number[]): ILineStringGeometryAccess; + setCoordinates(coordinates: number[]): ILineStringGeometryAccess; - splice(index: number, length: number): number[][]; + splice(index: number, length: number): number[][]; - freeze(): IFreezable; + freeze(): IFreezable; - isFrozen(): boolean; + isFrozen(): boolean; - unfreeze(): IFreezable; + unfreeze(): IFreezable; - add(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; + add(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; - getParent(): object | null; + getParent(): object | null; - group(): IEventGroup; + group(): IEventGroup; - setParent(parent: IEventManager | null): this; + setParent(parent: IEventManager | null): this; - fire(type: string, eventobject: object | IEvent): this; - } + fire(type: string, eventobject: object | IEvent): this; + } - class Point implements IBasePointGeometry { //tslint:disable-line no-shadowed-variable - events: IEventManager; + class Point implements IBasePointGeometry { //tslint:disable-line no-shadowed-variable + events: IEventManager; - getBounds(): number[][] | null; + getBounds(): number[][] | null; - getType(): string; + getType(): string; - getCoordinates(): number[] | null; + getCoordinates(): number[] | null; - setCoordinates(coordinates: number[] | null): this; - } - } + setCoordinates(coordinates: number[] | null): this; + } + } - class LineString implements ILineStringGeometry { - constructor(coordinates?: number[][], options?: { - coordRendering?: "shortestPath" | "straightPath"; - geodesic?: boolean; - pixelRendering?: "jumpy" | "static"; - projection?: IProjection; - simplification?: boolean; - }); + class LineString implements ILineStringGeometry { + constructor(coordinates?: number[][], options?: { + coordRendering?: "shortestPath" | "straightPath"; + geodesic?: boolean; + pixelRendering?: "jumpy" | "static"; + projection?: IProjection; + simplification?: boolean; + }); - static fromEncodedCoordinates(encodedCoordinates: string): LineString; //tslint:disable-line function-name + static fromEncodedCoordinates(encodedCoordinates: string): LineString; //tslint:disable-line function-name - static toEncodedCoordinates(geometry: LineString): string; //tslint:disable-line function-name + static toEncodedCoordinates(geometry: LineString): string; //tslint:disable-line function-name - events: IEventManager; - options: IOptionManager; + events: IEventManager; + options: IOptionManager; - getMap(): Map | null; + getMap(): Map | null; - getPixelGeometry(options?: object): IPixelGeometry; + getPixelGeometry(options?: object): IPixelGeometry; - setMap(map: Map): void; + setMap(map: Map): void; - getBounds(): number[][] | null; + getBounds(): number[][] | null; - getType(): string; + getType(): string; - get(index: number): number[]; + get(index: number): number[]; - getChildGeometry(index: number): IPointGeometryAccess; + getChildGeometry(index: number): IPointGeometryAccess; - getClosest(anchorPosition: number[]): object; + getClosest(anchorPosition: number[]): object; - getCoordinates(): number[][]; + getCoordinates(): number[][]; - getLength(): number; + getLength(): number; - insert(index: number, coordinates: number[][]): ILineStringGeometryAccess; + insert(index: number, coordinates: number[][]): ILineStringGeometryAccess; - remove(index: number): number[]; + remove(index: number): number[]; - remove(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; + remove(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; - set(index: number, coordinates: number[]): ILineStringGeometryAccess; + set(index: number, coordinates: number[]): ILineStringGeometryAccess; - setCoordinates(coordinates: number[]): ILineStringGeometryAccess; + setCoordinates(coordinates: number[]): ILineStringGeometryAccess; - splice(index: number, length: number): number[][]; + splice(index: number, length: number): number[][]; - freeze(): IFreezable; + freeze(): IFreezable; - isFrozen(): boolean; + isFrozen(): boolean; - unfreeze(): IFreezable; + unfreeze(): IFreezable; - add(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; + add(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; - getParent(): object | null; + getParent(): object | null; - group(): IEventGroup; + group(): IEventGroup; - setParent(parent: IEventManager | null): this; + setParent(parent: IEventManager | null): this; - fire(type: string, eventobject: object | IEvent): this; - } + fire(type: string, eventobject: object | IEvent): this; + } - class Point implements IPointGeometry { - constructor(coordinates?: number[] | null); + class Point implements IPointGeometry { + constructor(coordinates?: number[] | null); - options: IOptionManager; - events: IEventManager; + options: IOptionManager; + events: IEventManager; - getMap(): Map | null; + getMap(): Map | null; - getPixelGeometry(options?: object): IPixelGeometry; + getPixelGeometry(options?: object): IPixelGeometry; - setMap(map: Map): void; + setMap(map: Map): void; - getBounds(): number[][] | null; + getBounds(): number[][] | null; - getType(): string; + getType(): string; - getCoordinates(): number[] | null; + getCoordinates(): number[] | null; - setCoordinates(coordinates: number[] | null): this; - } - } + setCoordinates(coordinates: number[] | null): this; + } + } - namespace geoObject { - class Balloon implements IBalloonManager { //tslint:disable-line no-shadowed-variable - constructor(geoObject: GeoObject); + namespace geoObject { + class Balloon implements IBalloonManager { //tslint:disable-line no-shadowed-variable + constructor(geoObject: GeoObject); - events: IEventManager; + events: IEventManager; - autoPan(): Promise; + autoPan(): Promise; - close(force?: boolean): Promise; + close(force?: boolean): Promise; - destroy(): void; + destroy(): void; - getData(): object | null; + getData(): object | null; - getOptions(): IOptionManager | null; + getOptions(): IOptionManager | null; - getOverlay(): Promise; + getOverlay(): Promise; - getOverlaySync(): IOverlay | null; + getOverlaySync(): IOverlay | null; - getPosition(): number[] | null; + getPosition(): number[] | null; - isOpen(): boolean; + isOpen(): boolean; - open(position?: number[], data?: object | string | HTMLElement, options?: object): Promise; + open(position?: number[], data?: object | string | HTMLElement, options?: object): Promise; - setData(data: object | string | HTMLElement): Promise; + setData(data: object | string | HTMLElement): Promise; - setOptions(options: object): Promise; + setOptions(options: object): Promise; - setPosition(position: number[]): Promise; - } + setPosition(position: number[]): Promise; + } - class Hint implements IHintManager { - constructor(geoObject: GeoObject); + class Hint implements IHintManager { + constructor(geoObject: GeoObject); - events: IEventManager; + events: IEventManager; - close(force?: boolean): Promise; + close(force?: boolean): Promise; - destroy(): void; + destroy(): void; - getData(): object | null; + getData(): object | null; - getOptions(): IOptionManager | null; + getOptions(): IOptionManager | null; - getOverlay(): Promise; + getOverlay(): Promise; - getOverlaySync(): IOverlay | null; + getOverlaySync(): IOverlay | null; - getPosition(): number[] | null; + getPosition(): number[] | null; - isOpen(): boolean; + isOpen(): boolean; - open(position?: number[], data?: object | string | HTMLElement, options?: object): Promise; + open(position?: number[], data?: object | string | HTMLElement, options?: object): Promise; - setData(data: object | string | HTMLElement): Promise; + setData(data: object | string | HTMLElement): Promise; - setOptions(options: object): Promise; + setOptions(options: object): Promise; - setPosition(position: number[]): Promise; - } + setPosition(position: number[]): Promise; + } - class Sequence implements IGeoObject, IGeoObjectSequence { - constructor(geoObject: GeoObject); + class Sequence implements IGeoObject, IGeoObjectSequence { + constructor(geoObject: GeoObject); - geometry: IGeometry | null; - properties: IDataManager; - state: IDataManager; - events: IEventManager; - options: IOptionManager; + geometry: IGeometry | null; + properties: IDataManager; + state: IDataManager; + events: IEventManager; + options: IOptionManager; - getOverlay(): Promise; + getOverlay(): Promise; - getOverlaySync(): IOverlay | null; + getOverlaySync(): IOverlay | null; - getParent(): null | IControlParent; + getParent(): null | IControlParent; - setParent(parent: IControlParent): this; + setParent(parent: IControlParent): this; - getMap(): Map; + getMap(): Map; - each(callback: (geoObject: IGeoObject) => void, context?: object): void; + each(callback: (geoObject: IGeoObject) => void, context?: object): void; - get(index: number): IGeoObject; + get(index: number): IGeoObject; - getBounds(): number[][] | null; + getBounds(): number[][] | null; - getIterator(): IIterator; + getIterator(): IIterator; - getLength(): number; + getLength(): number; - getPixelBounds(): number[][] | null; + getPixelBounds(): number[][] | null; - indexOf(geoObject: IGeoObject): number; - } - } + indexOf(geoObject: IGeoObject): number; + } + } - namespace layout { - namespace templateBased { - class Base implements ILayout { - constructor(data: object); + namespace layout { + namespace templateBased { + class Base implements ILayout { + constructor(data: object); - events: IEventManager; + events: IEventManager; - destroy(): void; + destroy(): void; - getData(): object; + getData(): object; - getParentElement(): HTMLElement; + getParentElement(): HTMLElement; - getShape(): IShape | null; + getShape(): IShape | null; - isEmpty(): boolean; + isEmpty(): boolean; - setData(data: object): void; + setData(data: object): void; - setParentElement(parent: HTMLElement | null): this; + setParentElement(parent: HTMLElement | null): this; - build(): void; + build(): void; - clear(): void; + clear(): void; - onSublayoutSizeChange(sublayoutInfo: object, nodeSizeByContent: object): void; + onSublayoutSizeChange(sublayoutInfo: object, nodeSizeByContent: object): void; - rebuild(): void; - } - } - } + rebuild(): void; + } + } + } - namespace map { - namespace action { - class Manager implements IEventEmitter { - constructor(map: Map); + namespace map { + namespace action { + class Manager implements IEventEmitter { + constructor(map: Map); - events: IEventManager; + events: IEventManager; - breakTick(): void; + breakTick(): void; - execute(action: IMapAction): void; + execute(action: IMapAction): void; - getCurrentState(): object; + getCurrentState(): object; - getMap(): Map; + getMap(): Map; - setCorrection(userFunction: () => void): void; + setCorrection(userFunction: () => void): void; - stop(): void; - } - } + stop(): void; + } + } - namespace behavior { // tslint:disable-line no-shadowed-variable - class Manager implements ICustomizable, IEventEmitter, IParentOnMap { - constructor(map: Map, behaviors?: string[][] | string[], options?: object); + namespace behavior { // tslint:disable-line no-shadowed-variable + class Manager implements ICustomizable, IEventEmitter, IParentOnMap { + constructor(map: Map, behaviors?: string[][] | string[], options?: object); - options: IOptionManager; - events: IEventManager; + options: IOptionManager; + events: IEventManager; - getMap(): Map; + getMap(): Map; - disable(behaviors: string[][] | string[] | string): this; + disable(behaviors: string[][] | string[] | string): this; - enable(behaviors: string[][] | string[] | string): this; + enable(behaviors: string[][] | string[] | string): this; - get(behaviorName: string): IBehavior; + get(behaviorName: string): IBehavior; - isEnabled(behaviorName: string): boolean; - } - } + isEnabled(behaviorName: string): boolean; + } + } - namespace layer { - class Manager implements ILayer, IMapObjectCollection { - constructor(map: Map, options?: { - trafficImageZIndex?: number; - trafficInfoZIndex?: number; - trafficJamZIndex?: number; - }); + namespace layer { + class Manager implements ILayer, IMapObjectCollection { + constructor(map: Map, options?: { + trafficImageZIndex?: number; + trafficInfoZIndex?: number; + trafficJamZIndex?: number; + }); - events: IEventManager; - options: IOptionManager; + events: IEventManager; + options: IOptionManager; - getParent(): null | IControlParent; + getParent(): null | IControlParent; - setParent(parent: IControlParent): this; + setParent(parent: IControlParent): this; - add(object: object): this; + add(object: object): this; - getIterator(): IIterator; + getIterator(): IIterator; - remove(object: object): this; + remove(object: object): this; - getMap(): Map; - } - } + getMap(): Map; + } + } - namespace margin { - class Accessor { - constructor(screenArea: object); + namespace margin { + class Accessor { + constructor(screenArea: object); - getArea(): object; + getArea(): object; - remove(): this; + remove(): this; - setArea(screenArea: object): this; - } + setArea(screenArea: object): this; + } - class Manager { - constructor(map: Map); + class Manager { + constructor(map: Map); - addArea(screenArea: object): Accessor; + addArea(screenArea: object): Accessor; - destroy(): this; + destroy(): this; - getMargin(): number[]; + getMargin(): number[]; - getOffset(): number[]; + getOffset(): number[]; - setDefaultMargin(margin: number[][] | number[] | number): void; - } - } + setDefaultMargin(margin: number[][] | number[] | number): void; + } + } - namespace pane { - class Manager { - constructor(map: Map); + namespace pane { + class Manager { + constructor(map: Map); - append(key: string, pane: IPane): void; + append(key: string, pane: IPane): void; - destroy(): void; + destroy(): void; - get(key: string): IPane | null; + get(key: string): IPane | null; - getLower(): string; + getLower(): string; - getUpper(): string; + getUpper(): string; - insertBefore(key: string, pane: IPane, referenceKey: string): void; + insertBefore(key: string, pane: IPane, referenceKey: string): void; - remove(pane: IPane): void; - } - } + remove(pane: IPane): void; + } + } - class Balloon implements IBalloonManager/*, IBalloonSharingManager*/ { //tslint:disable-line no-shadowed-variable - constructor(map: Map); + class Balloon implements IBalloonManager/*, IBalloonSharingManager*/ { //tslint:disable-line no-shadowed-variable + constructor(map: Map); - events: IEventManager; + events: IEventManager; - autoPan(): Promise; + autoPan(): Promise; - close(force?: boolean): Promise; + close(force?: boolean): Promise; - destroy(): void; + destroy(): void; - getData(): object | null; + getData(): object | null; - getOptions(): IOptionManager | null; + getOptions(): IOptionManager | null; - getOverlay(): Promise; + getOverlay(): Promise; - getOverlaySync(): IOverlay | null; + getOverlaySync(): IOverlay | null; - getPosition(): number[] | null; + getPosition(): number[] | null; - isOpen(): boolean; + isOpen(): boolean; - open(position?: number[], data?: object | string | HTMLElement, options?: object): Promise; + open(position?: number[], data?: object | string | HTMLElement, options?: object): Promise; - setData(data: object | string | HTMLElement): Promise; + setData(data: object | string | HTMLElement): Promise; - setOptions(options: object): Promise; + setOptions(options: object): Promise; - setPosition(position: number[]): Promise; - } + setPosition(position: number[]): Promise; + } - class Container implements IDomEventEmitter { - constructor(parentElement: string | HTMLElement); + class Container implements IDomEventEmitter { + constructor(parentElement: string | HTMLElement); - events: IEventManager; + events: IEventManager; - enterFullscreen(): void; + enterFullscreen(): void; - exitFullscreen(): void; + exitFullscreen(): void; - fitToViewport(preservePixelPosition?: boolean): void; + fitToViewport(preservePixelPosition?: boolean): void; - getElement(): HTMLElement; + getElement(): HTMLElement; - getOffset(): number[]; + getOffset(): number[]; - getParentElement(): HTMLElement; + getParentElement(): HTMLElement; - getSize(): number[]; + getSize(): number[]; - isFullscreen(): boolean; - } + isFullscreen(): boolean; + } - class Converter { - constructor(map: Map); + class Converter { + constructor(map: Map); - globalToPage(globalPixelPoint: number[]): number[]; + globalToPage(globalPixelPoint: number[]): number[]; - pageToGlobal(pagePixelPoint: number[]): number[]; - } + pageToGlobal(pagePixelPoint: number[]): number[]; + } - class Copyrights { - constructor(map: Map); + class Copyrights { + constructor(map: Map); - add(customCopyrights: string | HTMLElement | Array): ICopyrightsAccessor; + add(customCopyrights: string | HTMLElement | Array): ICopyrightsAccessor; - addProvider(provider: ICopyrightsProvider): this; + addProvider(provider: ICopyrightsProvider): this; - get(point?: number[], zoom?: number): Promise>; + get(point?: number[], zoom?: number): Promise>; - getPromoLink(): string; + getPromoLink(): string; - removeProvider(provider: ICopyrightsProvider): this; - } + removeProvider(provider: ICopyrightsProvider): this; + } - class GeoObjects implements IGeoObjectCollection { - constructor(map: Map, options?: object); + class GeoObjects implements IGeoObjectCollection { + constructor(map: Map, options?: object); - options: IOptionManager; - events: IEventManager; + options: IOptionManager; + events: IEventManager; - add(child: IGeoObject, index?: number): this; + add(child: IGeoObject, index?: number): this; - each(callback: (object: IGeoObject) => void, context: object): void; + each(callback: (object: IGeoObject) => void, context: object): void; - get(index: number): IGeoObject; + get(index: number): IGeoObject; - getBounds(): number[][] | null; + getBounds(): number[][] | null; - getIterator(): IIterator; + getIterator(): IIterator; - getLength(): number; + getLength(): number; - getPixelBounds(): number[][] | null; + getPixelBounds(): number[][] | null; - indexOf(object: IGeoObject): number; + indexOf(object: IGeoObject): number; - remove(child: IGeoObject): this; + remove(child: IGeoObject): this; - removeAll(): this; + removeAll(): this; - set(index: number, child: IGeoObject): this; + set(index: number, child: IGeoObject): this; - splice(index: number, length: number): this; + splice(index: number, length: number): this; - getMap(): Map; - } + getMap(): Map; + } - class Hint implements IHintManager/*, IHintSharingManager*/ { - constructor(map: Map); + class Hint implements IHintManager/*, IHintSharingManager*/ { + constructor(map: Map); - events: IEventManager; + events: IEventManager; - close(force?: boolean): Promise; + close(force?: boolean): Promise; - destroy(): void; + destroy(): void; - getData(): object | null; + getData(): object | null; - getOptions(): IOptionManager | null; + getOptions(): IOptionManager | null; - getOverlay(): Promise; + getOverlay(): Promise; - getOverlaySync(): IOverlay | null; + getOverlaySync(): IOverlay | null; - getPosition(): number[] | null; + getPosition(): number[] | null; - isOpen(): boolean; + isOpen(): boolean; - open(position?: number[], data?: object | string | HTMLElement, options?: object): Promise; + open(position?: number[], data?: object | string | HTMLElement, options?: object): Promise; - setData(data: object | string | HTMLElement): Promise; + setData(data: object | string | HTMLElement): Promise; - setOptions(options: object): Promise; + setOptions(options: object): Promise; - setPosition(position: number[]): Promise; - } + setPosition(position: number[]): Promise; + } - class ZoomRange implements IEventEmitter { - constructor(map: Map, constraints: number[]); + class ZoomRange implements IEventEmitter { + constructor(map: Map, constraints: number[]); - events: IEventManager; + events: IEventManager; - get(coords?: number[]): Promise; + get(coords?: number[]): Promise; - getCurrent(): number[]; - } - } + getCurrent(): number[]; + } + } - namespace multiRouter { - namespace driving { - class Path implements IGeoObject { - geometry: IGeometry | null; - properties: data.Manager; - state: IDataManager; - model: PathModel; - events: IEventManager; - options: IOptionManager; + namespace multiRouter { + namespace driving { + class Path implements IGeoObject { + geometry: IGeometry | null; + properties: data.Manager; + state: IDataManager; + model: PathModel; + events: IEventManager; + options: IOptionManager; - getOverlay(): Promise; + getOverlay(): Promise; - getOverlaySync(): IOverlay | null; + getOverlaySync(): IOverlay | null; - getParent(): object | null; + getParent(): object | null; - setParent(parent: object): this; + setParent(parent: object): this; - getMap(): Map; + getMap(): Map; - getSegments(): GeoObjectCollection; - } + getSegments(): GeoObjectCollection; + } - class PathModel implements IEventEmitter { - events: IEventManager; - properties: data.Manager; - route: RouteModel; + class PathModel implements IEventEmitter { + events: IEventManager; + properties: data.Manager; + route: RouteModel; - destroy(): void; + destroy(): void; - getSegments(): SegmentModel[]; + getSegments(): SegmentModel[]; - getType(): string; + getType(): string; - update(pathJson: object): void; - } + update(pathJson: object): void; + } - class Route implements IGeoObject { - geometry: IGeometry | null; - properties: IDataManager; - state: IDataManager; - events: IEventManager; - options: IOptionManager; + class Route implements IGeoObject { + geometry: IGeometry | null; + properties: IDataManager; + state: IDataManager; + events: IEventManager; + options: IOptionManager; - getOverlay(): Promise; + getOverlay(): Promise; - getOverlaySync(): IOverlay | null; + getOverlaySync(): IOverlay | null; - getParent(): object | null; + getParent(): object | null; - setParent(parent: object): this; + setParent(parent: object): this; - getMap(): Map; + getMap(): Map; - getPaths(): GeoObjectCollection; - } + getPaths(): GeoObjectCollection; + } - class RouteModel implements IEventEmitter { - events: IEventManager; - multiRoute: MultiRouteModel; - properties: data.Manager; + class RouteModel implements IEventEmitter { + events: IEventManager; + multiRoute: MultiRouteModel; + properties: data.Manager; - destroy(): void; + destroy(): void; - getPaths(): PathModel[]; + getPaths(): PathModel[]; - update(routeJson: object): void; + update(routeJson: object): void; - getType(): string; - } + getType(): string; + } - class Segment implements IGeoObject { - geometry: IGeometry | null; - properties: data.Manager; - state: IDataManager; - events: IEventManager; - options: IOptionManager; + class Segment implements IGeoObject { + geometry: IGeometry | null; + properties: data.Manager; + state: IDataManager; + events: IEventManager; + options: IOptionManager; - getOverlay(): Promise; + getOverlay(): Promise; - getOverlaySync(): IOverlay | null; + getOverlaySync(): IOverlay | null; - getParent(): object | null; + getParent(): object | null; - setParent(parent: object): this; + setParent(parent: object): this; - getMap(): Map; - } + getMap(): Map; + } - class SegmentModel implements IEventEmitter { - events: IEventManager; - geometry: geometry.base.LineString; - path: PathModel; + class SegmentModel implements IEventEmitter { + events: IEventManager; + geometry: geometry.base.LineString; + path: PathModel; - destroy(): void; + destroy(): void; - getType(): string; + getType(): string; - getViaPoints(): ViaPointModel[]; + getViaPoints(): ViaPointModel[]; - update(segmentJson: object): void; - } - } + update(segmentJson: object): void; + } + } - namespace masstransit { - class Path implements IGeoObject { - geometry: IGeometry | null; - properties: data.Manager; - state: IDataManager; - events: IEventManager; - options: IOptionManager; - model: PathModel; + namespace masstransit { + class Path implements IGeoObject { + geometry: IGeometry | null; + properties: data.Manager; + state: IDataManager; + events: IEventManager; + options: IOptionManager; + model: PathModel; - getOverlay(): Promise; + getOverlay(): Promise; - getOverlaySync(): IOverlay | null; + getOverlaySync(): IOverlay | null; - getParent(): object | null; + getParent(): object | null; - setParent(parent: object): this; + setParent(parent: object): this; - getMap(): Map; + getMap(): Map; - getSegmentMarkers(): GeoObjectCollection; + getSegmentMarkers(): GeoObjectCollection; - getSegments(): GeoObjectCollection; - } + getSegments(): GeoObjectCollection; + } - class PathModel implements IEventEmitter { - events: IEventManager; - properties: data.Manager; - route: RouteModel; + class PathModel implements IEventEmitter { + events: IEventManager; + properties: data.Manager; + route: RouteModel; - destroy(): void; + destroy(): void; - getSegments(): Array; + getSegments(): Array; - getType(): string; + getType(): string; - update(pathJson: object): void; - } + update(pathJson: object): void; + } - class Route implements IGeoObject { - geometry: IGeometry | null; - properties: data.Manager; - model: RouteModel; - state: IDataManager; - events: IEventManager; - options: IOptionManager; + class Route implements IGeoObject { + geometry: IGeometry | null; + properties: data.Manager; + model: RouteModel; + state: IDataManager; + events: IEventManager; + options: IOptionManager; - getOverlay(): Promise; + getOverlay(): Promise; - getOverlaySync(): IOverlay | null; + getOverlaySync(): IOverlay | null; - getParent(): object | null; + getParent(): object | null; - setParent(parent: object): this; + setParent(parent: object): this; - getMap(): Map; + getMap(): Map; - getPaths(): GeoObjectCollection; - } + getPaths(): GeoObjectCollection; + } - class RouteModel implements IEventEmitter { - events: IEventManager; - multiRoute: MultiRouteModel; - properties: data.Manager; + class RouteModel implements IEventEmitter { + events: IEventManager; + multiRoute: MultiRouteModel; + properties: data.Manager; - destroy(): void; + destroy(): void; - getPaths(): PathModel[]; + getPaths(): PathModel[]; - getType(): string; + getType(): string; - update(routeJson: object): void; - } + update(routeJson: object): void; + } - class StopModel implements IEventEmitter { - events: IEventManager; - geometry: geometry.base.Point; - properties: data.Manager; - segment: TransportSegmentModel; + class StopModel implements IEventEmitter { + events: IEventManager; + geometry: geometry.base.Point; + properties: data.Manager; + segment: TransportSegmentModel; - update(stopJson: object): void; - } + update(stopJson: object): void; + } - class TransferSegment implements IGeoObject { - geometry: IGeometry | null; - properties: data.Manager; - state: IDataManager; - events: IEventManager; - options: IOptionManager; - model: TransferSegmentModel; + class TransferSegment implements IGeoObject { + geometry: IGeometry | null; + properties: data.Manager; + state: IDataManager; + events: IEventManager; + options: IOptionManager; + model: TransferSegmentModel; - getOverlay(): Promise; + getOverlay(): Promise; - getOverlaySync(): IOverlay | null; + getOverlaySync(): IOverlay | null; - getParent(): object | null; + getParent(): object | null; - setParent(parent: object): this; + setParent(parent: object): this; - getMap(): Map; - } + getMap(): Map; + } - class TransferSegmentModel implements IEventEmitter { - events: IEventManager; - geometry: geometry.base.LineString; - path: PathModel; - properties: data.Manager; + class TransferSegmentModel implements IEventEmitter { + events: IEventManager; + geometry: geometry.base.LineString; + path: PathModel; + properties: data.Manager; - destroy(segmentJson: object): void; + destroy(segmentJson: object): void; - getType(): string; - } + getType(): string; + } - class TransportSegment implements IGeoObject { - geometry: IGeometry | null; - properties: data.Manager; - state: IDataManager; - events: IEventManager; - options: IOptionManager; - model: TransportSegmentModel; + class TransportSegment implements IGeoObject { + geometry: IGeometry | null; + properties: data.Manager; + state: IDataManager; + events: IEventManager; + options: IOptionManager; + model: TransportSegmentModel; - getOverlay(): Promise; + getOverlay(): Promise; - getOverlaySync(): IOverlay | null; + getOverlaySync(): IOverlay | null; - getParent(): object | null; + getParent(): object | null; - setParent(parent: object): this; + setParent(parent: object): this; - getMap(): Map; - } + getMap(): Map; + } - class TransportSegmentModel implements IEventEmitter { - events: IEventManager; - geometry: geometry.base.LineString; - path: PathModel; - properties: data.Manager; + class TransportSegmentModel implements IEventEmitter { + events: IEventManager; + geometry: geometry.base.LineString; + path: PathModel; + properties: data.Manager; - destroy(): void; + destroy(): void; - getStops(): StopModel[]; + getStops(): StopModel[]; - getType(): string; + getType(): string; - update(segmentJson: object): void; - } + update(segmentJson: object): void; + } - class WalkSegment implements IGeoObject { - geometry: IGeometry | null; - properties: data.Manager; - state: IDataManager; - events: IEventManager; - options: IOptionManager; - model: WalkSegmentModel; + class WalkSegment implements IGeoObject { + geometry: IGeometry | null; + properties: data.Manager; + state: IDataManager; + events: IEventManager; + options: IOptionManager; + model: WalkSegmentModel; - getOverlay(): Promise; + getOverlay(): Promise; - getOverlaySync(): IOverlay | null; + getOverlaySync(): IOverlay | null; - getParent(): object | null; + getParent(): object | null; - setParent(parent: object): this; + setParent(parent: object): this; - getMap(): Map; - } + getMap(): Map; + } - class WalkSegmentModel implements IEventEmitter { - events: IEventManager; - geometry: geometry.base.LineString; - path: PathModel; - properties: data.Manager; + class WalkSegmentModel implements IEventEmitter { + events: IEventManager; + geometry: geometry.base.LineString; + path: PathModel; + properties: data.Manager; - destroy(): void; + destroy(): void; - getType(): string; - } - } + getType(): string; + } + } - class EditorAddon implements ICustomizable, IEventEmitter { - options: IOptionManager; - events: IEventManager; - state: data.Manager; + class EditorAddon implements ICustomizable, IEventEmitter { + options: IOptionManager; + events: IEventManager; + state: data.Manager; - isActive(): boolean; + isActive(): boolean; - start(state: object): void; + start(state: object): void; - stop(): void; - } + stop(): void; + } - class MultiRoute implements IGeoObject { - constructor(model: MultiRouteModel | IMultiRouteModelJson, options?: { - activeRouteAutoSelection?: boolean; - boundsAutoApply?: boolean; - dragUpdateInterval?: string | number; - preventDragUpdate?: boolean; - useMapMargin?: boolean; - zoomMargin?: number[][] | number[] | number; - [index: string]: any; - }); + class MultiRoute implements IGeoObject { + constructor(model: MultiRouteModel | IMultiRouteModelJson, options?: { + activeRouteAutoSelection?: boolean; + boundsAutoApply?: boolean; + dragUpdateInterval?: string | number; + preventDragUpdate?: boolean; + useMapMargin?: boolean; + zoomMargin?: number[][] | number[] | number; + [index: string]: any; + }); - editor: EditorAddon; - model: MultiRouteModel; - geometry: IGeometry | null; - properties: IDataManager; - state: IDataManager; - events: IEventManager; - options: IOptionManager; + editor: EditorAddon; + model: MultiRouteModel; + geometry: IGeometry | null; + properties: IDataManager; + state: IDataManager; + events: IEventManager; + options: IOptionManager; - getOverlay(): Promise; + getOverlay(): Promise; - getOverlaySync(): IOverlay | null; + getOverlaySync(): IOverlay | null; - getParent(): object | null; + getParent(): object | null; - setParent(parent: object): this; + setParent(parent: object): this; - getMap(): Map; + getMap(): Map; - getActiveRoute(): driving.Route | masstransit.Route | null; + getActiveRoute(): driving.Route | masstransit.Route | null; - getBounds(): number[][] | null; + getBounds(): number[][] | null; - getPixelBounds(): number[][] | null; + getPixelBounds(): number[][] | null; - getRoutes(): GeoObjectCollection; + getRoutes(): GeoObjectCollection; - getViaPoints(): GeoObjectCollection; + getViaPoints(): GeoObjectCollection; - getWayPoints(): GeoObjectCollection; + getWayPoints(): GeoObjectCollection; - setActiveRoute(route: driving.Route | masstransit.Route | null): void; - } + setActiveRoute(route: driving.Route | masstransit.Route | null): void; + } - class MultiRouteModel implements IEventEmitter { - constructor(referencePoints: IMultiRouteReferencePoint[], params?: IMultiRouteParams); + class MultiRouteModel implements IEventEmitter { + constructor(referencePoints: IMultiRouteReferencePoint[], params?: IMultiRouteParams); - events: IEventManager; - properties: data.Manager; + events: IEventManager; + properties: data.Manager; - destroy(): void; + destroy(): void; - getAllPoints(): Array; + getAllPoints(): Array; - getJson(): object; + getJson(): object; - getParams(): IMultiRouteParams; + getParams(): IMultiRouteParams; - getPoints(): Array; + getPoints(): Array; - getReferencePointIndexes(): object; + getReferencePointIndexes(): object; - getReferencePoints(): IMultiRouteReferencePoint[]; + getReferencePoints(): IMultiRouteReferencePoint[]; - getRoutes(): driving.RouteModel[] | masstransit.RouteModel[]; + getRoutes(): driving.RouteModel[] | masstransit.RouteModel[]; - getViaPoints(): ViaPointModel[]; + getViaPoints(): ViaPointModel[]; - getWayPoints(): WayPointModel[]; + getWayPoints(): WayPointModel[]; - setParams(params: IMultiRouteParams, extend?: boolean, clearRequests?: boolean): void; + setParams(params: IMultiRouteParams, extend?: boolean, clearRequests?: boolean): void; - setReferencePoints(referencePoints: IMultiRouteReferencePoint[], viaIndexes?: number[], clearRequests?: boolean): void; - } + setReferencePoints(referencePoints: IMultiRouteReferencePoint[], viaIndexes?: number[], clearRequests?: boolean): void; + } - class ViaPoint implements IGeoObject { - geometry: IGeometry | null; - properties: data.Manager; - state: IDataManager; - events: IEventManager; - options: IOptionManager; + class ViaPoint implements IGeoObject { + geometry: IGeometry | null; + properties: data.Manager; + state: IDataManager; + events: IEventManager; + options: IOptionManager; - getOverlay(): Promise; + getOverlay(): Promise; - getOverlaySync(): IOverlay | null; + getOverlaySync(): IOverlay | null; - getParent(): object | null; + getParent(): object | null; - setParent(parent: object): this; + setParent(parent: object): this; - getMap(): Map; - } + getMap(): Map; + } - class ViaPointModel implements IEventEmitter { - events: IEventManager; - geometry: geometry.base.Point; - multiRoute: MultiRouteModel; - properties: data.Manager; + class ViaPointModel implements IEventEmitter { + events: IEventManager; + geometry: geometry.base.Point; + multiRoute: MultiRouteModel; + properties: data.Manager; - destroy(): void; + destroy(): void; - getReferencePoint(): object; + getReferencePoint(): object; - getReferencePointIndex(): number; + getReferencePointIndex(): number; - setReferencePoint(referencePoint: object): void; + setReferencePoint(referencePoint: object): void; - update(viaPointJson: object): void; - } + update(viaPointJson: object): void; + } - class WayPoint implements IGeoObject { - geometry: IGeometry | null; - properties: data.Manager; - state: IDataManager; - events: IEventManager; - options: IOptionManager; - model: WayPointModel; + class WayPoint implements IGeoObject { + geometry: IGeometry | null; + properties: data.Manager; + state: IDataManager; + events: IEventManager; + options: IOptionManager; + model: WayPointModel; - getOverlay(): Promise; + getOverlay(): Promise; - getOverlaySync(): IOverlay | null; + getOverlaySync(): IOverlay | null; - getParent(): object | null; + getParent(): object | null; - setParent(parent: object): this; + setParent(parent: object): this; - getMap(): Map; - } + getMap(): Map; + } - class WayPointModel implements IEventEmitter { - events: IEventManager; - geometry: geometry.base.Point; - multiRoute: MultiRouteModel; - properties: data.Manager; + class WayPointModel implements IEventEmitter { + events: IEventManager; + geometry: geometry.base.Point; + multiRoute: MultiRouteModel; + properties: data.Manager; - destroy(): void; + destroy(): void; - getReferencePoint(): object; + getReferencePoint(): object; - getReferencePointIndex(): number; + getReferencePointIndex(): number; - setReferencePoint(referencePoint: object): void; + setReferencePoint(referencePoint: object): void; - update(wayPointJson: object): void; - } - } + update(wayPointJson: object): void; + } + } - namespace option { - class Manager implements IOptionManager { - constructor(options?: object, parent?: IOptionManager, name?: string); + namespace option { + class Manager implements IOptionManager { + constructor(options?: object, parent?: IOptionManager, name?: string); - events: IEventManager; + events: IEventManager; - get(key: string, defaultValue: object): object; + get(key: string, defaultValue: object): object; - getAll(): object; + getAll(): object; - getName(): string; + getName(): string; - getNative(key: string): object; + getNative(key: string): object; - resolve(key: string, name?: string): object; + resolve(key: string, name?: string): object; - set(key: object | string, value?: object): this; + set(key: object | string, value?: object): this; - unset(keys: string[][] | string[] | string): this; + unset(keys: string[][] | string[] | string): this; - unsetAll(): this; + unsetAll(): this; - setName(name: string): void; + setName(name: string): void; - getParent(): null | IOptionManager; + getParent(): null | IOptionManager; - setParent(parent: IOptionManager): this; + setParent(parent: IOptionManager): this; - freeze(): IFreezable; + freeze(): IFreezable; - isFrozen(): boolean; + isFrozen(): boolean; - unfreeze(): IFreezable; + unfreeze(): IFreezable; - add(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; + add(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; - group(): IEventGroup; + group(): IEventGroup; - remove(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; + remove(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; - fire(type: string, eventobject: object | IEvent): this; - } - } + fire(type: string, eventobject: object | IEvent): this; + } + } - namespace panorama { - class Manager implements IEventEmitter { - events: IEventManager; + namespace panorama { + class Manager implements IEventEmitter { + events: IEventManager; - closePlayer(): void; + closePlayer(): void; - disableLookup(): void; + disableLookup(): void; - enableLookup(): void; + enableLookup(): void; - getPlayer(): Player; + getPlayer(): Player; - isLookupEnabled(): boolean; + isLookupEnabled(): boolean; - openPlayer(panorama: IPanorama[] | number): Promise; - } + openPlayer(panorama: IPanorama[] | number): Promise; + } - class Player implements IEventEmitter { - constructor(element: HTMLElement | string, panorama: IPanorama, options?: { - autoFitToViewport?: "none" | "ifNull" | "always"; - controls?: string[]; - direction?: number[] | string; - hotkeysEnabled?: boolean; - scrollZoomBehavior?: boolean; - span?: number[] | string; - suppressMapOpenBlock?: boolean; - }) + class Player implements IEventEmitter { + constructor(element: HTMLElement | string, panorama: IPanorama, options?: { + autoFitToViewport?: "none" | "ifNull" | "always"; + controls?: string[]; + direction?: number[] | string; + hotkeysEnabled?: boolean; + scrollZoomBehavior?: boolean; + span?: number[] | string; + suppressMapOpenBlock?: boolean; + }) - events: IEventManager; + events: IEventManager; - destroy(): void; + destroy(): void; - fitToViewport(): void; + fitToViewport(): void; - getDirection(): number[]; + getDirection(): number[]; - getPanorama(): IPanorama; + getPanorama(): IPanorama; - getSpan(): number[]; + getSpan(): number[]; - lookAt(point: number[]): this; + lookAt(point: number[]): this; - moveTo(point: number[], options?: { - direction?: number[] | string; - layer?: "yandex#panorama" | "yandex#airPanorama"; - span?: number[] | string; - }): Promise; + moveTo(point: number[], options?: { + direction?: number[] | string; + layer?: "yandex#panorama" | "yandex#airPanorama"; + span?: number[] | string; + }): Promise; - setDirection(direction: number[] | string): this; + setDirection(direction: number[] | string): this; - setPanorama(panorama: IPanorama): this; + setPanorama(panorama: IPanorama): this; - setSpan(span: number[] | string): this; - } - } + setSpan(span: number[] | string): this; + } + } - namespace router { - class Editor implements ICustomizable, IEventEmitter { - options: IOptionManager; - events: IEventManager; + namespace router { + class Editor implements ICustomizable, IEventEmitter { + options: IOptionManager; + events: IEventManager; - start(options?: { - addViaPoints?: boolean; - addWayPoints?: boolean; - editViaPoints?: boolean; - editWayPoints?: boolean; - removeViaPoints?: boolean; - removeWayPoints?: boolean; - }): void; + start(options?: { + addViaPoints?: boolean; + addWayPoints?: boolean; + editViaPoints?: boolean; + editWayPoints?: boolean; + removeViaPoints?: boolean; + removeWayPoints?: boolean; + }): void; - stop(): void; - } + stop(): void; + } - abstract class Route implements IGeoObject { - geometry: IGeometry | null; - properties: IDataManager; - state: IDataManager; - events: IEventManager; - options: IOptionManager; - editor: Editor; + abstract class Route implements IGeoObject { + geometry: IGeometry | null; + properties: IDataManager; + state: IDataManager; + events: IEventManager; + options: IOptionManager; + editor: Editor; - getOverlay(): Promise; + getOverlay(): Promise; - getOverlaySync(): IOverlay | null; + getOverlaySync(): IOverlay | null; - getParent(): null | IControlParent; + getParent(): null | IControlParent; - setParent(parent: IControlParent): this; + setParent(parent: IControlParent): this; - getMap(): Map; + getMap(): Map; - getHumanJamsTime(): string; + getHumanJamsTime(): string; - getHumanLength(): string; + getHumanLength(): string; - getHumanTime(): string; + getHumanTime(): string; - getJamsTime(): number; + getJamsTime(): number; - getLength(): number; + getLength(): number; - getPaths(): GeoObjectCollection; + getPaths(): GeoObjectCollection; - getTime(): number; + getTime(): number; - getViaPoints(): GeoObjectCollection; + getViaPoints(): GeoObjectCollection; - getWayPoints(): GeoObjectCollection; - } - } + getWayPoints(): GeoObjectCollection; + } + } - class Balloon extends Popup implements IBaloon { - constructor(map: Map, options?: IBalloonOptions); + class Balloon extends Popup implements IBaloon { + constructor(map: Map, options?: IBalloonOptions); - getData(): object; + getData(): object; - close(force?: boolean): Promise; + close(force?: boolean): Promise; - getParent(): Balloon | null; + getParent(): Balloon | null; - setParent(parent: Balloon): this; + setParent(parent: Balloon): this; - autoPan(): Promise; + autoPan(): Promise; - freeze(): IFreezable; + freeze(): IFreezable; - isFrozen(): boolean; + isFrozen(): boolean; - unfreeze(): IFreezable; + unfreeze(): IFreezable; - add(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; + add(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; - group(): IEventGroup; + group(): IEventGroup; - remove(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; + remove(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; - fire(type: string, eventobject: object | IEvent): this; - } + fire(type: string, eventobject: object | IEvent): this; + } - interface IBalloonOptions { - autoPan?: boolean; - autoPanCheckZoomRange?: boolean; - autoPanDuration?: number; - autoPanMargin?: number[][] | number[] | number; - autoPanUseMapMargin?: boolean; - closeButton?: boolean; - contentLayout?: IClassConstructor | string; - layout?: IClassConstructor | string; - maxHeight?: number; - maxWidth?: number; - minHeight?: number; - minWidth?: number; - offset?: number[]; - pane?: string; - panelContentLayout?: IClassConstructor | string; - panelMaxHeightRatio?: number; - panelMaxMapArea?: number; - shadow?: boolean; - shadowLayout?: IClassConstructor | string; - shadowOffset?: number[]; - } - - class Circle implements GeoObject { - constructor(geometry: ICircleGeometry[][][][] | number[][] | object, properties?: object | IDataManager, options?: ICircleOptions) - - balloon: geoObject.Balloon; - editor: IGeometryEditor; - hint: geoObject.Hint; - events: event.Manager; - options: option.Manager; - properties: data.Manager; - state: data.Manager; + interface IBalloonOptions { + autoPan?: boolean; + autoPanCheckZoomRange?: boolean; + autoPanDuration?: number; + autoPanMargin?: number[][] | number[] | number; + autoPanUseMapMargin?: boolean; + closeButton?: boolean; + contentLayout?: IClassConstructor | string; + layout?: IClassConstructor | string; + maxHeight?: number; + maxWidth?: number; + minHeight?: number; + minWidth?: number; + offset?: number[]; + pane?: string; + panelContentLayout?: IClassConstructor | string; + panelMaxHeightRatio?: number; + panelMaxMapArea?: number; + shadow?: boolean; + shadowLayout?: IClassConstructor | string; + shadowOffset?: number[]; + } + + class Circle implements GeoObject { + constructor(geometry: ICircleGeometry[][][][] | number[][] | object, properties?: object | IDataManager, options?: ICircleOptions) + + balloon: geoObject.Balloon; + editor: IGeometryEditor; + hint: geoObject.Hint; + events: event.Manager; + options: option.Manager; + properties: data.Manager; + state: data.Manager; - geometry: IGeometry | null; - indices: ArrayBuffer; - vertices: ArrayBuffer; + geometry: IGeometry | null; + indices: ArrayBuffer; + vertices: ArrayBuffer; - getOverlay(): Promise; + getOverlay(): Promise; - getOverlaySync(): IOverlay | null; + getOverlaySync(): IOverlay | null; - getParent(): null | IControlParent; + getParent(): null | IControlParent; - setParent(parent: IControlParent): this; + setParent(parent: IControlParent): this; - getMap(): Map; - } + getMap(): Map; + } - interface ICircleOptions { - circleOverlay?: string | ((geometry: IPixelCircleGeometry, data: object, options: object) => Promise); - cursor?: string; - draggable?: boolean; - fill?: boolean; - fillColor?: string; - fillImageHref?: string; - fillMethod?: "stretch" | "tile"; - fillOpacity?: number; - hasBalloon?: boolean; - hasHint?: boolean; - hideIconOnBalloonOpen?: boolean; - interactiveZIndex?: boolean; - interactivityModel?: InteractivityModelKey; - opacity?: number; - openBalloonOnClick?: boolean; - openEmptyBalloon?: boolean; - openEmptyHint?: boolean; - openHintOnHover?: boolean; - outline?: boolean; - pane?: string; - strokeColor?: string[][] | string[] | string; - strokeOpacity?: number[][] | number[] | number; - strokeStyle?: string[][][] | object[][] | string[] | object[] | string | object; - strokeWidth?: number[][] | number[] | number; - syncOverlayInit?: boolean; - useMapMarginInDragging?: boolean; - visible?: boolean; - zIndex?: number; - zIndexActive?: number; - zIndexDrag?: number; - zIndexHover?: number; - } - - class Clusterer implements IChildOnMap, ICustomizable, IEventEmitter, IParentOnMap { - constructor(options?: IClustererOptions); - - events: IEventManager; - options: IOptionManager; - balloon: clusterer.Balloon; - // balloonopen: - hint: clusterer.Hint; - - getParent(): null | IControlParent; - - setParent(parent: IControlParent): this; - - // balloonclose: - - getMap(): Map; - } - - interface IClustererOptions { - gridSize?: number; - groupByCoordinates?: boolean; - hasBalloon?: boolean; - hasHint?: boolean; - margin?: number[][] | number[] | number; - maxZoom?: number[] | number; - minClusterSize?: number; - preset?: PresetKey; - showInAlphabeticalOrder?: boolean; - useMapMargin?: boolean; - viewportMargin?: number[][] | number[] | number; - zoomMargin?: number[][] | number[] | number; - } - - class ClusterPlacemark implements IGeoObject, collection.Item { - constructor(geometry: number[] | object | IPointGeometry, properties: IClusterPlacemarkProperties, options?: IClusterPlacemarkOptions); + interface ICircleOptions { + circleOverlay?: string | ((geometry: IPixelCircleGeometry, data: object, options: object) => Promise); + cursor?: string; + draggable?: boolean; + fill?: boolean; + fillColor?: string; + fillImageHref?: string; + fillMethod?: "stretch" | "tile"; + fillOpacity?: number; + hasBalloon?: boolean; + hasHint?: boolean; + hideIconOnBalloonOpen?: boolean; + interactiveZIndex?: boolean; + interactivityModel?: InteractivityModelKey; + opacity?: number; + openBalloonOnClick?: boolean; + openEmptyBalloon?: boolean; + openEmptyHint?: boolean; + openHintOnHover?: boolean; + outline?: boolean; + pane?: string; + strokeColor?: string[][] | string[] | string; + strokeOpacity?: number[][] | number[] | number; + strokeStyle?: string[][][] | object[][] | string[] | object[] | string | object; + strokeWidth?: number[][] | number[] | number; + syncOverlayInit?: boolean; + useMapMarginInDragging?: boolean; + visible?: boolean; + zIndex?: number; + zIndexActive?: number; + zIndexDrag?: number; + zIndexHover?: number; + } + + class Clusterer implements IChildOnMap, ICustomizable, IEventEmitter, IParentOnMap { + constructor(options?: IClustererOptions); + + events: IEventManager; + options: IOptionManager; + balloon: clusterer.Balloon; + // balloonopen: + hint: clusterer.Hint; + + getParent(): null | IControlParent; + + setParent(parent: IControlParent): this; + + // balloonclose: + + getMap(): Map; + } + + interface IClustererOptions { + gridSize?: number; + groupByCoordinates?: boolean; + hasBalloon?: boolean; + hasHint?: boolean; + margin?: number[][] | number[] | number; + maxZoom?: number[] | number; + minClusterSize?: number; + preset?: PresetKey; + showInAlphabeticalOrder?: boolean; + useMapMargin?: boolean; + viewportMargin?: number[][] | number[] | number; + zoomMargin?: number[][] | number[] | number; + } + + class ClusterPlacemark implements IGeoObject, collection.Item { + constructor(geometry: number[] | object | IPointGeometry, properties: IClusterPlacemarkProperties, options?: IClusterPlacemarkOptions); - geometry: IGeometry | null; - properties: IDataManager; - events: IEventManager; - options: IOptionManager; - state: data.Manager; + geometry: IGeometry | null; + properties: IDataManager; + events: IEventManager; + options: IOptionManager; + state: data.Manager; - getOverlay(): Promise; + getOverlay(): Promise; - getOverlaySync(): IOverlay | null; + getOverlaySync(): IOverlay | null; - getParent(): null | IControlParent; + getParent(): null | IControlParent; - setParent(parent: IControlParent): this; + setParent(parent: IControlParent): this; - getMap(): Map; + getMap(): Map; - onAddToMap(map: Map): void; + onAddToMap(map: Map): void; - onRemoveFromMap(oldMap: Map): void; + onRemoveFromMap(oldMap: Map): void; - getBounds(): number[][] | null; + getBounds(): number[][] | null; - getGeoObjects(): IGeoObject[]; - } + getGeoObjects(): IGeoObject[]; + } - interface IClusterPlacemarkProperties extends IDataManager { - geoObjects: IGeoObject[]; - } + interface IClusterPlacemarkProperties extends IDataManager { + geoObjects: IGeoObject[]; + } - interface IClusterPlacemarkOptions { - balloonContentLayout?: "cluster#balloonTwoColumns" | "cluster#balloonCarousel" | "cluster#balloonAccordion" | string | IClassConstructor; - balloonContentLayoutHeight?: number; - balloonContentLayoutWidth?: number; - balloonItemContentLayout?: ILayout | string; - balloonPanelContentLayout?: string | IClassConstructor; - cursor?: string; - disableClickZoom?: boolean; - hideIconOnBalloonOpen?: boolean; - iconColor?: string; - iconContentLayout?: string | IClassConstructor; - iconLayout?: string | IClassConstructor; - icons?: Array<{ - href: string; - size: number[]; - ooffset: number[]; - shape?: IShape | IGeometryJson; - }>; - iconShape?: IGeometryJson; - interactivityModel?: InteractivityModelKey; - numbers?: number[]; - openBalloonOnClick?: boolean; - openEmptyHint?: boolean; - openHintOnHover?: boolean; - zIndexHover?: number; - } + interface IClusterPlacemarkOptions { + balloonContentLayout?: "cluster#balloonTwoColumns" | "cluster#balloonCarousel" | "cluster#balloonAccordion" | string | IClassConstructor; + balloonContentLayoutHeight?: number; + balloonContentLayoutWidth?: number; + balloonItemContentLayout?: ILayout | string; + balloonPanelContentLayout?: string | IClassConstructor; + cursor?: string; + disableClickZoom?: boolean; + hideIconOnBalloonOpen?: boolean; + iconColor?: string; + iconContentLayout?: string | IClassConstructor; + iconLayout?: string | IClassConstructor; + icons?: Array<{ + href: string; + size: number[]; + ooffset: number[]; + shape?: IShape | IGeometryJson; + }>; + iconShape?: IGeometryJson; + interactivityModel?: InteractivityModelKey; + numbers?: number[]; + openBalloonOnClick?: boolean; + openEmptyHint?: boolean; + openHintOnHover?: boolean; + zIndexHover?: number; + } - class Collection implements ICollection, collection.Item { - constructor(options?: object); + class Collection implements ICollection, collection.Item { + constructor(options?: object); - events: IEventManager; - options: IOptionManager; + events: IEventManager; + options: IOptionManager; - add(object: object): this; + add(object: object): this; - getIterator(): IIterator; + getIterator(): IIterator; - remove(object: object): this; + remove(object: object): this; - getParent(): null | IControlParent; + getParent(): null | IControlParent; - setParent(parent: IControlParent): this; + setParent(parent: IControlParent): this; - getMap(): Map; + getMap(): Map; - onAddToMap(map: Map): void; + onAddToMap(map: Map): void; - onRemoveFromMap(oldMap: Map): void; + onRemoveFromMap(oldMap: Map): void; - filter(filterFunction: (object: object) => boolean): object[]; + filter(filterFunction: (object: object) => boolean): object[]; - get(index: number): object; + get(index: number): object; - getAll(): object[]; + getAll(): object[]; - getLength(): number; + getLength(): number; - indexOf(childToFind: object): number; + indexOf(childToFind: object): number; - removeAll(): this; - } + removeAll(): this; + } - class Event implements IEvent { - constructor(originalEvent: object, sourceEvent: IEvent); + class Event implements IEvent { + constructor(originalEvent: object, sourceEvent: IEvent); - allowMapEvent(): void; + allowMapEvent(): void; - callMethod(name: string): void; + callMethod(name: string): void; - get(name: string): object; + get(name: string): object; - getSourceEvent(): IEvent | null; + getSourceEvent(): IEvent | null; - isDefaultPrevented(): boolean; + isDefaultPrevented(): boolean; - isImmediatePropagationStopped(): boolean; + isImmediatePropagationStopped(): boolean; - isMapEventAllowed(): boolean; + isMapEventAllowed(): boolean; - isPropagationStopped(): boolean; + isPropagationStopped(): boolean; - preventDefault(): boolean; + preventDefault(): boolean; - stopImmediatePropagation(): boolean; + stopImmediatePropagation(): boolean; - stopPropagation(): boolean; - } + stopPropagation(): boolean; + } - class GeoObject implements IGeoObject { - constructor(feature?: IGeoObjectFeature, options?: IGeoObjectOptions); + class GeoObject implements IGeoObject { + constructor(feature?: IGeoObjectFeature, options?: IGeoObjectOptions); - geometry: IGeometry | null; - balloon: geoObject.Balloon; - editor: IGeometryEditor; - hint: geoObject.Hint; - events: event.Manager; - options: option.Manager; - properties: data.Manager; - state: data.Manager; + geometry: IGeometry | null; + balloon: geoObject.Balloon; + editor: IGeometryEditor; + hint: geoObject.Hint; + events: event.Manager; + options: option.Manager; + properties: data.Manager; + state: data.Manager; - getOverlay(): Promise; + getOverlay(): Promise; - getOverlaySync(): IOverlay | null; + getOverlaySync(): IOverlay | null; - getParent(): null | IControlParent; + getParent(): null | IControlParent; - setParent(parent: IControlParent): this; + setParent(parent: IControlParent): this; - getMap(): Map; - } + getMap(): Map; + } - interface IGeoObjectFeature { - geometry?: IGeometry | IGeometryJson | object; - properties?: IDataManager | object; - } + interface IGeoObjectFeature { + geometry?: IGeometry | IGeometryJson | object; + properties?: IDataManager | object; + } - interface IGeoObjectOptions extends ICircleOptions { - iconCaptionMaxWidth?: number; - iconColor?: string; - iconContentLayout?: string | IClassConstructor; - iconContentOffset?: number[]; - iconContentPadding?: number[]; - iconContentSize?: number[]; - iconImageClipRect?: number[][]; - iconImageHref?: string; - iconImageOffset?: number[]; - iconImageShape?: IShape | null; - iconImageSize?: number[]; - iconLayout?: string | IClassConstructor; - iconMaxHeight?: number; - iconMaxWidth?: number; - iconOffset?: number[]; - iconShadow?: boolean; - iconShadowImageClipRect?: number[][]; - iconShadowImageHref?: string; - iconShadowImageOffset?: number[]; - iconShadowImageSize?: number[]; - iconShadowLayout?: string | IClassConstructor; - iconShadowOffset?: number[]; - lineStringOverlay?: OverlayKey; - pointOverlay?: OverlayKey; - polygonOverlay?: OverlayKey; - preset?: string; - rectangleOverlay?: OverlayKey; - setMapCursorInDragging?: boolean; - } + interface IGeoObjectOptions extends ICircleOptions { + iconCaptionMaxWidth?: number; + iconColor?: string; + iconContentLayout?: string | IClassConstructor; + iconContentOffset?: number[]; + iconContentPadding?: number[]; + iconContentSize?: number[]; + iconImageClipRect?: number[][]; + iconImageHref?: string; + iconImageOffset?: number[]; + iconImageShape?: IShape | null; + iconImageSize?: number[]; + iconLayout?: string | IClassConstructor; + iconMaxHeight?: number; + iconMaxWidth?: number; + iconOffset?: number[]; + iconShadow?: boolean; + iconShadowImageClipRect?: number[][]; + iconShadowImageHref?: string; + iconShadowImageOffset?: number[]; + iconShadowImageSize?: number[]; + iconShadowLayout?: string | IClassConstructor; + iconShadowOffset?: number[]; + lineStringOverlay?: OverlayKey; + pointOverlay?: OverlayKey; + polygonOverlay?: OverlayKey; + preset?: string; + rectangleOverlay?: OverlayKey; + setMapCursorInDragging?: boolean; + } - class GeoObjectCollection implements IGeoObject, IGeoObjectCollection { - constructor(feature?: { - children?: IGeoObject[]; - geometry?: IGeometry | object; - properties?: IDataManager | object; - }, options?: object); + class GeoObjectCollection implements IGeoObject, IGeoObjectCollection { + constructor(feature?: { + children?: IGeoObject[]; + geometry?: IGeometry | object; + properties?: IDataManager | object; + }, options?: object); - geometry: IGeometry | null; - properties: IDataManager; - state: IDataManager; - events: IEventManager; - options: IOptionManager; + geometry: IGeometry | null; + properties: IDataManager; + state: IDataManager; + events: IEventManager; + options: IOptionManager; - getOverlay(): Promise; + getOverlay(): Promise; - getOverlaySync(): IOverlay | null; + getOverlaySync(): IOverlay | null; - getParent(): null | IControlParent; + getParent(): null | IControlParent; - setParent(parent: IControlParent): this; + setParent(parent: IControlParent): this; - getMap(): Map; + getMap(): Map; - add(child: IGeoObject, index?: number): this; + add(child: IGeoObject, index?: number): this; - each(callback: (object: IGeoObject) => void, context: object): void; + each(callback: (object: IGeoObject) => void, context: object): void; - get(index: number): IGeoObject; + get(index: number): IGeoObject; - getBounds(): number[][] | null; + getBounds(): number[][] | null; - getIterator(): IIterator; + getIterator(): IIterator; - getLength(): number; + getLength(): number; - getPixelBounds(): number[][] | null; + getPixelBounds(): number[][] | null; - indexOf(object: IGeoObject): number; + indexOf(object: IGeoObject): number; - remove(child: IGeoObject): this; + remove(child: IGeoObject): this; - removeAll(): this; + removeAll(): this; - set(index: number, child: IGeoObject): this; + set(index: number, child: IGeoObject): this; - splice(index: number, length: number): this; + splice(index: number, length: number): this; - toArray(): IGeoObject[]; - } + toArray(): IGeoObject[]; + } - class Layer implements ILayer, IParentOnMap, IPositioningContext { - constructor(tileUrlTemplate: string | ((tileNumber: number[], tileZoom: number) => string)); + class Layer implements ILayer, IParentOnMap, IPositioningContext { + constructor(tileUrlTemplate: string | ((tileNumber: number[], tileZoom: number) => string)); - events: IEventManager; - options: IOptionManager; + events: IEventManager; + options: IOptionManager; - fromClientPixels(clientPixelPoint: number[]): number[]; + fromClientPixels(clientPixelPoint: number[]): number[]; - getZoom(): number; + getZoom(): number; - toClientPixels(globalPixelPoint: number[]): number[]; + toClientPixels(globalPixelPoint: number[]): number[]; - getParent(): null | IControlParent; + getParent(): null | IControlParent; - setParent(parent: IControlParent): this; + setParent(parent: IControlParent): this; - getMap(): Map; - } + getMap(): Map; + } - class Map implements IDomEventEmitter { - constructor(parentElement: HTMLElement | string, state: IMapState, options?: IMapOptions) + class Map implements IDomEventEmitter { + constructor(parentElement: HTMLElement | string, state: IMapState, options?: IMapOptions) - action: map.action.Manager; - balloon: map.Balloon; - behaviors: map.behavior.Manager; - container: map.Container; - controls: control.Manager; - converter: map.Converter; - copyrights: map.Copyrights; - cursors: util.cursor.Manager; - events: event.Manager; - geoObjects: map.GeoObjects; - hint: map.Hint; - layers: map.layer.Manager; - margin: map.margin.Manager; - options: option.Manager; - panes: map.pane.Manager; - zoomRange: map.ZoomRange; + action: map.action.Manager; + balloon: map.Balloon; + behaviors: map.behavior.Manager; + container: map.Container; + controls: control.Manager; + converter: map.Converter; + copyrights: map.Copyrights; + cursors: util.cursor.Manager; + events: event.Manager; + geoObjects: map.GeoObjects; + hint: map.Hint; + layers: map.layer.Manager; + margin: map.margin.Manager; + options: option.Manager; + panes: map.pane.Manager; + zoomRange: map.ZoomRange; - destroy(): void; + destroy(): void; - getBounds(options?: IMapMarginOptions): number[][]; + getBounds(options?: IMapMarginOptions): number[][]; - getCenter(options?: IMapMarginOptions): number[]; + getCenter(options?: IMapMarginOptions): number[]; - getGlobalPixelCenter(options?: IMapMarginOptions): number[]; + getGlobalPixelCenter(options?: IMapMarginOptions): number[]; - getPanoramaManager(): Promise; + getPanoramaManager(): Promise; - getType(): string | MapType; + getType(): string | MapType; - getZoom(): number; + getZoom(): number; - panTo(center: number[] | object[], options?: IMapPanOptions): Promise; + panTo(center: number[] | object[], options?: IMapPanOptions): Promise; - setBounds(bounds: number[][], options?: IMapBoundsOptions): Promise; + setBounds(bounds: number[][], options?: IMapBoundsOptions): Promise; - setCenter(center: number[], zoom?: number, options?: IMapPositionOptions): Promise; + setCenter(center: number[], zoom?: number, options?: IMapPositionOptions): Promise; - setGlobalPixelCenter(globalPixelCenter: number[], zoom?: number, options?: IMapPositionOptions): Promise; + setGlobalPixelCenter(globalPixelCenter: number[], zoom?: number, options?: IMapPositionOptions): Promise; - setType(type: string | MapType, options?: IMapCheckZoomRangeOptions): Promise; + setType(type: string | MapType, options?: IMapCheckZoomRangeOptions): Promise; - setZoom(zoom: number, options?: IMapZoomOptions): Promise; - } + setZoom(zoom: number, options?: IMapZoomOptions): Promise; + } - interface IMapMarginOptions { - useMapMargin?: boolean; - } + interface IMapMarginOptions { + useMapMargin?: boolean; + } - interface IMapCheckZoomRangeOptions { - checkZoomRange?: boolean; - } + interface IMapCheckZoomRangeOptions { + checkZoomRange?: boolean; + } - interface IMapZoomOptions extends IMapMarginOptions, IMapCheckZoomRangeOptions { - duration?: number; - } + interface IMapZoomOptions extends IMapMarginOptions, IMapCheckZoomRangeOptions { + duration?: number; + } - interface IMapPositionOptions extends IMapZoomOptions { - timingFunction?: string; - } + interface IMapPositionOptions extends IMapZoomOptions { + timingFunction?: string; + } - interface IMapBoundsOptions extends IMapPositionOptions { - preciseZoom?: boolean; - zoomMargin?: number[][] | number[]; - } + interface IMapBoundsOptions extends IMapPositionOptions { + preciseZoom?: boolean; + zoomMargin?: number[][] | number[]; + } - interface IMapPanOptions extends IMapPositionOptions { - delay?: number; - flying?: boolean; - safe?: boolean; - } + interface IMapPanOptions extends IMapPositionOptions { + delay?: number; + flying?: boolean; + safe?: boolean; + } - class MapType { - constructor(name: string, layers: Array | string>) - } + class MapType { + constructor(name: string, layers: Array | string>) + } - interface IMapState { - behaviors?: string[]; - bounds?: number[][]; - center?: number[]; - controls?: string[]; - margin?: number[][] | number[]; - type?: "yandex#map" | "yandex#satellite" | "yandex#hybrid"; - zoom?: number; - } + interface IMapState { + behaviors?: string[]; + bounds?: number[][]; + center?: number[]; + controls?: string[]; + margin?: number[][] | number[]; + type?: "yandex#map" | "yandex#satellite" | "yandex#hybrid"; + zoom?: number; + } - interface IMapOptions { - autoFitToViewport?: "none" | "ifNull" | "always"; - avoidFractionalZoom?: boolean; - exitFullscreenByEsc?: boolean; - fullscreenZIndex?: number; - mapAutoFocus?: boolean; - maxAnimationZoomDifference?: number; - maxZoom?: number; - minZoom?: number; - nativeFullscreen?: boolean; - projection?: IProjection; - restrictMapArea?: boolean; - suppressMapOpenBlock?: boolean; - suppressObsoleteBrowserNotifier?: boolean; - yandexMapAutoSwitch?: boolean; - yandexMapDisablePoiInteractivity?: boolean; - } + interface IMapOptions { + autoFitToViewport?: "none" | "ifNull" | "always"; + avoidFractionalZoom?: boolean; + exitFullscreenByEsc?: boolean; + fullscreenZIndex?: number; + mapAutoFocus?: boolean; + maxAnimationZoomDifference?: number; + maxZoom?: number; + minZoom?: number; + nativeFullscreen?: boolean; + projection?: IProjection; + restrictMapArea?: boolean; + suppressMapOpenBlock?: boolean; + suppressObsoleteBrowserNotifier?: boolean; + yandexMapAutoSwitch?: boolean; + yandexMapDisablePoiInteractivity?: boolean; + } - class Placemark extends GeoObject { - constructor(geometry: number[] | object | IPointGeometry, properties: object | IDataManager, options?: IPlacemarkOptions) - } + class Placemark extends GeoObject { + constructor(geometry: number[] | object | IPointGeometry, properties: object | IDataManager, options?: IPlacemarkOptions) + } - interface IPlacemarkOptions { - cursor?: string; - draggable?: boolean; + interface IPlacemarkOptions { + cursor?: string; + draggable?: boolean; - [index: string]: any; - } + [index: string]: any; + } - class Popup implements IPopup { - constructor(map: Map, options?: IPopupOptions); + class Popup implements IPopup { + constructor(map: Map, options?: IPopupOptions); - options: IOptionManager; - events: IEventManager; + options: IOptionManager; + events: IEventManager; - close(force?: boolean): Promise; + close(force?: boolean): Promise; - getData(): object; + getData(): object; - getOverlay(): Promise; + getOverlay(): Promise; - getOverlaySync(): IOverlay; + getOverlaySync(): IOverlay; - getPosition(): number[]; + getPosition(): number[]; - isOpen(): boolean; + isOpen(): boolean; - open(position: number[], data: object | string | HTMLElement): Promise; + open(position: number[], data: object | string | HTMLElement): Promise; - setData(data: object | string | HTMLElement): Promise; + setData(data: object | string | HTMLElement): Promise; - setPosition(position: number[]): Promise; - } + setPosition(position: number[]): Promise; + } - interface IPopupOptions { - closeTimeout?: number; - interactivityModel?: InteractivityModelKey; - openTimeout?: number; - pane?: IPane | string; - projection?: IProjection; - zIndex?: number; - } + interface IPopupOptions { + closeTimeout?: number; + interactivityModel?: InteractivityModelKey; + openTimeout?: number; + pane?: IPane | string; + projection?: IProjection; + zIndex?: number; + } - function ready(successCallback?: () => any | IReadyobject, errorCallback?: () => any, context?: object): Promise; + function ready(successCallback?: () => any | IReadyobject, errorCallback?: () => any, context?: object): Promise; - interface IReadyobject { - require?: string[]; - context?: object; + interface IReadyobject { + require?: string[]; + context?: object; - successCallback?(): void; + successCallback?(): void; - errorCallback?(): void; - } + errorCallback?(): void; + } - namespace templateLayoutFactory { - function createClass(template: string, overrides?: object, staticMethods?: object): IClassConstructor; - } + namespace templateLayoutFactory { + function createClass(template: string, overrides?: object, staticMethods?: object): IClassConstructor; + } - namespace util { - namespace cursor { - class Accessor { - constructor(key: string); + namespace util { + namespace cursor { + class Accessor { + constructor(key: string); - getKey(): string; + getKey(): string; - remove(): void; + remove(): void; - setKey(): void; - } + setKey(): void; + } - class Manager { - constructor(element: HTMLElement); + class Manager { + constructor(element: HTMLElement); - push(key: string): Accessor; - } - } + push(key: string): Accessor; + } + } - class Storage { - add(key: string, object: object): this; + class Storage { + add(key: string, object: object): this; - get(key: string | object): object | string; + get(key: string | object): object | string; - remove(key: string): object; - } - } + remove(key: string): object; + } + } - /*Interfaces*/ + /*Interfaces*/ - interface IBaloon extends IPopup, ICustomizable, IChild, IFreezable { - autoPan(): Promise; - } + interface IBaloon extends IPopup, ICustomizable, IChild, IFreezable { + autoPan(): Promise; + } - interface IBalloonManager extends IPopupManager { - autoPan(): Promise; - } + interface IBalloonManager extends IPopupManager { + autoPan(): Promise; + } - interface IBaseGeometry extends IEventEmitter { - getBounds(): number[][] | null; + interface IBaseGeometry extends IEventEmitter { + getBounds(): number[][] | null; - getType(): string; - } + getType(): string; + } - interface IBaseLineStringGeometry extends IBaseGeometry, ILineStringGeometryAccess {//tslint:disable-line no-empty-interface no-empty-interfaces - } + interface IBaseLineStringGeometry extends IBaseGeometry, ILineStringGeometryAccess {//tslint:disable-line no-empty-interface no-empty-interfaces + } - interface IBasePointGeometry extends IBaseGeometry, IPointGeometryAccess {//tslint:disable-line no-empty-interface no-empty-interfaces - } + interface IBasePointGeometry extends IBaseGeometry, IPointGeometryAccess {//tslint:disable-line no-empty-interface no-empty-interfaces + } - interface IBehavior extends IChildOnMap, ICustomizable { - disable(): void; + interface IBehavior extends IChildOnMap, ICustomizable { + disable(): void; - enable(): void; + enable(): void; - isEnabled(): boolean; - } + isEnabled(): boolean; + } - interface IChild extends IEventEmitter { - getParent(): object | null; + interface IChild extends IEventEmitter { + getParent(): object | null; - setParent(parent: object | null): this; - } + setParent(parent: object | null): this; + } - interface IChildOnMap extends IChild { //tslint:disable-line no-empty-interface no-empty-interfaces - } + interface IChildOnMap extends IChild { //tslint:disable-line no-empty-interface no-empty-interfaces + } - interface ICircleGeometry extends ICircleGeometryAccess, IGeometry { //tslint:disable-line no-empty-interface no-empty-interfaces - } + interface ICircleGeometry extends ICircleGeometryAccess, IGeometry { //tslint:disable-line no-empty-interface no-empty-interfaces + } - interface ICircleGeometryAccess extends IFreezable { - contains(position: number[]): boolean; + interface ICircleGeometryAccess extends IFreezable { + contains(position: number[]): boolean; - getClosest(anchorPosition: number[]): object; + getClosest(anchorPosition: number[]): object; - getCoordinates(): number[] | null; + getCoordinates(): number[] | null; - getRadius(): number; + getRadius(): number; - setCoordinates(coordinates: number[] | null): this; + setCoordinates(coordinates: number[] | null): this; - setRadius(radius: number): this; - } + setRadius(radius: number): this; + } - interface ICollection extends IEventEmitter { - add(object: object): this; + interface ICollection extends IEventEmitter { + add(object: object): this; - getIterator(): IIterator; + getIterator(): IIterator; - remove(object: object): this; - } + remove(object: object): this; + } - interface IControl extends IChildOnMap { //tslint:disable-line no-empty-interface no-empty-interfaces - // new (options?: object); - } + interface IControl extends IChildOnMap { //tslint:disable-line no-empty-interface no-empty-interfaces + // new (options?: object); + } - interface IControlParent extends IParentOnMap { - getChildElement(child: IControl): Promise; - } + interface IControlParent extends IParentOnMap { + getChildElement(child: IControl): Promise; + } - interface ICoordSystem { - getDistance(point1: number[], point2: number[]): number; + interface ICoordSystem { + getDistance(point1: number[], point2: number[]): number; - solveDirectProblem(startPoint: number[], direction: number[], distance: number): object; + solveDirectProblem(startPoint: number[], direction: number[], distance: number): object; - solveInverseProblem(startPoint: number[], endPoint: number[], reverseDirection?: boolean): object; - } + solveInverseProblem(startPoint: number[], endPoint: number[], reverseDirection?: boolean): object; + } - interface ICopyrightsAccessor extends ICopyrightsProvider { //tslint:disable-line no-empty-interface no-empty-interfaces - } + interface ICopyrightsAccessor extends ICopyrightsProvider { //tslint:disable-line no-empty-interface no-empty-interfaces + } - interface ICopyrightsProvider extends IEventEmitter { - getCopyrights(coords: number[], zoom: number): Promise>; + interface ICopyrightsProvider extends IEventEmitter { + getCopyrights(coords: number[], zoom: number): Promise>; - remove(): void; + remove(): void; - setCopyrights(copyrights: string | HTMLElement | Array): void; - } + setCopyrights(copyrights: string | HTMLElement | Array): void; + } - interface ICustomizable extends IEventEmitter { - options: IOptionManager; - } + interface ICustomizable extends IEventEmitter { + options: IOptionManager; + } - interface IDataManager extends IEventEmitter { - get(path: string, defaultValue: object): object; - } + interface IDataManager extends IEventEmitter { + get(path: string, defaultValue: object): object; + } - interface IDomEventEmitter extends IEventEmitter { //tslint:disable-line no-empty-interface no-empty-interfaces - } + interface IDomEventEmitter extends IEventEmitter { //tslint:disable-line no-empty-interface no-empty-interfaces + } - interface IEvent { - allowMapEvent(): void; + interface IEvent { + allowMapEvent(): void; - callMethod(name: string): void; + callMethod(name: string): void; - get(name: string): object; + get(name: string): object; - getSourceEvent(): IEvent | null; + getSourceEvent(): IEvent | null; - isDefaultPrevented(): boolean; + isDefaultPrevented(): boolean; - isImmediatePropagationStopped(): boolean; + isImmediatePropagationStopped(): boolean; - isMapEventAllowed(): boolean; + isMapEventAllowed(): boolean; - isPropagationStopped(): boolean; + isPropagationStopped(): boolean; - preventDefault(): boolean; + preventDefault(): boolean; - stopImmediatePropagation(): boolean; + stopImmediatePropagation(): boolean; - stopPropagation(): boolean; - } + stopPropagation(): boolean; + } - interface IEventController { - onStartListening?(events: IEventManager, type: string): void; + interface IEventController { + onStartListening?(events: IEventManager, type: string): void; - onStopListening?(events: IEventManager, type: string): void; - } + onStopListening?(events: IEventManager, type: string): void; + } - interface IEventEmitter { - events: IEventManager; - } + interface IEventEmitter { + events: IEventManager; + } - interface IEventGroup { - add(types: string[][] | string[] | string, callback: (event: object | IEvent) => void, context?: object, priority?: number): this; + interface IEventGroup { + add(types: string[][] | string[] | string, callback: (event: object | IEvent) => void, context?: object, priority?: number): this; - remove(types: string[][] | string[] | string, callback: (event: object | IEvent) => void, context?: object, priority?: number): this; + remove(types: string[][] | string[] | string, callback: (event: object | IEvent) => void, context?: object, priority?: number): this; - removeAll(): this; - } + removeAll(): this; + } - interface IEventManager extends IEventTrigger { - add(types: string[][] | string[] | string, callback: (event: object | IEvent) => void, context?: object, priority?: number): this; + interface IEventManager extends IEventTrigger { + add(types: string[][] | string[] | string, callback: (event: object | IEvent) => void, context?: object, priority?: number): this; - getParent(): object | null; + getParent(): object | null; - group(): IEventGroup; + group(): IEventGroup; - //remove(types: string[][] | string[] | string, callback: (event: object | IEvent) => void, context?: object, priority?: number): this; + //remove(types: string[][] | string[] | string, callback: (event: object | IEvent) => void, context?: object, priority?: number): this; - setParent(parent: object | null): this; - } + setParent(parent: object | null): this; + } - interface IEventTrigger { - fire(type: string, eventobject: object | IEvent): this; - } + interface IEventTrigger { + fire(type: string, eventobject: object | IEvent): this; + } - interface IEventWorkflowController extends IEventController { - onAfterEventFiring?(events: IEventManager, type: string, event?: IEvent): void; + interface IEventWorkflowController extends IEventController { + onAfterEventFiring?(events: IEventManager, type: string, event?: IEvent): void; - onBeforeEventFiring?(events: IEventManager, type: string, event?: IEvent): void; - } + onBeforeEventFiring?(events: IEventManager, type: string, event?: IEvent): void; + } - interface IExpandableControlLayout extends ILayout { //tslint:disable-line no-empty-interface no-empty-interfaces - } + interface IExpandableControlLayout extends ILayout { //tslint:disable-line no-empty-interface no-empty-interfaces + } - interface IFreezable extends IEventManager { - freeze(): IFreezable; + interface IFreezable extends IEventManager { + freeze(): IFreezable; - isFrozen(): boolean; + isFrozen(): boolean; - unfreeze(): IFreezable; - } + unfreeze(): IFreezable; + } - interface IGeocodeProvider { - geocode(request: string, options?: { boundedBy?: number[][], results?: number, skip?: number, strictBounds?: boolean }): Promise; + interface IGeocodeProvider { + geocode(request: string, options?: { boundedBy?: number[][], results?: number, skip?: number, strictBounds?: boolean }): Promise; - suggest(request: string, options?: { boundedBy?: number[][], results?: number, strictBounds?: boolean }): Promise; - } + suggest(request: string, options?: { boundedBy?: number[][], results?: number, strictBounds?: boolean }): Promise; + } - interface IGeometry extends IBaseGeometry, ICustomizable { - getMap(): Map | null; + interface IGeometry extends IBaseGeometry, ICustomizable { + getMap(): Map | null; - getPixelGeometry(options?: object): IPixelGeometry; + getPixelGeometry(options?: object): IPixelGeometry; - setMap(map: Map): void; - } + setMap(map: Map): void; + } - interface IGeometryEditor extends ICustomizable, IEventEmitter { - startEditing(): void; + interface IGeometryEditor extends ICustomizable, IEventEmitter { + startEditing(): void; - stopEditing(): void; - } + stopEditing(): void; + } - interface IGeometryJson { - type: string; - } + interface IGeometryJson { + type: string; + } - interface IGeoObject extends IChildOnMap, ICustomizable, IDomEventEmitter, IParentOnMap { - geometry: IGeometry | null; - properties: IDataManager; - state: IDataManager; + interface IGeoObject extends IChildOnMap, ICustomizable, IDomEventEmitter, IParentOnMap { + geometry: IGeometry | null; + properties: IDataManager; + state: IDataManager; - getOverlay(): Promise; + getOverlay(): Promise; - getOverlaySync(): IOverlay | null; - } + getOverlaySync(): IOverlay | null; + } - interface IGeoObjectCollection extends ICustomizable, IEventEmitter, IParentOnMap { - add(child: IGeoObject, index?: number): this; + interface IGeoObjectCollection extends ICustomizable, IEventEmitter, IParentOnMap { + add(child: IGeoObject, index?: number): this; - each(callback: (object: IGeoObject) => void, context: object): void; + each(callback: (object: IGeoObject) => void, context: object): void; - get(index: number): IGeoObject; + get(index: number): IGeoObject; - getBounds(): number[][] | null; + getBounds(): number[][] | null; - getIterator(): IIterator; + getIterator(): IIterator; - getLength(): number; + getLength(): number; - getPixelBounds(): number[][] | null; + getPixelBounds(): number[][] | null; - indexOf(object: IGeoObject): number; + indexOf(object: IGeoObject): number; - remove(child: IGeoObject): this; + remove(child: IGeoObject): this; - removeAll(): this; + removeAll(): this; - set(index: number, child: IGeoObject): this; + set(index: number, child: IGeoObject): this; - splice(index: number, length: number): this; - } + splice(index: number, length: number): this; + } - interface IGeoObjectSequence extends ICustomizable, IEventEmitter, IParentOnMap { - each(callback: (geoObject: IGeoObject) => void, context?: object): void; + interface IGeoObjectSequence extends ICustomizable, IEventEmitter, IParentOnMap { + each(callback: (geoObject: IGeoObject) => void, context?: object): void; - get(index: number): IGeoObject; + get(index: number): IGeoObject; - getBounds(): number[][] | null; + getBounds(): number[][] | null; - getIterator(): IIterator; + getIterator(): IIterator; - getLength(): number; + getLength(): number; - getPixelBounds(): number[][] | null; + getPixelBounds(): number[][] | null; - indexOf(geoObject: IGeoObject): number; - } + indexOf(geoObject: IGeoObject): number; + } - interface IHintManager extends IPopupManager { //tslint:disable-line no-empty-interface no-empty-interfaces - } + interface IHintManager extends IPopupManager { //tslint:disable-line no-empty-interface no-empty-interfaces + } - interface IIterator { - getNext(): object | null; - } + interface IIterator { + getNext(): object | null; + } - interface ILayer extends IChildOnMap, ICustomizable, IEventEmitter { - getBrightness?(): number; + interface ILayer extends IChildOnMap, ICustomizable, IEventEmitter { + getBrightness?(): number; - getCopyrights?(coords: number[], zoom: number): Promise>; + getCopyrights?(coords: number[], zoom: number): Promise>; - getZoomRange?(point: number[]): Promise; - } + getZoomRange?(point: number[]): Promise; + } - interface ILayout extends IDomEventEmitter { - // new (data: object); - destroy(): void; + interface ILayout extends IDomEventEmitter { + // new (data: object); + destroy(): void; - getData(): object; + getData(): object; - getParentElement(): HTMLElement; + getParentElement(): HTMLElement; - getShape(): IShape | null; + getShape(): IShape | null; - isEmpty(): boolean; + isEmpty(): boolean; - setData(data: object): void; + setData(data: object): void; - setParentElement(parent: HTMLElement | null): void; - } + setParentElement(parent: HTMLElement | null): void; + } - interface ILineStringGeometry extends IGeometry, ILineStringGeometryAccess { //tslint:disable-line no-empty-interface no-empty-interfaces - } + interface ILineStringGeometry extends IGeometry, ILineStringGeometryAccess { //tslint:disable-line no-empty-interface no-empty-interfaces + } - interface ILineStringGeometryAccess extends IFreezable { - get(index: number): number[]; + interface ILineStringGeometryAccess extends IFreezable { + get(index: number): number[]; - getChildGeometry(index: number): IPointGeometryAccess; + getChildGeometry(index: number): IPointGeometryAccess; - getClosest(anchorPosition: number[]): object; + getClosest(anchorPosition: number[]): object; - getCoordinates(): number[][]; + getCoordinates(): number[][]; - getLength(): number; + getLength(): number; - insert(index: number, coordinates: number[][]): ILineStringGeometryAccess; + insert(index: number, coordinates: number[][]): ILineStringGeometryAccess; - remove(index: number): number[]; + remove(index: number): number[]; - set(index: number, coordinates: number[]): ILineStringGeometryAccess; + set(index: number, coordinates: number[]): ILineStringGeometryAccess; - setCoordinates(coordinates: number[]): ILineStringGeometryAccess; + setCoordinates(coordinates: number[]): ILineStringGeometryAccess; - splice(index: number, length: number): number[][]; - } + splice(index: number, length: number): number[][]; + } - interface IMapAction extends IEventEmitter { - begin(mapActionManager: map.action.Manager): void; + interface IMapAction extends IEventEmitter { + begin(mapActionManager: map.action.Manager): void; - end(): void; - } + end(): void; + } - interface IMapObjectCollection extends ICollection, ICustomizable, IParentOnMap { //tslint:disable-line no-empty-interface no-empty-interfaces - } + interface IMapObjectCollection extends ICollection, ICustomizable, IParentOnMap { //tslint:disable-line no-empty-interface no-empty-interfaces + } - interface IMultiRouteModelJson { - params: IMultiRouteParams; - referencePoints: IMultiRouteReferencePoint[]; - } + interface IMultiRouteModelJson { + params: IMultiRouteParams; + referencePoints: IMultiRouteReferencePoint[]; + } - interface IMultiRouteParams { - avoidTrafficJams?: boolean; - boundedBy?: number[][] | null; - requestSendInterval?: string | number; - results?: number; - reverseGeocoding?: boolean; - routingMode?: "auto" | "masstransit" | "pedestrian"; - searchCoordOrder?: string; - strictBounds?: boolean; - viaIndexes?: number[]; - } + interface IMultiRouteParams { + avoidTrafficJams?: boolean; + boundedBy?: number[][] | null; + requestSendInterval?: string | number; + results?: number; + reverseGeocoding?: boolean; + routingMode?: "auto" | "masstransit" | "pedestrian"; + searchCoordOrder?: string; + strictBounds?: boolean; + viaIndexes?: number[]; + } - type IMultiRouteReferencePoint = string | number[] | geometry.Point; + type IMultiRouteReferencePoint = string | number[] | geometry.Point; - interface IOptionManager extends IChild, IEventEmitter, IFreezable { - get(key: string, defaultValue: object): object; + interface IOptionManager extends IChild, IEventEmitter, IFreezable { + get(key: string, defaultValue: object): object; - getAll(): object; + getAll(): object; - getName(): string; + getName(): string; - getNative(key: string): object; + getNative(key: string): object; - resolve(key: string, name?: string): object; + resolve(key: string, name?: string): object; - setName(name: string): void; - } + setName(name: string): void; + } - interface IOverlay extends ICustomizable, IDomEventEmitter { - getData(): object; + interface IOverlay extends ICustomizable, IDomEventEmitter { + getData(): object; - getGeometry(): IPixelGeometry; + getGeometry(): IPixelGeometry; - getMap(): Map | null; + getMap(): Map | null; - getShape(): IShape | null; + getShape(): IShape | null; - isEmpty(): boolean; + isEmpty(): boolean; - setData(data: object): void; + setData(data: object): void; - setGeometry(geometry: IPixelGeometry): void; + setGeometry(geometry: IPixelGeometry): void; - setMap(map: Map | null): void; - } + setMap(map: Map | null): void; + } - interface IPane extends IEventEmitter { - destroy(): void; + interface IPane extends IEventEmitter { + destroy(): void; - getElement(): HTMLElement; + getElement(): HTMLElement; - getMap(): Map; + getMap(): Map; - getOverflow(): "visible" | "hidden"; + getOverflow(): "visible" | "hidden"; - getZIndex(): number; - } + getZIndex(): number; + } - interface IPanorama { - getAngularBBox(): number[]; + interface IPanorama { + getAngularBBox(): number[]; - getConnectionArrows(): IPanoramaConnectionArrow[]; + getConnectionArrows(): IPanoramaConnectionArrow[]; - getConnectionMarkers(): IPanoramaConnectionMarker[]; + getConnectionMarkers(): IPanoramaConnectionMarker[]; - getCoordSystem(): ICoordSystem; + getCoordSystem(): ICoordSystem; - getDefaultDirection(): number[]; + getDefaultDirection(): number[]; - getDefaultSpan(): number[]; + getDefaultSpan(): number[]; - getGraph(): IPanoramaGraph | null; + getGraph(): IPanoramaGraph | null; - getMarkers(): IPanoramaMarker[]; + getMarkers(): IPanoramaMarker[]; - getName(): string; + getName(): string; - getPosition(): number[]; + getPosition(): number[]; - getTileLevels(): IPanoramaTileLevel[]; + getTileLevels(): IPanoramaTileLevel[]; - getTileSize(): number[]; - } + getTileSize(): number[]; + } - interface IPanoramaConnection { - getConnectedPanorama(): Promise; - } + interface IPanoramaConnection { + getConnectedPanorama(): Promise; + } - interface IPanoramaConnectionArrow extends IPanoramaConnection { - properties: data.Manager; + interface IPanoramaConnectionArrow extends IPanoramaConnection { + properties: data.Manager; - getDirection(): number[]; + getDirection(): number[]; - getPanorama(): IPanorama; - } + getPanorama(): IPanorama; + } - interface IPanoramaConnectionMarker extends IPanoramaConnection, IPanoramaMarker { //tslint:disable-line no-empty-interface no-empty-interfaces - } + interface IPanoramaConnectionMarker extends IPanoramaConnection, IPanoramaMarker { //tslint:disable-line no-empty-interface no-empty-interfaces + } - interface IPanoramaGraph { - getEdges(): IPanoramaGraphEdge[]; + interface IPanoramaGraph { + getEdges(): IPanoramaGraphEdge[]; - getNodes(): IPanoramaGraphEdge[]; + getNodes(): IPanoramaGraphEdge[]; - getPanorama(): IPanorama; - } + getPanorama(): IPanorama; + } - interface IPanoramaGraphEdge { - getEndNodes(): IPanoramaGraphNode[]; - } + interface IPanoramaGraphEdge { + getEndNodes(): IPanoramaGraphNode[]; + } - interface IPanoramaGraphNode { - getConnectedPanorama(): Promise; - } + interface IPanoramaGraphNode { + getConnectedPanorama(): Promise; + } - interface IPanoramaMarker { - properties: data.Manager; + interface IPanoramaMarker { + properties: data.Manager; - getIconSet(): Promise; + getIconSet(): Promise; - getPanorama(): IPanorama; + getPanorama(): IPanorama; - getPosition(): number[]; - } + getPosition(): number[]; + } - interface IPanoramaMarkerIcon { - image: HTMLCanvasElement | HTMLImageElement; - offset: number[]; - } + interface IPanoramaMarkerIcon { + image: HTMLCanvasElement | HTMLImageElement; + offset: number[]; + } - interface IPanoramaMarkerIconSet { - default: IPanoramaMarkerIcon | null; - expanded: IPanoramaMarkerIcon | null; - expandedHovered: IPanoramaMarkerIcon | null; - hovered: IPanoramaMarkerIcon | null; - } + interface IPanoramaMarkerIconSet { + default: IPanoramaMarkerIcon | null; + expanded: IPanoramaMarkerIcon | null; + expandedHovered: IPanoramaMarkerIcon | null; + hovered: IPanoramaMarkerIcon | null; + } - interface IPanoramaTileLevel { - getImageSize(): number[]; + interface IPanoramaTileLevel { + getImageSize(): number[]; - getTileUrl(x: number, y: number): string; - } + getTileUrl(x: number, y: number): string; + } - interface IParentOnMap { - getMap(): Map; - } + interface IParentOnMap { + getMap(): Map; + } - interface IPixelCircleGeometry extends IPixelGeometry { - getCoordinates(): number[]; + interface IPixelCircleGeometry extends IPixelGeometry { + getCoordinates(): number[]; - getRadius(): number; - } + getRadius(): number; + } - interface IPixelLineStringGeometry extends IPixelGeometry { - getClosest(anchorPosition: number[]): object; + interface IPixelLineStringGeometry extends IPixelGeometry { + getClosest(anchorPosition: number[]): object; - getCoordinates(): number[][]; + getCoordinates(): number[][]; - getLength(): number; - } + getLength(): number; + } - interface IPixelGeometry extends IBaseGeometry { - equals(geometry: IPixelGeometry): boolean; + interface IPixelGeometry extends IBaseGeometry { + equals(geometry: IPixelGeometry): boolean; - getMetaData(): object; + getMetaData(): object; - scale(factor: number): IPixelGeometry; + scale(factor: number): IPixelGeometry; - shift(offset: number[]): IPixelGeometry; - } + shift(offset: number[]): IPixelGeometry; + } - interface IPointGeometry extends IGeometry, IPointGeometryAccess { //tslint:disable-line no-empty-interface no-empty-interfaces - } + interface IPointGeometry extends IGeometry, IPointGeometryAccess { //tslint:disable-line no-empty-interface no-empty-interfaces + } - interface IPointGeometryAccess { - getCoordinates(): number[] | null; + interface IPointGeometryAccess { + getCoordinates(): number[] | null; - setCoordinates(coordinates: number[] | null): this; - } + setCoordinates(coordinates: number[] | null): this; + } - interface IPopup extends ICustomizable, IEventEmitter { - close(force?: boolean): Promise; + interface IPopup extends ICustomizable, IEventEmitter { + close(force?: boolean): Promise; - getData(): object; + getData(): object; - getOverlay(): Promise; + getOverlay(): Promise; - getOverlaySync(): IOverlay; + getOverlaySync(): IOverlay; - getPosition(): number[]; + getPosition(): number[]; - isOpen(): boolean; + isOpen(): boolean; - open(position: number[], data: object | string | HTMLElement): Promise; + open(position: number[], data: object | string | HTMLElement): Promise; - setData(data: object | string | HTMLElement): Promise; + setData(data: object | string | HTMLElement): Promise; - setPosition(position: number[]): Promise; - } + setPosition(position: number[]): Promise; + } - interface IPopupManager extends IEventEmitter { - close(force?: boolean): Promise; + interface IPopupManager extends IEventEmitter { + close(force?: boolean): Promise; - destroy(): void; + destroy(): void; - getData(): object | null; + getData(): object | null; - getOptions(): IOptionManager | null; + getOptions(): IOptionManager | null; - getOverlay(): Promise; + getOverlay(): Promise; - getOverlaySync(): IOverlay | null; + getOverlaySync(): IOverlay | null; - getPosition(): number[] | null; + getPosition(): number[] | null; - isOpen(): boolean; + isOpen(): boolean; - open(position?: number[], data?: object | string | HTMLElement, options?: object): Promise; + open(position?: number[], data?: object | string | HTMLElement, options?: object): Promise; - setData(data: object | string | HTMLElement): Promise; + setData(data: object | string | HTMLElement): Promise; - setOptions(options: object): Promise; + setOptions(options: object): Promise; - setPosition(position: number[]): Promise; - } + setPosition(position: number[]): Promise; + } - interface IPositioningContext { - fromClientPixels(clientPixelPoint: number[]): number[]; + interface IPositioningContext { + fromClientPixels(clientPixelPoint: number[]): number[]; - getZoom(): number; + getZoom(): number; - toClientPixels(globalPixelPoint: number[]): number[]; - } + toClientPixels(globalPixelPoint: number[]): number[]; + } - interface IProjection { - fromGlobalPixels(globalPixelPoint: number[], zoom: number): number[]; + interface IProjection { + fromGlobalPixels(globalPixelPoint: number[], zoom: number): number[]; - getCoordSystem(): ICoordSystem; + getCoordSystem(): ICoordSystem; - isCycled(): boolean[]; + isCycled(): boolean[]; - toGlobalPixels(coordPoint: number[], zoom: number): number[]; - } + toGlobalPixels(coordPoint: number[], zoom: number): number[]; + } - interface IRoutePanel { - options: IOptionManager; - state: IDataManager; + interface IRoutePanel { + options: IOptionManager; + state: IDataManager; - getRoute(): multiRouter.MultiRoute; + getRoute(): multiRouter.MultiRoute; - switchPoints(): void; - } + switchPoints(): void; + } - interface ISearchControlLayout extends IExpandableControlLayout { //tslint:disable-line no-empty-interface no-empty-interfaces - } + interface ISearchControlLayout extends IExpandableControlLayout { //tslint:disable-line no-empty-interface no-empty-interfaces + } - interface ISelectableControl extends IControl { - deselect(): void; + interface ISelectableControl extends IControl { + deselect(): void; - disable(): void; + disable(): void; - enable(): void; + enable(): void; - isEnabled(): boolean; + isEnabled(): boolean; - isSelected(): boolean; + isSelected(): boolean; - select(): void; - } + select(): void; + } - interface ISelectableControlLayout extends ILayout { //tslint:disable-line no-empty-interface no-empty-interfaces - } + interface ISelectableControlLayout extends ILayout { //tslint:disable-line no-empty-interface no-empty-interfaces + } - interface IShape { - contains(position: number[]): boolean; + interface IShape { + contains(position: number[]): boolean; - equals(shape: IShape): boolean; + equals(shape: IShape): boolean; - getBounds(): number[][] | null; + getBounds(): number[][] | null; - getGeometry(): IPixelGeometry; + getGeometry(): IPixelGeometry; - getType(): string; + getType(): string; - scale(factor: number): IShape; + scale(factor: number): IShape; + + shift(offset: number[]): IShape; + } + + class Monitor { + constructor(dataManager: IDataManager | IOptionManager); + add(name: string[] | string, changeCallback: (event: (object | IEvent)) => void, context?: any, params?: any): Monitor; + forceChange(): Monitor; + get(name: string): any; + remove(name: string): Monitor; + removeAll(): Monitor; + } - shift(offset: number[]): IShape; - } - - class Monitor { - constructor(dataManager: IDataManager | IOptionManager); - add(name: string[] | string, changeCallback: (event: (object | IEvent)) => void, context?: any, params?: any): Monitor; - forceChange(): Monitor; - get(name: string): any; - remove(name: string): Monitor; - removeAll(): Monitor; - } - class Polyline extends GeoObject { constructor(geometry: number[][] | object | ILineStringGeometry, properties: object | IDataManager, options?: IPolylineOptions); } - interface IPolylineOptions { - cursor?: string; + interface IPolylineOptions { + cursor?: string; [index: string]: any; } } From d61496670ffe1e77ca8451afa1f58c4614782fc7 Mon Sep 17 00:00:00 2001 From: AlexeyTokmakov Date: Fri, 7 Dec 2018 15:16:05 +0300 Subject: [PATCH 469/608] Update yandex-maps-tests.ts --- types/yandex-maps/yandex-maps-tests.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/yandex-maps/yandex-maps-tests.ts b/types/yandex-maps/yandex-maps-tests.ts index 2406ef6cd6..c300679d35 100644 --- a/types/yandex-maps/yandex-maps-tests.ts +++ b/types/yandex-maps/yandex-maps-tests.ts @@ -22,8 +22,8 @@ const balloonLayout = ymaps.templateLayoutFactory.createClass( "
    ", { build(this: ymaps.ILayout): void { - ( ( this.constructor).superclass).build.call(this); - this.getParentElement().children.item(0)!.children.item(0)!.appendChild(( this.getData()).properties.get("balloonContent")); + ((this.constructor as any).superclass as ymaps.layout.templateBased.Base).build.call(this); + this.getParentElement().children.item(0)!.children.item(0)!.appendChild((this.getData() as any).properties.get("balloonContent")); } } ); @@ -52,6 +52,6 @@ mapMarker.events.add("click", (event: ymaps.Event) => { map.geoObjects.add(mapMarker); -map.setCenter(( mapMarker.geometry).getCoordinates() || [55.76, 37.64]); +map.setCenter((mapMarker.geometry as ymaps.IPointGeometry).getCoordinates() || [55.76, 37.64]); map.setZoom(13); From be97f863f040390410f692dbe6a284e32cb884dd Mon Sep 17 00:00:00 2001 From: Alexaner T Date: Fri, 7 Dec 2018 16:20:48 +0200 Subject: [PATCH 470/608] Add invertStickyHeaders prop to ScrollView --- types/react-native/index.d.ts | 6 ++++++ types/react-native/test/index.tsx | 1 + 2 files changed, 7 insertions(+) diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index 24e4aee9dc..ae3127bc1d 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -6337,6 +6337,12 @@ export interface ScrollViewProps */ horizontal?: boolean; + /** + * If sticky headers should stick at the bottom instead of the top of the + * ScrollView. This is usually used with inverted ScrollViews. + */ + invertStickyHeaders?: boolean; + /** * Determines whether the keyboard gets dismissed in response to a drag. * - 'none' (the default) drags do not dismiss the keyboard. diff --git a/types/react-native/test/index.tsx b/types/react-native/test/index.tsx index b5d7a5faeb..79c5a111ca 100644 --- a/types/react-native/test/index.tsx +++ b/types/react-native/test/index.tsx @@ -430,6 +430,7 @@ class ScrollerListComponentTest extends React.Component< Date: Fri, 7 Dec 2018 15:30:24 +0100 Subject: [PATCH 471/608] Add a missing getSlideById method to the Presentation --- types/google-apps-script/google-apps-script.slides.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/google-apps-script/google-apps-script.slides.d.ts b/types/google-apps-script/google-apps-script.slides.d.ts index 90e034ff60..434e3ad4fc 100644 --- a/types/google-apps-script/google-apps-script.slides.d.ts +++ b/types/google-apps-script/google-apps-script.slides.d.ts @@ -840,6 +840,7 @@ declare namespace GoogleAppsScript { getPageWidth(): Number; getSelection(): Selection; getSlides(): Slide[]; + getSlideById(id: string): Slide; getUrl(): string; getViewers(): Base.User[]; insertSlide(insertionIndex: Integer): Slide; From 424cdc79f7e9d707ba08e3da1c81c5a61f52bb5c Mon Sep 17 00:00:00 2001 From: Dominik Palo Date: Fri, 7 Dec 2018 15:42:26 +0100 Subject: [PATCH 472/608] Fix ordering --- types/google-apps-script/google-apps-script.slides.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/google-apps-script/google-apps-script.slides.d.ts b/types/google-apps-script/google-apps-script.slides.d.ts index 434e3ad4fc..68e61914a1 100644 --- a/types/google-apps-script/google-apps-script.slides.d.ts +++ b/types/google-apps-script/google-apps-script.slides.d.ts @@ -839,8 +839,8 @@ declare namespace GoogleAppsScript { getPageHeight(): Number; getPageWidth(): Number; getSelection(): Selection; - getSlides(): Slide[]; getSlideById(id: string): Slide; + getSlides(): Slide[]; getUrl(): string; getViewers(): Base.User[]; insertSlide(insertionIndex: Integer): Slide; From 22671903858e1ce2c0fd4bf0c72bc6feebbec96d Mon Sep 17 00:00:00 2001 From: ThibaudAv Date: Fri, 7 Dec 2018 15:46:22 +0100 Subject: [PATCH 473/608] Update Intro.Js types --- types/intro.js/index.d.ts | 6 +++++- types/intro.js/intro.js-tests.ts | 19 ++++++++++++++----- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/types/intro.js/index.d.ts b/types/intro.js/index.d.ts index ec27d19439..40603bed1d 100644 --- a/types/intro.js/index.d.ts +++ b/types/intro.js/index.d.ts @@ -7,7 +7,11 @@ declare namespace IntroJs { interface Step { intro: string; element?: string|HTMLElement|Element; - position?: string; + position?: "top"|"left"|"right"|"bottom"|"bottom-left-aligned"|"bottom-middle-aligned"|"bottom-right-aligned"|"auto"; + tooltipClass?: string; + highlightClass?: string; + scrollTo?: "off"|"tooltip"|"element"; + disableInteraction?: boolean; } interface Hint { diff --git a/types/intro.js/intro.js-tests.ts b/types/intro.js/intro.js-tests.ts index d40fbe3f36..44b2f238d3 100644 --- a/types/intro.js/intro.js-tests.ts +++ b/types/intro.js/intro.js-tests.ts @@ -31,13 +31,22 @@ intro.setOptions({ position: 'left' }, { - element : '#step4', - intro : "Another step.", - position: 'bottom' + element : '#step4', + intro : "Another step.", + position : 'bottom', + tooltipClass : 'step4Class', + highlightClass: '' }, { - element: '#step5', - intro : 'Get it, use it.' + element : '#step4', + intro : "Another step.", + position: 'bottom', + scrollTo: 'tooltip' + }, + { + element : '#step5', + intro : 'Get it, use it.', + disableInteraction: true } ], hints: [ From 1a9082286f4f6d6f72787faa3fa9a647aff16c95 Mon Sep 17 00:00:00 2001 From: Dominik Palo Date: Fri, 7 Dec 2018 18:47:10 +0100 Subject: [PATCH 474/608] Add a missing getPageElementById method to the Presentation --- types/google-apps-script/google-apps-script.slides.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/google-apps-script/google-apps-script.slides.d.ts b/types/google-apps-script/google-apps-script.slides.d.ts index 68e61914a1..3d1aac9227 100644 --- a/types/google-apps-script/google-apps-script.slides.d.ts +++ b/types/google-apps-script/google-apps-script.slides.d.ts @@ -836,6 +836,7 @@ declare namespace GoogleAppsScript { getNotesMaster(): NotesMaster; getNotesPageHeight(): Number; getNotesPageWidth(): Number; + getPageElementById(id: string): PageElement; getPageHeight(): Number; getPageWidth(): Number; getSelection(): Selection; From fa27dfe8576bf9505a22b35476914e9c09e6545c Mon Sep 17 00:00:00 2001 From: Leonard Thieu Date: Fri, 7 Dec 2018 13:23:48 -0500 Subject: [PATCH 475/608] [jquery] Fix issue with unbinding event handlers for specific event types. --- types/jquery/JQuery.d.ts | 32 +++++++++++++++++++------------- types/jquery/jquery-tests.ts | 18 ++++++++++++++++++ 2 files changed, 37 insertions(+), 13 deletions(-) diff --git a/types/jquery/JQuery.d.ts b/types/jquery/JQuery.d.ts index 123fad3b34..e9fd87263f 100644 --- a/types/jquery/JQuery.d.ts +++ b/types/jquery/JQuery.d.ts @@ -7304,10 +7304,12 @@ $( "body" ).on( "click", "p", foo ); $( "body" ).off( "click", "p", foo ); ``` */ - off(events: string, + off( + events: TType, selector: JQuery.Selector, - handler: JQuery.TypeEventHandler | - false): this; + handler: JQuery.TypeEventHandler | + false + ): this; /** * Remove an event handler. * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as @@ -7337,10 +7339,12 @@ $( "form" ).on( "keypress.validator", "input[type='text']", validate ); $( "form" ).off( ".validator" ); ``` */ - off(events: string, + off( + events: TType, selector_handler?: JQuery.Selector | - JQuery.TypeEventHandler | - false): this; + JQuery.TypeEventHandler | + false + ): this; /** * Remove an event handler. * @param events An object where the string keys represent one or more space-separated event types and optional @@ -11968,9 +11972,10 @@ $( "p" ).bind( "click", foo ); // ... Now foo will be called when paragraphs are $( "p" ).unbind( "click", foo ); // ... foo will no longer be called. ``` */ - unbind(event: string, - handler: JQuery.TypeEventHandler | - false + unbind( + event: TType, + handler: JQuery.TypeEventHandler | + false ): this; /** * Remove a previously-attached event handler from the elements. @@ -12062,10 +12067,11 @@ $( "body" ).delegate( "p", "click", foo ); $( "body" ).undelegate( "p", "click", foo ); ``` */ - undelegate(selector: JQuery.Selector, - eventType: string, - handler: JQuery.TypeEventHandler | - false + undelegate( + selector: JQuery.Selector, + eventType: TType, + handler: JQuery.TypeEventHandler | + false ): this; /** * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements. diff --git a/types/jquery/jquery-tests.ts b/types/jquery/jquery-tests.ts index c533f1b235..1ede9fc8f5 100644 --- a/types/jquery/jquery-tests.ts +++ b/types/jquery/jquery-tests.ts @@ -3969,12 +3969,17 @@ function JQuery() { function customData(this: HTMLElement, event: JQuery.TriggeredEvent) { } + function specificEventType(this: HTMLElement, event: JQuery.MouseDownEvent) { } + // $ExpectType JQuery $('table').off('myEvent', 'td', defaultData); // $ExpectType JQuery $('table').off('myEvent', 'td', customData); + // $ExpectType JQuery + $('table').off('mousedown', 'td', specificEventType); + // $ExpectType JQuery $('table').off('myEvent', 'td', false); @@ -3987,6 +3992,9 @@ function JQuery() { // $ExpectType JQuery $('table').off('myEvent', customData); + // $ExpectType JQuery + $('table').off('mousedown', specificEventType); + // $ExpectType JQuery $('table').off('myEvent', false); @@ -4473,12 +4481,17 @@ function JQuery() { function customData(this: HTMLElement, event: JQuery.TriggeredEvent) { } + function specificEventType(this: HTMLElement, event: JQuery.MouseDownEvent) { } + // $ExpectType JQuery $('p').unbind('myEvent', defaultData); // $ExpectType JQuery $('p').unbind('myEvent', customData); + // $ExpectType JQuery + $('p').unbind('mousedown', specificEventType); + // $ExpectType JQuery $('p').unbind('myEvent', false); @@ -4498,12 +4511,17 @@ function JQuery() { function customData(this: HTMLElement, event: JQuery.TriggeredEvent) { } + function specificEventType(this: HTMLElement, event: JQuery.MouseDownEvent) { } + // $ExpectType JQuery $('table').undelegate('td', 'click', defaultData); // $ExpectType JQuery $('table').undelegate('td', 'click', customData); + // $ExpectType JQuery + $('table').undelegate('td', 'mousedown', specificEventType); + // $ExpectType JQuery $('table').undelegate('td', 'click', false); From 3f5782e055177f76e0b754acb48947a364f262ea Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Fri, 7 Dec 2018 21:20:54 +0100 Subject: [PATCH 476/608] Add types for @sindresorhus/to-milliseconds --- .../sindresorhus__to-milliseconds/index.d.ts | 20 +++++++++++++ .../sindresorhus__to-milliseconds-tests.ts | 24 ++++++++++++++++ .../tsconfig.json | 28 +++++++++++++++++++ .../sindresorhus__to-milliseconds/tslint.json | 1 + 4 files changed, 73 insertions(+) create mode 100644 types/sindresorhus__to-milliseconds/index.d.ts create mode 100644 types/sindresorhus__to-milliseconds/sindresorhus__to-milliseconds-tests.ts create mode 100644 types/sindresorhus__to-milliseconds/tsconfig.json create mode 100644 types/sindresorhus__to-milliseconds/tslint.json diff --git a/types/sindresorhus__to-milliseconds/index.d.ts b/types/sindresorhus__to-milliseconds/index.d.ts new file mode 100644 index 0000000000..8eb44b2a7b --- /dev/null +++ b/types/sindresorhus__to-milliseconds/index.d.ts @@ -0,0 +1,20 @@ +// Type definitions for @sindresorhus/to-milliseconds 1.0 +// Project: https://github.com/sindresorhus/to-milliseconds +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = toMilliseconds; + +declare function toMilliseconds(input: toMilliseconds.TimeSpec): number; + +declare namespace toMilliseconds { + interface TimeSpec { + days?: number; + hours?: number; + minutes?: number; + seconds?: number; + milliseconds?: number; + microseconds?: number; + nanoseconds?: number; + } +} diff --git a/types/sindresorhus__to-milliseconds/sindresorhus__to-milliseconds-tests.ts b/types/sindresorhus__to-milliseconds/sindresorhus__to-milliseconds-tests.ts new file mode 100644 index 0000000000..aff7ba6fe0 --- /dev/null +++ b/types/sindresorhus__to-milliseconds/sindresorhus__to-milliseconds-tests.ts @@ -0,0 +1,24 @@ +import toMilliseconds = require('@sindresorhus/to-milliseconds'); + +// $ExpectType number +toMilliseconds({ + days: 15, +}); +toMilliseconds({ + hours: 11, +}); +toMilliseconds({ + minutes: 23, +}); +toMilliseconds({ + seconds: 20, +}); +toMilliseconds({ + milliseconds: 1, +}); +toMilliseconds({ + microseconds: 1, +}); +toMilliseconds({ + nanoseconds: 1, +}); diff --git a/types/sindresorhus__to-milliseconds/tsconfig.json b/types/sindresorhus__to-milliseconds/tsconfig.json new file mode 100644 index 0000000000..be9b1a9bec --- /dev/null +++ b/types/sindresorhus__to-milliseconds/tsconfig.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "paths": { + "@sindresorhus/to-milliseconds": [ + "sindresorhus__to-milliseconds" + ] + }, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "sindresorhus__to-milliseconds-tests.ts" + ] +} diff --git a/types/sindresorhus__to-milliseconds/tslint.json b/types/sindresorhus__to-milliseconds/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/sindresorhus__to-milliseconds/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From c5f09e4f74d188031f409656529fb97c16920871 Mon Sep 17 00:00:00 2001 From: Chris Serino Date: Fri, 7 Dec 2018 14:50:45 -0600 Subject: [PATCH 477/608] [hapi] Make RouteOptionsPreObject.assign optional --- types/hapi/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/hapi/index.d.ts b/types/hapi/index.d.ts index 3e323f8c44..ec2359ed5a 100644 --- a/types/hapi/index.d.ts +++ b/types/hapi/index.d.ts @@ -1428,7 +1428,7 @@ export interface RouteOptionsPreObject { /** * key name used to assign the response of the method to in request.pre and request.preResponses. */ - assign: string; + assign?: string; /** * A failAction value which determine what to do when a pre-handler method throws an error. If assign is specified and the failAction setting is not 'error', the error will be assigned. */ From b76386c8638d89874adc15f38e2dd4bb2c039027 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Fri, 7 Dec 2018 22:24:17 +0100 Subject: [PATCH 478/608] Add types for crypto-hash --- types/crypto-hash/crypto-hash-tests.ts | 29 ++++++++++++++++ types/crypto-hash/index.d.ts | 48 ++++++++++++++++++++++++++ types/crypto-hash/tsconfig.json | 23 ++++++++++++ types/crypto-hash/tslint.json | 1 + 4 files changed, 101 insertions(+) create mode 100644 types/crypto-hash/crypto-hash-tests.ts create mode 100644 types/crypto-hash/index.d.ts create mode 100644 types/crypto-hash/tsconfig.json create mode 100644 types/crypto-hash/tslint.json diff --git a/types/crypto-hash/crypto-hash-tests.ts b/types/crypto-hash/crypto-hash-tests.ts new file mode 100644 index 0000000000..73e62ad1c6 --- /dev/null +++ b/types/crypto-hash/crypto-hash-tests.ts @@ -0,0 +1,29 @@ +import { sha1, sha256, sha384, sha512 } from 'crypto-hash'; + +// $ExpectType Promise +sha1('🦄'); +// $ExpectType Promise +sha1('🦄', { outputFormat: 'buffer' }); +// $ExpectType Promise +sha1('🦄', { outputFormat: 'hex' }); + +// $ExpectType Promise +sha256('🦄'); +// $ExpectType Promise +sha256('🦄', { outputFormat: 'buffer' }); +// $ExpectType Promise +sha256('🦄', { outputFormat: 'hex' }); + +// $ExpectType Promise +sha384('🦄'); +// $ExpectType Promise +sha384('🦄', { outputFormat: 'buffer' }); +// $ExpectType Promise +sha384('🦄', { outputFormat: 'hex' }); + +// $ExpectType Promise +sha512('🦄'); +// $ExpectType Promise +sha512('🦄', { outputFormat: 'buffer' }); +// $ExpectType Promise +sha512('🦄', { outputFormat: 'hex' }); diff --git a/types/crypto-hash/index.d.ts b/types/crypto-hash/index.d.ts new file mode 100644 index 0000000000..c22864b2ae --- /dev/null +++ b/types/crypto-hash/index.d.ts @@ -0,0 +1,48 @@ +// Type definitions for crypto-hash 1.0 +// Project: https://github.com/sindresorhus/crypto-hash#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export function sha1( + buffer: string | ArrayBuffer | ArrayBufferView, + options?: OptionsHexOutput +): Promise; +export function sha1( + buffer: string | ArrayBuffer | ArrayBufferView, + options: OptionBufferOutput +): Promise; + +export function sha256( + buffer: string | ArrayBuffer | ArrayBufferView, + options?: OptionsHexOutput +): Promise; +export function sha256( + buffer: string | ArrayBuffer | ArrayBufferView, + options: OptionBufferOutput +): Promise; + +export function sha384( + buffer: string | ArrayBuffer | ArrayBufferView, + options?: OptionsHexOutput +): Promise; +export function sha384( + buffer: string | ArrayBuffer | ArrayBufferView, + options: OptionBufferOutput +): Promise; + +export function sha512( + buffer: string | ArrayBuffer | ArrayBufferView, + options?: OptionsHexOutput +): Promise; +export function sha512( + buffer: string | ArrayBuffer | ArrayBufferView, + options: OptionBufferOutput +): Promise; + +export interface OptionsHexOutput { + outputFormat?: 'hex'; +} + +export interface OptionBufferOutput { + outputFormat: 'buffer'; +} diff --git a/types/crypto-hash/tsconfig.json b/types/crypto-hash/tsconfig.json new file mode 100644 index 0000000000..410ee34985 --- /dev/null +++ b/types/crypto-hash/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "crypto-hash-tests.ts" + ] +} diff --git a/types/crypto-hash/tslint.json b/types/crypto-hash/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/crypto-hash/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From cafab0196145ec7461463418b24f8b4f9d1cd4c0 Mon Sep 17 00:00:00 2001 From: Alvaro J Cruz Date: Fri, 7 Dec 2018 15:59:40 -0500 Subject: [PATCH 479/608] Add types for dynaTrace ADK --- types/dynatrace/dynatrace-tests.ts | 88 +++++++++++ types/dynatrace/index.d.ts | 234 +++++++++++++++++++++++++++++ types/dynatrace/tsconfig.json | 23 +++ types/dynatrace/tslint.json | 1 + 4 files changed, 346 insertions(+) create mode 100644 types/dynatrace/dynatrace-tests.ts create mode 100644 types/dynatrace/index.d.ts create mode 100644 types/dynatrace/tsconfig.json create mode 100644 types/dynatrace/tslint.json diff --git a/types/dynatrace/dynatrace-tests.ts b/types/dynatrace/dynatrace-tests.ts new file mode 100644 index 0000000000..027b924cf9 --- /dev/null +++ b/types/dynatrace/dynatrace-tests.ts @@ -0,0 +1,88 @@ +function customActions() { + const actionId = dynaTrace.enterAction("my custom action", "click"); + dynaTrace.leaveAction(actionId); +} + +function customVisit() { + dynaTrace.tagVisit("My Custom Visit"); + /** after some code execution we can end the visit early */ + dynaTrace.endVisit(); +} + +function signal() { + dynaTrace.signalLoadStart(); + dynaTrace.signalLoadEnd(); + dynaTrace.signalOnLoadStart(); + dynaTrace.signalOnLoadEnd(); + + dynaTrace.sendSignal(false, false, true); +} + +function load() { + dynaTrace.setLoadEndManually(); + dynaTrace.incrementOnLoadEndMarkers(); +} + +function automaticDetection() { + dynaTrace.setAutomaticActionDetection(false); +} + +function reporting() { + dynaTrace.reportError(" Custom error"); + const actionId = dynaTrace.enterAction("second action", "keypress"); + dynaTrace.reportError("Second custom error", actionId); + + dynaTrace.reportEvent("My Event"); + dynaTrace.reportString("My Key", "Custom value"); + dynaTrace.reportValue("Value Key", 2); + dynaTrace.reportWarning("Warning"); +} + +function thirdParty() { + const url = "http://somescript.com"; + dynaTrace.startThirdParty("s", url); + dynaTrace.stopThirdParty(url, true, Date.now() - 1000, Date.now()); +} + +function listener() { + const clickListener = (key: string) => ({}); + dynaTrace.addPageLeavingListener(clickListener); +} + +function streaming() { + dynaTrace.addStreamingNode( + "http://youtube.com", + 120, + true, + false, + 120, + 30, + 10, + 5, + "_info_" + ); +} + +function userInput() { + const userInput = dynaTrace.beginUserInput("", "click", "RETURN", 23); + dynaTrace.endUserInput(userInput); +} + +function Xhr() { + const enterActionId = dynaTrace.enterXhrAction( + "Angular Http request", + 0, + false + ); + dynaTrace.enterXhrCallback(enterActionId); + dynaTrace.leaveXhrCallback(enterActionId); + dynaTrace.leaveXhrAction(enterActionId); +} + +function appVersion() { + dynaTrace.setAppVersion("1.1.1"); +} + +function metadata() { + dynaTrace.setMetaData("some metadata", "value"); +} diff --git a/types/dynatrace/index.d.ts b/types/dynatrace/index.d.ts new file mode 100644 index 0000000000..5627e6b1db --- /dev/null +++ b/types/dynatrace/index.d.ts @@ -0,0 +1,234 @@ +// Type definitions for dynatrace 1.0 +// Project: https://www.dynatrace.com/ +// Definitions by: Alvaro Cruz +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +interface dynaTrace { + /** + * @description disable automatic detection + * Use in conjuction with enterAction + * @example + * dynaTrace.setAutomaticActionDetection(false); + * dynaTrace.enterAction('action message', 'select', null, null); + */ + setAutomaticActionDetection(on: boolean): void; + /** + * @description capture load event manually. + * followed by a signalLoadEnd to complete the capture. + */ + setLoadEndManually(): void; + /** + * @description Signal load start. If load start can be determined more accurately + * than the automatic detection, this function can be used. + */ + signalLoadStart(): void; + /** + * @description Signals that the page has finished loading + */ + signalLoadEnd(): void; + /** + * @description Force signal sending to make certain that actions aren't lost. + * @param forceSync - Force synchronous sending of signal (if false, it'll be sent asynchronously) + * @param sendPreview - Force sending of preview signals which haven't been closed yet. + * @param killUnfinished - Kills unfinished actions and sends them immediately. Handle with care, actions might be inaccurate. + */ + sendSignal( + forceSync: boolean, + sendPreview: boolean, + killUnfinished: boolean + ): void; + /** + * @description parentAction: optional id of parent action. + * - if parameter is not passed => appended to currently running action + * - if a number is passed => action is added as subaction to action with given id + * - if false => new root action is started. + * The function returns an internal tracking object that represents the action that was started. + * This tracking object must be passed to dynaTrace.leaveAction(). + * @param name - name of the action + * @param type + * @param startTime - time in milliseconds. if null, current time is used. + * @param parentAction optional id of parent action. if parameter is not passed=> appended to + * currently running action, if false => root action, if a number is passed, action is added + * as subaction to action with given id. + * @returns id of created action + */ + enterAction( + name: string, + type: string, + time?: number, + parentAction?: number | boolean + ): number; + /** + * @description stops the action that is represented by the given tracking object. + * @param actionId - id of action to leave. must be the value returned by enterAction + * @param time - end time in milliseconds + * @param startTime - optional start time in milliseconds (necessary if start time should be modified) + */ + leaveAction(actionId: number, time?: number, startTime?: number): void; + /** + * @description Reports an error message + * @param parentAction - parent action id. if not passed or null, error is added to current action + */ + reportError(error: string | Error, parentAction?: number): void; + /** + * @description Reports a warning message + * @param parentAction - parent action id. if not passed or null, error is added to current action + */ + reportWarning(warning: string, parentAction?: number): void; + /** + * @description Reports an event + * @param parentAction - parent action id. if not passed or null, error is added to current action + */ + reportEvent(msg: string, parentAction?: number): void; + /** + * @description Reports a key value pair to the server. The data can e.g. be used to create charts. + */ + reportValue(key: string, value: number): void; + /** + * @description Reports a key value pair to the server. The data can e.g. be used to create charts. + * The difference to the reportValue function is that here the value is a string. + */ + reportString(key: string, value: string): void; + /** + * @description The JavaScript ADK enables you to tag your visits with any value you want. + * Use tagVisit(visitName) to tag the current visit with the specified value + */ + tagVisit(visitName: string): void; + /** + * @description Indicates start of a third party resource + * @param type - i = image, s = script, c = custom + */ + startThirdParty(type: "i" | "s" | "c", url: string): void; + /** + * @description Indicates stop of a third party resource + * @param url - Complete URL of resource (must match URL provided in startThirdParty). + * @param success - True if the resource was loaded successfully, false if not. + * @param start - Absolute start time in milliseconds. When parameter is not passed or <= 0, + * time of startThirdParty call is used. + * @param stop - Absolute stop time in milliseconds. When parameter is not passed or <= 0, + * time of stopThirdParty call is used. + */ + stopThirdParty( + url: string, + success: boolean, + start?: number, + stop?: number + ): void; + /** + * @description Adds a listener that is called when the user is leaving the page, + * but before the monitor signal is sent + * @param listener A function that will be called in case the user leaves the page. + */ + addPageLeavingListener(listener: (key: string) => {}): void; + /** + * @description Sends a Streaming Node to the Server + * @param source - URL of the streaming resource + * @param duration - duration of the streaming resource in seconds + * @param userTriggered - did the user trigger the playback or did it start automatically? + * @param watchedCompletely - did the streaming resource play to the end? + * @param maxPlayTime - maximum progress this streaming resource had in seconds + * @param playTime - the time this streaming resource was playing in seconds + * @param bufferingCount - amount of bufferings that occured during the playback + * @param bufferingTime - total time spent with buffering in seconds + * @param type - action type of the streaming node. Is used for classifying events + * on the serverside, e.g. _info_, _warn_, _error_ + */ + addStreamingNode( + source: string, + duration: number, + userTriggered: boolean, + watchedCompletely: boolean, + maxPlayTime: number, + playTime: number, + bufferingCount: number, + bufferingTime: number, + type: "_info_" | "_warn_" | "_error_" + ): void; + /** + * @description Indicates the start of a user input. User inputs must always + * be stopped by calling endUserInput. If an xhr call or a page load happens + * it is checked if a user input is active. If yes, the user input is set to + * have triggered the page action. + * @param domNode - Which triggered the action (button, etc) is used for determining its caption + * @param type - Type of the user input: 'click', 'keypress', 'scroll',... + * @param addInfo - Additional info for user input such as key, mouse button, etc ('F5', 'RETURN',...) + * @param validTime - How long should the user input be able to open actions? default is 30ms + */ + beginUserInput( + domNode: any, + type: string, + addInfo: string, + validTime: number + ): any; + /** + * @description the user input object returned by beginUserInput + */ + endUserInput(userInputObject: any): void; + /** + * @description Initiate ajax action. Must be closed by leaveXhrAction afterwards. + * @param type Additional info about type of xhr (eg. framework name,etc) + * @param mode - The action mode: 0 .. just extend running ajax actions 1 .. extend any running action 2 .. + * extend any running action - visible subaction 3 .. start action if user input is present + * @param webSocket - Indicates if this action is a webSocket action or not + * @returns id of action + */ + enterXhrAction(type: string, mode: number, webSocket: boolean): number; + /** + * @description Indicates the end of an xhr action. Must be started by leaveXhrAction beforehand. + * @param id - id of action (must be the value returned by enterXhrAction) + */ + leaveXhrAction(id: number): void; + /** + * @description Indicates that an xhr callback is active (eg. XMLHttpRequest onreadystatechange). + * This is necessary to automatically add actions started during a callback as subactions. + * Xhr callback must be stopped by leaveXhrCallback. + * @param actionId - id of action where callback belongs to + */ + enterXhrCallback(actionId: number): void; + /** + * @description Indicates the end of an xhr callback. Must be called after enterXhrCallback. + * @param actionId - id of action where callback belongs to + */ + leaveXhrCallback(actionId: number): void; + /** + * @description Indicates the start of a load action. Frameworks often have their own load callback functions. + * This can be used when framework starts load before "DOMContentLoaded". + */ + signalOnLoadStart(): void; + /** + * @description Tells the JavaScript agent to wait for an additional call of signalOnLoadEnd. + * When the last call of signalOnLoadEnd is performed the "onload" action is closed. + * Note: if this function is called, signalOnLoadEnd MUST be called afterwards to indicated the end of one load. + * Otherwise there will be unexpected action behaviour. + */ + incrementOnLoadEndMarkers(): void; + /** + * @description Indicates the end of a load action. needs incrementOnLoadEndMarkers to be called before. + * As soon as the last signalOnLoadEnd is called, the "onload" action is closed. + */ + signalOnLoadEnd(): void; + /** + * @description By default a visit ends after a configurable inactivity time (default is 30 min.). + * Using the ADK, a visit can be ended forcibly, for example when a user logs out from an application. + * Simply call dynaTrace.endVisit() and the visit ends without waiting for the inactivity time. + * For correlation purposes the visit shows as active in the client for about three minutes, + * but actions sent after dynaTrace.endVisit() are added to a new visit. + * End the current UEM visit. This is useful for "logout" buttons, so that, + * when the user logs out, the user's visit can also be closed by calling this method. + */ + endVisit(): void; + /** + * @description Set the application version for this visit. + * This will be read on the server side and included as part of each visit for easy splitting. + * @param appVersion - The version string to be set. + */ + setAppVersion(appVersion: string): void; + /** + * @description Set meta-data for the page via a key/value pair. + * @param key - The readable key for the value + * @param value - The value to associate with the identifier + */ + setMetaData(key: string, value: string): void; +} + +declare let dynaTrace: dynaTrace; diff --git a/types/dynatrace/tsconfig.json b/types/dynatrace/tsconfig.json new file mode 100644 index 0000000000..6c137be982 --- /dev/null +++ b/types/dynatrace/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "dynatrace-tests.ts" + ] +} diff --git a/types/dynatrace/tslint.json b/types/dynatrace/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/dynatrace/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From b1d67d102779101709614ee6e60872bce77761aa Mon Sep 17 00:00:00 2001 From: Andrew Casey Date: Fri, 7 Dec 2018 13:36:29 -0800 Subject: [PATCH 480/608] Update CODEOWNERS --- .github/CODEOWNERS | 431 +++++++++++++++++++++++++++++++-------------- 1 file changed, 302 insertions(+), 129 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 94701801da..7e3c9ccc69 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -9,6 +9,7 @@ /types/absolute/ @AyaMorisawa /types/abstract-leveldown/ @MeirionHughes @danwbyrne /types/acc-wizard/ @cyrilschumacher +/types/accept/ @feinoujc /types/accept-language-parser/ @kampfgnom /types/accepts/ @bomret @brikou /types/accounting/ @gerich-home @chrisleck @@ -159,7 +160,7 @@ /types/ansi-escapes/ @jacobbubu /types/ansi-regex/ @mvachhar /types/ansi-styles/ @brynbellomy @plylrnsdy -/types/ansicolors/ @rogierschouten +/types/ansicolors/ @balupton /types/antlr4/ @mcchatman8009 /types/antlr4-autosuggest/ @jonfreedman /types/any-db/ @rogierschouten @@ -175,6 +176,7 @@ /types/apollo-codegen/ @bradleyayers @kostspielig /types/apollo-upload-client/ @Slessi /types/apostrophe/ @afholderman +/types/app-module-path/ @darkwebdev /types/app-root-dir/ @chenyang-biu /types/app-root-path/ @shantmarouti /types/appdmg/ @unindented @@ -212,7 +214,7 @@ /types/asenv/ @remisery /types/asn1js/ @microshine /types/aspnet-identity-pw/ @jt000 -/types/assert/ @nicoabie +/types/assert/ @nicoabie @LinusU /types/assert-equal-jsx/ @seryl /types/assert-plus/ @KostyaTretyak /types/assertsharp/ @brunolm @@ -231,6 +233,7 @@ /types/atlaskit__inline-edit/ @lstanden /types/atlaskit__layer/ @lstanden /types/atlaskit__single-select/ @lstanden +/types/atlaskit__tree/ @benhjames /types/atlassian-crowd-client/ @mtgto /types/atmosphere.js/ @toedter @Mory1879 @Scipion /types/atob/ @johngeorgewright @@ -254,6 +257,7 @@ /types/autoprefixer/ @odnamrataizem @murt /types/autosize/ @kingdango @keika299 @NeekSandhu /types/autosuggest-highlight/ @senukartur +/types/await-timeout/ @szhu /types/awesomplete/ @webbiesdk @bmdixon @tbekolay @chrislopresto /types/aws-iot-device-sdk/ @niik @mlamp /types/aws-lambda/ @skarum @tobyhede @buggy @y13i @wwwy3y3 @OrthoDex @MichaelMarner @daniel-cottone @kostya-misura @coderbyheart @palmithor @daniloraisi @simonbuchan @Haydabase @repl-chris @aneilbaboo @jeznag @louislarry @dpapukchiev @ohookins @trevor-leach @jagregory @@ -279,20 +283,19 @@ /types/babel__code-frame/ @mohsen1 @ForbesLindesay /types/babel__core/ @yortus @marvinhagemeister @mgroenhoff /types/babel__generator/ @yortus @johnnyestilles @mgroenhoff -/types/babel__parser/ @yortus @marvinhagemeister @mgroenhoff /types/babel__template/ @yortus @marvinhagemeister @mgroenhoff /types/babel__traverse/ @yortus @marvinhagemeister @rpetrich @mgroenhoff /types/babelify/ @TeamworkGuy2 @marvinhagemeister /types/babylon/ @yortus @marvinhagemeister /types/babylon-walk/ @czbuchi /types/babyparse/ @cdiddy77 -/types/backbone/ @borisyankov @nvivo @kenjiru +/types/backbone/ @borisyankov @nvivo @kenjiru @jjoekoullas /types/backbone-associations/ @craigbrett17 /types/backbone-fetch-cache/ @delphinus35 /types/backbone-relational/ @eirikhm /types/backbone.layoutmanager/ @hejiang2000 /types/backbone.localstorage/ @lgrignon -/types/backbone.marionette/ @zhamid @nvivo @sventschui @razorness @confususs +/types/backbone.marionette/ @zhamid @nvivo @sventschui @razorness @confususs @jjoekoullas /types/backbone.paginator/ @Nyamazing /types/backbone.radio/ @alphaleonis /types/backgrid/ @jlujan @@ -301,6 +304,7 @@ /types/backoff/ @BendingBender /types/baconjs/ @alexander-matsievsky @gekkio /types/bagpipes/ @micmro +/types/baidu-app/ @taoqf /types/barbellweights/ @evelijn /types/barcode/ @pvomhoff /types/bardjs/ @TepigMC @@ -329,7 +333,7 @@ /types/better-curry/ @pocesar /types/better-queue/ @maozedong /types/better-scroll/ @stoneChen @cnjack -/types/better-sqlite3/ @Morfent @matrumz +/types/better-sqlite3/ @Morfent @matrumz @sant123 /types/bezier-easing/ @ptlis /types/bezier-js/ @danmarshall @Epskampie /types/bgiframe/ @sumegizoltan @@ -340,7 +344,7 @@ /types/bignum/ @Patman64 /types/bigscreen/ @dduugg /types/bin-pack/ @orentrutner -/types/binary-parser/ @riggs @dolanmiu +/types/binary-parser/ @riggs @dolanmiu @yuhr /types/bind-ponyfill/ @skysteve /types/bindings/ @unindented /types/bintrees/ @CjS77 @@ -352,7 +356,7 @@ /types/bitcoinjs-lib/ @mhegazy @dlebrecht @rbuckton @micksatana @youssefgh @kento1218 /types/bitcore-lib/ @lautarodragan /types/bittorrent-protocol/ @feross @tlaziuk -/types/bitwise-xor/ @rogierschouten +/types/bitwise-xor/ @rogierschouten @BendingBender /types/bl/ @Bartvds @reconbot /types/blacklist/ @mhegazy /types/blazy/ @julienpa @@ -425,6 +429,7 @@ /types/browser-resolve/ @marionebl /types/browser-sync/ @joeskeen @aznnomness /types/browserify/ @AndrewGaspar @jvilk @leonard-thieu @LinusU +/types/browserslist/ @davecardwell /types/bs58/ @chrootsu /types/bson/ @horiuchi @CaselIT /types/btoa/ @johngeorgewright @@ -438,7 +443,7 @@ /types/bufferstream/ @Bartvds /types/builtin-modules/ @ajafff /types/bull/v2/ @bgrieder @JProgrammer -/types/bull/ @bgrieder @JProgrammer @marshall007 @weeco @blaugold @iamolegga @koblas @bondz @wuha-team @aleccool213 @danmana +/types/bull/ @bgrieder @JProgrammer @marshall007 @weeco @blaugold @iamolegga @koblas @bondz @wuha-team @aleccool213 @danmana @kjellmorten @pc-jedi /types/bump-regex/ @silkentrance /types/bunnymq/ @cyrilschumacher /types/bunyan/ @amikhalev @@ -457,6 +462,7 @@ /types/bytewise/ @danwbyrne /types/c3/ @mcliment @gerinjacob @denyo @dmitryshindin @timn /types/cache-manager/ @GausSim +/types/cached-path-relative/ @TeamworkGuy2 /types/cal-heatmap/ @RetroChrisB /types/caller/ @ignocide /types/callsite/ @newclear @@ -468,6 +474,7 @@ /types/camo/ @lucasmciruzzi /types/cancan/ @Vincent-Pang /types/caniuse-api/ @davecardwell +/types/caniuse-lite/ @mutech /types/cannon/ @clark-stevenson @Gelio /types/canvas-confetti/ @matracey /types/canvas-gauges/ @Mikhus @@ -482,10 +489,12 @@ /types/cassandra-driver/ @Svjard @pc-jedi /types/catbox/v7/ @jasonswearingen @AJamesPhillips /types/catbox/ @jasonswearingen @AJamesPhillips @saboya +/types/catbox-memory/ @SimonSchick /types/catbox-redis/ @SimonSchick /types/cbor/ @pushplay /types/ccap/ @taoqf /types/cesium/ @Zuzon @hnipps @szechyjs @golyalpha +/types/cfn-response/ @ivoisbelongtous /types/chai/v2/ @Bartvds @AGBrown /types/chai/ @jedmao @Bartvds @AGBrown @olivr70 @mwistrand @joshuakgoldberg @shaunluttin @Naktibalda @micksatana @ErikSchierboom /types/chai-arrays/ @clementprevot @@ -520,7 +529,7 @@ /types/check-types/ @idchlife /types/checkstyle-formatter/ @mhegazy /types/checksum/ @rogierschouten -/types/cheerio/ @blittle @wmaurer @umarniz @LiJinyao @chennakrishna8 +/types/cheerio/ @blittle @wmaurer @umarniz @LiJinyao @chennakrishna8 @AzSiAz /types/chess.js/ @JacobFischer /types/chessboardjs/ @sliverb @davidmpaz /types/chmodr/ @BendingBender @@ -538,7 +547,8 @@ /types/circuit-breaker-js/ @DeTeam /types/circular-json/ @jpevarnek /types/ckeditor/v2/ @wittwert -/types/ckeditor/ @wittwert @stuartlong +/types/ckeditor/ @wittwert @stuartlong @viktorpegy +/types/ckeditor__ckeditor5-utils/ @denisname /types/clamp-js/ @Hikariii /types/clamp-js-main/ @sinziananicolae /types/classnames/ @adidahiya @JKillian @seansfkelley @mradamczyk @marvinhagemeister @@ -552,6 +562,7 @@ /types/clearbladejs-server/ @ClearBlade /types/cleave.js/ @clentfort @jasongi-at-sportsbet @sashashakun /types/cli/ @kayahr +/types/cli-box/ @athasach /types/cli-color/ @ChaosinaCan /types/cli-interact/ @ffflorian /types/cli-progress/ @mhegazy @@ -579,7 +590,7 @@ /types/co-body/ @geoffreak /types/co-views/ @devlee @geoffreak /types/code/ @prashaantt -/types/codemirror/ @mihailik @nrbernard @Pr1st0n @rileymiller +/types/codemirror/ @mihailik @nrbernard @Pr1st0n @rileymiller @toddself /types/codependency/ @morphatic /types/coffeeify/ @tkQubo /types/coinbase/ @rogierschouten @@ -598,9 +609,10 @@ /types/com.darktalker.cordova.screenshot/ @akarienta /types/com.wikitude.phonegap.wikitudeplugin/ @zbarbuto /types/combine-source-map/ @TeamworkGuy2 -/types/combined-stream/ @felixge @tlaziuk +/types/combined-stream/ @felixge @tlaziuk @konpikwastaken /types/combokeys/ @iclanton /types/cometd/ @derekcicerone @unindented @alxHenry +/types/command-exists/ @BendingBender /types/command-line-args/v4/ @CzBuCHi @75lb /types/command-line-args/ @75lb /types/command-line-commands/ @CzBuCHi @@ -610,9 +622,10 @@ /types/commercetools__enzyme-extensions/ @screendriver /types/common-errors/ @icopp /types/common-prefix/ @seangenabe -/types/common-tags/ @zuzusik @tzupengwang +/types/common-tags/ @zuzusik @tzupengwang @BendingBender /types/commondir/ @leonard-thieu /types/commonmark/ @nicojs @leonard-thieu +/types/compare-func/ @fennibay /types/compare-version/ @jpevarnek /types/compare-versions/ @LogvinovLeon /types/complex/ @AyaMorisawa @pavasich @@ -662,7 +675,7 @@ /types/convert-layout/ @xeningem /types/convert-source-map/ @AndrewGaspar @mgroenhoff @TeamworkGuy2 /types/convict/ @Nemo157 @vesse @elyscape @vanthiyathevan -/types/cookie/ @pine613 +/types/cookie/ @pine /types/cookie-parser/ @santialbo @BendingBender /types/cookie-session/ @borislavjivkov /types/cookie-signature/ @lith-light-g @@ -706,7 +719,8 @@ /types/countdown/ @gjuchault /types/counterpart/ @santiagodoldan /types/countries-and-timezones/ @zero51 -/types/country-list/ @iRoachie +/types/country-list/v1/ @iRoachie +/types/country-list/ @iRoachie @Kimahriman /types/country-select-js/ @humrochagf /types/countup.js/ @shermendev /types/coverup/ @bevalorous @@ -717,6 +731,8 @@ /types/cradle/ @panuhorsmalahti /types/crc/ @YuJianrong /types/create-error/ @tkrotoff +/types/create-hash/ @BendingBender +/types/create-hmac/ @BendingBender /types/create-react-class/ @jgoz /types/create-subscription/ @Asana @vsiao /types/createjs/ @evilangelist @gyohk @@ -731,20 +747,24 @@ /types/crossfilter/ @schmuli @iebaker @nordfjord /types/crossroads/ @diullei /types/crpc/ @0xdeafcafe +/types/crumb/ @lenovouser @SimonSchick /types/cryptiles/ @awendland /types/crypto-js/ @misak113 /types/crypto-random-string/ @MrManny /types/cryptojs/ @giabao +/types/cryptr/ @rrogowski /types/cson/ @stpettersens +/types/cson-parser/ @lenovouser /types/csprng/ @winksaville /types/csrf/ @markis /types/css/ @ilich /types/css-font-loading-module/ @slikts /types/css-modules/ @NeekSandhu /types/css-to-style/ @bengry +/types/css-tree/ @erik-kallen /types/cssbeautify/ @rictic /types/cssnano/ @odnamrataizem -/types/csso/ @screendriver +/types/csso/ @screendriver @erik-kallen /types/csurf/ @horiuchi /types/csv-parse/ @davidm77 @obi-jan-kenobi /types/csv-stringify/ @rogierschouten @arjenvanderende @@ -777,7 +797,7 @@ /types/d3-delaunay/ @BTOdell /types/d3-dispatch/ @tomwanzek @gustavderdrache @borisyankov @denisname /types/d3-drag/ @tomwanzek @gustavderdrache @borisyankov -/types/d3-dsv/ @tomwanzek @gustavderdrache @borisyankov +/types/d3-dsv/ @tomwanzek @gustavderdrache @borisyankov @denisname /types/d3-ease/ @tomwanzek @gustavderdrache @borisyankov /types/d3-fetch/ @ledragon /types/d3-force/ @tomwanzek @gustavderdrache @borisyankov @@ -843,7 +863,8 @@ /types/dd-trace/ @ColinBradley @alloy /types/deasync/ @Sicilica /types/debessmann/ @vkorehov -/types/debounce/ @denis-sokolov @joshuakgoldberg +/types/debounce/ @denis-sokolov @joshuakgoldberg @wcarson +/types/debounce-promise/ @whtsky /types/debug/ @swook @galtalmor @zamb3zi @brasten /types/decamelize/ @samverschueren /types/decay/ @enaeseth @@ -876,10 +897,13 @@ /types/depd/ @danny8002 @BendingBender /types/dependency-tree/ @joscha /types/deployjava/ @cyrilschumacher +/types/deprecate/ @Toilal +/types/deps-sort/ @TeamworkGuy2 /types/derhuerst__cli-on-key/ @jacobbubu /types/destroy/ @BendingBender /types/destroy-on-hwm/ @BendingBender -/types/detect-browser/ @rogierschouten +/types/detect-browser/ @rogierschouten @carusology +/types/detect-character-encoding/ @BendingBender /types/detect-hover/ @thomastilkema /types/detect-indent/v0/ @Bartvds /types/detect-indent/ @Bartvds @BendingBender @@ -901,17 +925,21 @@ /types/di-lite/ @dcrusader /types/diacritics/ @otociulis /types/dialogflow/ @dyladan +/types/dicer/ @GoupilRobin @BendingBender /types/diff/ @vvakame @szdc @moc-yuto /types/diff2html/ @rtfpessoa +/types/diffie-hellman/ @BendingBender /types/digibyte/ @lautarodragan @werewolfe +/types/dinero.js/ @BendingBender /types/dir-resolve/ @andy-ms /types/discontinuous-range/ @OiCMudkips +/types/discord-rpc/ @jasonhaxstuff /types/discourse-sso/ @championswimmer /types/dispatchr/ @Ragg- /types/disposable-email-domains/ @geoffreak /types/dnssd/ @angelmerino @Maxr1998 /types/doccookies/ @jonegerton -/types/dockerode/ @seikho @nlaplante @isac322 @lazarusx @meisenzahl @thegecko +/types/dockerode/ @seikho @nlaplante @isac322 @lazarusx @meisenzahl @thegecko @CameronDiver /types/docopt/ @giggio /types/doctrine/ @rictic /types/document-promises/ @NotWoods @@ -923,6 +951,7 @@ /types/dom-clipboard-api/ @43081j /types/dom-inputevent/ @diagramatics /types/dom-loaded/ @ltetzlaff +/types/dom-mediacapture-record/ @eliasmeire /types/dom-to-image/ @JipSterk /types/dom4/ @adidahiya @giladgray /types/domo/ @Steve-Fenton @@ -937,7 +966,7 @@ /types/dotdir-regex/ @mrmlnc /types/dotdotdot/ @milanjaros /types/dotenv/v2/ @jussikinnula @borekb @enaeseth -/types/dotenv/ @jussikinnula @borekb @enaeseth +/types/dotenv/ @jussikinnula @borekb @enaeseth @maxbeatty /types/dotenv-safe/ @krenor /types/dotenv-webpack/ @karol-majewski /types/dotfile-regex/ @mrmlnc @@ -984,7 +1013,7 @@ /types/easy-xapi/ @DeadAlready /types/easy-xapi-utils/ @DeadAlready /types/ebongarde-root/ @Ebongarde -/types/echarts/ @xieisabug @AntiMoron @liveangela @Ovilia +/types/echarts/ @xieisabug @AntiMoron @liveangela @Ovilia @iRON5 /types/ecma-proposal-math-extensions/ @ksm2 /types/ecurve/ @mhegazy /types/ed25519/ @erikma @@ -1018,7 +1047,7 @@ /types/electron-winstaller/ @shiftkey @unindented /types/elegant-spinner/ @danwbyrne /types/element-ready/ @BendingBender -/types/element-resize-detector/ @saranshkataria +/types/element-resize-detector/ @saranshkataria @franklixuefei /types/element-resize-event/ @rogierschouten @plgregoire /types/elementtree/ @dwieeb /types/elliptic/ @danwbyrne @@ -1062,6 +1091,7 @@ /types/emoji-regex/ @iKBAHT /types/emojione/ @dbrgn /types/empower/ @vvakame +/types/empty-dir/ @BendingBender /types/emscripten/ @zakki @periklis /types/encoding-down/ @MeirionHughes @danwbyrne /types/end-of-stream/ @strax @@ -1079,6 +1109,7 @@ /types/enzyme-adapter-react-15/ @tkrotoff /types/enzyme-adapter-react-15.4/ @nali /types/enzyme-adapter-react-16/ @tkrotoff +/types/enzyme-async-helpers/ @kimehrenpohl /types/enzyme-redux/ @knegusen /types/enzyme-to-json/ @joscha /types/eonasdan-bootstrap-datetimepicker/ @ToastHawaii @@ -1137,17 +1168,21 @@ /types/exit/ @Bartvds /types/exit-hook/ @BendingBender /types/exorcist/ @TeamworkGuy2 +/types/expand-tilde/ @carnesen /types/expect/ @jmreidy @merrywhether /types/expect-puppeteer/ @JoshuaKGoldberg @tkrotoff /types/expect.js/ @teppeis /types/expectations/ @vvakame /types/expired-storage/ @intolerance +/types/expirymanager/ @DanielRose /types/expo/v23/ @KonstantinKai /types/expo/v24/ @KonstantinKai @martynaskadisa @janaagaard75 @ssanchezmarc @fhelwanger /types/expo/v25/ @KonstantinKai @martynaskadisa @janaagaard75 @ssanchezmarc @fhelwanger @umidbekkarimov /types/expo/v26/ @KonstantinKai @martynaskadisa @janaagaard75 @ssanchezmarc @fhelwanger @umidbekkarimov @tinaroh /types/expo/v27/ @KonstantinKai @martynaskadisa @janaagaard75 @ssanchezmarc @fhelwanger @umidbekkarimov @moshfeu @prokopcm @tinaroh @binki @mo -/types/expo/ @KonstantinKai @martynaskadisa @janaagaard75 @ssanchezmarc @fhelwanger @umidbekkarimov @moshfeu @prokopcm @tinaroh @binki @mo +/types/expo/v30/ @KonstantinKai @martynaskadisa @janaagaard75 @ssanchezmarc @fhelwanger @umidbekkarimov @moshfeu @prokopcm @tinaroh @binki @mo +/types/expo/ @KonstantinKai @martynaskadisa @janaagaard75 @ssanchezmarc @fhelwanger @umidbekkarimov @moshfeu @prokopcm @tinaroh @binki @mo @levansuper @ihmpavel +/types/expo-localization/ @burtek /types/expo__status-bar-height/ @dawnmist /types/expo__vector-icons/ @incleaf /types/express/ @borisyankov @@ -1188,6 +1223,7 @@ /types/express-redis-cache/ @ajliv /types/express-route-fs/ @kripod /types/express-routemap/ @icopp +/types/express-routes-versioning/ @weffe /types/express-sanitized/ @cjbarth /types/express-serve-static-core/ @borisyankov @19majkel94 @kacepe @micksatana @samijaber /types/express-session/ @horiuchi @jacobbogers @builtinnya @ry7n @@ -1195,6 +1231,8 @@ /types/express-socket.io-session/ @AylaJK /types/express-to-koa/ @xiaohanzhang /types/express-unless/ @wokim +/types/express-version-request/ @weffe +/types/express-version-route/ @weffe /types/express-wechat-access/ @simmons8616 /types/express-winston/ @bricka /types/express-ws/ @ajliv @@ -1226,11 +1264,11 @@ /types/fancy-log/ @pine /types/fancybox/ @borisyankov /types/farbtastic/ @EnableSoftware -/types/fast-diff/ @djrenren /types/fast-levenshtein/ @mizunashi-mana /types/fast-list/ @BendingBender /types/fast-stats/ @rogierschouten /types/fastclick/ @shinnn +/types/fastify-accepts/ @leomelzer /types/fastify-cors/ @jannikkeye /types/fastify-jwt/ @jannikkeye /types/fastify-multipart/ @jannikkeye @@ -1283,13 +1321,15 @@ /types/finalhandler/ @chrootsu /types/finch/ @DavidSichau /types/find/ @andypyrope +/types/find-package-json/ @BendingBender /types/find-parent-dir/ @ikatyang /types/find-process/ @buaban /types/find-project-root/ @ikatyang /types/find-root/ @Alorel /types/find-up/ @BendingBender -/types/find-versions/ @LogvinovLeon +/types/find-versions/ @LogvinovLeon @carnesen /types/findup-sync/ @Bartvds @ngbrown +/types/fined/ @BendingBender /types/fingerprintjs/ @zaneli /types/fingerprintjs2/ @curtstate /types/firebase-client/ @fpsscarecrow @@ -1301,7 +1341,9 @@ /types/first-mate/ @GlenCFL /types/fixed-data-table/ @pepaar @stephenjelfs /types/fixed-data-table-2/ @ilivit +/types/flagged-respawn/ @BendingBender /types/flat/ @chrootsu +/types/fleximap/ @DanielRose /types/flexslider/ @diullei /types/flickity/ @clmcgrath @wagich /types/flight/ @jonathanhedren @@ -1309,6 +1351,7 @@ /types/flipsnap/ @kubosho @gsino @mayuki /types/float-regex/ @wanganjun /types/flot/ @burlandm @Anticom @admiralsmaster +/types/flowdoc/ @animify /types/flowjs/ @ryan10132 /types/fluent-ffmpeg/ @tcaesvk @DingWeizhe @mabidina /types/flush-write-stream/ @djcsdy @@ -1374,6 +1417,7 @@ /types/fusioncharts/ @rohitkr @shivarajkv /types/fuzzaldrin/ @mhegazy /types/fuzzaldrin-plus/ @jeancroy @jkillian @reyronald +/types/fuzzy-search/ @alex-deas @BendingBender /types/fuzzyset/ @lgrignon @narainsagar /types/fuzzyset.js/ @lgrignon @narainsagar /types/fxn/ @charrondev @@ -1547,6 +1591,7 @@ /types/getos/ @BendingBender /types/gettext.js/ @jucrouzet /types/gh-pages/ @DanielRosenwasser +/types/ghauth/ @Leko /types/gifffer/ @gatimus /types/gijgo/ @atatanasov /types/giraffe/ @darthapo @@ -1555,11 +1600,17 @@ /types/git-config/ @stpettersens /types/git-remote-origin-url/ @janslow /types/git-rev-sync/ @khoi-fish +/types/git-root-dir/ @ffflorian /types/git-url-parse/ @ajafff +/types/gitconfiglocal/ @ffflorian /types/github-url-to-object/ @ajafff /types/github-username-regex/ @BehindTheMath -/types/gitlab/ @yanqing6628780 @Arylo /types/gl-matrix/ @mattijskneppers @tatchx @nbabanov @auzmartist @surtr-isaz +/types/gl-react/ @jussikinnula +/types/gl-react-dom/ @jussikinnula +/types/gl-react-expo/ @jussikinnula +/types/gl-react-headless/ @jussikinnula +/types/gl-react-native/ @jussikinnula /types/gl-shader/ @MathiasPaumgarten /types/gl-texture2d/ @MathiasPaumgarten /types/gldatepicker/ @qcz @@ -1585,12 +1636,12 @@ /types/google-apps-script-oauth2/ @dhayab /types/google-cloud__datastore/ @beaulac @ogawa0071 @ThomasdenH /types/google-cloud__pubsub/ @pheromonez @LunaPg @msiviero -/types/google-cloud__storage/ @blove @nbperry @welkie @ogawa0071 /types/google-earth/ @icholy /types/google-images/ @dolanmiu /types/google-libphonenumber/ @leonyu @winfinit /types/google-map-react/ @honzabrecka /types/google-maps/ @DeividasBakanas @GiedriusGrabauskas +/types/google-maps-react/ @gburgett @jpowell /types/google-protobuf/ @marcuslongmuir /types/google-translate-api/ @maple3142 /types/google.analytics/ @tyler-murphy @@ -1598,7 +1649,7 @@ /types/google.fonts/ @danmarshall /types/google.geolocation/ @vbortone /types/google.picker/ @grapswiz -/types/google.visualization/ @danludwig @gmoore-sjcorg @danmana @mlcheng @IvanBisultanov @glebm +/types/google.visualization/ @danludwig @gmoore-sjcorg @danmana @mlcheng @IvanBisultanov @glebm @shrujalshah28 /types/google__maps/ @indrimuska /types/googlemaps/ @cgwrench @nertzy @xaolas @mrmcnerd @martincostello @svenkreiss @bolatovumar @gauthierm /types/googlemaps.infobubble/ @Dashue @@ -1616,6 +1667,7 @@ /types/graphql-date/ @enaeseth /types/graphql-deduplicator/ @lfades /types/graphql-depth-limit/ @eritikass +/types/graphql-fields/ @feinoujc /types/graphql-iso-date/ @jwaldrip /types/graphql-list-fields/ @filipows /types/graphql-query-complexity/ @abhikmitra @@ -1678,6 +1730,7 @@ /types/gulp-jasmine/ @andypyrope /types/gulp-jasmine-browser/ @tkrotoff /types/gulp-json-editor/ @peterjuras +/types/gulp-json-validator/ @pe8ter /types/gulp-jsonmin/ @romain-faust /types/gulp-jsonminify/ @pine /types/gulp-jspm/ @peterjuras @@ -1722,12 +1775,14 @@ /types/halogen/ @steller /types/hammerjs/ @milkisevil @codler /types/handlebars/ @borisyankov @evil-shrike +/types/handlebars-helpers/ @Toilal /types/hapi/v8/ @jasonswearingen /types/hapi/v12/ @jasonswearingen /types/hapi/v15/ @jasonswearingen /types/hapi/v16/ @jasonswearingen @AJamesPhillips /types/hapi/ @rafaelsouzaf @jhsimms @SimonSchick /types/hapi-auth-basic/ @AJamesPhillips @saboya +/types/hapi-auth-cookie/ @lenovouser @SimonSchick @Mutmatt /types/hapi-auth-jwt2/v7/ @warrenseymour /types/hapi-auth-jwt2/ @warrenseymour @SimonSchick /types/hapi-decorators/ @kenhowardpdx @@ -1764,6 +1819,7 @@ /types/hexo-fs/ @segayuu /types/hexo-log/ @segayuu /types/hexo-util/ @segayuu +/types/hibp/ @lenovouser /types/highcharts/ @damianog @baltie @AlbertOzimek @hanssens /types/highcharts-ng/ @scatcher /types/highland/ @Bartvds @hgwood @iwllyu @alvis @notbobthebuilder @@ -1821,6 +1877,7 @@ /types/humanparser/ @MichalPodeszwa /types/humps/ @nikeee /types/hyco-ws/ @mrcabellom +/types/hyper-aws4/ @bambutz /types/hyperscript/ @spacejack @jmfirth /types/hypertext-application-language/ @maks3w /types/hystrixjs/ @igorsechyn @@ -1867,7 +1924,7 @@ /types/images/ @DingWeizhe /types/imagesloaded/ @coldacid @apexskier /types/imap/ @psnider -/types/imap-simple/ @pushplay +/types/imap-simple/ @pushplay @iaarnio /types/imgur-rest-api/ @lukewestby /types/imperium/ @gaetansenn /types/impress/ @borisyankov @@ -1881,7 +1938,7 @@ /types/inflected/ @dsci /types/inflection/ @shiwano /types/inherits/ @chrootsu -/types/ini/ @marcinporebski +/types/ini/ @marcinporebski @carnesen /types/iniparser/ @chrootsu /types/init-package-json/ @kfarnung /types/inline-css/ @philipisapain @@ -1890,33 +1947,38 @@ /types/inquirer-npm-name/ @manuth /types/insert-module-globals/ @leonard-thieu /types/insight/ @vvakame +/types/instabug-reactnative/ @pengcao1 /types/integer/ @Morfent /types/intercom-client/ @jineshshah36 @peping /types/intercom-web/ @fongandrew @salbahra @onatm /types/intercomjs/ @spencerwi /types/internal-ip/ @BendingBender +/types/interpret/ @BendingBender /types/intl/ @RagibHasin /types/intl-locales-supported/ @Slessi /types/intl-messageformat/ @mhegazy /types/intl-relativeformat/ @mohsen1 -/types/intl-tel-input/ @fdnhkj @leonard-thieu +/types/intl-tel-input/v13/ @fdnhkj @leonard-thieu +/types/intl-tel-input/ @fdnhkj @leonard-thieu @molnarm /types/into-stream/ @BendingBender /types/intrinsic-scale/ @shalomdotnet /types/intro.js/ @anahkiasen /types/invariant/ @bennett000 /types/inversify-devtools/ @inversify +/types/iobroker/ @AlCalzone /types/ion-rangeslider/v1/ @dduugg @Karel-van-de-Plassche /types/ion-rangeslider/ @Karel-van-de-Plassche /types/ioredis/v3/ @plantain-00 @chrisleck @aliarham11 @br8h @shaharmor @palindrom615 @reconbot -/types/ioredis/ @plantain-00 @chrisleck @aliarham11 @br8h @shaharmor @palindrom615 @reconbot @funthing @iamolegga +/types/ioredis/ @plantain-00 @chrisleck @aliarham11 @br8h @shaharmor @palindrom615 @reconbot @funthing @iamolegga @tingwai-to /types/iota.lib.js/ @fogsh /types/ip/ @codeanimal /types/ip-address/ @icopp @danwbyrne /types/ip-regex/ @unindented /types/ipcheck/ @bengry /types/irc/ @phillips1012 +/types/iri/ @BendingBender /types/iron/ @simonschick @rafaelsouzaf -/types/is/ @cabralRodrigo +/types/is/ @cabralRodrigo @gricey432 /types/is-absolute-url/ @mhegazy /types/is-alphanumerical/ @vutran /types/is-archive/ @mhegazy @@ -1936,10 +1998,12 @@ /types/is-my-json-valid/ @kruncher /types/is-negated-glob/ @ajafff /types/is-number/ @harryshipton +/types/is-obj/ @forivall /types/is-object/ @wbhob /types/is-path-cwd/ @DanielRosenwasser /types/is-path-in-cwd/ @mhegazy /types/is-promise/ @DanielRosenwasser +/types/is-regexp/ @forivall /types/is-relative-url/ @mhegazy /types/is-root/ @mhegazy /types/is-root-path/ @mhegazy @@ -1975,7 +2039,9 @@ /types/jade/ @panuhorsmalahti /types/jalaali-js/ @alitaheri /types/japanese-holidays/ @syamatoo -/types/jasmine/ @borisyankov @theodorejb @davidparsson @gmoothart @lukas-zech-software @Engineer2B +/types/jasmine/v1/ @borisyankov +/types/jasmine/v2/ @borisyankov @theodorejb @davidparsson @gmoothart @lukas-zech-software @Engineer2B @cyungmann +/types/jasmine/ @borisyankov @theodorejb @davidparsson @gmoothart @lukas-zech-software @Engineer2B @cyungmann @Roaders /types/jasmine-ajax/ @lgrignon /types/jasmine-data-provider/ @tlaziuk /types/jasmine-data_driven_tests/ @AnthonyMacKinnon @@ -1991,7 +2057,7 @@ /types/jasminewd2/ @sjelin @gkalpak /types/java/ @jimlloyd @hrl7 @darti /types/java-applet/ @cyrilschumacher -/types/javascript-astar/ @ptlis +/types/javascript-astar/ @ptlis @lazerwalker /types/javascript-bignum/ @sandersn /types/javascript-obfuscator/ @sanex3339 /types/javascript-state-machine/ @borisyankov @mdocter @MrBigDog2U @samael65535 @taoqf @@ -2021,10 +2087,11 @@ /types/jexl/ @m-tomczyk /types/jfs/ @tlaziuk /types/jira-client/ @KOPTE3 @orta +/types/jju/ @ecraig12345 @rlidwka /types/jjv/ @Nemo157 /types/jjve/ @Nemo157 /types/jmespath/ @pushplay -/types/johnny-five/ @nakakura @ujvzolee @workshop2 +/types/johnny-five/ @nakakura @ujvzolee @workshop2 @xtrimsystems /types/joi/v6/ @Bartvds @laurence-myers @cglantschnig @DavidBR-SW /types/joi/v10/ @Bartvds @laurence-myers @cglantschnig @DavidBR-SW @GaelMagnan @ralekna @schfkt @rokoroku @aconanlai /types/joi/v13/ @Bartvds @laurence-myers @cglantschnig @DavidBR-SW @GaelMagnan @ralekna @schfkt @rokoroku @dankraus @wanganjun @rafaelkallis @aconanlai @zaphoyd @thewillg @SimonSchick @@ -2173,7 +2240,7 @@ /types/js-sha512/ @nicojs /types/js-string-escape/ @viralpickaxe /types/js-to-java/ @skyitachi -/types/js-url/ @pine613 +/types/js-url/ @pine /types/js-yaml/ @Bartvds @sclausen /types/js.spec/ @mattbishop /types/jsbn/ @Evgenus @al2xed @@ -2201,6 +2268,7 @@ /types/json-rpc-random-id/ @micahriggan /types/json-rpc-ws/ @npenin @mlamp /types/json-schema/ @bcherny @cyrilletuzi @lucianbuzzo @rolandjitsu +/types/json-server/ @jeremyben /types/json-socket/ @svi3c /types/json-stable-stringify/ @mhfrantz /types/json-stringify-safe/ @BendingBender @@ -2208,6 +2276,7 @@ /types/json2md/ @MartynasZilinskas /types/json3/ @NN--- /types/json5/ @Esemesek +/types/json_ml/ @pluma /types/jsonata/ @nick121212 /types/jsoneditor/ @alejo90 @errietta /types/jsoneditor-for-react/ @joshuakgoldberg @@ -2225,7 +2294,7 @@ /types/jsonwebtoken/ @SomaticIT @danielheim @brikou @vpk @rlgod /types/jsonwebtoken-promisified/ @SomaticIT @danielheim @brikou @aneilbaboo /types/jspath/ @dex4er -/types/jspdf/ @amberjs +/types/jspdf/ @amberjs @lleios @jemerald /types/jsqrcode/ @lordazzi /types/jsrender/ @zakki /types/jsreport-core/ @taoqf @@ -2253,6 +2322,7 @@ /types/jui-grid/ @easylogic /types/just-debounce-it/ @azizhk /types/just-extend/ @pe8ter +/types/just-pick/ @pe8ter /types/jweixin/ @taoqf @gomydodo /types/jwplayer/ @martinduparc @kutomer @philippguertler @danielmcgraw @bpdsw /types/jws/ @JustinBeckwith @@ -2268,7 +2338,7 @@ /types/karma/ @tkrotoff @43081j @devoto13 /types/karma-chai/ @JayAndCatchFire /types/karma-chai-sinon/ @vasek17 -/types/karma-coverage/ @tkrotoff +/types/karma-coverage/ @tkrotoff @devoto13 /types/karma-fixture/ @evictor @afshawnlotfi /types/karma-jasmine/ @michelsalib /types/karma-viewport/ @karak @@ -2276,9 +2346,11 @@ /types/katex/ @mrand01 /types/kcors/ @Xstoudi @izayoiko /types/kdbush/ @DenisCarriere @chrfrasco +/types/kdbxweb/ @Roang-zero1 /types/keen-tracking/ @rui-ferreira /types/kefir/ @AyaMorisawa @HitoriSensei /types/kendo-ui/ @telerik +/types/kerberos/ @velezsarain /types/keyboardjs/ @vbortone @piranha771 @teoxoy /types/keycloak-connect/ @gstamac /types/keygrip/ @jkeylu @@ -2293,10 +2365,10 @@ /types/klaw/ @mceachen /types/klaw-sync/ @shiftkey /types/kms-json/ @sunnyone -/types/knex/ @tkQubo @MeLlamoPablo @mastermatt @micksatana @shreyjain1994 +/types/knex/ @tkQubo @MeLlamoPablo @mastermatt @micksatana @shreyjain1994 @joelshepherd /types/knex-postgis/ @vesse /types/knockback/ @borisyankov -/types/knockout/ @borisyankov @Igorbek @moonpyk @EnableSoftware @BenjaminEckardt @ffMathy @ltlombardi +/types/knockout/ @borisyankov @Igorbek @moonpyk @EnableSoftware @BenjaminEckardt @ffMathy @ltlombardi @Retsam /types/knockout-amd-helpers/ @DavidSichau /types/knockout-secure-binding/ @pine613 /types/knockout-transformations/ @johnnyreilly @Nemo157 @@ -2317,7 +2389,8 @@ /types/koa/ @DavidCai1993 @jkeylu @brikou /types/koa-basic-auth/ @Tobias4872 /types/koa-better-body/ @danwbyrne -/types/koa-bodyparser/ @hellopao @anup-2s +/types/koa-bodyparser/ @hellopao @anup-2s @hirochachacha +/types/koa-bouncer/ @maruware /types/koa-bunyan-logger/ @sjmcdowall /types/koa-cache-control/ @pe8ter /types/koa-compose/ @jkeylu @@ -2332,9 +2405,10 @@ /types/koa-hbs/ @jcbmln @mudkipme /types/koa-helmet/ @me /types/koa-html-minifier/ @romain-faust -/types/koa-joi-router/ @wingsbob @move-zig +/types/koa-joi-router/ @wingsbob @move-zig @hirochachacha /types/koa-json/ @brooklyndev /types/koa-json-error/ @mudkipme +/types/koa-log/ @havenchyk /types/koa-logger/ @geoffreak @tlaziuk /types/koa-logger-winston/ @stevehipwell /types/koa-morgan/ @vesse @@ -2343,14 +2417,16 @@ /types/koa-passport/ @horiuchi @tlaziuk @brendtumi /types/koa-pino-logger/ @khell /types/koa-pug/ @Xstoudi +/types/koa-qs/ @RemyJeancolas /types/koa-range/ @strax /types/koa-ratelimit/ @OutdatedVersion +/types/koa-ratelimit-lru/ @danwbyrne /types/koa-redis/ @nsimmons /types/koa-redis-cache/ @dimamukhin /types/koa-requestid/ @sjmcdowall /types/koa-response-time/ @thorsedeke @sjmcdowall /types/koa-route/ @migstopheles @jacogr -/types/koa-router/ @hellopao @schfkt @JounQin @romain-faust +/types/koa-router/ @hellopao @schfkt @JounQin @romain-faust @Guillaume-Mayer @falinor /types/koa-send/ @pe8ter @tlaziuk /types/koa-session/ @kerol2r20 @tlaziuk /types/koa-session-minimal/ @longztian @@ -2358,6 +2434,7 @@ /types/koa-static/ @hellopao @tlaziuk /types/koa-static-cache/ @JounQin /types/koa-static-server/ @wulunyi +/types/koa-useragent/ @rvboris /types/koa-views/ @brooklyndev /types/koa-webpack/ @malj @leebenson @miZyind @tlaziuk /types/koa-websocket/ @moimael @jacogr @zdila @Kroisse @@ -2387,6 +2464,7 @@ /types/lazy-value/ @ikatyang /types/lazy.js/ @Bartvds @miso440 /types/lazypipe/ @tomc974 +/types/ldap-filters/ @pluma /types/ldapjs/ @cvillemure @peterkooijmans /types/leadfoot/ @theintern /types/leaflet/v0/ @rgripper @@ -2441,6 +2519,7 @@ /types/libxmljs/ @fdecampredon @ComFreek /types/libxslt/ @alejo90 /types/license-checker/ @rogierschouten @unindented +/types/liftoff/ @BendingBender /types/lil-uuid/ @Pr1st0n /types/lime-js/ @arthur-xavier /types/line-by-line/ @etomsen @@ -2450,6 +2529,8 @@ /types/lingui__macro/ @huan086 /types/lingui__react/ @huan086 /types/linkify-it/ @praxxis +/types/linkifyjs/ @szhu +/types/list-stream/ @IanStorm /types/listr/ @durad /types/lls/ @borislavjivkov /types/load-json-file/ @SamVerschueren @@ -2767,6 +2848,7 @@ /types/lokijs/ @TeamworkGuy2 @thomasconner /types/lolex/ @Nemo157 @joshuakgoldberg @rogierschouten /types/long/ @peterkooijmans +/types/looks-same/ @xcatliu /types/loopback/ @kattsushi @enko @sequoia @drmikecrowe @karimsa /types/loopback-boot/ @kattsushi /types/lorem-ipsum/ @durad @@ -2778,12 +2860,12 @@ /types/lozad/ @plantain-00 /types/lru-cache/ @Bartvds @BendingBender /types/lscache/ @Chris-Martinezz -/types/ltx/ @PJakcson +/types/ltx/ @PJakcson @BendingBender /types/luaparse/ @stpettersens /types/lunr/v0/ @sebastian-lenz /types/lunr/ @seantanly /types/lusca/ @crutchcorn -/types/luxon/ @colbydehart @FourwingsY @jsiebern +/types/luxon/ @colbydehart @FourwingsY @jsiebern @mastermatt /types/lwip/ @AyaMorisawa /types/lz-string/ @M0ns1gn0r /types/lzma-native/ @leshow @@ -2793,19 +2875,21 @@ /types/mailcheck/ @pocesar /types/maildev/ @cyrilschumacher @zbarbuto /types/mailgen/ @vothanhkiet @jordanfarrer -/types/mailgun-js/ @sampsonjoliver +/types/mailgun-js/ @sampsonjoliver @andipaetzold /types/mailparser/ @psnider /types/main-bower-files/ @k-kagurazaka /types/make-dir/ @ikatyang @BendingBender /types/maker.js/ @danmarshall /types/makeup-expander/ @darkwebdev /types/makeup-floating-label/ @darkwebdev +/types/makeup-keyboard-trap/ @darkwebdev +/types/makeup-prevent-scroll-keys/ @darkwebdev /types/makeup-screenreader-trap/ @darkwebdev /types/mali-compose/ @danwbyrne /types/mali-onerror/ @danwbyrne /types/mandrill-api/ @pocesar /types/map-obj/ @BendingBender -/types/mapbox/ @anahkiasen +/types/mapbox/ @anahkiasen @Fluccioni /types/mapbox-gl/ @dobrud @patrickr /types/mapbox-gl-leaflet/ @agorshkov23 /types/mapbox__geo-viewport/ @fnberta @@ -2822,7 +2906,7 @@ /types/markdown-it-lazy-headers/ @knom /types/markdown-pdf/ @MonsieurMan /types/markdownlint/ @ark120202 -/types/marked/ @worr @BendingBender @CrossR +/types/marked/ @worr @BendingBender @CrossR @mwickett /types/marker-animate-unobtrusive/ @viskin /types/markerclustererplus/ @enanox @mxl /types/markitup/ @drillbits @@ -2868,12 +2952,13 @@ /types/materialize-css/ @huww98 @MaximBalaganskiy @MonizDave @broccoliarchy /types/math3d/ @laszlojakab @jimsmart /types/mathjax/ @rolandzwaga -/types/mathjs/ @siavol @andnp @bradbesserman +/types/mathjs/ @siavol @andnp @bradbesserman @pawkrol /types/matter-js/ @piranha771 @hasparus -/types/maxmind/ @geoffreak +/types/mcrypt/ @pluma /types/mcustomscrollbar/ @flurg /types/md5/ @arcdev1 @jprogrammer /types/md5-file/ @BamButz +/types/mdast/ @lujun2 /types/mdns/ @reppners /types/mdurl/ @rokt33r /types/media-typer/ @BendingBender @@ -2892,6 +2977,7 @@ /types/memwatch-next/ @cyrilschumacher /types/meow/ @KnisterPeter @praxxis @bitjson /types/merge-descriptors/ @danny8002 +/types/merge-env/ @BendingBender /types/merge-stream/ @k-kagurazaka @tomxtobin @daniel-zazula @djcsdy /types/merge2/ @tkrotoff @smac89 /types/merkle/ @kerol2r20 @@ -2945,12 +3031,12 @@ /types/mixpanel/ @hjellek @Manduro /types/mixto/ @vvakame /types/mjml/ @aahoughton @marpstar +/types/mjml-react/ @henrinormak /types/mkdirp/ @Bartvds @mrmlnc /types/mkdirp-promise/ @pluma /types/mkpath/ @optical /types/ml-levenberg-marquardt/ @m93a /types/mobx-apollo/ @pselden -/types/mobx-cookie/ @t49tran /types/mobx-devtools-mst/ @pluma /types/mocha/ @kazimanzurrashid @otiai10 @jt000 @enlight @cspotcode @1999 /types/mocha-each/ @magnostherobot @@ -2964,6 +3050,7 @@ /types/mock-require/ @gDelgado14 /types/mockdate/ @brunolm /types/mockery/ @jt000 +/types/mockingoose/ @hirochachacha /types/modernizr/ @borisyankov @theodorejb @leonyu @lucax88x @nhardy /types/modesl/ @neeschit /types/module-alias/ @KevinRamharak @@ -2982,7 +3069,7 @@ /types/money-math/ @taoqf /types/mongo-sanitize/ @CedricCazin /types/mongodb/v2/ @CaselIT @alanmarcell @bitjson @dante-101 @mcortesi -/types/mongodb/ @CaselIT @alanmarcell @bitjson @dante-101 @mcortesi @EnricoPicci @AJCStriker @julien-c @daprahamian @denys-bushulyak @BastienAr @sindbach @geraldinelemeur @jishi @various89 @angela-1 @lirbank @hector7 @floric +/types/mongodb/ @CaselIT @alanmarcell @bitjson @dante-101 @mcortesi @EnricoPicci @AJCStriker @julien-c @daprahamian @denys-bushulyak @BastienAr @sindbach @geraldinelemeur @jishi @various89 @angela-1 @lirbank @hector7 @floric @erikc5000 /types/mongodb-memory-server/ @dmitryrogozhny /types/mongodb-uri/ @mernxl /types/mongoose/v4/ @simonxca @horiuchi @sindrenm @lukasz-zak @@ -3040,6 +3127,7 @@ /types/murmurhash3js/ @dlee-nvisia /types/musicmetadata/ @Xstoudi /types/mustache/ @markashleybell @manuth +/types/mustache-express/ @BendingBender /types/mutexify/ @maistho /types/mv/ @nenadalm /types/mysql/ @wjohnsto @kacepe @kpping @jdmunro @@ -3078,6 +3166,8 @@ /types/nes/ @NoHomey @saboya /types/nested-error-stacks/ @woutervh- /types/net-keepalive/ @hertzg +/types/netease-captcha/ @norubidium +/types/netlify-identity-widget/ @nkprince007 /types/netmask/ @mhfrantz /types/network-interfaces/ @anderswestberg /types/new-relic-browser/ @renehamburger @piotrkubisa @@ -3112,7 +3202,8 @@ /types/ngtoaster/ @btesser /types/ngwysiwyg/ @patrick-mackay /types/nightmare/ @horiuchi @samyang-au @Bleser92 -/types/nightwatch/ @rkavalap @schlesiger +/types/nightwatch/ @rkavalap @schlesiger @ClaytonAstrom +/types/nise/ @a-tarasyuk /types/nivo-slider/ @AndersonFriaca /types/noble/ @swook @shantanubhadoria @lukel99 @bioball @keton @thegecko /types/nock/ @bonnici @horiuchi @afharo @mastermatt @damour @paambaati @@ -3123,7 +3214,7 @@ /types/node/v7/ @Microsoft @DefinitelyTyped @parambirs @tellnes @WilcoBakker @eps1lon @KSXGitHub @Archcry /types/node/v8/ @Microsoft @DefinitelyTyped @parambirs @tellnes @WilcoBakker @octo-sniffle @smac89 @Flarna @mwiktorczyk @wwwy3y3 @DeividasBakanas @kjin @alvis @eps1lon @Hannes-Magnusson-CK @jkomyno @hoo29 @n-e @brunoscheufler @KSXGitHub @islishude @r3nya /types/node/v9/ @Microsoft @DefinitelyTyped @parambirs @tellnes @WilcoBakker @octo-sniffle @smac89 @Flarna @mwiktorczyk @wwwy3y3 @DeividasBakanas @kjin @alvis @eps1lon @Hannes-Magnusson-CK @jkomyno @ajafff @hoo29 @n-e @brunoscheufler @mohsen1 @KSXGitHub @a-tarasyuk @islishude @r3nya @eyqs -/types/node/ @Microsoft @DefinitelyTyped @jkomyno @a-tarasyuk @alvis @r3nya @brunoscheufler @smac89 @tellnes @DeividasBakanas @eyqs @Flarna @Hannes-Magnusson-CK @KSXGitHub @hoo29 @kjin @ajafff @islishude @mwiktorczyk @matthieusieben @mohsen1 @n-e @octo-sniffle @parambirs @eps1lon @SimonSchick @ThomasdenH @WilcoBakker @wwwy3y3 @ZaneHannanAU @jeremiergz +/types/node/ @Microsoft @DefinitelyTyped @jkomyno @a-tarasyuk @alvis @r3nya @brunoscheufler @smac89 @tellnes @DeividasBakanas @eyqs @Flarna @Hannes-Magnusson-CK @KSXGitHub @hoo29 @kjin @ajafff @islishude @mwiktorczyk @matthieusieben @mohsen1 @n-e @octo-sniffle @parambirs @eps1lon @SimonSchick @ThomasdenH @WilcoBakker @wwwy3y3 @ZaneHannanAU @jeremiergz @samuela /types/node-7z/ @erkie /types/node-array-ext/ @Beng89 /types/node-cache/ @chrootsu @dthunell @useltmann @@ -3137,7 +3228,7 @@ /types/node-emoji/ @jonestristand @styu /types/node-fetch/ @torstenwerner @nikcorg /types/node-fibers/ @caryhaynie -/types/node-forge/ @westy92 @flynetworks @a-k-g @rafal2228 @beenotung @joeflateau +/types/node-forge/ @westy92 @flynetworks @a-k-g @rafal2228 @beenotung @joeflateau @Apologiz @timhwang21 /types/node-gcm/ @horiuchi /types/node-geocoder/ @rosek86 /types/node-getopt/ @kcauchy @@ -3212,7 +3303,7 @@ /types/ns-api/ @Archcry /types/nslog/ @unindented /types/nsqjs/ @cezaryrk -/types/nuka-carousel/ @Romic @altaudio +/types/nuka-carousel/ @Romic @altaudio @matt-sungwook /types/number-is-nan/ @mhegazy /types/number-to-words/ @frederickfogerty /types/numeral/ @vbortone @BehindTheMath @klujanrosas @@ -3226,8 +3317,9 @@ /types/nwmatcher/ @woutervh- /types/o.js/ @IceOnFire @bradzacher @janhommes @jcchalte /types/oauth/ @nonAlgebraic @EduardoAC +/types/oauth-shim/ @BendingBender /types/oauth.js/ @nobuoka -/types/oauth2-server/ @vangorra @cirick @d-fischer +/types/oauth2-server/ @vangorra @cirick @d-fischer @rvitorsantos /types/oauth2orize/ @wokim @heycalmdown @stevehipwell /types/obelisk.js/ @bdrupieski /types/obj-file-parser/ @benc-uk @@ -3248,6 +3340,7 @@ /types/observe-js/ @herrmanno /types/oclazyload/ @rolandzwaga /types/odata/ @janhommes @jcchalte +/types/oembed-parser/ @BendingBender /types/ofe/ @Morfent /types/office-js/ @OfficeDev @LanceEA @Zlatkovsky @kbrandl @Rick-Kirkham @AlexJerabek @ElizabethSamuel-MSFT /types/office-runtime/ @Zlatkovsky @mscharlock @@ -3271,17 +3364,18 @@ /types/opener/ @tikurahul /types/openfin/v17/ @chrisbarker /types/openfin/v29/ @chrisbarker @rdepena -/types/openfin/ @chrisbarker @rdepena @whyn07m3 +/types/openfin/v34/ @chrisbarker @rdepena @whyn07m3 +/types/openfin/ @chrisbarker @rdepena @whyn07m3 @licui3936 /types/openjscad/ @danmarshall /types/openlayers/v2/ @bolhovsky /types/openlayers/v3/ @osechet @matthiasdailey-ccri /types/openlayers/ @osechet @wb14123 @ailrun @mylen @iamthechad @danmana @yairtawil @pierremarc @hauke96 @gberaudo -/types/openpgp/ @errietta @damonpam +/types/openpgp/ @errietta @damonpam @po5i /types/openstack-wrapper/ @sanjaymadane /types/opentok/ @westy92 @CatGuardian /types/opentype.js/ @danmarshall @edzis /types/opn/ @shinnn @SomaticIT @tlent -/types/opossum/ @quinnlangille @lance +/types/opossum/ @quinnlangille @merufm @lance /types/optics-agent/ @crevil /types/optimist/ @soywiz @chbrown /types/optimize-css-assets-webpack-plugin/ @odnamrataizem @@ -3310,7 +3404,7 @@ /types/p-cancelable/ @BendingBender /types/p-catch-if/ @LinusU /types/p-debounce/ @BendingBender -/types/p-defer/ @SamVerschueren +/types/p-defer/ @SamVerschueren @BendingBender /types/p-do-whilst/ @BendingBender /types/p-each-series/ @BendingBender /types/p-event/ @BendingBender @@ -3326,6 +3420,7 @@ /types/p-one/ @BendingBender /types/p-progress/ @icopp /types/p-props/ @BendingBender +/types/p-queue/v2/ @BendingBender @evanshortiss /types/p-queue/ @BendingBender @evanshortiss /types/p-reduce/ @BendingBender /types/p-reflect/ @BendingBender @@ -3337,6 +3432,7 @@ /types/p-throttle/ @BendingBender /types/p-timeout/ @BendingBender /types/p-try/ @BendingBender @LinusU +/types/p-wait-for/v1/ @BendingBender /types/p-wait-for/ @BendingBender /types/p-whilst/ @BendingBender /types/p2/ @clark-stevenson @@ -3358,7 +3454,8 @@ /types/parity-pmd/ @leovujanic @jewbre /types/parity-pmr/ @leovujanic /types/parity-poe/ @leovujanic -/types/parse/ @dpoetzsch @jaeggerr @flavionegrao @wesleygrimes @owsas +/types/parse/v1/ @dpoetzsch @jaeggerr @flavionegrao @wesleygrimes @owsas +/types/parse/ @dpoetzsch @jaeggerr @flavionegrao @wesleygrimes @owsas @agoldis /types/parse-git-config/ @leonard-thieu @deltaidea /types/parse-github-url/ @ajafff /types/parse-glob/ @glen-84 @@ -3382,9 +3479,10 @@ /types/parsimmon/ @Bartvds @mizunashi-mana @bcherny @bvanreeven @leonard-thieu @MrJohz /types/passport/ @horiuchi @enaeseth @theigor @tlaziuk @danielpa9708 /types/passport-anonymous/ @0x6368656174 -/types/passport-auth0/ @johnbendi @iamvishnusankar +/types/passport-auth0/ @johnbendi @iamvishnusankar @duncanhall /types/passport-azure-ad/ @ShekharNain /types/passport-beam/ @AtlasDev +/types/passport-bnet/ @ivan94 /types/passport-cognito/ @mbutsykin /types/passport-discord/ @kzay /types/passport-facebook/ @staticfunction @lucasmacosta @@ -3403,7 +3501,7 @@ /types/passport-oauth2/ @pasieronen @WangZishi @EduardoAC /types/passport-oauth2-client-password/ @akaNightmare /types/passport-remember-me-extended/ @AylaJK -/types/passport-saml/ @cjbarth @dassennato +/types/passport-saml/ @cjbarth @dassennato @ksamborski /types/passport-steam/ @kzay /types/passport-strategy/ @liorm /types/passport-twitter/ @staticfunction @@ -3425,6 +3523,7 @@ /types/paypal-rest-sdk/ @trainerbill /types/pbf/ @cschwarz /types/pbkdf2/ @timonegk +/types/pdf2image/ @taoqf /types/pdfjs-dist/ @jbaldwin /types/pdfkit/ @erichillah /types/pdfmake/ @m1llen1um @radziksh @evolkmann @@ -3467,13 +3566,13 @@ /types/picturefill/ @alaz /types/pidusage/ @cyrilschumacher @mx601595686 /types/pify/ @samverschueren @mad-mike @c7hm4r -/types/pigpio/ @manerfan +/types/pigpio/ @manerfan @erikma /types/pigpio-dht/ @erikma /types/pikaday/ @MidnightDesign @wake42 @mezoistvan /types/pikaday-time/ @Sayan751 /types/pinkyswear/ @chances /types/pino/v3/ @psnider -/types/pino/ @psnider @BendingBender @screendriver @paambaati @alferpal +/types/pino/ @psnider @BendingBender @screendriver @paambaati @alferpal @mortiy /types/pino-http/ @screendriver /types/pino-multi-stream/ @JakeGinnivan /types/pinterest-sdk/ @adamburmister @@ -3483,6 +3582,7 @@ /types/pixi.js/ @clark-stevenson /types/pkg-conf/ @jorgegonzalez /types/pkg-dir/ @NK-WEB-Git +/types/pkg-up/ @forivall /types/pkijs/ @microshine /types/platform/ @JakeH /types/playcanvas/ @Neoflash1979 @@ -3503,6 +3603,12 @@ /types/podcast/ @nikeee /types/podium/ @AJamesPhillips /types/point-in-polygon/ @dyst5422 @kogai +/types/pollyjs__adapter/ @feinoujc +/types/pollyjs__adapter-fetch/ @feinoujc +/types/pollyjs__core/ @feinoujc +/types/pollyjs__persister/ @feinoujc +/types/pollyjs__persister-fs/ @feinoujc +/types/pollyjs__utils/ @feinoujc /types/polyfill-service/ @Alorel /types/polylabel/ @DenisCarriere /types/polyline/ @Kern0 @@ -3513,7 +3619,11 @@ /types/postal/ @lokeshpeta @myitcv /types/postcss-calc/ @huan086 /types/postcss-icss-values/ @huan086 +/types/postcss-modules-extract-imports/ @huan086 +/types/postcss-modules-local-by-default/ @huan086 /types/postcss-modules-resolve-imports/ @huan086 +/types/postcss-modules-scope/ @huan086 +/types/postcss-url/ @lenovouser /types/postman-collection/ @kbuzby /types/postmark/ @benbayard @jineshshah36 /types/pouch-redux-middleware/ @charrondev @@ -3563,21 +3673,23 @@ /types/promise-ftp/ @coolreader18 /types/promise-ftp-common/ @coolreader18 /types/promise-map-limit/ @kohlmannj +/types/promise-memoize/ @forivall /types/promise-pg/ @coldacid -/types/promise-polyfill/ @skysteve +/types/promise-polyfill/ @skysteve @djcsdy /types/promise-pool/ @vilic /types/promise-queue/ @LachlanStuart /types/promise-retry/ @shirakaba /types/promise-sftp/ @coolreader18 /types/promise-timeout/ @Aankhen /types/promise.prototype.finally/ @slavik57 @BendingBender +/types/promised-ldap/ @pluma /types/promised-temp/ @rokadias /types/promisify-node/ @borekb /types/promisify-supertest/ @aleung /types/prompt-sync/ @MugeSo /types/prompt-sync-history/ @MugeSo /types/promptly/ @danrspencer -/types/prompts/ @Berkays +/types/prompts/ @Berkays @danielpa9708 /types/prop-types/ @DovydasNavickas @ferdaber /types/proper-lockfile/ @qlonik /types/properties-reader/ @Goldsmith42 @@ -3610,12 +3722,13 @@ /types/ptomasroos__react-native-multi-slider/ @Slessi /types/pty.js/ @enlight /types/public-ip/ @BendingBender -/types/pubnub/ @bitbankinc @rollymaduk @vitosamson +/types/pubnub/ @bitbankinc @rollymaduk @vitosamson @FlorianDr /types/pubsub-js/ @borisyankov /types/pug/ @TonyPythoneer @19majkel94 /types/pulltorefreshjs/ @DanielRosenwasser @humpedli /types/pump/ @tlaziuk /types/pumpify/ @JustinBeckwith @aoberoi +/types/punycode/ @yavanosta /types/pupa/ @nju33 /types/puppeteer/v0/ @marvinhagemeister @cdeutsch /types/puppeteer/ @marvinhagemeister @cdeutsch @ksm2 @SimonSchick @@ -3651,13 +3764,22 @@ /types/qwest/ @lindsayevans /types/r-script/ @NaridaL /types/rabbit.js/ @wokim +/types/rabbitmq-schema/ @rulezzz1987 /types/radium/ @alexgorbatchev @nupplaphil @asvetliakov /types/radius/ @codeanimal +/types/radix64/ @huan086 /types/ramda/ @donnut @tycho01 @mdekrey @mrdziuban @sbking @afharo @teves-castro @1M0reBug @hojberg @samsonkeung @angeloocana @raynerd @googol @moshensky @ethanresnick @leighman @CaptJakk @deftomat @deptno @blimusiek @biern @rayhaneh @rgm @drewwyatt +/types/random-boolean/ @BendingBender +/types/random-float/ @BendingBender +/types/random-int/ @BendingBender +/types/random-item/ @BendingBender /types/random-js/ @pistacchio /types/random-number/ @OpenByteDev +/types/random-obj-key/ @BendingBender +/types/random-obj-prop/ @BendingBender /types/random-seed/ @endel /types/random-string/ @stpettersens +/types/randombytes/ @BendingBender /types/randomcolor/ @feitzi @BradyLiles /types/range-parser/ @tlaziuk /types/rangyinputs/ @ersimont @@ -3681,9 +3803,11 @@ /types/raygun4js/ @xt0rted @BenjaminHarding @UberMouse /types/rbac-a/ @tlaziuk /types/rc/ @DanielRosenwasser +/types/rc-progress/ @jussikinnula /types/rc-select/ @DenisTirilis /types/rc-slider/ @mantasmarcinkus @mattoni @paustint @j-fro @Deanna2 /types/rc-time-picker/ @Hoff97 +/types/rc-tooltip/ @rhysd @ahstro @vsaarinen /types/rc-tree/ @johnnyreilly @Methuselah96 /types/rcloader/ @panuhorsmalahti /types/rdf-data-model/ @rubensworks @@ -3692,7 +3816,7 @@ /types/re-base/ @jordandrako /types/reach__router/ @kingdaro /types/react/v15/ @bbenezech @pzavolinsky @digiguru @ericanderson @tkrotoff @DovydasNavickas @onigoetz -/types/react/ @johnnyreilly @bbenezech @pzavolinsky @digiguru @ericanderson @tkrotoff @DovydasNavickas @onigoetz @theruther4d @guilhermehubner @ferdaber @jrakotoharisoa @pascaloliv @hotell @franklixuefei +/types/react/ @johnnyreilly @bbenezech @pzavolinsky @digiguru @ericanderson @tkrotoff @DovydasNavickas @onigoetz @theruther4d @guilhermehubner @ferdaber @jrakotoharisoa @pascaloliv @hotell @franklixuefei @Kovensky /types/react-adal/ @dkorolev1 /types/react-albus/ @sseppola @conradreuter @kuirak /types/react-alert/v2/ @ssyrell @@ -3708,7 +3832,8 @@ /types/react-avatar-editor/ @diogocorrea @gabsprates /types/react-beautiful-dnd/ @varHarrie @bradleyayers @paustint @marknelissen /types/react-better-password/ @mhuynh1 -/types/react-big-calendar/ @piotrwitek @paustint @pikpok @eps1lon @strongpauly +/types/react-big-calendar/ @piotrwitek @paustint @pikpok @eps1lon @strongpauly @janb87 +/types/react-blessed/ @me /types/react-body-classname/ @mhegazy /types/react-bootstrap/ @walkerburgin @vsiao @danilojrr @Batbold-Gansukh @octatone @chengsieuly @mretolaza @katbusch @vitosamson @LKay @aaronbeall @jrakotoharisoa @r3nya @t49tran /types/react-bootstrap-date-picker/ @LKay @ssi-hu-antal-bodnar @@ -3720,6 +3845,7 @@ /types/react-breadcrumbs-dynamic/ @mitsuruog /types/react-broadcast/ @kandros /types/react-burger-menu/ @radziksh +/types/react-cache/ @skovy /types/react-calendar-heatmap/ @9renpoto /types/react-calendar-timeline/ @radziksh @acemac /types/react-cartographer/ @trevonmckay @@ -3738,6 +3864,7 @@ /types/react-countup/ @danielbrodin /types/react-credit-cards/ @vstrimaitis @olefrank /types/react-cropper/ @stepancar +/types/react-css-collapse/ @dford07 /types/react-css-modules/ @KostyaEsmukov @skirsdeda /types/react-css-transition-replace/ @LKay /types/react-currency-formatter/ @pastushenkoy @Jeka-Vasiliev @@ -3748,7 +3875,7 @@ /types/react-data-grid/ @SupernaviX @KieranPeat @martinnov92 @baso53 /types/react-datagrid/ @stephenjelfs /types/react-date-range/ @Junbong -/types/react-datepicker/ @radziksh @andrewBalekha @smrq @Rogach @royxue @KoalaHuman @seansfkelley +/types/react-datepicker/ @radziksh @andrewBalekha @smrq @Rogach @royxue @KoalaHuman @seansfkelley @justingrant @jakeboone02 /types/react-daterange-picker/ @uncovertruth @MartynasZilinskas @donaldtf @vladflorescu94 /types/react-dates/ @ArturAmpilogov @NathanNZ /types/react-daum-postcode/ @Sa-ryong @@ -3775,7 +3902,7 @@ /types/react-file-reader-input/ @dmitryrogozhny @alitaheri /types/react-flag-icon-css/ @jonfreedman /types/react-flags-select/ @senukartur -/types/react-flatpickr/ @begincalendar +/types/react-flatpickr/ @begincalendar @snaveevans /types/react-flex/ @pushplay /types/react-flexr/ @pushplay /types/react-fontawesome/ @timurrustamov @dublicator @vincaslt @gavingregory @@ -3814,17 +3941,17 @@ /types/react-infinite/ @rhysd /types/react-infinite-calendar/ @christianchown /types/react-infinite-scroll-component/ @sroy3 @burtek @davidkevork @JoshuaScript -/types/react-infinite-scroller/ @Lapanti @psrebniak @WrathZA +/types/react-infinite-scroller/ @Lapanti @psrebniak @WrathZA @daggerjames /types/react-input-autosize/ @jsonunger @franklixuefei /types/react-input-calendar/ @stepancar /types/react-input-mask/v1/ @apare /types/react-input-mask/ @apare @dima7a14 /types/react-instantsearch/ @gburgett @jpowell -/types/react-instantsearch-core/ @gburgett @jpowell +/types/react-instantsearch-core/ @gburgett @jpowell @davidfurlong /types/react-instantsearch-dom/ @gburgett @jpowell /types/react-instantsearch-native/ @gburgett @jpowell /types/react-intl/v1/ @bgrieder -/types/react-intl/ @bgrieder @cdroulers @gyzerok @tillwolff @LKay @bhouser @kristerkari @formatlos @lukyth +/types/react-intl/ @bgrieder @cdroulers @gyzerok @tillwolff @LKay @bhouser @kristerkari @formatlos @lukyth @obedm503 /types/react-intl-redux/ @LKay /types/react-is/ @AviVahl @christianchown /types/react-is-deprecated/ @seansfkelley @@ -3838,6 +3965,7 @@ /types/react-lazyload/ @m0a /types/react-lazylog/ @benjaminRomano /types/react-leaflet/ @danzel @davschne @yuit +/types/react-leaflet-markercluster/ @Kimahriman /types/react-lifecycle-component/ @pixelshaded /types/react-list/ @buptyyf @tomshen /types/react-loadable/ @Kovensky @odensc @ianks @tlaziuk @iMobs @@ -3865,16 +3993,18 @@ /types/react-native-communications/ @huhuanming @PaitoAnderson /types/react-native-custom-tabs/ @philnova /types/react-native-datepicker/ @jacobbaskin -/types/react-native-dialog/ @MrLuje +/types/react-native-dialog/ @MrLuje @stackbuilders @ibarrae /types/react-native-dialogflow/ @jasonmerino /types/react-native-doc-viewer/ @iRoachie /types/react-native-document-picker/ @plantain-00 +/types/react-native-draggable-flatlist/ @stackbuilders @ibarrae /types/react-native-drawer/ @jnbt @suniahk /types/react-native-drawer-layout/ @jmfirth /types/react-native-elevated-view/ @fhelwanger /types/react-native-fabric/ @josephroque /types/react-native-fbsdk/ @ifiokjr /types/react-native-fetch-blob/ @MNBuyskih +/types/react-native-flip-card/ @imjakechapman /types/react-native-fs/ @pocesar @josephroque /types/react-native-google-signin/ @j-fro @bm-software @christianchown @echentw /types/react-native-htmlview/ @ifiokjr @@ -3903,6 +4033,7 @@ /types/react-native-referrer/ @christianchown /types/react-native-restart/ @christianchown /types/react-native-safari-view/ @mrand01 +/types/react-native-safe-area/ @pvinis /types/react-native-scaled-image/ @Jaeger25 /types/react-native-scrollable-tab-view/ @CaiHuan @egorshulga /types/react-native-sensor-manager/ @SahinVardar @@ -3927,7 +4058,7 @@ /types/react-native-version-number/ @VincentLanglet /types/react-native-video/ @huhuanming /types/react-navigation/v1/ @huhuanming @mhcgrq @fangpenlin @petejkim @iRoachie @phanalpha @charlesfamu @timwangdev @bang88 @svbutko @levito @YourGamesBeOver @ArmandoAssuncao @cliedeman @Slessi -/types/react-navigation/ @huhuanming @mhcgrq @fangpenlin @petejkim @iRoachie @phanalpha @charlesfamu @timwangdev @bang88 @svbutko @levito @YourGamesBeOver @ArmandoAssuncao @cliedeman @Slessi @magrinj @TizioFittizio @stigi @LinusU @jshosomichi @jakebooyah @brunoro @DenisFrezzato @mickaelw @maxdavidson @jkillian +/types/react-navigation/ @huhuanming @mhcgrq @fangpenlin @petejkim @iRoachie @phanalpha @charlesfamu @timwangdev @bang88 @svbutko @levito @YourGamesBeOver @ArmandoAssuncao @cliedeman @magrinj @TizioFittizio @stigi @LinusU @jshosomichi @jakebooyah @brunoro @DenisFrezzato @mickaelw @maxdavidson @alechill @builtbyproxy @jkillian @jeroenvervaeke @chagasaway /types/react-navigation-material-bottom-tabs/ @iRoachie /types/react-no-ssr/ @rafalfilipek /types/react-notification-system/ @GiedriusGrabauskas @DeividasBakanas @LKay @sztobar @@ -3941,7 +4072,8 @@ /types/react-overlays/ @aaronbeall @vitosamson /types/react-owl-carousel/ @tbounsiar @igorissen @KennethanCeyer /types/react-paginate/v4/ @deevus @wouterhardeman @pegel03 @archy-bold -/types/react-paginate/ @deevus @wouterhardeman @pegel03 @archy-bold @yasupeke +/types/react-paginate/v5/ @deevus @wouterhardeman @pegel03 @archy-bold @yasupeke +/types/react-paginate/ @deevus @wouterhardeman @pegel03 @archy-bold @yasupeke @sugarshin /types/react-places-autocomplete/ @guilhermehubner @r3nya /types/react-plotly.js/ @jonfreedman /types/react-pointable/ @istefo @mdibyo @@ -3955,7 +4087,7 @@ /types/react-recaptcha/ @mhegazy @zzanol /types/react-reconciler/ @Methuselah96 /types/react-redux/v5/ @tkqubo @thasner @kenzierocks @clayne11 @tansongyang @nicholasboll @mdibyo @pdeva -/types/react-redux/ @tkqubo @kenzierocks @clayne11 @tansongyang @nicholasboll @mdibyo @pdeva @kallikrein @val1984 @jrakotoharisoa @apapirovski +/types/react-redux/ @tkqubo @kenzierocks @clayne11 @tansongyang @nicholasboll @mdibyo @pdeva @kallikrein @val1984 @jrakotoharisoa @apapirovski @surgeboris /types/react-redux-epic/ @forabi /types/react-redux-i18n/ @clementdevos /types/react-redux-toastr/ @Smiche @artyomsv @kulmajaba @@ -3970,7 +4102,7 @@ /types/react-router/v3/ @sergey-buturlakin @mrk21 @vasek17 @ngbrown @awendland @KostyaEsmukov @johnnyreilly @LKay @DovydasNavickas @ssorallen @gillchristian @nulladdict /types/react-router/ @sergey-buturlakin @mrk21 @vasek17 @ngbrown @awendland @KostyaEsmukov @johnnyreilly @LKay @DovydasNavickas @tkrotoff @huy-nguyen @grmiade @DaIgeb @egorshulga @neuoy @rraina @pret-a-porter @t49tran @8enSmith /types/react-router-bootstrap/ @vlesierse @LKay @olmobrutall -/types/react-router-config/ @lith-light-g @johnnyreilly +/types/react-router-config/ @lith-light-g @johnnyreilly @NullMDR /types/react-router-dom/ @tkrotoff @huy-nguyen @p-jackson @johnnyreilly /types/react-router-hash-link/ @zoompie /types/react-router-native/ @ezintz @fhelwanger @@ -3989,7 +4121,7 @@ /types/react-show-more/ @naortor /types/react-side-effect/ @remojansen @0xcaff /types/react-sidebar/ @jeroenvervaeke -/types/react-sketchapp/ @ricokahler @DomiR +/types/react-sketchapp/ @ricokahler @DomiR @saschazar21 /types/react-slick/ @andrewBalekha @GiedriusGrabauskas @r3nya /types/react-slider/ @jsonunger /types/react-smooth-scrollbar/ @asvetliakov @@ -4000,12 +4132,13 @@ /types/react-sparklines/ @henrinormak /types/react-spinkit/v1/ @tkqubo @mleko @pelotom /types/react-spinkit/ @tkqubo @mleko @pelotom @zzanol +/types/react-splitter-layout/ @snaptags /types/react-star-rating-component/ @marpstar /types/react-sticky/ @curtisw0 @ajhyndman /types/react-sticky-box/ @koss-lebedev /types/react-sticky-el/ @jbraithwaite /types/react-stickynode/ @tstirrat -/types/react-stripe-elements/ @dan-j @santiagodoldan @sonnysangha @9y5 @thchia +/types/react-stripe-elements/ @dan-j @santiagodoldan @sonnysangha @9y5 @thchia @yhnavein /types/react-svg-inline/ @kiyopikko /types/react-svg-pan-zoom/ @huy-nguyen /types/react-swf/ @stepancar @@ -4013,7 +4146,7 @@ /types/react-swipeable/ @GiedriusGrabauskas @mctep @horiuchi /types/react-swipeable-views/ @mxl @DeividasBakanas /types/react-syntax-highlighter/ @NoHomey @ajgamble-milner -/types/react-table/ @royxue @psakalo @Havret @andys8 +/types/react-table/ @royxue @psakalo @Havret @andys8 @Gelio /types/react-table-filter/ @gjsln /types/react-tabs/ @danez @Equationist /types/react-tag-autocomplete/ @jlismore @@ -4043,9 +4176,9 @@ /types/react-user-tour/ @ccancellieri /types/react-vertical-timeline-component/ @stephane-monnot /types/react-virtual-keyboard/ @bsurai -/types/react-virtualized/ @kaoDev @guntherjh @wasd171 @szabolcsx @kraenhansen @Stevearzh @mgoszcz2 @brandonhall +/types/react-virtualized/ @kaoDev @guntherjh @wasd171 @szabolcsx @kraenhansen @Stevearzh @mgoszcz2 @brandonhall @sbusch /types/react-virtualized-select/ @seansfkelley -/types/react-visibility-sensor/ @JRasmusBm +/types/react-visibility-sensor/ @JRasmusBm @gcangussu /types/react-webcam/ @squat /types/react-weui/ @tairan /types/react-widgets/ @rogierschouten @sanyatuning @frodehansen2 @r3nya @MBillemaz @georg94 @@ -4068,14 +4201,15 @@ /types/readline-sync/ @jonestristand /types/readline-transform/ @dex4er /types/reapop/ @Barrokgl -/types/rebass/ @ryee-dev +/types/rebass/ @ryee-dev @jamesmckenzie /types/rebass__grid/ @antonvasin @vittorio @lhache @lavoaster /types/recaptcha2/ @l-jonas /types/recase/ @18steps -/types/recharts/ @mthmulders @rapmue @royxue @ZheyangSong @richbai90 @caspeco-dan @pkeuter @jrsaunde @paulmelnikow @crusectrl @apalugniok +/types/recharts/ @mthmulders @rapmue @royxue @ZheyangSong @richbai90 @caspeco-dan @pkeuter @jrsaunde @paulmelnikow @crusectrl @apalugniok @RobertStigsson /types/recharts-scale/ @johnnyreilly +/types/rechoir/ @BendingBender /types/recluster/ @dex4er -/types/recompose/ @iskandersierra @mrapogee @clayne11 @Pajn @lucasterra @brian-lives-outdoors +/types/recompose/ @iskandersierra @clayne11 @Pajn @lucasterra @brian-lives-outdoors @TiuSh /types/reconnect-core/ @thw0rted /types/reconnectingwebsocket/ @nguarracino /types/recorder-js/ @higuri @@ -4084,7 +4218,7 @@ /types/redis/ @soywiz @CodeAnimal @MugeSo @UppaJung @Rokt33r @43081j @barnski @1pete /types/redis-errors/ @43081j /types/redis-mock/ @BendingBender -/types/redis-rate-limiter/ @westy92 +/types/redis-rate-limiter/ @westy92 @nodify-at /types/redis-scripto/ @westy92 /types/redlock/v2/ @chrootsu /types/redlock/ @chrootsu @BendingBender @@ -4102,7 +4236,7 @@ /types/redux-devtools-dock-monitor/ @mc-petry /types/redux-devtools-log-monitor/ @mc-petry /types/redux-doghouse/ @BendingBender -/types/redux-first-router/ @Valbrand @viggyfresh @janb87 @corydeppen @jscinoz @surgeboris +/types/redux-first-router/ @Valbrand @viggyfresh @janb87 @corydeppen @jscinoz @surgeboris @geirsagberg /types/redux-first-router-link/ @janb87 /types/redux-first-router-restore-scroll/ @icopp /types/redux-first-routing/ @tlaziuk @@ -4111,7 +4245,7 @@ /types/redux-form/ @carsonf @aikoven @LKay @bancek @alsiola @tehbi4 @huwmartin @ethanresnick @reggino @maddijoyce @smifun /types/redux-immutable/v3/ @oizie @sebald @gavingregory /types/redux-immutable/ @oizie @sebald @gavingregory @lukyth -/types/redux-immutable-state-invariant/ @remojansen @highflying +/types/redux-immutable-state-invariant/ @remojansen @highflying @mihai-dinculescu /types/redux-infinite-scroll/ @silkyfray /types/redux-injectable-store/ @unindented /types/redux-localstorage/ @LKay @@ -4129,7 +4263,8 @@ /types/redux-promise-middleware/ @ianks /types/redux-recycle/ @LKay /types/redux-router/ @stepancar -/types/redux-saga-tester/ @BenLorantfy +/types/redux-saga-tester/ @BenLorantfy @lawsumisu +/types/redux-sentry-middleware/ @dolezel /types/redux-shortcuts/ @tstirrat /types/redux-socket.io/ @snakeego /types/redux-storage/ @asvetliakov @@ -4212,8 +4347,10 @@ /types/riot-route/ @karak /types/riotcontrol/ @chrootsu /types/riotjs/ @vvakame +/types/ripemd160/ @BendingBender /types/rison/ @impworks /types/rivets/ @TrevorDev @matjanos +/types/rmc-drawer/ @Hoff97 /types/rmfr/ @pluma /types/roads/ @dancespiele /types/roads-server/ @dancespiele @@ -4221,8 +4358,9 @@ /types/roll/ @icopp /types/rolling-rate-limiter/ @l-jonas /types/rollup-plugin-json/ @asmockler @hotell +/types/roman-numerals/ @pluma /types/ronomon__crypto-async/ @BendingBender -/types/rosie/ @abner @subvertallchris @abukurov +/types/rosie/ @abner @subvertallchris @abukurov @adam187 /types/roslib/ @Pro @skycoop @dgorobopec /types/rot-js/ @atiaxi /types/round-to/ @seangenabe @@ -4278,11 +4416,18 @@ /types/sanitize-filename/ @Nemo157 /types/sanitize-html/ @rogierschouten @afshin @BehindTheMath @biermeester @WillGibson @sirMerr /types/sap__xsenv/ @mad-mike +/types/sasl-anonymous/ @BendingBender +/types/saslmechanisms/ @BendingBender +/types/sass/ @lenovouser /types/sass-graph/ @marvinhagemeister /types/sass-webpack-plugin/ @AepKill /types/sat/ @omni360 /types/satnav/ @DotNetNerd /types/saywhen/ @SeanSobey +/types/sc-auth/ @DanielRose +/types/sc-broker/ @DanielRose +/types/sc-broker-cluster/ @DanielRose +/types/sc-channel/ @DanielRose /types/scalike/ @ryoppy /types/schedule/ @Methuselah96 /types/scheduler/ @Methuselah96 @@ -4367,7 +4512,9 @@ /types/session-file-store/ @blendsdk @rokt33r /types/set-cookie-parser/ @nickp10 /types/set-value/ @DanielRosenwasser +/types/setasap/ @djcsdy /types/settings/ @shreyjain1994 +/types/sha.js/ @BendingBender /types/sha1/ @arcdev1 /types/sha256/ @nhardy /types/shallow-equals/ @rsolomon @@ -4391,6 +4538,7 @@ /types/shot/ @AJamesPhillips @SimonSchick /types/should-sinon/ @Arylo /types/showdown/ @cbowdon @tan9 @arielsaldana +/types/shpjs/ @littlebtc /types/shrink-ray/ @forabi /types/shuffle-seed/ @LeartS /types/siema/ @Irmiz @0x6368656174 @samnau @@ -4407,7 +4555,7 @@ /types/simple-lru/ @NN--- /types/simple-mock/ @leonyu /types/simple-oauth2/v1/ @mad-mike @troy-lamerton @netux -/types/simple-oauth2/ @mad-mike @troy-lamerton @netux +/types/simple-oauth2/ @mad-mike @troy-lamerton @netux @LinusU /types/simple-peer/ @tlaziuk /types/simple-url-cache/ @a-lucas /types/simple-websocket/ @dex4er @@ -4420,7 +4568,7 @@ /types/sindresorhus__df/ @whatknight /types/single-line-log/ @ffflorian /types/single-spa-react/ @Garrett-Smith-iq -/types/sinon/ @mrbigdog2u @rationull @lumaxis @nicojs @43081j @joshuakgoldberg @gjednaszewski +/types/sinon/ @mrbigdog2u @rationull @lumaxis @nicojs @43081j @joshuakgoldberg @gjednaszewski @johnjesse /types/sinon-as-promised/ @igrayson /types/sinon-chai/v2/ @kazimanzurrashid @jedmao /types/sinon-chai/ @kazimanzurrashid @jedmao @elpdpt @@ -4437,7 +4585,7 @@ /types/sjcl/ @Evgenus /types/skatejs/ @Hotell /types/ski/ @AyaMorisawa -/types/skyway/ @nakakura +/types/skyway/ @nakakura @izmhr /types/slack-mock/ @kkalavantavanich /types/slack-node/ @geoffreak /types/slack-winston/ @BlueHatbRit @@ -4448,18 +4596,21 @@ /types/slate-html-serializer/ @YangusKhan /types/slate-irc/ @elisee /types/slate-plain-serializer/ @YangusKhan @mkiefel -/types/slate-react/ @andykent @majelbstoat @JanLoebel @PatrickSachs @YangusKhan @isubasti @sgreav +/types/slate-react/ @andykent @majelbstoat @JanLoebel @PatrickSachs @YangusKhan @isubasti @sgreav @Kornil /types/sleep/ @rajarz +/types/slice-ansi/ @dwieeb /types/slickgrid/ @jbaldwin /types/slideout/ @ToastHawaii /types/slimerjs/ @alexwall /types/slocket/ @BendingBender /types/slug/ @mhegazy /types/smart-fox-server/ @ChanceM +/types/smooth-scroll/ @andreiho /types/smoothscroll-polyfill/ @kryops /types/smtp-server/v1/ @markisme @Taisiias /types/smtp-server/ @markisme @Taisiias @dex4er /types/smtpapi/ @a-morales +/types/snakecase-keys/ @BendingBender /types/snappy/ @reconbot /types/snapsvg/ @lhk @mattanja @kant2002 /types/snazzy-info-window/ @milosd92 @@ -4474,6 +4625,9 @@ /types/socket.io-parser/ @plantain-00 /types/socket.io-redis/ @nupplaphil @seeLuck /types/socket.io.users/ @kataras +/types/socketcluster/ @DanielRose +/types/socketcluster-client/ @DanielRose +/types/socketcluster-server/ @DanielRose /types/socketio-jwt/ @ehallander9591 /types/socketio-jwt-auth/ @codeanimal /types/socketio-wildcard/ @BendingBender @@ -4485,6 +4639,7 @@ /types/solution-center-communicator/ @dami-gg /types/sonic-boom/ @alferpal /types/sort-array/ @mrmlnc +/types/sort-object-keys/ @forivall /types/sortablejs/ @Maw-Fox @maartenstaa /types/soundmanager2/ @elton2048 /types/soupbintcp/ @jewbre @@ -4502,7 +4657,7 @@ /types/spdy/ @tony19 /types/speakeasy/ @legendecas @mrOlorin @xeoneux /types/speakingurl/ @Goldsmith42 -/types/spectacle/ @zmaybury +/types/spectacle/ @zmaybury @kale-stew /types/spectrum/ @M-Zuber @Ailrun /types/split/ @marcinporebski /types/split.js/ @icholy @@ -4514,6 +4669,7 @@ /types/sprintf/ @soywiz @BendingBender /types/sprintf-js/ @jasonswearingen @BendingBender @cdagli /types/sql-bricks/ @adn05 @paleo +/types/sql-template/ @q42jaap /types/sql.js/ @Hozuki /types/sqlanywhere/ @pkeuter /types/sqlite3/ @nmalaguti @dpyro @BehindTheMath @@ -4521,8 +4677,8 @@ /types/squirejs/ @bradleyayers /types/srp/ @Patman64 /types/ssh-key-decrypt/ @BendingBender -/types/ssh2/ @tkQubo @rbuckton @wrboyce -/types/ssh2-sftp-client/ @igrayson @ascariandrea @kartik2406 +/types/ssh2/ @tkQubo @rbuckton @wrboyce @lucasmotta +/types/ssh2-sftp-client/ @igrayson @ascariandrea @kartik2406 @viamuli /types/ssh2-streams/ @rbuckton /types/sshpk/ @mabels /types/stack-mapper/ @rogierschouten @@ -4552,9 +4708,9 @@ /types/sticky-cluster/ @paustint /types/stompit/ @DanielRose /types/stompjs/ @jimic @Dr4k4n -/types/stoppable/ @EricByers +/types/stoppable/ @EricByers @jplusje /types/storage-helper/ @ajafff -/types/store/ @vbortone @harry0000 @Ky6uk +/types/store/ @vbortone @harry0000 @Ky6uk @igl00 /types/storybook-addon-jsx/ @jameslnewell /types/storybook-readme/ @lonyele /types/storybook__addon-a11y/ @hyunseob @@ -4566,10 +4722,10 @@ /types/storybook__addon-knobs/ @joscha @martynaskadisa @amacleay /types/storybook__addon-links/ @joscha @jessepinho /types/storybook__addon-notes/ @joscha @amacleay -/types/storybook__addon-options/ @joscha @simonhn @amacleay +/types/storybook__addon-options/ @joscha @simonhn @amacleay @gaetanmaisse @adam187 /types/storybook__addon-storyshots/ @bradleyayers -/types/storybook__react/ @joscha @wapgear -/types/storybook__react-native/ @joscha @wapgear @alechill @iRoachie +/types/storybook__react/ @joscha @wapgear @dandean +/types/storybook__react-native/ @joscha @wapgear @alechill @iRoachie @ceyhuno /types/storybook__vue/ @pntgupta /types/stream-array/ @Tyler-Murphy /types/stream-buffers/ @Jason3S @@ -4584,6 +4740,7 @@ /types/stream-to-array/v0/ @Bartvds /types/stream-to-array/ @Bartvds @BendingBender /types/stream-to-promise/ @Alorel +/types/stream-to-string/ @BendingBender /types/streaming-json-stringify/ @BendingBender /types/streamjs/ @erosb /types/streamtest/ @lummish @@ -4606,7 +4763,7 @@ /types/stripe-checkout/ @cgwrench /types/stripe-v2/ @ejsmith @amritk @adamcmiel @jleider @galuszkak /types/stripe-v3/ @ejsmith @amritk @adamcmiel @jleider @galuszkak -/types/stripejs/ @RobinvanTienhoven +/types/stripejs/ @RobinvanTienhoven @mattferderer /types/strong-cluster-control/ @shuntksh /types/strong-error-handler/ @blankstar85 /types/strong-log-transformer/ @azasypkin @@ -4614,7 +4771,7 @@ /types/strophe.js/ @DavidKDeutsch /types/structured-source/ @azu /types/styled-components/v3/ @Igorbek @Igmat -/types/styled-components/ @Igorbek @Igmat @lavoaster +/types/styled-components/ @Igorbek @Igmat @lavoaster @Kovensky /types/styled-jsx/ @R1ZZU /types/styled-react-modal/ @Lavoaster /types/styled-system/ @maxdeviant @phobon @zephraph @damassi @alloy @maoueh @lavoaster @jschuler @@ -4634,7 +4791,7 @@ /types/sumo-logger/ @forabi @clementallen /types/suncalc/ @horiuchi /types/superagent/v2/ @varju @NicoZelaya @mxl -/types/superagent/ @NicoZelaya @mxl @paplorinc @shreyjain1994 @zopf @beeequeue +/types/superagent/ @NicoZelaya @mxl @paplorinc @shreyjain1994 @zopf @beeequeue @lukaselmer /types/superagent-bunyan/ @bricka /types/superagent-no-cache/ @mxl /types/superagent-prefix/ @mxl @@ -4658,7 +4815,7 @@ /types/sw-precache/ @JounQin /types/sw-precache-webpack-plugin/ @JounQin /types/swag/ @shiwano -/types/swagger-express-middleware/ @alexandreroba +/types/swagger-express-middleware/ @alexandreroba @tromgy /types/swagger-express-mw/ @micmro /types/swagger-express-validator/ @pinguet62 /types/swagger-hapi/ @micmro @@ -4690,8 +4847,9 @@ /types/tabbable/ @mokkan /types/table/ @evanshortiss @mrmlnc /types/tableau/ @protip +/types/tableify/ @forivall /types/tabris-plugin-firebase/ @eclipsesource -/types/tabtab/ @vojtechhabarta +/types/tabtab/ @vojtechhabarta @kamontat /types/tabulator/ @euginio /types/tail/ @spacejack /types/tapable/v0/ @e-cloud @@ -4721,7 +4879,7 @@ /types/tether-drop/ @adidahiya /types/tether-shepherd/ @mtgibbs /types/text-buffer/ @GlenCFL -/types/text-encoding/ @pine613 @mohsen1 @nwmqpa +/types/text-encoding/ @pine @mohsen1 @nwmqpa /types/text-encoding-utf-8/ @trxcllnt /types/text-table/ @saadq /types/textarea-caret/ @shiftkey @@ -4732,7 +4890,8 @@ /types/theming/ @eps1lon /types/theo/ @petekp /types/thepiratebay/ @jsorrell -/types/three/ @gyohk @florentpoujol @SereznoKot @omni360 @ivoisbelongtous @piranha771 @qszhusightp @nakakura @s093294 @Pro @efokschaner @PsychoSTS @dhritzkiv @apurvaojas @NotWoods @sethk @elk941 @Methuselah96 @Dukuo @JulianSSS @devilsparta +/types/three/ @gyohk @florentpoujol @SereznoKot @omni360 @ivoisbelongtous @piranha771 @qszhusightp @nakakura @s093294 @Pro @efokschaner @PsychoSTS @dhritzkiv @apurvaojas @NotWoods @sethk @elk941 @Methuselah96 @Dukuo @JulianSSS @devilsparta @KonstantinLukaschenko +/types/three-tds-loader/ @KonstantinLukaschenko @sschoensee /types/thrift/ @kamek-pf @kevin-greene-ck @jessezhang91 /types/throng/ @cyrilschumacher @tatethurston /types/throttle/ @BendingBender @@ -4742,6 +4901,7 @@ /types/through2/ @Bartvds @jedmao @valotas @TeamworkGuy2 @Alorel /types/through2-concurrent/ @Alorel /types/through2-map/ @LucasHill +/types/tildify/ @BendingBender /types/tile-reduce/ @DenisCarriere /types/tilebelt/ @DenisCarriere /types/time-span/ @BendingBender @mdvorscak @@ -4749,6 +4909,8 @@ /types/timelinejs3/ @MikeMatusz /types/timer-machine/ @dolanmiu /types/timezone-js/ @bonnici +/types/timing-safe-equal/ @BendingBender +/types/timsort/ @Vunovati /types/tinajs__tina/ @Jimexist /types/tinajs__tina-redux/ @Jimexist /types/tinder/ @pingec @@ -4773,7 +4935,7 @@ /types/toastr/ @borisyankov /types/tocktimer/ @evanshortiss /types/tokgen/ @l-jonas -/types/toobusy-js/ @atd-schubert +/types/toobusy-js/ @atd-schubert @BendingBender /types/tooltipster/ @stephenlautier @pjmagee @VorobeY1326 @leonard-thieu @janhi @joeskeen /types/topojson/ @ricardo-mello @chenzhutian @denisname /types/topojson-client/ @denisname @ricardo-mello @@ -4787,7 +4949,7 @@ /types/tough-cookie/ @leonard-thieu @LiJinyao @no2chem /types/tough-cookie-filestore/ @friedow /types/traceback/ @misak113 -/types/tracking/ @pimterry +/types/tracking/ @pimterry @bratter /types/transducers-js/ @colinkahn @dphilipson @NaridaL /types/transducers.js/ @dphilipson /types/transliteration/ @tony19 @@ -4806,13 +4968,14 @@ /types/tspromise/ @soywiz /types/ttf2woff2/ @ThomasdenH /types/tunnel/ @BendingBender -/types/tus-js-client/ @kevhiggins +/types/tus-js-client/ @kevhiggins @Acconut /types/tv4/ @Bartvds @psnider /types/tween.js/ @Amos47 @sunetos @jzarnikov @alexburner /types/tweenjs/ @evilangelist @jcyuan /types/tweezer.js/ @praxxis /types/twig/ @soywiz @enko /types/twilio/ @nickiannone @ashleybrener +/types/twilio-common/ @gatimus /types/twilio-video/ @minddocdev @darioblanco /types/twit/ @Volox @sapphiredev @abraham @siwalikm @plhery /types/twitch-ext/ @beheh @@ -4857,7 +5020,9 @@ /types/uniqid/ @idchlife /types/unique-hash-stream/ @BendingBender /types/unique-random/ @Kuniwak -/types/unist/ @bizen241 +/types/unique-random-array/ @BendingBender +/types/unist/ @bizen241 @lujun2 @hrajchert @wooorm @rokt33r +/types/unist-util-is/ @rokt33r /types/unity-webapi/ @jmvrbanac /types/universal-analytics/ @Bartvds @DarkerTV /types/universal-cookie/ @tomi @@ -4905,6 +5070,7 @@ /types/uuid-validate/ @HiromiShikata /types/uws/ @plantain-00 @orblazer /types/v-chart-plugin/ @natemara +/types/v8flags/ @BendingBender /types/valdr/ @ilbertz /types/valdr-message/ @ilbertz /types/valerie/ @conficient @@ -4920,7 +5086,6 @@ /types/vast-client/ @jgainfort /types/vec3/ @xstoudi /types/vectorious/ @erikgerrits -/types/vega/ @pelotom /types/velocity-animate/ @smrq /types/verror/ @svi3c @max4t /types/vertx3-eventbus-client/ @oddeirik @@ -4928,7 +5093,8 @@ /types/vexdb/ @MayorMonty /types/vexflow/ @rquiring @sebastianhaas @bohoffi @sschmidTU /types/vfile/ @bizen241 @rokt33r -/types/vfile-location/ @ikatyang +/types/vfile-location/ @ikatyang @rokt33r +/types/vfile-message/ @rokt33r /types/victory/ @asvetliakov @snerks @Havret @alredyExist /types/video.js/ @vbortone @scleriot @SWBennett06 @IgelCampus @giofreitas @gjanblaszczyk @sroucheray @AkxeOne @meikidd /types/viewability-helper/ @lironzluf @@ -4944,7 +5110,7 @@ /types/vinyl-paths/ @tkQubo /types/virtual-dom/ @chbrown /types/virtual-keyboard/ @bsurai -/types/vis/ @MichaelBitard @macleodbroad-wf @adripanico @seveves @kaktus40 @mmaitre314 @supercargo @takato1314 @alex-kachura @dcop @avrahamcool +/types/vis/ @MichaelBitard @macleodbroad-wf @adripanico @seveves @kaktus40 @mmaitre314 @supercargo @takato1314 @alex-kachura @dcop @avrahamcool @divideby /types/vision/v4/ @jasonswearingen @AJamesPhillips /types/vision/ @jasonswearingen @AJamesPhillips @lenovouser /types/vitalsigns/ @cyrilschumacher @@ -4963,7 +5129,8 @@ /types/vue-scrollto/ @vincekovacs /types/vue-select/ @silh /types/vue2-datepicker/ @ChristianStornowski -/types/vuex-i18n/ @jaeggerr @noamkfir +/types/vuelidate/ @janesser +/types/vuex-i18n/ @jaeggerr @noamkfir @barahliush /types/w2ui/ @Ptival /types/w3c-generic-sensor/ @kenchris /types/w3c-image-capture/ @cosium @@ -4984,17 +5151,19 @@ /types/watson-developer-cloud/ @waldo000000 @Naktibalda /types/wavesurfer.js/ @higuri /types/waypoints/ @dominikbulaj @Koloto @evil-shrike +/types/wcag-contrast/ @plantain-00 /types/wcwidth/ @rokt33r /types/weak/ @int0h /types/weapp-api/ @vargeek /types/web-animations-js/ @kritollm /types/web-bluetooth/ @urish /types/web-push/ @paullessing +/types/web-resource-inliner/ @BendingBender /types/web3/ @simon-jentzsch @nitzantomer @zurbo @yxliang01 @phra @naddison36 @icaroharry @linusnorton @jpeletier @anneau @matrushka @andrevmatos @levino @zlumer @archangel-irk @sogasg @donamk @dkent600 @nerddan /types/web3-eth-abi/ @LogvinovLeon /types/web3-provider-engine/ @LogvinovLeon /types/webappsec-credential-management/ @iainmcgin -/types/webassembly-js-api/ @periklis +/types/webassembly-js-api/ @periklis @chicoxyzzy /types/webassembly-web-api/ @jhenninger /types/webcl/ @NCARalph /types/webcomponents.js/ @adidahiya @@ -5061,6 +5230,7 @@ /types/wicg-mediasession/ @jucrouzet /types/wif/ @danwbyrne /types/wiiu/ @mzsm +/types/wikidata-sdk/ @kamontat /types/window-or-global/ @vvakame /types/window-size/ @pmkary /types/windows-1251/ @RomanGolovanov @@ -5113,7 +5283,8 @@ /types/xmldom/ @tkqubo /types/xmlpoke/ @garthk /types/xmltojson/ @traviscrowe -/types/xmpp__jid/ @PJakcson +/types/xmpp__jid/ @PJakcson @BendingBender +/types/xmpp__xml/ @BendingBender /types/xregexp/ @Bartvds @jfahrenkrug @sigo /types/xrm/v7/ @daryllabar /types/xrm/v8/ @6ix4our @mattngan @markusmauch @daryllabar @clownwilleatme @mariusagur @@ -5137,7 +5308,8 @@ /types/yayson/ @Codesleuth /types/yazl/ @taoqf @seangenabe /types/ydn-db/ @yathit @gabrielmaldi -/types/yeoman-generator/ @armorik83 @janslow @ikatyang +/types/yeoman-assert/ @Toilal +/types/yeoman-generator/ @armorik83 @janslow @ikatyang @tasadar2 /types/yeoman-test/ @ikatyang /types/yesql/ @Sumolari /types/yoctodelay/ @seangenabe @@ -5146,10 +5318,10 @@ /types/yog2-kernel/ @ssddi456 /types/yoga-layout/ @tnobody /types/yosay/ @armorik83 -/types/youtube/ @DazWilkin @JoshuaKGoldberg @eliotfallon213 @terrymun +/types/youtube/ @DazWilkin @JoshuaKGoldberg @eliotfallon213 @terrymun @paulhobbel /types/youtube-dl/ @bsurai /types/yui/ @giabao -/types/yup/ @dhardtke @vtserman @MoretonBayRC @sseppola @YashdalfTheGray +/types/yup/ @dhardtke @vtserman @MoretonBayRC @sseppola @YashdalfTheGray @vincentjames501 /types/z-schema/ @pgonzal /types/zapier-platform-core/ @bradleyayers /types/zeit__next-typescript/ @icopp @@ -5172,5 +5344,6 @@ /types/zmq/ @davemckeown /types/zookeeper/ @xialeistudio /types/zopflipng-bin/ @hikoma +/types/zrender/ @iRON5 /types/zui/ @yuanxu /types/zxcvbn/ @mtraynham From 1c127d70abbfc157125f25cb5906a854ed1ec73b Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Fri, 7 Dec 2018 22:47:12 +0100 Subject: [PATCH 481/608] Add types for escape-goat --- types/escape-goat/escape-goat-tests.ts | 14 ++++++++++++++ types/escape-goat/index.d.ts | 9 +++++++++ types/escape-goat/tsconfig.json | 23 +++++++++++++++++++++++ types/escape-goat/tslint.json | 1 + 4 files changed, 47 insertions(+) create mode 100644 types/escape-goat/escape-goat-tests.ts create mode 100644 types/escape-goat/index.d.ts create mode 100644 types/escape-goat/tsconfig.json create mode 100644 types/escape-goat/tslint.json diff --git a/types/escape-goat/escape-goat-tests.ts b/types/escape-goat/escape-goat-tests.ts new file mode 100644 index 0000000000..cfc1808495 --- /dev/null +++ b/types/escape-goat/escape-goat-tests.ts @@ -0,0 +1,14 @@ +import * as escapeGoat from 'escape-goat'; + +// $ExpectType string +escapeGoat.escape('🦄 & 🐐'); + +// $ExpectType string +escapeGoat.unescape('🦄 & 🐐'); + +// $ExpectType string +escapeGoat.escape('Hello World'); + +const url = 'https://sindresorhus.com?x="🦄"'; +// $ExpectType string +escapeGoat.escapeTag`Unicorn`; diff --git a/types/escape-goat/index.d.ts b/types/escape-goat/index.d.ts new file mode 100644 index 0000000000..f76f384fb0 --- /dev/null +++ b/types/escape-goat/index.d.ts @@ -0,0 +1,9 @@ +// Type definitions for escape-goat 1.3 +// Project: https://github.com/sindresorhus/escape-goat#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export function escape(input: string): string; +export function unescape(input: string): string; +export function escapeTag(template: TemplateStringsArray, ...substitutions: any[]): string; +export function unescapeTag(template: TemplateStringsArray, ...substitutions: any[]): string; diff --git a/types/escape-goat/tsconfig.json b/types/escape-goat/tsconfig.json new file mode 100644 index 0000000000..9715cb59e1 --- /dev/null +++ b/types/escape-goat/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "escape-goat-tests.ts" + ] +} diff --git a/types/escape-goat/tslint.json b/types/escape-goat/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/escape-goat/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 78e24e6d88712405552da177c36032ece6d6be1e Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Fri, 7 Dec 2018 13:47:53 -0800 Subject: [PATCH 482/608] [prop-types] Make ValidationMap not require a validator for every member (#31133) * Make ValidationMap not require a validator for every member of the props interface * Fix InferProps when there are no required keys --- types/prop-types/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/prop-types/index.d.ts b/types/prop-types/index.d.ts index 3b0a1164d6..b6918d9d44 100644 --- a/types/prop-types/index.d.ts +++ b/types/prop-types/index.d.ts @@ -41,12 +41,12 @@ export interface Requireable extends Validator { isRequired: Validator>; } -export type ValidationMap = { [K in keyof T]-?: Validator }; +export type ValidationMap = { [K in keyof T]?: Validator }; export type InferType = V extends Validator ? T : any; export type InferProps = - & InferPropsInner>> - & Partial>>>; + & (RequiredKeys extends undefined ? {} : InferPropsInner>>) + & (OptionalKeys extends undefined ? {} : Partial>>>); export const any: Requireable; export const array: Requireable; From fb9f925aa964a546e1f50d3623938a17670c7207 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Fri, 7 Dec 2018 22:57:51 +0100 Subject: [PATCH 483/608] Add types for bin-version --- types/bin-version/bin-version-tests.ts | 6 ++++++ types/bin-version/index.d.ts | 14 ++++++++++++++ types/bin-version/tsconfig.json | 23 +++++++++++++++++++++++ types/bin-version/tslint.json | 1 + 4 files changed, 44 insertions(+) create mode 100644 types/bin-version/bin-version-tests.ts create mode 100644 types/bin-version/index.d.ts create mode 100644 types/bin-version/tsconfig.json create mode 100644 types/bin-version/tslint.json diff --git a/types/bin-version/bin-version-tests.ts b/types/bin-version/bin-version-tests.ts new file mode 100644 index 0000000000..7decda3e66 --- /dev/null +++ b/types/bin-version/bin-version-tests.ts @@ -0,0 +1,6 @@ +import binVersion = require('bin-version'); + +// $ExpectType Promise +binVersion('curl'); +// $ExpectType Promise +binVersion('openssl', { args: ['version'] }); diff --git a/types/bin-version/index.d.ts b/types/bin-version/index.d.ts new file mode 100644 index 0000000000..3db592bec7 --- /dev/null +++ b/types/bin-version/index.d.ts @@ -0,0 +1,14 @@ +// Type definitions for bin-version 3.0 +// Project: https://github.com/sindresorhus/bin-version#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = binVersion; + +declare function binVersion(binary: string, options?: binVersion.Options): Promise; + +declare namespace binVersion { + interface Options { + args?: string[]; + } +} diff --git a/types/bin-version/tsconfig.json b/types/bin-version/tsconfig.json new file mode 100644 index 0000000000..e89af3fdb8 --- /dev/null +++ b/types/bin-version/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "bin-version-tests.ts" + ] +} diff --git a/types/bin-version/tslint.json b/types/bin-version/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/bin-version/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From dbe4ab140d0156f81e839a3721f6fea6d7878c0c Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Fri, 7 Dec 2018 23:39:39 +0100 Subject: [PATCH 484/608] Add types for @sindresorhus/class-names --- types/sindresorhus__class-names/index.d.ts | 8 ++++++ .../sindresorhus__class-names-tests.ts | 25 +++++++++++++++++ types/sindresorhus__class-names/tsconfig.json | 28 +++++++++++++++++++ types/sindresorhus__class-names/tslint.json | 1 + 4 files changed, 62 insertions(+) create mode 100644 types/sindresorhus__class-names/index.d.ts create mode 100644 types/sindresorhus__class-names/sindresorhus__class-names-tests.ts create mode 100644 types/sindresorhus__class-names/tsconfig.json create mode 100644 types/sindresorhus__class-names/tslint.json diff --git a/types/sindresorhus__class-names/index.d.ts b/types/sindresorhus__class-names/index.d.ts new file mode 100644 index 0000000000..fbb81c48c6 --- /dev/null +++ b/types/sindresorhus__class-names/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for @sindresorhus/class-names 1.0 +// Project: https://github.com/sindresorhus/class-names +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = classNames; + +declare function classNames(...input: any[]): string; diff --git a/types/sindresorhus__class-names/sindresorhus__class-names-tests.ts b/types/sindresorhus__class-names/sindresorhus__class-names-tests.ts new file mode 100644 index 0000000000..d8627cb705 --- /dev/null +++ b/types/sindresorhus__class-names/sindresorhus__class-names-tests.ts @@ -0,0 +1,25 @@ +import classNames = require('@sindresorhus/class-names'); + +// $ExpectType string +classNames('unicorn', 'rainbow'); +// $ExpectType string +classNames({ awesome: true, foo: false }, 'unicorn', { rainbow: false }); +// $ExpectType string +classNames('unicorn', null, undefined, 0, 1, { foo: null }); + +const buttonType = 'main'; +// $ExpectType string +classNames({ [`button-${buttonType}`]: true }); + +const props = { + type: 'success', + small: true, + block: undefined, +}; + +// $ExpectType string +classNames('button', { + [`button-${props.type}`]: props.type, + 'button-block': props.block, + 'button-small': props.small, +}); diff --git a/types/sindresorhus__class-names/tsconfig.json b/types/sindresorhus__class-names/tsconfig.json new file mode 100644 index 0000000000..a0b866ebdf --- /dev/null +++ b/types/sindresorhus__class-names/tsconfig.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "paths": { + "@sindresorhus/class-names": [ + "sindresorhus__class-names" + ] + }, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "sindresorhus__class-names-tests.ts" + ] +} diff --git a/types/sindresorhus__class-names/tslint.json b/types/sindresorhus__class-names/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/sindresorhus__class-names/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 8bfd76757eddd4e10958478e011ed949ecba7d16 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Fri, 7 Dec 2018 23:52:35 +0100 Subject: [PATCH 485/608] Add types for humanize-url --- types/humanize-url/humanize-url-tests.ts | 4 ++++ types/humanize-url/index.d.ts | 8 ++++++++ types/humanize-url/tsconfig.json | 23 +++++++++++++++++++++++ types/humanize-url/tslint.json | 1 + 4 files changed, 36 insertions(+) create mode 100644 types/humanize-url/humanize-url-tests.ts create mode 100644 types/humanize-url/index.d.ts create mode 100644 types/humanize-url/tsconfig.json create mode 100644 types/humanize-url/tslint.json diff --git a/types/humanize-url/humanize-url-tests.ts b/types/humanize-url/humanize-url-tests.ts new file mode 100644 index 0000000000..7556cfb1c4 --- /dev/null +++ b/types/humanize-url/humanize-url-tests.ts @@ -0,0 +1,4 @@ +import humanizeUrl = require('humanize-url'); + +// $ExpectType string +humanizeUrl('https://www.sindresorhus.com/'); diff --git a/types/humanize-url/index.d.ts b/types/humanize-url/index.d.ts new file mode 100644 index 0000000000..c00f5c982f --- /dev/null +++ b/types/humanize-url/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for humanize-url 2.0 +// Project: https://github.com/sindresorhus/humanize-url#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = humanizeUrl; + +declare function humanizeUrl(url: string): string; diff --git a/types/humanize-url/tsconfig.json b/types/humanize-url/tsconfig.json new file mode 100644 index 0000000000..dd9fec46b6 --- /dev/null +++ b/types/humanize-url/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "humanize-url-tests.ts" + ] +} diff --git a/types/humanize-url/tslint.json b/types/humanize-url/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/humanize-url/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 948a00007eca26973add9d3b31ee7d95575e3341 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sat, 8 Dec 2018 00:24:14 +0100 Subject: [PATCH 486/608] Add types for matcher --- types/matcher/index.d.ts | 16 ++++++++++++++++ types/matcher/matcher-tests.ts | 10 ++++++++++ types/matcher/tsconfig.json | 23 +++++++++++++++++++++++ types/matcher/tslint.json | 1 + 4 files changed, 50 insertions(+) create mode 100644 types/matcher/index.d.ts create mode 100644 types/matcher/matcher-tests.ts create mode 100644 types/matcher/tsconfig.json create mode 100644 types/matcher/tslint.json diff --git a/types/matcher/index.d.ts b/types/matcher/index.d.ts new file mode 100644 index 0000000000..08e4e91f8f --- /dev/null +++ b/types/matcher/index.d.ts @@ -0,0 +1,16 @@ +// Type definitions for matcher 1.1 +// Project: https://github.com/sindresorhus/matcher#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = matcher; + +declare function matcher(inputs: string[], patterns: string[], options?: matcher.Options): string[]; + +declare namespace matcher { + function isMatch(input: string, pattern: string, options?: Options): boolean; + + interface Options { + caseSensitive?: boolean; + } +} diff --git a/types/matcher/matcher-tests.ts b/types/matcher/matcher-tests.ts new file mode 100644 index 0000000000..fbadf58e1e --- /dev/null +++ b/types/matcher/matcher-tests.ts @@ -0,0 +1,10 @@ +import matcher = require('matcher'); + +// $ExpectType string[] +matcher(['foo', 'bar', 'moo'], ['*oo', '!foo']); +matcher(['foo', 'bar', 'moo'], ['!*oo']); +matcher(['foo', 'bar', 'moo'], ['!*oo'], { caseSensitive: true }); + +// $ExpectType boolean +matcher.isMatch('unicorn', 'uni*'); +matcher.isMatch('UNICORN', 'UNI*', { caseSensitive: true }); diff --git a/types/matcher/tsconfig.json b/types/matcher/tsconfig.json new file mode 100644 index 0000000000..efa5f37200 --- /dev/null +++ b/types/matcher/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "matcher-tests.ts" + ] +} diff --git a/types/matcher/tslint.json b/types/matcher/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/matcher/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From ec2874d4b8d43ed49da56ff303660fa242b614e2 Mon Sep 17 00:00:00 2001 From: runebaas Date: Sat, 8 Dec 2018 01:19:16 +0100 Subject: [PATCH 487/608] [openapi-factory] set strictFunctionTypes to true and change import in example code --- types/openapi-factory/openapi-factory-tests.ts | 2 +- types/openapi-factory/tsconfig.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/types/openapi-factory/openapi-factory-tests.ts b/types/openapi-factory/openapi-factory-tests.ts index ad24a5021d..8213104a44 100644 --- a/types/openapi-factory/openapi-factory-tests.ts +++ b/types/openapi-factory/openapi-factory-tests.ts @@ -1,4 +1,4 @@ -import * as OpenApiFactory from 'openapi-factory'; +import OpenApiFactory = require('openapi-factory'); const api = new OpenApiFactory({}); diff --git a/types/openapi-factory/tsconfig.json b/types/openapi-factory/tsconfig.json index e8528e8e84..e9035817a2 100644 --- a/types/openapi-factory/tsconfig.json +++ b/types/openapi-factory/tsconfig.json @@ -7,7 +7,7 @@ "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, - "strictFunctionTypes": false, + "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ "../" From b417a1e3c3cb6899c7bd4073bed066b97f0a45c5 Mon Sep 17 00:00:00 2001 From: niyari Date: Sat, 8 Dec 2018 09:54:51 +0900 Subject: [PATCH 488/608] Add AutoInitialization --- types/materialize-css/autoinit.d.ts | 8 ++++++++ types/materialize-css/index.d.ts | 1 + 2 files changed, 9 insertions(+) create mode 100644 types/materialize-css/autoinit.d.ts diff --git a/types/materialize-css/autoinit.d.ts b/types/materialize-css/autoinit.d.ts new file mode 100644 index 0000000000..96035db75b --- /dev/null +++ b/types/materialize-css/autoinit.d.ts @@ -0,0 +1,8 @@ +declare namespace M { + class AutoInitialization { + } + /** + * Automatically initialize components. + */ + function AutoInit(context?: Element): AutoInitialization; +} diff --git a/types/materialize-css/index.d.ts b/types/materialize-css/index.d.ts index f8502cafb4..3be768a216 100644 --- a/types/materialize-css/index.d.ts +++ b/types/materialize-css/index.d.ts @@ -9,6 +9,7 @@ /// /// +/// /// /// /// From 31e9d65a72f0f95b9884f4e058293025fcda2bf0 Mon Sep 17 00:00:00 2001 From: andreidigori <45198612+andreidigori@users.noreply.github.com> Date: Sat, 8 Dec 2018 04:37:49 +0200 Subject: [PATCH 489/608] Update tsconfig.json Set strictFunctionTypes to true --- types/gdal/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/gdal/tsconfig.json b/types/gdal/tsconfig.json index 3a5bfaf917..5c11132a33 100644 --- a/types/gdal/tsconfig.json +++ b/types/gdal/tsconfig.json @@ -7,7 +7,7 @@ "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, - "strictFunctionTypes": false, + "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ "../" From bce95d1c9cc9b24e608817ba722e8b705b97ebca Mon Sep 17 00:00:00 2001 From: denis Date: Wed, 21 Nov 2018 22:37:28 +0100 Subject: [PATCH 490/608] Use $ExpectError --- types/d3-zoom/d3-zoom-tests.ts | 37 ++++++++++++++++++++++------------ types/d3-zoom/index.d.ts | 5 ++++- 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/types/d3-zoom/d3-zoom-tests.ts b/types/d3-zoom/d3-zoom-tests.ts index c758e83448..c418318d3f 100644 --- a/types/d3-zoom/d3-zoom-tests.ts +++ b/types/d3-zoom/d3-zoom-tests.ts @@ -248,15 +248,15 @@ let zoomInterpolatorFactory: (a: ZoomView, b: ZoomView) => ZoomInterpolator; // Basic case without casting basicInterpolatorFactory = svgZoom.interpolate(); -// Assuming it is know that a specialized interpolation factory was used. E.g. ZoomInterpolator also has a duration -// argument +// Assuming it is know that a specialized interpolation factory was used. E.g. ZoomInterpolator also has a duration argument zoomInterpolatorFactory = svgZoom.interpolate<(a: ZoomView, b: ZoomView) => ZoomInterpolator>(); // on() -------------------------------------------------------------------- // chainable svgZoom = svgZoom.on('zoom', zoomedSVGOverlay); -// svgZoom = svgZoom.on('zoom', zoomedCanvas); // fails, zoom event handler has wrong this and datum type +// $ExpectError +svgZoom = svgZoom.on('zoom', zoomedCanvas); // fails, zoom event handler has wrong this and datum type let zoomHandler: ((this: SVGRectElement, datum: SVGDatum, index: number, group: SVGRectElement[] | ArrayLike) => void) | undefined; zoomHandler = svgZoom.on('zoom'); @@ -297,7 +297,8 @@ const svgOverlayTransition = svgOverlay.transition(); // use on selection svgZoom.transform(svgOverlay, d3Zoom.zoomIdentity); -// svgZoom.transform(groupsSelection, d3Zoom.zoomIdentity); // fails, as groupSelection mismatches DOM Element type and datum type +// $ExpectError +svgZoom.transform(groupsSelection, d3Zoom.zoomIdentity); // fails, as groupSelection mismatches DOM Element type and datum type svgZoom.transform(svgOverlay, function(datum, index, groups) { const that: SVGRectElement = this; @@ -308,9 +309,11 @@ svgZoom.transform(svgOverlay, function(datum, index, groups) { console.log('Filter Brush Event status as per datum: ', d.filterBrushEvent); // datum type is SVGDatum return d3Zoom.zoomIdentity; }); + // use on transition svgOverlayTransition.call(svgZoom.transform, d3Zoom.zoomIdentity); -// svgZoom.transform(groupsTransition, d3Zoom.zoomIdentity); // fails, as groupTransition mismatches DOM Element type and datum type +// $ExpectError +svgZoom.transform(groupsTransition, d3Zoom.zoomIdentity); // fails, as groupTransition mismatches DOM Element type and datum type svgZoom.transform(svgOverlayTransition, d3Zoom.zoomIdentity); svgZoom.transform(svgOverlayTransition, function(datum, index, groups) { @@ -327,7 +330,8 @@ svgZoom.transform(svgOverlayTransition, function(datum, index, groups) { // use on selection svgZoom.translateBy(svgOverlay, 20, 50); -// svgZoom.translateBy(groupsSelection, 20, 50); // fails, as groupSelection mismatches DOM Element type and datum type +// $ExpectError +svgZoom.translateBy(groupsSelection, 20, 50); // fails, as groupSelection mismatches DOM Element type and datum type svgZoom.translateBy( svgOverlay, @@ -376,7 +380,8 @@ svgZoom.translateBy( // use on transition svgZoom.translateBy(svgOverlayTransition, 20, 50); -// svgZoom.translateBy(groupsTransition, 20, 50); // fails, as groupTransition mismatches DOM Element type and datum type +// $ExpectError +svgZoom.translateBy(groupsTransition, 20, 50); // fails, as groupTransition mismatches DOM Element type and datum type svgZoom.translateBy( svgOverlayTransition, @@ -427,7 +432,8 @@ svgZoom.translateBy( // use on selection svgZoom.translateTo(svgOverlay, 20, 50); -// svgZoom.translateTo(groupsSelection, 20, 50); // fails, as groupSelection mismatches DOM Element type and datum type +// $ExpectError +svgZoom.translateTo(groupsSelection, 20, 50); // fails, as groupSelection mismatches DOM Element type and datum type svgZoom.translateTo( svgOverlay, @@ -476,7 +482,8 @@ svgZoom.translateTo( // use on transition svgZoom.translateTo(svgOverlayTransition, 20, 50); -// svgZoom.translateTo(groupsTransition, 20, 50); // fails, as groupTransition mismatches DOM Element type and datum type +// $ExpectError +svgZoom.translateTo(groupsTransition, 20, 50); // fails, as groupTransition mismatches DOM Element type and datum type svgZoom.translateTo( svgOverlayTransition, @@ -527,7 +534,8 @@ svgZoom.translateTo( // use on selection svgZoom.scaleBy(svgOverlay, 3); -// svgZoom.scaleBy(groupsSelection, 3); // fails, as groupSelection mismatches DOM Element type and datum type +// $ExpectError +svgZoom.scaleBy(groupsSelection, 3); // fails, as groupSelection mismatches DOM Element type and datum type svgZoom.scaleBy(svgOverlay, function(datum, index, groups) { const that: SVGRectElement = this; @@ -540,7 +548,8 @@ svgZoom.scaleBy(svgOverlay, function(datum, index, groups) { }); // use on transition svgZoom.scaleBy(svgOverlayTransition, 3); -// svgZoom.scaleBy(groupsTransition, 3); // fails, as groupTransition mismatches DOM Element type and datum type +// $ExpectError +svgZoom.scaleBy(groupsTransition, 3); // fails, as groupTransition mismatches DOM Element type and datum type svgZoom.scaleBy(svgOverlayTransition, function(datum, index, groups) { const that: SVGRectElement = this; @@ -556,7 +565,8 @@ svgZoom.scaleBy(svgOverlayTransition, function(datum, index, groups) { // use on selection svgZoom.scaleTo(svgOverlay, 3); -// svgZoom.scaleBy(groupsSelection, 3); // fails, as groupSelection mismatches DOM Element type and datum type +// $ExpectError +svgZoom.scaleBy(groupsSelection, 3); // fails, as groupSelection mismatches DOM Element type and datum type svgZoom.scaleTo(svgOverlay, function(datum, index, groups) { const that: SVGRectElement = this; @@ -569,7 +579,8 @@ svgZoom.scaleTo(svgOverlay, function(datum, index, groups) { }); // use on transition svgZoom.scaleTo(svgOverlayTransition, 3); -// svgZoom.scaleBy(groupsTransition, 3); // fails, as groupTransition mismatches DOM Element type and datum type +// $ExpectError +svgZoom.scaleBy(groupsTransition, 3); // fails, as groupTransition mismatches DOM Element type and datum type svgZoom.scaleTo(svgOverlayTransition, function(datum, index, groups) { const that: SVGRectElement = this; diff --git a/types/d3-zoom/index.d.ts b/types/d3-zoom/index.d.ts index 827390b871..8a3e742ba4 100644 --- a/types/d3-zoom/index.d.ts +++ b/types/d3-zoom/index.d.ts @@ -1,6 +1,9 @@ // Type definitions for d3JS d3-zoom module 1.7 // Project: https://github.com/d3/d3-zoom/ -// Definitions by: Tom Wanzek , Alex Ford , Boris Yankov +// Definitions by: Tom Wanzek +// Alex Ford +// Boris Yankov +// denisname // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 From 9b3089b2e35a6a32dc95eb1f51b135e4d24c0760 Mon Sep 17 00:00:00 2001 From: denis Date: Thu, 22 Nov 2018 00:55:30 +0100 Subject: [PATCH 491/608] Support time scales for rescaleX and rescaleY --- types/d3-zoom/d3-zoom-tests.ts | 9 ++++++--- types/d3-zoom/index.d.ts | 6 +++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/types/d3-zoom/d3-zoom-tests.ts b/types/d3-zoom/d3-zoom-tests.ts index c418318d3f..42393b9e82 100644 --- a/types/d3-zoom/d3-zoom-tests.ts +++ b/types/d3-zoom/d3-zoom-tests.ts @@ -9,7 +9,7 @@ import * as d3Zoom from 'd3-zoom'; import { ArrayLike, select, Selection, event } from 'd3-selection'; import { Transition } from 'd3-transition'; -import { scaleLinear, ScaleLinear } from 'd3-scale'; +import { scaleLinear, ScaleLinear, ScaleTime, scaleTime } from 'd3-scale'; import { interpolateZoom, interpolate, interpolateArray, ZoomInterpolator, ZoomView } from 'd3-interpolate'; // -------------------------------------------------------------------------- @@ -627,15 +627,18 @@ const invertedPoint: [number, number] = zTransform.invert([150, 240]); const invertedX: number = zTransform.invertX(150); const invertedY: number = zTransform.invertY(240); -// TODO: reScaleX, reScaleY - let linearScale: ScaleLinear = scaleLinear(); +let timeScale: ScaleTime = scaleTime(); linearScale = zTransform.rescaleX(linearScale); linearScale = zTransform.rescaleY(linearScale); +timeScale = zTransform.rescaleX(timeScale); +timeScale = zTransform.rescaleY(timeScale); + const transformation: string = zTransform.toString(); +zTransform = zTransform.scale(2); zTransform = zTransform.translate(50, 40); // zoomIdentity ------------------------------------------------------------- diff --git a/types/d3-zoom/index.d.ts b/types/d3-zoom/index.d.ts index 8a3e742ba4..3f6100d4b8 100644 --- a/types/d3-zoom/index.d.ts +++ b/types/d3-zoom/index.d.ts @@ -29,12 +29,12 @@ export type ZoomedElementBaseType = Element; * that can be passed into zoomTransform methods rescaleX and rescaleY */ export interface ZoomScale { - domain(): number[]; - domain(domain: number[]): this; + domain(): number[] | Date[]; + domain(domain: Array): this; range(): number[]; range(range: number[]): this; copy(): ZoomScale; - invert(value: number): number; + invert(value: number): number | Date; } // -------------------------------------------------------------------------- From b6730176641bc5c41ca2a3f63afc0499bcf14678 Mon Sep 17 00:00:00 2001 From: denis Date: Sun, 18 Nov 2018 14:43:09 +0100 Subject: [PATCH 492/608] Improve packSibling and packEnclose typing --- types/d3-hierarchy/d3-hierarchy-tests.ts | 31 +++++++++++++++++------- types/d3-hierarchy/index.d.ts | 25 +++++++++++++++---- 2 files changed, 42 insertions(+), 14 deletions(-) diff --git a/types/d3-hierarchy/d3-hierarchy-tests.ts b/types/d3-hierarchy/d3-hierarchy-tests.ts index 16b372993d..b5982a4d5f 100644 --- a/types/d3-hierarchy/d3-hierarchy-tests.ts +++ b/types/d3-hierarchy/d3-hierarchy-tests.ts @@ -12,6 +12,7 @@ import * as d3Hierarchy from 'd3-hierarchy'; // Preparatory Steps // ----------------------------------------------------------------------- +let str: string; let num: number; let numOrUndefined: number | undefined; let size: [number, number]; @@ -825,22 +826,34 @@ copiedPackNode = packRootNode.copy(); // Pack Siblings and Enclosure // ----------------------------------------------------------------------- -interface CircleData extends d3Hierarchy.PackCircle { - v: string; -} - -let circles: CircleData[] = [ +const radius = [ { r: 10, v: 'a' }, - { r: 1, v: 'b' }, + { r: 30, v: 'b' }, { r: 20, v: 'c' } ]; // packSiblings -circles = d3Hierarchy.packSiblings(circles); +const circles = d3Hierarchy.packSiblings(radius); +str = circles[0].v; +num = circles[0].r; +num = circles[0].x; +num = circles[0].y; // packEnclose -let enclosure: { r: number, x: number, y: number }; +const moreCircles = [ + { r: 10, v: 'a', x: 0, y: 10 }, + { r: 30, v: 'b', x: 5, y: 15 }, + { r: 20, v: 'c', x: 7, y: 30 } +]; -enclosure = d3Hierarchy.packEnclose(circles); +const circle = d3Hierarchy.packEnclose(moreCircles); +num = circle.r; +num = circle.x; +num = circle.y; +// $ExpectError +str = circle.v; // fails, property 'v' does not exist + +// $ExpectError +d3Hierarchy.packEnclose(radius); diff --git a/types/d3-hierarchy/index.d.ts b/types/d3-hierarchy/index.d.ts index 0ec823cc78..fb5ebd5656 100644 --- a/types/d3-hierarchy/index.d.ts +++ b/types/d3-hierarchy/index.d.ts @@ -802,7 +802,7 @@ export function pack(): PackLayout; // Pack Siblings and Enclosure // ----------------------------------------------------------------------- -export interface PackCircle { +export interface PackRadius { /** * The radius of the circle. */ @@ -819,10 +819,25 @@ export interface PackCircle { y?: number; } +export interface PackCircle { + /** + * The radius of the circle. + */ + r: number; + + /** + * The x-coordinate of the circle’s center. + */ + x: number; + + /** + * The y-coordinate of the circle’s center. + */ + y: number; +} + // TODO: Since packSiblings manipulates the circles array in place, technically the x and y properties // are optional on invocation, but will be created after execution for each entry. -// For invocation of packEnclose the x and y coordinates are mandatory. It seems easier to just comment -// on the mandatory nature, then to create separate interfaces and having to deal with recasting. /** * Packs the specified array of circles, each of which must have a `circle.r` property specifying the circle’s radius. @@ -830,7 +845,7 @@ export interface PackCircle { * * @param circles The specified array of circles to pack. */ -export function packSiblings(circles: Datum[]): Datum[]; +export function packSiblings(circles: Datum[]): Array; /** * Computes the smallest circle that encloses the specified array of circles, each of which must have @@ -839,4 +854,4 @@ export function packSiblings(circles: Datum[]): Datum[ * * @param circles The specified array of circles to pack. */ -export function packEnclose(circles: Datum[]): { r: number, x: number, y: number }; +export function packEnclose(circles: Datum[]): PackCircle; From 88174a627285886f0c1ad56dfd737454efa157b6 Mon Sep 17 00:00:00 2001 From: denis Date: Sat, 8 Dec 2018 15:31:04 +0100 Subject: [PATCH 493/608] Use JsDoc @deprecated --- types/d3-shape/index.d.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/types/d3-shape/index.d.ts b/types/d3-shape/index.d.ts index eccf7f1b80..0c0e27cbd7 100644 --- a/types/d3-shape/index.d.ts +++ b/types/d3-shape/index.d.ts @@ -38,7 +38,7 @@ export interface CanvasPath_D3Shape { // ----------------------------------------------------------------------------------- /** - * Interface corresponding to the minimum data type assumed by the accessor functions of the Arc generator + * Interface corresponding to the minimum data type assumed by the accessor functions of the Arc generator */ export interface DefaultArcObject { /** @@ -994,14 +994,17 @@ export function lineRadial(): LineRadial<[number, number]>; */ export function lineRadial(): LineRadial; +/** + * @deprecated Use LineRadial + */ export type RadialLine = LineRadial; /** - * DEPRECATED: Use lineRadial() + * @deprecated Use lineRadial() */ export function radialLine(): RadialLine<[number, number]>; /** - * DEPRECATED: Use lineRadial() + * @deprecated Use lineRadial() */ export function radialLine(): RadialLine; @@ -1620,16 +1623,16 @@ export function areaRadial(): AreaRadial<[number, number]>; export function areaRadial(): AreaRadial; /** - * DEPRECATED: Use AreaRadial interface + * @deprecated Use AreaRadial interface */ export type RadialArea = AreaRadial; /** - * DEPRECATED: Use areaRadial() + * @deprecated Use areaRadial() */ export function radialArea(): RadialArea<[number, number]>; /** - * DEPRECATED: Use areaRadial() + * @deprecated Use areaRadial() */ export function radialArea(): RadialArea; @@ -2239,7 +2242,7 @@ export interface LinkRadial { } /** - * DEPRECATED: Use LinkRadial interface + * @deprecated Use LinkRadial interface */ export type RadialLink = LinkRadial; From 93e6117b3b8f1163e52594056218e6224693f73b Mon Sep 17 00:00:00 2001 From: Yutaka Nishimura Date: Sun, 9 Dec 2018 01:50:33 +0900 Subject: [PATCH 494/608] update validator.isEmpty option --- types/validator/index.d.ts | 7 ++++++- types/validator/validator-tests.ts | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/types/validator/index.d.ts b/types/validator/index.d.ts index 1b51669d14..8ee398d850 100644 --- a/types/validator/index.d.ts +++ b/types/validator/index.d.ts @@ -83,7 +83,7 @@ declare namespace ValidatorJS { isEmail(str: string, options?: IsEmailOptions): boolean; // check if the string has a length of zero. - isEmpty(str: string): boolean; + isEmpty(str: string, options?: IsEmptyOptions): boolean; // check if the string is a fully qualified domain name (e.g. domain.com). isFQDN(str: string, options?: IsFQDNOptions): boolean; @@ -310,6 +310,11 @@ declare namespace ValidatorJS { require_tld?: boolean; } + // options for isEmpty + interface IsEmptyOptions { + ignore_whitespace?: boolean; + } + // options for isFQDN interface IsFQDNOptions { require_tld?: boolean; diff --git a/types/validator/validator-tests.ts b/types/validator/validator-tests.ts index 61c1c59e92..09a9a7ba17 100644 --- a/types/validator/validator-tests.ts +++ b/types/validator/validator-tests.ts @@ -425,7 +425,9 @@ let any: any; result = validator.isEmail('sample'); result = validator.isEmail('sample', isEmailOptions); + let isEmptyOptions: ValidatorJS.IsEmptyOptions = {}; result = validator.isEmpty('sample'); + result = validator.isEmpty('sample', isEmptyOptions); let isFQDNOptions: ValidatorJS.IsFQDNOptions = {}; result = validator.isFQDN('sample'); From 1bf07fa1da39ff694f6b2e32448550b60725c0ef Mon Sep 17 00:00:00 2001 From: Florian Keller Date: Sat, 8 Dec 2018 17:57:41 +0100 Subject: [PATCH 495/608] Add types for icon-gen --- types/icon-gen/icon-gen-tests.ts | 43 ++++++++++++++++++++++++++++++++ types/icon-gen/index.d.ts | 27 ++++++++++++++++++++ types/icon-gen/tsconfig.json | 23 +++++++++++++++++ types/icon-gen/tslint.json | 1 + 4 files changed, 94 insertions(+) create mode 100644 types/icon-gen/icon-gen-tests.ts create mode 100644 types/icon-gen/index.d.ts create mode 100644 types/icon-gen/tsconfig.json create mode 100644 types/icon-gen/tslint.json diff --git a/types/icon-gen/icon-gen-tests.ts b/types/icon-gen/icon-gen-tests.ts new file mode 100644 index 0000000000..ca02834c04 --- /dev/null +++ b/types/icon-gen/icon-gen-tests.ts @@ -0,0 +1,43 @@ +import icongen = require('icon-gen'); + +icongen('./sample.svg', './icons', { report: true }) + .then(results => { + results[0]; + }) + .catch(err => { + throw err; + }); + +icongen('./sample.svg', './icons') + .then(results => { + results[0]; + }) + .catch(err => { + throw err; + }); + +icongen('./sample.svg', './icons', { + favicon: { + ico: [16, 24, 32, 48, 64], + name: 'favicon-', + sizes: [32, 57, 72, 96, 120, 128, 144, 152, 195, 228], + }, + report: false, +}) + .then(results => { + results[0]; + }) + .catch(err => { + throw err; + }); + +icongen('./sample.svg', './icons', { + favicon: {}, + report: false, +}) + .then(results => { + results[0]; + }) + .catch(err => { + throw err; + }); diff --git a/types/icon-gen/index.d.ts b/types/icon-gen/index.d.ts new file mode 100644 index 0000000000..e7bd6aaa69 --- /dev/null +++ b/types/icon-gen/index.d.ts @@ -0,0 +1,27 @@ +// Type definitions for icon-gen 2.0 +// Project: https://github.com/akabekobeko/npm-icon-gen#readme +// Definitions by: Florian Keller +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace icongen { + interface Options { + favicon?: { + ico: number[]; + name: string; + sizes: number[]; + } | {}; + icns?: { + name: string; + sizes: number[]; + } | {}; + ico?: { + name: string; + sizes: number[]; + } | {}; + report?: boolean; + } +} + +declare function icongen(src: string, dest: string, options?: icongen.Options): Promise; + +export = icongen; diff --git a/types/icon-gen/tsconfig.json b/types/icon-gen/tsconfig.json new file mode 100644 index 0000000000..6b83993922 --- /dev/null +++ b/types/icon-gen/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "icon-gen-tests.ts" + ] +} diff --git a/types/icon-gen/tslint.json b/types/icon-gen/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/icon-gen/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From d9d3952591a95436e8c7b998267dd8f9c12fb008 Mon Sep 17 00:00:00 2001 From: niyari Date: Sun, 9 Dec 2018 08:05:11 +0900 Subject: [PATCH 496/608] change return type as void. --- types/materialize-css/autoinit.d.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/types/materialize-css/autoinit.d.ts b/types/materialize-css/autoinit.d.ts index 96035db75b..c3e9009b1d 100644 --- a/types/materialize-css/autoinit.d.ts +++ b/types/materialize-css/autoinit.d.ts @@ -1,8 +1,6 @@ declare namespace M { - class AutoInitialization { - } /** * Automatically initialize components. */ - function AutoInit(context?: Element): AutoInitialization; + function AutoInit(context?: Element): void; } From cf2baee61a81f672275cfa7d43699a51ad82d7fc Mon Sep 17 00:00:00 2001 From: Leonard Thieu Date: Sun, 9 Dec 2018 03:53:44 -0500 Subject: [PATCH 497/608] [jquery] Add `originalEvent` property to `TriggeredEvent`. (#31189) --- types/jquery/jquery-tests.ts | 13 +++++++++++++ types/jquery/misc.d.ts | 1 + 2 files changed, 14 insertions(+) diff --git a/types/jquery/jquery-tests.ts b/types/jquery/jquery-tests.ts index c533f1b235..b1f63f3ecf 100644 --- a/types/jquery/jquery-tests.ts +++ b/types/jquery/jquery-tests.ts @@ -4244,6 +4244,19 @@ function JQuery() { event; } }); + + // https://github.com/DefinitelyTyped/DefinitelyTyped/issues/31124 + function issue_31124(el: Element, mouseX: number) { + $(el) + .on("mousedown touchstart", (evt) => { + // tslint:disable-next-line:prefer-conditional-expression + if (evt.type === "mousedown") { + mouseX = (evt.originalEvent as MouseEvent).clientX; + } else { + mouseX = (evt.originalEvent as TouchEvent).touches[0].clientX; + } + }); + } } function one() { diff --git a/types/jquery/misc.d.ts b/types/jquery/misc.d.ts index 481b79e037..ebba2f7a31 100644 --- a/types/jquery/misc.d.ts +++ b/types/jquery/misc.d.ts @@ -4710,6 +4710,7 @@ $( "button" ).click(function( event ) { ``` */ namespace?: string; + originalEvent?: _Event; /** * The last value returned by an event handler that was triggered by this event, unless the value was undefined. * @see \`{@link https://api.jquery.com/event.result/ }\` From ef8804d22c64195fecee77e1c4bf194be75c0516 Mon Sep 17 00:00:00 2001 From: Ilia Beliaev Date: Sun, 9 Dec 2018 21:47:10 +0300 Subject: [PATCH 498/608] Added old version. --- types/pretty-ms/v3.2/index.d.ts | 19 +++++++++++++++ types/pretty-ms/v3.2/pretty-ms-tests.ts | 10 ++++++++ types/pretty-ms/v3.2/tsconfig.json | 31 +++++++++++++++++++++++++ types/pretty-ms/v3.2/tslint.json | 1 + 4 files changed, 61 insertions(+) create mode 100644 types/pretty-ms/v3.2/index.d.ts create mode 100644 types/pretty-ms/v3.2/pretty-ms-tests.ts create mode 100644 types/pretty-ms/v3.2/tsconfig.json create mode 100644 types/pretty-ms/v3.2/tslint.json diff --git a/types/pretty-ms/v3.2/index.d.ts b/types/pretty-ms/v3.2/index.d.ts new file mode 100644 index 0000000000..b1e151cd65 --- /dev/null +++ b/types/pretty-ms/v3.2/index.d.ts @@ -0,0 +1,19 @@ +// Type definitions for pretty-ms 3.2 +// Project: https://github.com/sindresorhus/pretty-ms#readme +// Definitions by: BendingBender +// ocboogie +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = prettyMs; + +declare function prettyMs(input: number, options?: prettyMs.PrettyMsOptions): string; + +declare namespace prettyMs { + interface PrettyMsOptions { + secDecimalDigits?: number; + msDecimalDigits?: number; + keepDecimalsOnWholeSeconds?: boolean; + compact?: boolean; + verbose?: boolean; + } +} diff --git a/types/pretty-ms/v3.2/pretty-ms-tests.ts b/types/pretty-ms/v3.2/pretty-ms-tests.ts new file mode 100644 index 0000000000..ae5e8120b2 --- /dev/null +++ b/types/pretty-ms/v3.2/pretty-ms-tests.ts @@ -0,0 +1,10 @@ +import prettyMs = require('pretty-ms'); + +let str: string; +str = prettyMs(133); +str = prettyMs(1337, {compact: true}); +str = prettyMs(1335669000, {verbose: true}); +str = prettyMs(1335669000, {keepDecimalsOnWholeSeconds: true}); +str = prettyMs(1335669000, {secDecimalDigits: 1}); +str = prettyMs(1335669000, {msDecimalDigits: 2}); +str = prettyMs(new Date(2014, 0, 1, 10, 40).getTime() - new Date(2014, 0, 1, 10, 5).getTime()); diff --git a/types/pretty-ms/v3.2/tsconfig.json b/types/pretty-ms/v3.2/tsconfig.json new file mode 100644 index 0000000000..34da0f6d27 --- /dev/null +++ b/types/pretty-ms/v3.2/tsconfig.json @@ -0,0 +1,31 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../../", + "typeRoots": [ + "../../" + ], + "paths": { + "pretty-ms": [ + "pretty-ms/v3.2" + ], + "pretty-ms/*": [ + "pretty-ms/v3.2/*" + ] + }, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "pretty-ms-tests.ts" + ] +} diff --git a/types/pretty-ms/v3.2/tslint.json b/types/pretty-ms/v3.2/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/pretty-ms/v3.2/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From b004a7fdd3bc327b8ed3b10ea736937c1abb9f3a Mon Sep 17 00:00:00 2001 From: Ilia Beliaev Date: Sun, 9 Dec 2018 22:34:18 +0300 Subject: [PATCH 499/608] Fixed folder naming. --- types/pretty-ms/{v3.2 => v3}/index.d.ts | 0 types/pretty-ms/{v3.2 => v3}/pretty-ms-tests.ts | 0 types/pretty-ms/{v3.2 => v3}/tsconfig.json | 5 +---- types/pretty-ms/{v3.2 => v3}/tslint.json | 0 4 files changed, 1 insertion(+), 4 deletions(-) rename types/pretty-ms/{v3.2 => v3}/index.d.ts (100%) rename types/pretty-ms/{v3.2 => v3}/pretty-ms-tests.ts (100%) rename types/pretty-ms/{v3.2 => v3}/tsconfig.json (83%) rename types/pretty-ms/{v3.2 => v3}/tslint.json (100%) diff --git a/types/pretty-ms/v3.2/index.d.ts b/types/pretty-ms/v3/index.d.ts similarity index 100% rename from types/pretty-ms/v3.2/index.d.ts rename to types/pretty-ms/v3/index.d.ts diff --git a/types/pretty-ms/v3.2/pretty-ms-tests.ts b/types/pretty-ms/v3/pretty-ms-tests.ts similarity index 100% rename from types/pretty-ms/v3.2/pretty-ms-tests.ts rename to types/pretty-ms/v3/pretty-ms-tests.ts diff --git a/types/pretty-ms/v3.2/tsconfig.json b/types/pretty-ms/v3/tsconfig.json similarity index 83% rename from types/pretty-ms/v3.2/tsconfig.json rename to types/pretty-ms/v3/tsconfig.json index 34da0f6d27..5d4f2d4c31 100644 --- a/types/pretty-ms/v3.2/tsconfig.json +++ b/types/pretty-ms/v3/tsconfig.json @@ -14,10 +14,7 @@ ], "paths": { "pretty-ms": [ - "pretty-ms/v3.2" - ], - "pretty-ms/*": [ - "pretty-ms/v3.2/*" + "pretty-ms/v3" ] }, "types": [], diff --git a/types/pretty-ms/v3.2/tslint.json b/types/pretty-ms/v3/tslint.json similarity index 100% rename from types/pretty-ms/v3.2/tslint.json rename to types/pretty-ms/v3/tslint.json From 522282e501b0ac3a6f0b7b643fd29dca0069397e Mon Sep 17 00:00:00 2001 From: Daniel Yim Date: Sun, 28 Oct 2018 21:24:43 -0700 Subject: [PATCH 500/608] adding three mapcontrols --- types/three/index.d.ts | 2 + types/three/three-mapcontrols.d.ts | 70 ++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 types/three/three-mapcontrols.d.ts diff --git a/types/three/index.d.ts b/types/three/index.d.ts index 2e4cad4929..08b64250c8 100644 --- a/types/three/index.d.ts +++ b/types/three/index.d.ts @@ -24,6 +24,7 @@ // Julian Strecker // Zhang Hao // Konstantin Lukaschenko +// Daniel Yim // Definitions: https://github.com//DefinitelyTyped // TypeScript Version: 2.8 @@ -45,6 +46,7 @@ export * from "./three-FirstPersonControls"; export * from "./three-gltfexporter"; export * from "./three-gltfloader"; export * from "./three-lensflare"; +export * from "./three-mapcontrols"; export * from "./three-maskpass"; export * from "./three-mtlloader"; export * from "./three-objloader"; diff --git a/types/three/three-mapcontrols.d.ts b/types/three/three-mapcontrols.d.ts new file mode 100644 index 0000000000..e0e584a554 --- /dev/null +++ b/types/three/three-mapcontrols.d.ts @@ -0,0 +1,70 @@ +import {Camera, MOUSE, Object3D, Vector3} from 'three' + +export class MapControls { + constructor(object: Camera, domElement?: HTMLElement) + + object: Camera + domElement: HTMLElement | HTMLDocument + + // API + enabled: boolean + target: Vector3 + + enableZoom: boolean + zoomSpeed: number + minDistance: number + maxDistance: number + enableRotate: boolean + rotateSpeed: number + enablePan: boolean + maxZoom: number + minZoom: number + panSpeed: number + autoRotate: boolean + autoRotateSpeed: number + minPolarAngle: number + maxPolarAngle: number + minAzimuthAngle: number + maxAzimuthAngle: number + enableKeys: boolean + screenSpacePanning: boolean + keys: {LEFT: number; UP: number; RIGHT: number; BOTTOM: number} + mouseButtons: {ORBIT: MOUSE; ZOOM: MOUSE; PAN: MOUSE} + enableDamping: boolean + dampingFactor: number + + rotateLeft(angle?: number): void + + rotateUp(angle?: number): void + + panLeft(distance?: number): void + + panUp(distance?: number): void + + pan(deltaX: number, deltaY: number): void + + dollyIn(dollyScale: number): void + + dollyOut(dollyScale: number): void + + saveState(): void + + update(): void + + reset(): void + + dispose(): void + + getPolarAngle(): number + + getAzimuthalAngle(): number + + // EventDispatcher mixins + addEventListener(type: string, listener: (event: any) => void): void + + hasEventListener(type: string, listener: (event: any) => void): boolean + + removeEventListener(type: string, listener: (event: any) => void): void + + dispatchEvent(event: {type: string; target: any}): void +} From 3b5a3ba8af78a4a40c701e830f77ba45cac48502 Mon Sep 17 00:00:00 2001 From: Daniel Yim Date: Wed, 5 Dec 2018 22:16:56 -0800 Subject: [PATCH 501/608] updating map controls definitions --- types/three/three-mapcontrols.d.ts | 103 +++++++++++++++-------------- 1 file changed, 52 insertions(+), 51 deletions(-) diff --git a/types/three/three-mapcontrols.d.ts b/types/three/three-mapcontrols.d.ts index e0e584a554..98dbcf50ba 100644 --- a/types/three/three-mapcontrols.d.ts +++ b/types/three/three-mapcontrols.d.ts @@ -1,70 +1,71 @@ -import {Camera, MOUSE, Object3D, Vector3} from 'three' +import { + Camera, + EventDispatcher, + MOUSE, + Object3D, + Vector3 +} from "./three-core"; -export class MapControls { - constructor(object: Camera, domElement?: HTMLElement) +export class MapControls extends EventDispatcher { + constructor(object: Camera, domElement?: HTMLElement); - object: Camera - domElement: HTMLElement | HTMLDocument + object: Camera; + domElement: HTMLElement | HTMLDocument; // API - enabled: boolean - target: Vector3 + enabled: boolean; + target: Vector3; - enableZoom: boolean - zoomSpeed: number - minDistance: number - maxDistance: number - enableRotate: boolean - rotateSpeed: number - enablePan: boolean - maxZoom: number - minZoom: number - panSpeed: number - autoRotate: boolean - autoRotateSpeed: number - minPolarAngle: number - maxPolarAngle: number - minAzimuthAngle: number - maxAzimuthAngle: number - enableKeys: boolean - screenSpacePanning: boolean - keys: {LEFT: number; UP: number; RIGHT: number; BOTTOM: number} - mouseButtons: {ORBIT: MOUSE; ZOOM: MOUSE; PAN: MOUSE} - enableDamping: boolean - dampingFactor: number + enableZoom: boolean; + zoomSpeed: number; + minDistance: number; + maxDistance: number; + enableRotate: boolean; + rotateSpeed: number; + enablePan: boolean; + keyPanSpeed: number; + maxZoom: number; + minZoom: number; + panSpeed: number; + autoRotate: boolean; + autoRotateSpeed: number; + minPolarAngle: number; + maxPolarAngle: number; + minAzimuthAngle: number; + maxAzimuthAngle: number; + enableKeys: boolean; + screenSpacePanning: boolean; + keys: { LEFT: number; UP: number; RIGHT: number; BOTTOM: number }; + mouseButtons: { LEFT: MOUSE; MIDDLE: MOUSE; RIGHT: MOUSE }; + enableDamping: boolean; + dampingFactor: number; + target0: Vector3; + position0: Vector3; + zoom0: number; - rotateLeft(angle?: number): void + rotateLeft(angle?: number): void; - rotateUp(angle?: number): void + rotateUp(angle?: number): void; - panLeft(distance?: number): void + panLeft(distance?: number): void; - panUp(distance?: number): void + panUp(distance?: number): void; - pan(deltaX: number, deltaY: number): void + pan(deltaX: number, deltaY: number): void; - dollyIn(dollyScale: number): void + dollyIn(dollyScale: number): void; - dollyOut(dollyScale: number): void + dollyOut(dollyScale: number): void; - saveState(): void + saveState(): void; - update(): void + update(): false; - reset(): void + reset(): void; - dispose(): void + dispose(): void; - getPolarAngle(): number + getPolarAngle(): number; - getAzimuthalAngle(): number - - // EventDispatcher mixins - addEventListener(type: string, listener: (event: any) => void): void - - hasEventListener(type: string, listener: (event: any) => void): boolean - - removeEventListener(type: string, listener: (event: any) => void): void - - dispatchEvent(event: {type: string; target: any}): void + getAzimuthalAngle(): number; } From 245c70c7c379e6bf3b64422aa09fca90539a53db Mon Sep 17 00:00:00 2001 From: Daniel Yim Date: Sun, 9 Dec 2018 13:33:23 -0800 Subject: [PATCH 502/608] false -> boolean --- types/three/three-mapcontrols.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/three/three-mapcontrols.d.ts b/types/three/three-mapcontrols.d.ts index 98dbcf50ba..66ff8a0982 100644 --- a/types/three/three-mapcontrols.d.ts +++ b/types/three/three-mapcontrols.d.ts @@ -59,7 +59,7 @@ export class MapControls extends EventDispatcher { saveState(): void; - update(): false; + update(): boolean; reset(): void; From 86f51b0d4bc0a7a5b748661d3f2c987e2a928a4c Mon Sep 17 00:00:00 2001 From: Maddi Joyce Date: Mon, 10 Dec 2018 15:17:03 +1100 Subject: [PATCH 503/608] Using DrawerNavigationState instead of regular NavigationState in DrawerItemsProps --- types/react-navigation/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-navigation/index.d.ts b/types/react-navigation/index.d.ts index 85b42444b1..8e743465c6 100644 --- a/types/react-navigation/index.d.ts +++ b/types/react-navigation/index.d.ts @@ -899,7 +899,7 @@ export function createSwitchNavigator( export const DrawerItems: React.ComponentType; export interface DrawerItemsProps { - navigation: NavigationScreenProp; + navigation: NavigationScreenProp; items: NavigationRoute[]; activeItemKey?: string; activeTintColor?: string; From f89573a6726d30d9c7dbaf66db308bca4ffe6ad9 Mon Sep 17 00:00:00 2001 From: Kevin O'Neil <6971504+kevoneil@users.noreply.github.com> Date: Mon, 10 Dec 2018 15:25:48 +0900 Subject: [PATCH 504/608] webpack: adds inline-cheap-source-map and inline-cheap-module-source-map as options (#31224) --- types/webpack/index.d.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/types/webpack/index.d.ts b/types/webpack/index.d.ts index f5beb1dc63..40ce95bcad 100644 --- a/types/webpack/index.d.ts +++ b/types/webpack/index.d.ts @@ -538,12 +538,13 @@ declare namespace webpack { namespace Options { // tslint:disable-next-line:max-line-length - type Devtool = 'eval' | 'inline-source-map' | 'cheap-eval-source-map' | 'cheap-source-map' | 'cheap-module-eval-source-map' | 'cheap-module-source-map' | 'eval-source-map' | 'source-map' | - 'nosources-source-map' | 'hidden-source-map' | 'nosources-source-map' | '@eval' | '@inline-source-map' | '@cheap-eval-source-map' | '@cheap-source-map' | '@cheap-module-eval-source-map' | - '@cheap-module-source-map' | '@eval-source-map' | '@source-map' | '@nosources-source-map' | '@hidden-source-map' | '@nosources-source-map' | '#eval' | '#inline-source-map' | - '#cheap-eval-source-map' | '#cheap-source-map' | '#cheap-module-eval-source-map' | '#cheap-module-source-map' | '#eval-source-map' | '#source-map' | '#nosources-source-map' | - '#hidden-source-map' | '#nosources-source-map' | '#@eval' | '#@inline-source-map' | '#@cheap-eval-source-map' | '#@cheap-source-map' | '#@cheap-module-eval-source-map' | - '#@cheap-module-source-map' | '#@eval-source-map' | '#@source-map' | '#@nosources-source-map' | '#@hidden-source-map' | '#@nosources-source-map' | boolean; + type Devtool = 'eval' | 'inline-source-map' | 'cheap-eval-source-map' | 'cheap-source-map' | 'cheap-module-eval-source-map' | 'cheap-module-source-map' | 'eval-source-map' + | 'source-map' | 'nosources-source-map' | 'hidden-source-map' | 'nosources-source-map' | 'inline-cheap-source-map' | 'inline-cheap-module-source-map' | '@eval' + | '@inline-source-map' | '@cheap-eval-source-map' | '@cheap-source-map' | '@cheap-module-eval-source-map' | '@cheap-module-source-map' | '@eval-source-map' + | '@source-map' | '@nosources-source-map' | '@hidden-source-map' | '@nosources-source-map' | '#eval' | '#inline-source-map' | '#cheap-eval-source-map' + | '#cheap-source-map' | '#cheap-module-eval-source-map' | '#cheap-module-source-map' | '#eval-source-map' | '#source-map' | '#nosources-source-map' + | '#hidden-source-map' | '#nosources-source-map' | '#@eval' | '#@inline-source-map' | '#@cheap-eval-source-map' | '#@cheap-source-map' | '#@cheap-module-eval-source-map' + | '#@cheap-module-source-map' | '#@eval-source-map' | '#@source-map' | '#@nosources-source-map' | '#@hidden-source-map' | '#@nosources-source-map' | boolean; interface Performance { /** This property allows webpack to control what files are used to calculate performance hints. */ From 08683add7b05bf74ac1a6596be7610b2892b0080 Mon Sep 17 00:00:00 2001 From: Alessandro Vergani Date: Mon, 10 Dec 2018 08:33:47 +0100 Subject: [PATCH 505/608] Correct a few typos --- types/better-sqlite3/better-sqlite3-tests.ts | 2 +- types/better-sqlite3/index.d.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/types/better-sqlite3/better-sqlite3-tests.ts b/types/better-sqlite3/better-sqlite3-tests.ts index cdc80f595e..81e96861d2 100644 --- a/types/better-sqlite3/better-sqlite3-tests.ts +++ b/types/better-sqlite3/better-sqlite3-tests.ts @@ -57,6 +57,6 @@ stmt.safeIntegers(true); const trans = db.transaction((param) => stmt.all(param)); trans('name'); trans.default('name'); -trans.default('name'); +trans.deferred('name'); trans.immediate('name'); trans.exclusive('name'); diff --git a/types/better-sqlite3/index.d.ts b/types/better-sqlite3/index.d.ts index abc85c3194..32383e1337 100644 --- a/types/better-sqlite3/index.d.ts +++ b/types/better-sqlite3/index.d.ts @@ -59,7 +59,7 @@ declare class SqliteError implements Error { } interface DatabaseConstructor { - new(filename: string, options?: Database.Options): Database; + new (filename: string, options?: Database.Options): Database; (filename: string, options?: Database.Options): Database; prototype: Database; @@ -93,8 +93,8 @@ declare namespace Database { interface AggregateOptions extends RegistrationOptions { start?: any; step: (total: any, next: any) => any; - inverse?: (totla: any, dropped: any) => any; - result?: (totla: any) => any; + inverse?: (total: any, dropped: any) => any; + result?: (total: any) => any; } } From dea36b252750f3b56e61b73603d0669a97e5e196 Mon Sep 17 00:00:00 2001 From: arichter83 Date: Mon, 10 Dec 2018 09:46:45 +0100 Subject: [PATCH 506/608] Removed comment --- types/simpl-schema/index.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/types/simpl-schema/index.d.ts b/types/simpl-schema/index.d.ts index afd841e0c9..b09a8fde96 100644 --- a/types/simpl-schema/index.d.ts +++ b/types/simpl-schema/index.d.ts @@ -5,7 +5,6 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped export interface ValidationContext extends SimpleSchemaValidationContextStatic { - // constructor(ss: any); addValidationErrors(errors: any): void; clean(...args: any[]): any; getErrorForKey(key: any, ...args: any[]): any; From 21962c480d69b619afe7aba837b05bbd9a02fd70 Mon Sep 17 00:00:00 2001 From: Meno Abels Date: Mon, 10 Dec 2018 13:31:09 +0100 Subject: [PATCH 507/608] fix: import from to import = require --- types/resolve-pkg/resolve-pkg-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/resolve-pkg/resolve-pkg-tests.ts b/types/resolve-pkg/resolve-pkg-tests.ts index 8794b0cc03..caa949a11e 100644 --- a/types/resolve-pkg/resolve-pkg-tests.ts +++ b/types/resolve-pkg/resolve-pkg-tests.ts @@ -1,4 +1,4 @@ -import * as rpkg from 'resolve-pkg'; +import rpkg = require('resolve-pkg'); const test1 = rpkg('hello'); const test2 = rpkg('hello', {}); From fddd7126b83dd03869ae54b0e2350db613ce7450 Mon Sep 17 00:00:00 2001 From: Haotian Chai Date: Mon, 10 Dec 2018 20:46:20 +0800 Subject: [PATCH 508/608] add autoIndex at top level of connection options According to mongoose api doc of 5.3.15, autoIndex is set at the top level of connection options object. --- types/mongoose/index.d.ts | 1 + types/mongoose/mongoose-tests.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/types/mongoose/index.d.ts b/types/mongoose/index.d.ts index 83aaa33b2b..87ce57f05c 100644 --- a/types/mongoose/index.d.ts +++ b/types/mongoose/index.d.ts @@ -424,6 +424,7 @@ declare module "mongoose" { */ autoIndex?: boolean; }; + autoIndex?: boolean; } /** See the node-mongodb-native driver instance for options that it understands. */ diff --git a/types/mongoose/mongoose-tests.ts b/types/mongoose/mongoose-tests.ts index f4fec31101..7d23e6be6b 100644 --- a/types/mongoose/mongoose-tests.ts +++ b/types/mongoose/mongoose-tests.ts @@ -27,7 +27,8 @@ const connection2: Promise = mongoose.connect(connectUri, { bufferCommands: false, useNewUrlParser: true, useFindAndModify: true, - useCreateIndex: true + useCreateIndex: true, + autoIndex: true }); const connection3: null = mongoose.connect(connectUri, function (error) { error.stack; From f008a495190bf58648a33690520943b6301d5fb5 Mon Sep 17 00:00:00 2001 From: Syncfusion-JavaScript Date: Mon, 10 Dec 2018 20:36:21 +0530 Subject: [PATCH 509/608] 16.4.40-beta added --- types/ej.web.all/ej.web.all-tests.ts | 6848 +++++++++++++------------- types/ej.web.all/index.d.ts | 253 +- 2 files changed, 3670 insertions(+), 3431 deletions(-) diff --git a/types/ej.web.all/ej.web.all-tests.ts b/types/ej.web.all/ej.web.all-tests.ts index 39ac49ab73..d72a1af614 100644 --- a/types/ej.web.all/ej.web.all-tests.ts +++ b/types/ej.web.all/ej.web.all-tests.ts @@ -1,3423 +1,3425 @@ -module AccordionComponent { - $(function () { - var sample = new ej.Accordion($("#basicAccordion"), { - width: "100%", - allowKeyboardNavigation: true, - collapseSpeed: 500, - collapsible: true, - enableAnimation: true, - enableMultipleOpen: true, - events: "click", - expandSpeed: 500, - headerSize: "40px", - htmlAttributes: { title: "Demo" }, - selectedItemIndex: 1, - showCloseButton: true, - showRoundedCorner: true - }); - }); -} - - - -module AutocompleteComponent{ - var carList = [ - "Audi S6", "Austin-Healey", "Alfa Romeo", "Aston Martin", - "BMW 7", "Bentley Mulsanne", "Bugatti Veyron", - "Chevrolet Camaro", "Cadillac", - "Duesenberg J", "Dodge Sprinter", - "Elantra", "Excavator", - "Ford Boss 302", "Ferrari 360", "Ford Thunderbird", - "GAZ Siber", - "Honda S2000", "Hyundai Santro", - "Isuzu Swift", "Infiniti Skyline", - "Jaguar XJS", - "Kia Sedona EX", "Koenigsegg Agera", - "Lotus Esprit", "Lamborghini Diablo", - "Mercedes-Benz", "Mercury Coupe", "Maruti Alto 800", - "Nissan Qashqai", - "Oldsmobile S98", "Opel Superboss", - "Porsche 356", "Pontiac Sunbird", - "Scion SRS/SC/SD", "Saab Sportcombi", "Subaru Sambar", "Suzuki Swift", - "Triumph Spitfire", "Toyota 2000GT", - "Volvo P1800", "Volkswagen Shirako" - ]; - $(function () { - var autocompleteInstance =new ej.Autocomplete($("#selectCar"), { - width: "100%", - watermarkText: "Select a car", - dataSource: carList, - enableAutoFill: true, - showPopupButton: true, - multiSelectMode: "delimiter" - }); - }); -} - - - - -module Barcodecomponent { - $(function () { - var barcodesample = new ej.datavisualization.Barcode($("#Barcode"), { - text:"http://www.syncfusion.com" - }); - }); -} - - - - - -module Bulletgraphcomponent { - $(function () { - var bulletsample = new ej.datavisualization.BulletGraph($("#BulletGraph"), { - isResponsive: true, - load: function () { - var sender = $("#BulletGraph").data("ejBulletGraph"); - var bulletTheme = (window).themeStyle + (window).themeColor + (window).themeVarient; - if (bulletTheme) { - switch (bulletTheme) { - case "flatdark": - case "flatazuredark": - case "flatlimedark": - case "flatsaffrondark": - case "gradientdark": - case "gradientazuredark": - case "gradientlimedark": - case "gradientsaffrondark": - case "flathigh-contrast-01dark": - case "flathigh-contrast-02dark": - bulletTheme = "flatdark"; - break; - case "flatoffice-365light": - case "flatmateriallight": - bulletTheme = "material"; - break; - default: - bulletTheme = "flatlight"; - break; - } - sender.model.theme = bulletTheme; - } - - }, - tooltipSettings: { visible: true }, - quantitativeScaleSettings: { - featureMeasures: [{ - value: 8, comparativeMeasureValue:6.7 - }] - }, - qualitativeRanges: [{ - rangeEnd: 4.3, rangeStroke:"#ebebeb", - }, - { - rangeEnd: 7.3, rangeStroke:"#d8d8d8" - }, - { - rangeEnd: 10, rangeStroke: "#7f7f7f" - } - ], - captionSettings: { - textPosition: 'right', text: 'Revenue YTD', - subTitle: { - text: "$ in Thousands", textPosition:"right" - } - } - }); - }); -} - - - - - -module ButtonComponent { - $(function () { - var basicButton = new ej.Button($("#buttonnormal"), { - size: "large", - showRoundedCorner: true, - contentType: "textandimage", - prefixIcon: "e-icon e-save", - text: "Save" - }); - var toggleButton = new ej.ToggleButton($("#TextOnly"), { - showRoundedCorner: true, - size: "large", - contentType: "textandimage", - defaultPrefixIcon: "e-icon e-save", - activePrefixIcon: "e-icon e-delete", - defaultText: "Save", - activeText: "Delete" - }); - var splitbuttonnormal = new ej.SplitButton($("#splitbuttonnormal"), { - showRoundedCorner: true, - size: "large", - prefixIcon: "e-icon e-file-empty", - targetID: "menu1", - contentType: "textandimage", - text: "File" - }); - var groupButton = new ej.GroupButton($("#groupButton"), { - showRoundedCorner: true, - size: "large" - }); - var check1 = new ej.CheckBox($("#check1"), { - size: "medium", enableTriState: true - }); - var check2 = new ej.CheckBox($("#check2"), { - size: "medium", enableTriState: true - }); - var radio1 = new ej.RadioButton($("#radio1"), { - size: "medium" - }); - var radio2 = new ej.RadioButton($("#radio2"), { - size: "medium", checked: true - }); - }); -} - - - - -module ChartComponent { - $(function () { - var chartsample = new ej.datavisualization.Chart($("#Chart"), { - primaryXAxis: { - range: { min: 2005, max: 2011, interval: 1 }, - title: { text: "Year" }, - valueType: "category" - }, - primaryYAxis: { - range: { min: 25, max: 50, interval: 5 }, - labelFormat: "{value}%", - title: { text: "Efficiency" }, - }, - commonSeriesOptions: - { - type: 'line', enableAnimation: true, - tooltip:{ visible :true, template:'Tooltip'}, - marker: - { - shape: 'circle', - size: - { - height: 10, width: 10 - }, - visible: true - }, - border : {width: 2} - }, - series: - [ - { - points: [{ x: 2005, y: 28 }, { x: 2006, y: 25 }, { x: 2007, y: 26 }, { x: 2008, y: 27 }, - { x: 2009, y: 32 }, { x: 2010, y: 35 }, { x: 2011, y: 30 }], - name: 'India' - }, - { - points: [{ x: 2005, y: 31 }, { x: 2006, y: 28 }, { x: 2007, y: 30 }, { x: 2008, y: 36 }, - { x: 2009, y: 36 }, { x: 2010, y: 39 }, { x: 2011, y: 37 }], - name: 'Germany' - }, - { - points: [{ x: 2005, y: 36 }, { x: 2006, y: 32 }, { x: 2007, y: 34 }, { x: 2008, y: 41 }, - { x: 2009, y: 42 }, { x: 2010, y: 42 }, { x: 2011, y: 43 }], - name: 'England' - }, - { - points: [{ x: 2005, y: 39 }, { x: 2006, y: 36 }, { x: 2007, y: 40 }, { x: 2008, y: 44 }, - { x: 2009, y: 45 }, { x: 2010, y: 48 }, { x: 2011, y: 46 }], - name: 'France' - } - ], - isResponsive: true, - load: function () { - var sender = $("#Chart").data("ejChart"); - if (!!window.orientation && sender) { //to modify chart properties for mobile view - var model = sender.model, - seriesLength = model.series.length; - model.legend.visible = false; - model.size.height = null; - model.size.width = null; - for (var i = 0; i < seriesLength; i++) { - if (!model.series[i].marker) - model.series[i].marker = {}; - if (!model.series[i].marker.size) - model.series[i].marker.size = {}; - model.series[i].marker.size.width = 6; - model.series[i].marker.size.height = 6; - } - model.primaryXAxis.labelIntersectAction = "rotate45"; - if (model.primaryXAxis.title) - model.primaryXAxis.title.text = ""; - if (model.primaryYAxis.title) - model.primaryYAxis.title.text = ""; - model.primaryXAxis.edgeLabelPlacement = "hide"; - model.primaryYAxis.labelIntersectAction = "rotate45"; - model.primaryYAxis.edgeLabelPlacement = "hide"; - } - var theme = (window).themeStyle + (window).themeColor + (window).themeVarient; - if (theme) { - switch (theme) { - case "flatdark": - case "flatazuredark": - case "flatlimedark": - case "flatsaffrondark": - theme = "flatdark"; - break; - case "gradientlight": - case "gradientazurelight": - case "gradientlimelight": - case "gradientsaffronlight": - theme = "gradientlight"; - break; - case "gradientdark": - case "gradientazuredark": - case "gradientlimedark": - case "gradientsaffrondark": - theme = "gradientdark"; - break; - case "flatbootstraplight": - theme = "bootstrap"; - break; - case "flathigh-contrast-01dark": - case "flathigh-contrast-02dark": - theme = "high-contrast-01"; - break; - case "flatmateriallight": - case "flatoffice-365light": - theme = "material"; - break; - - default: - theme = "flatlight"; - break; - } - sender.model.theme = theme; - } - }, - title: { text: 'Efficiency of oil-fired power production' }, - size: { height: "600" }, - legend: { visible: true}, - }); - }); -} - - - - -module circulargaugecomponent { - $(function () { - var circularsample = new ej.datavisualization.CircularGauge($("#CircularGauge"), { - enableAnimation: false, - isResponsive: true, - backgroundColor: "transparent", width: 500, - scales: [{ - showRanges: true, - startAngle: 122, sweepAngle: 296, radius: 130, showScaleBar: true, size: 1, maximum: 120, majorIntervalValue: 20, minorIntervalValue: 10, - border: { - width: 0.5, - }, - pointers: [{ - value: 60, - showBackNeedle: true, - backNeedleLength: 20, - length: 95, - width: 7 - }], - ticks: [{ - type: "major", - distanceFromScale: 2, - height: 16, - width: 1, color: "#8c8c8c" - }, { type: "minor", height: 8, width: 1, distanceFromScale: 2, color: "#8c8c8c" }], - labels: [{ - color: "#8c8c8c" - }], - ranges: [{ - distanceFromScale: -30, - startValue: 0, - endValue: 70 - }, { - distanceFromScale: -30, - startValue: 70, - endValue: 110, - backgroundColor: "#fc0606", - border: { color: "#fc0606" } - }, - { - distanceFromScale: -30, - startValue: 110, - endValue: 120, - backgroundColor: "#f5b43f", - border: { color: "#f5b43f" } - }] - }] - }); - }); -} - - - -module ColorPickerComponent { - $(function () { - var colorSample = new ej.ColorPicker($("#colorpick"), { - value: "#278787" - }); - }); -} - - - - -module ComboBoxComponent{ - var BikeList = [ - { empid: "bk1", text: "Apache RTR" }, { empid: "bk2", text: "CBR 150-R" }, { empid: "bk3", text: "CBZ Xtreme" }, - { empid: "bk4", text: "Discover" }, { empid: "bk5", text: "Dazzler" }, { empid: "bk6", text: "Flame" }, - { empid: "bk7", text: "Fazzer" }, { empid: "bk8", text: "FZ-S" }, { empid: "bk9", text: "Pulsar" }, - { empid: "bk10", text: "Shine" }, { empid: "bk11", text: "R15" }, { empid: "bk12", text: "Unicorn" } - ]; - $(function () { - var comboboxInstance =new ej.ComboBox($("#selectCar"), { - width: "100%", - placeholder: "Select a Bike", - fields: { text: "text", value: "empid" }, - dataSource: BikeList, - autofill: true - }); - }); -} - - - -module DatePickerComponent { - $(function () { - var dateSample = new ej.DatePicker($("#datepick"), { - width: "100%" - }); - }); -} - - - - -module DateTimePickerComponent { - $(function () { - var datetimeSample = new ej.DateRangePicker($("#daterangepick"), { - width: "100%" - }); - }); -} - - - -module DateTimePickerComponent { - $(function () { - var datetimeSample = new ej.DateTimePicker($("#datetimepick"), { - width: "100%" - }); - }); -} - - - -$(function () { - var diagram = new ej.datavisualization.Diagram($("#diagram"), { - width: "1000px", - height: "600px", - pageSettings: { - //Sets page size - pageHeight: 500, - pageWidth: 500, - //Customizes the appearance of page - pageBorderWidth: 4, - pageBackgroundColor: "white", - pageBorderColor: "lightgray", - pageMargin: 25, - showPageBreak: true, - multiplePage: true, - pageOrientation: ej.datavisualization.Diagram.PageOrientations.Portrait - }, - scrollSettings: { - horizontalOffset: 0, - verticalOffset: 0 - }, - snapSettings: { - snapConstraints: ej.datavisualization.Diagram.SnapConstraints.ShowLines - }, - nodes: [ - createNode({ name: "NewIdea", width: 150, height: 60, offsetX: 300, offsetY: 60, labels: [createLabel({ "text": "New idea identified" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Terminator }), - createNode({ name: "Meeting", width: 150, height: 60, offsetX: 300, offsetY: 155, labels: [createLabel({ "text": "Meeting with board" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Process }), - createNode({ - name: "BoardDecision", width: 150, height: 110, offsetX: 300, offsetY: 280, labels: [createLabel({ text: "Board decides \nwhether \nto proceed", wrapText: "true", "margin": { left: 20, top: 0, right: 20, bottom: 0 } })], - type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Decision - }), - createNode({ name: "Project", width: 150, height: 100, offsetX: 300, offsetY: 430, labels: [createLabel({ "text": "Find Project \nmanager" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Decision }), - createNode({ - name: "End", width: 150, height: 60, offsetX: 300, offsetY: 555, labels: [createLabel({ "text": "Implement and Deliver" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Process }), - createNode({ name: "Decision", width: 250, height: 60, offsetX: 550, offsetY: 60, labels: [createLabel({ "text": "Decision Process for new software ideas" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Card, fillColor: "#858585", borderColor: "#858585" }), - createNode({ name: "Reject", width: 150, height: 60, offsetX: 550, offsetY: 285, labels: [createLabel({ "text": "Reject and write report" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Process }), - createNode({ name: "Resources", width: 150, height: 60, offsetX: 550, offsetY: 430, labels: [createLabel({ "text": "Hire new resources" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Process }) - ], - connectors: [ - createConnector({ name: "connector1", sourceNode: "NewIdea", targetNode: "Meeting" }), - createConnector({ name: "connector2", sourceNode: "Meeting", targetNode: "BoardDecision" }), - createConnector({ name: "connector3", sourceNode: "BoardDecision", targetNode: "Project", labels: [createLabel({ "text": "Yes" })] }), - createConnector({ name: "connector4", sourceNode: "Project", targetNode: "End", labels: [createLabel({ "text": "Yes" })] }), - createConnector({ name: "connector5", sourceNode: "BoardDecision", targetNode: "Reject", labels: [createLabel({ "text": "No" })] }), - createConnector({ name: "connector6", sourceNode: "Project", targetNode: "Resources", labels: [createLabel({ "text": "No" })] }) - ] - }); -}); - -function createNode(option: ej.datavisualization.Diagram.Node) { - if (!option.fillColor) { - option.borderColor = "#1BA0E2"; - option.fillColor = "#1BA0E2"; - } - option.labels[0].fontColor = "white"; - return option; -} - -function createConnector(option: ej.datavisualization.Diagram.Connector) { - option.targetDecorator = { shape: ej.datavisualization.Diagram.DecoratorShapes.Arrow, borderColor: "#606060", width: 10, height: 10 }; - option.lineColor = "#606060"; - if (option.labels && option.labels.length > 0) { - option.labels[0].fillColor = "white"; - } - return option; -} - -function createLabel(options : any) { - return options; -} - - - -module DialogComponent { - $(function () { - var dialogInstance = new ej.Dialog($("#basicDialog"), { - width: 550, - minWidth: 310, - minHeight: 215, - target:".control", - close:()=>{ - $("#btnOpen").show();} - }); - var btnInstance = new ej.Button($("#btnOpen"), { - size: "medium", - click: ()=>{ - $("#btnOpen").hide(); - $("#basicDialog").ejDialog("open");}, - type: "button", - height: 30, - width: 150 - }); - }); -} - - - - -module digitalgaugecomponent { - $(function () { - var digitalgaugesample = new ej.datavisualization.DigitalGauge($("#DigitalGauge"), { - width: 525, - height: 305, - isResponsive: true, - items: [{ - segmentSettings: { - width: 1, - spacing: 0, - color: "#8c8c8c" - }, - characterSettings: { - opacity: 0.8, - }, - value: "Syncfusion", - position: { x: 52, y: 52 } - }] - }); - }); -} - - - - - - -module DropDownListComponent { - var BikeList = [ - { empid: "bk1", text: "Apache RTR" }, { empid: "bk2", text: "CBR 150-R" }, { empid: "bk3", text: "CBZ Xtreme" }, - { empid: "bk4", text: "Discover" }, { empid: "bk5", text: "Dazzler" }, { empid: "bk6", text: "Flame" }, - { empid: "bk7", text: "Fazzer" }, { empid: "bk8", text: "FZ-S" }, { empid: "bk9", text: "Pulsar" }, - { empid: "bk10", text: "Shine" }, { empid: "bk11", text: "R15" }, { empid: "bk12", text: "Unicorn" } - ]; - $(function () { - var sample = new ej.DropDownList($("#bikeList"),{ - dataSource: BikeList, - width: "100%", - watermarkText: "Select a bike", - fields: { id: "empid", text: "text", value: "text" }, - enableFilterSearch: true, - caseSensitiveSearch: true, - enableIncrementalSearch: true, - enablePopupResize: true, - delimiterChar: ";", - multiSelectMode: ej.MultiSelectMode.Delimiter, - maxPopupHeight: "300px", - minPopupHeight: "150px", - maxPopupWidth: "500px", - minPopupWidth: "350px", - showCheckbox: true, - showRoundedCorner: true - }); - }); -} - - - - - -module ExplorerComponent { - $(function () { - var file = new ej.FileExplorer($("#fileExplorer"), { - path: (window).baseurl + "Content/FileBrowser/", - width: "100%", - minWidth: "150px", - layout: "tile", - isResponsive: true, - ajaxAction: (window).baseurl + "api/FileExplorer/FileOperations" - }); - }); -} - - - - -module GanttComponent { - $(function () { - var ganttInstance = new ej.Gantt($("#GanttContainer"), { - dataSource: (window).projectData, - allowColumnResize: true, - allowSorting: true, - allowSelection: true, - enableContextMenu: true, - taskIdMapping: "taskID", - allowDragAndDrop: true, - taskNameMapping: "taskName", - startDateMapping: "startDate", - showColumnChooser: true, - showColumnOptions: true, - progressMapping: "progress", - durationMapping: "duration", - endDateMapping: "endDate", - childMapping: "subtasks", - scheduleStartDate: "02/01/2017", - scheduleEndDate: "04/09/2017", - //Resources mapping - resourceInfoMapping: "resourceId", - resourceNameMapping: "resourceName", - resourceIdMapping: "resourceId", - resources: (window).projectResources, - predecessorMapping: "predecessor", - showResourceNames: true, - toolbarSettings: { - showToolbar: true, - toolbarItems: ["add","edit","delete","update","cancel","indent","outdent","expandAll","collapseAll","search"] - }, - editSettings: { - allowEditing: true, - allowAdding: true, - allowDeleting: true, - allowIndent: true, - editMode: "cellEditing" - }, - sizeSettings: { - width: "100%", - height: "100%" - }, - dragTooltip: { showTooltip: true }, - showGridCellTooltip: true, - treeColumnIndex: 1, - isResponsive: true, - }); -}); -} - - - -module GridComponent { - $(function () { - var gridInstance = new ej.Grid($("#Grid"), { - dataSource: (window).gridData, - allowGrouping: true, - allowSorting: true, - allowMultiSorting: true, - enableAltRow: true, - allowPaging: true, - allowReordering: true, - allowResizing: true, - allowFiltering: true, - allowScrolling: true, - enableRowHover: true, - selectionType: "multiple", - selectionSettings: { enableToggle: true, selectionMode: ["row", "cell", "column"] }, - allowKeyboardNavigation: true, - editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true, allowEditOnDblClick: true, showDeleteConfirmDialog: true }, - toolbarSettings: { showToolbar: true, toolbarItems: ["add", "edit", "delete", "update", "cancel", "search"] }, - columns: [ - { field: "OrderID", headerText: "Order ID", isPrimaryKey: true, width: 75, textAlign: ej.TextAlign.Right }, - { field: "CustomerID", headerText: "Customer ID", editType: ej.Grid.EditingType.String, width: 80 }, - { field: "EmployeeID", headerText: "Employee ID", width: 75, editType: ej.Grid.EditingType.Dropdown, textAlign: ej.TextAlign.Right, priority: 4 }, - { field: "Freight", width: 75, format: "{0:C}", editType: ej.Grid.EditingType.Numeric, textAlign: ej.TextAlign.Right, priority: 3 }, - { field: "OrderDate", headerText: "Order Date", width: 80, format: "{0:MM/dd/yyyy}", textAlign: ej.TextAlign.Right, priority: 2 }, - { field: "ShipCity", headerText: "Ship City", editType: ej.Grid.EditingType.Dropdown, width: 110, priority: 2 } - ], - isResponsive: true, - minWidth: 700, - showSummary: true, - summaryRows: [{ title: "Sum", summaryColumns: [{ summaryType: ej.Grid.SummaryType.Sum, displayColumn: "Freight", dataMember: "Freight", format: "{0:C2}" }] }] - }); - }); -} - - - -var columns = ["Vegie-spread", "Tofuaa", "Alice Mutton", "Konbu", "Fløtemysost"] -var itemSource: any[] = []; -for (var i = 0; i < columns.length; i++) { - for (var j = 0; j < 6; j++) { - var value = Math.floor((Math.random() * 100) + 1); - itemSource.push({ ProductName: columns[i], Year: "Y" + (2011 + j), Value: value }) - } -} - -$(function () { - var heatmap = new ej.datavisualization.HeatMap($("#heatmap"), { - colorMappingCollection: [ - { value: 0, color: "#8ec8f8", label: { text: "0" } }, - { value: 100, color: "#0d47a1", label: { text: "100" } } - ], - isResponsive: true, - itemsSource: itemSource, - width: "100%", - itemsMapping: { - column: { propertyName: "ProductName", displayName: "Product Name" }, - row: { propertyName: "Year", displayName: "Year" }, - value: { propertyName: "Value" }, - columnMapping: [ - { "propertyName": columns[0], "displayName": columns[0] }, - { "propertyName": columns[1], "displayName": columns[1] }, - { "propertyName": columns[2], "displayName": columns[2] }, - { "propertyName": columns[3], "displayName": columns[3] }, - { "propertyName": columns[4], "displayName": columns[4] }, - { "propertyName": columns[5], "displayName": columns[5] } - ], - headerMapping: { propertyName: "Year", displayName: "Year", columnStyle: { width: 105, textAlign: "right" } }, - }, - legendCollection: ["heatmap_legend"] - }); - var heatmaplegend = new ej.datavisualization.HeatMapLegend($("#heatmap_legend"), { - colorMappingCollection: [ - { value: 0, color: "#8ec8f8", label: { text: "0" } }, - { value: 100, color: "#0d47a1", label: { text: "100" } } - ], - height: "50px", - width: "75%", - isResponsive: true - }); -}); - - - - -module KanbanComponent { - $(function () { - var sample = new ej.Kanban($("#Kanban"), { - dataSource: new ej.DataManager((window).kanbanData).executeLocal(new ej.Query().take(20)), - columns: [ - { headerText: "Backlog", key: "Open" }, - { headerText: "In Progress", key: "InProgress" }, - { headerText: "Testing", key: "Testing" }, - { headerText: "Done", key: "Close" } - ], - keyField: "Status", - allowTitle: true, - fields: { - content: "Summary", - primaryKey: "Id", - imageUrl: "ImgUrl" - }, - allowSelection: false - }); - }); -} - - -module lineargaugecomponent { - $(function () { - var linearsample = new ej.datavisualization.LinearGauge($("#LinearGauge"), { - labelColor: "#8c8c8c", width: 500, - isResponsive: true, enableAnimation: false, - scales: [{ - width: 4, border: { color: "transparent", width: 0 }, showBarPointers: false, showRanges: true, length: 310, - position: { x: 52, y: 50 }, markerPointers: [{ - value: 50, length: 10, width: 10, backgroundColor: "#4D4D4D", border: { color: "#4D4D4D" } - }], - labels: [{ font: { size: "11px", fontFamily: "Segoe UI", fontStyle: "bold" }, distanceFromScale: { x: -13 } }], - ticks: [{ type: "majorinterval", width: 1, color: "#8c8c8c" }], - ranges: [{ - endValue: 60, - startValue: 0, - backgroundColor: "#F6B53F", - border: { color: "#F6B53F" }, startWidth: 4, endWidth: 4 - }, { - endValue: 100, - startValue: 60, - backgroundColor: "#E94649", - border: { color: "#E94649" }, startWidth: 4, endWidth: 4 - }] - }] - }); - }); -} - - - -module ListBoxComponent { - $(function () { - var listboxInstance = new ej.ListBox($("#selectcar"), { - showCheckbox: true - }); - }); -} - - - -module ListviewComponent { - $(function () { - var listviewInstance = new ej.ListView($("#defaultlistview"), { - enableCheckMark: true, - width: 400 - }); - }); -} - - -var world_map= - { - "type": "FeatureCollection", - "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, - "features": [ - { "type": "Feature", "properties": { "admin": "Afghanistan", "name": "Afghanistan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[61.21081709172573, 35.650072333309218], [62.230651483005879, 35.270663967422287], [62.984662306576588, 35.404040839167614], [63.193538445900337, 35.857165635718907], [63.982895949158696, 36.007957465146596], [64.546479119733888, 36.31207326918426], [64.746105177677393, 37.111817735333297], [65.588947788357828, 37.305216783185628], [65.745630731066811, 37.661164048812061], [66.217384881459324, 37.393790188133913], [66.518606805288655, 37.362784328758785], [67.075782098259609, 37.35614390720928], [67.829999627559502, 37.144994004864678], [68.135562371701369, 37.023115139304302], [68.859445835245921, 37.344335842430588], [69.196272820924364, 37.15114350030742], [69.518785434857946, 37.608996690413413], [70.116578403610319, 37.588222764632086], [70.270574171840124, 37.73516469985401], [70.376304152309274, 38.138395901027515], [70.806820509732873, 38.486281643216408], [71.348131137990251, 38.258905341132156], [71.239403924448155, 37.953265082341879], [71.541917759084768, 37.905774441065631], [71.448693475230229, 37.065644843080513], [71.84463829945058, 36.738171291646914], [72.193040805962383, 36.94828766534566], [72.636889682917271, 37.047558091778349], [73.260055779924983, 37.495256862938994], [73.948695916646486, 37.421566270490786], [74.980002475895404, 37.419990139305888], [75.158027785140902, 37.13303091078911], [74.575892775372964, 37.02084137628345], [74.067551710917812, 36.836175645488446], [72.920024855444453, 36.720007025696312], [71.846291945283909, 36.509942328429851], [71.262348260385735, 36.074387518857797], [71.498767938121077, 35.650563259415996], [71.613076206350698, 35.153203436822857], [71.115018751921625, 34.733125718722228], [71.156773309213449, 34.348911444632144], [70.881803012988385, 33.988855902638512], [69.93054324735958, 34.020120144175102], [70.323594191371583, 33.358532619758385], [69.687147251264847, 33.105498969041228], [69.262522007122541, 32.501944078088293], [69.317764113242546, 31.901412258424436], [68.926676873657655, 31.620189113892064], [68.556932000609308, 31.713310044882011], [67.792689243444769, 31.582930406209623], [67.683393589147457, 31.303154201781414], [66.938891229118454, 31.304911200479346], [66.38145755398601, 30.738899237586448], [66.346472609324408, 29.88794342703617], [65.046862013616092, 29.472180691031902], [64.350418735618504, 29.560030625928089], [64.148002150331237, 29.340819200145965], [63.550260858011164, 29.468330796826162], [62.549856805272775, 29.318572496044304], [60.874248488208778, 29.829238999952604], [61.78122155136343, 30.735850328081231], [61.699314406180811, 31.379506130492661], [60.941944614511115, 31.548074652628745], [60.863654819588952, 32.182919623334421], [60.536077915290761, 32.981268825811561], [60.963700392505991, 33.528832302376252], [60.528429803311575, 33.676446031217999], [60.80319339380744, 34.404101874319856], [61.21081709172573, 35.650072333309218]]] } }, - { "type": "Feature", "properties": { "admin": "Angola", "name": "Angola", "continent": "Africa" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[16.326528354567042, -5.877470391466217], [16.573179965896141, -6.622644545115092], [16.860190870845226, -7.222297865429978], [17.089995965247166, -7.545688978712474], [17.472970004962288, -8.068551120641656], [18.134221632569048, -7.987677504104865], [18.464175652752683, -7.847014255406475], [19.016751743249664, -7.988245944860138], [19.166613396896079, -7.738183688999724], [19.417502475673214, -7.155428562044277], [20.037723016040214, -7.116361179231658], [20.091621534920616, -6.943090101756949], [20.60182295093832, -6.939317722199688], [20.514748162526526, -7.299605808138663], [21.728110792739752, -7.290872491081315], [21.74645592620336, -7.920084730667113], [21.949130893652033, -8.305900974158304], [21.80180138518795, -8.908706556842985], [21.875181919042397, -9.523707777548564], [22.208753289486417, -9.894796237836529], [22.155268182064326, -11.084801120653777], [22.402798292742428, -10.99307545333569], [22.837345411884762, -11.017621758674334], [23.456790805767461, -10.867863457892481], [23.912215203555743, -10.926826267137541], [24.017893507592614, -11.237298272347115], [23.904153680118235, -11.722281589406332], [24.079905226342895, -12.191296888887305], [23.930922072045373, -12.565847670138821], [24.0161365088947, -12.91104623784855], [21.933886346125941, -12.898437188369353], [21.887842644953871, -16.080310153876891], [22.562478468524283, -16.898451429921831], [23.215048455506086, -17.523116143465952], [21.377176141045592, -17.930636488519706], [18.956186964603628, -17.789094740472233], [18.263309360434217, -17.309950860262003], [14.209706658595049, -17.353100681225708], [14.058501417709035, -17.423380629142653], [13.462362094789963, -16.971211846588741], [12.814081251688405, -16.941342868724075], [12.21546146001938, -17.111668389558059], [11.734198846085146, -17.301889336824498], [11.640096062881609, -16.673142185129205], [11.778537224991563, -15.793816013250687], [12.123580763404444, -14.878316338767927], [12.175618930722264, -14.449143568583889], [12.500095249083014, -13.547699883684398], [12.738478631245439, -13.137905775609934], [13.312913852601834, -12.483630466362511], [13.633721144269824, -12.038644707897189], [13.738727654686924, -11.297863050993142], [13.686379428775293, -10.73107594161584], [13.38732791510216, -10.373578383020726], [13.120987583069873, -9.766897067914112], [12.875369500386567, -9.166933689005488], [12.929061313537797, -8.959091078327573], [13.23643273280987, -8.56262948978434], [12.933040398824314, -7.596538588087752], [12.728298374083916, -6.927122084178803], [12.227347039446441, -6.294447523629372], [12.322431674863562, -6.100092461779651], [12.735171339578695, -5.965682061388476], [13.024869419006988, -5.984388929878106], [13.375597364971892, -5.864241224799555], [16.326528354567042, -5.877470391466217]]], [[[12.436688266660919, -5.684303887559223], [12.182336866920277, -5.789930515163801], [11.914963006242115, -5.037986748884733], [12.318607618873923, -4.606230157086158], [12.620759718484548, -4.438023369976121], [12.995517205465202, -4.781103203961918], [12.631611769265842, -4.991271254092935], [12.468004184629759, -5.248361504744991], [12.436688266660919, -5.684303887559223]]]] } }, - { "type": "Feature", "properties": { "admin": "Albania", "name": "Albania", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[20.590247430104906, 41.855404161133592], [20.463175083099195, 41.515089016275333], [20.605181919037356, 41.086226304685219], [21.020040317476397, 40.842726955725873], [20.99998986174722, 40.580003973953964], [20.67499677906363, 40.43499990494302], [20.61500044117275, 40.110006822259365], [20.150015903410516, 39.624997666983965], [19.980000441170144, 39.694993394523401], [19.9600016618732, 39.915005805006039], [19.40608198413673, 40.250773423822459], [19.319058872157139, 40.727230129553554], [19.403549838954287, 41.409565741535445], [19.540027296637099, 41.71998607031275], [19.371768833094958, 41.87754751237064], [19.304486118250786, 42.195745144207812], [19.738051385179627, 42.688247382165564], [19.801613396898681, 42.500093492190835], [20.0707, 42.58863], [20.28375451018189, 42.320259507815074], [20.52295, 42.21787], [20.590247430104906, 41.855404161133592]]] } }, - { "type": "Feature", "properties": { "admin": "United Arab Emirates", "name": "United Arab Emirates", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[51.579518670463258, 24.245497137951102], [51.757440626844172, 24.294072984305462], [51.794389275932865, 24.019826158132499], [52.577080519425593, 24.177439276622703], [53.404006788960139, 24.151316840099167], [54.008000929587574, 24.121757920828212], [54.693023716048614, 24.797892360935084], [55.439024692614126, 25.439145209244934], [56.070820753814544, 26.055464178973978], [56.261041701080948, 25.714606431576762], [56.396847365143991, 24.924732163995483], [55.886232537667993, 24.92083059335744], [55.804118686756212, 24.269604193615258], [55.981213820220454, 24.130542914317822], [55.528631626208231, 23.933604030853498], [55.525841098864461, 23.524869289640929], [55.234489373602869, 23.110992743415316], [55.208341098863187, 22.708329982997039], [55.006803012924898, 22.496947536707129], [52.000733270074321, 23.001154486578937], [51.617707553926969, 24.014219265228824], [51.579518670463258, 24.245497137951102]]] } }, - { "type": "Feature", "properties": { "admin": "Argentina", "name": "Argentina", "continent": "South America" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-65.5, -55.2], [-66.45, -55.25], [-66.95992, -54.89681], [-67.56244, -54.87001], [-68.63335, -54.8695], [-68.634010227583147, -52.636370458874453], [-68.25, -53.1], [-67.75, -53.85], [-66.45, -54.45], [-65.05, -54.7], [-65.5, -55.2]]], [[[-64.964892137294569, -22.075861504812348], [-64.377021043542257, -22.79809132252354], [-63.986838141522462, -21.993644301035953], [-62.84646847192154, -22.034985446869452], [-62.685057135657885, -22.249029229422401], [-60.846564704009928, -23.880712579038299], [-60.028966030503973, -24.032796319273238], [-58.807128465394939, -24.771459242453268], [-57.777217169817952, -25.162339776309032], [-57.633660040911124, -25.603656508081666], [-58.618173590719707, -27.123718763947117], [-57.609759690976134, -27.395898532828419], [-56.486701626192989, -27.548499037386243], [-55.695845506398186, -27.387837009390815], [-54.788794928595038, -26.621785577096087], [-54.625290696823541, -25.739255466415479], [-54.130049607954412, -25.547639255477243], [-53.628348965048716, -26.12486500417743], [-53.648735317587885, -26.923472588816104], [-54.490725267135517, -27.474756768505767], [-55.162286342984586, -27.881915378533414], [-56.290899624239088, -28.852760512000849], [-57.62513342958291, -30.21629485445424], [-57.874937303281897, -31.016556084926158], [-58.14244035504074, -32.044503676076182], [-58.132647671121404, -33.040566908502008], [-58.349611172098818, -33.263188978815428], [-58.427074144104367, -33.909454441057541], [-58.495442064026541, -34.4314897600701], [-57.225829637263629, -35.288026625307886], [-57.362358771378737, -35.977390232081497], [-56.737487352105447, -36.413125909166574], [-56.788285285048339, -36.901571547189327], [-57.749156867083421, -38.183870538079901], [-59.231857062401865, -38.720220228837199], [-61.2374452378656, -38.92842457454114], [-62.335956997310134, -38.827707208004362], [-62.125763108962914, -39.424104913084868], [-62.33053097191943, -40.172586358400316], [-62.145994432205228, -40.676896661136723], [-62.74580278181697, -41.028761488612083], [-63.770494757732514, -41.166789239263657], [-64.732089809819698, -40.802677097335128], [-65.118035244391578, -41.064314874028874], [-64.97856055363583, -42.058000990569312], [-64.303407965742466, -42.359016208669495], [-63.755947842042339, -42.043686618824495], [-63.458059048095883, -42.563138116222355], [-64.378803880456289, -42.873558444999638], [-65.181803961839691, -43.495380954767782], [-65.328823411710133, -44.501366062193689], [-65.565268927661592, -45.03678557716978], [-66.509965786389344, -45.039627780945843], [-67.293793911392427, -45.551896254255183], [-67.580546434180079, -46.301772963242527], [-66.597066413017259, -47.033924655953804], [-65.641026577401433, -47.23613453551188], [-65.98508826360073, -48.133289076531128], [-67.166178961847649, -48.697337334996931], [-67.816087612566449, -49.869668877970412], [-68.728745083273154, -50.26421843851886], [-69.138539191347789, -50.732510267947788], [-68.815561489523517, -51.771104011594097], [-68.149994879820397, -52.349983406127699], [-68.571545376241332, -52.299443855346247], [-69.498362189396076, -52.142760912637236], [-71.914803839796321, -52.009022305865912], [-72.329403856074023, -51.425956312872394], [-72.309973517532342, -50.677009779666342], [-72.975746832964617, -50.741450290734299], [-73.328050910114456, -50.378785088909865], [-73.415435757120022, -49.318436374712952], [-72.648247443314929, -48.878618259476774], [-72.331160854771937, -48.244238376661819], [-72.44735531278026, -47.738532810253517], [-71.917258470330196, -46.884838148791786], [-71.552009446891233, -45.560732924177117], [-71.659315558545316, -44.973688653341434], [-71.222778896759721, -44.784242852559409], [-71.329800788036195, -44.407521661151677], [-71.793622606071935, -44.207172133156099], [-71.464056159130493, -43.787611179378324], [-71.915423956983901, -43.408564548517404], [-72.148898078078517, -42.254888197601375], [-71.746803758415453, -42.051386407235988], [-71.915734015577542, -40.832339369470716], [-71.680761277946445, -39.808164157878061], [-71.413516608349042, -38.916022230791107], [-70.814664272734703, -38.552995293940732], [-71.118625047475419, -37.576827487947192], [-71.121880662709771, -36.65812387466233], [-70.364769253201658, -36.005088799789931], [-70.388049485949082, -35.169687595359441], [-69.817309129501453, -34.193571465798279], [-69.814776984319209, -33.273886000299839], [-70.074399380153622, -33.09120981214803], [-70.535068935819439, -31.365010267870279], [-69.919008348251921, -30.336339206668306], [-70.013550381129861, -29.367922865518544], [-69.656130337183143, -28.459141127233686], [-69.001234910748266, -27.521213881136127], [-68.295541551370391, -26.899339694935787], [-68.594799770772667, -26.50690886811126], [-68.386001146097342, -26.185016371365229], [-68.417652960876111, -24.518554782816874], [-67.328442959244128, -24.025303236590908], [-66.985233934177629, -22.986348565362825], [-67.106673550063604, -22.735924574476392], [-66.273339402924833, -21.832310479420677], [-64.964892137294569, -22.075861504812348]]]] } }, - { "type": "Feature", "properties": { "admin": "Armenia", "name": "Armenia", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[43.582745802592726, 41.09214325618256], [44.972480096218071, 41.248128567055588], [45.179495883979335, 40.985353908851401], [45.560351189970433, 40.812289537105919], [45.359174839058156, 40.561503811193447], [45.891907179555076, 40.218475653639992], [45.610012241402913, 39.899993801425175], [46.034534132680662, 39.628020738273058], [46.483498976432443, 39.464154771475528], [46.505719842317966, 38.770605373686287], [46.143623081248812, 38.74120148371221], [45.735379266143006, 39.319719143219736], [45.739978468616975, 39.473999131827114], [45.298144972521456, 39.471751207022422], [45.00198733905674, 39.740003567049548], [44.793989699081934, 39.713002631177041], [44.400008579288695, 40.005000311842267], [43.656436395040934, 40.253563951166178], [43.752657911968399, 40.740200914058754], [43.582745802592726, 41.09214325618256]]] } }, - { "type": "Feature", "properties": { "admin": "French Southern and Antarctic Lands", "name": "Fr. S. Antarctic Lands", "continent": "Seven seas (open ocean)" }, "geometry": { "type": "Polygon", "coordinates": [[[68.935, -48.625], [69.58, -48.94], [70.525, -49.065], [70.56, -49.255], [70.28, -49.71], [68.745, -49.775], [68.72, -49.2425], [68.8675, -48.83], [68.935, -48.625]]] } }, - { "type": "Feature", "properties": { "admin": "Australia", "name": "Australia", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[145.397978143494782, -40.792548516605883], [146.364120721623692, -41.137695407883335], [146.908583612250823, -41.000546156580668], [147.689259474884125, -40.808258152022681], [148.289067824495987, -40.875437514002122], [148.359864536735785, -42.062445163746439], [148.017301467073082, -42.40702361426861], [147.914051955353784, -43.211522312188485], [147.564564243763982, -42.937688897473855], [146.87034305235494, -43.634597263362082], [146.663327264593647, -43.580853773778543], [146.048377720320389, -43.54974456153888], [145.431929559510536, -42.693776137056268], [145.295090366801674, -42.03360971452755], [144.7180713238306, -41.162551771815707], [144.743754510679622, -40.703975111657705], [145.397978143494782, -40.792548516605883]]], [[[143.561811151299935, -13.763655694232209], [143.922099237238882, -14.548310642152], [144.563713820574804, -14.171176039285879], [144.894908075133515, -14.594457696188622], [145.374723748963419, -14.984976495018284], [145.271991001567244, -15.428205254785691], [145.48525963763575, -16.285672295804769], [145.637033319276952, -16.784918308176611], [145.888904250267672, -16.906926364817647], [146.160308872664473, -17.76165455492524], [146.063673944278662, -18.280072523677315], [146.387478469019584, -18.958274021075905], [147.471081577747896, -19.480722751546676], [148.177601760042478, -19.955939222902767], [148.848413527623222, -20.391209812097252], [148.717465448195583, -20.633468926681513], [149.289420200802056, -21.260510756111096], [149.678337030230637, -22.342511895438388], [150.07738244038859, -22.122783705333315], [150.482939081015161, -22.556142266533012], [150.727265252891158, -22.402404880464655], [150.899554478152254, -23.462236830338679], [151.609175246384211, -24.076256198830755], [152.07353966695905, -24.45788665130619], [152.855197381805908, -25.267501316023008], [153.136162144176751, -26.071173191026187], [153.161948683890358, -26.641319268502439], [153.09290897034856, -27.260299574494503], [153.569469028944184, -28.110066827102099], [153.512108189100218, -28.995077406532751], [153.339095493787056, -29.458201592732443], [153.069241164358857, -30.350240166954809], [153.089601678681788, -30.923641859665445], [152.891577590139377, -31.640445651985949], [152.450002476205327, -32.550002536755237], [151.709117466436766, -33.041342054986337], [151.343971795862387, -33.816023451473846], [151.010555454715103, -34.310360202777879], [150.714139439089024, -35.173459974916803], [150.328219842733233, -35.671879164371923], [150.075212030232251, -36.420205580390508], [149.946124302367139, -37.109052422841224], [149.997283970336127, -37.425260512035123], [149.423882277625523, -37.772681166333463], [148.304622430615893, -37.809061374666875], [147.38173302631526, -38.219217217767543], [146.922122837511324, -38.606532077795116], [146.317921991154776, -39.035756524411433], [145.489652134380549, -38.593767999019043], [144.876976353128157, -38.41744801203911], [145.032212355732952, -37.896187839510972], [144.485682407814011, -38.085323581699257], [143.609973586196077, -38.809465427405321], [142.745426873952965, -38.538267510737519], [142.17832970598198, -38.380034275059835], [141.606581659104677, -38.308514092767872], [140.638578729413211, -38.019332777662541], [139.992158237874321, -37.402936293285094], [139.806588169514043, -36.643602797188272], [139.574147577065219, -36.138362318670666], [139.082808058834075, -35.732754001611774], [138.120747918856296, -35.612296237939397], [138.449461704664998, -35.127261244447887], [138.207564325106659, -34.384722588845925], [137.719170363516128, -35.07682504653102], [136.829405552314711, -35.260534763328614], [137.352371047108477, -34.707338555644093], [137.503886346588331, -34.130267836240769], [137.890116001537649, -33.640478610978327], [137.810327590079112, -32.900007012668105], [136.996837192940347, -33.752771498348629], [136.372069126531642, -34.094766127256186], [135.98904341038434, -34.89011809666048], [135.208212518454104, -34.478670342752601], [135.239218377829161, -33.947953383114971], [134.613416782774607, -33.222778008763136], [134.085903761939107, -32.848072198214759], [134.273902622617015, -32.617233575166949], [132.990776808809812, -32.011224053680188], [132.288080682504869, -31.982646986622761], [131.326330601120901, -31.495803318001041], [129.535793898639668, -31.590422865527476], [128.240937534702198, -31.948488864877849], [127.102867466338282, -32.282266941051041], [126.148713820501129, -32.2159660784206], [125.088623488465586, -32.728751316052829], [124.22164798390493, -32.959486586236061], [124.028946567888511, -33.483847344701708], [123.65966678273071, -33.890179131812722], [122.811036411633609, -33.914467054989835], [122.18306440642283, -34.003402194964217], [121.299190708502579, -33.821036065406126], [120.580268182458113, -33.930176690406618], [119.893695103028222, -33.976065362281808], [119.298899367348781, -34.50936614353396], [119.007340936357977, -34.464149265278529], [118.505717808100769, -34.746819349915093], [118.024971958489516, -35.064732761374707], [117.295507440257438, -35.025458672832862], [116.62510908413492, -35.025096937806829], [115.564346958479689, -34.386427911111547], [115.026808709779516, -34.196517022438918], [115.048616164206763, -33.623425388322026], [115.545123325667078, -33.487257989232951], [115.714673700016661, -33.259571628554944], [115.679378696761376, -32.900368747694124], [115.801645135563959, -32.205062351207026], [115.689610630355105, -31.612437025683782], [115.160909051576937, -30.601594333622455], [114.99704308477942, -30.030724786094162], [115.040037876446249, -29.461095472940794], [114.64197431850198, -28.810230808224706], [114.61649783738217, -28.516398614213042], [114.173579136208446, -28.118076674107321], [114.048883905088132, -27.33476531342712], [113.477497593236876, -26.543134047147898], [113.338953078262477, -26.116545098578477], [113.77835778204026, -26.549025160429174], [113.440962355606587, -25.621278171493152], [113.936901076311642, -25.911234633082877], [114.232852004047288, -26.298446140245868], [114.216160516417006, -25.786281019801105], [113.721255324357685, -24.998938897402123], [113.625343866024025, -24.683971042583146], [113.393523390762667, -24.384764499613262], [113.502043898575607, -23.80635019297025], [113.706992629045146, -23.56021534596406], [113.843418410295669, -23.059987481378734], [113.736551548316072, -22.475475355725372], [114.149756300921865, -21.755881036061009], [114.225307244932651, -22.51748829517863], [114.64776207891866, -21.829519952076904], [115.460167270979298, -21.495173435148541], [115.94737267462699, -21.068687839443708], [116.711615431791529, -20.701681817306817], [117.166316359527684, -20.623598728113802], [117.441545037914238, -20.746898695562162], [118.229558953932951, -20.374208265873232], [118.836085239742701, -20.263310642174822], [118.987807244951753, -20.044202569257319], [119.252493931150624, -19.952941989829835], [119.805225050944543, -19.976506442954978], [120.856220330896633, -19.683707777589188], [121.399856398607199, -19.239755547769729], [121.655137974129062, -18.70531788500713], [122.241665480641757, -18.197648614171765], [122.286623976735655, -17.798603204013911], [122.312772251475408, -17.254967136303446], [123.012574497571904, -16.405199883695854], [123.433789097183009, -17.268558037996225], [123.859344517106592, -17.069035332917249], [123.503242222183232, -16.596506036040363], [123.817073195491915, -16.11131601325199], [124.258286574399847, -16.32794361741956], [124.379726190285794, -15.567059828353973], [124.926152785340022, -15.07510019293532], [125.167275018413875, -14.680395603090004], [125.670086704613823, -14.510070082256018], [125.685796340030493, -14.230655612853834], [126.125149367376096, -14.347340996968949], [126.142822707219864, -14.095986830301211], [126.582589146023736, -13.95279143642041], [127.065867140817332, -13.817967624570922], [127.804633416861932, -14.276906019755042], [128.359689976108939, -14.869169610252253], [128.985543247595899, -14.875990899314738], [129.621473423379598, -14.969783623924553], [129.409600050982988, -14.420669854391031], [129.888640578328591, -13.618703301653481], [130.339465773642928, -13.357375583553473], [130.183506300985982, -13.107520033422301], [130.617795037966971, -12.536392103732464], [131.223494500859999, -12.183648776908113], [131.73509118054946, -12.302452894747159], [132.575298293183096, -12.114040622611013], [132.557211541881031, -11.603012383676683], [131.824698114143644, -11.273781833545097], [132.357223748911395, -11.128519382372641], [133.019560581596409, -11.376411228076844], [133.550845981989028, -11.786515394745134], [134.393068475481982, -12.042365411022173], [134.678632440327021, -11.9411829565947], [135.298491245667975, -12.248606052299051], [135.882693312727611, -11.962266940969796], [136.258380975489445, -12.049341729381606], [136.492475213771627, -11.857208754120389], [136.951620314684988, -12.351958916882735], [136.685124953355739, -12.887223402562054], [136.305406528875096, -13.291229750219895], [135.961758254134111, -13.324509372615889], [136.077616815332533, -13.72427825282578], [135.783836297753226, -14.223989353088211], [135.4286641786112, -14.715432224183896], [135.500184360903177, -14.997740573794427], [136.295174595281367, -15.550264987859121], [137.065360142159477, -15.870762220933353], [137.580470819244795, -16.215082289294084], [138.303217401278971, -16.807604261952658], [138.58516401586337, -16.806622409739173], [139.108542922115475, -17.062679131745366], [139.260574985918197, -17.371600843986183], [140.215245396078274, -17.710804945550063], [140.875463495039241, -17.36906869880394], [141.071110467696258, -16.832047214426719], [141.274095493738798, -16.388870131091604], [141.398222284103781, -15.840531508042584], [141.702183058844611, -15.044921156476928], [141.563380161708665, -14.561333103089506], [141.635520461188094, -14.270394789286284], [141.519868605718955, -13.698078301653805], [141.650920038011009, -12.944687595270562], [141.842691278246207, -12.741547539931187], [141.68699018775078, -12.407614434461134], [141.928629185147543, -11.877465915578778], [142.118488397387978, -11.328042087451619], [142.14370649634634, -11.04273650476814], [142.51526004452495, -10.668185723516642], [142.797310011974048, -11.157354831591515], [142.866763136974271, -11.784706719614929], [143.11594689348567, -11.90562957117791], [143.158631626558758, -12.325655612846187], [143.522123651299864, -12.834358412327429], [143.597157830987669, -13.400422051652594], [143.561811151299935, -13.763655694232209]]]] } }, - { "type": "Feature", "properties": { "admin": "Austria", "name": "Austria", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[16.979666782304033, 48.123497015976298], [16.903754103267257, 47.714865627628321], [16.340584344150411, 47.712901923201215], [16.534267612380372, 47.496170966169103], [16.202298211337361, 46.852385972676949], [16.011663852612653, 46.683610744811688], [15.137091912504982, 46.658702704447016], [14.632471551174827, 46.431817328469535], [13.806475457421524, 46.509306138691201], [12.376485223040813, 46.767559109069843], [12.153088006243051, 47.115393174826437], [11.164827915093268, 46.941579494812721], [11.048555942436533, 46.751358547546324], [10.442701450246627, 46.893546250997424], [9.932448357796657, 46.920728054382948], [9.479969516649019, 47.102809963563367], [9.632931756232974, 47.347601223329974], [9.594226108446346, 47.525058091820256], [9.896068149463188, 47.58019684507569], [10.402083774465209, 47.302487697939156], [10.544504021861625, 47.566399237653762], [11.426414015354736, 47.523766181012967], [12.141357456112784, 47.703083401065761], [12.620759718484491, 47.672387600284395], [12.932626987365945, 47.467645575543983], [13.025851271220487, 47.637583523135824], [12.884102817443901, 48.289145819687903], [13.243357374736998, 48.41611481382904], [13.595945672264433, 48.877171942737135], [14.33889773932472, 48.555305284207193], [14.901447381254055, 48.964401760445817], [15.253415561593979, 49.039074205107575], [16.029647251050218, 48.733899034207916], [16.49928266771877, 48.785808010445095], [16.960288120194573, 48.596982326850593], [16.879982944412998, 48.470013332709463], [16.979666782304033, 48.123497015976298]]] } }, - { "type": "Feature", "properties": { "admin": "Azerbaijan", "name": "Azerbaijan", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[45.001987339056789, 39.740003567049591], [45.298144972521435, 39.471751207022422], [45.739978468616997, 39.473999131827149], [45.735379266143092, 39.319719143219785], [46.143623081248812, 38.74120148371221], [45.457721795438729, 38.874139105783108], [44.952688022650264, 39.33576467544642], [44.79398969908199, 39.713002631177027], [45.001987339056789, 39.740003567049591]]], [[[47.373315464066216, 41.219732367511249], [47.81566572448471, 41.151416124021338], [47.987283156126033, 41.405819200194223], [48.584352654826283, 41.808869533854669], [49.110263706260653, 41.282286688800518], [49.618914829309588, 40.572924302729966], [50.084829542853093, 40.526157131505776], [50.392821079312704, 40.256561184239096], [49.569202101444795, 40.176100979160701], [49.395259230350419, 39.39948171646224], [49.2232283872507, 39.04921885838791], [48.856532423707584, 38.815486355131775], [48.883249139202533, 38.320245266262638], [48.634375441284831, 38.270377509100925], [48.010744256386502, 38.794014797514528], [48.355529412637928, 39.288764960276886], [48.060095249225256, 39.582235419262439], [47.685079380083117, 39.508363959301185], [46.505719842317966, 38.770605373686251], [46.483498976432443, 39.464154771475528], [46.034534132680697, 39.628020738273044], [45.610012241402913, 39.899993801425175], [45.891907179555133, 40.21847565363997], [45.359174839058156, 40.561503811193482], [45.560351189970469, 40.812289537105947], [45.179495883979392, 40.98535390885143], [44.972480096218156, 41.248128567055623], [45.217426385281634, 41.411451931314041], [45.962600538930438, 41.123872585609789], [46.501637404166978, 41.064444688474104], [46.637908156120567, 41.181672675128219], [46.145431756378983, 41.72280243587263], [46.404950799348818, 41.860675157227341], [46.686070591016652, 41.827137152669899], [47.373315464066216, 41.219732367511249]]]] } }, - { "type": "Feature", "properties": { "admin": "Burundi", "name": "Burundi", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[29.339997592900342, -4.499983412294092], [29.276383904749046, -3.293907159034063], [29.02492638521678, -2.839257907730157], [29.632176141078585, -2.917857761246096], [29.938359002407935, -2.348486830254238], [30.469696079232978, -2.413857517103458], [30.527677036264457, -2.807631931167534], [30.743012729624692, -3.034284763199686], [30.752262811004943, -3.359329522315569], [30.505559523243559, -3.568567396665364], [30.116332635221166, -4.090137627787242], [29.753512404099919, -4.45238941815328], [29.339997592900342, -4.499983412294092]]] } }, - { "type": "Feature", "properties": { "admin": "Belgium", "name": "Belgium", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[3.314971144228536, 51.345780951536071], [4.047071160507527, 51.267258612668556], [4.973991326526913, 51.475023708698124], [5.60697594567, 51.037298488969768], [6.156658155958779, 50.803721015010574], [6.043073357781109, 50.128051662794221], [5.782417433300905, 50.090327867221205], [5.674051954784828, 49.52948354755749], [4.799221632515809, 49.985373033236371], [4.286022983425084, 49.90749664977254], [3.588184441755685, 50.378992418003563], [3.123251580425801, 50.780363267614561], [2.658422071960274, 50.796848049515731], [2.513573032246142, 51.148506171261815], [3.314971144228536, 51.345780951536071]]] } }, - { "type": "Feature", "properties": { "admin": "Benin", "name": "Benin", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[2.691701694356254, 6.258817246928628], [1.865240512712318, 6.14215770102973], [1.618950636409238, 6.832038072126236], [1.664477573258381, 9.128590399609378], [1.46304284018467, 9.334624335157086], [1.425060662450136, 9.825395412632998], [1.077795037448737, 10.175606594275022], [0.772335646171484, 10.470808213742357], [0.899563022474069, 10.997339382364258], [1.243469679376488, 11.11051076908346], [1.447178175471066, 11.547719224488857], [1.93598554851988, 11.641150214072551], [2.154473504249921, 11.940150051313337], [2.49016360841793, 12.233052069543671], [2.84864301922667, 12.235635891158266], [3.611180454125558, 11.660167141155966], [3.572216424177469, 11.327939357951516], [3.797112257511713, 10.734745591673104], [3.600070021182801, 10.332186184119406], [3.705438266625918, 10.063210354040207], [3.220351596702101, 9.4441525333997], [2.912308383810255, 9.13760793704432], [2.723792758809509, 8.506845404489708], [2.74906253420022, 7.870734361192886], [2.691701694356254, 6.258817246928628]]] } }, - { "type": "Feature", "properties": { "admin": "Burkina Faso", "name": "Burkina Faso", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-2.827496303712706, 9.642460842319775], [-3.511898972986272, 9.900326239456216], [-3.980449184576684, 9.862344061721698], [-4.330246954760383, 9.610834865757139], [-4.779883592131966, 9.821984768101741], [-4.954653286143098, 10.152713934769732], [-5.404341599946973, 10.370736802609144], [-5.470564947929004, 10.951269842976044], [-5.197842576508648, 11.375145778850136], [-5.220941941743119, 11.713858954307224], [-4.427166103523802, 12.542645575404292], [-4.280405035814879, 13.228443508349738], [-4.006390753587225, 13.472485459848112], [-3.52280270019986, 13.337661647998612], [-3.103706834312759, 13.54126679122859], [-2.967694464520576, 13.798150336151506], [-2.191824510090384, 14.246417548067352], [-2.001035122068771, 14.559008287000887], [-1.066363491205663, 14.973815009007764], [-0.515854458000348, 15.116157741755725], [-0.26625729003058, 14.924308986872147], [0.374892205414682, 14.928908189346128], [0.295646396495101, 14.444234930880651], [0.429927605805517, 13.988733018443922], [0.993045688490071, 13.335749620003821], [1.024103224297477, 12.851825669806573], [2.177107781593775, 12.625017808477532], [2.154473504249921, 11.940150051313337], [1.93598554851988, 11.641150214072551], [1.447178175471066, 11.547719224488857], [1.243469679376488, 11.11051076908346], [0.899563022474069, 10.997339382364258], [0.023802524423701, 11.018681748900802], [-0.438701544588582, 11.09834096927872], [-0.761575893548183, 10.936929633015053], [-1.203357713211431, 11.009819240762736], [-2.94040930827046, 10.962690334512557], [-2.963896246747111, 10.395334784380081], [-2.827496303712706, 9.642460842319775]]] } }, - { "type": "Feature", "properties": { "admin": "Bangladesh", "name": "Bangladesh", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[92.672720981825549, 22.041238918541247], [92.652257114637976, 21.324047552978481], [92.30323449093865, 21.475485337809815], [92.368553501355606, 20.670883287025344], [92.082886183646124, 21.192195135985767], [92.025215285208361, 21.701569729086764], [91.834890985077408, 22.182935695885561], [91.417087029997646, 22.765019029221218], [90.496006300827247, 22.805016587815125], [90.586956821660948, 22.392793687422863], [90.272970819055544, 21.836367702720107], [89.847467075564268, 22.039146023033421], [89.70204959509492, 21.857115790285299], [89.41886274613546, 21.966178900637296], [89.031961297566198, 22.055708319582973], [88.876311883503064, 22.879146429937826], [88.529769728553759, 23.631141872649163], [88.699940220090895, 24.233714911388557], [88.084422235062405, 24.501657212821918], [88.30637251175601, 24.866079413344199], [88.931553989623069, 25.238692328384769], [88.209789259802477, 25.768065700782707], [88.56304935094974, 26.446525580342716], [89.355094028687276, 26.014407253518065], [89.832480910199592, 25.965082098895476], [89.920692580121838, 25.269749864192171], [90.872210727912105, 25.13260061288954], [91.799595981822065, 25.14743174895731], [92.376201613334786, 24.976692816664961], [91.915092807994398, 24.130413723237108], [91.467729933643668, 24.072639471934789], [91.158963250699713, 23.503526923104381], [91.706475050832083, 22.985263983649183], [91.869927606171302, 23.62434642180278], [92.146034783906799, 23.62749868417259], [92.672720981825549, 22.041238918541247]]] } }, - { "type": "Feature", "properties": { "admin": "Bulgaria", "name": "Bulgaria", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[22.657149692482985, 44.234923000661276], [22.94483239105184, 43.823785305347123], [23.332302280376322, 43.897010809904707], [24.100679152124169, 43.741051337247846], [25.569271681426923, 43.688444729174712], [26.065158725699739, 43.943493760751259], [27.242399529740904, 44.175986029632398], [27.970107049275068, 43.812468166675202], [28.55808149589199, 43.707461656258118], [28.039095086384712, 43.293171698574177], [27.673897739378042, 42.577892361006214], [27.996720411905383, 42.007358710287775], [27.135739373490473, 42.141484890301335], [26.117041863720793, 41.826904608724554], [26.106138136507205, 41.328898830727766], [25.197201368925441, 41.234485988930523], [24.492644891058031, 41.583896185872028], [23.692073601992345, 41.309080918943842], [22.952377150166445, 41.337993882811141], [22.881373732197424, 41.999297186850242], [22.380525750424585, 42.320259507815081], [22.545011834409614, 42.461362006188025], [22.436594679461273, 42.580321153323929], [22.604801466571324, 42.898518785161137], [22.986018507588479, 43.211161200526959], [22.500156691180276, 43.642814439460977], [22.410446404721593, 44.008063462899948], [22.657149692482985, 44.234923000661276]]] } }, - { "type": "Feature", "properties": { "admin": "The Bahamas", "name": "Bahamas", "continent": "North America" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-77.53466, 23.75975], [-77.78, 23.71], [-78.03405, 24.28615], [-78.40848, 24.57564], [-78.19087, 25.2103], [-77.89, 25.17], [-77.54, 24.34], [-77.53466, 23.75975]]], [[[-77.82, 26.58], [-78.91, 26.42], [-78.98, 26.79], [-78.51, 26.87], [-77.85, 26.84], [-77.82, 26.58]]], [[[-77.0, 26.59], [-77.17255, 25.87918], [-77.35641, 26.00735], [-77.34, 26.53], [-77.78802, 26.92516], [-77.79, 27.04], [-77.0, 26.59]]]] } }, - { "type": "Feature", "properties": { "admin": "Bosnia and Herzegovina", "name": "Bosnia and Herz.", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[19.005486281010118, 44.860233669609144], [19.36803, 44.863], [19.11761, 44.42307], [19.59976, 44.03847], [19.454, 43.568100000000115], [19.21852, 43.52384], [19.03165, 43.43253], [18.70648, 43.20011], [18.56, 42.65], [17.674921502358981, 43.028562527023603], [17.297373488034449, 43.446340643887353], [16.916156447017325, 43.667722479825663], [16.456442905348862, 44.041239732431265], [16.239660271884528, 44.351143296885695], [15.750026075918978, 44.81871165626255], [15.959367303133373, 45.233776760430935], [16.318156772535868, 45.004126695325901], [16.534939406000202, 45.211607570977705], [17.00214603035101, 45.233776760430935], [17.861783481526398, 45.067740383477137], [18.553214145591646, 45.08158966733145], [19.005486281010118, 44.860233669609144]]] } }, - { "type": "Feature", "properties": { "admin": "Belarus", "name": "Belarus", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[23.484127638449841, 53.912497667041123], [24.45068362803703, 53.905702216194747], [25.536353794056989, 54.282423407602515], [25.768432651479792, 54.846962592175082], [26.588279249790386, 55.167175604871659], [26.494331495883749, 55.61510691997762], [27.102459751094525, 55.783313707087672], [28.17670942557799, 56.169129950578807], [29.2295133806603, 55.918344224666356], [29.371571893030669, 55.67009064393617], [29.896294386522353, 55.789463202530406], [30.87390913262, 55.550976467503396], [30.971835971813132, 55.081547756564028], [30.75753380709871, 54.811770941784303], [31.384472283663733, 54.157056382862422], [31.791424187962232, 53.974638576872117], [31.731272820774503, 53.794029446012011], [32.405598585751157, 53.618045355842028], [32.693643019346034, 53.351420803432106], [32.304519484188226, 53.132726141972903], [31.497643670382924, 53.167426866256889], [31.30520063652801, 53.073995876673195], [31.540018344862254, 52.742052313846344], [31.78599816257158, 52.10167796488544], [30.927549269338975, 52.042353420614383], [30.619454380014837, 51.822806098022362], [30.55511722181145, 51.319503485715643], [30.157363722460889, 51.416138414101454], [29.254938185347921, 51.368234361366881], [28.992835320763522, 51.602044379271462], [28.617612745892242, 51.427713934934836], [28.241615024536564, 51.572227077839059], [27.454066196408426, 51.59230337178446], [26.337958611768549, 51.832288723347915], [25.327787713327005, 51.910656032918538], [24.553106316839511, 51.888461005249177], [24.005077752384206, 51.617443956094448], [23.52707075368437, 51.578454087930233], [23.508002150168689, 52.023646552124717], [23.19949384938618, 52.486977444053664], [23.799198846133375, 52.691099351606553], [23.804934930117774, 53.08973135030606], [23.527535841574995, 53.47012156840654], [23.484127638449841, 53.912497667041123]]] } }, - { "type": "Feature", "properties": { "admin": "Belize", "name": "Belize", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-89.143080410503302, 17.808318996649316], [-89.150909389995519, 17.955467637600414], [-89.029857347351808, 18.001511338772485], [-88.848343878926585, 17.883198147040229], [-88.490122850279334, 18.486830552641603], [-88.300031094093669, 18.499982204659897], [-88.296336229184803, 18.353272813383263], [-88.106812913754368, 18.348673610909284], [-88.123478563168476, 18.076674709541003], [-88.285354987322776, 17.644142971258031], [-88.197866787452625, 17.489475409408453], [-88.302640753924422, 17.13169363043566], [-88.239517991879893, 17.036066392479551], [-88.355428229510551, 16.530774237529624], [-88.551824510435821, 16.265467434143144], [-88.732433641295927, 16.233634751851351], [-88.930612759135244, 15.887273464415072], [-89.229121670269265, 15.886937567605166], [-89.15080603713092, 17.015576687075832], [-89.143080410503302, 17.808318996649316]]] } }, - { "type": "Feature", "properties": { "admin": "Bolivia", "name": "Bolivia", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-62.84646847192154, -22.034985446869442], [-63.986838141522462, -21.993644301035946], [-64.377021043542243, -22.798091322523533], [-64.964892137294598, -22.07586150481232], [-66.273339402924833, -21.832310479420713], [-67.10667355006359, -22.735924574476414], [-67.82817989772272, -22.872918796482171], [-68.219913092711266, -21.494346612231858], [-68.757167121033731, -20.372657972904459], [-68.442225104430904, -19.405068454671426], [-68.966818406841853, -18.9816834449041], [-69.100246955019472, -18.260125420812674], [-69.590423753524036, -17.580011895419329], [-68.959635382753291, -16.500697930571267], [-69.389764166934697, -15.66012908291165], [-69.160346645774936, -15.323973890853015], [-69.339534674747, -14.953195489158828], [-68.94888668483658, -14.45363941819328], [-68.929223802349526, -13.602683607643007], [-68.880079515239956, -12.89972909917665], [-68.665079718689611, -12.561300144097171], [-69.52967810736493, -10.951734307502193], [-68.786157599549469, -11.036380303596276], [-68.27125362819325, -11.014521172736817], [-68.048192308205373, -10.712059014532484], [-67.173801235610725, -10.30681243249961], [-66.646908331962791, -9.931331475466861], [-65.33843522811641, -9.76198780684639], [-65.444837002205375, -10.51145110437543], [-65.321898769783004, -10.895872084194675], [-65.402281460213018, -11.566270440317151], [-64.31635291203159, -12.461978041232191], [-63.196498786050562, -12.627032565972433], [-62.803060268796372, -13.000653171442682], [-62.127080857986371, -13.19878061284972], [-61.713204311760769, -13.489202162330049], [-61.084121263255646, -13.479383640194595], [-60.503304002511122, -13.775954685117656], [-60.459198167550014, -14.354007256734551], [-60.264326341377355, -14.645979099183638], [-60.251148851142922, -15.077218926659318], [-60.542965664295131, -15.093910414289592], [-60.158389655179022, -16.258283786690082], [-58.241219855366673, -16.299573256091289], [-58.388058437724027, -16.877109063385273], [-58.280804002502244, -17.271710300366014], [-57.734558274960989, -17.552468357007765], [-57.498371141170971, -18.174187513911289], [-57.676008877174297, -18.961839694904025], [-57.949997321185819, -19.400004164306814], [-57.853801642474494, -19.969995212486186], [-58.166392381408038, -20.176700941653674], [-58.183471442280492, -19.868399346600359], [-59.11504248720609, -19.356906019775398], [-60.043564622626477, -19.342746677327419], [-61.786326463453761, -19.633736667562957], [-62.265961269770784, -20.513734633061272], [-62.291179368729203, -21.051634616787389], [-62.685057135657871, -22.24902922942238], [-62.84646847192154, -22.034985446869442]]] } }, - { "type": "Feature", "properties": { "admin": "Brazil", "name": "Brazil", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-57.625133429582945, -30.216294854454258], [-56.290899624239067, -28.852760512000884], [-55.162286342984558, -27.881915378533456], [-54.49072526713551, -27.474756768505785], [-53.648735317587885, -26.923472588816086], [-53.628348965048737, -26.124865004177465], [-54.130049607954376, -25.547639255477247], [-54.625290696823562, -25.739255466415507], [-54.428946092330577, -25.162184747012162], [-54.293476325077435, -24.570799655863958], [-54.292959560754511, -24.021014092710722], [-54.652834235235119, -23.839578138933955], [-55.027901780809543, -24.001273695575225], [-55.400747239795407, -23.956935316668797], [-55.517639329639621, -23.57199757252663], [-55.61068274598113, -22.655619398694839], [-55.797958136606894, -22.356929620047815], [-56.473317430229379, -22.086300144135279], [-56.881509568902885, -22.282153822521476], [-57.937155727761287, -22.090175876557169], [-57.870673997617786, -20.732687676681948], [-58.166392381408038, -20.176700941653674], [-57.853801642474494, -19.969995212486186], [-57.949997321185819, -19.400004164306814], [-57.676008877174297, -18.961839694904025], [-57.498371141170971, -18.174187513911289], [-57.734558274960989, -17.552468357007765], [-58.280804002502244, -17.271710300366014], [-58.388058437724027, -16.877109063385273], [-58.241219855366673, -16.299573256091289], [-60.158389655179022, -16.258283786690082], [-60.542965664295131, -15.093910414289592], [-60.251148851142922, -15.077218926659318], [-60.264326341377355, -14.645979099183638], [-60.459198167550014, -14.354007256734551], [-60.503304002511122, -13.775954685117656], [-61.084121263255646, -13.479383640194595], [-61.713204311760769, -13.489202162330049], [-62.127080857986371, -13.19878061284972], [-62.803060268796372, -13.000653171442682], [-63.196498786050562, -12.627032565972433], [-64.31635291203159, -12.461978041232191], [-65.402281460213018, -11.566270440317151], [-65.321898769783004, -10.895872084194675], [-65.444837002205375, -10.51145110437543], [-65.33843522811641, -9.76198780684639], [-66.646908331962791, -9.931331475466861], [-67.173801235610725, -10.30681243249961], [-68.048192308205373, -10.712059014532484], [-68.27125362819325, -11.014521172736817], [-68.786157599549469, -11.036380303596276], [-69.52967810736493, -10.951734307502193], [-70.093752204046879, -11.123971856331011], [-70.548685675728393, -11.009146823778462], [-70.481893886991159, -9.490118096558842], [-71.302412278921523, -10.079436130415372], [-72.184890713169821, -10.05359791426943], [-72.563033006465631, -9.520193780152715], [-73.226713426390148, -9.462212823121233], [-73.015382656532537, -9.03283334720806], [-73.571059332967053, -8.424446709835832], [-73.987235480429646, -7.523829847853063], [-73.723401455363486, -7.340998630404412], [-73.724486660441627, -6.918595472850638], [-73.120027431923575, -6.629930922068238], [-73.219711269814596, -6.089188734566076], [-72.964507208941185, -5.741251315944892], [-72.891927659787243, -5.274561455916979], [-71.748405727816532, -4.59398284263301], [-70.928843349883564, -4.401591485210367], [-70.79476884630229, -4.251264743673302], [-69.893635219996611, -4.298186944194326], [-69.444101935489599, -1.556287123219817], [-69.420485805932216, -1.122618503426409], [-69.577065395776586, -0.549991957200163], [-70.02065589057004, -0.185156345219539], [-70.015565761989293, 0.541414292804205], [-69.452396002872447, 0.706158758950693], [-69.252434048119042, 0.602650865070075], [-69.218637661400166, 0.985676581217433], [-69.804596727157701, 1.089081122233466], [-69.816973232691609, 1.714805202639624], [-67.868565029558823, 1.692455145673392], [-67.537810024674684, 2.037162787276329], [-67.25999752467358, 1.719998684084956], [-67.065048183852483, 1.130112209473225], [-66.876325853122566, 1.253360500489336], [-66.325765143484944, 0.724452215982012], [-65.548267381437554, 0.78925446207603], [-65.354713304288353, 1.0952822941085], [-64.611011928959854, 1.328730576987041], [-64.199305792890499, 1.49285492594602], [-64.083085496666072, 1.91636912679408], [-63.368788011311644, 2.200899562993129], [-63.422867397705105, 2.411067613124174], [-64.269999152265783, 2.497005520025566], [-64.408827887617903, 3.126786200366623], [-64.368494432214092, 3.797210394705246], [-64.816064012294007, 4.056445217297422], [-64.628659430587533, 4.14848094320925], [-63.888342861574145, 4.020530096854571], [-63.093197597899092, 3.770571193858784], [-62.804533047116692, 4.006965033377951], [-62.085429653559125, 4.162123521334308], [-60.966893276601517, 4.536467596856638], [-60.601179165271922, 4.918098049332129], [-60.733574184803707, 5.2002772078619], [-60.213683437731319, 5.2444863956876], [-59.980958624904865, 5.014061184098138], [-60.111002366767373, 4.574966538914082], [-59.767405768458701, 4.423502915866606], [-59.538039923731219, 3.958802598481937], [-59.815413174057852, 3.606498521332085], [-59.974524909084543, 2.755232652188055], [-59.718545701726732, 2.249630438644359], [-59.646043667221242, 1.786893825686789], [-59.030861579002639, 1.317697658692722], [-58.540012986878288, 1.26808828369252], [-58.429477098205957, 1.46394196207872], [-58.113449876525003, 1.507195135907025], [-57.660971035377358, 1.682584947105638], [-57.33582292339689, 1.948537705895759], [-56.782704230360814, 1.863710842288653], [-56.53938574891454, 1.89952260986692], [-55.995698004771739, 1.817667141116601], [-55.905600145070871, 2.021995754398659], [-56.073341844290283, 2.220794989425499], [-55.973322109589361, 2.510363877773016], [-55.569755011605984, 2.42150625244713], [-55.097587449755125, 2.523748073736612], [-54.524754197799709, 2.311848863123785], [-54.088062506717243, 2.105556545414629], [-53.778520677288903, 2.376702785650081], [-53.554839240113537, 2.33489655192595], [-53.4184651352953, 2.05338918701598], [-52.939657151894949, 2.124857692875636], [-52.556424730018414, 2.504705308437053], [-52.249337531123942, 3.241094468596244], [-51.657797410678882, 4.156232408053028], [-51.317146369010842, 4.203490505383953], [-51.069771287629649, 3.65039765056403], [-50.508875291533641, 1.901563828942456], [-49.974075893745045, 1.736483465986069], [-49.947100796088705, 1.046189683431223], [-50.699251268096901, 0.222984117021681], [-50.388210822132123, -0.078444512536819], [-48.620566779156313, -0.235489190271821], [-48.584496629416577, -1.237805271005001], [-47.824956427590621, -0.5816179337628], [-46.566583624851219, -0.941027520352776], [-44.9057030909904, -1.551739597178134], [-44.417619187993658, -2.137750339367975], [-44.581588507655773, -2.691308282078523], [-43.418791266440188, -2.383110039889793], [-41.47265682632824, -2.912018324397116], [-39.97866533055403, -2.87305429444904], [-38.50038347019656, -3.700652357603394], [-37.223252122535193, -4.820945733258915], [-36.45293738457638, -5.109403578312153], [-35.597795783010454, -5.149504489770648], [-35.235388963347553, -5.464937432480245], [-34.896029832486825, -6.738193047719709], [-34.729993455533027, -7.343220716992965], [-35.128212042774216, -8.996401462442284], [-35.636966518687707, -9.649281508017811], [-37.046518724096991, -11.040721123908799], [-37.683611619607355, -12.17119475672582], [-38.423876512188436, -13.038118584854285], [-38.673887091616507, -13.057652276260615], [-38.953275722802537, -13.79336964280002], [-38.882298143049645, -15.667053724838764], [-39.161092495264306, -17.208406670808468], [-39.267339240056394, -17.867746270420479], [-39.583521491034219, -18.262295830968934], [-39.76082333022763, -19.599113457927402], [-40.774740770010332, -20.90451181405242], [-40.944756232250597, -21.937316989837807], [-41.75416419123821, -22.370675551037454], [-41.988284267736546, -22.970070489190888], [-43.074703742024738, -22.967693373305462], [-44.647811855637798, -23.351959323827838], [-45.35213578955991, -23.796841729428579], [-46.472093268405523, -24.088968601174539], [-47.648972337420645, -24.885199069927715], [-48.495458136577689, -25.877024834905647], [-48.641004808127725, -26.623697605090928], [-48.474735887228647, -27.175911960561887], [-48.661520351747612, -28.186134535435713], [-48.888457404157393, -28.674115085567877], [-49.587329474472668, -29.224469089476333], [-50.696874152211478, -30.984465020472953], [-51.576226162306149, -31.777698256153204], [-52.256081305538032, -32.245369968394662], [-52.71209998229768, -33.196578057591175], [-53.373661668498229, -33.768377780900757], [-53.650543992718084, -33.202004082981823], [-53.209588995971529, -32.727666110974717], [-53.787951626182185, -32.047242526987617], [-54.572451544805105, -31.494511407193745], [-55.601510179249331, -30.853878676071385], [-55.97324459494093, -30.883075860316296], [-56.976025763564721, -30.109686374636119], [-57.625133429582945, -30.216294854454258]]] } }, - { "type": "Feature", "properties": { "admin": "Brunei", "name": "Brunei", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[114.204016554828343, 4.525873928236805], [114.599961379048707, 4.900011298029965], [115.450710483869798, 5.447729803891532], [115.405700311343566, 4.955227565933837], [115.347460972150643, 4.316636053887009], [114.869557326315373, 4.348313706881924], [114.659595981913498, 4.007636826997753], [114.204016554828343, 4.525873928236805]]] } }, - { "type": "Feature", "properties": { "admin": "Bhutan", "name": "Bhutan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[91.69665652869665, 27.771741848251661], [92.10371178585973, 27.4526140406332], [92.033483514375078, 26.838310451763554], [91.217512648486405, 26.808648179628019], [90.37327477413406, 26.875724188742872], [89.744527622438838, 26.71940298105995], [88.835642531289366, 27.098966376243755], [88.814248488320544, 27.299315904239361], [89.475810174521101, 28.04275889740639], [90.015828891971154, 28.296438503527209], [90.730513950567769, 28.064953925075748], [91.258853794319904, 28.040614325466287], [91.69665652869665, 27.771741848251661]]] } }, - { "type": "Feature", "properties": { "admin": "Botswana", "name": "Botswana", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[25.649163445750155, -18.536025892818987], [25.850391473094724, -18.714412937090533], [26.164790887158478, -19.293085625894935], [27.296504754350501, -20.391519870690995], [27.724747348753247, -20.499058526290387], [27.727227817503252, -20.851801853114711], [28.02137007010861, -21.485975030200578], [28.794656202924209, -21.639454034107445], [29.432188348109033, -22.091312758067584], [28.017235955525244, -22.827753594659072], [27.119409620886238, -23.574323011979772], [26.78640669119741, -24.240690606383478], [26.485753208123292, -24.616326592713097], [25.941652052522151, -24.696373386333214], [25.765848829865206, -25.174845472923671], [25.664666375437712, -25.486816094669706], [25.025170525825782, -25.719670098576891], [24.211266717228792, -25.670215752873567], [23.733569777122703, -25.39012948985161], [23.312096795350179, -25.268689873965712], [22.824271274514896, -25.500458672794768], [22.579531691180584, -25.979447523708142], [22.105968865657864, -26.28025603607913], [21.60589603036939, -26.726533705351748], [20.889609002371731, -26.828542982695907], [20.666470167735437, -26.477453301704916], [20.758609246511831, -25.868136488551446], [20.165725538827186, -24.917961928000768], [19.895767856534427, -24.767790215760588], [19.895457797940672, -21.849156996347865], [20.881134067475866, -21.814327080983144], [20.910641310314531, -18.252218926672018], [21.655040317478971, -18.219146010005222], [23.196858351339298, -17.869038181227783], [23.579005568137713, -18.281261081620055], [24.217364536239209, -17.889347019118485], [24.520705193792534, -17.887124932529932], [25.084443393664564, -17.661815687737366], [25.264225701608005, -17.736539808831413], [25.649163445750155, -18.536025892818987]]] } }, - { "type": "Feature", "properties": { "admin": "Central African Republic", "name": "Central African Rep.", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[15.279460483469107, 7.421924546737968], [16.106231723706767, 7.497087917506504], [16.290561557691884, 7.754307359239304], [16.456184523187343, 7.734773667832966], [16.705988396886251, 7.508327541529978], [17.964929640380884, 7.890914008002865], [18.389554884523218, 8.281303615751822], [18.911021762780504, 8.630894680206351], [18.81200971850927, 8.982914536978596], [19.094008009526018, 9.074846910025837], [20.059685499764267, 9.01270600019485], [21.00086836109616, 9.475985215691507], [21.723821648859452, 10.567055568885973], [22.231129184668784, 10.971888739460507], [22.864165480244218, 11.142395127807543], [22.977543572692603, 10.714462591998538], [23.554304233502187, 10.089255275915306], [23.557249790142826, 9.681218166538683], [23.394779087017181, 9.26506785729222], [23.459012892355979, 8.954285793488891], [23.805813429466745, 8.666318874542425], [24.567369012152078, 8.229187933785466], [25.114932488716786, 7.825104071479172], [25.12413089366472, 7.500085150579436], [25.796647983511171, 6.979315904158069], [26.21341840994511, 6.546603298362071], [26.465909458123232, 5.94671743410187], [27.213409051225163, 5.550953477394557], [27.374226108517483, 5.233944403500059], [27.044065382604703, 5.127852688004835], [26.402760857862535, 5.150874538590869], [25.650455356557465, 5.256087754737123], [25.278798455514302, 5.170408229997191], [25.128833449003274, 4.927244777847789], [24.805028924262409, 4.897246608902349], [24.41053104014625, 5.108784084489129], [23.297213982850135, 4.609693101414221], [22.841479526468103, 4.710126247573483], [22.704123569436284, 4.633050848810156], [22.405123732195531, 4.02916006104732], [21.659122755630019, 4.224341945813719], [20.927591180106273, 4.322785549329736], [20.290679152108932, 4.691677761245287], [19.467783644293146, 5.031527818212779], [18.932312452884755, 4.709506130385973], [18.542982211997778, 4.201785183118317], [18.453065219809925, 3.504385891123348], [17.809900343505259, 3.560196437998569], [17.133042433346297, 3.728196519379451], [16.537058139724135, 3.198254706226278], [16.01285241055535, 2.267639675298084], [15.907380812247649, 2.557389431158612], [15.862732374747479, 3.013537298998982], [15.405395948964379, 3.335300604664339], [15.036219516671249, 3.851367295747123], [14.950953403389658, 4.21038930909492], [14.478372430080466, 4.732605495620446], [14.558935988023501, 5.03059764243153], [14.459407179429345, 5.451760565610299], [14.536560092841111, 6.22695872642069], [14.776545444404572, 6.408498033062044], [15.279460483469107, 7.421924546737968]]] } }, - { "type": "Feature", "properties": { "admin": "Canada", "name": "Canada", "continent": "North America" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-63.6645, 46.55001], [-62.9393, 46.41587], [-62.01208, 46.44314], [-62.50391, 46.03339], [-62.87433, 45.96818], [-64.1428, 46.39265], [-64.39261, 46.72747], [-64.01486, 47.03601], [-63.6645, 46.55001]]], [[[-61.806305, 49.10506], [-62.29318, 49.08717], [-63.58926, 49.40069], [-64.51912, 49.87304], [-64.17322, 49.95718], [-62.85829, 49.70641], [-61.835585, 49.28855], [-61.806305, 49.10506]]], [[[-123.510001587551116, 48.51001089130343], [-124.012890788399474, 48.370846259141402], [-125.655012777338342, 48.825004584338494], [-125.954994466792726, 49.179995835967638], [-126.850004435871853, 49.530000311880421], [-127.029993449544392, 49.814995835970073], [-128.059336304366212, 49.994959011426594], [-128.444584107102145, 50.53913768167611], [-128.358413656255408, 50.770648098343678], [-127.308581096029883, 50.552573554071948], [-126.695000977212302, 50.40090322529538], [-125.755006673823161, 50.295018215529367], [-125.415001587558791, 49.950000515332604], [-124.920768189119315, 49.47527497008339], [-123.92250870832099, 49.062483628935794], [-123.510001587551116, 48.51001089130343]]], [[[-56.134035814017111, 50.687009792679298], [-56.795881720595261, 49.812308661490945], [-56.143105027884289, 50.15011749938283], [-55.471492275602934, 49.935815334668447], [-55.822401089080913, 49.587128607779093], [-54.93514258484565, 49.313010972686833], [-54.473775397343772, 49.556691189159167], [-53.47654944519131, 49.24913890237405], [-53.786013759971233, 48.516780503933617], [-53.086133999226249, 48.687803656603528], [-52.95864824076223, 48.157164211614472], [-52.648098720904173, 47.53554840757549], [-53.069158291218336, 46.655498765644936], [-53.521456264853029, 46.618291734394823], [-54.178935512902527, 46.807065741556997], [-53.961868659060471, 47.625207017601909], [-54.240482143762122, 47.752279364607617], [-55.400773078011483, 46.88499380145312], [-55.997480841685835, 46.919720363953289], [-55.291219041552765, 47.389562486350982], [-56.250798712780508, 47.632545070987383], [-57.325229254777085, 47.572807115257987], [-59.26601518414676, 47.603347886742498], [-59.41949418805369, 47.89945384377485], [-58.796586473207398, 48.251525376979473], [-59.23162451845652, 48.523188381537793], [-58.391804979065213, 49.125580552764163], [-57.358689744686025, 50.718274034215845], [-56.738650071831998, 51.287438259478527], [-55.87097693543528, 51.632094224649187], [-55.406974249886602, 51.588272610065722], [-55.600218268442077, 51.317074693397913], [-56.134035814017111, 50.687009792679298]]], [[[-133.180004041711669, 54.169975490935308], [-132.710007884431292, 54.040009315423518], [-131.749989584003259, 54.120004380909208], [-132.049480347350965, 52.984621487024519], [-131.179042521826574, 52.18043284769827], [-131.577829549822894, 52.182370713909236], [-132.180428426778519, 52.639707139692391], [-132.549992432313843, 53.100014960332132], [-133.054611178755493, 53.411468817755363], [-133.239664482792676, 53.851080227262386], [-133.180004041711669, 54.169975490935308]]], [[[-79.26582, 62.158675], [-79.65752, 61.63308], [-80.09956, 61.7181], [-80.36215, 62.01649], [-80.315395, 62.085565], [-79.92939, 62.3856], [-79.52002, 62.36371], [-79.26582, 62.158675]]], [[[-81.89825, 62.7108], [-83.06857, 62.15922], [-83.77462, 62.18231], [-83.99367, 62.4528], [-83.25048, 62.91409], [-81.87699, 62.90458], [-81.89825, 62.7108]]], [[[-85.161307949549851, 65.657284654392797], [-84.975763719405933, 65.217518215588981], [-84.464012010419495, 65.371772365980163], [-83.88262630891974, 65.109617824963536], [-82.78757687043877, 64.766693020274673], [-81.642013719392509, 64.455135809986942], [-81.553440314444245, 63.979609280037131], [-80.817361212878851, 64.057485663500998], [-80.103451300766594, 63.725981350348597], [-80.991019863595653, 63.41124603947496], [-82.547178107416997, 63.651722317145229], [-83.108797573565042, 64.101875718839707], [-84.100416632813847, 63.569711819098004], [-85.523404710618991, 63.052379055424076], [-85.866768764982339, 63.637252916103542], [-87.221983201836721, 63.541238104905212], [-86.352759772471259, 64.035833238370699], [-86.224886440765133, 64.822916978608262], [-85.883847825854858, 65.738778388117041], [-85.161307949549851, 65.657284654392797]]], [[[-75.86588, 67.14886], [-76.98687, 67.09873], [-77.2364, 67.58809], [-76.81166, 68.14856], [-75.89521, 68.28721], [-75.1145, 68.01036], [-75.10333, 67.58202], [-75.21597, 67.44425], [-75.86588, 67.14886]]], [[[-95.647681203800488, 69.107690358321761], [-96.269521203800579, 68.757040358321731], [-97.61740120380054, 69.060030358321782], [-98.431801203800504, 68.950700358321768], [-99.797401203800504, 69.400030358321786], [-98.917401203800523, 69.710030358321788], [-98.218261203800466, 70.143540358321744], [-97.157401203800532, 69.860030358321794], [-96.557401203800524, 69.680030358321758], [-96.257401203800498, 69.490030358321761], [-95.647681203800488, 69.107690358321761]]], [[[-90.5471, 69.49766], [-90.55151, 68.47499], [-89.21515, 69.25873], [-88.01966, 68.61508], [-88.31749, 67.87338], [-87.35017, 67.19872], [-86.30607, 67.92146], [-85.57664, 68.78456], [-85.52197, 69.88211], [-84.10081, 69.80539], [-82.62258, 69.65826], [-81.28043, 69.16202], [-81.2202, 68.66567], [-81.96436, 68.13253], [-81.25928, 67.59716], [-81.38653, 67.11078], [-83.34456, 66.41154], [-84.73542, 66.2573], [-85.76943, 66.55833], [-86.0676, 66.05625], [-87.03143, 65.21297], [-87.32324, 64.77563], [-88.48296, 64.09897], [-89.91444, 64.03273], [-90.70398, 63.61017], [-90.77004, 62.96021], [-91.93342, 62.83508], [-93.15698, 62.02469], [-94.24153, 60.89865], [-94.62931, 60.11021], [-94.6846, 58.94882], [-93.21502, 58.78212], [-92.76462, 57.84571], [-92.297029999999893, 57.08709], [-90.89769, 57.28468], [-89.03953, 56.85172], [-88.03978, 56.47162], [-87.32421, 55.99914], [-86.07121, 55.72383], [-85.01181, 55.3026], [-83.36055, 55.24489], [-82.27285, 55.14832], [-82.4362, 54.28227], [-82.12502, 53.27703], [-81.40075, 52.15788], [-79.91289, 51.20842], [-79.14301, 51.53393], [-78.60191, 52.56208], [-79.12421, 54.14145], [-79.82958, 54.66772], [-78.22874, 55.13645], [-77.0956, 55.83741], [-76.54137, 56.53423], [-76.62319, 57.20263], [-77.30226, 58.05209], [-78.51688, 58.80458], [-77.33676, 59.85261], [-77.77272, 60.75788], [-78.10687, 62.31964], [-77.41067, 62.55053], [-75.69621, 62.2784], [-74.6682, 62.18111], [-73.83988, 62.4438], [-72.90853, 62.10507], [-71.67708, 61.52535], [-71.37369, 61.13717], [-69.59042, 61.06141], [-69.62033, 60.22125], [-69.2879, 58.95736], [-68.37455, 58.80106], [-67.64976, 58.21206], [-66.20178, 58.76731], [-65.24517, 59.87071], [-64.58352, 60.33558], [-63.80475, 59.4426], [-62.50236, 58.16708], [-61.39655, 56.96745], [-61.79866, 56.33945], [-60.46853, 55.77548], [-59.56962, 55.20407], [-57.97508, 54.94549], [-57.3332, 54.6265], [-56.93689, 53.78032], [-56.15811, 53.64749], [-55.75632, 53.27036], [-55.68338, 52.14664], [-56.40916, 51.7707], [-57.12691, 51.41972], [-58.77482, 51.0643], [-60.03309, 50.24277], [-61.72366, 50.08046], [-63.86251, 50.29099], [-65.36331, 50.2982], [-66.39905, 50.22897], [-67.23631, 49.51156], [-68.51114, 49.06836], [-69.95362, 47.74488], [-71.10458, 46.82171], [-70.25522, 46.98606], [-68.65, 48.3], [-66.55243, 49.1331], [-65.05626, 49.23278], [-64.17099, 48.74248], [-65.11545, 48.07085], [-64.79854, 46.99297], [-64.47219, 46.23849], [-63.17329, 45.73902], [-61.52072, 45.88377], [-60.51815, 47.00793], [-60.4486, 46.28264], [-59.80287, 45.9204], [-61.03988, 45.26525], [-63.25471, 44.67014], [-64.24656, 44.26553], [-65.36406, 43.54523], [-66.1234, 43.61867], [-66.16173, 44.46512], [-64.42549, 45.29204], [-66.02605, 45.25931], [-67.13741, 45.13753], [-67.79134, 45.70281], [-67.79046, 47.06636], [-68.23444, 47.35486], [-68.905, 47.185], [-69.237216, 47.447781], [-69.99997, 46.69307], [-70.305, 45.915], [-70.66, 45.46], [-71.08482, 45.30524], [-71.405, 45.255], [-71.50506, 45.0082], [-73.34783, 45.00738], [-74.867, 45.00048], [-75.31821, 44.81645], [-76.375, 44.09631], [-76.5, 44.018458893758712], [-76.820034145805565, 43.628784288093748], [-77.737885097957687, 43.62905558936329], [-78.720279914042365, 43.625089423184868], [-79.171673550111862, 43.466339423184216], [-79.01, 43.27], [-78.92, 42.965], [-78.939362148743683, 42.863611355148031], [-80.247447679347928, 42.366199856122584], [-81.277746548167144, 42.209025987306845], [-82.439277716791608, 41.675105088867149], [-82.690089280920162, 41.675105088867149], [-83.029810146806909, 41.832795722005834], [-83.141999681312555, 41.975681057292825], [-83.12, 42.08], [-82.9, 42.43], [-82.43, 42.98], [-82.137642381503881, 43.571087551439909], [-82.337763125431053, 44.44], [-82.550924648758169, 45.347516587905368], [-83.592850714843067, 45.816893622412373], [-83.469550747394621, 45.994686387712584], [-83.616130947590563, 46.116926988299056], [-83.890765347005726, 46.116926988299056], [-84.091851264161463, 46.27541860613816], [-84.14211951367335, 46.512225857115723], [-84.3367, 46.40877], [-84.6049, 46.4396], [-84.543748745445853, 46.538684190449132], [-84.779238247399888, 46.637101955749038], [-84.876079881514855, 46.900083319682366], [-85.652363247403414, 47.220218817730498], [-86.461990831228249, 47.553338019392037], [-87.439792623300207, 47.94], [-88.378114183286698, 48.302917588893727], [-89.272917446636654, 48.019808254582657], [-89.6, 48.01], [-90.83, 48.27], [-91.64, 48.14], [-92.61, 48.45], [-93.63087, 48.60926], [-94.32914, 48.67074], [-94.64, 48.84], [-94.81758, 49.38905], [-95.15609, 49.38425], [-95.159069509172014, 49.0], [-97.228720000004799, 49.0007], [-100.65, 49.0], [-104.04826, 48.99986], [-107.05, 49.0], [-110.05, 49.0], [-113.0, 49.0], [-116.04818, 49.0], [-117.03121, 49.0], [-120.0, 49.0], [-122.84, 49.0], [-122.97421, 49.002537777777789], [-124.91024, 49.98456], [-125.62461, 50.41656], [-127.43561, 50.83061], [-127.99276, 51.71583], [-127.85032, 52.32961], [-129.12979, 52.75538], [-129.30523, 53.56159], [-130.51497, 54.28757], [-130.53611, 54.80278], [-129.98, 55.285], [-130.00778, 55.91583], [-131.70781, 56.55212], [-132.73042, 57.69289], [-133.35556, 58.41028], [-134.27111, 58.86111], [-134.945, 59.27056], [-135.47583, 59.78778], [-136.47972, 59.46389], [-137.4525, 58.905], [-138.34089, 59.56211], [-139.039, 60.0], [-140.013, 60.27682], [-140.99778, 60.30639], [-140.9925, 66.00003], [-140.986, 69.712], [-139.12052, 69.47102], [-137.54636, 68.99002], [-136.50358, 68.89804], [-135.62576, 69.31512], [-134.41464, 69.62743], [-132.92925, 69.50534], [-131.43136, 69.94451], [-129.79471, 70.19369], [-129.10773, 69.77927], [-128.36156, 70.01286], [-128.13817, 70.48384], [-127.44712, 70.37721], [-125.75632, 69.48058], [-124.42483, 70.1584], [-124.28968, 69.39969], [-123.06108, 69.56372], [-122.6835, 69.85553], [-121.47226, 69.79778], [-119.94288, 69.37786], [-117.60268, 69.01128], [-116.22643, 68.84151], [-115.2469, 68.90591], [-113.89794, 68.3989], [-115.30489, 67.90261], [-113.49727, 67.68815], [-110.798, 67.80612], [-109.94619, 67.98104], [-108.8802, 67.38144], [-107.79239, 67.88736], [-108.81299, 68.31164], [-108.16721, 68.65392], [-106.95, 68.7], [-106.15, 68.8], [-105.34282, 68.56122], [-104.33791, 68.018], [-103.22115, 68.09775], [-101.45433, 67.64689], [-99.90195, 67.80566], [-98.4432, 67.78165], [-98.5586, 68.40394], [-97.66948, 68.57864], [-96.11991, 68.23939], [-96.12588, 67.29338], [-95.48943, 68.0907], [-94.685, 68.06383], [-94.23282, 69.06903], [-95.30408, 69.68571], [-96.47131, 70.08976], [-96.39115, 71.19482], [-95.2088, 71.92053], [-93.88997, 71.76015], [-92.87818, 71.31869], [-91.51964, 70.19129], [-92.40692, 69.69997], [-90.5471, 69.49766]]], [[[-114.167169999999871, 73.12145], [-114.66634, 72.65277], [-112.441019999999867, 72.9554], [-111.05039, 72.4504], [-109.920349999999857, 72.96113], [-109.00654, 72.63335], [-108.188349999999886, 71.65089], [-107.68599, 72.06548], [-108.39639, 73.08953], [-107.51645, 73.23598], [-106.522589999999866, 73.07601], [-105.402459999999877, 72.67259], [-104.77484, 71.6984], [-104.464759999999814, 70.99297], [-102.78537, 70.49776], [-100.980779999999868, 70.02432], [-101.089289999999892, 69.58447000000011], [-102.731159999999875, 69.50402], [-102.09329, 69.11962], [-102.43024, 68.75282], [-104.24, 68.91], [-105.96, 69.180000000000135], [-107.12254, 69.11922], [-108.999999999999872, 68.78], [-111.534148875200117, 68.630059156817921], [-113.3132, 68.53554], [-113.854959999999807, 69.007440000000102], [-115.22, 69.28], [-116.10794, 69.16821], [-117.34, 69.960000000000107], [-116.674729999999869, 70.06655], [-115.13112, 70.2373], [-113.72141, 70.19237], [-112.4161, 70.36638], [-114.35, 70.6], [-116.48684, 70.52045], [-117.9048, 70.540560000000127], [-118.43238, 70.9092], [-116.11311, 71.30918], [-117.65568, 71.2952], [-119.40199, 71.55859], [-118.56267, 72.30785], [-117.866419999999877, 72.70594], [-115.18909, 73.314590000000109], [-114.167169999999871, 73.12145]]], [[[-104.5, 73.42], [-105.38, 72.76], [-106.94, 73.46], [-106.6, 73.6], [-105.26, 73.64], [-104.5, 73.42]]], [[[-76.34, 73.102684989953005], [-76.251403808593736, 72.826385498046861], [-77.314437866210895, 72.85554504394527], [-78.391670227050795, 72.876655578613253], [-79.486251831054645, 72.742202758789062], [-79.775833129882827, 72.80290222167973], [-80.876098632812514, 73.333183288574205], [-80.833885192871051, 73.693183898925767], [-80.353057861328111, 73.75971984863277], [-78.064437866210923, 73.651931762695327], [-76.34, 73.102684989953005]]], [[[-86.562178514334107, 73.157447007938444], [-85.774371304044521, 72.534125881633798], [-84.850112474288224, 73.34027822538711], [-82.315590176100969, 73.750950832810574], [-80.600087653307611, 72.716543687624181], [-80.748941616524391, 72.061906643350753], [-78.770638597310764, 72.352173163534147], [-77.824623989559569, 72.749616604291035], [-75.605844692675717, 72.243678493937381], [-74.228616095664975, 71.767144273557889], [-74.099140794557698, 71.330840155717638], [-72.242225714797641, 71.556924546994495], [-71.200015428335192, 70.920012518997211], [-68.78605424668487, 70.525023708774242], [-67.914970465756923, 70.121947536897594], [-66.969033372654152, 69.18608734809186], [-68.805122850200533, 68.720198472764409], [-66.449866095633851, 68.067163397892003], [-64.862314419195215, 67.847538560651614], [-63.424934454996745, 66.928473212340649], [-61.851981370680569, 66.862120673277829], [-62.163176845942296, 66.160251369889593], [-63.91844438338417, 64.998668524832837], [-65.148860236253611, 65.426032619886669], [-66.72121904159853, 66.388041083432185], [-68.015016038673949, 66.262725735124391], [-68.141287400979152, 65.689789130304362], [-67.089646165623392, 65.108455105236985], [-65.732080451099748, 64.64840566675862], [-65.320167609301265, 64.382737128346051], [-64.669406297449669, 63.392926744227474], [-65.013803880458894, 62.674185085695974], [-66.275044725190455, 62.945098781986069], [-68.783186204692711, 63.745670071051805], [-67.369680752213029, 62.883965562584869], [-66.328297288667201, 62.28007477482204], [-66.165568203380147, 61.930897121825879], [-68.877366502544632, 62.330149237712803], [-71.023437059193824, 62.910708116295829], [-72.23537858751898, 63.397836005295154], [-71.886278449171286, 63.679989325608837], [-73.37830624051837, 64.193963121183813], [-74.834418911422588, 64.679075629323776], [-74.818502570276706, 64.389093329517962], [-77.709979824520019, 64.229542344816778], [-78.55594885935416, 64.572906399180127], [-77.897281053361908, 65.309192206474776], [-76.018274298797181, 65.326968899183143], [-73.95979529488271, 65.454764716240888], [-74.293883429649625, 65.81177134872938], [-73.94491248238262, 66.310578111426722], [-72.65116716173938, 67.284575507263853], [-72.926059943316076, 67.726925767682374], [-73.311617804645721, 68.069437160912898], [-74.8433072577768, 68.554627183701271], [-76.869100918266739, 68.894735622830254], [-76.228649054657339, 69.147769273547411], [-77.28736996123709, 69.769540106883269], [-78.168633999326588, 69.826487535268896], [-78.95724219431672, 70.166880194775402], [-79.492455003563649, 69.871807766388898], [-81.305470954091732, 69.743185126414332], [-84.944706183598456, 69.966634019644388], [-87.060003424817864, 70.260001125765356], [-88.681713223001495, 70.410741278760796], [-89.513419562523012, 70.762037665480975], [-88.467721116880753, 71.218185533321318], [-89.888151211287465, 71.222552191849942], [-90.205160285181989, 72.235074367960792], [-89.43657670770493, 73.129464219852352], [-88.408241543312784, 73.537888902471209], [-85.826151089200906, 73.803815823045213], [-86.562178514334107, 73.157447007938444]]], [[[-100.35642, 73.84389], [-99.16387, 73.63339], [-97.38, 73.76], [-97.12, 73.47], [-98.05359, 72.99052], [-96.54, 72.56], [-96.72, 71.66], [-98.35966, 71.27285], [-99.32286, 71.35639], [-100.01482, 71.73827], [-102.5, 72.51], [-102.48, 72.83], [-100.43836, 72.70588], [-101.54, 73.36], [-100.35642, 73.84389]]], [[[-93.196295539100205, 72.771992499473342], [-94.26904659704725, 72.024596259235949], [-95.409855516322637, 72.061880805134578], [-96.033745083382428, 72.940276801231789], [-96.01826799191096, 73.437429918095788], [-95.495793423224001, 73.862416897264154], [-94.503657599652328, 74.134906724739196], [-92.420012173211745, 74.100025132942179], [-90.509792853542578, 73.85673248971203], [-92.003965216829869, 72.966244208458477], [-93.196295539100205, 72.771992499473342]]], [[[-120.46, 71.383601793087578], [-123.09219, 70.90164], [-123.62, 71.34], [-125.92894873747332, 71.868688463011395], [-125.499999999999872, 72.292260811795003], [-124.80729, 73.02256], [-123.94, 73.680000000000135], [-124.917749999999899, 74.292750000000112], [-121.53788, 74.44893], [-120.10978, 74.24135], [-117.55564, 74.18577], [-116.58442, 73.89607], [-115.51081, 73.47519], [-116.767939999999882, 73.22292], [-119.22, 72.52], [-120.46, 71.82], [-120.46, 71.383601793087578]]], [[[-93.612755906940464, 74.979997260224437], [-94.156908738973812, 74.59234650338685], [-95.60868058956558, 74.666863918751758], [-96.820932176484561, 74.927623196096576], [-96.288587409229791, 75.377828274223333], [-94.850819871789113, 75.647217515760886], [-93.977746548217908, 75.296489569795952], [-93.612755906940464, 74.979997260224437]]], [[[-98.5, 76.72], [-97.735585, 76.25656], [-97.704415, 75.74344], [-98.16, 75.0], [-99.80874, 74.89744], [-100.88366, 75.05736], [-100.86292, 75.64075], [-102.50209, 75.5638], [-102.56552, 76.3366], [-101.48973, 76.30537], [-99.98349, 76.64634], [-98.57699, 76.58859], [-98.5, 76.72]]], [[[-108.21141, 76.20168], [-107.81943, 75.84552], [-106.92893, 76.01282], [-105.881, 75.9694], [-105.70498, 75.47951], [-106.31347, 75.00527], [-109.7, 74.85], [-112.22307, 74.41696], [-113.74381, 74.39427], [-113.87135, 74.72029], [-111.79421, 75.1625], [-116.31221, 75.04343], [-117.7104, 75.2222], [-116.34602, 76.19903], [-115.40487, 76.47887], [-112.59056, 76.14134], [-110.81422, 75.54919], [-109.0671, 75.47321], [-110.49726, 76.42982], [-109.5811, 76.79417], [-108.54859, 76.67832], [-108.21141, 76.20168]]], [[[-94.684085862999439, 77.097878323058367], [-93.573921068073105, 76.776295884906062], [-91.605023159536586, 76.778517971494594], [-90.741845872749209, 76.449597479956807], [-90.969661424507976, 76.074013170059445], [-89.822237921899244, 75.847773749485626], [-89.187082892599776, 75.610165513807615], [-87.838276333349611, 75.566188869927217], [-86.379192267588664, 75.482421373182163], [-84.789625210290595, 75.699204006646497], [-82.753444586910049, 75.784315090631225], [-81.12853084992436, 75.713983466282016], [-80.05751095245914, 75.336848863415867], [-79.833932868148324, 74.923127346487192], [-80.457770758775823, 74.657303778777774], [-81.948842536125511, 74.442459011524321], [-83.2288936022114, 74.564027818490928], [-86.097452358733292, 74.410032050261137], [-88.150350307960196, 74.392307033984977], [-89.764722052758358, 74.515555325001117], [-92.422440965529418, 74.837757880340973], [-92.768285488642789, 75.38681997344213], [-92.889905972041717, 75.882655341282629], [-93.893824022175977, 76.319243679500516], [-95.962457445035795, 76.44138092722244], [-97.121378953829463, 76.751077785947587], [-96.745122850312342, 77.161388658345132], [-94.684085862999439, 77.097878323058367]]], [[[-116.198586595507322, 77.645286770326194], [-116.335813361458349, 76.876961575010554], [-117.106050584768766, 76.530031846819114], [-118.040412157038119, 76.481171780087081], [-119.899317586885687, 76.053213406061971], [-121.499995077126471, 75.900018622532784], [-122.85492448615895, 76.116542873835684], [-122.854925293603188, 76.116542873835684], [-121.157535360328239, 76.864507554828336], [-119.103938971821023, 77.512219957174608], [-117.570130784965954, 77.498318996888102], [-116.198586595507322, 77.645286770326194]]], [[[-93.840003017943971, 77.51999726023449], [-94.295608283245244, 77.491342678528682], [-96.169654100310055, 77.55511139597688], [-96.436304490936109, 77.83462921824362], [-94.422577277386353, 77.820004787904978], [-93.720656297565867, 77.634331366680314], [-93.840003017943971, 77.51999726023449]]], [[[-110.186938035912945, 77.697014879050286], [-112.051191169058455, 77.409228827616843], [-113.534278937619035, 77.732206529441143], [-112.724586758253835, 78.051050116681935], [-111.264443325630822, 78.152956041161545], [-109.854451870547067, 77.996324774884812], [-110.186938035912945, 77.697014879050286]]], [[[-109.663145718202557, 78.601972561345676], [-110.88131425661885, 78.406919867659994], [-112.542091437615142, 78.407901719873493], [-112.525890876091566, 78.550554511215225], [-111.500010342233367, 78.849993598130538], [-110.96366065147599, 78.804440823065207], [-109.663145718202557, 78.601972561345676]]], [[[-95.830294969449312, 78.056941229963243], [-97.309842902397975, 77.85059723582178], [-98.124289313533964, 78.082856960757567], [-98.55286780474664, 78.458105373845086], [-98.631984422585504, 78.871930243638374], [-97.337231411512604, 78.831984361476756], [-96.754398769908761, 78.765812689926989], [-95.559277920294562, 78.41831452098026], [-95.830294969449312, 78.056941229963243]]], [[[-100.060191820052111, 78.324754340315891], [-99.670939093813601, 77.907544664207393], [-101.303940192452984, 78.018984890444798], [-102.949808722733025, 78.343228664860206], [-105.176132778731514, 78.38033234324574], [-104.210429450277147, 78.677420152491777], [-105.419580451258511, 78.918335679836431], [-105.492289191493128, 79.301593939929177], [-103.529282396237917, 79.16534902619162], [-100.8251580472688, 78.80046173777869], [-100.060191820052111, 78.324754340315891]]], [[[-87.02, 79.66], [-85.81435, 79.3369], [-87.18756, 79.0393], [-89.03535, 78.28723], [-90.80436, 78.21533], [-92.87669, 78.34333], [-93.95116, 78.75099], [-93.93574, 79.11373], [-93.14524, 79.3801], [-94.974, 79.37248], [-96.07614, 79.70502], [-96.70972, 80.15777], [-96.01644, 80.60233], [-95.32345, 80.90729], [-94.29843, 80.97727], [-94.73542, 81.20646], [-92.40984, 81.25739], [-91.13289, 80.72345], [-89.45, 80.509322033898258], [-87.81, 80.32], [-87.02, 79.66]]], [[[-68.5, 83.106321516765732], [-65.82735, 83.02801], [-63.68, 82.9], [-61.85, 82.6286], [-61.89388, 82.36165], [-64.334, 81.92775], [-66.75342, 81.72527], [-67.65755, 81.50141], [-65.48031, 81.50657], [-67.84, 80.9], [-69.4697, 80.61683], [-71.18, 79.8], [-73.2428, 79.63415], [-73.88, 79.430162204802073], [-76.90773, 79.32309], [-75.52924, 79.19766], [-76.22046, 79.01907], [-75.39345, 78.52581], [-76.34354, 78.18296], [-77.88851, 77.89991], [-78.36269, 77.50859], [-79.75951, 77.20968], [-79.61965, 76.98336], [-77.91089, 77.022045], [-77.88911, 76.777955], [-80.56125, 76.17812], [-83.17439, 76.45403], [-86.11184, 76.29901], [-87.6, 76.42], [-89.49068, 76.47239], [-89.6161, 76.95213], [-87.76739, 77.17833], [-88.26, 77.9], [-87.65, 77.970222222222205], [-84.97634, 77.53873], [-86.34, 78.18], [-87.96192, 78.37181], [-87.15198, 78.75867], [-85.37868, 78.9969], [-85.09495, 79.34543], [-86.50734, 79.73624], [-86.93179, 80.25145], [-84.19844, 80.20836], [-83.408695652173819, 80.1], [-81.84823, 80.46442], [-84.1, 80.58], [-87.59895, 80.51627], [-89.36663, 80.85569], [-90.2, 81.26], [-91.36786, 81.5531], [-91.58702, 81.89429], [-90.1, 82.085], [-88.93227, 82.11751], [-86.97024, 82.27961], [-85.5, 82.652273458057024], [-84.260005, 82.6], [-83.18, 82.32], [-82.42, 82.86], [-81.1, 83.02], [-79.30664, 83.13056], [-76.25, 83.172058823529369], [-75.71878, 83.06404], [-72.83153, 83.23324], [-70.665765, 83.169780758382828], [-68.5, 83.106321516765732]]]] } }, - { "type": "Feature", "properties": { "admin": "Switzerland", "name": "Switzerland", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[9.594226108446346, 47.525058091820256], [9.632931756232974, 47.347601223329974], [9.479969516649019, 47.102809963563367], [9.932448357796657, 46.920728054382948], [10.442701450246627, 46.893546250997424], [10.36337812667861, 46.483571275409851], [9.922836541390378, 46.314899400409182], [9.182881707403054, 46.440214748716976], [8.966305779667804, 46.036931871111186], [8.489952426801322, 46.005150865251672], [8.316629672894377, 46.163642483090847], [7.755992058959832, 45.824490057959302], [7.273850945676655, 45.776947740250769], [6.843592970414504, 45.991146552100595], [6.500099724970424, 46.429672756529428], [6.022609490593537, 46.272989813820466], [6.037388950229, 46.725778713561859], [6.768713820023605, 47.287708238303686], [6.736571079138058, 47.541801255882838], [7.192202182655505, 47.449765529971003], [7.466759067422228, 47.620581976911794], [8.31730146651415, 47.613579820336255], [8.522611932009765, 47.830827541691285], [9.594226108446346, 47.525058091820256]]] } }, - { "type": "Feature", "properties": { "admin": "Chile", "name": "Chile", "continent": "South America" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-68.634010227583147, -52.636370458874353], [-68.633349999999879, -54.8695], [-67.56244, -54.87001], [-66.95992, -54.89681], [-67.291029999999878, -55.30124], [-68.148629999999841, -55.61183], [-68.639990810811796, -55.580017999086877], [-69.2321, -55.49906], [-69.95809, -55.19843], [-71.00568, -55.05383], [-72.2639, -54.49514], [-73.2852, -53.957519999999874], [-74.66253, -52.83749], [-73.8381, -53.04743], [-72.43418, -53.7154], [-71.10773, -54.07433], [-70.591779999999787, -53.61583], [-70.26748, -52.93123], [-69.345649999999878, -52.5183], [-68.634010227583147, -52.636370458874353]]], [[[-68.219913092711224, -21.49434661223183], [-67.828179897722634, -22.872918796482178], [-67.106673550063604, -22.735924574476392], [-66.985233934177629, -22.986348565362825], [-67.328442959244128, -24.025303236590908], [-68.417652960876111, -24.518554782816874], [-68.386001146097342, -26.185016371365229], [-68.594799770772667, -26.50690886811126], [-68.295541551370391, -26.899339694935787], [-69.001234910748266, -27.521213881136127], [-69.656130337183143, -28.459141127233686], [-70.013550381129861, -29.367922865518544], [-69.919008348251921, -30.336339206668306], [-70.535068935819439, -31.365010267870279], [-70.074399380153622, -33.09120981214803], [-69.814776984319209, -33.273886000299839], [-69.817309129501453, -34.193571465798279], [-70.388049485949082, -35.169687595359441], [-70.364769253201658, -36.005088799789931], [-71.121880662709771, -36.65812387466233], [-71.118625047475419, -37.576827487947192], [-70.814664272734703, -38.552995293940732], [-71.413516608349042, -38.916022230791107], [-71.680761277946445, -39.808164157878061], [-71.915734015577542, -40.832339369470716], [-71.746803758415453, -42.051386407235988], [-72.148898078078517, -42.254888197601375], [-71.915423956983901, -43.408564548517404], [-71.464056159130493, -43.787611179378324], [-71.793622606071935, -44.207172133156099], [-71.329800788036195, -44.407521661151677], [-71.222778896759721, -44.784242852559409], [-71.659315558545316, -44.973688653341434], [-71.552009446891233, -45.560732924177117], [-71.917258470330196, -46.884838148791786], [-72.44735531278026, -47.738532810253517], [-72.331160854771937, -48.244238376661819], [-72.648247443314929, -48.878618259476774], [-73.415435757120022, -49.318436374712952], [-73.328050910114456, -50.378785088909865], [-72.975746832964617, -50.741450290734299], [-72.309973517532342, -50.677009779666342], [-72.329403856074023, -51.425956312872394], [-71.914803839796321, -52.009022305865912], [-69.498362189396076, -52.142760912637236], [-68.571545376241332, -52.299443855346247], [-69.461284349226617, -52.291950772663924], [-69.94277950710611, -52.537930590373243], [-70.8451016913545, -52.899200528525711], [-71.006332160105217, -53.833252042201345], [-71.429794684520928, -53.856454760300373], [-72.557942877884855, -53.531410001184447], [-73.702756720662862, -52.835069268607249], [-73.702756720662862, -52.835070076051487], [-74.946763475225154, -52.262753588419017], [-75.260026007778507, -51.62935475037321], [-74.976632453089806, -51.043395684615675], [-75.47975419788348, -50.378371677451547], [-75.608015102831942, -48.673772881871784], [-75.182769741502128, -47.711919447623153], [-74.126580980104677, -46.939253431995084], [-75.644395311165439, -46.647643324572016], [-74.69215369332305, -45.76397633238097], [-74.351709357384252, -44.10304412208788], [-73.240356004515192, -44.454960625995611], [-72.717803921179765, -42.383355808278985], [-73.388899909138232, -42.117532240569567], [-73.701335618774834, -43.365776462579738], [-74.33194312203257, -43.224958184584395], [-74.017957119427152, -41.794812920906828], [-73.677099372029943, -39.942212823243111], [-73.217592536090663, -39.258688653318508], [-73.505559455037044, -38.282882582351064], [-73.588060879191076, -37.156284681956016], [-73.166717088499283, -37.123780206044351], [-72.553136969681717, -35.508840020491022], [-71.861732143832555, -33.909092706031522], [-71.438450486929895, -32.418899428030819], [-71.668720669222424, -30.920644626592516], [-71.370082567007714, -30.095682061484997], [-71.48989437527645, -28.861442152625909], [-70.905123867461569, -27.640379734001193], [-70.724953986275963, -25.705924167587209], [-70.403965827095035, -23.628996677344542], [-70.091245897080668, -21.393319187101223], [-70.164419725205974, -19.756468194256183], [-70.372572394477714, -18.347975355708879], [-69.858443569605797, -18.092693780187027], [-69.590423753523979, -17.580011895419286], [-69.100246955019401, -18.260125420812653], [-68.966818406841824, -18.981683444904089], [-68.442225104430918, -19.405068454671419], [-68.757167121033703, -20.37265797290447], [-68.219913092711224, -21.49434661223183]]]] } }, - { "type": "Feature", "properties": { "admin": "China", "name": "China", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[110.339187860151526, 18.678395087147603], [109.475209588663702, 18.19770091396861], [108.655207961056135, 18.507681993071397], [108.626217482540426, 19.367887885001974], [109.119055617308007, 19.821038519769385], [110.211598748822837, 20.101253973872073], [110.786550734502228, 20.077534491450077], [111.01005130416462, 19.695929877190732], [110.570646600386794, 19.255879218009305], [110.339187860151526, 18.678395087147603]]], [[[127.657407261262378, 49.760270494172929], [129.397817824420429, 49.440600084015429], [130.58229332898236, 48.729687404976112], [130.987281528853828, 47.790132351261391], [132.506671991099495, 47.788969631534876], [133.373595819228001, 48.183441677434914], [135.026311476786702, 48.478229885443902], [134.500813836810607, 47.578439846377833], [134.112362095272601, 47.212467352886719], [133.76964399631288, 46.116926988299056], [133.097126906466428, 45.14406647397216], [131.883454217659562, 45.32116160743643], [131.025212030156069, 44.967953192721573], [131.288555129115537, 44.111519680348252], [131.144687941614848, 42.929989732426932], [130.633866408409801, 42.903014634770543], [130.640015903852429, 42.39500946712527], [129.994267205933227, 42.985386867843793], [129.596668735879462, 42.424981797854592], [128.05221520397231, 41.994284572917984], [128.208433058790717, 41.466771552082534], [127.343782993683021, 41.503151760415953], [126.869083286649854, 41.816569322266155], [126.18204511932943, 41.107336127276362], [125.079941847840587, 40.569823716792449], [124.265624627785314, 39.928493353834135], [122.86757042856101, 39.637787583976255], [122.131387974130917, 39.170451768544623], [121.054554478032856, 38.89747101496291], [121.585994907722466, 39.360853583324136], [121.376757033372641, 39.750261338859524], [122.168595005381007, 40.422442531896046], [121.640358514493528, 40.946389878903304], [120.768628778161954, 40.593388169917596], [119.639602085449056, 39.898055935214209], [119.023463983233015, 39.252333075511096], [118.042748651197897, 39.204273993479674], [117.532702264477052, 38.73763580988409], [118.05969852098967, 38.061475531561051], [118.878149855628351, 37.897325344385898], [118.911636183753501, 37.448463853498723], [119.702802362142037, 37.156388658185072], [120.823457472823648, 37.870427761377968], [121.711258579597938, 37.481123358707165], [122.357937453298462, 37.454484157860684], [122.519994744965814, 36.930614325501828], [121.104163853033029, 36.651329047180432], [120.63700890511457, 36.111439520811125], [119.66456180224607, 35.609790554337728], [119.151208123858567, 34.909859117160458], [120.227524855633717, 34.360331936168613], [120.620369093916565, 33.37672272392512], [121.229014113450219, 32.460318711877186], [121.908145786630044, 31.692174384074683], [121.891919386890336, 30.949351508095098], [121.264257440273298, 30.676267401648712], [121.503519321784722, 30.14291494396425], [122.092113885589086, 29.832520453403156], [121.93842817595305, 29.018022365834803], [121.684438511238469, 28.225512600206677], [121.125661248866436, 28.135673122667178], [120.395473260582307, 27.053206895449385], [119.585496860839555, 25.740780544532605], [118.656871372554519, 24.547390855400234], [117.281606479970833, 23.624501451099714], [115.890735304835118, 22.782873236578094], [114.763827345846209, 22.668074042241663], [114.152546828265656, 22.223760077396204], [113.806779819800752, 22.548339748621423], [113.241077915501592, 22.051367499270462], [111.843592157032447, 21.550493679281512], [110.78546552942413, 21.39714386645533], [110.444039341271662, 20.34103261970639], [109.88986128137357, 20.282457383703441], [109.627655063924635, 21.008227037026725], [109.864488153118316, 21.395050970947516], [108.522812941524421, 21.715212307211821], [108.050180291782979, 21.552379869060101], [107.043420037872636, 21.8118989120299], [106.567273390735352, 22.21820486092474], [106.725403273548466, 22.794267889898375], [105.811247186305209, 22.976892401617899], [105.329209425886631, 23.352063300056976], [104.476858351664475, 22.819150092046918], [103.504514601660503, 22.703756618739217], [102.706992222100155, 22.708795070887696], [102.170435825613552, 22.464753119389336], [101.652017856861576, 22.318198757409554], [101.803119744882906, 21.174366766845051], [101.27002566936001, 21.201651923095167], [101.180005324307558, 21.436572984294052], [101.150032993578236, 21.849984442629015], [100.416537713627349, 21.558839423096654], [99.983489211021549, 21.742936713136451], [99.240898878987196, 22.118314317304559], [99.53199222208741, 22.949038804612591], [98.898749220782804, 23.142722072842581], [98.66026248575578, 24.063286037690002], [97.604719679762027, 23.897404690033049], [97.724609002679131, 25.083637193293036], [98.671838006589212, 25.91870250091349], [98.712093947344556, 26.743535874940243], [98.682690057370507, 27.508812160750658], [98.246230910233351, 27.747221381129172], [97.91198774616943, 28.335945136014367], [97.327113885490007, 28.261582749946339], [96.248833449287829, 28.411030992134467], [96.586590610747521, 28.830979519154361], [96.117678664131006, 29.452802028922513], [95.404802280664626, 29.031716620392157], [94.565990431702929, 29.27743805593996], [93.413347609432662, 28.640629380807233], [92.503118931043616, 27.896876329046442], [91.696656528696693, 27.771741848251615], [91.258853794319876, 28.040614325466343], [90.730513950567797, 28.064953925075738], [90.015828891971182, 28.296438503527177], [89.475810174521158, 28.042758897406365], [88.814248488320573, 27.299315904239389], [88.730325962278528, 28.086864732367552], [88.120440708369941, 27.876541652939572], [86.954517043000635, 27.974261786403524], [85.823319940131526, 28.203575954698742], [85.011638218123053, 28.642773952747369], [84.23457970575015, 28.839893703724691], [83.89899295444674, 29.320226141877633], [83.337115106137176, 29.463731594352193], [82.327512648450877, 30.115268052688204], [81.525804477874786, 30.422716986608659], [81.111256138029276, 30.183480943313402], [79.721366815107118, 30.882714748654728], [78.738894484374001, 31.515906073527045], [78.458446486326025, 32.61816437431272], [79.176128777995544, 32.483779812137747], [79.208891636068543, 32.994394639613738], [78.811086460285722, 33.506198025032397], [78.912268914713209, 34.321936346975768], [77.83745079947461, 35.494009507787794], [76.192848341785705, 35.89840342868785], [75.896897414050173, 36.666806138651872], [75.158027785140987, 37.133030910789152], [74.980002475895404, 37.419990139305888], [74.829985792952144, 37.990007025701445], [74.864815708316783, 38.378846340481587], [74.25751427602269, 38.606506862943476], [73.928852166646394, 38.505815334622717], [73.675379266254836, 39.431236884105566], [73.960013055318427, 39.660008449861714], [73.822243686828315, 39.893973497063136], [74.776862420556043, 40.366425279291619], [75.467827996730719, 40.56207225194867], [76.526368035797432, 40.427946071935132], [76.90448449087711, 41.066485907549648], [78.187196893226044, 41.185315863604799], [78.543660923175253, 41.582242540038713], [80.119430373051401, 42.12394074153822], [80.259990268885318, 42.34999929459908], [80.180150180994374, 42.920067857426844], [80.866206496101213, 43.180362046881008], [79.966106398441426, 44.917516994804622], [81.947070753918084, 45.317027492853143], [82.458925815769035, 45.539649563166499], [83.180483839860543, 47.330031236350735], [85.164290399113213, 47.000955715516099], [85.720483839870667, 47.452969468773077], [85.76823286330837, 48.455750637396896], [86.59877648310335, 48.549181626980605], [87.359970330762692, 49.214980780629148], [87.751264276076668, 49.297197984405464], [88.013832228551678, 48.599462795600594], [88.854297723346747, 48.069081732773007], [90.280825636763893, 47.693549099307901], [90.970809360724957, 46.88814606382293], [90.585768263718307, 45.719716091487491], [90.945539585334316, 45.286073309910243], [92.133890822318222, 45.115075995456429], [93.480733677141316, 44.97547211362], [94.688928664125356, 44.352331854828456], [95.306875441471504, 44.241330878265458], [95.762454868556688, 43.319449164394619], [96.349395786527808, 42.725635280928643], [97.451757440177971, 42.74888967546007], [99.515817498779995, 42.524691473961688], [100.845865513108279, 42.663804429691417], [101.833040399179936, 42.51487295182627], [103.312278273534787, 41.907468166667613], [104.522281935649005, 41.90834666601662], [104.964993931093431, 41.597409572916334], [106.129315627061658, 42.134327704428891], [107.744772576937976, 42.481515814781908], [109.243595819131428, 42.519446316084149], [110.412103306115299, 42.871233628911014], [111.129682244920218, 43.406834011400171], [111.82958784388137, 43.743118394539486], [111.667737257943202, 44.073175767587706], [111.348376906379428, 44.457441718110047], [111.87330610560025, 45.102079372735112], [112.436062453258842, 45.01164561622425], [113.463906691544196, 44.808893134127111], [114.46033165899604, 45.339816799493875], [115.985096470200133, 45.727235012386004], [116.717868280098855, 46.38820241961524], [117.421701287914246, 46.67273285581421], [118.874325799638711, 46.805412095723646], [119.663269891438745, 46.692679958678944], [119.772823927897562, 47.048058783550132], [118.866574334794947, 47.747060044946195], [118.064142694166719, 48.06673045510373], [117.295507440257438, 47.697709052107385], [116.308952671373234, 47.853410142602812], [115.742837355615734, 47.726544501326273], [115.485282017073018, 48.135382595403442], [116.191802199367601, 49.134598090199056], [116.67880089728618, 49.888531399121398], [117.879244419426371, 49.510983384796944], [119.288460728025839, 50.142882798862033], [119.279365675942358, 50.582907619827282], [120.182049595216924, 51.64356639261802], [120.738191359541972, 51.964115302124547], [120.725789015791975, 52.516226304730814], [120.177088657716865, 52.753886216841195], [121.003084751470226, 53.251401068731226], [122.245747918792858, 53.431725979213681], [123.571506789240843, 53.458804429734627], [125.068211297710434, 53.161044826868832], [125.946348911646169, 52.792798570356936], [126.564399041856959, 51.784255479532689], [126.939156528837657, 51.353894151405896], [127.287455682484904, 50.739797268265434], [127.657407261262378, 49.760270494172929]]]] } }, - { "type": "Feature", "properties": { "admin": "Ivory Coast", "name": "Côte d'Ivoire", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-2.856125047202397, 4.994475816259508], [-3.311084357100071, 4.984295559098014], [-4.008819545904941, 5.179813340674314], [-4.64991736491791, 5.168263658057084], [-5.834496222344525, 4.993700669775135], [-6.528769090185845, 4.705087795425015], [-7.518941209330434, 4.338288479017307], [-7.712159389669749, 4.364565944837721], [-7.63536821128403, 5.188159084489455], [-7.53971513511176, 5.313345241716517], [-7.570152553731686, 5.707352199725903], [-7.993692592795879, 6.126189683451541], [-8.311347622094017, 6.193033148621081], [-8.602880214868618, 6.467564195171659], [-8.385451626000572, 6.911800645368742], [-8.485445522485348, 7.395207831243068], [-8.439298468448696, 7.686042792181736], [-8.280703497744936, 7.687179673692156], [-8.221792364932197, 8.123328762235571], [-8.299048631208562, 8.316443589710302], [-8.203498907900878, 8.455453192575446], [-7.832100389019186, 8.575704250518625], [-8.079113735374348, 9.376223863152033], [-8.309616461612249, 9.789531968622439], [-8.22933712404682, 10.129020290563897], [-8.029943610048617, 10.206534939001711], [-7.89958980959237, 10.297382106970824], [-7.622759161804808, 10.147236232946792], [-6.850506557635057, 10.138993841996237], [-6.666460944027547, 10.430810655148447], [-6.493965013037267, 10.411302801958268], [-6.205222947606429, 10.524060777219132], [-6.050452032892266, 10.096360785355442], [-5.816926235365286, 10.222554633012191], [-5.404341599946973, 10.370736802609144], [-4.954653286143098, 10.152713934769732], [-4.779883592131966, 9.821984768101741], [-4.330246954760383, 9.610834865757139], [-3.980449184576684, 9.862344061721698], [-3.511898972986272, 9.900326239456216], [-2.827496303712706, 9.642460842319775], [-2.56218950032624, 8.219627793811481], [-2.983584967450326, 7.379704901555511], [-3.244370083011261, 6.2504715031135], [-2.810701463217839, 5.389051215024109], [-2.856125047202397, 4.994475816259508]]] } }, - { "type": "Feature", "properties": { "admin": "Cameroon", "name": "Cameroon", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[13.07582238124675, 2.267097072759014], [12.951333855855605, 2.321615708826939], [12.359380323952218, 2.19281220133945], [11.751665480199787, 2.326757513839993], [11.276449008843711, 2.261050930180871], [9.649158155972627, 2.283866075037735], [9.795195753629455, 3.073404445809117], [9.404366896205998, 3.734526882335202], [8.948115675501068, 3.904128933117135], [8.744923943729416, 4.352215277519959], [8.488815545290889, 4.495617377129917], [8.500287713259693, 4.771982937026847], [8.757532993208626, 5.47966583904791], [9.233162876023043, 6.444490668153334], [9.522705926154398, 6.453482367372116], [10.118276808318255, 7.038769639509879], [10.497375115611417, 7.055357774275562], [11.058787876030349, 6.644426784690593], [11.745774366918509, 6.981382961449753], [11.839308709366801, 7.397042344589434], [12.063946160539556, 7.799808457872301], [12.218872104550597, 8.305824082874322], [12.753671502339214, 8.717762762888993], [12.955467970438971, 9.417771714714702], [13.1675997249971, 9.64062632897341], [13.308676385153914, 10.160362046748926], [13.572949659894558, 10.798565985553564], [14.415378859116682, 11.572368882692071], [14.468192172918974, 11.90475169519341], [14.57717776862253, 12.085360826053501], [14.181336297266792, 12.483656927943112], [14.213530714584634, 12.802035427293344], [14.495787387762842, 12.859396267137326], [14.893385857816522, 12.219047756392582], [14.960151808337598, 11.555574042197222], [14.923564894274955, 10.891325181517471], [15.467872755605269, 9.982336737503429], [14.909353875394713, 9.99212942142273], [14.627200555081057, 9.920919297724536], [14.171466098699025, 10.021378282099928], [13.954218377344002, 9.549494940626685], [14.544466586981766, 8.965861314322266], [14.979995558337688, 8.796104234243471], [15.120865512765331, 8.382150173369423], [15.436091749745765, 7.692812404811971], [15.279460483469107, 7.421924546737968], [14.776545444404572, 6.408498033062044], [14.536560092841111, 6.22695872642069], [14.459407179429345, 5.451760565610299], [14.558935988023501, 5.03059764243153], [14.478372430080466, 4.732605495620446], [14.950953403389658, 4.21038930909492], [15.036219516671249, 3.851367295747123], [15.405395948964379, 3.335300604664339], [15.862732374747479, 3.013537298998982], [15.907380812247649, 2.557389431158612], [16.01285241055535, 2.267639675298084], [15.940918816805061, 1.727672634280295], [15.14634199388524, 1.964014797367184], [14.337812534246577, 2.22787466064949], [13.07582238124675, 2.267097072759014]]] } }, - { "type": "Feature", "properties": { "admin": "Democratic Republic of the Congo", "name": "Dem. Rep. Congo", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[30.833859897593801, 3.50916596111034], [30.773346795380036, 2.339883327642127], [31.174149204235807, 2.204465236821263], [30.852670118948048, 1.849396470543809], [30.468507521290292, 1.58380544677972], [30.086153598762703, 1.062312730306288], [29.875778842902488, 0.597379868976304], [29.819503208136634, -0.205310153813372], [29.587837762172164, -0.58740569417948], [29.579466180140876, -1.341313164885626], [29.29188683443661, -1.620055840667987], [29.254834832483336, -2.215109958508911], [29.117478875451546, -2.292211195488384], [29.02492638521678, -2.839257907730157], [29.276383904749046, -3.293907159034063], [29.339997592900342, -4.499983412294092], [29.519986606572925, -5.419978936386313], [29.41999271008816, -5.939998874539432], [29.620032179490003, -6.520015150583424], [30.199996779101692, -7.079980970898161], [30.740015496551781, -8.340007419470913], [30.34608605319081, -8.238256524288216], [29.002912225060467, -8.40703175215347], [28.734866570762495, -8.526559340044576], [28.449871046672818, -9.164918308146083], [28.673681674928922, -9.605924981324931], [28.496069777141763, -10.789883721564044], [28.372253045370421, -11.793646742401389], [28.642417433392346, -11.971568698782312], [29.341547885869087, -12.36074391037241], [29.616001417771223, -12.178894545137307], [29.699613885219485, -13.257226657771827], [28.934285922976834, -13.248958428605132], [28.52356163912102, -12.698604424696679], [28.15510867687998, -12.272480564017894], [27.38879886242378, -12.132747491100663], [27.164419793412456, -11.608748467661071], [26.55308759939961, -11.924439792532125], [25.752309604604726, -11.784965101776356], [25.418118116973197, -11.330935967659958], [24.783169793402948, -11.238693536018962], [24.314516228947948, -11.262826429899269], [24.257155389103982, -10.951992689663655], [23.912215203555714, -10.926826267137512], [23.456790805767433, -10.867863457892481], [22.837345411884733, -11.017621758674329], [22.402798292742371, -10.99307545333569], [22.155268182064304, -11.084801120653768], [22.208753289486388, -9.894796237836507], [21.87518191904234, -9.523707777548564], [21.801801385187897, -8.908706556842978], [21.949130893652036, -8.305900974158275], [21.746455926203303, -7.920084730667147], [21.728110792739695, -7.2908724910813], [20.514748162526498, -7.299605808138629], [20.601822950938292, -6.93931772219968], [20.091621534920645, -6.943090101756993], [20.037723016040214, -7.116361179231644], [19.417502475673157, -7.155428562044297], [19.166613396896107, -7.738183688999753], [19.016751743249664, -7.988245944860132], [18.464175652752683, -7.847014255406442], [18.134221632569048, -7.98767750410492], [17.472970004962232, -8.068551120641699], [17.089995965247166, -7.545688978712525], [16.860190870845198, -7.222297865429984], [16.573179965896141, -6.622644545115087], [16.326528354567042, -5.877470391466267], [13.375597364971892, -5.864241224799548], [13.02486941900696, -5.984388929878157], [12.735171339578695, -5.965682061388497], [12.322431674863507, -6.100092461779658], [12.182336866920249, -5.789930515163837], [12.436688266660866, -5.684303887559245], [12.468004184629734, -5.248361504745003], [12.631611769265788, -4.991271254092935], [12.995517205465173, -4.781103203961883], [13.258240187237044, -4.882957452009165], [13.600234816144676, -4.500138441590969], [14.144956088933295, -4.510008640158715], [14.209034864975219, -4.793092136253597], [14.582603794013179, -4.970238946150139], [15.170991652088441, -4.3435071753143], [15.753540073314749, -3.855164890156096], [16.006289503654298, -3.535132744972528], [15.972803175529149, -2.712392266453612], [16.407091912510051, -1.740927015798682], [16.86530683764212, -1.225816338713287], [17.523716261472853, -0.743830254726987], [17.638644646889983, -0.424831638189246], [17.663552687254676, -0.058083998213817], [17.826540154703245, 0.288923244626105], [17.774191928791563, 0.855658677571085], [17.89883548347958, 1.741831976728278], [18.09427575040743, 2.365721543788055], [18.39379235197114, 2.90044342692822], [18.453065219809925, 3.504385891123348], [18.542982211997778, 4.201785183118317], [18.932312452884755, 4.709506130385973], [19.467783644293146, 5.031527818212779], [20.290679152108932, 4.691677761245287], [20.927591180106273, 4.322785549329736], [21.659122755630019, 4.224341945813719], [22.405123732195531, 4.02916006104732], [22.704123569436284, 4.633050848810156], [22.841479526468103, 4.710126247573483], [23.297213982850135, 4.609693101414221], [24.41053104014625, 5.108784084489129], [24.805028924262409, 4.897246608902349], [25.128833449003274, 4.927244777847789], [25.278798455514302, 5.170408229997191], [25.650455356557465, 5.256087754737123], [26.402760857862535, 5.150874538590869], [27.044065382604703, 5.127852688004835], [27.374226108517483, 5.233944403500059], [27.979977247842807, 4.408413397637373], [28.428993768026906, 4.287154649264493], [28.696677687298795, 4.455077215996936], [29.159078403446497, 4.38926727947323], [29.715995314256013, 4.600804755060024], [29.953500197069467, 4.173699042167683], [30.833859897593801, 3.50916596111034]]] } }, - { "type": "Feature", "properties": { "admin": "Republic of Congo", "name": "Congo", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[12.995517205465173, -4.781103203961883], [12.620759718484491, -4.438023369976135], [12.318607618873923, -4.606230157086187], [11.914963006242086, -5.037986748884789], [11.093772820691923, -3.978826592630546], [11.855121697648114, -3.42687061932105], [11.478038771214299, -2.765618991714241], [11.820963575903189, -2.514161472181982], [12.495702752338159, -2.391688327650242], [12.575284458067639, -1.948511244315134], [13.109618767965626, -2.428740329603513], [13.992407260807706, -2.470804945489099], [14.299210239324564, -1.998275648612213], [14.425455763413593, -1.333406670744971], [14.316418491277741, -0.552627455247048], [13.843320753645653, 0.038757635901149], [14.276265903386953, 1.196929836426619], [14.026668735417214, 1.395677395021153], [13.282631463278816, 1.31418366129688], [13.003113641012074, 1.830896307783319], [13.07582238124675, 2.267097072759014], [14.337812534246577, 2.22787466064949], [15.14634199388524, 1.964014797367184], [15.940918816805061, 1.727672634280295], [16.01285241055535, 2.267639675298084], [16.537058139724135, 3.198254706226278], [17.133042433346297, 3.728196519379451], [17.809900343505259, 3.560196437998569], [18.453065219809925, 3.504385891123348], [18.39379235197114, 2.90044342692822], [18.09427575040743, 2.365721543788055], [17.89883548347958, 1.741831976728278], [17.774191928791563, 0.855658677571085], [17.826540154703245, 0.288923244626105], [17.663552687254676, -0.058083998213817], [17.638644646889983, -0.424831638189246], [17.523716261472853, -0.743830254726987], [16.86530683764212, -1.225816338713287], [16.407091912510051, -1.740927015798682], [15.972803175529149, -2.712392266453612], [16.006289503654298, -3.535132744972528], [15.753540073314749, -3.855164890156096], [15.170991652088441, -4.3435071753143], [14.582603794013179, -4.970238946150139], [14.209034864975219, -4.793092136253597], [14.144956088933295, -4.510008640158715], [13.600234816144676, -4.500138441590969], [13.258240187237044, -4.882957452009165], [12.995517205465173, -4.781103203961883]]] } }, - { "type": "Feature", "properties": { "admin": "Colombia", "name": "Colombia", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-75.373223232713841, -0.15203175212045], [-75.801465827116587, 0.084801337073202], [-76.292314419240938, 0.416047268064119], [-76.576379767549383, 0.256935533037435], [-77.424984300430367, 0.395686753741117], [-77.668612840470416, 0.825893052570961], [-77.855061408179509, 0.809925034992773], [-78.855258755188686, 1.380923773601822], [-78.990935228171026, 1.691369940595251], [-78.617831387023699, 1.766404120283056], [-78.662118089497838, 2.267355454920476], [-78.427610439757302, 2.629555568854215], [-77.931542527971473, 2.696605739752925], [-77.510431281224996, 3.325016994638246], [-77.127689785455246, 3.849636135265356], [-77.496271938776999, 4.087606105969427], [-77.307601284479375, 4.667984117039452], [-77.533220587865713, 5.582811997902496], [-77.318815070286718, 5.845354112161359], [-77.476660732722266, 6.691116441266301], [-77.881571417945239, 7.223771267114783], [-77.75341386586139, 7.709839789252141], [-77.431107957656977, 7.638061224798733], [-77.242566494440069, 7.935278225125442], [-77.474722866511314, 8.524286200388216], [-77.353360765273848, 8.670504665558068], [-76.836673957003541, 8.638749497914715], [-76.086383836557843, 9.336820583529486], [-75.674600185840035, 9.443248195834597], [-75.664704149056149, 9.774003200718736], [-75.480425991503338, 10.618990383339305], [-74.906895107711975, 11.08304474532032], [-74.276752692344871, 11.102035834187586], [-74.197222663047683, 11.310472723836865], [-73.414763963500278, 11.227015285685479], [-72.62783525255962, 11.731971543825519], [-72.238194953078903, 11.955549628136325], [-71.754090135368628, 12.437303168177305], [-71.399822353791691, 12.376040757695289], [-71.137461107045866, 12.112981879113503], [-71.331583624950284, 11.776284084515805], [-71.973921678338272, 11.608671576377116], [-72.227575446242923, 11.108702093953237], [-72.614657762325194, 10.821975409381777], [-72.905286017534692, 10.45034434655477], [-73.027604132769554, 9.736770331252441], [-73.304951544880026, 9.151999823437604], [-72.788729824500379, 9.085027167187331], [-72.660494757768092, 8.62528778730268], [-72.439862230097944, 8.405275376820027], [-72.360900641555958, 8.002638454617893], [-72.479678921178831, 7.632506008327352], [-72.444487270788059, 7.42378489830048], [-72.19835242378187, 7.340430813013682], [-71.960175747348629, 6.991614895043538], [-70.674233567981503, 7.087784735538717], [-70.093312954372408, 6.960376491723109], [-69.389479946557103, 6.099860541198835], [-68.985318569602327, 6.206804917826856], [-68.265052456318216, 6.153268133972473], [-67.695087246355001, 6.267318020040645], [-67.34143958196556, 6.095468044454021], [-67.521531948502741, 5.556870428891968], [-67.744696621355203, 5.221128648291667], [-67.823012254493534, 4.503937282728898], [-67.621835903581271, 3.839481716319994], [-67.33756384954367, 3.542342230641721], [-67.303173183853417, 3.31845408773718], [-67.809938117123693, 2.820655015469569], [-67.447092047786299, 2.600280869960869], [-67.181294318293041, 2.250638129074062], [-66.876325853122566, 1.253360500489336], [-67.065048183852483, 1.130112209473225], [-67.25999752467358, 1.719998684084956], [-67.537810024674684, 2.037162787276329], [-67.868565029558823, 1.692455145673392], [-69.816973232691609, 1.714805202639624], [-69.804596727157701, 1.089081122233466], [-69.218637661400166, 0.985676581217433], [-69.252434048119042, 0.602650865070075], [-69.452396002872447, 0.706158758950693], [-70.015565761989293, 0.541414292804205], [-70.02065589057004, -0.185156345219539], [-69.577065395776586, -0.549991957200163], [-69.420485805932216, -1.122618503426409], [-69.444101935489599, -1.556287123219817], [-69.893635219996611, -4.298186944194326], [-70.394043952094975, -3.766591485207825], [-70.692682054309699, -3.742872002785858], [-70.047708502874841, -2.725156345229699], [-70.813475714791949, -2.256864515800742], [-71.413645799429773, -2.342802422702128], [-71.774760708285385, -2.169789727388937], [-72.325786505813639, -2.434218031426453], [-73.070392218707212, -2.308954359550952], [-73.659503546834586, -1.260491224781134], [-74.122395189089048, -1.002832533373848], [-74.441600511355958, -0.530820000819887], [-75.106624518520064, -0.05720549886486], [-75.373223232713841, -0.15203175212045]]] } }, - { "type": "Feature", "properties": { "admin": "Costa Rica", "name": "Costa Rica", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-82.965783047197348, 8.225027980985983], [-83.508437262694287, 8.446926581247281], [-83.711473965169063, 8.656836249216864], [-83.596313035806631, 8.830443223501417], [-83.632641567707822, 9.051385809765319], [-83.909885626953724, 9.290802720573579], [-84.303401658856345, 9.487354030795712], [-84.64764421256865, 9.615537421095707], [-84.713350796227743, 9.908051866083849], [-84.975660366541319, 10.086723130733004], [-84.911374884770211, 9.795991522658921], [-85.110923428065291, 9.557039699741308], [-85.339488288092255, 9.834542141148658], [-85.660786505866966, 9.93334747969072], [-85.797444831062819, 10.134885565629032], [-85.791708747078417, 10.439337266476612], [-85.65931372754666, 10.754330959511718], [-85.941725430021748, 10.895278428587799], [-85.712540452807289, 11.088444932494822], [-85.561851976244171, 11.217119248901593], [-84.903003302738924, 10.952303371621895], [-84.673069017256239, 11.082657172078139], [-84.355930752281026, 10.999225572142901], [-84.190178595704822, 10.793450018756671], [-83.895054490885926, 10.726839097532444], [-83.655611741861563, 10.938764146361418], [-83.402319708982944, 10.39543813724465], [-83.015676642575158, 9.992982082555553], [-82.546196255203469, 9.566134751824674], [-82.932890998043561, 9.476812038608172], [-82.927154914059145, 9.074330145702914], [-82.719183112300513, 8.925708726431493], [-82.868657192704759, 8.807266343618521], [-82.829770677405151, 8.626295477732368], [-82.9131764391242, 8.423517157419068], [-82.965783047197348, 8.225027980985983]]] } }, - { "type": "Feature", "properties": { "admin": "Cuba", "name": "Cuba", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-82.268151211257035, 23.188610744717703], [-81.404457160146819, 23.117271429938775], [-80.61876868358118, 23.105980129482994], [-79.679523688460222, 22.765303249598823], [-79.281485968732071, 22.399201565027049], [-78.347434455056472, 22.512166246017085], [-77.993295864560253, 22.277193508385928], [-77.146422492161037, 21.657851467367831], [-76.523824835908528, 21.20681956632437], [-76.194620123993175, 21.220565497314006], [-75.598222418912655, 21.01662445727413], [-75.671060350228032, 20.735091254147999], [-74.933896043584483, 20.693905137611381], [-74.178024868451246, 20.284627793859737], [-74.296648118777242, 20.050378526280678], [-74.961594611292924, 19.923435370355687], [-75.634680141894577, 19.873774318923193], [-76.323656175425981, 19.952890936762056], [-77.755480923153044, 19.855480861891873], [-77.085108405246729, 20.413353786698789], [-77.492654588516601, 20.673105373613886], [-78.137292243141573, 20.739948838783427], [-78.482826707661161, 21.028613389565848], [-78.719866502583997, 21.598113511638431], [-79.284999966127913, 21.559175319906497], [-80.217475348618635, 21.827324327069032], [-80.517534552721401, 22.037078965741756], [-81.820943366203167, 22.192056586185068], [-82.169991828118611, 22.387109279870746], [-81.79500179719264, 22.636964830001951], [-82.775897996740838, 22.688150336187057], [-83.494458787759328, 22.168517971276124], [-83.908800421875611, 22.154565334557329], [-84.052150845053248, 21.910575059491251], [-84.547030198896351, 21.801227728761639], [-84.974911058273079, 21.896028143801082], [-84.44706214062775, 22.204949856041903], [-84.23035702181177, 22.56575470630376], [-83.778239915690165, 22.78811839445569], [-83.267547573565736, 22.983041897060641], [-82.510436164057495, 23.078746649665181], [-82.268151211257035, 23.188610744717703]]] } }, - { "type": "Feature", "properties": { "admin": "Northern Cyprus", "name": "N. Cyprus", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[32.731780226377445, 35.14002594658843], [32.802473585752743, 35.145503648411363], [32.946960890440799, 35.38670339613369], [33.667227003724939, 35.373215847305509], [34.576473829900458, 35.671595567358786], [33.900804477684197, 35.245755927057608], [33.973616570783456, 35.058506374647997], [33.866439650210104, 35.093594672174177], [33.675391880027057, 35.017862860650446], [33.525685255677494, 35.038688462864066], [33.475817498515845, 35.000344550103499], [33.45592207208346, 35.101423651666401], [33.383833449036295, 35.162711900364563], [33.190977003723042, 35.173124701471373], [32.919572381326127, 35.087832749973636], [32.731780226377445, 35.14002594658843]]] } }, - { "type": "Feature", "properties": { "admin": "Cyprus", "name": "Cyprus", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[33.973616570783456, 35.058506374647997], [34.004880812320032, 34.978097846001852], [32.97982710137844, 34.571869411755436], [32.490296258277532, 34.701654771456468], [32.256667107885953, 35.103232326796622], [32.731780226377445, 35.14002594658843], [32.919572381326127, 35.087832749973636], [33.190977003723042, 35.173124701471373], [33.383833449036295, 35.162711900364563], [33.45592207208346, 35.101423651666401], [33.475817498515845, 35.000344550103499], [33.525685255677494, 35.038688462864066], [33.675391880027057, 35.017862860650446], [33.866439650210104, 35.093594672174177], [33.973616570783456, 35.058506374647997]]] } }, - { "type": "Feature", "properties": { "admin": "Czech Republic", "name": "Czech Rep.", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[16.960288120194573, 48.596982326850593], [16.49928266771877, 48.785808010445095], [16.029647251050218, 48.733899034207916], [15.253415561593979, 49.039074205107575], [14.901447381254055, 48.964401760445817], [14.33889773932472, 48.555305284207193], [13.595945672264433, 48.877171942737135], [13.031328973043427, 49.307068182973232], [12.52102420416119, 49.54741526956272], [12.415190870827441, 49.96912079528056], [12.240111118222556, 50.266337795607271], [12.96683678554319, 50.484076443069071], [13.338131951560282, 50.733234361364346], [14.05622765468817, 50.926917629594286], [14.307013380600633, 51.117267767941399], [14.570718214586062, 51.002339382524262], [15.016995883858666, 51.106674099321566], [15.490972120839725, 50.7847299261432], [16.238626743238566, 50.697732652379827], [16.176253289462263, 50.4226073268579], [16.719475945714429, 50.215746568393527], [16.868769158605655, 50.473973700556016], [17.554567091551117, 50.36214590107641], [17.649445021238986, 50.049038397819942], [18.392913852622168, 49.988628648470737], [18.85314415861361, 49.496229763377634], [18.554971144289478, 49.495015367218777], [18.399993523846174, 49.315000515330034], [18.170498488037961, 49.271514797556421], [18.104972771891848, 49.043983466175298], [17.913511590250462, 48.996492824899072], [17.886484816161808, 48.903475246773695], [17.545006951577101, 48.800019029325362], [17.101984897538895, 48.8169688991171], [16.960288120194573, 48.596982326850593]]] } }, - { "type": "Feature", "properties": { "admin": "Germany", "name": "Germany", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[9.92190636560923, 54.983104153048025], [9.939579705452898, 54.596641954153242], [10.950112338920517, 54.363607082733147], [10.939466993868447, 54.008693345752583], [11.95625247564328, 54.196485500701144], [12.518440382546711, 54.470370591847988], [13.647467075259495, 54.075510972705885], [14.119686313542555, 53.757029120491026], [14.353315463934164, 53.248171291713092], [14.074521111719431, 52.981262518925334], [14.437599725002197, 52.62485016540829], [14.685026482815713, 52.089947414755208], [14.607098422919645, 51.745188096719964], [15.016995883858781, 51.106674099321701], [14.570718214586119, 51.002339382524369], [14.307013380600662, 51.117267767941364], [14.05622765468831, 50.92691762959435], [13.338131951560397, 50.733234361364268], [12.966836785543249, 50.484076443069164], [12.240111118222668, 50.266337795607214], [12.41519087082747, 49.969120795280602], [12.521024204161332, 49.547415269562741], [13.031328973043513, 49.307068182973232], [13.595945672264575, 48.877171942737156], [13.243357374737112, 48.416114813829026], [12.884102817443873, 48.289145819687846], [13.025851271220514, 47.637583523135945], [12.93262698736606, 47.467645575543983], [12.620759718484519, 47.672387600284409], [12.141357456112869, 47.703083401065768], [11.426414015354847, 47.523766181013045], [10.544504021861597, 47.566399237653783], [10.402083774465321, 47.302487697939164], [9.896068149463188, 47.58019684507569], [9.594226108446376, 47.525058091820185], [8.522611932009793, 47.830827541691342], [8.317301466514092, 47.613579820336263], [7.466759067422286, 47.620581976911907], [7.59367638513106, 48.333019110703724], [8.099278598674855, 49.017783515003423], [6.658229607783709, 49.201958319691627], [6.186320428094176, 49.4638028021145], [6.242751092156992, 49.90222565367872], [6.043073357781109, 50.128051662794221], [6.156658155958779, 50.803721015010574], [5.988658074577812, 51.85161570902504], [6.589396599970825, 51.85202912048338], [6.842869500362381, 52.228440253297542], [7.092053256873895, 53.14404328064488], [6.905139601274128, 53.482162177130633], [7.100424838905268, 53.693932196662658], [7.936239454793961, 53.748295803433777], [8.121706170289483, 53.527792466844275], [8.800734490604667, 54.02078563090889], [8.572117954145368, 54.395646470754045], [8.526229282270206, 54.962743638725144], [9.282048780971136, 54.830865383516297], [9.92190636560923, 54.983104153048025]]] } }, - { "type": "Feature", "properties": { "admin": "Djibouti", "name": "Djibouti", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[43.081226027200152, 12.699638576707112], [43.317852410664663, 12.390148423711022], [43.286381463398911, 11.974928290245883], [42.715873650896519, 11.735640570518338], [43.145304803242126, 11.462039699748853], [42.776851841000948, 10.926878566934416], [42.55493000000012, 11.105110000000193], [42.314140000000116, 11.0342], [41.755570000000191, 11.05091], [41.739590000000177, 11.355110000000137], [41.661760000000122, 11.6312], [42.000000000000107, 12.100000000000133], [42.351560000000106, 12.54223000000013], [42.779642368344739, 12.455415757695672], [43.081226027200152, 12.699638576707112]]] } }, - { "type": "Feature", "properties": { "admin": "Denmark", "name": "Denmark", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[12.690006137755629, 55.60999095318077], [12.089991082414738, 54.800014553437919], [11.043543328504226, 55.36486379660424], [10.90391360845163, 55.779954738988735], [12.370904168353288, 56.111407375708822], [12.690006137755629, 55.60999095318077]]], [[[10.912181837618359, 56.4586213242779], [10.667803989309986, 56.081383368547208], [10.369992710011983, 56.190007229224719], [9.649984978889306, 55.469999498102041], [9.921906365609173, 54.983104153048046], [9.282048780971136, 54.830865383516155], [8.526229282270235, 54.962743638724973], [8.120310906617588, 55.517722683323612], [8.089976840862247, 56.540011705137587], [8.256581658571262, 56.809969387430286], [8.543437534223385, 57.110002753316891], [9.424469028367609, 57.172066148499468], [9.775558709358561, 57.447940782289649], [10.580005730846151, 57.730016587954843], [10.54610599126269, 57.21573273378614], [10.250000034230222, 56.890016181050456], [10.369992710011983, 56.60998159446082], [10.912181837618359, 56.4586213242779]]]] } }, - { "type": "Feature", "properties": { "admin": "Dominican Republic", "name": "Dominican Rep.", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-71.71236141629295, 19.714455878167353], [-71.587304450146604, 19.884910590082093], [-70.806706102161726, 19.880285549391981], [-70.214364997016119, 19.622885240146157], [-69.950815192327568, 19.647999986240002], [-69.769250047470067, 19.293267116772437], [-69.222125820579862, 19.313214219637096], [-69.254346076113819, 19.015196234609871], [-68.809411994080818, 18.979074408437846], [-68.317943284768958, 18.612197577381689], [-68.689315965434503, 18.205142320218609], [-69.164945848248905, 18.422648423735108], [-69.623987596297624, 18.380712998930246], [-69.952933926051529, 18.428306993071057], [-70.133232998317879, 18.245915025296892], [-70.517137213814195, 18.184290879788829], [-70.669298468697619, 18.42688589118303], [-70.999950120717173, 18.283328762276206], [-71.400209927033885, 17.598564357976596], [-71.657661912712001, 17.757572740138695], [-71.708304816358037, 18.044997056546091], [-71.687737596305865, 18.316660061104468], [-71.945112067335543, 18.616900132720257], [-71.701302659782485, 18.785416978424049], [-71.624873216422813, 19.169837958243303], [-71.71236141629295, 19.714455878167353]]] } }, - { "type": "Feature", "properties": { "admin": "Algeria", "name": "Algeria", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[11.99950564947161, 23.471668402596443], [8.572893100629782, 21.565660712159136], [5.677565952180684, 19.601206976799713], [4.267419467800038, 19.155265204336995], [3.158133172222704, 19.057364203360034], [3.146661004253899, 19.693578599521441], [2.683588494486428, 19.856230170160114], [2.060990838233919, 20.142233384679482], [1.823227573259032, 20.61080943448604], [-1.550054897457613, 22.792665920497377], [-4.92333736817423, 24.974574082940993], [-8.684399786809051, 27.395744126895998], [-8.66512447756419, 27.58947907155822], [-8.665589565454805, 27.656425889592349], [-8.674116176782972, 28.841288967396572], [-7.059227667661928, 29.579228420524522], [-6.060632290053772, 29.731699734001687], [-5.242129278982786, 30.000443020135581], [-4.859646165374469, 30.501187649043839], [-3.690441046554695, 30.896951605751152], [-3.647497931320145, 31.637294012980668], [-3.068980271812647, 31.724497992473207], [-2.616604783529567, 32.094346218386143], [-1.30789913573787, 32.262888902306095], [-1.124551153966308, 32.651521511357124], [-1.388049282222567, 32.864015000941301], [-1.733454555661467, 33.91971283623198], [-1.792985805661686, 34.527918606091198], [-2.169913702798624, 35.168396307916673], [-1.208602871089056, 35.71484874118709], [-0.127454392894606, 35.888662421200799], [0.503876580415209, 36.301272894835272], [1.466918572606545, 36.605647081034398], [3.161698846050824, 36.783904934225205], [4.815758090849129, 36.865036932923452], [5.320120070017792, 36.716518866516616], [6.261819695672611, 37.110655015606731], [7.330384962603969, 37.118380642234364], [7.737078484741003, 36.885707505840209], [8.420964389691674, 36.946427313783154], [8.217824334352313, 36.433176988260271], [8.376367628623766, 35.479876003555937], [8.140981479534302, 34.655145982393783], [7.524481642292242, 34.097376410451453], [7.612641635782181, 33.344114895148955], [8.430472853233367, 32.748337307255944], [8.439102817426116, 32.506284898400814], [9.055602654668148, 32.102691962201284], [9.482139926805273, 30.307556057246181], [9.805634392952411, 29.424638373323383], [9.859997999723443, 28.959989732371007], [9.683884718472765, 28.144173895779193], [9.756128370816779, 27.688258571884141], [9.629056023811073, 27.140953477480913], [9.716285841519747, 26.512206325785691], [9.319410841518161, 26.094324856057447], [9.910692579801774, 25.365454616796733], [9.948261346077969, 24.93695364023251], [10.30384687667836, 24.37931325937091], [10.771363559622925, 24.562532050061744], [11.560669386449002, 24.097909247325511], [11.99950564947161, 23.471668402596443]]] } }, - { "type": "Feature", "properties": { "admin": "Ecuador", "name": "Ecuador", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-80.302560594387188, -3.404856459164712], [-79.770293341780913, -2.65751189535964], [-79.986559210922394, -2.220794366061014], [-80.368783942369234, -2.685158786635788], [-80.967765469064332, -2.246942640800703], [-80.764806281238023, -1.965047702648532], [-80.933659023751702, -1.057454522306358], [-80.583370327461239, -0.906662692878683], [-80.39932471385373, -0.283703301600141], [-80.020898200180355, 0.360340074053468], [-80.090609707342097, 0.768428859862396], [-79.542762010399784, 0.982937730305963], [-78.855258755188686, 1.380923773601822], [-77.855061408179509, 0.809925034992773], [-77.668612840470416, 0.825893052570961], [-77.424984300430367, 0.395686753741117], [-76.576379767549383, 0.256935533037435], [-76.292314419240938, 0.416047268064119], [-75.801465827116587, 0.084801337073202], [-75.373223232713841, -0.15203175212045], [-75.233722703741932, -0.911416924649529], [-75.544995693652027, -1.56160979574588], [-76.635394253226707, -2.608677666843817], [-77.83790483265858, -3.003020521663103], [-78.450683966775628, -3.873096612161375], [-78.639897223612323, -4.547784112164072], [-79.205289069317715, -4.959128513207388], [-79.62497921417615, -4.454198093283494], [-80.028908047185581, -4.346090996928893], [-80.442241990872134, -4.425724379090673], [-80.46929460317692, -4.059286797708999], [-80.184014858709645, -3.821161797708043], [-80.302560594387188, -3.404856459164712]]] } }, - { "type": "Feature", "properties": { "admin": "Egypt", "name": "Egypt", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[34.9226, 29.50133], [34.64174, 29.09942], [34.42655, 28.34399], [34.15451, 27.8233], [33.92136, 27.6487], [33.58811, 27.97136], [33.13676, 28.41765], [32.42323, 29.85108], [32.32046, 29.76043], [32.73482, 28.70523], [33.34876, 27.69989], [34.10455, 26.14227], [34.47387, 25.59856], [34.79507, 25.03375], [35.69241, 23.92671], [35.49372, 23.75237], [35.52598, 23.10244], [36.69069, 22.20485], [36.86623, 22.0], [32.9, 22.0], [29.02, 22.0], [25.0, 22.0], [25.0, 25.682499996360992], [25.0, 29.238654529533452], [24.70007, 30.04419], [24.95762, 30.6616], [24.80287, 31.08929], [25.16482, 31.56915], [26.49533, 31.58568], [27.45762, 31.32126], [28.45048, 31.02577], [28.91353, 30.87005], [29.68342, 31.18686], [30.09503, 31.4734], [30.97693, 31.55586], [31.68796, 31.4296], [31.96041, 30.9336], [32.19247, 31.26034], [32.99392, 31.02407], [33.7734, 30.96746], [34.26544, 31.21936], [34.9226, 29.50133]]] } }, - { "type": "Feature", "properties": { "admin": "Eritrea", "name": "Eritrea", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[42.351560000000106, 12.54223000000013], [42.00975, 12.86582], [41.59856, 13.452090000000108], [41.15519371924983, 13.773319810435224], [40.8966, 14.118640000000138], [40.026218702969167, 14.519579169162281], [39.34061, 14.53155], [39.0994, 14.74064], [38.51295, 14.50547], [37.90607, 14.959430000000165], [37.59377, 14.2131], [36.42951, 14.42211], [36.323188917798113, 14.822480577041057], [36.753860304518575, 16.291874091044289], [36.852530000000108, 16.95655], [37.16747, 17.263140000000128], [37.904000000000103, 17.42754], [38.410089959473218, 17.998307399970312], [38.990622999839999, 16.84062612555169], [39.266110060388016, 15.922723496967246], [39.814293654140208, 15.435647284400314], [41.179274936697645, 14.491079616753209], [41.734951613132345, 13.921036892141554], [42.276830682144848, 13.34399201095442], [42.589576450375255, 13.000421250861901], [43.081226027200152, 12.699638576707112], [42.779642368344739, 12.455415757695672], [42.351560000000106, 12.54223000000013]]] } }, - { "type": "Feature", "properties": { "admin": "Spain", "name": "Spain", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[-9.034817674180244, 41.880570583659669], [-8.98443315269567, 42.592775173506261], [-9.392883673530644, 43.026624660812686], [-7.978189663108308, 43.748337714200979], [-6.754491746436754, 43.567909450853918], [-5.411886359061596, 43.574239813809669], [-4.347842779955783, 43.403449205085025], [-3.51753170410609, 43.455900783861296], [-1.901351284177764, 43.422802028978332], [-1.502770961910528, 43.034014390630425], [0.338046909190581, 42.579546006839543], [0.701590610363894, 42.795734361332599], [1.826793247087153, 42.343384711265678], [2.985998976258457, 42.473015041669854], [3.039484083680548, 41.892120266276891], [2.091841668312184, 41.226088568683082], [0.810524529635188, 41.014731960609332], [0.721331007499401, 40.678318386389229], [0.106691521819869, 40.123933620762003], [-0.278711310212941, 39.309978135732713], [0.111290724293838, 38.738514309233032], [-0.467123582349103, 38.292365831041138], [-0.683389451490598, 37.642353827457811], [-1.438382127274849, 37.443063666324214], [-2.146452602538119, 36.674144192037282], [-3.415780808923386, 36.658899644511173], [-4.368900926114718, 36.677839056946141], [-4.995219285492211, 36.32470815687963], [-5.377159796561457, 35.946850083961458], [-5.866432257500902, 36.02981659600605], [-6.236693894872174, 36.367677110330327], [-6.520190802425402, 36.942913316387312], [-7.45372555177809, 37.097787583966053], [-7.537105475281022, 37.428904323876232], [-7.166507941099863, 37.803894354802217], [-7.029281175148794, 38.075764065089757], [-7.374092169616317, 38.373058580064914], [-7.098036668313126, 39.03007274022378], [-7.498632371439724, 39.629571031241802], [-7.066591559263527, 39.711891587882768], [-7.026413133156593, 40.184524237624238], [-6.864019944679383, 40.330871893874821], [-6.851126674822551, 41.111082668617513], [-6.389087693700914, 41.381815497394641], [-6.668605515967655, 41.883386949219577], [-7.251308966490822, 41.91834605566504], [-7.422512986673794, 41.792074693359822], [-8.01317460776991, 41.790886135417118], [-8.26385698081779, 42.280468654950326], [-8.671945766626719, 42.134689439454952], [-9.034817674180244, 41.880570583659669]]] } }, - { "type": "Feature", "properties": { "admin": "Estonia", "name": "Estonia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[24.312862583114615, 57.793423570376966], [24.428927850042154, 58.383413397853275], [24.061198357853179, 58.257374579493394], [23.426560092876681, 58.612753404364618], [23.339795363058641, 59.187240302153363], [24.604214308376182, 59.465853786855007], [25.864189080516631, 59.611090399811324], [26.949135776484518, 59.445803331125767], [27.981114129353237, 59.47538808861286], [28.131699253051742, 59.300825100330904], [27.420166456824941, 58.724581203844224], [27.716685825315714, 57.791899115624354], [27.288184848751509, 57.474528306703817], [26.46353234223778, 57.476388658266316], [25.602809685984365, 57.847528794986559], [25.164593540149262, 57.970156968815175], [24.312862583114615, 57.793423570376966]]] } }, - { "type": "Feature", "properties": { "admin": "Ethiopia", "name": "Ethiopia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[37.90607, 14.959430000000165], [38.51295, 14.50547], [39.0994, 14.74064], [39.34061, 14.53155], [40.026250000000111, 14.51959], [40.8966, 14.118640000000138], [41.1552, 13.77333], [41.59856, 13.452090000000108], [42.00975, 12.86582], [42.351560000000106, 12.54223000000013], [42.000000000000107, 12.100000000000133], [41.661760000000122, 11.6312], [41.739590000000177, 11.355110000000137], [41.755570000000191, 11.05091], [42.314140000000116, 11.0342], [42.55493000000012, 11.105110000000193], [42.776851841000948, 10.926878566934416], [42.55876, 10.572580000000126], [42.92812, 10.021940000000139], [43.29699, 9.540480000000169], [43.67875, 9.183580000000116], [46.94834, 7.99688], [47.78942, 8.003], [44.9636, 5.001620000000115], [43.66087, 4.95755], [42.769670000000119, 4.252590000000223], [42.12861, 4.234130000000163], [41.855083092644108, 3.918911920483764], [41.171800000000125, 3.91909], [40.768480000000118, 4.257020000000124], [39.854940000000106, 3.83879000000013], [39.559384258765917, 3.422060000000215], [38.89251, 3.50074], [38.67114, 3.61607], [38.436970000000137, 3.58851], [38.120915000000132, 3.598605], [36.85509323800823, 4.447864127672857], [36.159078632855646, 4.447864127672857], [35.817447662353622, 4.776965663462021], [35.817447662353622, 5.338232082790852], [35.298007118233095, 5.506], [34.70702, 6.59422000000012], [34.25032, 6.82607], [34.075100000000184, 7.22595], [33.56829, 7.71334], [32.954180000000228, 7.7849700000001], [33.294800000000116, 8.35458], [33.82550000000014, 8.37916], [33.97498, 8.684560000000145], [33.96162, 9.58358], [34.25745, 10.63009], [34.73115000000012, 10.910170000000106], [34.831630000000125, 11.318960000000116], [35.26049, 12.08286], [35.863630000000164, 12.57828], [36.27022, 13.563330000000118], [36.42951, 14.42211], [37.59377, 14.2131], [37.90607, 14.959430000000165]]] } }, - { "type": "Feature", "properties": { "admin": "Finland", "name": "Finland", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[28.591929559043187, 69.064776923286644], [28.445943637818651, 68.36461294216403], [29.9774263852206, 67.698297024192641], [29.054588657352319, 66.944286200621917], [30.21765, 65.80598], [29.544429559046982, 64.948671576590471], [30.444684686003704, 64.204453436939076], [30.035872430142714, 63.552813625738544], [31.516092156711117, 62.867687486412869], [31.139991082490891, 62.357692776124395], [30.211107212044443, 61.780027777749673], [28.06999759289527, 60.503516547275829], [26.25517296723697, 60.423960679762487], [24.496623976344516, 60.057316392651636], [22.869694858499454, 59.846373196036211], [22.290763787533589, 60.391921291741525], [21.322244093519313, 60.720169989659503], [21.544866163832687, 61.705329494871783], [21.059211053153682, 62.607393296958726], [21.536029493910799, 63.189735012455863], [22.442744174903986, 63.817810370531276], [24.730511508897528, 64.902343655040823], [25.398067661243939, 65.111426500093728], [25.2940430030404, 65.53434642197044], [23.903378533633795, 66.006927395279604], [23.565879754335576, 66.396050930437411], [23.539473097434435, 67.936008612735236], [21.978534783626113, 68.616845608180682], [20.645592889089521, 69.106247260200846], [21.244936150810666, 69.370443020293067], [22.356237827247405, 68.841741441514898], [23.662049594830751, 68.891247463650529], [24.735679152126721, 68.649556789821446], [25.689212680776361, 69.092113755969024], [26.179622023226241, 69.825298977326113], [27.732292107867856, 70.164193020296239], [29.015572950971968, 69.766491197377974], [28.591929559043187, 69.064776923286644]]] } }, - { "type": "Feature", "properties": { "admin": "Fiji", "name": "Fiji", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[178.3736, -17.33992], [178.71806, -17.62846], [178.55271, -18.15059], [177.93266, -18.28799], [177.38146, -18.16432], [177.28504, -17.72465], [177.67087, -17.38114], [178.12557, -17.50481], [178.3736, -17.33992]]], [[[179.364142661964223, -16.801354076946847], [178.725059362997058, -17.012041674368017], [178.596838595117021, -16.63915], [179.096609362997128, -16.43398427754742], [179.413509362997075, -16.379054277547393], [180.000000000000114, -16.067132663642436], [180.000000000000114, -16.555216566639157], [179.364142661964223, -16.801354076946847]]], [[[-179.917369384765237, -16.501783135649358], [-180.0, -16.555216566639157], [-180.0, -16.067132663642436], [-179.793320109048551, -16.020882256741228], [-179.917369384765237, -16.501783135649358]]]] } }, - { "type": "Feature", "properties": { "admin": "Falkland Islands", "name": "Falkland Is.", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-61.2, -51.85], [-60.0, -51.25], [-59.15, -51.5], [-58.55, -51.1], [-57.75, -51.55], [-58.05, -51.9], [-59.4, -52.2], [-59.85, -51.85], [-60.7, -52.3], [-61.2, -51.85]]] } }, - { "type": "Feature", "properties": { "admin": "France", "name": "France", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-52.556424730018378, 2.504705308437053], [-52.939657151894963, 2.124857692875622], [-53.41846513529525, 2.053389187016037], [-53.554839240113481, 2.334896551925964], [-53.778520677288881, 2.376702785650053], [-54.088062506717264, 2.105556545414629], [-54.524754197799737, 2.311848863123785], [-54.271229620975781, 2.738747870286942], [-54.184284023644743, 3.194172268075234], [-54.011503872276812, 3.622569891774857], [-54.3995422023565, 4.212611395683481], [-54.478632981979203, 4.896755682795642], [-53.958044603070917, 5.756548163267808], [-53.618452928264837, 5.646529038918401], [-52.882141282754063, 5.409850979021598], [-51.823342861525916, 4.565768133966144], [-51.657797410678874, 4.156232408053028], [-52.249337531123977, 3.241094468596287], [-52.556424730018378, 2.504705308437053]]], [[[9.560016310269132, 42.152491970379558], [9.229752231491771, 41.380006822264441], [8.77572309737536, 41.583611965494427], [8.544212680707828, 42.256516628583078], [8.746009148807586, 42.628121853193946], [9.390000848028901, 43.009984849614725], [9.560016310269132, 42.152491970379558]]], [[[3.588184441755714, 50.378992418003563], [4.28602298342514, 49.90749664977254], [4.799221632515752, 49.985373033236314], [5.674051954784885, 49.529483547557433], [5.897759230176375, 49.442667141307155], [6.186320428094204, 49.463802802114444], [6.658229607783538, 49.201958319691549], [8.09927859867477, 49.017783515003366], [7.59367638513106, 48.333019110703724], [7.466759067422228, 47.620581976911851], [7.192202182655533, 47.449765529970982], [6.736571079138086, 47.541801255882874], [6.768713820023634, 47.287708238303672], [6.037388950228971, 46.725778713561894], [6.022609490593566, 46.272989813820502], [6.500099724970453, 46.429672756529428], [6.84359297041456, 45.991146552100659], [6.80235517744566, 45.708579820328673], [7.096652459347835, 45.333098863295859], [6.749955275101711, 45.028517971367584], [7.007562290076661, 44.254766750661382], [7.549596388386161, 44.127901109384808], [7.435184767291841, 43.693844916349164], [6.529245232783068, 43.12889232031835], [4.556962517931395, 43.399650987311581], [3.100410597352719, 43.075200507167118], [2.985998976258486, 42.473015041669882], [1.826793247087181, 42.343384711265649], [0.701590610363922, 42.795734361332642], [0.338046909190581, 42.57954600683955], [-1.502770961910471, 43.034014390630482], [-1.901351284177735, 43.422802028978332], [-1.384225226232956, 44.022610378590166], [-1.193797573237361, 46.014917710954862], [-2.225724249673788, 47.064362697938201], [-2.963276129559573, 47.570326646507958], [-4.491554938159481, 47.95495433205641], [-4.592349819344746, 48.68416046812694], [-3.295813971357745, 48.901692409859628], [-1.616510789384932, 48.644421291694577], [-1.933494025063254, 49.776341864615759], [-0.98946895995536, 49.347375800160869], [1.338761020522753, 50.127173163445256], [1.6390010921385, 50.9466063502975], [2.51357303224617, 51.14850617126185], [2.65842207196033, 50.796848049515646], [3.123251580425716, 50.780363267614504], [3.588184441755714, 50.378992418003563]]]] } }, - { "type": "Feature", "properties": { "admin": "Gabon", "name": "Gabon", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[11.093772820691923, -3.978826592630546], [10.066135288135738, -2.969482517105681], [9.405245395554969, -2.144313246269042], [8.797995639693168, -1.111301364754496], [8.830086704146423, -0.779073581550037], [9.048419630579586, -0.459351494960217], [9.291350538783687, 0.268666083167687], [9.492888624721981, 1.010119533691494], [9.83028405115564, 1.067893784993799], [11.285078973036461, 1.057661851400013], [11.276449008843711, 2.261050930180871], [11.751665480199787, 2.326757513839993], [12.359380323952218, 2.19281220133945], [12.951333855855605, 2.321615708826939], [13.07582238124675, 2.267097072759014], [13.003113641012074, 1.830896307783319], [13.282631463278816, 1.31418366129688], [14.026668735417214, 1.395677395021153], [14.276265903386953, 1.196929836426619], [13.843320753645653, 0.038757635901149], [14.316418491277741, -0.552627455247048], [14.425455763413593, -1.333406670744971], [14.299210239324564, -1.998275648612213], [13.992407260807706, -2.470804945489099], [13.109618767965626, -2.428740329603513], [12.575284458067639, -1.948511244315134], [12.495702752338159, -2.391688327650242], [11.820963575903189, -2.514161472181982], [11.478038771214299, -2.765618991714241], [11.855121697648114, -3.42687061932105], [11.093772820691923, -3.978826592630546]]] } }, - { "type": "Feature", "properties": { "admin": "United Kingdom", "name": "United Kingdom", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-5.661948614921896, 54.554603176483838], [-6.197884894220976, 53.867565009163329], [-6.953730231137994, 54.073702297575622], [-7.572167934591078, 54.059956366585979], [-7.366030646178785, 54.595840969452688], [-7.572167934591078, 55.131622219454883], [-6.733847011736144, 55.172860012423783], [-5.661948614921896, 54.554603176483838]]], [[[-3.00500484863528, 58.635000108466322], [-4.073828497728015, 57.55302480735525], [-3.055001796877661, 57.690019029360933], [-1.959280564776918, 57.684799709699512], [-2.219988165689301, 56.870017401753515], [-3.119003058271118, 55.97379303651546], [-2.085009324543023, 55.909998480851264], [-2.005675679673856, 55.804902850350217], [-1.11499101399221, 54.624986477265388], [-0.4304849918542, 54.464376125702145], [0.184981316742039, 53.325014146531018], [0.469976840831777, 52.929999498091959], [1.681530795914739, 52.739520168663987], [1.559987827164377, 52.099998480836], [1.050561557630914, 51.806760565795678], [1.4498653499503, 51.289427802121949], [0.550333693045502, 50.765738837275862], [-0.787517462558639, 50.774988918656206], [-2.489997524414377, 50.500018622431227], [-2.956273972984035, 50.696879991247002], [-3.617448085942327, 50.228355617872708], [-4.542507900399243, 50.341837063185658], [-5.245023159191134, 49.959999904981082], [-5.776566941745299, 50.159677639356815], [-4.309989793301837, 51.210001125689146], [-3.414850633142122, 51.426008612669236], [-3.422719467108322, 51.426848167406078], [-4.984367234710873, 51.593466091510962], [-5.267295701508885, 51.991400458374571], [-4.222346564134852, 52.30135569926135], [-4.770013393564112, 52.840004991255611], [-4.579999152026914, 53.495003770555165], [-3.093830673788658, 53.404547400669671], [-3.092079637047106, 53.404440822963544], [-2.945008510744343, 53.98499970154667], [-3.614700825433033, 54.60093677329256], [-3.63000545898933, 54.615012925833], [-4.844169073903003, 54.790971177786837], [-5.082526617849224, 55.061600653699358], [-4.719112107756643, 55.508472601943467], [-5.047980922862108, 55.783985500707516], [-5.586397670911139, 55.311146145236805], [-5.64499874513018, 56.275014960344791], [-6.149980841486352, 56.785009670633528], [-5.78682471355529, 57.818848375064633], [-5.009998745127574, 58.630013332750039], [-4.211494513353555, 58.550845038479153], [-3.00500484863528, 58.635000108466322]]]] } }, - { "type": "Feature", "properties": { "admin": "Georgia", "name": "Georgia", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[41.55408410011065, 41.535656236327561], [41.703170607272703, 41.962942816732912], [41.453470086438379, 42.645123399417926], [40.875469191253785, 43.013628038091277], [40.321394484220313, 43.128633938156831], [39.955008579270917, 43.434997666999216], [40.07696495947976, 43.553104153002309], [40.922184686045618, 43.38215851498078], [42.394394565608806, 43.220307929042619], [43.756016880067378, 42.74082815202248], [43.931199985536828, 42.554973863284758], [44.537622918481979, 42.71199270280362], [45.470279168485703, 42.502780666669963], [45.776410353382758, 42.09244395605635], [46.404950799348818, 41.860675157227298], [46.145431756379004, 41.722802435872573], [46.637908156120574, 41.181672675128219], [46.501637404166921, 41.064444688474104], [45.962600538930381, 41.123872585609767], [45.217426385281577, 41.411451931314041], [44.972480096218071, 41.248128567055588], [43.582745802592726, 41.09214325618256], [42.619548781104484, 41.583172715819934], [41.55408410011065, 41.535656236327561]]] } }, - { "type": "Feature", "properties": { "admin": "Ghana", "name": "Ghana", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[1.060121697604927, 5.928837388528875], [-0.507637905265938, 5.343472601742675], [-1.063624640294193, 5.000547797053811], [-1.964706590167594, 4.71046214438337], [-2.856125047202397, 4.994475816259508], [-2.810701463217839, 5.389051215024109], [-3.244370083011261, 6.2504715031135], [-2.983584967450326, 7.379704901555511], [-2.56218950032624, 8.219627793811481], [-2.827496303712706, 9.642460842319775], [-2.963896246747111, 10.395334784380081], [-2.94040930827046, 10.962690334512557], [-1.203357713211431, 11.009819240762736], [-0.761575893548183, 10.936929633015053], [-0.438701544588582, 11.09834096927872], [0.023802524423701, 11.018681748900802], [-0.049784715159944, 10.706917832883928], [0.367579990245389, 10.191212876827176], [0.365900506195885, 9.46500397382948], [0.461191847342121, 8.677222601756013], [0.712029249686878, 8.312464504423827], [0.490957472342245, 7.411744289576474], [0.570384148774849, 6.914358628767188], [0.836931186536333, 6.279978745952147], [1.060121697604927, 5.928837388528875]]] } }, - { "type": "Feature", "properties": { "admin": "Guinea", "name": "Guinea", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-8.439298468448696, 7.686042792181736], [-8.722123582382123, 7.711674302598509], [-8.926064622422002, 7.309037380396375], [-9.208786383490844, 7.313920803247952], [-9.403348151069748, 7.526905218938906], [-9.33727983238458, 7.928534450711351], [-9.755342169625832, 8.541055202666923], [-10.016566534861253, 8.42850393313523], [-10.230093553091276, 8.406205552601291], [-10.505477260774667, 8.348896389189603], [-10.494315151399629, 8.715540676300433], [-10.65477047366589, 8.977178452994194], [-10.622395188835037, 9.267910061068276], [-10.839151984083299, 9.688246161330367], [-11.117481248407328, 10.045872911006283], [-11.917277390988655, 10.046983954300556], [-12.150338100625003, 9.858571682164378], [-12.425928514037562, 9.835834051955953], [-12.596719122762206, 9.620188300001969], [-12.711957566773076, 9.342711696810765], [-13.246550258832512, 8.903048610871506], [-13.685153977909788, 9.494743760613458], [-14.074044969122278, 9.886166897008248], [-14.330075852912367, 10.015719712763966], [-14.579698859098254, 10.214467271358513], [-14.693231980843501, 10.65630076745404], [-14.83955379887794, 10.876571560098139], [-15.130311245168167, 11.040411688679525], [-14.685687221728896, 11.527823798056485], [-14.382191534878727, 11.509271958863691], [-14.121406419317776, 11.677117010947693], [-13.900799729863772, 11.678718980348744], [-13.743160773157411, 11.811269029177408], [-13.828271857142122, 12.142644151249041], [-13.718743658899511, 12.247185573775507], [-13.700476040084322, 12.586182969610192], [-13.217818162478235, 12.575873521367964], [-12.499050665730561, 12.332089952031053], [-12.278599005573438, 12.354440008997285], [-12.20356482588563, 12.465647691289401], [-11.658300950557928, 12.386582749882834], [-11.513942836950587, 12.442987575729415], [-11.456168585648269, 12.076834214725336], [-11.297573614944508, 12.077971096235768], [-11.036555955438256, 12.211244615116513], [-10.870829637078211, 12.177887478072106], [-10.593223842806278, 11.923975328005977], [-10.165213792348835, 11.844083563682743], [-9.890992804392011, 12.060478623904968], [-9.567911749703212, 12.194243068892472], [-9.327616339546008, 12.334286200403451], [-9.127473517279581, 12.308060411015331], [-8.905264858424529, 12.088358059126433], [-8.786099005559462, 11.812560939984705], [-8.376304897484911, 11.393645941610627], [-8.581305304386772, 11.136245632364801], [-8.620321010767126, 10.810890814655181], [-8.407310756860026, 10.90925690352276], [-8.282357143578279, 10.792597357623842], [-8.335377163109738, 10.494811916541932], [-8.029943610048617, 10.206534939001711], [-8.22933712404682, 10.129020290563897], [-8.309616461612249, 9.789531968622439], [-8.079113735374348, 9.376223863152033], [-7.832100389019186, 8.575704250518625], [-8.203498907900878, 8.455453192575446], [-8.299048631208562, 8.316443589710302], [-8.221792364932197, 8.123328762235571], [-8.280703497744936, 7.687179673692156], [-8.439298468448696, 7.686042792181736]]] } }, - { "type": "Feature", "properties": { "admin": "Gambia", "name": "Gambia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-16.84152462408127, 13.151393947802557], [-16.713728807023468, 13.594958604379853], [-15.624596320039936, 13.623587347869556], [-15.398770310924457, 13.860368760630916], [-15.081735398813816, 13.876491807505982], [-14.687030808968483, 13.63035696049978], [-14.376713833055785, 13.625680243377371], [-14.046992356817478, 13.794067898000446], [-13.844963344772404, 13.505041612191999], [-14.277701788784553, 13.28058502853224], [-14.712197231494626, 13.298206691943774], [-15.141163295949463, 13.509511623585235], [-15.511812506562931, 13.278569647672864], [-15.691000535534991, 13.270353094938455], [-15.931295945692208, 13.130284125211331], [-16.84152462408127, 13.151393947802557]]] } }, - { "type": "Feature", "properties": { "admin": "Guinea Bissau", "name": "Guinea-Bissau", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-15.130311245168167, 11.040411688679525], [-15.664180467175523, 11.458474025920792], [-16.085214199273562, 11.524594021038236], [-16.314786749730199, 11.806514797406548], [-16.308947312881227, 11.958701890506116], [-16.613838263403277, 12.170911159712698], [-16.67745195155457, 12.38485158940105], [-16.147716844130581, 12.547761542201185], [-15.816574266004251, 12.515567124883345], [-15.548476935274005, 12.628170070847343], [-13.700476040084322, 12.586182969610192], [-13.718743658899511, 12.247185573775507], [-13.828271857142122, 12.142644151249041], [-13.743160773157411, 11.811269029177408], [-13.900799729863772, 11.678718980348744], [-14.121406419317776, 11.677117010947693], [-14.382191534878727, 11.509271958863691], [-14.685687221728896, 11.527823798056485], [-15.130311245168167, 11.040411688679525]]] } }, - { "type": "Feature", "properties": { "admin": "Equatorial Guinea", "name": "Eq. Guinea", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[9.492888624721981, 1.010119533691494], [9.305613234096255, 1.160911363119183], [9.649158155972627, 2.283866075037735], [11.276449008843711, 2.261050930180871], [11.285078973036461, 1.057661851400013], [9.83028405115564, 1.067893784993799], [9.492888624721981, 1.010119533691494]]] } }, - { "type": "Feature", "properties": { "admin": "Greece", "name": "Greece", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[23.699980096133, 35.705004380835526], [24.246665073348673, 35.368022365860149], [25.025015496528873, 35.424995632461979], [25.769207797964182, 35.354018052709073], [25.745023227651579, 35.179997666966209], [26.290002882601719, 35.299990342747911], [26.164997592887651, 35.004995429009789], [24.724982130642299, 34.919987697889603], [24.735007358506941, 35.084990546197581], [23.514978468528106, 35.27999156345097], [23.699980096133, 35.705004380835526]]], [[[26.604195590936282, 41.562114569661098], [26.294602085075777, 40.936261298174244], [26.056942172965499, 40.824123440100827], [25.44767703624418, 40.852545477861455], [24.925848422960932, 40.947061672523226], [23.714811232200809, 40.687129218095116], [24.407998894964063, 40.124992987624083], [23.89996788910258, 39.962005520175573], [23.342999301860797, 39.960997829745786], [22.813987664488959, 40.476005153966547], [22.626298862404777, 40.256561184239175], [22.849747755634805, 39.659310818025759], [23.350027296652595, 39.190011298167256], [22.97309939951554, 38.97090322524965], [23.53001631032495, 38.51000112563846], [24.025024855248937, 38.219992987616443], [24.040011020613601, 37.655014553369419], [23.115002882589145, 37.920011298162215], [23.409971958111065, 37.409990749657389], [22.77497195810863, 37.305010077456551], [23.154225294698612, 36.422505804992042], [22.4900281104511, 36.410000108377446], [21.670026482843692, 36.84498647719419], [21.295010613701574, 37.644989325504689], [21.120034213961329, 38.31032339126272], [20.730032179454579, 38.769985256498778], [20.217712029712853, 39.340234686839629], [20.150015903410516, 39.624997666984022], [20.615000441172779, 40.110006822259422], [20.67499677906363, 40.434999904943048], [20.999989861747274, 40.580003973953964], [21.020040317476422, 40.842726955725873], [21.674160597426969, 40.931274522457976], [22.055377638444266, 41.149865831052686], [22.597308383889008, 41.130487168943198], [22.76177, 41.3048], [22.952377150166562, 41.337993882811212], [23.692073601992455, 41.309080918943849], [24.492644891058031, 41.583896185872035], [25.19720136892553, 41.234485988930651], [26.106138136507177, 41.328898830727823], [26.11704186372091, 41.826904608724725], [26.604195590936282, 41.562114569661098]]]] } }, - { "type": "Feature", "properties": { "admin": "Greenland", "name": "Greenland", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-46.76379, 82.62796], [-43.40644, 83.22516], [-39.89753, 83.18018], [-38.62214, 83.54905], [-35.08787, 83.64513], [-27.10046, 83.51966], [-20.84539, 82.72669], [-22.69182, 82.34165], [-26.51753, 82.29765], [-31.9, 82.2], [-31.39646, 82.02154], [-27.85666, 82.13178], [-24.84448, 81.78697], [-22.90328, 82.09317], [-22.07175, 81.73449], [-23.16961, 81.15271], [-20.62363, 81.52462], [-15.76818, 81.91245], [-12.77018, 81.71885], [-12.20855, 81.29154], [-16.28533, 80.58004], [-16.85, 80.35], [-20.04624, 80.17708], [-17.73035, 80.12912], [-18.9, 79.4], [-19.70499, 78.75128], [-19.67353, 77.63859], [-18.47285, 76.98565], [-20.03503, 76.94434], [-21.67944, 76.62795], [-19.83407, 76.09808], [-19.59896, 75.24838], [-20.66818, 75.15585], [-19.37281, 74.29561], [-21.59422, 74.22382], [-20.43454, 73.81713], [-20.76234, 73.46436], [-22.17221, 73.30955], [-23.56593, 73.30663], [-22.31311, 72.62928], [-22.29954, 72.18409], [-24.27834, 72.59788], [-24.79296, 72.3302], [-23.44296, 72.08016], [-22.13281, 71.46898], [-21.75356, 70.66369], [-23.53603, 70.471], [-24.30702, 70.85649], [-25.54341, 71.43094], [-25.20135, 70.75226], [-26.36276, 70.22646], [-23.72742, 70.18401], [-22.34902, 70.12946], [-25.02927, 69.2588], [-27.74737, 68.47046], [-30.67371, 68.12503], [-31.77665, 68.12078], [-32.81105, 67.73547], [-34.20196, 66.67974], [-36.35284, 65.9789], [-37.04378, 65.93768], [-38.37505, 65.69213], [-39.81222, 65.45848], [-40.66899, 64.83997], [-40.68281, 64.13902], [-41.1887, 63.48246], [-42.81938, 62.68233], [-42.41666, 61.90093], [-42.86619, 61.07404], [-43.3784, 60.09772], [-44.7875, 60.03676], [-46.26364, 60.85328], [-48.26294, 60.85843], [-49.23308, 61.40681], [-49.90039, 62.38336], [-51.63325, 63.62691], [-52.14014, 64.27842], [-52.27659, 65.1767], [-53.66166, 66.09957], [-53.30161, 66.8365], [-53.96911, 67.18899], [-52.9804, 68.35759], [-51.47536, 68.72958], [-51.08041, 69.14781], [-50.87122, 69.9291], [-52.013585, 69.574925], [-52.55792, 69.42616], [-53.45629, 69.283625], [-54.68336, 69.61003], [-54.75001, 70.28932], [-54.35884, 70.821315], [-53.431315, 70.835755], [-51.39014, 70.56978], [-53.10937, 71.20485], [-54.00422, 71.54719], [-55.0, 71.406536967272558], [-55.83468, 71.65444], [-54.71819, 72.58625], [-55.32634, 72.95861], [-56.12003, 73.64977], [-57.32363, 74.71026], [-58.59679, 75.09861], [-58.58516, 75.51727], [-61.26861, 76.10238], [-63.39165, 76.1752], [-66.06427, 76.13486], [-68.50438, 76.06141], [-69.66485, 76.37975], [-71.40257, 77.00857], [-68.77671, 77.32312], [-66.76397, 77.37595], [-71.04293, 77.63595], [-73.297, 78.04419], [-73.15938, 78.43271], [-69.37345, 78.91388], [-65.7107, 79.39436], [-65.3239, 79.75814], [-68.02298, 80.11721], [-67.15129, 80.51582], [-63.68925, 81.21396], [-62.23444, 81.3211], [-62.65116, 81.77042], [-60.28249, 82.03363], [-57.20744, 82.19074], [-54.13442, 82.19962], [-53.04328, 81.88833], [-50.39061, 82.43883], [-48.00386, 82.06481], [-46.59984, 81.985945], [-44.523, 81.6607], [-46.9007, 82.19979], [-46.76379, 82.62796]]] } }, - { "type": "Feature", "properties": { "admin": "Guatemala", "name": "Guatemala", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-90.095554572290951, 13.73533763270073], [-90.608624030300817, 13.909771429901948], [-91.232410244496037, 13.927832342987953], [-91.689746670279106, 14.126218166556452], [-92.227750006869812, 14.538828640190925], [-92.203229539747298, 14.830102850804066], [-92.087215949252041, 15.064584662328436], [-92.229248623406249, 15.251446641495857], [-91.747960171255912, 16.066564846251719], [-90.464472622422647, 16.069562079324651], [-90.438866950222021, 16.410109768128091], [-90.600846727240906, 16.470777899638758], [-90.711821865587694, 16.687483018454724], [-91.081670091500641, 16.918476670799404], [-91.453921271515128, 17.252177232324168], [-91.002269253284197, 17.254657701074176], [-91.001519945015943, 17.817594916245707], [-90.067933519230948, 17.819326076727474], [-89.143080410503302, 17.808318996649316], [-89.15080603713092, 17.015576687075832], [-89.229121670269265, 15.886937567605166], [-88.930612759135244, 15.887273464415072], [-88.604586147805833, 15.706380113177358], [-88.518364020526846, 15.855389105690971], [-88.22502275262201, 15.727722479713901], [-88.680679694355618, 15.346247056535301], [-89.15481096063354, 15.066419175674806], [-89.225220099631244, 14.874286200413618], [-89.145535041037149, 14.67801911056908], [-89.353325975282772, 14.424132798719112], [-89.587342698916544, 14.362586167859485], [-89.5342193265205, 14.244815578666302], [-89.7219339668207, 14.134228013561694], [-90.064677903996568, 13.881969509328924], [-90.095554572290951, 13.73533763270073]]] } }, - { "type": "Feature", "properties": { "admin": "Guyana", "name": "Guyana", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-59.758284878159181, 8.367034816924045], [-59.10168412945864, 7.99920197187049], [-58.482962205628041, 7.347691351750696], [-58.454876064677414, 6.832787380394463], [-58.078103196837361, 6.809093736188641], [-57.542218593970631, 6.321268215353355], [-57.147436489476874, 5.973149929219161], [-57.307245856339492, 5.073566595882225], [-57.914288906472123, 4.812626451024413], [-57.860209520078691, 4.576801052260449], [-58.044694383360664, 4.060863552258382], [-57.601568976457848, 3.334654649260684], [-57.281433478409703, 3.333491929534119], [-57.150097825739898, 2.768926906745406], [-56.53938574891454, 1.89952260986692], [-56.782704230360814, 1.863710842288653], [-57.33582292339689, 1.948537705895759], [-57.660971035377358, 1.682584947105638], [-58.113449876525003, 1.507195135907025], [-58.429477098205957, 1.46394196207872], [-58.540012986878288, 1.26808828369252], [-59.030861579002639, 1.317697658692722], [-59.646043667221242, 1.786893825686789], [-59.718545701726732, 2.249630438644359], [-59.974524909084543, 2.755232652188055], [-59.815413174057852, 3.606498521332085], [-59.538039923731219, 3.958802598481937], [-59.767405768458701, 4.423502915866606], [-60.111002366767373, 4.574966538914082], [-59.980958624904865, 5.014061184098138], [-60.213683437731319, 5.2444863956876], [-60.733574184803707, 5.2002772078619], [-61.410302903881941, 5.959068101419616], [-61.139415045807937, 6.234296779806142], [-61.159336310456467, 6.696077378766317], [-60.543999192940966, 6.856584377464881], [-60.295668097562377, 7.043911444522918], [-60.637972785063752, 7.414999904810853], [-60.550587938058186, 7.779602972846178], [-59.758284878159181, 8.367034816924045]]] } }, - { "type": "Feature", "properties": { "admin": "Honduras", "name": "Honduras", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-87.316654425795463, 12.984685777229], [-87.48940873894712, 13.29753489832393], [-87.793111131526501, 13.384480495655165], [-87.723502977229288, 13.785050360565602], [-87.859515347021599, 13.893312486217097], [-88.065342576840109, 13.964625962779788], [-88.503997972349609, 13.845485948130939], [-88.541230841815931, 13.98015473068352], [-88.843072882832743, 14.140506700085208], [-89.058511929057644, 14.340029405164213], [-89.353325975282786, 14.424132798719084], [-89.145535041037164, 14.678019110569149], [-89.22522009963123, 14.874286200413675], [-89.154810960633526, 15.066419175674863], [-88.680679694355575, 15.346247056535386], [-88.225022752621925, 15.727722479714027], [-88.121153123715359, 15.688655096901355], [-87.901812506852394, 15.864458319558194], [-87.615680101252309, 15.878798529519198], [-87.522920905288444, 15.797278957578779], [-87.367762417332116, 15.846940009011286], [-86.903191291028165, 15.756712958229565], [-86.440945604177372, 15.782835394753189], [-86.119233974944322, 15.893448798073958], [-86.00195431185783, 16.005405788634388], [-85.68331743034625, 15.953651841693949], [-85.444003872402547, 15.885749009662444], [-85.182443610357183, 15.909158433490628], [-84.98372188997881, 15.995923163308698], [-84.526979743167118, 15.857223619037423], [-84.36825558138257, 15.835157782448729], [-84.063054572266807, 15.648244126849132], [-83.773976610026111, 15.42407176356687], [-83.410381232420363, 15.27090281825377], [-83.147219000974104, 14.995829169164207], [-83.489988776366005, 15.01626719813566], [-83.628584967772866, 14.880073960830368], [-83.975721401693576, 14.749435939996483], [-84.228341640952394, 14.748764146376626], [-84.449335903648588, 14.62161428472251], [-84.64958207877963, 14.666805324761865], [-84.820036790694289, 14.819586696832628], [-84.924500698572302, 14.790492865452332], [-85.052787441736868, 14.551541042534719], [-85.148750576502877, 14.560196844943615], [-85.165364549484806, 14.354369615125048], [-85.514413011400265, 14.079011745657905], [-85.698665330736944, 13.960078436737998], [-85.801294725268505, 13.8360549992376], [-86.096263800790595, 14.03818736414723], [-86.312142096689826, 13.771356106008223], [-86.520708177419891, 13.778487453664464], [-86.755086636079596, 13.754845485890936], [-86.733821784191463, 13.263092556201398], [-86.880557013684353, 13.254204209847213], [-87.005769009127434, 13.025794379117254], [-87.316654425795463, 12.984685777229]]] } }, - { "type": "Feature", "properties": { "admin": "Croatia", "name": "Croatia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[18.829838087650039, 45.908877671891837], [19.072768995854172, 45.521511135432078], [19.390475701584588, 45.236515611342369], [19.005486281010118, 44.860233669609144], [18.553214145591646, 45.08158966733145], [17.861783481526398, 45.067740383477137], [17.00214603035101, 45.233776760430935], [16.534939406000202, 45.211607570977705], [16.318156772535868, 45.004126695325901], [15.959367303133373, 45.233776760430935], [15.750026075918978, 44.81871165626255], [16.239660271884528, 44.351143296885695], [16.456442905348862, 44.041239732431265], [16.916156447017325, 43.667722479825663], [17.297373488034449, 43.446340643887353], [17.674921502358981, 43.028562527023603], [18.56, 42.65], [18.450016310304814, 42.47999136002931], [17.509970330483323, 42.84999461523914], [16.930005730871638, 43.209998480800373], [16.015384555737679, 43.507215481127204], [15.174453973052094, 44.243191229827907], [15.376250441151793, 44.317915350922064], [14.920309279040504, 44.73848399512945], [14.901602410550874, 45.076060289076104], [14.258747592839992, 45.233776760430935], [13.952254672917032, 44.802123521496853], [13.65697553880119, 45.136935126315947], [13.679403110415816, 45.484149074884996], [13.715059848697248, 45.500323798192419], [14.411968214585496, 45.466165676447403], [14.595109490627916, 45.63494090431282], [14.935243767972961, 45.471695054702757], [15.327674594797424, 45.452316392593325], [15.323953891672428, 45.731782538427687], [15.671529575267638, 45.8341535507979], [15.768732944408608, 46.23810822202352], [16.564808383864939, 46.503750922219794], [16.882515089595412, 46.380631822284428], [17.630066359129554, 45.951769110694087], [18.456062452882858, 45.759481106136143], [18.829838087650039, 45.908877671891837]]] } }, - { "type": "Feature", "properties": { "admin": "Haiti", "name": "Haiti", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-73.189790615517595, 19.915683905511909], [-72.579672817663607, 19.871500555902351], [-71.71236141629295, 19.714455878167353], [-71.624873216422813, 19.169837958243303], [-71.701302659782485, 18.785416978424049], [-71.945112067335543, 18.616900132720257], [-71.687737596305865, 18.316660061104468], [-71.708304816358037, 18.044997056546091], [-72.372476162389333, 18.214960842354053], [-72.844411180294856, 18.145611070218362], [-73.454554816365018, 18.217906398994696], [-73.922433234335642, 18.030992743395], [-74.458033616824764, 18.342549953682703], [-74.369925299767118, 18.664907538319408], [-73.449542202432696, 18.526052964751141], [-72.694937099890623, 18.445799465401858], [-72.334881557896992, 18.66842153571525], [-72.791649542924873, 19.101625067618027], [-72.784104783810264, 19.483591416903405], [-73.41502234566174, 19.639550889560276], [-73.189790615517595, 19.915683905511909]]] } }, - { "type": "Feature", "properties": { "admin": "Hungary", "name": "Hungary", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[16.202298211337361, 46.852385972676949], [16.534267612380372, 47.496170966169103], [16.340584344150411, 47.712901923201215], [16.903754103267257, 47.714865627628321], [16.979666782304033, 48.123497015976298], [17.488472934649813, 47.867466132186209], [17.857132602620023, 47.758428860050365], [18.696512892336923, 47.88095368101439], [18.777024773847668, 48.081768296900627], [19.174364861739885, 48.111378892603859], [19.66136355965849, 48.266614895208647], [19.769470656013109, 48.2026911484636], [20.239054396249344, 48.327567247096916], [20.473562045989862, 48.562850043321809], [20.801293979584919, 48.62385407164237], [21.872236362401729, 48.319970811550007], [22.085608351334848, 48.422264309271782], [22.640819939878746, 48.150239569687351], [22.710531447040488, 47.882193915389394], [22.09976769378283, 47.672439276716695], [21.626514926853869, 46.994237779318148], [21.021952345471245, 46.316087958351886], [20.220192498462833, 46.127468980486547], [19.596044549241579, 46.171729844744533], [18.829838087649957, 45.908877671891915], [18.456062452882858, 45.759481106136121], [17.630066359129554, 45.95176911069418], [16.882515089595298, 46.380631822284428], [16.564808383864854, 46.503750922219822], [16.370504998447412, 46.841327216166498], [16.202298211337361, 46.852385972676949]]] } }, - { "type": "Feature", "properties": { "admin": "Indonesia", "name": "Indonesia", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[120.715608758630438, -10.239581394087862], [120.295014276206871, -10.258649997603525], [118.967808465654684, -9.55796925215803], [119.900309686361609, -9.361340427287514], [120.425755649905398, -9.665921319215796], [120.775501743656719, -9.969675388227456], [120.715608758630438, -10.239581394087862]]], [[[124.435950148619384, -10.14000090906144], [123.579981724136701, -10.359987481327961], [123.459989048354998, -10.239994805546171], [123.55000939340745, -9.900015557497978], [123.980008986508096, -9.290026950724693], [124.96868248911619, -8.892790215697046], [125.070019972840612, -9.089987481322835], [125.088520135601073, -9.393173109579321], [124.435950148619384, -10.14000090906144]]], [[[117.900018345207741, -8.095681247594923], [118.260616489740471, -8.362383314653327], [118.87845991422212, -8.280682875199828], [119.126506789223086, -8.705824883665072], [117.97040164598927, -8.906639499551257], [117.277730747549015, -9.040894870645557], [116.74014082241662, -9.032936700072637], [117.083737420725313, -8.457157891476539], [117.632024367342126, -8.44930307376819], [117.900018345207741, -8.095681247594923]]], [[[122.903537225436082, -8.094234307490735], [122.756982863456287, -8.649807631060638], [121.2544905945701, -8.933666273639941], [119.924390903809567, -8.810417982623873], [119.920928582846102, -8.44485890059107], [120.715091994307542, -8.236964613480863], [121.341668735846554, -8.53673959720602], [122.007364536630405, -8.46062021244016], [122.903537225436082, -8.094234307490735]]], [[[108.623478631628927, -6.777673841990675], [110.539227329553285, -6.877357679881682], [110.759575636845909, -6.465186455921751], [112.614811232556349, -6.946035658397589], [112.978768345188087, -7.594213148634578], [114.478935174621142, -7.776527601760277], [115.705526971501058, -8.370806573116864], [114.564511346496488, -8.75181690840483], [113.464733514460875, -8.348947442257424], [112.559672479301028, -8.376180922075163], [111.522061395312448, -8.302128594600957], [110.586149530074294, -8.122604668819021], [109.427667270955183, -7.740664157749761], [108.693655226681301, -7.641600437046219], [108.277763299596302, -7.766657403192579], [106.454102004016136, -7.354899590690947], [106.280624220812285, -6.924899997590201], [105.365486281355516, -6.851416110871169], [106.051645949327053, -5.895918877794499], [107.265008579540165, -5.954985039904058], [108.072091099074683, -6.345762220895237], [108.486846144649235, -6.421984958525768], [108.623478631628927, -6.777673841990675]]], [[[134.724624465066654, -6.214400730009286], [134.210133905168902, -6.895237725454704], [134.112775506730998, -6.142467136259014], [134.290335728085779, -5.783057549669038], [134.499625278867882, -5.445042006047898], [134.727001580952106, -5.737582289252158], [134.724624465066654, -6.214400730009286]]], [[[127.249215122588893, -3.459065036638889], [126.874922723498855, -3.790982761249579], [126.183802118027302, -3.607376397316556], [125.989033644719257, -3.177273451351325], [127.00065148326496, -3.12931772218441], [127.249215122588893, -3.459065036638889]]], [[[130.471344028851775, -3.09376433676762], [130.834836053592767, -3.858472181822761], [129.990546502808115, -3.446300957862817], [129.155248651242403, -3.362636813982248], [128.590683628453633, -3.428679294451256], [127.898891229362334, -3.393435967628192], [128.135879347852779, -2.843650404474914], [129.370997756060888, -2.802154229344551], [130.471344028851775, -3.09376433676762]]], [[[134.143367954647772, -1.151867364103594], [134.422627394753022, -2.769184665542383], [135.457602980694674, -3.367752780779113], [136.293314243718754, -2.30704233155609], [137.4407377463275, -1.703513278819372], [138.329727411044757, -1.70268645590265], [139.18492068904294, -2.051295668143637], [139.926684198160387, -2.409051608900284], [141.000210402591847, -2.600151055515624], [141.017056919519007, -5.85902190513802], [141.033851760013874, -9.117892754760417], [140.143415155192542, -8.297167657100955], [139.127766554928087, -8.096042982620942], [138.881476678624949, -8.380935153846094], [137.614473911692812, -8.41168263105976], [138.039099155835174, -7.597882175327354], [138.668621454014783, -7.320224704623072], [138.407913853102343, -6.232849216337483], [137.927839797110835, -5.393365573755998], [135.989250116113453, -4.546543877789047], [135.164597609599667, -4.462931410340771], [133.662880487197867, -3.538853448097526], [133.367704705946778, -4.024818617370314], [132.983955519747326, -4.112978610860281], [132.75694095268895, -3.746282647317129], [132.753788690319197, -3.311787204607071], [131.989804315316178, -2.820551039240455], [133.066844517143466, -2.460417982598443], [133.780030959203486, -2.479848321140209], [133.69621178602614, -2.214541517753687], [132.232373488494204, -2.212526136894325], [131.836221958544684, -1.617161960459597], [130.942839797082797, -1.432522067880796], [130.519558140180038, -0.937720228686075], [131.867537876513609, -0.695461114101818], [132.380116408416768, -0.369537855636977], [133.985548130428384, -0.780210463060442], [134.143367954647772, -1.151867364103594]]], [[[125.240500522971573, 1.419836127117605], [124.43703535369734, 0.427881171058971], [123.685504998876695, 0.235593166500877], [122.723083123872854, 0.431136786293337], [121.056724888189081, 0.381217352699451], [120.18308312386273, 0.23724681233422], [120.040869582195455, -0.519657891444851], [120.935905389490699, -1.408905938323372], [121.475820754076167, -0.955962009285116], [123.34056481332847, -0.615672702643081], [123.258399285984481, -1.076213067228337], [122.822715285331597, -0.930950616055881], [122.388529901215364, -1.516858005381124], [121.508273553555455, -1.904482924002422], [122.454572381684272, -3.186058444840881], [122.271896193532541, -3.529500013852696], [123.170962762546537, -4.683693129091707], [123.162332798353759, -5.34060393638596], [122.628515252778683, -5.634591159694494], [122.236394484548057, -5.282933037948281], [122.71956912647704, -4.46417164471579], [121.738233677254357, -4.851331475446499], [121.48946333220124, -4.574552504091215], [121.619171177253861, -4.188477878438674], [120.898181593917684, -3.602105401222828], [120.972388950688767, -2.627642917494909], [120.305452915529884, -2.931603692235725], [120.39004723519173, -4.097579034037223], [120.430716587405371, -5.528241062037778], [119.796543410319487, -5.67340016034565], [119.36690555224493, -5.379878024927804], [119.653606398600104, -4.459417412944958], [119.498835483885969, -3.49441171632651], [119.078344354326987, -3.487021986508764], [118.767768996252869, -2.801999200047688], [119.180973748858662, -2.147103773612798], [119.323393996255049, -1.35314706788047], [119.825998976725828, 0.154254462073496], [120.035701938966341, 0.566477362465804], [120.885779250167687, 1.309222723796835], [121.666816847826965, 1.013943589681076], [122.927566766451818, 0.875192368977465], [124.077522414242836, 0.917101955566139], [125.065989211121803, 1.643259182131558], [125.240500522971573, 1.419836127117605]]], [[[128.688248732620707, 1.132385972494106], [128.635952183141342, 0.258485826006179], [128.120169712436166, 0.356412665199286], [127.968034295768845, -0.252077325037533], [128.379998813999691, -0.780003757331286], [128.100015903842291, -0.899996433112974], [127.69647464407501, -0.266598402511505], [127.399490187693743, 1.011721503092573], [127.600511509309044, 1.81069082275718], [127.932377557487484, 2.174596258956555], [128.004156121940809, 1.628531398928331], [128.594559360875451, 1.540810655112864], [128.688248732620707, 1.132385972494106]]], [[[117.875627069166001, 1.827640692548911], [118.996747267738158, 0.902219143066048], [117.811858351717788, 0.784241848143722], [117.478338657706047, 0.102474676917026], [117.521643507966587, -0.803723239753211], [116.560048455879496, -1.487660821136231], [116.533796828275158, -2.483517347832901], [116.148083937648607, -4.012726332214014], [116.000857782049067, -3.657037448749008], [114.864803094544513, -4.106984144714416], [114.468651564595064, -3.49570362713382], [113.755671828264099, -3.439169610206519], [113.256994256647545, -3.118775729996854], [112.068126255340644, -3.478392022316071], [111.703290643359992, -2.994442233902631], [111.04824018762821, -3.049425957861188], [110.223846063275971, -2.934032484553483], [110.070935500124335, -1.592874037282414], [109.571947869914041, -1.314906507984489], [109.091873813922518, -0.459506524257051], [108.952657505328162, 0.415375474444346], [109.069136183714036, 1.341933905437642], [109.663260125773718, 2.006466986494984], [109.830226678508836, 1.338135687664191], [110.514060907027101, 0.773131415200993], [111.159137811326559, 0.976478176269509], [111.797548455860408, 0.904441229654651], [112.380251906383648, 1.410120957846757], [112.859809198052176, 1.497790025229946], [113.805849644019531, 1.217548732911041], [114.621355422017473, 1.430688177898886], [115.134037306785231, 2.821481838386219], [115.51907840379198, 3.169238389494395], [115.86551720587677, 4.306559149590156], [117.01521447150634, 4.306094061699468], [117.882034946770162, 4.137551377779487], [117.313232456533513, 3.234428208830578], [118.048329705885351, 2.287690131027361], [117.875627069166001, 1.827640692548911]]], [[[105.817655063909356, -5.852355645372411], [104.710384149191498, -5.873284600450644], [103.868213332130736, -5.037314955264974], [102.584260695406897, -4.220258884298203], [102.156173130300999, -3.614146009946765], [101.399113397225051, -2.799777113459171], [100.902502882900137, -2.05026213949786], [100.141980828860596, -0.650347588710957], [99.26373986206022, 0.183141587724663], [98.970011020913319, 1.042882391764536], [98.601351352943084, 1.823506577965616], [97.699597609449881, 2.453183905442116], [97.17694217324987, 3.30879059489861], [96.424016554757316, 3.86885976807791], [95.380876092513475, 4.970782172053673], [95.293026157617305, 5.479820868344816], [95.936862827541745, 5.439513251157108], [97.484882033277088, 5.24632090903401], [98.369169142655679, 4.268370266126366], [99.142558628335792, 3.590349636240915], [99.693997837322399, 3.174328518075156], [100.641433546961665, 2.099381211755798], [101.658012323007313, 2.083697414555189], [102.498271112073212, 1.398700466310217], [103.076840448013002, 0.561361395668854], [103.838396030698348, 0.104541734208666], [103.437645298274973, -0.711945896002845], [104.010788608824001, -1.059211521004229], [104.369991489684878, -1.084843031421016], [104.539490187602155, -1.782371514496716], [104.887892694113987, -2.340425306816655], [105.622111444116982, -2.42884368246807], [106.10859337771268, -3.06177662517895], [105.857445916774111, -4.305524997579723], [105.817655063909356, -5.852355645372411]]]] } }, - { "type": "Feature", "properties": { "admin": "India", "name": "India", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[77.837450799474553, 35.494009507787759], [78.912268914713209, 34.321936346975782], [78.811086460285722, 33.506198025032404], [79.208891636068572, 32.994394639613709], [79.176128777995501, 32.483779812137705], [78.458446486325997, 32.61816437431272], [78.738894484374001, 31.515906073527056], [79.721366815107089, 30.882714748654724], [81.11125613802929, 30.183480943313398], [80.476721225917373, 29.729865220655334], [80.088424513676259, 28.794470119740136], [81.057202589851997, 28.416095282499036], [81.999987420584958, 27.925479234319987], [83.304248895199535, 27.364505723575554], [84.675017938173767, 27.234901231387528], [85.25177859898335, 26.726198431906337], [86.024392938179147, 26.630984605408567], [87.22747195836628, 26.39789805755607], [88.060237664749806, 26.414615383402484], [88.174804315140904, 26.810405178325944], [88.043132765661198, 27.445818589786818], [88.120440708369841, 27.876541652939586], [88.730325962278528, 28.086864732367509], [88.814248488320544, 27.299315904239361], [88.835642531289366, 27.098966376243755], [89.744527622438838, 26.71940298105995], [90.37327477413406, 26.875724188742872], [91.217512648486405, 26.808648179628019], [92.033483514375078, 26.838310451763554], [92.10371178585973, 27.4526140406332], [91.69665652869665, 27.771741848251661], [92.503118931043616, 27.896876329046442], [93.413347609432662, 28.640629380807219], [94.565990431702929, 29.277438055939978], [95.404802280664612, 29.031716620392125], [96.117678664131006, 29.452802028922459], [96.586590610747479, 28.830979519154337], [96.248833449287758, 28.411030992134435], [97.327113885490007, 28.261582749946331], [97.402561476636123, 27.88253611908544], [97.051988559968066, 27.699058946233144], [97.133999058015277, 27.08377350514996], [96.419365675850941, 27.264589341739221], [95.124767694074933, 26.573572089132295], [95.155153436262566, 26.001307277932078], [94.603249139385355, 25.162495428970399], [94.552657912171611, 24.675238348890328], [94.106741977925054, 23.850740871673477], [93.325187615942767, 24.078556423432197], [93.286326938859247, 23.043658352138998], [93.060294224014598, 22.703110663335565], [93.166127557348361, 22.278459580977099], [92.672720981825549, 22.041238918541247], [92.146034783906799, 23.62749868417259], [91.869927606171302, 23.62434642180278], [91.706475050832083, 22.985263983649183], [91.158963250699713, 23.503526923104381], [91.467729933643668, 24.072639471934789], [91.915092807994398, 24.130413723237108], [92.376201613334786, 24.976692816664961], [91.799595981822065, 25.14743174895731], [90.872210727912105, 25.13260061288954], [89.920692580121838, 25.269749864192171], [89.832480910199592, 25.965082098895476], [89.355094028687276, 26.014407253518065], [88.56304935094974, 26.446525580342716], [88.209789259802477, 25.768065700782707], [88.931553989623069, 25.238692328384769], [88.30637251175601, 24.866079413344199], [88.084422235062405, 24.501657212821918], [88.699940220090895, 24.233714911388557], [88.529769728553759, 23.631141872649163], [88.876311883503064, 22.879146429937826], [89.031961297566198, 22.055708319582973], [88.888765903685396, 21.690588487224741], [88.208497348995209, 21.703171698487804], [86.975704380240259, 21.495561631755201], [87.033168572948853, 20.743307806882406], [86.499351027373777, 20.151638495356604], [85.060265740909671, 19.478578802971096], [83.941005893899998, 18.302009792549722], [83.189217156917834, 17.671221421778977], [82.192792189465905, 17.016636053937813], [82.191241896497175, 16.556664130107844], [81.692719354177456, 16.3102192245079], [80.791999139330116, 15.951972357644488], [80.324895867843864, 15.899184882058346], [80.025069207686428, 15.136414903214144], [80.23327355339039, 13.835770778859978], [80.286293572921849, 13.006260687710832], [79.862546828128487, 12.056215318240886], [79.85799930208681, 10.357275091997108], [79.340511509115984, 10.308854274939618], [78.885345493489169, 9.54613597252772], [79.189719679688281, 9.216543687370146], [78.27794070833049, 8.933046779816932], [77.94116539908434, 8.25295909263974], [77.539897902337927, 7.965534776232331], [76.592978957021657, 8.899276231314188], [76.130061476551063, 10.299630031775518], [75.746467319648488, 11.308250637248303], [75.396101108709573, 11.781245022015822], [74.864815708316812, 12.741935736537895], [74.616717156883524, 13.992582912649677], [74.443859490867197, 14.617221787977693], [73.534199253233368, 15.990652167214957], [73.119909295549419, 17.928570054592495], [72.820909458308634, 19.208233547436162], [72.824475132136783, 20.41950328214153], [72.630533481745388, 21.356009426351001], [71.175273471973938, 20.757441311114228], [70.470458611945091, 20.877330634031381], [69.164130080038817, 22.089298000572697], [69.644927606082391, 22.450774644454334], [69.349596795534325, 22.843179633062686], [68.176645135373377, 23.691965033456704], [68.842599318318761, 24.359133612560932], [71.0432401874682, 24.356523952730193], [70.844699334602822, 25.215102037043511], [70.282873162725579, 25.722228705339823], [70.168926629522005, 26.491871649678835], [69.514392938113119, 26.940965684511365], [70.61649620960192, 27.989196275335861], [71.777665643200308, 27.913180243434521], [72.823751662084689, 28.961591701772047], [73.450638462217412, 29.976413479119863], [74.421380242820263, 30.97981476493117], [74.405928989564998, 31.692639471965272], [75.258641798813187, 32.271105455040491], [74.451559279278698, 32.764899603805489], [74.104293654277328, 33.441473293586846], [73.749948358051952, 34.317698879527846], [74.240202671204955, 34.748887030571247], [75.757060988268321, 34.504922593721311], [76.871721632804011, 34.653544012992732], [77.837450799474553, 35.494009507787759]]] } }, - { "type": "Feature", "properties": { "admin": "Ireland", "name": "Ireland", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[-6.197884894220989, 53.86756500916335], [-6.032985398777609, 53.153164170944336], [-6.788856573910847, 52.260117906292322], [-8.561616583683557, 51.669301255899349], [-9.977085740590267, 51.820454820353071], [-9.16628251793078, 52.864628811242667], [-9.688524542672452, 53.881362616585285], [-8.327987433292007, 54.664518947968624], [-7.572167934591064, 55.131622219454854], [-7.366030646178785, 54.595840969452709], [-7.572167934591064, 54.059956366585986], [-6.953730231138065, 54.073702297575622], [-6.197884894220989, 53.86756500916335]]] } }, - { "type": "Feature", "properties": { "admin": "Iran", "name": "Iran", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[53.921597934795543, 37.198918361961255], [54.800303989486558, 37.392420762678178], [55.511578403551894, 37.964117133123153], [56.180374790273319, 37.935126654607423], [56.619366082592805, 38.121394354803478], [57.330433790928964, 38.029229437810933], [58.436154412678192, 37.522309475243794], [59.234761997316795, 37.412987982730336], [60.377637973883864, 36.52738312432836], [61.123070509694131, 36.491597194966239], [61.21081709172573, 35.650072333309218], [60.80319339380744, 34.404101874319856], [60.528429803311575, 33.676446031217999], [60.963700392505991, 33.528832302376252], [60.536077915290761, 32.981268825811561], [60.863654819588952, 32.182919623334421], [60.941944614511115, 31.548074652628745], [61.699314406180811, 31.379506130492661], [61.78122155136343, 30.735850328081231], [60.874248488208778, 29.829238999952604], [61.369308709564926, 29.303276272085917], [61.771868117118615, 28.699333807890792], [62.727830438085974, 28.259644883735383], [62.755425652929851, 27.378923448184985], [63.23389773952028, 27.217047024030702], [63.316631707619578, 26.756532497661659], [61.874187453056535, 26.239974880472097], [61.497362908784183, 25.078237006118492], [59.616134067630831, 25.380156561783775], [58.525761346272297, 25.609961656185725], [57.39725141788238, 25.739902045183634], [56.97076582217754, 26.966106268821356], [56.492138706290199, 27.14330475515019], [55.723710158110059, 26.964633490501036], [54.715089552637252, 26.480657863871507], [53.493096958231334, 26.812368882753042], [52.483597853409599, 27.580849107365488], [51.520762566947404, 27.865689602158291], [50.852948032439528, 28.814520575469377], [50.115008579311571, 30.14777252859971], [49.576850213423988, 29.9857152369324], [48.941333449098536, 30.31709035900403], [48.567971225789748, 29.926778265903515], [48.014568312376085, 30.452456773392594], [48.00469811380831, 30.985137437457237], [47.685286085812258, 30.984853217079621], [47.849203729042095, 31.709175930298663], [47.334661492711895, 32.469155381799105], [46.109361606639304, 33.017287299118998], [45.416690708199035, 33.967797756479577], [45.648459507028079, 34.748137722303007], [46.15178795755093, 35.093258775364284], [46.076340366404786, 35.67738332777548], [45.420618117053202, 35.977545884742817], [44.77267, 37.17045], [44.225755649600522, 37.971584377589345], [44.421402622257538, 38.281281236314534], [44.109225294782334, 39.428136298168091], [44.793989699081934, 39.713002631177041], [44.9526880226503, 39.335764675446363], [45.457721795438765, 38.874139105783051], [46.143623081248812, 38.74120148371221], [46.505719842317966, 38.770605373686287], [47.685079380083081, 39.508363959301207], [48.060095249225235, 39.582235419262453], [48.355529412637871, 39.2887649602769], [48.010744256386474, 38.794014797514514], [48.634375441284803, 38.27037750910096], [48.883249139202483, 38.32024526626261], [49.199612257693332, 37.582874253889877], [50.147771437384606, 37.37456655532133], [50.842354363819695, 36.872814235983384], [52.26402469260141, 36.700421657857696], [53.825789829326411, 36.965030829408228], [53.921597934795543, 37.198918361961255]]] } }, - { "type": "Feature", "properties": { "admin": "Iraq", "name": "Iraq", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[45.420618117053202, 35.977545884742817], [46.076340366404786, 35.67738332777548], [46.15178795755093, 35.093258775364284], [45.648459507028079, 34.748137722303007], [45.416690708199035, 33.967797756479577], [46.109361606639304, 33.017287299118998], [47.334661492711895, 32.469155381799105], [47.849203729042095, 31.709175930298663], [47.685286085812258, 30.984853217079621], [48.00469811380831, 30.985137437457237], [48.014568312376085, 30.452456773392594], [48.567971225789748, 29.926778265903515], [47.974519077349889, 29.975819200148493], [47.302622104690947, 30.059069932570711], [46.568713413281742, 29.099025173452283], [44.709498732284736, 29.178891099559376], [41.889980910007829, 31.190008653278362], [40.399994337736238, 31.889991766887931], [39.195468377444961, 32.16100881604266], [38.792340529136077, 33.378686428352218], [41.00615888851992, 34.419372260062111], [41.383965285005807, 35.628316555314349], [41.289707472505448, 36.358814602192261], [41.837064243340954, 36.605853786763568], [42.349591098811764, 37.22987254490409], [42.779125604021822, 37.385263576805741], [43.942258742047287, 37.256227525372942], [44.293451775902852, 37.001514390606289], [44.772699008977689, 37.170444647768427], [45.420618117053202, 35.977545884742817]]] } }, - { "type": "Feature", "properties": { "admin": "Iceland", "name": "Iceland", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[-14.508695441129232, 66.455892239031414], [-14.739637417041605, 65.808748277440287], [-13.609732224979807, 65.126671047619851], [-14.9098337467949, 64.36408193628867], [-17.794438035543418, 63.67874909123384], [-18.656245896874989, 63.496382961675806], [-19.972754685942757, 63.643634955491514], [-22.762971971110154, 63.960178941495371], [-21.778484259517676, 64.402115790455497], [-23.955043911219104, 64.891129869233481], [-22.184402635170354, 65.084968166760291], [-22.227423265053329, 65.378593655042721], [-24.326184047939332, 65.611189276788451], [-23.650514695723082, 66.262519029395207], [-22.134922451250883, 66.410468655046856], [-20.576283738679543, 65.732112128351417], [-19.056841600001587, 66.276600857194751], [-17.798623826559048, 65.993853257909763], [-16.167818976292121, 66.526792304135853], [-14.508695441129232, 66.455892239031414]]] } }, - { "type": "Feature", "properties": { "admin": "Israel", "name": "Israel", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[35.719918247222743, 32.709192409794859], [35.545665317534535, 32.393992011030569], [35.183930291491428, 32.532510687788935], [34.974640740709319, 31.866582343059715], [35.225891554512422, 31.754341132121759], [34.970506626125989, 31.616778469360803], [34.927408481594554, 31.35343537040141], [35.397560662586038, 31.489086005167572], [35.420918409981958, 31.100065822874349], [34.922602573391423, 29.501326198844517], [34.26543338393568, 31.219360866820146], [34.556371697738903, 31.548823960896989], [34.48810713068135, 31.605538845337314], [34.752587111151165, 32.07292633720116], [34.955417107896771, 32.827376410446369], [35.098457472480668, 33.080539252244257], [35.126052687324538, 33.090900376918775], [35.460709262846699, 33.089040025356276], [35.552796665190805, 33.264274807258012], [35.821100701650231, 33.277426459276292], [35.836396925608618, 32.868123277308506], [35.700797967274745, 32.716013698857374], [35.719918247222743, 32.709192409794859]]] } }, - { "type": "Feature", "properties": { "admin": "Italy", "name": "Italy", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[15.52037601081383, 38.231155096991465], [15.160242954171732, 37.444045518537813], [15.309897902089002, 37.134219468731793], [15.099988234119445, 36.61998729099539], [14.335228712632013, 36.996630967754747], [13.826732618879927, 37.104531358380186], [12.431003859108809, 37.612949937483812], [12.570943637755132, 38.126381130519682], [13.741156447004581, 38.03496552179535], [14.761249220446157, 38.143873602850498], [15.52037601081383, 38.231155096991465]]], [[[9.210011834356264, 41.209991360024212], [9.809975213264973, 40.500008856766094], [9.669518670295671, 39.177376410471787], [9.214817742559486, 39.240473334300127], [8.806935662479729, 38.906617743478471], [8.428302443077113, 39.171847032216611], [8.388253208050939, 40.378310858718798], [8.159998406617659, 40.950007229163774], [8.709990675500107, 40.899984442705225], [9.210011834356264, 41.209991360024212]]], [[[12.376485223040842, 46.767559109069872], [13.806475457421552, 46.50930613869118], [13.698109978905475, 46.016778062517368], [13.937630242578335, 45.59101593686465], [13.141606479554294, 45.736691799495411], [12.328581170306304, 45.38177806251484], [12.383874952858601, 44.885374253919075], [12.261453484759157, 44.600482082694008], [12.589237094786482, 44.091365871754462], [13.526905958722491, 43.587727362637899], [14.029820997787024, 42.761007798832473], [15.142569614327952, 41.955139675456891], [15.926191033601892, 41.961315009115729], [16.169897088290409, 41.740294908203417], [15.889345737377793, 41.541082261718195], [16.785001661860573, 41.179605617836579], [17.519168735431204, 40.877143459632229], [18.376687452882575, 40.355624904942651], [18.4802470231954, 40.168866278639818], [18.293385044028096, 39.810774441073235], [17.738380161213279, 40.277671006830289], [16.869595981522334, 40.442234605463838], [16.448743116937319, 39.795400702466473], [17.171489698971495, 39.424699815420716], [17.052840610429339, 38.902871202137291], [16.635088331781841, 38.843572496082395], [16.100960727613053, 37.985898749334176], [15.684086948314498, 37.908849188787023], [15.687962680736318, 38.214592800441849], [15.891981235424705, 38.750942491199218], [16.109332309644312, 38.964547024077682], [15.718813510814638, 39.544072374014938], [15.413612501698818, 40.048356838535163], [14.998495721098234, 40.172948716790913], [14.703268263414767, 40.604550279292617], [14.06067182786526, 40.786347968095434], [13.627985060285393, 41.188287258461649], [12.888081902730418, 41.253089504555604], [12.106682570044907, 41.7045348170574], [11.191906365614184, 42.355425319989671], [10.511947869517794, 42.93146251074721], [10.200028924204046, 43.920006822274608], [9.702488234097812, 44.036278794931313], [8.888946160526869, 44.366336167979533], [8.428560825238575, 44.23122813575241], [7.8507666357832, 43.767147935555236], [7.435184767291841, 43.693844916349164], [7.549596388386161, 44.127901109384808], [7.007562290076661, 44.254766750661382], [6.749955275101711, 45.028517971367584], [7.096652459347835, 45.333098863295859], [6.80235517744566, 45.708579820328673], [6.84359297041456, 45.991146552100659], [7.273850945676683, 45.776947740250748], [7.755992058959832, 45.824490057959267], [8.316629672894377, 46.16364248309084], [8.489952426801294, 46.005150865251736], [8.966305779667833, 46.03693187111115], [9.18288170740311, 46.440214748716976], [9.92283654139035, 46.314899400409182], [10.363378126678665, 46.48357127540983], [10.4427014502466, 46.893546250997431], [11.048555942436504, 46.751358547546396], [11.164827915093325, 46.941579494812729], [12.153088006243079, 47.115393174826423], [12.376485223040842, 46.767559109069872]]]] } }, - { "type": "Feature", "properties": { "admin": "Jamaica", "name": "Jamaica", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-77.569600796199197, 18.490525417550483], [-76.896618618462114, 18.400866807524078], [-76.365359056285527, 18.16070058844759], [-76.19965857614163, 17.886867173732963], [-76.902561408175671, 17.868237819891743], [-77.206341315403449, 17.701116237859818], [-77.766022915340599, 17.861597398342237], [-78.337719285785596, 18.225967922432226], [-78.217726610003865, 18.454532782459193], [-77.797364671525614, 18.524218451404774], [-77.569600796199197, 18.490525417550483]]] } }, - { "type": "Feature", "properties": { "admin": "Jordan", "name": "Jordan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[35.545665317534535, 32.393992011030569], [35.719918247222743, 32.709192409794859], [36.834062127435537, 32.312937526980768], [38.792340529136077, 33.378686428352218], [39.195468377444961, 32.16100881604266], [39.004885695152545, 32.010216986614971], [37.002165561681004, 31.508412990844736], [37.998848911294367, 30.508499864213128], [37.668119744626374, 30.338665269485894], [37.503581984209028, 30.003776150018396], [36.740527784987243, 29.865283311476183], [36.501214227043583, 29.505253607698702], [36.068940870922049, 29.19749461518445], [34.956037225084252, 29.356554673778835], [34.922602573391423, 29.501326198844517], [35.420918409981958, 31.100065822874349], [35.397560662586038, 31.489086005167572], [35.545251906076196, 31.782504787720832], [35.545665317534535, 32.393992011030569]]] } }, - { "type": "Feature", "properties": { "admin": "Japan", "name": "Japan", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[134.638428176003856, 34.149233710256418], [134.766379022358478, 33.806334743783673], [134.20341596897083, 33.201177883429622], [133.792950067276479, 33.521985175097583], [133.280268182508848, 33.289570420864941], [133.014858026257855, 32.704567369104772], [132.363114862192674, 32.989382025681373], [132.371176385630179, 33.463642483040068], [132.924372593314786, 34.060298570282036], [133.492968377822194, 33.944620876596694], [133.904106073136347, 34.364931138642611], [134.638428176003856, 34.149233710256418]]], [[[140.976387567305267, 37.142074286440156], [140.599769728762084, 36.343983466124534], [140.774074334882641, 35.842877102190229], [140.253279250245072, 35.138113918593653], [138.975527785396196, 34.667600002576101], [137.217598911691198, 34.606285915661843], [135.792983026268871, 33.46480520276662], [135.120982700745401, 33.849071153289053], [135.07943484918269, 34.596544908174813], [133.340316196831964, 34.375938218720755], [132.156770868051296, 33.904933376596503], [130.986144647343451, 33.885761420216276], [132.000036248910021, 33.149992377244608], [131.33279015515734, 31.450354519164836], [130.68631798718593, 31.029579169228235], [130.202419875204953, 31.418237616495411], [130.447676222862128, 32.319474595665717], [129.81469160371887, 32.610309556604385], [129.408463169472554, 33.296055813117583], [130.353935174684636, 33.604150702441693], [130.878450962447118, 34.232742824840031], [131.884229364143891, 34.749713853487911], [132.617672967662486, 35.433393052709413], [134.608300815977771, 35.731617743465812], [135.677537876528902, 35.527134100886819], [136.723830601142424, 37.304984239240376], [137.390611607004473, 36.827390651998819], [138.857602166906247, 37.827484646143454], [139.426404657142882, 38.215962225897634], [140.054790073812057, 39.438807481436378], [139.883379347899847, 40.563312486323682], [140.305782505453664, 41.195005194659551], [141.368973423426667, 41.378559882160282], [141.914263136970476, 39.991616115878678], [141.884600864834965, 39.18086456965149], [140.959489373945729, 38.174000962876583], [140.976387567305267, 37.142074286440156]]], [[[143.910161981379474, 44.174099839853724], [144.613426548439634, 43.960882880217511], [145.320825230083074, 44.384732977875437], [145.543137241802754, 43.262088324550596], [144.059661899999867, 42.988358262700551], [143.183849725517291, 41.995214748699183], [141.611490920172457, 42.678790595056071], [141.067286411706618, 41.58459381770799], [139.95510623592105, 41.56955597591103], [139.817543573159924, 42.563758856774392], [140.312087030193169, 43.333272610032644], [141.380548944259999, 43.388824774746489], [141.671952345953912, 44.772125352551477], [141.967644891527982, 45.551483466161343], [143.142870314709796, 44.510358384776957], [143.910161981379474, 44.174099839853724]]]] } }, - { "type": "Feature", "properties": { "admin": "Kazakhstan", "name": "Kazakhstan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[70.962314894499272, 42.26615428320553], [70.388964878220776, 42.081307684897517], [69.070027296835221, 41.384244289712335], [68.632482944620037, 40.668680731766855], [68.259895867795635, 40.662324530594894], [67.985855747351806, 41.135990708982199], [66.714047072216587, 41.168443508461557], [66.510648634715707, 41.987644151368549], [66.023391554635609, 41.994646307944031], [66.098012322865188, 42.997660020513074], [64.90082441595932, 43.728080552742647], [63.18578698105658, 43.650074978197999], [62.013300408786264, 43.504476630215649], [61.05831994003249, 44.405816962250576], [60.239971958258472, 44.784036770194739], [58.689989048095796, 45.500013739598721], [58.503127068928428, 45.58680430763296], [55.928917270741167, 44.995858466159163], [55.968191359283011, 41.30864166926937], [55.455251092353805, 41.259859117185826], [54.755345493392653, 42.04397146256661], [54.079417759014959, 42.324109402020831], [52.944293247291725, 42.116034247397572], [52.502459751196277, 41.783315538086462], [52.446339145727208, 42.027150783855561], [52.692112257707251, 42.443895372073364], [52.501426222550315, 42.792297878585188], [51.342427199108201, 43.132974758469338], [50.891291945200223, 44.031033637053774], [50.339129266161358, 44.284015611338468], [50.305642938036257, 44.609835516938908], [51.278503452363211, 44.514854234386448], [51.316899041556034, 45.245998236667894], [52.167389764215713, 45.408391425145098], [53.040876499245194, 45.259046535821753], [53.220865512917712, 46.23464590105992], [53.042736850807771, 46.853006089864486], [52.042022739475598, 46.804636949239232], [51.191945428274252, 47.048704738953909], [50.034083286342465, 46.608989976582208], [49.10116, 46.39933000000012], [48.593241001180495, 46.561034247415471], [48.694733514201729, 47.075628160177921], [48.057253045449258, 47.743752753279516], [47.315231154170242, 47.715847479841948], [46.466445753776256, 48.394152330104923], [47.043671502476506, 49.1520388860976], [46.751596307162728, 49.35600576435376], [47.549480421749301, 50.454698391311119], [48.577841424357523, 49.874759629915658], [48.702381626181008, 50.605128485712825], [50.766648390512145, 51.692762356159889], [52.328723585830957, 51.71865224873811], [54.53287845237621, 51.026239732459302], [55.716940545479801, 50.62171662047853], [56.777961053296551, 51.043551337277037], [58.363290643146733, 51.063653469438563], [59.642282342370599, 50.545442206415707], [59.932807244715484, 50.842194118851857], [61.337424350840919, 50.799070136104248], [61.588003371024158, 51.2726587998432], [59.967533807215531, 51.960420437215696], [60.927268507740258, 52.447548326215028], [60.739993117114572, 52.719986477257734], [61.699986199800584, 52.979996446334255], [60.978066440683151, 53.664993394579128], [61.436591424409052, 54.006264553434775], [65.178533563095911, 54.354227810272093], [65.66687584825398, 54.601266994843449], [68.169100376258811, 54.970391750704309], [69.068166945272864, 55.385250149143516], [70.865266554655122, 55.169733588270091], [71.180131056609397, 54.133285224008247], [72.224150018202167, 54.376655381886728], [73.508516066384388, 54.035616766976588], [73.425678745420427, 53.489810289109741], [74.384845005190044, 53.546861070360066], [76.891100294913414, 54.490524400441913], [76.525179477854735, 54.177003485727127], [77.800915561844221, 53.404414984747561], [80.035559523441663, 50.864750881547238], [80.568446893235475, 51.388336493528456], [81.945985548839914, 50.812195949906354], [83.383003778012366, 51.069182847693909], [83.935114780618832, 50.889245510453563], [84.416377394553052, 50.311399644565817], [85.115559523462011, 50.117302964877631], [85.541269972682457, 49.69285858824815], [86.829356723989619, 49.826674709668154], [87.359970330762664, 49.214980780629148], [86.598776483103379, 48.549181626980605], [85.768232863308285, 48.455750637396974], [85.72048383987071, 47.452969468773112], [85.164290399113355, 47.000955715516099], [83.180483839860443, 47.330031236350848], [82.458925815769106, 45.539649563166499], [81.947070753918112, 45.317027492853235], [79.966106398441397, 44.917516994804643], [80.866206496101356, 43.180362046881037], [80.180150180994289, 42.920067857426936], [80.259990268885332, 42.349999294599101], [79.643645460940135, 42.496682847659649], [79.142177361979776, 42.856092434249589], [77.658391961583206, 42.960685533208327], [76.000353631498555, 42.988022365890622], [75.636964959622091, 42.877899888676765], [74.212865838522575, 43.298339341803505], [73.645303582660901, 43.091271877609863], [73.489757521462337, 42.500894476891276], [71.844638299450637, 42.845395412765178], [71.186280552052253, 42.704292914392219], [70.962314894499272, 42.26615428320553]]] } }, - { "type": "Feature", "properties": { "admin": "Kenya", "name": "Kenya", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[40.993, -0.85829], [41.58513, -1.68325], [40.88477, -2.08255], [40.63785, -2.49979], [40.26304, -2.57309], [40.12119, -3.27768], [39.80006, -3.68116], [39.60489, -4.34653], [39.20222, -4.67677], [37.7669, -3.67712], [37.69869, -3.09699], [34.07262, -1.05982], [33.903711197104521, -0.95], [33.893568969666937, 0.109813537861896], [34.18, 0.515], [34.6721, 1.17694], [35.03599, 1.90584], [34.59607, 3.05374], [34.47913, 3.5556], [34.005, 4.249884947362047], [34.620196267853871, 4.847122742081987], [35.298007118232974, 5.506], [35.817447662353501, 5.338232082790795], [35.817447662353501, 4.776965663461889], [36.159078632855639, 4.447864127672768], [36.855093238008116, 4.447864127672768], [38.120915, 3.598605], [38.43697, 3.58851], [38.67114, 3.61607], [38.89251, 3.50074], [39.559384258765846, 3.42206], [39.85494, 3.83879], [40.76848, 4.25702], [41.1718, 3.91909], [41.855083092643966, 3.918911920483726], [40.98105, 2.78452], [40.993, -0.85829]]] } }, - { "type": "Feature", "properties": { "admin": "Kyrgyzstan", "name": "Kyrgyzstan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[70.96231489449913, 42.266154283205481], [71.186280552052111, 42.704292914392127], [71.84463829945058, 42.845395412765093], [73.489757521462337, 42.500894476891311], [73.645303582660901, 43.09127187760982], [74.212865838522546, 43.298339341803363], [75.636964959622006, 42.877899888676673], [76.000353631498442, 42.988022365890664], [77.658391961583206, 42.960685533208256], [79.142177361979762, 42.856092434249511], [79.643645460940107, 42.496682847659514], [80.259990268885289, 42.349999294599044], [80.119430373051358, 42.123940741538235], [78.543660923175295, 41.582242540038685], [78.187196893225959, 41.185315863604792], [76.904484490877067, 41.066485907549634], [76.526368035797432, 40.427946071935111], [75.467827996730691, 40.562072251948663], [74.776862420556043, 40.366425279291619], [73.822243686828287, 39.893973497063179], [73.960013055318413, 39.660008449861721], [73.67537926625478, 39.431236884105594], [71.784693637991992, 39.279463202464363], [70.549161818325601, 39.604197902986492], [69.464886915977516, 39.526683254548693], [69.559609816368507, 40.103211371412968], [70.648018833299957, 39.935753892571157], [71.014198032520156, 40.244365546218226], [71.774875115856545, 40.145844428053763], [73.055417108049156, 40.86603302668945], [71.870114780570447, 41.392900092121259], [71.157858514291576, 41.143587144529107], [70.420022414028196, 41.519998277343134], [71.259247674448218, 42.167710679689456], [70.96231489449913, 42.266154283205481]]] } }, - { "type": "Feature", "properties": { "admin": "Cambodia", "name": "Cambodia", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[103.497279901139677, 10.632555446815926], [103.090689731867229, 11.153660590047162], [102.58493248902667, 12.186594956913279], [102.348099399833004, 13.39424734135822], [102.988422072361601, 14.225721136934464], [104.281418084736586, 14.416743068901363], [105.218776890078871, 14.27321177821069], [106.04394616091551, 13.881091009979952], [106.496373325630856, 14.57058380783428], [107.382727492301058, 14.202440904186968], [107.614547967562402, 13.535530707244202], [107.491403029410861, 12.337205918827944], [105.810523716253101, 11.567614650921225], [106.249670037869436, 10.961811835163585], [105.199914992292321, 10.889309800658094], [104.334334751403446, 10.486543687375228], [103.497279901139677, 10.632555446815926]]] } }, - { "type": "Feature", "properties": { "admin": "South Korea", "name": "Korea", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[128.349716424676586, 38.612242946927843], [129.212919549680038, 37.432392483055942], [129.460449660358137, 36.784189154602821], [129.468304478066472, 35.632140611303939], [129.091376580929563, 35.08248423923142], [128.18585045787907, 34.890377102186385], [127.386519403188373, 34.475673733044111], [126.485747511908713, 34.390045884736473], [126.3739197124291, 34.934560451795939], [126.559231398627773, 35.684540513647896], [126.117397902532261, 36.725484727519252], [126.860143263863364, 36.893924058574612], [126.174758742376213, 37.749685777328033], [126.237338901881742, 37.840377916000271], [126.683719924018888, 37.804772854151174], [127.073308547067342, 38.256114813788393], [127.780035435090966, 38.304535630845884], [128.205745884311426, 38.370397243801882], [128.349716424676586, 38.612242946927843]]] } }, - { "type": "Feature", "properties": { "admin": "Kosovo", "name": "Kosovo", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[20.76216, 42.05186], [20.717310000000108, 41.84711], [20.59023, 41.85541], [20.52295, 42.21787], [20.28374, 42.32025], [20.0707, 42.58863], [20.25758, 42.81275], [20.49679, 42.88469], [20.63508, 43.21671], [20.81448, 43.27205], [20.95651, 43.13094], [21.143395, 43.068685000000123], [21.27421, 42.90959], [21.43866, 42.86255], [21.63302, 42.67717], [21.77505, 42.6827], [21.66292, 42.43922], [21.54332, 42.32025], [21.576635989402117, 42.245224397061847], [21.352700000000134, 42.2068], [20.76216, 42.05186]]] } }, - { "type": "Feature", "properties": { "admin": "Kuwait", "name": "Kuwait", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[47.974519077349889, 29.975819200148493], [48.183188510944483, 29.534476630159759], [48.09394331237641, 29.306299343374999], [48.416094191283939, 28.552004299426663], [47.708850538937376, 28.526062730416136], [47.459821811722819, 29.002519436147217], [46.568713413281742, 29.099025173452283], [47.302622104690947, 30.059069932570711], [47.974519077349889, 29.975819200148493]]] } }, - { "type": "Feature", "properties": { "admin": "Laos", "name": "Lao PDR", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[105.218776890078871, 14.27321177821069], [105.544338413517664, 14.723933620660414], [105.589038527450128, 15.570316066952856], [104.779320509868768, 16.441864935771445], [104.716947056092465, 17.428858954330078], [103.956476678485288, 18.240954087796872], [103.200192091893726, 18.309632066312769], [102.998705682387694, 17.961694647691598], [102.413004998791592, 17.932781683824281], [102.113591750092453, 18.109101670804161], [101.059547560635139, 17.512497259994486], [101.035931431077742, 18.408928330961611], [101.282014601651667, 19.462584947176762], [100.606293573003128, 19.508344427971217], [100.548881056726856, 20.109237982661124], [100.115987583417819, 20.41784963630818], [100.329101190189519, 20.786121731036229], [101.180005324307515, 21.436572984294024], [101.270025669359939, 21.201651923095177], [101.803119744882906, 21.174366766845065], [101.652017856861491, 22.318198757409544], [102.170435825613552, 22.464753119389297], [102.754896274834636, 21.675137233969462], [103.203861118586431, 20.766562201413745], [104.435000441508024, 20.758733221921528], [104.822573683697073, 19.886641750563879], [104.183387892678908, 19.624668077060214], [103.896532017026701, 19.265180975821799], [105.094598423281496, 18.666974595611073], [105.925762160264, 17.485315456608955], [106.55600792849566, 16.604283962464802], [107.312705926545576, 15.908538316303177], [107.564525181103875, 15.202173163305554], [107.382727492301058, 14.202440904186968], [106.496373325630856, 14.57058380783428], [106.04394616091551, 13.881091009979952], [105.218776890078871, 14.27321177821069]]] } }, - { "type": "Feature", "properties": { "admin": "Lebanon", "name": "Lebanon", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[35.821100701650231, 33.277426459276292], [35.552796665190805, 33.264274807258012], [35.460709262846699, 33.089040025356276], [35.126052687324538, 33.090900376918775], [35.48220665868012, 33.905450140919434], [35.979592319489392, 34.610058295219126], [35.998402540843628, 34.644914048799997], [36.448194207512095, 34.59393524834406], [36.611750115715886, 34.201788641897174], [36.066460402172048, 33.824912421192543], [35.821100701650231, 33.277426459276292]]] } }, - { "type": "Feature", "properties": { "admin": "Liberia", "name": "Liberia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-7.712159389669749, 4.364565944837721], [-7.974107224957249, 4.355755113131961], [-9.004793667018673, 4.832418524592199], [-9.913420376006682, 5.593560695819205], [-10.765383876986643, 6.140710760925556], [-11.438779466182053, 6.785916856305746], [-11.199801805048278, 7.105845648624735], [-11.14670427086838, 7.396706447779534], [-10.695594855176477, 7.939464016141085], [-10.230093553091276, 8.406205552601291], [-10.016566534861253, 8.42850393313523], [-9.755342169625832, 8.541055202666923], [-9.33727983238458, 7.928534450711351], [-9.403348151069748, 7.526905218938906], [-9.208786383490844, 7.313920803247952], [-8.926064622422002, 7.309037380396375], [-8.722123582382123, 7.711674302598509], [-8.439298468448696, 7.686042792181736], [-8.485445522485348, 7.395207831243068], [-8.385451626000572, 6.911800645368742], [-8.602880214868618, 6.467564195171659], [-8.311347622094017, 6.193033148621081], [-7.993692592795879, 6.126189683451541], [-7.570152553731686, 5.707352199725903], [-7.53971513511176, 5.313345241716517], [-7.63536821128403, 5.188159084489455], [-7.712159389669749, 4.364565944837721]]] } }, - { "type": "Feature", "properties": { "admin": "Libya", "name": "Libya", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[14.8513, 22.862950000000119], [14.143870883855239, 22.491288967371126], [13.581424594790459, 23.040506089769274], [11.999505649471697, 23.471668402596432], [11.560669386449032, 24.09790924732561], [10.771363559622952, 24.562532050061741], [10.303846876678445, 24.379313259370967], [9.948261346078024, 24.936953640232613], [9.910692579801774, 25.365454616796789], [9.319410841518218, 26.094324856057476], [9.716285841519662, 26.512206325785652], [9.629056023811073, 27.140953477481041], [9.756128370816779, 27.688258571884198], [9.68388471847288, 28.144173895779311], [9.859997999723472, 28.959989732371064], [9.805634392952353, 29.424638373323369], [9.482139926805415, 30.307556057246181], [9.970017124072966, 30.539324856075375], [10.056575148161697, 30.961831366493517], [9.950225050505194, 31.376069647745275], [10.636901482799484, 31.761420803345679], [10.944789666394511, 32.081814683555358], [11.43225345220378, 32.368903103152824], [11.488787469131008, 33.136995754523234], [12.66331, 32.79278], [13.08326, 32.87882], [13.91868, 32.71196], [15.24563, 32.26508], [15.71394, 31.37626], [16.61162, 31.18218], [18.02109, 30.76357], [19.08641, 30.26639], [19.57404, 30.52582], [20.05335, 30.98576], [19.82033, 31.751790000000135], [20.13397, 32.2382], [20.85452, 32.7068], [21.54298, 32.8432], [22.89576, 32.63858], [23.2368, 32.19149], [23.6091300000001, 32.18726], [23.9275, 32.01667], [24.92114, 31.89936], [25.16482, 31.56915], [24.80287, 31.08929], [24.95762, 30.6616], [24.70007, 30.04419], [25.00000000000011, 29.238654529533552], [25.00000000000011, 25.682499996360995], [25.00000000000011, 22.0], [25.00000000000011, 20.00304], [23.850000000000129, 20.0], [23.837660000000135, 19.580470000000101], [19.84926, 21.49509], [15.86085, 23.40972], [14.8513, 22.862950000000119]]] } }, - { "type": "Feature", "properties": { "admin": "Sri Lanka", "name": "Sri Lanka", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[81.787959018891371, 7.523055324733162], [81.637322218760573, 6.481775214051921], [81.218019647144317, 6.197141424988287], [80.348356968104397, 5.968369859232154], [79.872468703128519, 6.763463446474928], [79.6951668639351, 8.200843410673384], [80.147800734379629, 9.824077663609554], [80.838817986986541, 9.268426825391186], [81.304319289071756, 8.564206244333688], [81.787959018891371, 7.523055324733162]]] } }, - { "type": "Feature", "properties": { "admin": "Lesotho", "name": "Lesotho", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[28.978262566857236, -28.955596612261708], [29.325166456832587, -29.257386976846245], [29.018415154748016, -29.743765557577362], [28.848399692507734, -30.070050551068245], [28.291069370239903, -30.226216729454293], [28.107204624145421, -30.545732110314944], [27.749397006956478, -30.645105889612214], [26.999261915807629, -29.875953871379977], [27.532511020627471, -29.242710870075353], [28.07433841320778, -28.851468601193581], [28.541700066855491, -28.647501722937562], [28.978262566857236, -28.955596612261708]]] } }, - { "type": "Feature", "properties": { "admin": "Lithuania", "name": "Lithuania", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[22.731098667092649, 54.327536932993311], [22.651051873472536, 54.582740993866729], [22.757763706155256, 54.856574408581366], [22.31572350433057, 55.01529857036585], [21.26844892750346, 55.190481675835301], [21.05580040862241, 56.031076361711051], [22.201156853939491, 56.337801825579483], [23.878263787539957, 56.273671373105259], [24.860684441840753, 56.372528388079616], [25.000934279080887, 56.164530748104831], [25.533046502390327, 56.100296942766029], [26.494331495883749, 55.61510691997762], [26.588279249790386, 55.167175604871659], [25.768432651479792, 54.846962592175082], [25.536353794056989, 54.282423407602515], [24.45068362803703, 53.905702216194747], [23.484127638449841, 53.912497667041123], [23.243987257589506, 54.220566718149129], [22.731098667092649, 54.327536932993311]]] } }, - { "type": "Feature", "properties": { "admin": "Luxembourg", "name": "Luxembourg", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[6.043073357781109, 50.128051662794221], [6.242751092156992, 49.90222565367872], [6.186320428094176, 49.4638028021145], [5.897759230176403, 49.442667141307012], [5.674051954784828, 49.52948354755749], [5.782417433300905, 50.090327867221205], [6.043073357781109, 50.128051662794221]]] } }, - { "type": "Feature", "properties": { "admin": "Latvia", "name": "Latvia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[21.05580040862241, 56.031076361711051], [21.090423618257965, 56.783872789122924], [21.581866489353668, 57.411870632549913], [22.524341261492872, 57.753374335350756], [23.31845299652209, 57.006236477274854], [24.120729607853423, 57.025692654032753], [24.312862583114615, 57.793423570376966], [25.164593540149262, 57.970156968815175], [25.602809685984365, 57.847528794986559], [26.46353234223778, 57.476388658266316], [27.288184848751509, 57.474528306703817], [27.770015903440925, 57.244258124411218], [27.855282016722519, 56.759326483784278], [28.17670942557799, 56.169129950578807], [27.102459751094525, 55.783313707087672], [26.494331495883749, 55.61510691997762], [25.533046502390327, 56.100296942766029], [25.000934279080887, 56.164530748104831], [24.860684441840753, 56.372528388079616], [23.878263787539957, 56.273671373105259], [22.201156853939491, 56.337801825579483], [21.05580040862241, 56.031076361711051]]] } }, - { "type": "Feature", "properties": { "admin": "Morocco", "name": "Morocco", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-5.193863491222031, 35.755182196590845], [-4.591006232105143, 35.330711981745644], [-3.640056525070007, 35.39985504815197], [-2.604305792644111, 35.17909332940112], [-2.169913702798624, 35.168396307916694], [-1.792985805661658, 34.527918606091298], [-1.73345455566141, 33.919712836232115], [-1.388049282222596, 32.864015000941372], [-1.124551153966195, 32.651521511357195], [-1.30789913573787, 32.262888902306024], [-2.616604783529567, 32.094346218386157], [-3.068980271812648, 31.724497992473285], [-3.647497931320145, 31.637294012980814], [-3.690441046554666, 30.896951605751152], [-4.859646165374442, 30.501187649043874], [-5.242129278982786, 30.00044302013557], [-6.060632290053745, 29.731699734001801], [-7.059227667661899, 29.57922842052465], [-8.67411617678283, 28.841288967396643], [-8.665589565454836, 27.656425889592462], [-8.817809007940523, 27.656425889592462], [-8.817828334986642, 27.656425889592462], [-8.794883999049032, 27.120696316022553], [-9.413037482124507, 27.088476060488539], [-9.735343390328749, 26.860944729107409], [-10.189424200877452, 26.860944729107409], [-10.551262579785258, 26.990807603456879], [-11.392554897496948, 26.883423977154386], [-11.718219773800339, 26.104091701760801], [-12.030758836301654, 26.030866197203121], [-12.500962693725368, 24.770116278578136], [-13.891110398809044, 23.691009019459383], [-14.22116777185715, 22.310163072188338], [-14.630832688850942, 21.860939846274867], [-14.750954555713404, 21.500600083903802], [-17.002961798561071, 21.42073415779668], [-17.020428432675768, 21.422310288981631], [-16.973247849993182, 21.88574453377495], [-16.589136928767626, 22.158234361250091], [-16.26192175949566, 22.679339504481273], [-16.326413946995896, 23.017768459560894], [-15.982610642958059, 23.723358466074096], [-15.426003790742183, 24.359133612561035], [-15.089331834360729, 24.520260728446964], [-14.824645148161689, 25.103532619725307], [-14.800925665739666, 25.636264960222285], [-14.439939947964827, 26.254418443297645], [-13.773804897506462, 26.618892320252279], [-13.13994177901429, 27.640147813420491], [-13.121613369914709, 27.654147671719805], [-12.61883663578311, 28.038185533148656], [-11.688919236690761, 28.148643907172577], [-10.9009569971044, 28.832142238880913], [-10.39959225100864, 29.09858592377778], [-9.564811163765624, 29.933573716749855], [-9.814718390329174, 31.177735500609053], [-9.434793260119362, 32.038096421836478], [-9.300692918321827, 32.564679266890629], [-8.657476365585039, 33.24024526624239], [-7.654178432638217, 33.697064927702506], [-6.912544114601358, 34.11047638603744], [-6.24434200685141, 35.145865383437517], [-5.929994269219832, 35.759988104793983], [-5.193863491222031, 35.755182196590845]]] } }, - { "type": "Feature", "properties": { "admin": "Moldova", "name": "Moldova", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[26.619336785597788, 48.220726223333457], [26.857823520624798, 48.368210761094488], [27.52253746919515, 48.467119452501102], [28.259546746541837, 48.155562242213406], [28.670891147585163, 48.118148505234089], [29.122698195113024, 47.849095160506458], [29.050867954227321, 47.510226955752493], [29.415135125452732, 47.346645209332571], [29.559674106573105, 46.928582872091312], [29.908851759569295, 46.67436066343145], [29.838210076626289, 46.525325832701675], [30.024658644335364, 46.423936672545032], [29.759971958136383, 46.349987697935354], [29.170653924279879, 46.379262396828693], [29.072106967899288, 46.517677720722482], [28.862972446414055, 46.437889309263824], [28.933717482221621, 46.258830471372491], [28.659987420371575, 45.939986884131628], [28.48526940279276, 45.596907050145887], [28.233553501099035, 45.488283189468369], [28.054442986775392, 45.944586086605618], [28.160017937947707, 46.371562608417207], [28.128030226359037, 46.81047638608824], [27.551166212684841, 47.405117092470817], [27.233872918412736, 47.826770941756365], [26.924176059687561, 48.123264472030982], [26.619336785597788, 48.220726223333457]]] } }, - { "type": "Feature", "properties": { "admin": "Madagascar", "name": "Madagascar", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[49.543518914595737, -12.469832858940553], [49.80898074727908, -12.895284925999551], [50.05651085795715, -13.555761407121981], [50.217431268114055, -14.758788750876795], [50.476536899625515, -15.226512139550541], [50.377111443895942, -15.706069431219122], [50.200274692593169, -16.000263360256763], [49.860605503138665, -15.414252618066913], [49.672606642460849, -15.710203545802477], [49.863344354050142, -16.451036879138773], [49.774564243372694, -16.875042006093597], [49.49861209493411, -17.10603565843827], [49.435618523970298, -17.953064060134363], [49.04179243347393, -19.118781019774442], [48.548540887247995, -20.496888116134119], [47.930749139198653, -22.391501153251077], [47.547723423051295, -23.781958916928513], [47.095761346226588, -24.941629733990446], [46.282477654817079, -25.178462823184102], [45.409507684110444, -25.601434421493082], [44.833573846217547, -25.346101169538933], [44.039720493349755, -24.9883452287823], [43.763768344911156, -24.460677178649988], [43.697777540874441, -23.574116306250595], [43.345654331237611, -22.77690398528387], [43.254187046080986, -22.057413018484116], [43.433297560404633, -21.336475111580185], [43.893682895692919, -21.163307386970121], [43.89637007017209, -20.830459486578167], [44.374325392439644, -20.072366224856385], [44.464397413924374, -19.435454196859045], [44.23242190936616, -18.961994724200899], [44.042976108584149, -18.331387220943167], [43.963084344260899, -17.409944756746778], [44.312468702986273, -16.850495700754951], [44.446517368351387, -16.216219170804504], [44.944936557806521, -16.179373874580396], [45.502731967964976, -15.974373467678538], [45.872993605336255, -15.793454278224681], [46.312243279817203, -15.780018405828795], [46.882182651564271, -15.210182386946309], [47.70512983581235, -14.594302666891762], [48.005214878131241, -14.091232598530372], [47.869047479042152, -13.663868503476582], [48.29382775248137, -13.784067884987483], [48.845060255738773, -13.08917489995866], [48.863508742066976, -12.487867933810417], [49.194651320193302, -12.040556735891967], [49.543518914595737, -12.469832858940553]]] } }, - { "type": "Feature", "properties": { "admin": "Mexico", "name": "Mexico", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-97.140008307670684, 25.869997463478395], [-97.528072475966539, 24.992144069920297], [-97.702945522842214, 24.272343044526728], [-97.776041836319024, 22.932579860927653], [-97.872366706111094, 22.444211737553356], [-97.699043952204164, 21.898689480064256], [-97.388959520236739, 21.411018988525818], [-97.189333462293277, 20.635433254473124], [-96.525575527720306, 19.890930894444061], [-96.292127244841737, 19.32037140550954], [-95.90088497595994, 18.828024196848727], [-94.8390634834427, 18.562717393462204], [-94.425729539756205, 18.144370835843343], [-93.548651292682365, 18.423836981677933], [-92.786113857783477, 18.524838568592255], [-92.037348192090391, 18.704569200103432], [-91.407903408559235, 18.876083278880227], [-90.771869879910852, 19.284120388256778], [-90.533589850613026, 19.867418117751292], [-90.451475999701231, 20.707521877520428], [-90.278618333684889, 20.999855454995547], [-89.601321173851474, 21.261725775634485], [-88.543866339862845, 21.493675441976613], [-87.658416510757704, 21.458845526611977], [-87.051890224948053, 21.543543199138295], [-86.811982388032931, 21.331514797444747], [-86.845907965832595, 20.849864610268348], [-87.383291185235848, 20.255404771398727], [-87.621054450210721, 19.646553046135917], [-87.436750454441764, 19.472403469312265], [-87.586560431655911, 19.040130113190738], [-87.837191128271485, 18.259815985583426], [-88.090664028663156, 18.516647854074048], [-88.300031094093626, 18.499982204659997], [-88.490122850279278, 18.486830552641717], [-88.84834387892657, 17.883198147040329], [-89.029857347351737, 18.001511338772556], [-89.150909389995462, 17.955467637600403], [-89.143080410503316, 17.808318996649401], [-90.067933519230891, 17.819326076727517], [-91.001519945015943, 17.817594916245692], [-91.002269253284155, 17.254657701074272], [-91.453921271515114, 17.252177232324183], [-91.08167009150057, 16.918476670799517], [-90.711821865587623, 16.687483018454767], [-90.600846727240921, 16.470777899638787], [-90.438866950221993, 16.410109768128105], [-90.464472622422633, 16.069562079324722], [-91.747960171255926, 16.066564846251762], [-92.229248623406278, 15.251446641495871], [-92.087215949252013, 15.06458466232851], [-92.203229539747255, 14.830102850804108], [-92.227750006869812, 14.538828640190953], [-93.359463874061746, 15.61542959234367], [-93.875168830118511, 15.94016429286591], [-94.691656460330108, 16.20097524664288], [-95.250227016973014, 16.128318182840641], [-96.053382127653293, 15.752087917539592], [-96.557434048228274, 15.653515122942787], [-97.263592495496624, 15.917064927631312], [-98.013029954809596, 16.107311713113912], [-98.947675747456486, 16.566043402568763], [-99.697397427147024, 16.706164048728166], [-100.829498867581293, 17.171071071842047], [-101.666088629954444, 17.649026394109622], [-101.918528001700196, 17.916090196193974], [-102.478132086988907, 17.975750637275095], [-103.500989549558057, 18.292294623278845], [-103.917527432046811, 18.748571682200005], [-104.992009650475467, 19.316133938061679], [-105.493038499761411, 19.946767279535429], [-105.731396043707633, 20.434101874264108], [-105.397772996831321, 20.531718654863422], [-105.500660773524402, 20.816895046466122], [-105.27075232625792, 21.076284898355137], [-105.265817226974022, 21.422103583252348], [-105.603160976975374, 21.871145941652568], [-105.693413865973113, 22.269080308516148], [-106.028716396898943, 22.77375234627862], [-106.909980434988341, 23.767774359628895], [-107.91544877809136, 24.548915310152946], [-108.401904873470954, 25.172313951105931], [-109.260198737406625, 25.580609442644054], [-109.444089321717314, 25.824883938087673], [-109.291643846456267, 26.44293406829842], [-109.801457689231796, 26.676175645447923], [-110.391731737085692, 27.162114976504533], [-110.641018846461606, 27.859876003525521], [-111.178918830187826, 27.941240546169062], [-111.759606899851619, 28.467952582303944], [-112.228234626090369, 28.954408677683482], [-112.27182369672866, 29.266844387320074], [-112.80959448937395, 30.021113593052341], [-113.163810594518651, 30.786880804969424], [-113.148669399857141, 31.170965887978912], [-113.871881069781836, 31.56760834403519], [-114.205736660603506, 31.524045111613123], [-114.776451178835003, 31.79953217216114], [-114.936699795372121, 31.393484605427595], [-114.771231859173483, 30.91361725516526], [-114.673899298951739, 30.162681179315985], [-114.330974494262918, 29.750432440707407], [-113.588875088335413, 29.061611436473008], [-113.424053107540516, 28.826173610951223], [-113.271969367305502, 28.754782619739892], [-113.140039435664363, 28.411289374295954], [-112.962298346796473, 28.425190334582503], [-112.761587083774856, 27.78021678314752], [-112.457910529411635, 27.525813706974752], [-112.24495195193677, 27.171726792910754], [-111.616489020619184, 26.662817287700474], [-111.284674648872993, 25.732589830014426], [-110.987819383572386, 25.294606228124557], [-110.71000688357131, 24.826004340101854], [-110.655048997828871, 24.298594672131113], [-110.17285620811343, 24.265547593680417], [-109.771847093528521, 23.811182562754194], [-109.409104377055698, 23.364672349536242], [-109.433392300232896, 23.185587673428696], [-109.85421932660168, 22.818271592698061], [-110.031391974714424, 22.823077500901199], [-110.295070970483636, 23.430973212166684], [-110.949501309028022, 24.000964260345988], [-111.670568407012681, 24.484423122652508], [-112.182035895621468, 24.73841278736716], [-112.148988817170817, 25.470125230404044], [-112.300710822379671, 26.012004299416613], [-112.777296719191526, 26.321959540303162], [-113.464670783321907, 26.768185533143416], [-113.596729906043805, 26.639459540304465], [-113.848936733844241, 26.900063788352437], [-114.465746629680027, 27.142090358991361], [-115.055142178184965, 27.722726752222904], [-114.982252570437382, 27.798200181585109], [-114.570365566854917, 27.741485297144884], [-114.199328782999231, 28.115002549750553], [-114.162018398884612, 28.566111965442296], [-114.931842210736605, 29.279479275015483], [-115.518653937626965, 29.556361599235395], [-115.887365282029563, 30.180793768834171], [-116.2583503894529, 30.836464341753572], [-116.721526252084956, 31.635743720012037], [-117.127759999999839, 32.53534], [-115.99135, 32.612390000000111], [-114.72139, 32.72083], [-114.815, 32.52528], [-113.30498, 32.03914], [-111.02361, 31.33472], [-109.035, 31.341940000000129], [-108.24194, 31.34222], [-108.24, 31.754853718166366], [-106.507589999999851, 31.75452], [-106.1429, 31.39995], [-105.63159, 31.08383], [-105.03737, 30.64402], [-104.70575, 30.12173], [-104.456969999999885, 29.57196], [-103.94, 29.27], [-103.11, 28.97], [-102.48, 29.76], [-101.6624, 29.7793], [-100.9576, 29.380710000000125], [-100.45584, 28.696120000000118], [-100.11, 28.11000000000012], [-99.52, 27.54], [-99.3, 26.84], [-99.019999999999897, 26.37], [-98.24, 26.06], [-97.529999999999887, 25.84], [-97.140008307670684, 25.869997463478395]]] } }, - { "type": "Feature", "properties": { "admin": "Macedonia", "name": "Macedonia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[20.59023, 41.85541], [20.717310000000108, 41.84711], [20.76216, 42.05186], [21.352700000000134, 42.2068], [21.576635989402117, 42.245224397061847], [21.917080000000105, 42.30364], [22.380525750424674, 42.320259507815074], [22.881373732197339, 41.999297186850349], [22.952377150166505, 41.337993882811176], [22.76177, 41.3048], [22.597308383889008, 41.130487168943198], [22.055377638444266, 41.149865831052686], [21.674160597426969, 40.93127452245794], [21.020040317476397, 40.842726955725873], [20.60518, 41.08622], [20.46315, 41.51509], [20.59023, 41.85541]]] } }, - { "type": "Feature", "properties": { "admin": "Mali", "name": "Mali", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-12.170750291380299, 14.616834214735503], [-11.834207526079465, 14.799096991428936], [-11.666078253617853, 15.388208319556295], [-11.349095017939502, 15.411256008358475], [-10.650791388379414, 15.132745876521422], [-10.086846482778212, 15.330485744686269], [-9.700255092802703, 15.264107367407359], [-9.550238409859388, 15.486496893775435], [-5.537744309908446, 15.501689764869253], [-5.315277268891931, 16.201853745991837], [-5.488522508150438, 16.325102037007962], [-5.971128709324247, 20.640833441647626], [-6.453786586930334, 24.956590684503418], [-4.92333736817423, 24.974574082940993], [-1.550054897457613, 22.792665920497377], [1.823227573259032, 20.61080943448604], [2.060990838233919, 20.142233384679482], [2.683588494486428, 19.856230170160114], [3.146661004253899, 19.693578599521441], [3.158133172222704, 19.057364203360034], [4.267419467800038, 19.155265204336995], [4.270209995143801, 16.852227484601212], [3.723421665063482, 16.184283759012612], [3.638258904646476, 15.568119818580453], [2.749992709981483, 15.409524847876693], [1.385528191746857, 15.323561102759168], [1.01578331869851, 14.968182277887944], [0.374892205414682, 14.928908189346128], [-0.26625729003058, 14.924308986872147], [-0.515854458000348, 15.116157741755725], [-1.066363491205663, 14.973815009007764], [-2.001035122068771, 14.559008287000887], [-2.191824510090384, 14.246417548067352], [-2.967694464520576, 13.798150336151506], [-3.103706834312759, 13.54126679122859], [-3.52280270019986, 13.337661647998612], [-4.006390753587225, 13.472485459848112], [-4.280405035814879, 13.228443508349738], [-4.427166103523802, 12.542645575404292], [-5.220941941743119, 11.713858954307224], [-5.197842576508648, 11.375145778850136], [-5.470564947929004, 10.951269842976044], [-5.404341599946973, 10.370736802609144], [-5.816926235365286, 10.222554633012191], [-6.050452032892266, 10.096360785355442], [-6.205222947606429, 10.524060777219132], [-6.493965013037267, 10.411302801958268], [-6.666460944027547, 10.430810655148447], [-6.850506557635057, 10.138993841996237], [-7.622759161804808, 10.147236232946792], [-7.89958980959237, 10.297382106970824], [-8.029943610048617, 10.206534939001711], [-8.335377163109738, 10.494811916541932], [-8.282357143578279, 10.792597357623842], [-8.407310756860026, 10.90925690352276], [-8.620321010767126, 10.810890814655181], [-8.581305304386772, 11.136245632364801], [-8.376304897484911, 11.393645941610627], [-8.786099005559462, 11.812560939984705], [-8.905264858424529, 12.088358059126433], [-9.127473517279581, 12.308060411015331], [-9.327616339546008, 12.334286200403451], [-9.567911749703212, 12.194243068892472], [-9.890992804392011, 12.060478623904968], [-10.165213792348835, 11.844083563682743], [-10.593223842806278, 11.923975328005977], [-10.870829637078211, 12.177887478072106], [-11.036555955438256, 12.211244615116513], [-11.297573614944508, 12.077971096235768], [-11.456168585648269, 12.076834214725336], [-11.513942836950587, 12.442987575729415], [-11.467899135778522, 12.754518947800973], [-11.553397793005427, 13.141213690641063], [-11.927716030311613, 13.422075100147392], [-12.124887457721256, 13.994727484589784], [-12.170750291380299, 14.616834214735503]]] } }, - { "type": "Feature", "properties": { "admin": "Myanmar", "name": "Myanmar", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[99.543309360759281, 20.186597601802056], [98.959675734454848, 19.752980658440944], [98.253723992915582, 19.708203029860041], [97.797782830804394, 18.627080389881751], [97.375896437573516, 18.445437730375811], [97.859122755934848, 17.567946071843657], [98.493761020911322, 16.837835598207928], [98.90334842325673, 16.177824204976115], [98.537375929765687, 15.308497422746081], [98.192074009191373, 15.123702500870349], [98.430819126379859, 14.622027696180831], [99.097755161538728, 13.827502549693275], [99.212011753336071, 13.269293728076462], [99.196353794351637, 12.804748439988666], [99.587286004639694, 11.892762762901695], [99.038120558673953, 10.960545762572435], [98.553550653073017, 9.932959906448543], [98.457174106848697, 10.675266018105146], [98.764545526120756, 11.441291612183745], [98.428338657629823, 12.032986761925681], [98.509574009192661, 13.122377631070675], [98.103603957107666, 13.64045970301285], [97.777732375075161, 14.837285874892638], [97.597071567782749, 16.100567938699765], [97.164539829499773, 16.928734442609336], [96.505768670642965, 16.427240505432845], [95.369352248112378, 15.714389960182599], [94.808404575584092, 15.803454291237637], [94.188804152404515, 16.037936102762014], [94.533485955791321, 17.277240301985724], [94.324816522196741, 18.213513902249893], [93.540988397193615, 19.366492621330021], [93.663254835996199, 19.726961574781992], [93.078277622452163, 19.855144965081973], [92.368553501355606, 20.670883287025344], [92.30323449093865, 21.475485337809815], [92.652257114637976, 21.324047552978481], [92.672720981825549, 22.041238918541247], [93.166127557348361, 22.278459580977099], [93.060294224014598, 22.703110663335565], [93.286326938859247, 23.043658352138998], [93.325187615942767, 24.078556423432197], [94.106741977925054, 23.850740871673477], [94.552657912171611, 24.675238348890328], [94.603249139385355, 25.162495428970399], [95.155153436262566, 26.001307277932078], [95.124767694074933, 26.573572089132295], [96.419365675850941, 27.264589341739221], [97.133999058015277, 27.08377350514996], [97.051988559968066, 27.699058946233144], [97.402561476636123, 27.88253611908544], [97.327113885490007, 28.261582749946331], [97.91198774616943, 28.335945136014338], [98.24623091023328, 27.747221381129172], [98.682690057370451, 27.508812160750612], [98.712093947344499, 26.74353587494026], [98.671838006589127, 25.918702500913518], [97.724609002679117, 25.083637193292994], [97.604719679761956, 23.897404690033039], [98.660262485755737, 24.063286037689959], [98.898749220782747, 23.142722072842524], [99.531992222087382, 22.949038804612574], [99.240898878987224, 22.118314317304577], [99.983489211021464, 21.742936713136398], [100.416537713627349, 21.558839423096607], [101.150032993578222, 21.849984442629015], [101.180005324307515, 21.436572984294024], [100.329101190189519, 20.786121731036229], [100.115987583417819, 20.41784963630818], [99.543309360759281, 20.186597601802056]]] } }, - { "type": "Feature", "properties": { "admin": "Montenegro", "name": "Montenegro", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[19.801613396898681, 42.500093492190835], [19.738051385179627, 42.688247382165564], [19.30449, 42.19574], [19.371770000000136, 41.87755], [19.16246, 41.95502], [18.88214, 42.28151], [18.45, 42.48], [18.56, 42.65], [18.70648, 43.20011], [19.03165, 43.43253], [19.21852, 43.52384], [19.48389, 43.35229], [19.63, 43.213779970270522], [19.95857, 43.10604], [20.3398, 42.89852], [20.25758, 42.81275], [20.0707, 42.58863], [19.801613396898681, 42.500093492190835]]] } }, - { "type": "Feature", "properties": { "admin": "Mongolia", "name": "Mongolia", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[87.751264276076697, 49.297197984405479], [88.805566847695488, 49.470520738312409], [90.713667433640666, 50.331811835321076], [92.234711541719662, 50.802170722041716], [93.104219191462661, 50.495290228876414], [94.147566359435615, 50.480536607457083], [94.815949334698701, 50.013433335970838], [95.814027947983973, 49.977466539095708], [97.259727817781396, 49.726060695995727], [98.231761509191543, 50.422400621128737], [97.825739780674283, 51.010995184933165], [98.861490513100307, 52.047366034546684], [99.981732212323507, 51.634006252643978], [100.889480421962588, 51.516855780638316], [102.065222609467298, 51.25992055928311], [102.255908644624299, 50.510560614618669], [103.676545444760194, 50.089966132195109], [104.621552362081687, 50.275329494826067], [105.886591424586726, 50.406019192092209], [106.888804152455336, 50.274295966180219], [107.868175897250936, 49.793705145865808], [108.475167270951275, 49.282547715850725], [109.402449171996636, 49.292960516957535], [110.662010532678764, 49.130128078805861], [111.581230910286607, 49.377968248077678], [112.897739699354361, 49.543565375356984], [114.362456496235239, 50.248302720737399], [114.962109816550154, 50.140247300815112], [115.485695428531386, 49.805177313834591], [116.678800897286152, 49.888531399121376], [116.191802199367544, 49.134598090199091], [115.485282017073018, 48.135382595403428], [115.742837355615748, 47.726544501326273], [116.308952671373206, 47.853410142602826], [117.295507440257396, 47.69770905210742], [118.064142694166691, 48.066730455103674], [118.866574334794933, 47.747060044946153], [119.772823927897477, 47.048058783550125], [119.66326989143873, 46.692679958678909], [118.874325799638711, 46.805412095723646], [117.421701287914175, 46.672732855814253], [116.717868280098841, 46.388202419615205], [115.985096470200062, 45.727235012385989], [114.46033165899604, 45.339816799493811], [113.463906691544139, 44.808893134127111], [112.436062453258785, 45.011645616224278], [111.873306105600278, 45.102079372735055], [111.348376906379428, 44.457441718110083], [111.667737257943202, 44.073175767587706], [111.829587843881342, 43.743118394539515], [111.129682244920218, 43.406834011400136], [110.412103306115256, 42.871233628911014], [109.243595819131428, 42.519446316084093], [107.744772576937933, 42.481515814781865], [106.129315627061658, 42.134327704428898], [104.964993931093446, 41.597409572916334], [104.522281935648977, 41.908346666016541], [103.312278273534787, 41.907468166667591], [101.833040399179922, 42.51487295182627], [100.845865513108237, 42.663804429691439], [99.515817498780009, 42.524691473961717], [97.451757440177985, 42.748889675460013], [96.349395786527793, 42.725635280928678], [95.762454868556674, 43.319449164394598], [95.306875441471504, 44.241330878265458], [94.688928664125299, 44.352331854828414], [93.480733677141274, 44.975472113619951], [92.133890822318193, 45.115075995456444], [90.945539585334288, 45.286073309910265], [90.585768263718265, 45.719716091487513], [90.970809360724985, 46.888146063822923], [90.280825636763893, 47.693549099307923], [88.854297723346733, 48.06908173277295], [88.013832228551721, 48.599462795600601], [87.751264276076697, 49.297197984405479]]] } }, - { "type": "Feature", "properties": { "admin": "Mozambique", "name": "Mozambique", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[34.559989047999345, -11.520020033415923], [35.312397902169032, -11.439146416879145], [36.514081658684248, -11.720938002166733], [36.775150994622791, -11.594537448780804], [37.471284214026596, -11.568750909067157], [37.827644891111383, -11.268769219612834], [38.427556593587745, -11.285202325081654], [39.521029900883768, -10.896853936408224], [40.316588576017182, -10.317096042525696], [40.478387485523022, -10.765440769089992], [40.437253045418672, -11.761710707245014], [40.560811395028558, -12.639176527561023], [40.599620395679743, -14.201975192931858], [40.775475294768988, -14.691764418194239], [40.477250604012596, -15.406294447493968], [40.089263950365208, -16.100774021064456], [39.452558628097044, -16.720891208566936], [38.53835086442151, -17.101023044505954], [37.411132846838875, -17.586368096591233], [36.281279331209348, -18.659687595293445], [35.896496616364054, -18.842260430580634], [35.198399692533137, -19.552811374593887], [34.786383497870041, -19.784011732667732], [34.701892531072836, -20.497043145431007], [35.176127150215358, -21.254361260668407], [35.373427768705731, -21.840837090748874], [35.385848253705397, -22.14], [35.562545536369079, -22.09], [35.533934767404297, -23.070787855727751], [35.371774122872374, -23.535358982031692], [35.607470330555621, -23.706563002214676], [35.458745558419615, -24.122609958596545], [35.040734897610655, -24.478350518493798], [34.215824008935463, -24.816314385682652], [33.013210076639005, -25.357573337507731], [32.574632195777859, -25.727318210556088], [32.660363396950082, -26.148584486599443], [32.915955031065685, -26.215867201443459], [32.830120477028878, -26.74219166433619], [32.071665480281062, -26.733820082304902], [31.985779249811962, -26.29177988048022], [31.837777947728057, -25.843331801051342], [31.752408481581874, -25.484283949487406], [31.930588820124242, -24.369416599222532], [31.670397983534645, -23.658969008073861], [31.191409132621278, -22.251509698172395], [32.244988234188007, -21.116488539313689], [32.508693068173436, -20.395292250248303], [32.659743279762573, -20.30429005298231], [32.772707960752619, -19.715592136313294], [32.611994256324884, -19.419382826416268], [32.654885695127142, -18.672089939043492], [32.849860874164385, -17.979057305577175], [32.847638787575839, -16.713398125884613], [32.328238966610222, -16.392074069893749], [31.852040643040592, -16.319417006091374], [31.636498243951188, -16.071990248277881], [31.173063999157673, -15.860943698797868], [30.338954705534537, -15.880839125230242], [30.274255812305103, -15.507786960515208], [30.179481235481827, -14.796099134991525], [33.214024692525207, -13.97186003993615], [33.789700148256678, -14.451830743063068], [34.064825473778619, -14.359950046448118], [34.459633416488536, -14.613009535381421], [34.517666049952304, -15.013708591372609], [34.307291294092089, -15.478641452702592], [34.381291945134045, -16.183559665596039], [35.033810255683527, -16.801299737213089], [35.339062941231639, -16.107440280830108], [35.771904738108347, -15.896858819240721], [35.686845330555926, -14.611045830954328], [35.267956170398001, -13.887834161029563], [34.907151320136158, -13.565424899960565], [34.559989047999345, -13.579997653866872], [34.280006137841973, -12.280025323132504], [34.559989047999345, -11.520020033415923]]] } }, - { "type": "Feature", "properties": { "admin": "Mauritania", "name": "Mauritania", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-12.170750291380299, 14.616834214735503], [-12.830658331747513, 15.303691514542942], [-13.43573767745306, 16.039383042866188], [-14.099521450242175, 16.304302273010489], [-14.577347581428977, 16.598263658102805], [-15.135737270558813, 16.587282416240779], [-15.623666144258689, 16.369337063049809], [-16.120690070041928, 16.45566254319338], [-16.463098110407881, 16.135036119038457], [-16.549707810929061, 16.673892116761959], [-16.270551723688353, 17.166962795474866], [-16.146347418674846, 18.108481553616652], [-16.256883307347163, 19.096715806550304], [-16.377651129613266, 19.593817246981981], [-16.277838100641514, 20.092520656814695], [-16.536323614965465, 20.567866319251486], [-17.063423224342568, 20.99975210213082], [-16.845193650773989, 21.333323472574875], [-12.929101935263528, 21.327070624267559], [-13.118754441774708, 22.771220201096249], [-12.874221564169574, 23.284832261645171], [-11.93722449385332, 23.374594224536164], [-11.969418911171159, 25.933352769468261], [-8.687293667017398, 25.881056219988899], [-8.684399786809051, 27.395744126895998], [-4.92333736817423, 24.974574082940993], [-6.453786586930334, 24.956590684503418], [-5.971128709324247, 20.640833441647626], [-5.488522508150438, 16.325102037007962], [-5.315277268891931, 16.201853745991837], [-5.537744309908446, 15.501689764869253], [-9.550238409859388, 15.486496893775435], [-9.700255092802703, 15.264107367407359], [-10.086846482778212, 15.330485744686269], [-10.650791388379414, 15.132745876521422], [-11.349095017939502, 15.411256008358475], [-11.666078253617853, 15.388208319556295], [-11.834207526079465, 14.799096991428936], [-12.170750291380299, 14.616834214735503]]] } }, - { "type": "Feature", "properties": { "admin": "Malawi", "name": "Malawi", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[34.559989047999345, -11.520020033415923], [34.280006137841973, -12.280025323132504], [34.559989047999345, -13.579997653866872], [34.907151320136158, -13.565424899960565], [35.267956170398001, -13.887834161029563], [35.686845330555926, -14.611045830954328], [35.771904738108347, -15.896858819240721], [35.339062941231639, -16.107440280830108], [35.033810255683527, -16.801299737213089], [34.381291945134045, -16.183559665596039], [34.307291294092089, -15.478641452702592], [34.517666049952304, -15.013708591372609], [34.459633416488536, -14.613009535381421], [34.064825473778619, -14.359950046448118], [33.789700148256678, -14.451830743063068], [33.214024692525207, -13.97186003993615], [32.688165317523122, -13.712857761289273], [32.991764357237876, -12.783870537978272], [33.306422153463068, -12.435778090060214], [33.114289178201908, -11.607198174692311], [33.315310499817279, -10.796549981329695], [33.485687697083584, -10.525558770391111], [33.231387973775291, -9.676721693564799], [32.759375441221316, -9.230599053589058], [33.739729038230443, -9.417150974162722], [33.940837724096532, -9.693673841980292], [34.280006137841973, -10.159999688358402], [34.559989047999345, -11.520020033415923]]] } }, - { "type": "Feature", "properties": { "admin": "Malaysia", "name": "Malaysia", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[101.075515578213299, 6.204867051615891], [101.154218784593809, 5.691384182147713], [101.814281854258013, 5.810808417174228], [102.141186964936423, 6.221636053894655], [102.371147088635212, 6.12820506431096], [102.961705356866673, 5.524495144061077], [103.381214634212142, 4.855001125503746], [103.438575474056165, 4.181605536308381], [103.332122023534851, 3.72669790284297], [103.42942874554052, 3.382868760589019], [103.502447544368877, 2.791018581550204], [103.854674106870334, 2.515454006353763], [104.247931756611479, 1.631141058759055], [104.228811476663523, 1.293048000489534], [103.519707472754433, 1.226333726400682], [102.573615350354771, 1.967115383304744], [101.39063846232915, 2.760813706875623], [101.273539666755838, 3.27029165284118], [100.69543541870668, 3.939139715994869], [100.557407668055092, 4.767280381688279], [100.19670617065772, 5.312492580583678], [100.306260207116509, 6.040561835143875], [100.085756870527078, 6.46448944745029], [100.259596388756918, 6.64282481528957], [101.075515578213299, 6.204867051615891]]], [[[118.618320754064825, 4.47820241944754], [117.882034946770162, 4.137551377779487], [117.01521447150634, 4.306094061699468], [115.86551720587677, 4.306559149590156], [115.51907840379198, 3.169238389494395], [115.134037306785231, 2.821481838386219], [114.621355422017473, 1.430688177898886], [113.805849644019531, 1.217548732911041], [112.859809198052176, 1.497790025229946], [112.380251906383648, 1.410120957846757], [111.797548455860408, 0.904441229654651], [111.159137811326559, 0.976478176269509], [110.514060907027101, 0.773131415200993], [109.830226678508836, 1.338135687664191], [109.663260125773718, 2.006466986494984], [110.396135288537039, 1.663774725751395], [111.168852980597478, 1.850636704918784], [111.370081007942076, 2.697303371588872], [111.796928338672842, 2.885896511238073], [112.995614862115247, 3.102394924324869], [113.712935418758718, 3.893509426281127], [114.204016554828399, 4.525873928236819], [114.659595981913526, 4.00763682699781], [114.869557326315373, 4.348313706881952], [115.347460972150671, 4.316636053887009], [115.405700311343594, 4.955227565933824], [115.450710483869798, 5.447729803891561], [116.220741001450961, 6.143191229675621], [116.725102980619752, 6.924771429873998], [117.129626092600461, 6.928052883324566], [117.643393182446303, 6.422166449403305], [117.689075148592337, 5.98749013918018], [118.347691278152197, 5.708695786965462], [119.181903924639926, 5.407835598162249], [119.110693800941718, 5.016128241389864], [118.439727004064082, 4.966518866389619], [118.618320754064825, 4.47820241944754]]]] } }, - { "type": "Feature", "properties": { "admin": "Namibia", "name": "Namibia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[16.344976840895239, -28.576705010697697], [15.601818068105812, -27.821247247022797], [15.210472446359457, -27.09095590587404], [14.989710727608548, -26.117371921495153], [14.74321414557633, -25.392920017195376], [14.40814415859583, -23.85301401132984], [14.385716586981145, -22.656652927340687], [14.257714064194172, -22.111208184499951], [13.868642205468657, -21.699036960539974], [13.352497999737437, -20.872834161057497], [12.82684533046449, -19.673165785401661], [12.608564080463617, -19.045348809487695], [11.794918654028063, -18.069129327061912], [11.734198846085118, -17.30188933682447], [12.215461460019352, -17.11166838955808], [12.814081251688405, -16.941342868724067], [13.462362094789963, -16.971211846588769], [14.058501417709007, -17.42338062914266], [14.209706658595021, -17.353100681225715], [18.26330936043416, -17.309950860262003], [18.956186964603599, -17.789094740472255], [21.377176141045563, -17.930636488519688], [23.215048455506057, -17.52311614346598], [24.033861525170771, -17.29584319424632], [24.6823490740015, -17.35341073981947], [25.076950310982255, -17.578823337476617], [25.084443393664564, -17.661815687737366], [24.520705193792534, -17.887124932529932], [24.217364536239209, -17.889347019118485], [23.579005568137713, -18.281261081620055], [23.196858351339298, -17.869038181227783], [21.655040317478971, -18.219146010005222], [20.910641310314531, -18.252218926672018], [20.881134067475866, -21.814327080983144], [19.895457797940672, -21.849156996347865], [19.895767856534427, -24.767790215760588], [19.89473432788861, -28.461104831660769], [19.002127312911082, -28.972443129188857], [18.464899122804745, -29.045461928017271], [17.836151971109526, -28.856377862261311], [17.387497185951499, -28.783514092729774], [17.218928663815401, -28.355943291946804], [16.824017368240899, -28.082161553664466], [16.344976840895239, -28.576705010697697]]] } }, - { "type": "Feature", "properties": { "admin": "New Caledonia", "name": "New Caledonia", "continent": "Oceania" }, "geometry": { "type": "Polygon", "coordinates": [[[165.779989862326346, -21.080004978115621], [166.599991489933814, -21.700018812753523], [167.120011428086883, -22.159990736583488], [166.74003462144475, -22.399976088146943], [166.189732293968632, -22.129708347260447], [165.474375441752159, -21.679606621998229], [164.829815301775653, -21.149819838141948], [164.16799523341362, -20.444746595951624], [164.029605747735957, -20.105645847252347], [164.459967075862664, -20.120011895429492], [165.020036249041993, -20.459991143477726], [165.460009393575064, -20.800022067958253], [165.779989862326346, -21.080004978115621]]] } }, - { "type": "Feature", "properties": { "admin": "Niger", "name": "Niger", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[2.154473504249949, 11.940150051313422], [2.177107781593917, 12.625017808477534], [1.024103224297619, 12.851825669806598], [0.993045688490156, 13.335749620003865], [0.429927605805517, 13.988733018443893], [0.295646396495215, 14.444234930880663], [0.374892205414767, 14.928908189346144], [1.015783318698481, 14.968182277887989], [1.385528191746971, 15.323561102759237], [2.74999270998154, 15.409524847876751], [3.63825890464659, 15.56811981858044], [3.723421665063596, 16.184283759012654], [4.270209995143886, 16.852227484601311], [4.267419467800095, 19.155265204337123], [5.677565952180712, 19.601206976799794], [8.572893100629868, 21.565660712159225], [11.999505649471697, 23.471668402596432], [13.581424594790459, 23.040506089769274], [14.143870883855239, 22.491288967371126], [14.8513, 22.862950000000119], [15.096887648181847, 21.308518785074902], [15.471076694407314, 21.048457139565979], [15.487148064850143, 20.730414537025634], [15.90324669766431, 20.387618923417499], [15.68574059414777, 19.957180080642384], [15.300441114979716, 17.927949937405], [15.247731154041842, 16.627305813050778], [13.972201775781681, 15.684365953021139], [13.540393507550785, 14.36713369390122], [13.956698846094124, 13.996691189016925], [13.954476759505607, 13.353448798063765], [14.595781284247604, 13.330426947477859], [14.495787387762899, 12.859396267137353], [14.213530714584746, 12.80203542729333], [14.181336297266906, 12.483656927943169], [13.995352817448289, 12.4615652531383], [13.318701613018558, 13.55635630945795], [13.083987257548809, 13.596147162322492], [12.302071160540546, 13.037189032437535], [11.527803175511504, 13.328980007373556], [10.989593133191532, 13.387322699431191], [10.701031935273816, 13.246917832894038], [10.114814487354748, 13.277251898649464], [9.524928012743088, 12.85110219975456], [9.014933302454436, 12.826659247280414], [7.804671258178869, 13.343526923063731], [7.330746697630046, 13.098038031461213], [6.82044192874781, 13.115091254117598], [6.445426059605721, 13.492768459522718], [5.443058302440135, 13.865923977102225], [4.368343540066006, 13.747481594289408], [4.107945997747378, 13.531215725147941], [3.967282749048933, 12.956108710171574], [3.680633579125924, 12.552903347214167], [3.611180454125587, 11.660167141155965], [2.848643019226585, 12.235635891158207], [2.490163608418015, 12.233052069543588], [2.154473504249949, 11.940150051313422]]] } }, - { "type": "Feature", "properties": { "admin": "Nigeria", "name": "Nigeria", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[8.500287713259693, 4.771982937026847], [7.462108188515939, 4.41210826254624], [7.082596469764438, 4.464689032403228], [6.698072137080598, 4.240594183769516], [5.898172641634686, 4.262453314628984], [5.362804803090881, 4.887970689305957], [5.033574252959368, 5.611802476418233], [4.325607130560683, 6.270651149923466], [3.574180128604552, 6.258300482605717], [2.691701694356254, 6.258817246928628], [2.74906253420022, 7.870734361192886], [2.723792758809509, 8.506845404489708], [2.912308383810255, 9.13760793704432], [3.220351596702101, 9.4441525333997], [3.705438266625918, 10.063210354040207], [3.600070021182801, 10.332186184119406], [3.797112257511713, 10.734745591673104], [3.572216424177469, 11.327939357951516], [3.611180454125558, 11.660167141155966], [3.68063357912581, 12.552903347214222], [3.967282749048848, 12.956108710171572], [4.107945997747321, 13.531215725147829], [4.368343540066063, 13.747481594289324], [5.443058302440163, 13.865923977102295], [6.445426059605636, 13.492768459522676], [6.820441928747753, 13.115091254117514], [7.330746697630017, 13.098038031461199], [7.804671258178784, 13.343526923063745], [9.014933302454462, 12.826659247280427], [9.524928012742945, 12.851102199754477], [10.114814487354689, 13.277251898649409], [10.701031935273702, 13.246917832894081], [10.989593133191532, 13.387322699431108], [11.527803175511393, 13.328980007373584], [12.302071160540521, 13.037189032437521], [13.083987257548866, 13.596147162322563], [13.318701613018558, 13.556356309457824], [13.995352817448346, 12.461565253138343], [14.181336297266792, 12.483656927943112], [14.57717776862253, 12.085360826053501], [14.468192172918974, 11.90475169519341], [14.415378859116682, 11.572368882692071], [13.572949659894558, 10.798565985553564], [13.308676385153914, 10.160362046748926], [13.1675997249971, 9.64062632897341], [12.955467970438971, 9.417771714714702], [12.753671502339214, 8.717762762888993], [12.218872104550597, 8.305824082874322], [12.063946160539556, 7.799808457872301], [11.839308709366801, 7.397042344589434], [11.745774366918509, 6.981382961449753], [11.058787876030349, 6.644426784690593], [10.497375115611417, 7.055357774275562], [10.118276808318255, 7.038769639509879], [9.522705926154398, 6.453482367372116], [9.233162876023043, 6.444490668153334], [8.757532993208626, 5.47966583904791], [8.500287713259693, 4.771982937026847]]] } }, - { "type": "Feature", "properties": { "admin": "Nicaragua", "name": "Nicaragua", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-85.712540452807289, 11.088444932494822], [-86.058488328785245, 11.40343862552994], [-86.525849982432931, 11.806876532432593], [-86.7459915839963, 12.143961900272483], [-87.167516242201131, 12.458257961471656], [-87.668493415054698, 12.909909979702629], [-87.557466600275603, 13.064551703336061], [-87.392386237319201, 12.914018256069836], [-87.316654425795463, 12.984685777228972], [-87.005769009127562, 13.025794379117157], [-86.880557013684339, 13.254204209847241], [-86.733821784191576, 13.263092556201441], [-86.755086636079696, 13.754845485890909], [-86.520708177419877, 13.778487453664436], [-86.312142096689911, 13.771356106008167], [-86.096263800790581, 14.038187364147245], [-85.801294725268576, 13.836054999237586], [-85.698665330736901, 13.960078436738083], [-85.514413011400222, 14.079011745657834], [-85.165364549484792, 14.354369615125076], [-85.148750576502948, 14.560196844943615], [-85.052787441736925, 14.551541042534719], [-84.924500698572388, 14.790492865452348], [-84.820036790694346, 14.819586696832669], [-84.649582078779602, 14.66680532476175], [-84.449335903648588, 14.621614284722494], [-84.228341640952394, 14.748764146376654], [-83.975721401693576, 14.749435939996458], [-83.628584967772895, 14.880073960830298], [-83.489988776366104, 15.016267198135534], [-83.147219000974104, 14.995829169164109], [-83.233234422523907, 14.8998660343981], [-83.28416154654758, 14.676623846897197], [-83.182126430987267, 14.310703029838447], [-83.412499966144424, 13.970077826386554], [-83.519831916014667, 13.56769928634588], [-83.55220720084553, 13.127054348193084], [-83.498515387694255, 12.869292303921226], [-83.473323126951968, 12.419087225794424], [-83.626104499022887, 12.320850328007563], [-83.719613003255034, 11.893124497927724], [-83.650857510090702, 11.629032090700116], [-83.855470343750369, 11.373311265503785], [-83.808935716471538, 11.103043524617274], [-83.655611741861563, 10.938764146361418], [-83.895054490885926, 10.726839097532444], [-84.190178595704822, 10.793450018756671], [-84.355930752281026, 10.999225572142901], [-84.673069017256239, 11.082657172078139], [-84.903003302738924, 10.952303371621895], [-85.561851976244171, 11.217119248901593], [-85.712540452807289, 11.088444932494822]]] } }, - { "type": "Feature", "properties": { "admin": "Netherlands", "name": "Netherlands", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[6.074182570020922, 53.51040334737813], [6.905139601274128, 53.482162177130633], [7.092053256873895, 53.14404328064488], [6.842869500362381, 52.228440253297542], [6.589396599970825, 51.85202912048338], [5.988658074577812, 51.85161570902504], [6.156658155958779, 50.803721015010574], [5.60697594567, 51.037298488969768], [4.973991326526913, 51.475023708698124], [4.047071160507527, 51.267258612668556], [3.314971144228536, 51.345755113319903], [3.830288527043137, 51.620544542031936], [4.705997348661184, 53.091798407597757], [6.074182570020922, 53.51040334737813]]] } }, - { "type": "Feature", "properties": { "admin": "Norway", "name": "Norway", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[28.165547316202911, 71.185474351680497], [31.293418409965472, 70.453787746859902], [30.005435011522785, 70.186258856884876], [31.101078728975118, 69.558080145944857], [29.399580519332879, 69.156916002063056], [28.591929559043187, 69.064776923286686], [29.015572950971968, 69.76649119737796], [27.732292107867885, 70.164193020296281], [26.179622023226298, 69.825298977326142], [25.689212680776389, 69.092113755968995], [24.735679152126714, 68.649556789821432], [23.662049594830759, 68.891247463650515], [22.356237827247405, 68.841741441514941], [21.244936150810723, 69.370443020293109], [20.645592889089581, 69.106247260200846], [20.02526899585791, 69.065138658312705], [19.878559604581248, 68.407194322372604], [17.993868442464386, 68.567391262477329], [17.729181756265344, 68.01055186631622], [16.768878614985535, 68.013936672631374], [16.108712192456832, 67.302455552836889], [15.108411492583055, 66.193866889095418], [13.555689731509087, 64.787027696381458], [13.919905226302202, 64.445420640716108], [13.571916131248766, 64.049114081469654], [12.57993533697393, 64.066218980558332], [11.930569288794228, 63.128317572676977], [11.992064243221531, 61.800362453856557], [12.63114668137524, 61.293571682370079], [12.300365838274896, 60.117932847730046], [11.468271925511173, 59.432393296945989], [11.027368605196925, 58.856149400459394], [10.356556837616095, 59.469807033925363], [8.382000359743641, 58.313288479233265], [7.048748406613297, 58.078884182357271], [5.665835402050418, 58.588155422593658], [5.308234490590733, 59.663231919993805], [4.992078077829005, 61.97099803328426], [5.912900424837885, 62.614472968182682], [8.553411085655766, 63.454008287196459], [10.527709181366784, 64.486038316497471], [12.358346795306371, 65.879725857193151], [14.7611458675816, 67.810641587995121], [16.435927361728968, 68.563205471461671], [19.184028354578512, 69.817444159617807], [21.378416375420606, 70.255169379346043], [23.02374230316158, 70.202071845166259], [24.546543409938515, 71.030496731237221], [26.370049676221807, 70.986261705195361], [28.165547316202911, 71.185474351680497]]], [[[24.72412, 77.85385], [22.49032, 77.44493], [20.72601, 77.67704], [21.41611, 77.93504], [20.8119, 78.25463], [22.88426, 78.45494], [23.28134, 78.07954], [24.72412, 77.85385]]], [[[18.25183, 79.70175], [21.54383, 78.95611], [19.02737, 78.5626], [18.47172, 77.82669], [17.59441, 77.63796], [17.1182, 76.80941], [15.91315, 76.77045], [13.76259, 77.38035], [14.66956, 77.73565], [13.1706, 78.02493], [11.22231, 78.8693], [10.44453, 79.65239], [13.17077, 80.01046], [13.71852, 79.66039], [15.14282, 79.67431], [15.52255, 80.01608], [16.99085, 80.05086], [18.25183, 79.70175]]], [[[25.447625359811887, 80.407340399894494], [27.407505730913492, 80.056405748200447], [25.924650506298171, 79.517833970854539], [23.024465773213613, 79.40001170522909], [20.075188429451877, 79.566823228667232], [19.897266473070907, 79.842361965647498], [18.46226362475792, 79.859880276194403], [17.368015170977454, 80.318896186027004], [20.455992059010693, 80.598155626132225], [21.907944777115397, 80.357679348462071], [22.919252557067431, 80.657144273593488], [25.447625359811887, 80.407340399894494]]]] } }, - { "type": "Feature", "properties": { "admin": "Nepal", "name": "Nepal", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[88.120440708369841, 27.876541652939586], [88.043132765661198, 27.445818589786818], [88.174804315140904, 26.810405178325944], [88.060237664749806, 26.414615383402484], [87.22747195836628, 26.39789805755607], [86.024392938179147, 26.630984605408567], [85.25177859898335, 26.726198431906337], [84.675017938173767, 27.234901231387528], [83.304248895199535, 27.364505723575554], [81.999987420584958, 27.925479234319987], [81.057202589851997, 28.416095282499036], [80.088424513676259, 28.794470119740136], [80.476721225917373, 29.729865220655334], [81.11125613802929, 30.183480943313398], [81.525804477874729, 30.422716986608627], [82.327512648450863, 30.115268052688126], [83.337115106137176, 29.463731594352193], [83.898992954446712, 29.320226141877654], [84.234579705750136, 28.839893703724691], [85.011638218123025, 28.642773952747337], [85.823319940131498, 28.203575954698699], [86.954517043000592, 27.97426178640351], [88.120440708369841, 27.876541652939586]]] } }, - { "type": "Feature", "properties": { "admin": "New Zealand", "name": "New Zealand", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[173.020374790740703, -40.919052422856417], [173.247234328502003, -41.331998793300777], [173.958405389702875, -40.926700534835604], [174.2475867048081, -41.349155368821663], [174.248516880589449, -41.770008233406749], [173.876446568087886, -42.233184096038819], [173.222739699595621, -42.970038344088557], [172.711246372770717, -43.372287693048492], [173.080112746470206, -43.853343601253577], [172.308583612352464, -43.865694268571332], [171.452925246463622, -44.24251881284372], [171.185137974327233, -44.897104180684885], [170.616697219116588, -45.908928724959701], [169.83142215400926, -46.355774834987585], [169.332331170934253, -46.641235446967848], [168.411353794628525, -46.619944756863582], [167.763744745146823, -46.290197442409195], [166.676886021184202, -46.219917494492236], [166.509144321964669, -45.852704766626204], [167.046424188503238, -45.110941257508664], [168.303763462596862, -44.12397307716612], [168.949408807651508, -43.93581918719142], [169.667814569373149, -43.555325616226334], [170.524919875366152, -43.031688327812823], [171.125089960004004, -42.512753594737781], [171.569713983443194, -41.767424411792128], [171.948708937871885, -41.514416599291145], [172.097227004278722, -40.956104424809674], [172.798579543343948, -40.493962090823466], [173.020374790740703, -40.919052422856417]]], [[[174.612008905330526, -36.156397393540537], [175.336615838927173, -37.209097995758263], [175.3575964704375, -36.52619394302112], [175.808886753642469, -36.798942152657681], [175.958490025127475, -37.555381768546063], [176.763195428776555, -37.881253350578696], [177.438813104560495, -37.961248467766488], [178.010354445708657, -37.579824721020124], [178.517093540762801, -37.695373223624792], [178.274731073313802, -38.582812595373092], [177.970460239979332, -39.166342868812968], [177.206992629299123, -39.145775648760839], [176.939980503647007, -39.449736423501562], [177.032946405340113, -39.879942722331471], [176.8858236026052, -40.06597787858216], [176.508017206119348, -40.60480803808958], [176.012440220440283, -41.289624118821493], [175.239567499082966, -41.688307793953236], [175.067898391009408, -41.425894870775075], [174.650972935278418, -41.281820977545443], [175.227630243223615, -40.459235528323397], [174.900156691789959, -39.908933200847216], [173.824046665743992, -39.508854262043506], [173.852261997775315, -39.146602471677461], [174.57480187408035, -38.797683200842748], [174.743473749081033, -38.027807712558378], [174.69701663645057, -37.381128838857954], [174.292028436579187, -36.71109221776144], [174.319003534235549, -36.534823907213884], [173.840996535535766, -36.121980889634109], [173.05417117745958, -35.237125339500331], [172.636005487353714, -34.529106540669382], [173.007042271209457, -34.450661716450334], [173.551298456107475, -35.006183363587958], [174.329390497126241, -35.265495700828616], [174.612008905330526, -36.156397393540537]]]] } }, - { "type": "Feature", "properties": { "admin": "Oman", "name": "Oman", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[58.861141391846573, 21.114034532144299], [58.487985874266961, 20.428985907467101], [58.03431847517659, 20.481437486243347], [57.826372511634098, 20.24300242764863], [57.66576216007094, 19.736004950433109], [57.788700392493368, 19.067570298737646], [57.694390903560667, 18.944709580963799], [57.2342639504338, 18.947991034414255], [56.609650913321971, 18.574267076079476], [56.512189162019482, 18.087113348863934], [56.283520949128011, 17.876066799383945], [55.661491733630683, 17.884128322821535], [55.269939406155189, 17.632309068263194], [55.274900343655091, 17.228354397037659], [54.791002231674113, 16.950696926333357], [54.239252964093751, 17.04498057704998], [53.57050825380459, 16.707662665264674], [53.108572625547502, 16.651051133688977], [52.782184279192066, 17.349742336491229], [52.000009800022227, 19.000003363516068], [54.999981723862405, 19.999994004796118], [55.666659376859869, 22.000001125572307], [55.208341098863187, 22.708329982997007], [55.234489373602869, 23.110992743415348], [55.52584109886449, 23.524869289640911], [55.528631626208288, 23.933604030853498], [55.981213820220503, 24.130542914317854], [55.80411868675624, 24.269604193615287], [55.88623253766805, 24.920830593357486], [56.396847365143984, 24.924732163995508], [56.845140415276049, 24.241673081961487], [57.403452589757428, 23.878594468678834], [58.136947869708322, 23.747930609628835], [58.729211460205427, 23.565667832935414], [59.180501743410346, 22.992395331305456], [59.450097690677033, 22.660270900965592], [59.80806033716285, 22.533611965418199], [59.806148309168087, 22.31052480721419], [59.442191196536399, 21.71454051359208], [59.282407667889871, 21.433885809814875], [58.861141391846573, 21.114034532144299]]], [[[56.391421339753393, 25.895990708921254], [56.261041701080913, 25.714606431576748], [56.070820753814544, 26.055464178973946], [56.362017449779344, 26.395934353128947], [56.485679152253809, 26.309117946878665], [56.391421339753393, 25.895990708921254]]]] } }, - { "type": "Feature", "properties": { "admin": "Pakistan", "name": "Pakistan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[75.158027785140902, 37.13303091078911], [75.896897414050116, 36.666806138651829], [76.192848341785677, 35.898403428687821], [77.837450799474553, 35.494009507787759], [76.871721632804011, 34.653544012992732], [75.757060988268321, 34.504922593721311], [74.240202671204955, 34.748887030571247], [73.749948358051952, 34.317698879527846], [74.104293654277328, 33.441473293586846], [74.451559279278698, 32.764899603805489], [75.258641798813187, 32.271105455040491], [74.405928989564998, 31.692639471965272], [74.421380242820263, 30.97981476493117], [73.450638462217412, 29.976413479119863], [72.823751662084689, 28.961591701772047], [71.777665643200308, 27.913180243434521], [70.61649620960192, 27.989196275335861], [69.514392938113119, 26.940965684511365], [70.168926629522005, 26.491871649678835], [70.282873162725579, 25.722228705339823], [70.844699334602822, 25.215102037043511], [71.0432401874682, 24.356523952730193], [68.842599318318761, 24.359133612560932], [68.176645135373377, 23.691965033456704], [67.443666619745457, 23.944843654876983], [67.145441928989058, 24.663611151624639], [66.37282758979326, 25.425140896093847], [64.530407749291115, 25.237038682551425], [62.905700718034595, 25.218409328710202], [61.497362908784183, 25.078237006118492], [61.874187453056535, 26.239974880472097], [63.316631707619578, 26.756532497661659], [63.23389773952028, 27.217047024030702], [62.755425652929851, 27.378923448184985], [62.727830438085974, 28.259644883735383], [61.771868117118615, 28.699333807890792], [61.369308709564926, 29.303276272085917], [60.874248488208778, 29.829238999952604], [62.549856805272775, 29.318572496044304], [63.550260858011164, 29.468330796826162], [64.148002150331237, 29.340819200145965], [64.350418735618504, 29.560030625928089], [65.046862013616092, 29.472180691031902], [66.346472609324408, 29.88794342703617], [66.38145755398601, 30.738899237586448], [66.938891229118454, 31.304911200479346], [67.683393589147457, 31.303154201781414], [67.792689243444769, 31.582930406209623], [68.556932000609308, 31.713310044882011], [68.926676873657655, 31.620189113892064], [69.317764113242546, 31.901412258424436], [69.262522007122541, 32.501944078088293], [69.687147251264847, 33.105498969041228], [70.323594191371583, 33.358532619758385], [69.93054324735958, 34.020120144175102], [70.881803012988385, 33.988855902638512], [71.156773309213449, 34.348911444632144], [71.115018751921625, 34.733125718722228], [71.613076206350698, 35.153203436822857], [71.498767938121077, 35.650563259415996], [71.262348260385735, 36.074387518857797], [71.846291945283909, 36.509942328429851], [72.920024855444453, 36.720007025696312], [74.067551710917812, 36.836175645488446], [74.575892775372964, 37.02084137628345], [75.158027785140902, 37.13303091078911]]] } }, - { "type": "Feature", "properties": { "admin": "Panama", "name": "Panama", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-77.881571417945239, 7.223771267114783], [-78.214936082660103, 7.512254950384159], [-78.429160732726061, 8.052041123888925], [-78.182095709938608, 8.319182440621772], [-78.43546525746568, 8.387705389840788], [-78.622120530903928, 8.718124497915026], [-79.120307176413732, 8.996092027213022], [-79.557877366845176, 8.932374986197145], [-79.760578172510037, 8.584515082224398], [-80.164481167303322, 8.333315944853593], [-80.382659064439608, 8.29840851484043], [-80.480689256497286, 8.090307522001067], [-80.003689948227148, 7.54752411542337], [-80.276670701808982, 7.419754136581713], [-80.421158006497066, 7.271571966984763], [-80.886400926420791, 7.220541490096535], [-81.059542812814698, 7.817921047390596], [-81.189715745757937, 7.647905585150339], [-81.519514736644666, 7.706610012233908], [-81.721311204744453, 8.108962714058434], [-82.131441209628889, 8.175392767769635], [-82.390934414382542, 8.292362372262287], [-82.820081346350406, 8.290863755725821], [-82.850958014644803, 8.073822740099954], [-82.965783047197348, 8.225027980985983], [-82.9131764391242, 8.423517157419068], [-82.829770677405151, 8.626295477732368], [-82.868657192704759, 8.807266343618521], [-82.719183112300513, 8.925708726431493], [-82.927154914059145, 9.074330145702914], [-82.932890998043561, 9.476812038608172], [-82.546196255203469, 9.566134751824674], [-82.187122565423394, 9.207448635286779], [-82.207586432610952, 8.995575262890098], [-81.808566860669259, 8.95061676679617], [-81.714154018872023, 9.031955471223581], [-81.43928707551153, 8.786234035675715], [-80.947301601876745, 8.858503526235905], [-80.521901211250054, 9.11107208906243], [-79.914599778955974, 9.312765204297618], [-79.573302781884294, 9.611610012241526], [-79.021191779277913, 9.552931423374103], [-79.058450486960353, 9.454565334506523], [-78.500887620747164, 9.420458889193879], [-78.055927700497989, 9.247730414258296], [-77.729513515926399, 8.946844387238867], [-77.353360765273848, 8.670504665558068], [-77.474722866511314, 8.524286200388216], [-77.242566494440069, 7.935278225125442], [-77.431107957656977, 7.638061224798733], [-77.75341386586139, 7.709839789252141], [-77.881571417945239, 7.223771267114783]]] } }, - { "type": "Feature", "properties": { "admin": "Peru", "name": "Peru", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-69.590423753524036, -17.580011895419329], [-69.858443569605839, -18.092693780187009], [-70.3725723944777, -18.347975355708861], [-71.375250210236914, -17.77379851651385], [-71.462040778271117, -17.363487644116379], [-73.444529588500401, -16.359362888252992], [-75.23788265654143, -15.26568287522778], [-76.009205084929931, -14.649286390850317], [-76.423469204397733, -13.823186944232431], [-76.259241502574156, -13.535039157772939], [-77.10619238962181, -12.222716159720816], [-78.092152879534623, -10.377712497604062], [-79.036953091126918, -8.38656788496589], [-79.445920376284832, -7.930833428583859], [-79.760578172510037, -7.194340915560081], [-80.537481655586049, -6.541667575713715], [-81.249996304026411, -6.136834405139182], [-80.926346808582423, -5.690556735866563], [-81.410942552399433, -4.736764825055459], [-81.099669562489353, -4.036394138203696], [-80.302560594387188, -3.404856459164712], [-80.184014858709645, -3.821161797708043], [-80.46929460317692, -4.059286797708999], [-80.442241990872134, -4.425724379090673], [-80.028908047185581, -4.346090996928893], [-79.62497921417615, -4.454198093283494], [-79.205289069317715, -4.959128513207388], [-78.639897223612323, -4.547784112164072], [-78.450683966775628, -3.873096612161375], [-77.83790483265858, -3.003020521663103], [-76.635394253226707, -2.608677666843817], [-75.544995693652027, -1.56160979574588], [-75.233722703741932, -0.911416924649529], [-75.373223232713841, -0.15203175212045], [-75.106624518520064, -0.05720549886486], [-74.441600511355958, -0.530820000819887], [-74.122395189089048, -1.002832533373848], [-73.659503546834586, -1.260491224781134], [-73.070392218707212, -2.308954359550952], [-72.325786505813639, -2.434218031426453], [-71.774760708285385, -2.169789727388937], [-71.413645799429773, -2.342802422702128], [-70.813475714791949, -2.256864515800742], [-70.047708502874841, -2.725156345229699], [-70.692682054309699, -3.742872002785858], [-70.394043952094975, -3.766591485207825], [-69.893635219996611, -4.298186944194326], [-70.79476884630229, -4.251264743673302], [-70.928843349883564, -4.401591485210367], [-71.748405727816532, -4.59398284263301], [-72.891927659787243, -5.274561455916979], [-72.964507208941185, -5.741251315944892], [-73.219711269814596, -6.089188734566076], [-73.120027431923575, -6.629930922068238], [-73.724486660441627, -6.918595472850638], [-73.723401455363486, -7.340998630404412], [-73.987235480429646, -7.523829847853063], [-73.571059332967053, -8.424446709835832], [-73.015382656532537, -9.03283334720806], [-73.226713426390148, -9.462212823121233], [-72.563033006465631, -9.520193780152715], [-72.184890713169821, -10.05359791426943], [-71.302412278921523, -10.079436130415372], [-70.481893886991159, -9.490118096558842], [-70.548685675728393, -11.009146823778462], [-70.093752204046879, -11.123971856331011], [-69.52967810736493, -10.951734307502193], [-68.665079718689611, -12.561300144097171], [-68.880079515239956, -12.89972909917665], [-68.929223802349526, -13.602683607643007], [-68.94888668483658, -14.45363941819328], [-69.339534674747, -14.953195489158828], [-69.160346645774936, -15.323973890853015], [-69.389764166934697, -15.66012908291165], [-68.959635382753291, -16.500697930571267], [-69.590423753524036, -17.580011895419329]]] } }, - { "type": "Feature", "properties": { "admin": "Philippines", "name": "Philippines", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[126.376813592637447, 8.414706325713352], [126.478512811387873, 7.750354112168976], [126.537423944200611, 7.189380601424572], [126.19677290253253, 6.274294338400038], [125.831420526229081, 7.293715318221855], [125.363852166852283, 6.78648529706099], [125.683160841983707, 6.049656887227257], [125.396511672060626, 5.581003322772288], [124.219787632342332, 6.16135549562618], [123.938719517106918, 6.88513560630612], [124.243662144061318, 7.360610459823659], [123.610212437027542, 7.833527329942753], [123.29607140512519, 7.418875637232786], [122.825505812675388, 7.457374579290216], [122.085499302255769, 6.899424139834847], [121.919928013192603, 7.192119452336072], [122.312358840017112, 8.034962063016506], [122.94239790251963, 8.316236883981174], [123.487687616063511, 8.693009751821192], [123.841154412939815, 8.240324204944384], [124.6014697612502, 8.514157619659015], [124.764612257995623, 8.960409450715458], [125.471390822451539, 8.986996975129641], [125.412117954612754, 9.760334784377545], [126.222714471543156, 9.28607432701885], [126.306636997585073, 8.782487494334573], [126.376813592637447, 8.414706325713352]]], [[[123.982437778825798, 10.278778591345811], [123.62318322153277, 9.950090643753297], [123.309920688979332, 9.318268744336676], [122.995883009941636, 9.022188625520398], [122.380054966319463, 9.713360907424201], [122.586088901867072, 9.981044826696104], [122.837081333508706, 10.261156927934234], [122.947410516451896, 10.881868394408029], [123.498849725438447, 10.940624497923945], [123.337774285984722, 10.267383938025445], [124.077935825701218, 11.232725531453706], [123.982437778825798, 10.278778591345811]]], [[[118.504580926590336, 9.316382554558087], [117.174274530100675, 8.367499904814663], [117.664477166821371, 9.066888739452933], [118.386913690261736, 9.684499619989223], [118.98734215706105, 10.376292019080507], [119.511496209797528, 11.36966807702721], [119.689676548339889, 10.554291490109872], [119.029458449378978, 10.003653265823869], [118.504580926590336, 9.316382554558087]]], [[[121.883547804859106, 11.891755072471977], [122.483821242361458, 11.582187404827506], [123.120216506035959, 11.583660183147867], [123.100837843926442, 11.165933742716486], [122.637713657726692, 10.741308498574226], [122.002610304859559, 10.441016750526087], [121.967366978036523, 10.905691229694622], [122.038370396005519, 11.415840969280039], [121.883547804859106, 11.891755072471977]]], [[[125.502551711123488, 12.162694606978347], [125.783464797062152, 11.046121934447767], [125.01188398651226, 11.311454576050377], [125.032761265158115, 10.975816148314703], [125.277449172060244, 10.358722032101308], [124.801819289245714, 10.134678859899889], [124.760168084818474, 10.8379951033923], [124.459101190286049, 10.889929917845633], [124.302521600441722, 11.495370998577227], [124.891012811381572, 11.415582587118589], [124.877990350443952, 11.794189968304988], [124.266761509295705, 12.557760931849682], [125.22711632700782, 12.53572093347719], [125.502551711123488, 12.162694606978347]]], [[[121.527393833503481, 13.069590155484516], [121.262190382981544, 12.2055602075644], [120.833896112146533, 12.704496161342416], [120.323436313967477, 13.466413479053866], [121.18012820850214, 13.429697373910439], [121.527393833503481, 13.069590155484516]]], [[[121.321308221523566, 18.504064642811013], [121.937601353036371, 18.21855235439838], [122.246006300954264, 18.478949896717094], [122.336956821787965, 18.224882717354173], [122.174279412933174, 17.810282701076371], [122.51565392465335, 17.09350474697197], [122.252310825693883, 16.262444362854122], [121.662786086108255, 15.931017564350125], [121.505069614753367, 15.124813544164621], [121.728828566577249, 14.328376369682244], [122.258925409027313, 14.218202216035973], [122.701275669445636, 14.336541245984417], [123.950295037940236, 13.782130642141066], [123.855107049658599, 13.237771104378464], [124.181288690284873, 12.997527370653469], [124.077419061378222, 12.536676947474573], [123.298035109552245, 13.027525539598981], [122.928651971529902, 13.552919826710404], [122.671355015148663, 13.185836289925131], [122.034649692880521, 13.784481919810343], [121.126384718918587, 13.636687323455559], [120.628637323083296, 13.857655747935649], [120.679383579593832, 14.271015529838319], [120.99181928923052, 14.525392767795079], [120.693336216312687, 14.756670640517282], [120.564145135582976, 14.396279201713821], [120.070428501466367, 14.970869452367094], [119.920928582846102, 15.406346747290735], [119.883773228028247, 16.363704331929963], [120.286487664878791, 16.034628811095327], [120.39004723519173, 17.599081122299506], [120.7158671407919, 18.505227362537536], [121.321308221523566, 18.504064642811013]]]] } }, - { "type": "Feature", "properties": { "admin": "Papua New Guinea", "name": "Papua New Guinea", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[155.880025669578401, -6.819996840037758], [155.599991082988765, -6.919990736522491], [155.166994256815087, -6.535931491729299], [154.729191522438327, -5.900828138862208], [154.514114211239644, -5.139117526880012], [154.652503696917336, -5.042430922061839], [154.759990676084357, -5.339983819198493], [155.062917922179338, -5.566791680527486], [155.547746209941693, -6.200654799019658], [156.019965448224752, -6.540013929880386], [155.880025669578401, -6.819996840037758]]], [[[151.982795851854462, -5.478063246282344], [151.459106887008659, -5.560280450058739], [151.301390415653884, -5.840728448106701], [150.754447056276661, -6.083762709175387], [150.241196730753813, -6.317753594592984], [149.709963006793316, -6.316513360218051], [148.890064732050462, -6.026040134305432], [148.318936802360696, -5.74714242922613], [148.401825799756864, -5.437755629094722], [149.298411900020824, -5.583741550319216], [149.845561965127217, -5.505503431829339], [149.996250441690279, -5.026101169457674], [150.139755894164921, -5.001348158389788], [150.236907586873485, -5.53222014732428], [150.807467075808063, -5.455842380396886], [151.089672072553981, -5.113692722192368], [151.647880894170811, -4.757073662946168], [151.537861769821518, -4.167807305521889], [152.136791620084352, -4.148790378438519], [152.338743117480988, -4.31296640382976], [152.318692661751754, -4.867661228050748], [151.982795851854462, -5.478063246282344]]], [[[147.191873814074938, -7.388024183789978], [148.084635858349372, -8.044108168167609], [148.734105259393573, -9.104663588093755], [149.306835158484432, -9.071435642130067], [149.266630894161324, -9.514406019736027], [150.038728469034311, -9.684318129111698], [149.738798456012262, -9.872937106977002], [150.801627638959133, -10.29368661869742], [150.690574985963849, -10.582712904505865], [150.028393182575826, -10.652476088099929], [149.782310012001972, -10.393267103723941], [148.923137648717216, -10.28092253992136], [147.913018426707993, -10.130440769087469], [147.135443150012236, -9.492443536012017], [146.567880894150619, -8.942554619994153], [146.048481073184917, -8.067414239131308], [144.74416792213799, -7.630128269077473], [143.897087844009661, -7.915330498896279], [143.286375767184268, -8.245491224809056], [143.413913202080664, -8.983068942910945], [142.628431431244223, -9.326820570516501], [142.068258905200196, -9.159595635620034], [141.033851760013874, -9.117892754760417], [141.017056919519007, -5.85902190513802], [141.000210402591847, -2.600151055515624], [142.735246616791443, -3.289152927263216], [144.583970982033236, -3.861417738463401], [145.27317955950997, -4.373737888205027], [145.829786411725649, -4.876497897972683], [145.981921828392956, -5.465609226100012], [147.648073358347574, -6.083659356310803], [147.891107619416175, -6.614014580922315], [146.970905389594861, -6.721656589386255], [147.191873814074938, -7.388024183789978]]], [[[153.14003787659874, -4.499983412294113], [152.827292108368255, -4.766427097190998], [152.63867313050298, -4.176127211120927], [152.406025832324929, -3.789742526874561], [151.953236932583536, -3.462062269711821], [151.384279413050024, -3.035421644710111], [150.6620495953388, -2.741486097833956], [150.939965448204532, -2.500002129734028], [151.479984165654514, -2.779985039891386], [151.820015090135087, -2.999971612157907], [152.239989455371074, -3.24000864015366], [152.640016717742526, -3.659983005389647], [153.019993524384631, -3.980015150573293], [153.14003787659874, -4.499983412294113]]]] } }, - { "type": "Feature", "properties": { "admin": "Poland", "name": "Poland", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[15.016995883858666, 51.106674099321566], [14.607098422919531, 51.745188096719964], [14.685026482815685, 52.089947414755187], [14.437599725002197, 52.624850165408382], [14.074521111719488, 52.981262518925426], [14.353315463934136, 53.248171291712957], [14.119686313542584, 53.757029120491026], [14.802900424873455, 54.050706285205735], [16.363477003655728, 54.513158677785711], [17.622831658608671, 54.851535956432897], [18.620858595461637, 54.682605699270766], [18.696254510175461, 54.438718777069276], [19.6606400896064, 54.426083889373913], [20.89224450041862, 54.312524929412518], [22.731098667092649, 54.327536932993311], [23.243987257589506, 54.220566718149129], [23.484127638449841, 53.912497667041123], [23.527535841574995, 53.47012156840654], [23.804934930117774, 53.08973135030606], [23.799198846133375, 52.691099351606553], [23.19949384938618, 52.486977444053664], [23.508002150168689, 52.023646552124717], [23.52707075368437, 51.578454087930233], [24.029985792748899, 50.705406602575174], [23.922757195743259, 50.424881089878738], [23.426508416444388, 50.308505764357449], [22.518450148211596, 49.476773586619736], [22.776418898212619, 49.027395331409608], [22.558137648211751, 49.08573802346713], [21.607808058364206, 49.470107326854077], [20.887955356538406, 49.328772284535823], [20.415839471119849, 49.431453355499755], [19.825022820726865, 49.217125352569219], [19.320712517990469, 49.571574001659179], [18.909574822676316, 49.435845852244562], [18.85314415861361, 49.496229763377634], [18.392913852622168, 49.988628648470737], [17.649445021238986, 50.049038397819942], [17.554567091551117, 50.36214590107641], [16.868769158605655, 50.473973700556016], [16.719475945714429, 50.215746568393527], [16.176253289462263, 50.4226073268579], [16.238626743238566, 50.697732652379827], [15.490972120839725, 50.7847299261432], [15.016995883858666, 51.106674099321566]]] } }, - { "type": "Feature", "properties": { "admin": "Puerto Rico", "name": "Puerto Rico", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-66.2824344550082, 18.51476166429536], [-65.771302863209286, 18.426679185453875], [-65.591003790942935, 18.228034979723912], [-65.847163865813755, 17.975905666571855], [-66.599934455009475, 17.98182261806927], [-67.184162360285256, 17.946553453030074], [-67.24242753769434, 18.374460150622934], [-67.100679083917726, 18.520601101144347], [-66.2824344550082, 18.51476166429536]]] } }, - { "type": "Feature", "properties": { "admin": "North Korea", "name": "Dem. Rep. Korea", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[130.640015903852401, 42.39500946712527], [130.780007358931101, 42.220007229168843], [130.400030552288996, 42.280003567059701], [129.965948521037234, 41.941367906251052], [129.667362095254788, 41.601104437825221], [129.705189243692445, 40.882827867184318], [129.188114862179958, 40.661807766271984], [129.010399611528186, 40.485436102859801], [128.633368361526692, 40.189846910150301], [127.967414178581322, 40.025412502597547], [127.533435500194145, 39.756850083976694], [127.502119582225276, 39.323930772451526], [127.385434198110261, 39.213472398427648], [127.783342726757709, 39.050898342437414], [128.349716424676586, 38.612242946927843], [128.205745884311426, 38.370397243801882], [127.780035435090966, 38.304535630845884], [127.073308547067342, 38.256114813788393], [126.683719924018888, 37.804772854151174], [126.237338901881742, 37.840377916000271], [126.174758742376213, 37.749685777328033], [125.689103631697165, 37.940010077459014], [125.568439162295675, 37.752088731429616], [125.275330438336184, 37.66907054295271], [125.24008711151312, 37.857224432927424], [124.981033156433952, 37.948820909164773], [124.712160679219352, 38.108346055649783], [124.985994093933954, 38.548474229479673], [125.221948683778677, 38.665857245430665], [125.13285851450749, 38.848559271798578], [125.386589797060566, 39.387957872061158], [125.321115757346774, 39.551384589184202], [124.737482131042384, 39.660344346671614], [124.265624627785286, 39.928493353834149], [125.079941847840615, 40.569823716792442], [126.182045119329402, 41.107336127276362], [126.86908328664984, 41.816569322266176], [127.343782993682993, 41.50315176041596], [128.208433058790632, 41.466771552082477], [128.052215203972281, 41.994284572917934], [129.59666873587949, 42.424981797854542], [129.994267205933198, 42.985386867843779], [130.640015903852401, 42.39500946712527]]] } }, - { "type": "Feature", "properties": { "admin": "Portugal", "name": "Portugal", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[-9.034817674180244, 41.880570583659669], [-8.671945766626719, 42.134689439454952], [-8.26385698081779, 42.280468654950326], [-8.01317460776991, 41.790886135417118], [-7.422512986673794, 41.792074693359822], [-7.251308966490822, 41.91834605566504], [-6.668605515967655, 41.883386949219577], [-6.389087693700914, 41.381815497394641], [-6.851126674822551, 41.111082668617513], [-6.864019944679383, 40.330871893874821], [-7.026413133156593, 40.184524237624238], [-7.066591559263527, 39.711891587882768], [-7.498632371439724, 39.629571031241802], [-7.098036668313126, 39.03007274022378], [-7.374092169616317, 38.373058580064914], [-7.029281175148794, 38.075764065089757], [-7.166507941099863, 37.803894354802217], [-7.537105475281022, 37.428904323876232], [-7.45372555177809, 37.097787583966053], [-7.855613165711985, 36.838268540996253], [-8.382816127953687, 36.978880113262449], [-8.898856980820325, 36.868809312480771], [-8.746101446965552, 37.6513455266766], [-8.839997524439879, 38.266243394517609], [-9.287463751655221, 38.358485826158592], [-9.526570603869713, 38.737429104154906], [-9.44698889814023, 39.392066148428363], [-9.048305223008425, 39.755093085278766], [-8.977353481471679, 40.159306138665798], [-8.7686840478771, 40.76063894303018], [-8.790853237330309, 41.18433401139125], [-8.990789353867568, 41.543459377603625], [-9.034817674180244, 41.880570583659669]]] } }, - { "type": "Feature", "properties": { "admin": "Paraguay", "name": "Paraguay", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-62.685057135657871, -22.24902922942238], [-62.291179368729203, -21.051634616787389], [-62.265961269770784, -20.513734633061272], [-61.786326463453761, -19.633736667562957], [-60.043564622626477, -19.342746677327419], [-59.11504248720609, -19.356906019775398], [-58.183471442280492, -19.868399346600359], [-58.166392381408038, -20.176700941653674], [-57.870673997617786, -20.732687676681948], [-57.937155727761287, -22.090175876557169], [-56.881509568902885, -22.282153822521476], [-56.473317430229379, -22.086300144135279], [-55.797958136606894, -22.356929620047815], [-55.61068274598113, -22.655619398694839], [-55.517639329639621, -23.57199757252663], [-55.400747239795407, -23.956935316668797], [-55.027901780809543, -24.001273695575225], [-54.652834235235119, -23.839578138933955], [-54.292959560754511, -24.021014092710722], [-54.293476325077435, -24.570799655863958], [-54.428946092330577, -25.162184747012162], [-54.625290696823562, -25.739255466415507], [-54.788794928595038, -26.621785577096126], [-55.695845506398143, -27.387837009390857], [-56.486701626192989, -27.548499037386286], [-57.609759690976134, -27.395898532828383], [-58.618173590719735, -27.123718763947089], [-57.633660040911117, -25.603656508081638], [-57.777217169817924, -25.162339776309032], [-58.807128465394968, -24.771459242453307], [-60.028966030504016, -24.032796319273267], [-60.846564704009907, -23.880712579038288], [-62.685057135657871, -22.24902922942238]]] } }, - { "type": "Feature", "properties": { "admin": "Palestine", "name": "Palestine", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[35.545665317534535, 32.393992011030569], [35.545251906076196, 31.782504787720832], [35.397560662586038, 31.489086005167572], [34.927408481594554, 31.35343537040141], [34.970506626125989, 31.616778469360803], [35.225891554512422, 31.754341132121759], [34.974640740709319, 31.866582343059715], [35.183930291491428, 32.532510687788935], [35.545665317534535, 32.393992011030569]]] } }, - { "type": "Feature", "properties": { "admin": "Qatar", "name": "Qatar", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[50.810108270069563, 24.754742539971371], [50.743910760303677, 25.482424221289389], [51.01335167827348, 26.006991685484191], [51.286461622936045, 26.114582017515865], [51.589078810437243, 25.801112779233375], [51.606700473848804, 25.215670477798735], [51.389607781790623, 24.627385972588051], [51.112415398977006, 24.556330878186721], [50.810108270069563, 24.754742539971371]]] } }, - { "type": "Feature", "properties": { "admin": "Romania", "name": "Romania", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[22.710531447040488, 47.882193915389394], [23.142236362406798, 48.096341050806942], [23.760958286237404, 47.985598456405448], [24.402056105250374, 47.981877753280422], [24.866317172960571, 47.737525743188307], [25.207743361112986, 47.891056423527459], [25.945941196402394, 47.987148749374207], [26.197450392366925, 48.220881252630342], [26.619336785597788, 48.220726223333457], [26.924176059687561, 48.123264472030982], [27.233872918412736, 47.826770941756365], [27.551166212684841, 47.405117092470817], [28.128030226359037, 46.81047638608824], [28.160017937947707, 46.371562608417207], [28.054442986775392, 45.944586086605618], [28.233553501099035, 45.488283189468369], [28.679779493939371, 45.30403087013169], [29.149724969201646, 45.464925442072442], [29.603289015427425, 45.293308010431119], [29.62654340995876, 45.035390936862392], [29.141611769331831, 44.820210272799038], [28.837857700320196, 44.913873806328041], [28.55808149589199, 43.707461656258118], [27.970107049275068, 43.812468166675202], [27.242399529740904, 44.175986029632398], [26.065158725699739, 43.943493760751259], [25.569271681426923, 43.688444729174712], [24.100679152124169, 43.741051337247846], [23.332302280376322, 43.897010809904707], [22.94483239105184, 43.823785305347123], [22.657149692482985, 44.234923000661276], [22.474008416440594, 44.409227606781762], [22.705725538837349, 44.578002834647016], [22.459022251075933, 44.702517198254291], [22.145087924902807, 44.478422349620573], [21.562022739353605, 44.768947251965486], [21.483526238702233, 45.181170152357772], [20.874312778413351, 45.416375433934228], [20.76217492033998, 45.734573065771428], [20.220192498462833, 46.127468980486547], [21.021952345471245, 46.316087958351886], [21.626514926853869, 46.994237779318148], [22.09976769378283, 47.672439276716695], [22.710531447040488, 47.882193915389394]]] } }, - { "type": "Feature", "properties": { "admin": "Russia", "name": "Russia", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[143.648007440362846, 50.747600409541512], [144.65414757708561, 48.976390692737581], [143.173927850517174, 49.306551418650365], [142.558668247650076, 47.861575018904908], [143.533492466404027, 46.836728013692479], [143.505277134372591, 46.137907619809475], [142.747700636973889, 46.740764878926562], [142.092030064054484, 45.966755276058777], [141.906925083585008, 46.805928860046535], [142.018442824470867, 47.780132961612921], [141.904444614835029, 48.859188544299563], [142.135800002205656, 49.615163072297449], [142.179983351815281, 50.952342434281903], [141.594075962490024, 51.935434882202529], [141.682546014573632, 53.301966457728767], [142.606934035410745, 53.762145087287891], [142.209748976815376, 54.225475979216853], [142.654786411712934, 54.365880845753864], [142.914615513276544, 53.704577541714734], [143.260847609632037, 52.740760403039033], [143.235267775647628, 51.756660264688733], [143.648007440362846, 50.747600409541512]]], [[[22.731098667092649, 54.327536932993311], [20.892244500418652, 54.312524929412568], [19.6606400896064, 54.42608388937397], [19.88848147958134, 54.866160386771483], [21.268448927503492, 55.190481675835279], [22.315723504330599, 55.015298570365886], [22.757763706155281, 54.856574408581416], [22.651051873472564, 54.582740993866693], [22.731098667092649, 54.327536932993311]]], [[[180.000000000000114, 70.832199208546669], [178.903425, 70.78114], [178.7253, 71.0988], [180.000000000000114, 71.515714336428246], [180.000000000000114, 70.832199208546669]]], [[[143.60385, 73.21244], [142.08763, 73.20544], [140.038155, 73.31692], [139.86312, 73.36983], [140.81171, 73.76506], [142.06207, 73.85758], [143.48283, 73.47525], [143.60385, 73.21244]]], [[[150.73167, 75.08406], [149.575925, 74.68892], [147.977465, 74.778355], [146.11919, 75.17298], [146.358485, 75.49682], [148.22223, 75.345845], [150.73167, 75.08406]]], [[[145.086285, 75.562625], [144.3, 74.82], [140.61381, 74.84768], [138.95544, 74.61148], [136.97439, 75.26167], [137.51176, 75.94917], [138.831075, 76.13676], [141.471615, 76.09289], [145.086285, 75.562625]]], [[[57.535692579992386, 70.720463975702145], [56.944979282463933, 70.63274323188665], [53.677375115784187, 70.762657782668455], [53.412016635965372, 71.206661688920192], [51.601894565645708, 71.474759019650477], [51.455753615124209, 72.014881089965129], [52.478275180883564, 72.229441636840946], [52.444168735570841, 72.77473135038484], [54.427613559797649, 73.627547512497571], [53.508289829325136, 73.749813951300141], [55.902458937407644, 74.627486477345329], [55.631932814359701, 75.081412258597155], [57.868643833248839, 75.609390367323186], [61.170044386647497, 76.251883450008123], [64.498368361270209, 76.439055487769267], [66.210977003855092, 76.809782213031227], [68.157059767534818, 76.939696763812904], [68.852211134725124, 76.544811306454605], [68.180572544227644, 76.233641669409096], [64.637326287703004, 75.737754625136219], [61.583507521414752, 75.260884507946784], [58.477082147053366, 74.309056301562819], [56.986785516187993, 73.333043524866227], [55.41933597191094, 72.371267605265956], [55.622837762276291, 71.540594794390316], [57.535692579992386, 70.720463975702145]]], [[[106.970130000000111, 76.97419], [107.240000000000123, 76.48], [108.1538, 76.723350000000138], [111.077260000000138, 76.71], [113.33151, 76.22224], [114.13417, 75.84764], [113.88539, 75.327790000000121], [112.77918, 75.03186], [110.151250000000175, 74.47673], [109.4, 74.18], [110.64, 74.04], [112.11919, 73.787740000000113], [113.019540000000234, 73.976930000000138], [113.529580000000294, 73.33505], [113.96881, 73.59488], [115.56782, 73.75285], [118.776330000000215, 73.58772], [119.02, 73.12], [123.20066, 72.97122], [123.257770000000178, 73.73503], [125.380000000000166, 73.56], [126.97644, 73.56549], [128.59126, 73.03871], [129.05157, 72.39872], [128.46, 71.98], [129.715990000000204, 71.19304], [131.288580000000252, 70.786990000000102], [132.253500000000145, 71.8363], [133.857660000000294, 71.386420000000143], [135.56193, 71.655250000000123], [137.49755, 71.34763], [138.234090000000123, 71.62803], [139.86983, 71.487830000000116], [139.14791, 72.4161900000001], [140.46817, 72.849410000000134], [149.5, 72.2], [150.35118000000017, 71.60643], [152.96890000000019, 70.84222], [157.00688, 71.03141], [158.99779, 70.86672], [159.830310000000225, 70.45324], [159.70866, 69.72198], [160.94053000000028, 69.43728], [162.279070000000104, 69.64204], [164.05248, 69.66823], [165.940370000000172, 69.47199], [167.83567, 69.58269], [169.57763000000017, 68.6938], [170.816880000000253, 69.01363], [170.008200000000159, 69.65276], [170.453450000000259, 70.09703], [173.643910000000204, 69.81743], [175.72403000000017, 69.877250000000217], [178.6, 69.4], [180.000000000000114, 68.963636363636553], [180.000000000000114, 64.979708702198465], [179.99281, 64.97433], [178.707200000000199, 64.53493], [177.411280000000147, 64.60821], [178.313000000000187, 64.07593], [178.90825000000018, 63.251970000000128], [179.37034, 62.98262], [179.48636, 62.56894], [179.228250000000116, 62.304100000000133], [177.3643, 62.5219], [174.569290000000194, 61.76915], [173.68013, 61.65261], [172.15, 60.95], [170.6985, 60.33618], [170.330850000000282, 59.88177], [168.90046, 60.57355], [166.294980000000265, 59.7885500000002], [165.840000000000202, 60.16], [164.87674, 59.7316], [163.539290000000108, 59.86871], [163.217110000000218, 59.21101], [162.01733, 58.24328], [162.05297, 57.83912], [163.19191, 57.61503], [163.057940000000144, 56.159240000000111], [162.129580000000203, 56.12219], [161.70146, 55.285680000000148], [162.117490000000117, 54.85514], [160.368770000000325, 54.34433], [160.021730000000218, 53.20257], [158.530940000000157, 52.958680000000236], [158.23118, 51.94269], [156.789790000000266, 51.01105], [156.42000000000013, 51.7], [155.99182, 53.15895], [155.43366, 55.381030000000109], [155.914420000000291, 56.767920000000132], [156.75815, 57.3647], [156.81035, 57.83204], [158.364330000000166, 58.05575], [160.150640000000124, 59.314770000000109], [161.87204, 60.343000000000117], [163.66969, 61.1409], [164.473550000000103, 62.55061], [163.258420000000172, 62.46627], [162.65791, 61.6425], [160.12148, 60.54423], [159.30232, 61.77396], [156.72068, 61.43442], [154.218060000000293, 59.758180000000117], [155.04375, 59.14495], [152.81185, 58.88385], [151.265730000000246, 58.78089], [151.33815, 59.50396], [149.78371, 59.655730000000126], [148.54481, 59.16448], [145.48722, 59.33637], [142.197820000000121, 59.03998], [138.958480000000293, 57.08805], [135.12619, 54.72959], [136.70171, 54.603550000000112], [137.19342, 53.97732], [138.1647, 53.755010000000247], [138.80463, 54.25455], [139.90151, 54.189680000000166], [141.34531, 53.089570000000109], [141.37923, 52.23877], [140.59742000000017, 51.23967], [140.51308, 50.045530000000113], [140.061930000000189, 48.446710000000152], [138.554720000000202, 46.99965], [138.21971, 46.30795], [136.86232, 45.143500000000174], [135.515350000000183, 43.989], [134.869390000000237, 43.39821], [133.536870000000249, 42.81147], [132.90627, 42.79849], [132.278070000000241, 43.284560000000106], [130.935870000000136, 42.55274], [130.78, 42.220000000000191], [130.640000000000157, 42.395], [130.633866408409801, 42.903014634770543], [131.144687941614961, 42.929989732426932], [131.288555129115593, 44.111519680348252], [131.025190000000237, 44.96796], [131.883454217659562, 45.321161607436508], [133.097120000000189, 45.14409], [133.769643996313164, 46.116926988299149], [134.112350000000163, 47.212480000000127], [134.50081, 47.578450000000139], [135.026311476786759, 48.478229885443902], [133.373595819228001, 48.183441677434836], [132.506690000000106, 47.78896], [130.987260000000106, 47.79013], [130.582293328982644, 48.72968740497619], [129.397817824420486, 49.4406000840156], [127.657400000000351, 49.76027], [127.287455682484904, 50.739797268265434], [126.939156528837827, 51.353894151405896], [126.564399041856959, 51.784255479532689], [125.946348911646439, 52.792798570356936], [125.068211297710434, 53.161044826868924], [123.57147, 53.4588], [122.245747918793043, 53.431725979213681], [121.003084751470354, 53.251401068731226], [120.177088657716865, 52.753886216841195], [120.725789015791975, 52.516226304730893], [120.7382, 51.96411], [120.182080000000155, 51.64355], [119.27939, 50.58292], [119.288460728025839, 50.142882798861947], [117.87924441942647, 49.510983384797036], [116.67880089728618, 49.888531399121398], [115.485695428531415, 49.805177313834733], [114.962109816550353, 50.140247300815119], [114.362456496235325, 50.24830272073747], [112.897739699354361, 49.543565375356984], [111.581230910286649, 49.377968248077671], [110.662010532678835, 49.130128078805846], [109.402449171996707, 49.292960516957685], [108.475167270951275, 49.282547715850704], [107.868175897251092, 49.793705145865871], [106.888804152455293, 50.274295966180276], [105.886591424586868, 50.40601919209216], [104.62158, 50.275320000000157], [103.676545444760336, 50.08996613219513], [102.25589, 50.510560000000105], [102.06521, 51.25991], [100.889480421962631, 51.516855780638409], [99.981732212323564, 51.63400625264395], [98.861490513100492, 52.047366034546698], [97.82573978067451, 51.010995184933236], [98.231761509191699, 50.422400621128716], [97.259760000000199, 49.72605], [95.814020000000156, 49.977460000000114], [94.815949334698757, 50.01343333597088], [94.147566359435601, 50.480536607457161], [93.10421, 50.49529], [92.234711541719676, 50.802170722041737], [90.713667433640765, 50.331811835321098], [88.805566847695573, 49.470520738312459], [87.751264276076824, 49.297197984405543], [87.359970330762692, 49.214980780629148], [86.829356723989648, 49.826674709668133], [85.541269972682485, 49.69285858824815], [85.115559523462082, 50.117302964877631], [84.416377394553038, 50.311399644565817], [83.935114780618903, 50.889245510453563], [83.383003778012451, 51.069182847693881], [81.945985548839943, 50.812195949906325], [80.568446893235446, 51.388336493528435], [80.035559523441705, 50.864750881547209], [77.80091556184432, 53.404414984747532], [76.525179477854749, 54.177003485727127], [76.891100294913443, 54.490524400441913], [74.384820000000119, 53.546850000000113], [73.425678745420512, 53.489810289109741], [73.50851606638436, 54.035616766976588], [72.224150018202195, 54.376655381886778], [71.180131056609468, 54.133285224008247], [70.86526655465515, 55.169733588270091], [69.068166945272893, 55.385250149143488], [68.169100376258896, 54.970391750704366], [65.66687, 54.601250000000149], [65.178533563095939, 54.354227810272064], [61.436600000000126, 54.00625], [60.978066440683236, 53.664993394579128], [61.69998619980062, 52.979996446334255], [60.73999311711453, 52.719986477257734], [60.927268507740237, 52.447548326214999], [59.967533807215567, 51.96042043721566], [61.588003371024136, 51.272658799843171], [61.337424350840998, 50.799070136104248], [59.932807244715555, 50.842194118851822], [59.642282342370564, 50.545442206415707], [58.363320000000122, 51.06364], [56.77798, 51.04355], [55.71694, 50.621710000000142], [54.532878452376181, 51.026239732459359], [52.328723585831042, 51.718652248738088], [50.766648390512174, 51.692762356159861], [48.702381626181044, 50.605128485712825], [48.577841424357601, 49.87475962991563], [47.549480421749379, 50.454698391311119], [46.751596307162764, 49.356005764353725], [47.043671502476585, 49.152038886097571], [46.466445753776291, 48.394152330104923], [47.315240000000152, 47.71585], [48.05725, 47.74377], [48.694733514201872, 47.075628160177885], [48.59325000000014, 46.56104], [49.101160000000121, 46.39933], [48.645410000000105, 45.80629], [47.67591, 45.641490000000111], [46.68201, 44.6092], [47.59094, 43.660160000000118], [47.49252, 42.98658], [48.58437000000017, 41.80888], [47.987283156126033, 41.405819200194387], [47.815665724484653, 41.151416124021338], [47.373315464066387, 41.219732367511135], [46.686070591016708, 41.827137152669899], [46.404950799348924, 41.860675157227426], [45.7764, 42.092440000000224], [45.470279168485909, 42.502780666670041], [44.537622918482057, 42.711992702803677], [43.93121, 42.554960000000101], [43.755990000000182, 42.74083], [42.394400000000154, 43.2203], [40.922190000000128, 43.382150000000131], [40.076964959479838, 43.553104153002486], [39.95500857927108, 43.434997666999287], [38.68, 44.28], [37.539120000000104, 44.65721], [36.675460000000122, 45.24469], [37.40317, 45.40451], [38.23295, 46.24087], [37.67372, 46.63657], [39.14767, 47.044750000000128], [39.121200000000123, 47.26336], [38.22353803889947, 47.102189846375971], [38.2551123390298, 47.546400458356956], [38.77057, 47.825620000000228], [39.738277622238982, 47.898937079452068], [39.895620000000136, 48.23241], [39.67465, 48.783820000000127], [40.080789015469477, 49.307429917999364], [40.069040000000108, 49.60105], [38.594988234213552, 49.926461900423718], [38.010631137857068, 49.915661526074715], [37.393459506995228, 50.383953355503664], [36.626167840325387, 50.225590928745127], [35.35611616388811, 50.577197374059139], [35.37791, 50.77394], [35.02218305841793, 51.207572333371495], [34.224815708154402, 51.255993150428921], [34.141978387190612, 51.56641347920619], [34.391730584457228, 51.768881740925892], [33.75269982273587, 52.335074571331646], [32.715760532367163, 52.238465481162159], [32.412058139787767, 52.288694973349763], [32.15944000000021, 52.061250000000101], [31.78597, 52.10168], [31.540018344862254, 52.742052313846429], [31.305200636527978, 53.073995876673301], [31.49764, 53.167430000000124], [32.304519484188368, 53.132726141972839], [32.693643019346119, 53.351420803432141], [32.405598585751157, 53.618045355842], [31.731272820774585, 53.794029446012011], [31.791424187962399, 53.974638576872181], [31.384472283663818, 54.157056382862365], [30.757533807098774, 54.811770941784388], [30.971835971813245, 55.08154775656412], [30.873909132620064, 55.55097646750351], [29.896294386522435, 55.789463202530484], [29.371571893030783, 55.670090643936263], [29.229513380660389, 55.918344224666399], [28.176709425577933, 56.169129950578778], [27.855282016722519, 56.759326483784363], [27.770015903440985, 57.244258124411189], [27.288184848751648, 57.474528306703903], [27.716685825315771, 57.791899115624439], [27.420150000000202, 58.724570000000128], [28.131699253051856, 59.300825100330982], [27.98112, 59.47537], [29.1177, 60.028050000000107], [28.07, 60.503520000000137], [30.211107212044645, 61.780027777749673], [31.139991082491029, 62.357692776124431], [31.516092156711263, 62.867687486412898], [30.035872430142796, 63.552813625738551], [30.444684686003736, 64.204453436939062], [29.544429559047014, 64.948671576590542], [30.21765, 65.80598], [29.054588657352376, 66.944286200622017], [29.977426385220689, 67.69829702419274], [28.445943637818765, 68.364612942163987], [28.591929559043358, 69.064776923286686], [29.39955, 69.15692000000017], [31.101080000000103, 69.55811], [32.132720000000255, 69.905950000000232], [33.77547, 69.301420000000107], [36.51396, 69.06342], [40.292340000000159, 67.9324], [41.059870000000124, 67.457130000000106], [41.125950000000174, 66.79158000000011], [40.01583, 66.266180000000119], [38.38295, 65.99953], [33.918710000000168, 66.75961], [33.18444, 66.63253], [34.81477, 65.900150000000124], [34.87857425307876, 65.436212877048192], [34.943910000000152, 64.414370000000147], [36.23129, 64.10945], [37.012730000000111, 63.84983], [37.141970000000143, 64.33471], [36.539579035089801, 64.76446], [37.176040000000135, 65.143220000000113], [39.59345, 64.520790000000162], [40.4356, 64.76446], [39.762600000000148, 65.49682], [42.09309, 66.47623], [43.01604000000011, 66.41858], [43.94975000000013, 66.06908], [44.53226, 66.756340000000122], [43.69839, 67.35245], [44.187950000000136, 67.95051], [43.45282, 68.57079], [46.250000000000135, 68.25], [46.821340000000156, 67.68997], [45.55517, 67.56652], [45.56202, 67.010050000000192], [46.349150000000137, 66.66767], [47.894160000000248, 66.884550000000146], [48.13876, 67.52238], [50.227660000000142, 67.998670000000132], [53.717430000000164, 68.85738], [54.47171, 68.80815], [53.485820000000118, 68.20131], [54.72628, 68.09702], [55.442680000000124, 68.43866], [57.317020000000149, 68.46628], [58.802000000000206, 68.88082], [59.941420000000178, 68.27844], [61.077840000000165, 68.94069], [60.03, 69.52], [60.55, 69.85], [63.504000000000147, 69.54739], [64.888115, 69.234835000000132], [68.512160000000108, 68.09233000000016], [69.18068, 68.61563000000011], [68.16444, 69.14436], [68.13522, 69.35649], [66.930080000000103, 69.454610000000102], [67.25976, 69.92873], [66.724920000000125, 70.708890000000125], [66.69466, 71.028970000000228], [68.540060000000111, 71.934500000000227], [69.19636, 72.843360000000146], [69.94, 73.04000000000012], [72.58754, 72.77629], [72.79603, 72.22006], [71.84811, 71.40898], [72.47011, 71.09019], [72.79188, 70.39114], [72.564700000000201, 69.02085], [73.66787, 68.4079], [73.2387, 67.7404], [71.280000000000101, 66.320000000000149], [72.423010000000147, 66.172670000000167], [72.82077, 66.53267], [73.920990000000131, 66.789460000000119], [74.186510000000183, 67.28429], [75.052, 67.760470000000154], [74.469260000000148, 68.32899], [74.93584, 68.98918], [73.84236, 69.07146], [73.601870000000204, 69.62763], [74.3998, 70.63175], [73.1011, 71.447170000000241], [74.890820000000204, 72.12119], [74.65926, 72.83227], [75.158010000000175, 72.854970000000108], [75.68351, 72.300560000000118], [75.288980000000109, 71.33556], [76.35911, 71.152870000000135], [75.903130000000161, 71.87401], [77.5766500000001, 72.26717], [79.652020000000107, 72.32011], [81.5, 71.75], [80.61071, 72.582850000000107], [80.51109, 73.6482], [82.25, 73.85], [84.65526, 73.805910000000154], [86.822300000000226, 73.93688], [86.00956, 74.459670000000145], [87.166820000000143, 75.11643], [88.31571, 75.14393], [90.26, 75.64], [92.90058, 75.77333], [93.234210000000132, 76.0472], [95.860000000000127, 76.14], [96.67821, 75.91548], [98.922540000000197, 76.44689], [100.759670000000199, 76.43028], [101.03532, 76.86189], [101.990840000000105, 77.287540000000192], [104.3516, 77.69792], [106.066640000000135, 77.37389], [104.705000000000211, 77.1274], [106.970130000000111, 76.97419]]], [[[105.07547, 78.30689], [99.43814, 77.921], [101.2649, 79.23399], [102.08635, 79.34641], [102.837815, 79.28129], [105.37243, 78.71334], [105.07547, 78.30689]]], [[[51.136186557831266, 80.54728017854093], [49.793684523320692, 80.415427761548202], [48.894411248577526, 80.33956675894369], [48.75493655782175, 80.175468248200829], [47.586119012244147, 80.010181179515328], [46.502825962109647, 80.247246812654339], [47.072455275262897, 80.559424140129451], [44.846958042181107, 80.589809882317169], [46.799138624871226, 80.771917629713627], [48.31847741068465, 80.784009914869927], [48.52280602396668, 80.514568996900138], [49.097189568890897, 80.753985907708412], [50.039767693894603, 80.918885403151791], [51.522932977103679, 80.699725653801906], [51.136186557831266, 80.54728017854093]]], [[[99.93976, 78.88094], [97.75794, 78.7562], [94.97259, 79.044745], [93.31288, 79.4265], [92.5454, 80.14379], [91.18107, 80.34146], [93.77766, 81.0246], [95.940895, 81.2504], [97.88385, 80.746975], [100.186655, 79.780135], [99.93976, 78.88094]]]] } }, - { "type": "Feature", "properties": { "admin": "Rwanda", "name": "Rwanda", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[30.419104852019235, -1.134659112150416], [30.816134881317705, -1.698914076345388], [30.758308953583104, -2.287250257988368], [30.469696079232978, -2.413857517103458], [29.938359002407935, -2.348486830254238], [29.632176141078585, -2.917857761246096], [29.02492638521678, -2.839257907730157], [29.117478875451546, -2.292211195488384], [29.254834832483336, -2.215109958508911], [29.29188683443661, -1.620055840667987], [29.579466180140876, -1.341313164885626], [29.821518588996003, -1.443322442229785], [30.419104852019235, -1.134659112150416]]] } }, - { "type": "Feature", "properties": { "admin": "Western Sahara", "name": "W. Sahara", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-8.794883999049075, 27.120696316022503], [-8.81782833498667, 27.656425889592349], [-8.665589565454805, 27.656425889592349], [-8.66512447756419, 27.58947907155822], [-8.684399786809051, 27.395744126895998], [-8.687293667017398, 25.881056219988899], [-11.969418911171159, 25.933352769468261], [-11.93722449385332, 23.374594224536164], [-12.874221564169574, 23.284832261645171], [-13.118754441774708, 22.771220201096249], [-12.929101935263528, 21.327070624267559], [-16.845193650773989, 21.333323472574875], [-17.063423224342568, 20.99975210213082], [-17.020428432675736, 21.422310288981475], [-17.002961798561085, 21.420734157796574], [-14.750954555713532, 21.50060008390366], [-14.630832688851068, 21.860939846274899], [-14.221167771857251, 22.310163072188153], [-13.891110398809044, 23.691009019459297], [-12.500962693725368, 24.770116278578193], [-12.030758836301613, 26.030866197203036], [-11.718219773800353, 26.104091701760616], [-11.392554897496977, 26.883423977154358], [-10.551262579785272, 26.990807603456879], [-10.18942420087758, 26.860944729107398], [-9.735343390328877, 26.860944729107398], [-9.413037482124464, 27.088476060488514], [-8.794883999049075, 27.120696316022503]]] } }, - { "type": "Feature", "properties": { "admin": "Saudi Arabia", "name": "Saudi Arabia", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[42.779332309750963, 16.34789134364868], [42.64957278826607, 16.77463532151496], [42.347989129410706, 17.075805568911996], [42.270887892431219, 17.474721787989122], [41.754381951673949, 17.833046169500971], [41.221391229015573, 18.671599636301206], [40.939341261566533, 19.486485297111752], [40.247652215339819, 20.174634507726488], [39.801684604660934, 20.338862209550054], [39.139399448408277, 21.29190481209293], [39.023695916506782, 21.986875311770191], [39.066328973147577, 22.579655666590263], [38.492772251140075, 23.688451036060851], [38.023860304523616, 24.078685614512928], [37.483634881344379, 24.285494696545008], [37.154817742671177, 24.858482977797301], [37.209491408035994, 25.084541530858104], [36.931627231602583, 25.602959499610172], [36.639603712721218, 25.826227525327219], [36.249136590323808, 26.570135606384873], [35.640181512196385, 27.376520494083415], [35.130186801907875, 28.063351955674712], [34.632336053207972, 28.058546047471559], [34.787778761541936, 28.607427273059692], [34.832220493312938, 28.957483425404838], [34.956037225084252, 29.356554673778835], [36.068940870922049, 29.19749461518445], [36.501214227043583, 29.505253607698702], [36.740527784987243, 29.865283311476183], [37.503581984209028, 30.003776150018396], [37.668119744626374, 30.338665269485894], [37.998848911294367, 30.508499864213128], [37.002165561681004, 31.508412990844736], [39.004885695152545, 32.010216986614971], [39.195468377444961, 32.16100881604266], [40.399994337736238, 31.889991766887931], [41.889980910007829, 31.190008653278362], [44.709498732284736, 29.178891099559376], [46.568713413281742, 29.099025173452283], [47.459821811722819, 29.002519436147217], [47.708850538937376, 28.526062730416136], [48.416094191283939, 28.552004299426663], [48.807594842327163, 27.689627997339876], [49.299554477745815, 27.461218166609804], [49.470913527225647, 27.109999294538078], [50.152422316290874, 26.689663194275994], [50.212935418504671, 26.277026882425371], [50.113303257045928, 25.943972276304248], [50.23985883972874, 25.608049628190923], [50.527386509000728, 25.327808335872099], [50.660556675016885, 24.999895534764018], [50.810108270069563, 24.754742539971371], [51.112415398977006, 24.556330878186721], [51.389607781790623, 24.627385972588051], [51.579518670463258, 24.245497137951102], [51.617707553926969, 24.014219265228824], [52.000733270074321, 23.001154486578937], [55.006803012924898, 22.496947536707129], [55.208341098863187, 22.708329982997039], [55.666659376859812, 22.000001125572336], [54.999981723862355, 19.999994004796104], [52.000009800022227, 19.000003363516054], [49.116671583864857, 18.616667588774941], [48.183343540241324, 18.166669216377311], [47.466694777217626, 17.116681626854877], [47.000004917189749, 16.949999294497438], [46.749994337761642, 17.283338120996174], [46.366658563020529, 17.233315334537632], [45.399999220568752, 17.333335069238554], [45.216651238797184, 17.43332896572333], [44.062613152855072, 17.410358791569589], [43.791518589051904, 17.319976711491105], [43.380794305196098, 17.579986680567668], [43.115797560403351, 17.088440456607369], [43.218375278502734, 16.666889960186406], [42.779332309750963, 16.34789134364868]]] } }, - { "type": "Feature", "properties": { "admin": "Sudan", "name": "Sudan", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[33.963392794971178, 9.464285229420623], [33.824963480907506, 9.48406084571536], [33.842130853028145, 9.981914637215992], [33.721959248183097, 10.325262079630191], [33.206938084561777, 10.720111638406591], [33.086766479716729, 11.441141267476493], [33.206938084561777, 12.179338268667093], [32.743419037302537, 12.24800775714999], [32.674749548819641, 12.024831919580716], [32.073891524594778, 11.973329803218517], [32.314234734284746, 11.681484477166519], [32.400071594888338, 11.080626452941486], [31.850715687025509, 10.531270545078822], [31.352861895524875, 9.810240916008693], [30.837840731903377, 9.707236683284519], [29.996639497988546, 10.290927335388684], [29.618957311332842, 10.084918869940223], [29.515953078608607, 9.793073543888053], [29.000931914987166, 9.604232450560287], [28.966597170745779, 9.398223985111654], [27.970889587744345, 9.398223985111654], [27.833550610778783, 9.604232450560287], [27.112520981708876, 9.638567194801622], [26.752006167173811, 9.466893473594492], [26.477328213242508, 9.552730334198086], [25.96230704962101, 10.136420986302422], [25.790633328413943, 10.411098940233726], [25.069603699343979, 10.27375996326799], [24.79492574541268, 9.810240916008693], [24.537415163602017, 8.917537565731719], [24.194067721187643, 8.728696472403895], [23.886979580860665, 8.619729712933063], [23.805813429466745, 8.666318874542522], [23.459012892355979, 8.954285793489019], [23.394779087017291, 9.26506785729225], [23.557249790142915, 9.681218166538766], [23.554304233502187, 10.089255275915319], [22.977543572692749, 10.714462591998538], [22.864165480244246, 11.142395127807616], [22.87622, 11.384610000000119], [22.50869, 11.67936], [22.49762, 12.26024], [22.28801, 12.64605], [21.93681, 12.588180000000133], [22.03759, 12.95546], [22.29658, 13.37232], [22.18329, 13.78648], [22.51202, 14.09318], [22.30351, 14.32682], [22.567950000000106, 14.944290000000134], [23.02459, 15.68072], [23.886890000000101, 15.61084], [23.837660000000135, 19.580470000000101], [23.850000000000129, 20.0], [25.00000000000011, 20.00304], [25.00000000000011, 22.0], [29.02, 22.0], [32.9, 22.0], [36.86623, 22.0], [37.18872, 21.01885], [36.96941, 20.837440000000125], [37.114700000000134, 19.80796], [37.48179, 18.61409], [37.86276, 18.36786], [38.410089959473218, 17.998307399970312], [37.904000000000103, 17.42754], [37.16747, 17.263140000000128], [36.852530000000108, 16.95655], [36.75389, 16.29186], [36.32322, 14.82249], [36.42951, 14.42211], [36.27022, 13.563330000000118], [35.86363, 12.57828], [35.26049, 12.08286], [34.831630000000125, 11.318960000000116], [34.73115000000012, 10.910170000000106], [34.25745, 10.63009], [33.96162, 9.58358], [33.963392794971178, 9.464285229420623]]] } }, - { "type": "Feature", "properties": { "admin": "South Sudan", "name": "S. Sudan", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[33.963392794971178, 9.464285229420623], [33.97498, 8.68456], [33.82550000000014, 8.37916], [33.294800000000116, 8.35458], [32.95418, 7.7849700000001], [33.56829, 7.71334], [34.0751, 7.22595], [34.25032, 6.82607], [34.70702, 6.59422000000012], [35.298007118233095, 5.506], [34.620196267853935, 4.847122742082034], [34.005, 4.249884947362147], [33.39, 3.79], [32.68642, 3.79232], [31.881450000000136, 3.55827], [31.24556, 3.7819], [30.83385, 3.50917], [29.95349, 4.1737], [29.715995314256013, 4.600804755060152], [29.159078403446635, 4.389267279473244], [28.696677687298795, 4.455077215996993], [28.428993768026992, 4.287154649264607], [27.979977247842946, 4.408413397637388], [27.374226108517625, 5.233944403500173], [27.213409051225248, 5.550953477394613], [26.465909458123289, 5.946717434101855], [26.213418409945113, 6.546603298362127], [25.796647983511257, 6.979315904158169], [25.124130893664805, 7.500085150579422], [25.114932488716867, 7.825104071479244], [24.567369012152191, 8.229187933785452], [23.886979580860665, 8.619729712933063], [24.194067721187643, 8.728696472403895], [24.537415163602017, 8.917537565731719], [24.79492574541268, 9.810240916008693], [25.069603699343979, 10.27375996326799], [25.790633328413943, 10.411098940233726], [25.96230704962101, 10.136420986302422], [26.477328213242508, 9.552730334198086], [26.752006167173811, 9.466893473594492], [27.112520981708876, 9.638567194801622], [27.833550610778783, 9.604232450560287], [27.970889587744345, 9.398223985111654], [28.966597170745779, 9.398223985111654], [29.000931914987166, 9.604232450560287], [29.515953078608607, 9.793073543888053], [29.618957311332842, 10.084918869940223], [29.996639497988546, 10.290927335388684], [30.837840731903377, 9.707236683284519], [31.352861895524875, 9.810240916008693], [31.850715687025509, 10.531270545078822], [32.400071594888338, 11.080626452941486], [32.314234734284746, 11.681484477166519], [32.073891524594778, 11.973329803218517], [32.674749548819641, 12.024831919580716], [32.743419037302537, 12.24800775714999], [33.206938084561777, 12.179338268667093], [33.086766479716729, 11.441141267476493], [33.206938084561777, 10.720111638406591], [33.721959248183097, 10.325262079630191], [33.842130853028145, 9.981914637215992], [33.824963480907506, 9.48406084571536], [33.963392794971178, 9.464285229420623]]] } }, - { "type": "Feature", "properties": { "admin": "Senegal", "name": "Senegal", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-16.713728807023468, 13.594958604379853], [-17.126106736712611, 14.373515733289221], [-17.625042690490655, 14.72954051356407], [-17.185172898822227, 14.91947724045286], [-16.700706346085919, 15.621527411354107], [-16.463098110407881, 16.135036119038457], [-16.120690070041928, 16.45566254319338], [-15.623666144258689, 16.369337063049809], [-15.135737270558813, 16.587282416240779], [-14.577347581428977, 16.598263658102805], [-14.099521450242175, 16.304302273010489], [-13.43573767745306, 16.039383042866188], [-12.830658331747513, 15.303691514542942], [-12.170750291380299, 14.616834214735503], [-12.124887457721256, 13.994727484589784], [-11.927716030311613, 13.422075100147392], [-11.553397793005427, 13.141213690641063], [-11.467899135778522, 12.754518947800973], [-11.513942836950587, 12.442987575729415], [-11.658300950557928, 12.386582749882834], [-12.20356482588563, 12.465647691289401], [-12.278599005573438, 12.354440008997285], [-12.499050665730561, 12.332089952031053], [-13.217818162478235, 12.575873521367964], [-13.700476040084322, 12.586182969610192], [-15.548476935274005, 12.628170070847343], [-15.816574266004251, 12.515567124883345], [-16.147716844130581, 12.547761542201185], [-16.67745195155457, 12.38485158940105], [-16.84152462408127, 13.151393947802557], [-15.931295945692208, 13.130284125211331], [-15.691000535534991, 13.270353094938455], [-15.511812506562931, 13.278569647672864], [-15.141163295949463, 13.509511623585235], [-14.712197231494626, 13.298206691943774], [-14.277701788784553, 13.28058502853224], [-13.844963344772404, 13.505041612191999], [-14.046992356817478, 13.794067898000446], [-14.376713833055785, 13.625680243377371], [-14.687030808968483, 13.63035696049978], [-15.081735398813816, 13.876491807505982], [-15.398770310924457, 13.860368760630916], [-15.624596320039936, 13.623587347869556], [-16.713728807023468, 13.594958604379853]]] } }, - { "type": "Feature", "properties": { "admin": "Solomon Islands", "name": "Solomon Is.", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[162.119024693040842, -10.482719008021133], [162.398645868172196, -10.826367282762119], [161.700032180018354, -10.820011081590222], [161.319796991214702, -10.204751478723123], [161.917383254237933, -10.446700534713653], [162.119024693040842, -10.482719008021133]]], [[[160.852228631837903, -9.872937106977002], [160.462588332357228, -9.89520964929484], [159.849447463214176, -9.794027194867367], [159.640002883135139, -9.639979750205269], [159.70294477766663, -9.242949720906777], [160.362956170898428, -9.400304457235533], [160.688517694337179, -9.610162448772808], [160.852228631837903, -9.872937106977002]]], [[[161.679981724289121, -9.599982191611373], [161.52939660059053, -9.784312025596433], [160.788253208660507, -8.917543226764918], [160.579997186524338, -8.320008640173965], [160.92002811100491, -8.320008640173965], [161.280006138349961, -9.120011488484449], [161.679981724289121, -9.599982191611373]]], [[[159.875027297198585, -8.337320244991714], [159.917401971677975, -8.538289890174864], [159.133677199539335, -8.114181410355398], [158.586113722974687, -7.754823500197713], [158.211149530264834, -7.421872246941147], [158.359977655265425, -7.320017998893915], [158.820001255527671, -7.56000335045739], [159.640002883135139, -8.020026950719567], [159.875027297198585, -8.337320244991714]]], [[[157.53842573468927, -7.347819919466928], [157.339419793933217, -7.404767347852554], [156.902030471014768, -7.176874281445391], [156.491357863591304, -6.765943291860394], [156.542827590153934, -6.599338474151478], [157.140000441718882, -7.021638278840653], [157.53842573468927, -7.347819919466928]]]] } }, - { "type": "Feature", "properties": { "admin": "Sierra Leone", "name": "Sierra Leone", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-11.438779466182053, 6.785916856305746], [-11.708194545935736, 6.860098374860724], [-12.428098924193815, 7.262942002792029], [-12.949049038128193, 7.798645738145736], [-13.124025437868479, 8.163946438016977], [-13.246550258832512, 8.903048610871506], [-12.711957566773076, 9.342711696810765], [-12.596719122762206, 9.620188300001969], [-12.425928514037562, 9.835834051955953], [-12.150338100625003, 9.858571682164378], [-11.917277390988655, 10.046983954300556], [-11.117481248407328, 10.045872911006283], [-10.839151984083299, 9.688246161330367], [-10.622395188835037, 9.267910061068276], [-10.65477047366589, 8.977178452994194], [-10.494315151399629, 8.715540676300433], [-10.505477260774667, 8.348896389189603], [-10.230093553091276, 8.406205552601291], [-10.695594855176477, 7.939464016141085], [-11.14670427086838, 7.396706447779534], [-11.199801805048278, 7.105845648624735], [-11.438779466182053, 6.785916856305746]]] } }, - { "type": "Feature", "properties": { "admin": "El Salvador", "name": "El Salvador", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-87.793111131526558, 13.384480495655051], [-87.904112108089507, 13.149016831917134], [-88.483301561216791, 13.163951320849488], [-88.843227912129692, 13.259733588102474], [-89.256742723329282, 13.4585328231293], [-89.812393561547637, 13.520622056527994], [-90.095554572290951, 13.73533763270073], [-90.064677903996568, 13.881969509328924], [-89.7219339668207, 14.134228013561694], [-89.5342193265205, 14.244815578666302], [-89.587342698916544, 14.362586167859485], [-89.353325975282772, 14.424132798719112], [-89.058511929057644, 14.340029405164085], [-88.843072882832814, 14.140506700085169], [-88.541230841815974, 13.980154730683475], [-88.50399797234968, 13.845485948130854], [-88.065342576840123, 13.964625962779774], [-87.859515347021585, 13.893312486216979], [-87.723502977229387, 13.785050360565503], [-87.793111131526558, 13.384480495655051]]] } }, - { "type": "Feature", "properties": { "admin": "Somaliland", "name": "Somaliland", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[48.938129510296491, 9.451748968946672], [48.486735874226994, 8.837626247589979], [47.78942, 8.003], [46.948328484897942, 7.996876532417386], [43.67875, 9.183580000000116], [43.296975132018744, 9.540477403191742], [42.92812, 10.021940000000139], [42.55876, 10.572580000000126], [42.776851841000948, 10.926878566934416], [43.145304803242126, 11.462039699748853], [43.470659620951658, 11.27770986576388], [43.666668328634834, 10.864169216348158], [44.117803582542805, 10.445538438351603], [44.614259067570849, 10.442205308468941], [45.556940545439133, 10.698029486529775], [46.645401238802997, 10.816549383991171], [47.525657586462778, 11.127228094929986], [48.021596307167769, 11.193063869669741], [48.378783807169263, 11.375481675660122], [48.948206414593457, 11.410621649618516], [48.942005242718423, 11.394266058798163], [48.938491245322595, 10.982327378783451], [48.938232863161076, 9.973500067581481], [48.938129510296491, 9.451748968946672]]] } }, - { "type": "Feature", "properties": { "admin": "Somalia", "name": "Somalia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[49.72862, 11.5789], [50.25878, 11.67957], [50.73202, 12.0219], [51.1112, 12.02464], [51.13387, 11.74815], [51.04153, 11.16651], [51.04531, 10.6409], [50.83418, 10.27972], [50.55239, 9.19874], [50.07092, 8.08173], [49.4527, 6.80466], [48.59455, 5.33911], [47.74079, 4.2194], [46.56476, 2.85529], [45.56399, 2.04576], [44.06815, 1.05283], [43.13597, 0.2922], [42.04157, -0.91916], [41.81095, -1.44647], [41.58513, -1.68325], [40.993, -0.85829], [40.98105, 2.78452], [41.855083092643966, 3.918911920483726], [42.12861, 4.23413], [42.76967, 4.25259], [43.66087, 4.95755], [44.9636, 5.00162], [47.78942, 8.003], [48.486735874226937, 8.837626247589993], [48.938129510296442, 9.451748968946616], [48.938232863161026, 9.973500067581508], [48.938491245322481, 10.982327378783465], [48.942005242718345, 11.394266058798136], [48.948204758509732, 11.410617281697961], [49.26776, 11.43033], [49.72862, 11.5789]]] } }, - { "type": "Feature", "properties": { "admin": "Republic of Serbia", "name": "Serbia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[20.874312778413408, 45.416375433934306], [21.483526238702204, 45.181170152357865], [21.562022739353718, 44.768947251965635], [22.145087924902892, 44.478422349620573], [22.459022251075961, 44.702517198254426], [22.705725538837434, 44.578002834647002], [22.47400841644065, 44.409227606781762], [22.657149692483067, 44.234923000661347], [22.410446404721593, 44.008063462900047], [22.500156691180219, 43.642814439460999], [22.986018507588479, 43.211161200527094], [22.604801466571352, 42.898518785161109], [22.43659467946139, 42.580321153323943], [22.545011834409642, 42.461362006188025], [22.380525750424674, 42.320259507815074], [21.917080000000105, 42.30364], [21.576635989402117, 42.245224397061847], [21.54332, 42.32025], [21.66292, 42.43922], [21.77505, 42.6827], [21.63302, 42.67717], [21.43866, 42.86255], [21.27421, 42.90959], [21.143395, 43.068685000000123], [20.95651, 43.13094], [20.81448, 43.27205], [20.63508, 43.21671], [20.49679, 42.88469], [20.25758, 42.81275], [20.3398, 42.89852], [19.95857, 43.10604], [19.63, 43.213779970270522], [19.48389, 43.35229], [19.21852, 43.52384], [19.454, 43.568100000000115], [19.59976, 44.03847], [19.11761, 44.42307], [19.36803, 44.863], [19.00548, 44.86023], [19.390475701584588, 45.236515611342369], [19.072768995854172, 45.521511135432078], [18.82982, 45.90888], [19.596044549241636, 46.171729844744547], [20.22019249846289, 46.127468980486569], [20.76217492033998, 45.734573065771478], [20.874312778413408, 45.416375433934306]]] } }, - { "type": "Feature", "properties": { "admin": "Suriname", "name": "Suriname", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-57.147436489476874, 5.973149929219161], [-55.949318406789786, 5.772877915872], [-55.841779751190408, 5.953125311706059], [-55.033250291551759, 6.025291449401662], [-53.958044603070888, 5.756548163267764], [-54.478632981979224, 4.896755682795585], [-54.3995422023565, 4.212611395683466], [-54.006930508018996, 3.620037746592558], [-54.181726040246261, 3.189779771330421], [-54.269705166223183, 2.732391669115046], [-54.524754197799709, 2.311848863123785], [-55.097587449755125, 2.523748073736612], [-55.569755011605984, 2.42150625244713], [-55.973322109589361, 2.510363877773016], [-56.073341844290283, 2.220794989425499], [-55.905600145070871, 2.021995754398659], [-55.995698004771739, 1.817667141116601], [-56.53938574891454, 1.89952260986692], [-57.150097825739898, 2.768926906745406], [-57.281433478409703, 3.333491929534119], [-57.601568976457848, 3.334654649260684], [-58.044694383360664, 4.060863552258382], [-57.860209520078691, 4.576801052260449], [-57.914288906472123, 4.812626451024413], [-57.307245856339492, 5.073566595882225], [-57.147436489476874, 5.973149929219161]]] } }, - { "type": "Feature", "properties": { "admin": "Slovakia", "name": "Slovakia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[18.85314415861361, 49.496229763377634], [18.909574822676316, 49.435845852244562], [19.320712517990469, 49.571574001659179], [19.825022820726865, 49.217125352569219], [20.415839471119849, 49.431453355499755], [20.887955356538406, 49.328772284535823], [21.607808058364206, 49.470107326854077], [22.558137648211751, 49.08573802346713], [22.280841912533553, 48.825392157580659], [22.085608351334848, 48.422264309271782], [21.872236362401729, 48.319970811550007], [20.801293979584919, 48.62385407164237], [20.473562045989862, 48.562850043321809], [20.239054396249344, 48.327567247096916], [19.769470656013109, 48.2026911484636], [19.66136355965849, 48.266614895208647], [19.174364861739885, 48.111378892603859], [18.777024773847668, 48.081768296900627], [18.696512892336923, 47.88095368101439], [17.857132602620023, 47.758428860050365], [17.488472934649813, 47.867466132186209], [16.979666782304033, 48.123497015976298], [16.879982944412998, 48.470013332709463], [16.960288120194573, 48.596982326850593], [17.101984897538895, 48.8169688991171], [17.545006951577101, 48.800019029325362], [17.886484816161808, 48.903475246773695], [17.913511590250462, 48.996492824899072], [18.104972771891848, 49.043983466175298], [18.170498488037961, 49.271514797556421], [18.399993523846174, 49.315000515330034], [18.554971144289478, 49.495015367218777], [18.85314415861361, 49.496229763377634]]] } }, - { "type": "Feature", "properties": { "admin": "Slovenia", "name": "Slovenia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[13.806475457421524, 46.509306138691201], [14.632471551174827, 46.431817328469535], [15.137091912504982, 46.658702704447016], [16.011663852612653, 46.683610744811688], [16.202298211337361, 46.852385972676949], [16.370504998447412, 46.841327216166498], [16.564808383864854, 46.503750922219822], [15.768732944408548, 46.238108222023442], [15.671529575267552, 45.834153550797865], [15.323953891672403, 45.731782538427673], [15.327674594797424, 45.452316392593218], [14.935243767972931, 45.471695054702671], [14.595109490627804, 45.6349409043127], [14.411968214585411, 45.466165676447446], [13.715059848697221, 45.500323798192369], [13.937630242578305, 45.591015936864608], [13.698109978905475, 46.016778062517339], [13.806475457421524, 46.509306138691201]]] } }, - { "type": "Feature", "properties": { "admin": "Sweden", "name": "Sweden", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[22.183173455501922, 65.723740546320158], [21.213516879977213, 65.02600535751526], [21.369631381930954, 64.413587958424273], [19.778875766690216, 63.609554348395022], [17.847779168375208, 62.749400132896803], [17.11955488451812, 61.341165676510954], [17.831346062906388, 60.636583360427394], [18.787721795332086, 60.081914374422581], [17.869224887776337, 58.95376618105869], [16.829185011470084, 58.719826972073385], [16.44770958829147, 57.041118069071871], [15.87978559740378, 56.104301866268649], [14.666681349352071, 56.20088511822216], [14.100721062891461, 55.407781073622637], [12.942910597392054, 55.361737372450563], [12.625100538797025, 56.307080186581956], [11.787942335668671, 57.441817125063061], [11.027368605196866, 58.856149400459344], [11.468271925511145, 59.432393296946024], [12.300365838274896, 60.117932847730025], [12.631146681375181, 61.293571682370121], [11.992064243221559, 61.800362453856543], [11.930569288794228, 63.128317572676963], [12.57993533697393, 64.066218980558318], [13.571916131248711, 64.049114081469696], [13.9199052263022, 64.445420640716065], [13.555689731509087, 64.7870276963815], [15.108411492582999, 66.19386688909546], [16.108712192456775, 67.302455552836875], [16.768878614985478, 68.013936672631388], [17.729181756265344, 68.010551866316263], [17.993868442464329, 68.567391262477344], [19.878559604581248, 68.407194322372561], [20.025268995857882, 69.065138658312691], [20.645592889089521, 69.106247260200846], [21.978534783626113, 68.616845608180682], [23.539473097434435, 67.936008612735236], [23.565879754335576, 66.396050930437411], [23.903378533633795, 66.006927395279604], [22.183173455501922, 65.723740546320158]]] } }, - { "type": "Feature", "properties": { "admin": "Swaziland", "name": "Swaziland", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[32.071665480281062, -26.733820082304902], [31.868060337051073, -27.17792734142127], [31.282773064913325, -27.285879408478991], [30.685961948374477, -26.743845310169526], [30.676608514129633, -26.398078301704604], [30.949666782359905, -26.022649021104144], [31.044079624157146, -25.731452325139436], [31.333157586397899, -25.660190525008943], [31.837777947728057, -25.843331801051342], [31.985779249811962, -26.29177988048022], [32.071665480281062, -26.733820082304902]]] } }, - { "type": "Feature", "properties": { "admin": "Syria", "name": "Syria", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[38.792340529136077, 33.378686428352218], [36.834062127435537, 32.312937526980768], [35.719918247222743, 32.709192409794859], [35.700797967274745, 32.716013698857374], [35.836396925608618, 32.868123277308506], [35.821100701650231, 33.277426459276292], [36.066460402172048, 33.824912421192543], [36.611750115715886, 34.201788641897174], [36.448194207512095, 34.59393524834406], [35.998402540843628, 34.644914048799997], [35.905023227692219, 35.410009467097318], [36.149762811026527, 35.821534735653664], [36.417550083163029, 36.040616970355053], [36.685389031731795, 36.259699205056457], [36.739494256341395, 36.817520453431079], [37.066761102045824, 36.623036200500614], [38.167727492024191, 36.901210435527766], [38.699891391765895, 36.712927354472335], [39.522580193852541, 36.716053778625984], [40.673259311695681, 37.091276353497285], [41.212089471203043, 37.074352321921687], [42.349591098811764, 37.22987254490409], [41.837064243340954, 36.605853786763568], [41.289707472505448, 36.358814602192261], [41.383965285005807, 35.628316555314349], [41.00615888851992, 34.419372260062111], [38.792340529136077, 33.378686428352218]]] } }, - { "type": "Feature", "properties": { "admin": "Chad", "name": "Chad", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[14.495787387762899, 12.859396267137353], [14.595781284247604, 13.330426947477859], [13.954476759505607, 13.353448798063765], [13.956698846094124, 13.996691189016925], [13.540393507550785, 14.36713369390122], [13.97217, 15.68437], [15.247731154041842, 16.627305813050778], [15.300441114979716, 17.927949937405], [15.68574059414777, 19.957180080642384], [15.90324669766431, 20.387618923417499], [15.487148064850143, 20.730414537025634], [15.47106, 21.04845], [15.096887648181847, 21.308518785074902], [14.8513, 22.862950000000119], [15.86085, 23.40972], [19.84926, 21.49509], [23.837660000000135, 19.580470000000101], [23.886890000000101, 15.61084], [23.02459, 15.68072], [22.567950000000106, 14.944290000000134], [22.30351, 14.32682], [22.51202, 14.09318], [22.18329, 13.78648], [22.29658, 13.37232], [22.03759, 12.95546], [21.93681, 12.588180000000133], [22.28801, 12.64605], [22.49762, 12.26024], [22.50869, 11.67936], [22.87622, 11.384610000000119], [22.864165480244246, 11.142395127807616], [22.231129184668756, 10.971888739460608], [21.723821648859538, 10.567055568885959], [21.000868361096305, 9.475985215691479], [20.059685499764267, 9.012706000194838], [19.094008009526071, 9.074846910025768], [18.81200971850927, 8.982914536978623], [18.911021762780589, 8.630894680206435], [18.389554884523303, 8.281303615751879], [17.964929640380884, 7.890914008002992], [16.705988396886365, 7.508327541529978], [16.4561845231874, 7.734773667832938], [16.290561557691884, 7.754307359239417], [16.106231723706738, 7.497087917506461], [15.279460483469164, 7.42192454673801], [15.436091749745737, 7.692812404811887], [15.120865512765302, 8.382150173369437], [14.979995558337688, 8.796104234243442], [14.544466586981851, 8.965861314322238], [13.954218377344088, 9.549494940626685], [14.17146609869911, 10.021378282100043], [14.627200555081057, 9.920919297724591], [14.909353875394796, 9.992129421422758], [15.46787275560524, 9.982336737503543], [14.923564894275042, 10.891325181517514], [14.960151808337679, 11.555574042197234], [14.89336, 12.21905], [14.495787387762899, 12.859396267137353]]] } }, - { "type": "Feature", "properties": { "admin": "Togo", "name": "Togo", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[1.865240512712318, 6.14215770102973], [1.060121697604927, 5.928837388528875], [0.836931186536333, 6.279978745952147], [0.570384148774849, 6.914358628767188], [0.490957472342245, 7.411744289576474], [0.712029249686878, 8.312464504423827], [0.461191847342121, 8.677222601756013], [0.365900506195885, 9.46500397382948], [0.367579990245389, 10.191212876827176], [-0.049784715159944, 10.706917832883928], [0.023802524423701, 11.018681748900802], [0.899563022474069, 10.997339382364258], [0.772335646171484, 10.470808213742357], [1.077795037448737, 10.175606594275022], [1.425060662450136, 9.825395412632998], [1.46304284018467, 9.334624335157086], [1.664477573258381, 9.128590399609378], [1.618950636409238, 6.832038072126236], [1.865240512712318, 6.14215770102973]]] } }, - { "type": "Feature", "properties": { "admin": "Thailand", "name": "Thailand", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[102.58493248902667, 12.186594956913279], [101.687157830819928, 12.645740057826568], [100.831809523524839, 12.627084865769204], [100.978467238369191, 13.412721665902563], [100.097797479251099, 13.406856390837429], [100.018732537844528, 12.307001044153353], [99.478920526123602, 10.846366685423545], [99.153772414143134, 9.963061428258554], [99.222398716226749, 9.239255479362425], [99.873831821698118, 9.207862046745118], [100.279646844486194, 8.29515289960605], [100.45927412313273, 7.429572658717175], [101.017327915452697, 6.856868597842476], [101.623079054778032, 6.740622463401918], [102.141186964936367, 6.221636053894626], [101.81428185425797, 5.810808417174242], [101.154218784593837, 5.691384182147713], [101.075515578213327, 6.20486705161592], [100.259596388756933, 6.642824815289542], [100.085756870527092, 6.46448944745029], [99.690690545655727, 6.848212795433595], [99.519641554769606, 7.343453884302759], [98.988252801512289, 7.907993068875325], [98.503786248775967, 8.382305202666286], [98.339661899816988, 7.794511623562384], [98.150009393305808, 8.350007432483876], [98.259150018306229, 8.973922837759799], [98.553550653073017, 9.932959906448543], [99.038120558673953, 10.960545762572435], [99.587286004639694, 11.892762762901695], [99.196353794351637, 12.804748439988666], [99.212011753336071, 13.269293728076462], [99.097755161538728, 13.827502549693275], [98.430819126379859, 14.622027696180831], [98.192074009191373, 15.123702500870349], [98.537375929765687, 15.308497422746081], [98.90334842325673, 16.177824204976115], [98.493761020911322, 16.837835598207928], [97.859122755934848, 17.567946071843657], [97.375896437573516, 18.445437730375811], [97.797782830804394, 18.627080389881751], [98.253723992915582, 19.708203029860041], [98.959675734454848, 19.752980658440944], [99.543309360759281, 20.186597601802056], [100.115987583417819, 20.41784963630818], [100.548881056726856, 20.109237982661124], [100.606293573003128, 19.508344427971217], [101.282014601651667, 19.462584947176762], [101.035931431077742, 18.408928330961611], [101.059547560635139, 17.512497259994486], [102.113591750092453, 18.109101670804161], [102.413004998791592, 17.932781683824281], [102.998705682387694, 17.961694647691598], [103.200192091893726, 18.309632066312769], [103.956476678485288, 18.240954087796872], [104.716947056092465, 17.428858954330078], [104.779320509868768, 16.441864935771445], [105.589038527450128, 15.570316066952856], [105.544338413517664, 14.723933620660414], [105.218776890078871, 14.27321177821069], [104.281418084736586, 14.416743068901363], [102.988422072361601, 14.225721136934464], [102.348099399833004, 13.39424734135822], [102.58493248902667, 12.186594956913279]]] } }, - { "type": "Feature", "properties": { "admin": "Tajikistan", "name": "Tajikistan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[71.014198032520156, 40.244365546218226], [70.648018833299957, 39.935753892571157], [69.559609816368507, 40.103211371412968], [69.464886915977516, 39.526683254548693], [70.549161818325601, 39.604197902986492], [71.784693637991992, 39.279463202464363], [73.67537926625478, 39.431236884105594], [73.928852166646408, 38.505815334622724], [74.257514276022718, 38.606506862943441], [74.864815708316812, 38.378846340481587], [74.829985792952087, 37.990007025701388], [74.980002475895404, 37.419990139305888], [73.948695916646486, 37.421566270490786], [73.260055779924983, 37.495256862938994], [72.636889682917271, 37.047558091778349], [72.193040805962383, 36.94828766534566], [71.84463829945058, 36.738171291646914], [71.448693475230229, 37.065644843080513], [71.541917759084768, 37.905774441065631], [71.239403924448155, 37.953265082341879], [71.348131137990251, 38.258905341132156], [70.806820509732873, 38.486281643216408], [70.376304152309274, 38.138395901027515], [70.270574171840124, 37.73516469985401], [70.116578403610319, 37.588222764632086], [69.518785434857946, 37.608996690413413], [69.196272820924364, 37.15114350030742], [68.859445835245921, 37.344335842430588], [68.135562371701369, 37.023115139304302], [67.829999627559502, 37.144994004864678], [68.392032505165943, 38.157025254868728], [68.176025018185911, 38.901553453113898], [67.442219679641298, 39.140143541005479], [67.701428664017342, 39.580478420564518], [68.536416456989414, 39.533452867178923], [69.011632928345477, 40.086158148756653], [69.329494663372813, 40.727824408524839], [70.666622348925031, 40.960213324541407], [70.458159621059608, 40.49649485937028], [70.601406691372674, 40.218527330072284], [71.014198032520156, 40.244365546218226]]] } }, - { "type": "Feature", "properties": { "admin": "Turkmenistan", "name": "Turkmenistan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[61.21081709172573, 35.650072333309218], [61.123070509694131, 36.491597194966239], [60.377637973883864, 36.52738312432836], [59.234761997316795, 37.412987982730336], [58.436154412678192, 37.522309475243794], [57.330433790928964, 38.029229437810933], [56.619366082592805, 38.121394354803478], [56.180374790273319, 37.935126654607423], [55.511578403551894, 37.964117133123153], [54.800303989486558, 37.392420762678178], [53.921597934795543, 37.198918361961255], [53.735511102112504, 37.906136176091685], [53.880928582581831, 38.952093003895349], [53.101027866432894, 39.290573635407121], [53.357808058491216, 39.975286363274442], [52.693972609269807, 40.033629055331964], [52.91525109234361, 40.87652334244472], [53.85813927594112, 40.631034450842165], [54.736845330632136, 40.951014919593455], [54.0083109881813, 41.551210842447404], [53.721713494690576, 42.123191433270016], [52.916749708880069, 41.868116563477322], [52.81468875510361, 41.135370591794704], [52.502459751196135, 41.783315538086356], [52.94429324729164, 42.116034247397586], [54.079417759014937, 42.324109402020817], [54.755345493392625, 42.04397146256656], [55.455251092353755, 41.259859117185826], [55.968191359282898, 41.308641669269356], [57.096391229079089, 41.32231008561056], [56.93221520368779, 41.82602610937559], [57.786529982337065, 42.170552883465511], [58.629010857991453, 42.751551011723045], [59.976422153569771, 42.223081976890199], [60.083340691981654, 41.425146185871391], [60.46595299667068, 41.22032664648254], [61.547178989513547, 41.2663703476546], [61.882714064384679, 41.084856879229392], [62.374260288344992, 40.053886216790382], [63.518014764261018, 39.363256537425627], [64.170223016216752, 38.892406724598231], [65.215998976507379, 38.402695013984292], [66.546150343700205, 37.974684963526855], [66.518606805288655, 37.362784328758785], [66.217384881459324, 37.393790188133913], [65.745630731066811, 37.661164048812061], [65.588947788357828, 37.305216783185628], [64.746105177677393, 37.111817735333297], [64.546479119733888, 36.31207326918426], [63.982895949158696, 36.007957465146596], [63.193538445900337, 35.857165635718907], [62.984662306576588, 35.404040839167614], [62.230651483005879, 35.270663967422287], [61.21081709172573, 35.650072333309218]]] } }, - { "type": "Feature", "properties": { "admin": "East Timor", "name": "Timor-Leste", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[124.96868248911619, -8.892790215697081], [125.086246372580248, -8.656887302284678], [125.947072381698234, -8.432094821815033], [126.64470421763852, -8.39824675866385], [126.957243280139792, -8.273344821814396], [127.335928175974615, -8.397316582882601], [126.967991978056517, -8.668256117388891], [125.925885044458568, -9.106007175333351], [125.088520135601073, -9.393173109579292], [125.070019972840583, -9.08998748132287], [124.96868248911619, -8.892790215697081]]] } }, - { "type": "Feature", "properties": { "admin": "Trinidad and Tobago", "name": "Trinidad and Tobago", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-61.68, 10.76], [-61.105, 10.89], [-60.895, 10.855], [-60.935, 10.11], [-61.77, 10.0], [-61.95, 10.09], [-61.66, 10.365], [-61.68, 10.76]]] } }, - { "type": "Feature", "properties": { "admin": "Tunisia", "name": "Tunisia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[9.482139926805273, 30.307556057246181], [9.055602654668148, 32.102691962201284], [8.439102817426116, 32.506284898400814], [8.430472853233367, 32.748337307255944], [7.612641635782181, 33.344114895148955], [7.524481642292242, 34.097376410451453], [8.140981479534302, 34.655145982393783], [8.376367628623766, 35.479876003555937], [8.217824334352313, 36.433176988260271], [8.420964389691674, 36.946427313783154], [9.509993523810605, 37.349994411766531], [10.210002475636315, 37.230001735984807], [10.180650262094529, 36.724037787415071], [11.028867221733348, 37.09210317641395], [11.100025668999249, 36.899996039368908], [10.600004510143092, 36.410000108377368], [10.593286573945134, 35.947444362932806], [10.939518670300686, 35.698984076473486], [10.807847120821007, 34.833507188449182], [10.149592726287123, 34.330773016897702], [10.339658644256613, 33.785741685515312], [10.856836378633684, 33.768740139291275], [11.108500603895118, 33.293342800422188], [11.488787469131008, 33.136995754523134], [11.432253452203692, 32.368903103152867], [10.944789666394453, 32.081814683555358], [10.636901482799484, 31.761420803345747], [9.950225050505081, 31.376069647745251], [10.056575148161752, 30.961831366493595], [9.97001712407285, 30.539324856075236], [9.482139926805273, 30.307556057246181]]] } }, - { "type": "Feature", "properties": { "admin": "Turkey", "name": "Turkey", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[36.913127068842151, 41.335358384764291], [38.347664829264502, 40.948586127275711], [39.512606642420238, 41.102762763018561], [40.373432651538245, 41.013672593747337], [41.554084100110707, 41.535656236327604], [42.619548781104548, 41.58317271581992], [43.582745802592704, 41.09214325618256], [43.752657911968491, 40.740200914058811], [43.656436395040963, 40.253563951166157], [44.400008579288759, 40.005000311842302], [44.79398969908199, 39.713002631177027], [44.109225294782355, 39.428136298168049], [44.421402622257595, 38.281281236314513], [44.225755649600522, 37.971584377589345], [44.772699008977739, 37.170444647768441], [44.293451775902852, 37.001514390606353], [43.942258742047343, 37.256227525372928], [42.77912560402185, 37.385263576805798], [42.349591098811764, 37.229872544904104], [41.212089471203015, 37.074352321921729], [40.673259311695702, 37.091276353497356], [39.522580193852512, 36.716053778626012], [38.699891391765917, 36.712927354472313], [38.167727492024156, 36.90121043552778], [37.066761102045824, 36.623036200500614], [36.739494256341366, 36.817520453431108], [36.685389031731816, 36.259699205056499], [36.417550083163086, 36.040616970355096], [36.149762811026584, 35.821534735653664], [35.782084995269848, 36.274995429014915], [36.160821567537049, 36.650605577128367], [35.550936313628334, 36.565442816711325], [34.714553256984367, 36.795532131490909], [34.026894972476455, 36.219960028623966], [32.509158156064096, 36.107563788389193], [31.69959516777956, 36.644275214172602], [30.621624790171062, 36.677864895162308], [30.391096225717114, 36.262980658506983], [29.69997562024556, 36.144357408181001], [28.732902866335387, 36.676831366516431], [27.641186557737363, 36.658822129862749], [27.048767937943289, 37.653360907536005], [26.318218214633042, 38.208133246405382], [26.804700148228726, 38.985760199533551], [26.170785353304375, 39.463612168936457], [27.280019972449388, 40.420013739578302], [28.819977654747209, 40.460011298172212], [29.240003696415574, 41.219990749672682], [31.145933872204434, 41.087621568357058], [32.347979363745786, 41.736264146484629], [33.513282911927512, 42.018960069337304], [35.167703891751863, 42.040224921225438], [36.913127068842151, 41.335358384764291]]], [[[27.192376743282406, 40.690565700842448], [26.358009067497782, 40.151993923496477], [26.043351271272535, 40.617753607743161], [26.056942172965332, 40.824123440100735], [26.294602085075692, 40.936261298174166], [26.604195590936282, 41.562114569661013], [26.117041863720825, 41.826904608724554], [27.135739373490505, 42.141484890301307], [27.996720411905407, 42.007358710287768], [28.115524529744441, 41.622886054036279], [28.988442824018779, 41.299934190428175], [28.806438429486743, 41.05496206314853], [27.619017368284112, 40.999823309893102], [27.192376743282406, 40.690565700842448]]]] } }, - { "type": "Feature", "properties": { "admin": "Taiwan", "name": "Taiwan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[121.777817824389899, 24.394273586519393], [121.175632358892713, 22.790857245367164], [120.747079705896198, 21.970571397382106], [120.220083449383651, 22.814860948166732], [120.106188592612369, 23.556262722258229], [120.694679803552233, 24.53845083261373], [121.49504438688875, 25.295458889257379], [121.951243931161429, 24.997595933527034], [121.777817824389899, 24.394273586519393]]] } }, - { "type": "Feature", "properties": { "admin": "United Republic of Tanzania", "name": "Tanzania", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[33.903711197104592, -0.95], [34.07262, -1.05982], [37.69869, -3.09699], [37.7669, -3.67712], [39.20222, -4.67677], [38.74054, -5.90895], [38.79977, -6.47566], [39.44, -6.84], [39.470000000000134, -7.1], [39.19469, -7.7039], [39.25203, -8.00781], [39.18652, -8.48551], [39.53574, -9.112369999999883], [39.9496, -10.0984], [40.31659, -10.317099999999867], [39.521, -10.89688], [38.427556593587767, -11.285202325081626], [37.82764, -11.26879], [37.47129, -11.56876], [36.775150994622884, -11.59453744878078], [36.514081658684397, -11.720938002166745], [35.312397902169145, -11.439146416879165], [34.559989047999451, -11.520020033415845], [34.28, -10.16], [33.940837724096518, -9.693673841980283], [33.73972, -9.41715], [32.759375441221373, -9.230599053589001], [32.191864861791935, -8.930358981973255], [31.556348097466628, -8.762048841998647], [31.157751336950064, -8.594578747317312], [30.74, -8.34], [30.2, -7.08], [29.62, -6.52], [29.419992710088305, -5.939998874539297], [29.519986606573063, -5.419978936386257], [29.339997592900367, -4.499983412294113], [29.753512404099858, -4.452389418153301], [30.11632, -4.09012], [30.50554, -3.56858], [30.75224, -3.35931], [30.74301, -3.03431], [30.52766, -2.80762], [30.46967, -2.41383], [30.758308953583132, -2.287250257988375], [30.816134881317844, -1.698914076345374], [30.419104852019291, -1.134659112150416], [30.769860000000101, -1.01455], [31.86617, -1.02736], [33.903711197104592, -0.95]]] } }, - { "type": "Feature", "properties": { "admin": "Uganda", "name": "Uganda", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[31.86617, -1.02736], [30.769860000000101, -1.01455], [30.419104852019291, -1.134659112150416], [29.821518588996121, -1.443322442229771], [29.579466180141019, -1.341313164885605], [29.587837762172164, -0.587405694179381], [29.8195, -0.2053], [29.875778842902431, 0.597379868976361], [30.086153598762785, 1.062312730306416], [30.468507521290285, 1.583805446779706], [30.852670118948133, 1.849396470543752], [31.174149204235952, 2.204465236821306], [30.77332, 2.339890000000139], [30.83385, 3.50917], [31.24556, 3.7819], [31.88145, 3.55827], [32.68642, 3.79232], [33.39, 3.79], [34.005, 4.249884947362147], [34.47913, 3.5556], [34.59607, 3.053740000000118], [35.03599, 1.90584], [34.6721, 1.17694], [34.18, 0.515], [33.893568969666994, 0.109813537861839], [33.903711197104592, -0.95], [31.86617, -1.02736]]] } }, - { "type": "Feature", "properties": { "admin": "Ukraine", "name": "Ukraine", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[31.78599816257158, 52.10167796488544], [32.159412062312661, 52.061266994833204], [32.412058139787625, 52.288694973349735], [32.715760532366964, 52.238465481162038], [33.7526998227357, 52.335074571331681], [34.391730584457001, 51.768881740925778], [34.141978387190385, 51.566413479206226], [34.22481570815426, 51.255993150428942], [35.022183058417873, 51.207572333371445], [35.377923618315116, 50.773955390010343], [35.35611616388794, 50.577197374059054], [36.62616784032533, 50.225590928745127], [37.393459506995065, 50.383953355503586], [38.01063113785689, 49.915661526074622], [38.59498823421341, 49.926461900423618], [40.069058465339097, 49.601055406281688], [40.080789015469342, 49.307429917999272], [39.674663934087526, 48.783818467801872], [39.895632358567575, 48.232405097031425], [39.738277622238819, 47.898937079451983], [38.770584751141186, 47.825608222029807], [38.255112339029743, 47.546400458356807], [38.223538038899413, 47.102189846375872], [37.42513715998998, 47.022220567404197], [36.759854770664383, 46.698700263040919], [35.823684523264816, 46.645964463887054], [34.962341749823871, 46.273196519549636], [35.020787794745978, 45.65121898048465], [35.51000857925316, 45.409993394546177], [36.529997999830151, 45.46998973243705], [36.334712762199146, 45.113215643893952], [35.239999220528112, 44.939996242851599], [33.882511020652878, 44.361478583344066], [33.326420932760037, 44.564877020844875], [33.546924269349446, 45.034770819674883], [32.454174432105496, 45.327466132176063], [32.630804477679128, 45.519185695978905], [33.588162062318382, 45.851568508480227], [33.298567335754704, 46.08059845639783], [31.744140252415171, 46.333347886737378], [31.675307244602401, 46.706245022155528], [30.748748813609094, 46.583100084003995], [30.37760867688888, 46.032410183285663], [29.603289015427425, 45.293308010431119], [29.149724969201646, 45.464925442072442], [28.679779493939371, 45.30403087013169], [28.233553501099035, 45.488283189468369], [28.48526940279276, 45.596907050145887], [28.659987420371575, 45.939986884131628], [28.933717482221621, 46.258830471372491], [28.862972446414055, 46.437889309263824], [29.072106967899288, 46.517677720722482], [29.170653924279879, 46.379262396828693], [29.759971958136383, 46.349987697935354], [30.024658644335364, 46.423936672545032], [29.838210076626289, 46.525325832701675], [29.908851759569295, 46.67436066343145], [29.559674106573105, 46.928582872091312], [29.415135125452732, 47.346645209332571], [29.050867954227321, 47.510226955752493], [29.122698195113024, 47.849095160506458], [28.670891147585163, 48.118148505234089], [28.259546746541837, 48.155562242213406], [27.52253746919515, 48.467119452501102], [26.857823520624798, 48.368210761094488], [26.619336785597788, 48.220726223333457], [26.197450392366925, 48.220881252630342], [25.945941196402394, 47.987148749374207], [25.207743361112986, 47.891056423527459], [24.866317172960571, 47.737525743188307], [24.402056105250374, 47.981877753280422], [23.760958286237404, 47.985598456405448], [23.142236362406798, 48.096341050806942], [22.710531447040488, 47.882193915389394], [22.640819939878746, 48.150239569687351], [22.085608351334848, 48.422264309271782], [22.280841912533553, 48.825392157580659], [22.558137648211751, 49.08573802346713], [22.776418898212619, 49.027395331409608], [22.518450148211596, 49.476773586619736], [23.426508416444388, 50.308505764357449], [23.922757195743259, 50.424881089878738], [24.029985792748899, 50.705406602575174], [23.52707075368437, 51.578454087930233], [24.005077752384206, 51.617443956094448], [24.553106316839511, 51.888461005249177], [25.327787713327005, 51.910656032918538], [26.337958611768549, 51.832288723347915], [27.454066196408426, 51.59230337178446], [28.241615024536564, 51.572227077839059], [28.617612745892242, 51.427713934934836], [28.992835320763522, 51.602044379271462], [29.254938185347921, 51.368234361366881], [30.157363722460889, 51.416138414101454], [30.55511722181145, 51.319503485715643], [30.619454380014837, 51.822806098022362], [30.927549269338975, 52.042353420614383], [31.78599816257158, 52.10167796488544]]] } }, - { "type": "Feature", "properties": { "admin": "Uruguay", "name": "Uruguay", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-57.625133429582945, -30.216294854454258], [-56.976025763564721, -30.109686374636119], [-55.97324459494093, -30.883075860316296], [-55.601510179249331, -30.853878676071385], [-54.572451544805105, -31.494511407193745], [-53.787951626182185, -32.047242526987617], [-53.209588995971529, -32.727666110974717], [-53.650543992718084, -33.202004082981823], [-53.373661668498229, -33.768377780900757], [-53.806425950726521, -34.396814874002224], [-54.935866054897716, -34.952646579733617], [-55.674089728403274, -34.752658786764066], [-56.215297003796053, -34.85983570733741], [-57.139685024633096, -34.430456231424238], [-57.817860683815489, -34.462547295877492], [-58.427074144104381, -33.909454441057569], [-58.349611172098854, -33.2631889788154], [-58.132647671121433, -33.040566908502008], [-58.142440355040748, -32.044503676076147], [-57.874937303281875, -31.016556084926201], [-57.625133429582945, -30.216294854454258]]] } }, - { "type": "Feature", "properties": { "admin": "United States of America", "name": "United States", "continent": "North America" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-155.54211, 19.08348], [-155.68817, 18.91619], [-155.93665, 19.05939], [-155.90806, 19.33888], [-156.07347, 19.70294], [-156.02368, 19.81422], [-155.85008, 19.97729], [-155.91907, 20.17395], [-155.86108, 20.26721], [-155.78505, 20.2487], [-155.40214, 20.07975], [-155.22452, 19.99302], [-155.06226, 19.8591], [-154.80741, 19.50871], [-154.83147, 19.45328], [-155.222169999999892, 19.23972], [-155.54211, 19.08348]]], [[[-156.07926, 20.64397], [-156.41445, 20.57241], [-156.58673, 20.783], [-156.70167, 20.8643], [-156.71055, 20.92676], [-156.61258, 21.01249], [-156.25711, 20.91745], [-155.99566, 20.76404], [-156.07926, 20.64397]]], [[[-156.75824, 21.17684], [-156.78933, 21.06873], [-157.32521, 21.09777], [-157.25027, 21.21958], [-156.75824, 21.17684]]], [[[-157.65283, 21.32217], [-157.70703, 21.26442], [-157.7786, 21.27729], [-158.12667, 21.31244], [-158.2538, 21.53919], [-158.29265, 21.57912], [-158.0252, 21.71696], [-157.94161, 21.65272], [-157.65283, 21.32217]]], [[[-159.34512, 21.982], [-159.46372, 21.88299], [-159.80051, 22.06533], [-159.74877, 22.1382], [-159.5962, 22.23618], [-159.36569, 22.21494], [-159.34512, 21.982]]], [[[-94.81758, 49.38905], [-94.639999999999858, 48.840000000000103], [-94.32914, 48.67074], [-93.63087, 48.60926], [-92.61, 48.45], [-91.64, 48.14], [-90.829999999999856, 48.27], [-89.6, 48.01], [-89.272917446636654, 48.019808254582834], [-88.378114183286513, 48.302917588893806], [-87.439792623300207, 47.94], [-86.461990831228135, 47.553338019392037], [-85.652363247403215, 47.220218817730498], [-84.876079881514855, 46.900083319682366], [-84.779238247399817, 46.637101955749117], [-84.54374874544564, 46.538684190449224], [-84.6049, 46.4396], [-84.3367, 46.408770000000104], [-84.142119513673279, 46.512225857115723], [-84.091851264161463, 46.275418606138253], [-83.890765347005654, 46.116926988299149], [-83.616130947590491, 46.116926988299149], [-83.469550747394621, 45.994686387712584], [-83.592850714843067, 45.816893622412543], [-82.550924648758169, 45.347516587905446], [-82.337763125431053, 44.44], [-82.137642381503952, 43.571087551439987], [-82.43, 42.98], [-82.899999999999878, 42.430000000000135], [-83.119999999999877, 42.08], [-83.141999681312555, 41.975681057292995], [-83.029810146806909, 41.832795722005997], [-82.690089280920162, 41.675105088867319], [-82.439277716791608, 41.675105088867319], [-81.277746548167059, 42.209025987306845], [-80.247447679347843, 42.36619985612267], [-78.939362148743683, 42.863611355148116], [-78.92, 42.965], [-79.009999999999863, 43.27], [-79.171673550111862, 43.466339423184301], [-78.720279914042365, 43.625089423184953], [-77.737885097957601, 43.629055589363382], [-76.820034145805565, 43.628784288093748], [-76.5, 44.018458893758599], [-76.375, 44.09631], [-75.31821, 44.81645000000016], [-74.867, 45.00048000000011], [-73.347829999999874, 45.00738], [-71.505059999999858, 45.0082], [-71.405, 45.255000000000123], [-71.08482, 45.305240000000154], [-70.659999999999783, 45.46], [-70.305, 45.915], [-69.99997, 46.69307], [-69.237216, 47.447781], [-68.905, 47.185], [-68.23444, 47.35486], [-67.79046, 47.06636], [-67.79134, 45.702810000000134], [-67.13741, 45.13753], [-66.96466, 44.809700000000149], [-68.03252, 44.3252], [-69.059999999999874, 43.98], [-70.116169999999897, 43.684050000000141], [-70.645475633410967, 43.090238348964043], [-70.81489, 42.8653], [-70.825, 42.335], [-70.494999999999891, 41.805], [-70.08, 41.78], [-70.185, 42.145], [-69.88497, 41.922830000000111], [-69.96503, 41.637170000000161], [-70.64, 41.475], [-71.12039, 41.494450000000164], [-71.859999999999829, 41.32], [-72.295, 41.27], [-72.87643, 41.22065], [-73.71, 40.931102351654481], [-72.24126, 41.119480000000138], [-71.944999999999808, 40.93], [-73.345, 40.63], [-73.982, 40.628], [-73.952325, 40.75075], [-74.25671, 40.47351], [-73.96244, 40.42763], [-74.17838, 39.70926], [-74.90604, 38.93954], [-74.98041, 39.1964], [-75.20002, 39.24845], [-75.52805, 39.4985], [-75.32, 38.96], [-75.071834764789784, 38.782032230179276], [-75.05673, 38.404120000000106], [-75.37747, 38.01551], [-75.94023, 37.21689], [-76.03127, 37.2566], [-75.722049999999783, 37.937050000000106], [-76.23287, 38.319215], [-76.35, 39.15], [-76.542725, 38.717615], [-76.32933, 38.08326], [-76.98999793161353, 38.239991766913384], [-76.301619999999886, 37.917945], [-76.25874, 36.9664000000001], [-75.9718, 36.89726], [-75.868039999999809, 36.55125], [-75.72749, 35.550740000000125], [-76.36318, 34.808540000000129], [-77.39763499999988, 34.51201], [-78.05496, 33.92547], [-78.554349999999815, 33.861330000000116], [-79.06067, 33.49395], [-79.20357, 33.15839], [-80.301325, 32.509355], [-80.86498, 32.0333], [-81.33629, 31.44049], [-81.49042, 30.729990000000122], [-81.31371, 30.03552], [-80.98, 29.18000000000011], [-80.53558499999987, 28.47213], [-80.529999999999774, 28.04], [-80.056539284977532, 26.88000000000013], [-80.088015, 26.205765], [-80.131559999999837, 25.816775], [-80.38103, 25.20616], [-80.679999999999879, 25.08], [-81.17213, 25.201260000000126], [-81.33, 25.64], [-81.709999999999795, 25.87], [-82.239999999999895, 26.730000000000125], [-82.70515, 27.49504], [-82.85526, 27.88624], [-82.65, 28.550000000000146], [-82.929999999999865, 29.100000000000129], [-83.70959, 29.93656], [-84.1, 30.090000000000114], [-85.10882, 29.63615], [-85.28784, 29.686120000000127], [-85.7731, 30.152610000000116], [-86.399999999999878, 30.400000000000112], [-87.530359999999831, 30.27433], [-88.41782, 30.3849], [-89.180489999999836, 30.31598], [-89.593831178419748, 30.159994004836843], [-89.413735, 29.89419], [-89.43, 29.48864], [-89.21767, 29.29108], [-89.40823, 29.15961], [-89.77928, 29.307140000000135], [-90.15463, 29.11743], [-90.880224999999896, 29.148535000000116], [-91.626784999999842, 29.677000000000127], [-92.49906, 29.5523], [-93.22637, 29.78375], [-93.84842, 29.71363], [-94.69, 29.480000000000125], [-95.60026, 28.73863], [-96.59404, 28.30748], [-97.139999999999802, 27.83], [-97.37, 27.38], [-97.379999999999853, 26.69], [-97.33, 26.210000000000115], [-97.139999999999802, 25.87], [-97.529999999999859, 25.84], [-98.239999999999895, 26.060000000000109], [-99.019999999999854, 26.37], [-99.3, 26.84], [-99.52, 27.54], [-100.11, 28.11000000000012], [-100.45584, 28.696120000000118], [-100.957599999999886, 29.380710000000125], [-101.6624, 29.779300000000113], [-102.48, 29.76], [-103.11, 28.97], [-103.94, 29.27], [-104.456969999999814, 29.57196], [-104.705749999999895, 30.12173], [-105.03737, 30.64402], [-105.63159, 31.083830000000113], [-106.1429, 31.39995], [-106.507589999999794, 31.75452], [-108.24, 31.754853718166398], [-108.24194, 31.34222], [-109.035, 31.341940000000161], [-111.02361, 31.33472], [-113.30498, 32.03914], [-114.815, 32.52528], [-114.721389999999829, 32.72083], [-115.991349999999869, 32.61239000000014], [-117.127759999999753, 32.53534], [-117.295937691273863, 33.04622461520389], [-117.944, 33.621236431201389], [-118.410602275897475, 33.740909223124497], [-118.519894822799685, 34.027781577575745], [-119.081, 34.078], [-119.438840642016658, 34.348477178284291], [-120.36778, 34.44711], [-120.62286, 34.60855], [-120.74433, 35.156860000000101], [-121.714569999999853, 36.16153], [-122.54747, 37.551760000000101], [-122.51201, 37.783390000000132], [-122.95319, 38.113710000000104], [-123.7272, 38.951660000000111], [-123.865169999999878, 39.766990000000128], [-124.39807, 40.3132], [-124.17886, 41.142020000000109], [-124.2137, 41.999640000000134], [-124.532839999999894, 42.76599], [-124.14214, 43.70838], [-124.020535, 44.615895], [-123.898929999999893, 45.52341], [-124.079635, 46.86475], [-124.395669999999896, 47.72017], [-124.687210083007812, 48.184432983398537], [-124.566101074218736, 48.379714965820384], [-123.12, 48.04], [-122.587359999999876, 47.096], [-122.34, 47.36], [-122.5, 48.18], [-122.84, 49.0], [-120.0, 49.0], [-117.03121, 49.0], [-116.04818, 49.0], [-112.999999999999872, 49.0], [-110.049999999999812, 49.0], [-107.049999999999898, 49.0], [-104.04826, 48.99986], [-100.65, 49.0], [-97.228720000004699, 49.0007], [-95.159069509171943, 49.0], [-95.15609, 49.38425], [-94.81758, 49.38905]]], [[[-153.006314053336837, 57.115842190165878], [-154.0050902984581, 56.734676825581047], [-154.516402757770067, 56.992748928446687], [-154.670992804971092, 57.461195787172493], [-153.762779507441451, 57.816574612043773], [-153.228729417921073, 57.968968410872421], [-152.564790615835108, 57.901427313866961], [-152.141147223906273, 57.591058661521977], [-153.006314053336837, 57.115842190165878]]], [[[-165.579164191733554, 59.909986884187539], [-166.192770148767238, 59.754440822988961], [-166.848337368821944, 59.941406155020942], [-167.455277066090048, 60.213069159579376], [-166.467792121424566, 60.384169826897775], [-165.674429694663644, 60.293606879306232], [-165.579164191733554, 59.909986884187539]]], [[[-171.731656867539357, 63.782515367275906], [-171.114433560245175, 63.592191067144981], [-170.491112433940657, 63.694975490973505], [-169.682505459653555, 63.431115627691142], [-168.689439460300662, 63.297506212000584], [-168.77194088445458, 63.188598130945437], [-169.529439867204985, 62.976931464277882], [-170.290556200215917, 63.194437567794452], [-170.671385667990847, 63.375821845138965], [-171.553063117538642, 63.317789211675077], [-171.791110602891166, 63.40584585230048], [-171.731656867539357, 63.782515367275906]]], [[[-155.067790290324211, 71.147776394323685], [-154.344165208941206, 70.696408596470192], [-153.900006273392563, 70.889988511835682], [-152.210006069935275, 70.829992173944831], [-152.270002407826127, 70.60000621202984], [-150.739992438744508, 70.430016588005699], [-149.720003018167489, 70.530010484490433], [-147.613361579357047, 70.214034939241785], [-145.689989800225248, 70.120009670686741], [-144.920010959076393, 69.989991767040479], [-143.58944618042517, 70.152514146598307], [-142.072510348713365, 69.851938178172631], [-140.985987521560702, 69.711998399526365], [-140.985988329004869, 69.711998399526365], [-140.992498752029377, 66.000028591568665], [-140.997769748123119, 60.306396796298593], [-140.012997816153074, 60.276837877027575], [-139.03900042031583, 60.000007229240012], [-138.340889999999888, 59.562110000000146], [-137.4525, 58.905000000000101], [-136.47972, 59.46389], [-135.47583, 59.78778], [-134.945, 59.270560000000117], [-134.27111, 58.86111], [-133.355548882207188, 58.410285142645151], [-132.73042, 57.692890000000105], [-131.707809999999853, 56.55212], [-130.00778, 55.91583], [-129.979994263358265, 55.284997870497207], [-130.536110189467223, 54.802753404349389], [-131.08581823797212, 55.178906155002025], [-131.967211467142278, 55.497775580459049], [-132.250010742859445, 56.369996242897443], [-133.539181084356386, 57.178887437562125], [-134.07806292029602, 58.123067531966889], [-135.038211032279037, 58.187714748763931], [-136.628062309954629, 58.212209377670447], [-137.800006279686016, 58.499995429103777], [-139.867787041412981, 59.537761542389134], [-140.825273817133024, 59.72751740176507], [-142.574443535564427, 60.084446519604981], [-143.958880994879848, 59.99918040632339], [-145.925556816827822, 60.458609727614274], [-147.114373949146625, 60.884656073644628], [-148.224306200127643, 60.672989406977152], [-148.018065558850736, 59.978328965893631], [-148.570822516860858, 59.914172675203297], [-149.727857835875824, 59.705658270905545], [-150.608243374616421, 59.368211168039487], [-151.716392788683294, 59.155821031319974], [-151.859433153267105, 59.74498403587959], [-151.40971900124714, 60.725802720779392], [-150.346941494732505, 61.033587551509854], [-150.621110806256951, 61.284424953854447], [-151.895839199816834, 60.727197984451273], [-152.578329841095581, 60.061657212964285], [-154.019172126257558, 59.350279446034264], [-153.287511359653166, 58.864727688219787], [-154.232492438758442, 58.146373602930531], [-155.307491421510207, 57.727794501366319], [-156.308334723923082, 57.422774359763636], [-156.556097378546298, 56.979984849670636], [-158.117216559867728, 56.463608099994175], [-158.433321296197136, 55.994153550838533], [-159.603327399717415, 55.566686102920116], [-160.289719611634183, 55.643580634170561], [-161.223047655257773, 55.364734605523481], [-162.23776607974105, 55.024186916720097], [-163.069446581046378, 54.689737046927171], [-164.785569221027174, 54.40417308208216], [-164.942226325520011, 54.572224839895327], [-163.84833960676562, 55.039431464246107], [-162.870001390615897, 55.348043117893198], [-161.804174974596009, 55.894986477270429], [-160.563604702781134, 56.008054511125025], [-160.070559862284483, 56.418055324928744], [-158.684442918919416, 57.016675116597852], [-158.461097378553944, 57.216921291728866], [-157.722770352183858, 57.570000515363056], [-157.550274421193564, 58.328326321030218], [-157.041674974576949, 58.918884589261708], [-158.194731208305427, 58.615802313869828], [-158.517217984023034, 58.787781480537305], [-159.058606126928709, 58.424186102931671], [-159.711667040017318, 58.931390285876333], [-159.981288825500144, 58.572549140041623], [-160.355271165996498, 59.071123358793628], [-161.355003425115001, 58.670837714260742], [-161.968893602526293, 58.671664537177371], [-162.054986538724648, 59.266925360747436], [-161.874170702135331, 59.633621324290587], [-162.518059048492034, 59.989723619213905], [-163.818341437820123, 59.798055731843377], [-164.662217577146407, 60.267484442782639], [-165.346387702474772, 60.507495632562396], [-165.350831875651835, 61.073895168697497], [-166.121379157555907, 61.500019029376212], [-165.734451870770471, 62.074996853271792], [-164.919178636717788, 62.633076483807919], [-164.562507901039339, 63.146378485763044], [-163.753332485996964, 63.219448961023758], [-163.067224494457832, 63.05945872664801], [-162.260555386381697, 63.541935736741159], [-161.534449836248569, 63.455816962326757], [-160.772506680321101, 63.76610810002326], [-160.958335130842528, 64.222798570402759], [-161.518068407212184, 64.402787584075313], [-160.777777676414729, 64.788603827566405], [-161.391926235987597, 64.777235012462327], [-162.453050096668818, 64.559444688568206], [-162.757786017894034, 64.338605455168803], [-163.54639421288428, 64.559160468190484], [-164.960829841145141, 64.446945095468848], [-166.425288255864473, 64.686672064870706], [-166.845004238939026, 65.088895575614529], [-168.110560065767146, 65.669997056736733], [-166.70527116602193, 66.088317776139391], [-164.474709642575448, 66.576660061297488], [-163.652511766595637, 66.576660061297488], [-163.788601651036117, 66.077207343196662], [-161.677774421210131, 66.116119696712403], [-162.489714525379981, 66.735565090595102], [-163.719716966791083, 67.116394558370089], [-164.430991380856511, 67.616338202577779], [-165.390286831706703, 68.042772121850234], [-166.764440680995989, 68.35887685817967], [-166.204707404626561, 68.883030910916162], [-164.430810513343431, 68.915535386827727], [-163.168613654614489, 69.371114813912882], [-162.930566169261965, 69.858061835399255], [-161.908897264635499, 70.333329983187625], [-160.93479651593367, 70.447689927849567], [-159.039175788387126, 70.891642157668926], [-158.119722866833939, 70.824721177851032], [-156.580824551398024, 71.357763576941736], [-155.067790290324211, 71.147776394323685]]]] } }, - { "type": "Feature", "properties": { "admin": "Uzbekistan", "name": "Uzbekistan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[66.518606805288655, 37.362784328758785], [66.546150343700205, 37.974684963526855], [65.215998976507379, 38.402695013984292], [64.170223016216752, 38.892406724598231], [63.518014764261018, 39.363256537425627], [62.374260288344992, 40.053886216790382], [61.882714064384679, 41.084856879229392], [61.547178989513547, 41.2663703476546], [60.46595299667068, 41.22032664648254], [60.083340691981654, 41.425146185871391], [59.976422153569771, 42.223081976890199], [58.629010857991453, 42.751551011723045], [57.786529982337065, 42.170552883465511], [56.93221520368779, 41.82602610937559], [57.096391229079089, 41.32231008561056], [55.968191359282898, 41.308641669269356], [55.928917270741081, 44.995858466159099], [58.503127068928457, 45.586804307632818], [58.689989048095882, 45.500013739598621], [60.239971958258316, 44.784036770194717], [61.05831994003244, 44.405816962250505], [62.013300408786236, 43.504476630215642], [63.185786981056559, 43.650074978197999], [64.900824415959264, 43.728080552742576], [66.098012322865074, 42.997660020513088], [66.023391554635609, 41.994646307943974], [66.510648634715707, 41.987644151368436], [66.714047072216502, 41.168443508461493], [67.985855747351806, 41.135990708982213], [68.259895867795606, 40.662324530594894], [68.632482944620008, 40.668680731766798], [69.070027296835306, 41.384244289712363], [70.388964878220776, 42.081307684897439], [70.96231489449913, 42.266154283205481], [71.259247674448218, 42.167710679689456], [70.420022414028196, 41.519998277343134], [71.157858514291576, 41.143587144529107], [71.870114780570447, 41.392900092121259], [73.055417108049156, 40.86603302668945], [71.774875115856545, 40.145844428053763], [71.014198032520156, 40.244365546218226], [70.601406691372674, 40.218527330072284], [70.458159621059608, 40.49649485937028], [70.666622348925031, 40.960213324541407], [69.329494663372813, 40.727824408524839], [69.011632928345477, 40.086158148756653], [68.536416456989414, 39.533452867178923], [67.701428664017342, 39.580478420564518], [67.442219679641298, 39.140143541005479], [68.176025018185911, 38.901553453113898], [68.392032505165943, 38.157025254868728], [67.829999627559502, 37.144994004864678], [67.075782098259609, 37.35614390720928], [66.518606805288655, 37.362784328758785]]] } }, - { "type": "Feature", "properties": { "admin": "Venezuela", "name": "Venezuela", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-71.331583624950284, 11.776284084515805], [-71.36000566271079, 11.53999359786121], [-71.947049933546495, 11.423282375530018], [-71.620868292920164, 10.969459947142791], [-71.633063930941063, 10.446494452349027], [-72.074173956984495, 9.865651353388369], [-71.695644090446521, 9.072263088411246], [-71.26455929226772, 9.137194525585981], [-71.039999355743376, 9.859992784052407], [-71.350083787710773, 10.211935126176213], [-71.400623338492224, 10.968969021036013], [-70.155298834906503, 11.375481675660039], [-70.293843349881016, 11.846822414594211], [-69.943244594996813, 12.162307033736095], [-69.584300096297454, 11.459610907431211], [-68.882999233664435, 11.44338450769156], [-68.233271450458716, 10.885744126829945], [-68.194126552997616, 10.554653225135921], [-67.296248541926317, 10.545868231646306], [-66.227864142507983, 10.648626817258684], [-65.655237596281737, 10.20079885501732], [-64.890452236578156, 10.077214667191296], [-64.329478725833724, 10.389598700395679], [-64.318006557864933, 10.641417954953978], [-63.079322475828725, 10.701724351438598], [-61.880946010980182, 10.7156253117251], [-62.730118984616396, 10.420268662960904], [-62.388511928950969, 9.948204453974636], [-61.588767462801918, 9.873066921422263], [-60.830596686431711, 9.38133982994894], [-60.671252407459718, 8.580174261911877], [-60.150095587796166, 8.602756862823425], [-59.758284878159181, 8.367034816924045], [-60.550587938058186, 7.779602972846178], [-60.637972785063752, 7.414999904810853], [-60.295668097562377, 7.043911444522918], [-60.543999192940966, 6.856584377464881], [-61.159336310456467, 6.696077378766317], [-61.139415045807937, 6.234296779806142], [-61.410302903881941, 5.959068101419616], [-60.733574184803707, 5.2002772078619], [-60.601179165271922, 4.918098049332129], [-60.966893276601517, 4.536467596856638], [-62.085429653559125, 4.162123521334308], [-62.804533047116692, 4.006965033377951], [-63.093197597899092, 3.770571193858784], [-63.888342861574145, 4.020530096854571], [-64.628659430587533, 4.14848094320925], [-64.816064012294007, 4.056445217297422], [-64.368494432214092, 3.797210394705246], [-64.408827887617903, 3.126786200366623], [-64.269999152265783, 2.497005520025566], [-63.422867397705105, 2.411067613124174], [-63.368788011311644, 2.200899562993129], [-64.083085496666072, 1.91636912679408], [-64.199305792890499, 1.49285492594602], [-64.611011928959854, 1.328730576987041], [-65.354713304288353, 1.0952822941085], [-65.548267381437554, 0.78925446207603], [-66.325765143484944, 0.724452215982012], [-66.876325853122566, 1.253360500489336], [-67.181294318293041, 2.250638129074062], [-67.447092047786299, 2.600280869960869], [-67.809938117123693, 2.820655015469569], [-67.303173183853417, 3.31845408773718], [-67.33756384954367, 3.542342230641721], [-67.621835903581271, 3.839481716319994], [-67.823012254493534, 4.503937282728898], [-67.744696621355203, 5.221128648291667], [-67.521531948502741, 5.556870428891968], [-67.34143958196556, 6.095468044454021], [-67.695087246355001, 6.267318020040645], [-68.265052456318216, 6.153268133972473], [-68.985318569602327, 6.206804917826856], [-69.389479946557103, 6.099860541198835], [-70.093312954372408, 6.960376491723109], [-70.674233567981503, 7.087784735538717], [-71.960175747348629, 6.991614895043538], [-72.19835242378187, 7.340430813013682], [-72.444487270788059, 7.42378489830048], [-72.479678921178831, 7.632506008327352], [-72.360900641555958, 8.002638454617893], [-72.439862230097944, 8.405275376820027], [-72.660494757768092, 8.62528778730268], [-72.788729824500379, 9.085027167187331], [-73.304951544880026, 9.151999823437604], [-73.027604132769554, 9.736770331252441], [-72.905286017534692, 10.45034434655477], [-72.614657762325194, 10.821975409381777], [-72.227575446242923, 11.108702093953237], [-71.973921678338272, 11.608671576377116], [-71.331583624950284, 11.776284084515805]]] } }, - { "type": "Feature", "properties": { "admin": "Vietnam", "name": "Vietnam", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[108.050180291782908, 21.552379869060111], [106.715067987090066, 20.696850694252014], [105.881682163519002, 19.752050482659694], [105.662005649846279, 19.058165188060567], [106.426816847765991, 18.004120998603224], [107.36195356651973, 16.697456569887049], [108.269495070429599, 16.079742336486145], [108.877106561317447, 15.276690578670436], [109.335269810017209, 13.42602834721772], [109.200135939573954, 11.666859239137761], [108.366129998815424, 11.00832062422627], [107.22092858279521, 10.36448395430183], [106.4051127462034, 9.530839748569317], [105.158263787865081, 8.599759629750492], [104.795185174582372, 9.2410383162765], [105.076201613385592, 9.918490505406806], [104.334334751403446, 10.486543687375228], [105.199914992292321, 10.889309800658094], [106.249670037869436, 10.961811835163585], [105.810523716253101, 11.567614650921225], [107.491403029410861, 12.337205918827944], [107.614547967562402, 13.535530707244202], [107.382727492301058, 14.202440904186968], [107.564525181103875, 15.202173163305554], [107.312705926545576, 15.908538316303177], [106.55600792849566, 16.604283962464802], [105.925762160264, 17.485315456608955], [105.094598423281496, 18.666974595611073], [103.896532017026701, 19.265180975821799], [104.183387892678908, 19.624668077060214], [104.822573683697073, 19.886641750563879], [104.435000441508024, 20.758733221921528], [103.203861118586431, 20.766562201413745], [102.754896274834636, 21.675137233969462], [102.170435825613552, 22.464753119389297], [102.706992222100084, 22.708795070887668], [103.504514601660546, 22.703756618739202], [104.476858351664447, 22.819150092046961], [105.329209425886603, 23.352063300056908], [105.811247186305209, 22.976892401617899], [106.725403273548451, 22.794267889898414], [106.567273390735295, 22.218204860924768], [107.043420037872608, 21.811898912029907], [108.050180291782908, 21.552379869060111]]] } }, - { "type": "Feature", "properties": { "admin": "Vanuatu", "name": "Vanuatu", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[167.844876743845077, -16.466333103097153], [167.515181105822847, -16.597849623279966], [167.180007765977791, -16.159995212470957], [167.2168013857696, -15.891846205308449], [167.844876743845077, -16.466333103097153]]], [[[167.107712437201485, -14.933920179913951], [167.2700281110302, -15.74002084723487], [167.001207310247935, -15.614602146062492], [166.79315799384085, -15.668810723536719], [166.649859247095549, -15.392703545801192], [166.629136997746429, -14.6264970842096], [167.107712437201485, -14.933920179913951]]]] } }, - { "type": "Feature", "properties": { "admin": "Yemen", "name": "Yemen", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[53.108572625547502, 16.651051133688949], [52.385205926325874, 16.38241120041965], [52.191729363825075, 15.938433132384018], [52.168164910699986, 15.597420355689945], [51.172515089732471, 15.175249742081489], [49.574576450403136, 14.708766587782746], [48.679230584514151, 14.003202419485657], [48.238947381387412, 13.948089504446369], [47.938914015500771, 14.007233181204423], [47.354453566279702, 13.592219753468379], [46.71707645039173, 13.399699204965016], [45.877592807810252, 13.347764390511681], [45.625050083199874, 13.290946153206759], [45.406458774605241, 13.02690542241143], [45.144355910020849, 12.953938300015306], [44.9895333188744, 12.699586900274708], [44.494576450382844, 12.721652736863344], [44.175112745954486, 12.585950425664873], [43.48295861183712, 12.63680003504008], [43.222871128112118, 13.220950425667422], [43.251448195169516, 13.767583726450848], [43.087943963398047, 14.062630316621306], [42.892245314308717, 14.802249253798745], [42.604872674333606, 15.213335272680592], [42.805015496600042, 15.261962795467252], [42.702437778500652, 15.718885809791995], [42.823670688657408, 15.911742255105263], [42.779332309750963, 16.34789134364868], [43.218375278502734, 16.666889960186406], [43.115797560403351, 17.088440456607369], [43.380794305196098, 17.579986680567668], [43.791518589051904, 17.319976711491105], [44.062613152855072, 17.410358791569589], [45.216651238797184, 17.43332896572333], [45.399999220568752, 17.333335069238554], [46.366658563020529, 17.233315334537632], [46.749994337761642, 17.283338120996174], [47.000004917189749, 16.949999294497438], [47.466694777217626, 17.116681626854877], [48.183343540241324, 18.166669216377311], [49.116671583864857, 18.616667588774941], [52.000009800022227, 19.000003363516054], [52.782184279192037, 17.349742336491229], [53.108572625547502, 16.651051133688949]]] } }, - { "type": "Feature", "properties": { "admin": "South Africa", "name": "South Africa", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[31.521001417778869, -29.257386976846245], [31.325561150850994, -29.401977634398907], [30.901762729625336, -29.909956963828034], [30.622813348113816, -30.423775730106122], [30.055716180142774, -31.140269463832951], [28.925552605919535, -32.172041110972494], [28.219755893677092, -32.771952813448848], [27.464608188595967, -33.226963799778794], [26.419452345492818, -33.614950453426175], [25.909664340933482, -33.667040297176392], [25.78062828950069, -33.944646091448334], [25.172861769315965, -33.796851495093577], [24.67785322439212, -33.987175795224537], [23.594043409934635, -33.794474379208147], [22.988188917744729, -33.916430759416976], [22.574157342222232, -33.864082533505304], [21.542799106541022, -34.258838799782922], [20.689052768646999, -34.417175388325226], [20.071261020597628, -34.795136814107984], [19.616405063564567, -34.819166355123706], [19.193278435958714, -34.462598972309777], [18.855314568769867, -34.444305515278458], [18.424643182049376, -33.997872816708963], [18.377410922934612, -34.13652068454806], [18.244499139079917, -33.867751560198023], [18.250080193767442, -33.281430759414434], [17.925190463948436, -32.61129078545342], [18.247909783611185, -32.429131361624563], [18.221761508871477, -31.661632989225662], [17.566917758868861, -30.72572112398754], [17.0644161312627, -29.878641045859158], [17.06291751472622, -29.875953871379977], [16.344976840895239, -28.576705010697697], [16.824017368240899, -28.082161553664466], [17.218928663815401, -28.355943291946804], [17.387497185951499, -28.783514092729774], [17.836151971109526, -28.856377862261311], [18.464899122804745, -29.045461928017271], [19.002127312911082, -28.972443129188857], [19.89473432788861, -28.461104831660769], [19.895767856534427, -24.767790215760588], [20.165725538827186, -24.917961928000768], [20.758609246511831, -25.868136488551446], [20.666470167735437, -26.477453301704916], [20.889609002371731, -26.828542982695907], [21.60589603036939, -26.726533705351748], [22.105968865657864, -26.28025603607913], [22.579531691180584, -25.979447523708142], [22.824271274514896, -25.500458672794768], [23.312096795350179, -25.268689873965712], [23.733569777122703, -25.39012948985161], [24.211266717228792, -25.670215752873567], [25.025170525825782, -25.719670098576891], [25.664666375437712, -25.486816094669706], [25.765848829865206, -25.174845472923671], [25.941652052522151, -24.696373386333214], [26.485753208123292, -24.616326592713097], [26.78640669119741, -24.240690606383478], [27.119409620886238, -23.574323011979772], [28.017235955525244, -22.827753594659072], [29.432188348109033, -22.091312758067584], [29.839036899542965, -22.102216485281172], [30.322883335091767, -22.271611830333931], [30.659865350067083, -22.151567478119912], [31.191409132621278, -22.251509698172395], [31.670397983534645, -23.658969008073861], [31.930588820124242, -24.369416599222532], [31.752408481581874, -25.484283949487406], [31.837777947728057, -25.843331801051342], [31.333157586397899, -25.660190525008943], [31.044079624157146, -25.731452325139436], [30.949666782359905, -26.022649021104144], [30.676608514129633, -26.398078301704604], [30.685961948374477, -26.743845310169526], [31.282773064913325, -27.285879408478991], [31.868060337051073, -27.17792734142127], [32.071665480281062, -26.733820082304902], [32.830120477028878, -26.74219166433619], [32.580264926897677, -27.470157566031808], [32.462132602678444, -28.30101124442055], [32.203388706193032, -28.752404880490065], [31.521001417778869, -29.257386976846245]], [[28.978262566857236, -28.955596612261708], [28.541700066855491, -28.647501722937562], [28.07433841320778, -28.851468601193581], [27.532511020627471, -29.242710870075353], [26.999261915807629, -29.875953871379977], [27.749397006956478, -30.645105889612214], [28.107204624145421, -30.545732110314944], [28.291069370239903, -30.226216729454293], [28.848399692507734, -30.070050551068245], [29.018415154748016, -29.743765557577362], [29.325166456832587, -29.257386976846245], [28.978262566857236, -28.955596612261708]]] } }, - { "type": "Feature", "properties": { "admin": "Zambia", "name": "Zambia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[32.759375441221316, -9.230599053589058], [33.231387973775291, -9.676721693564799], [33.485687697083584, -10.525558770391111], [33.315310499817279, -10.796549981329695], [33.114289178201908, -11.607198174692311], [33.306422153463068, -12.435778090060214], [32.991764357237876, -12.783870537978272], [32.688165317523122, -13.712857761289273], [33.214024692525207, -13.97186003993615], [30.179481235481827, -14.796099134991525], [30.274255812305103, -15.507786960515208], [29.51683434420314, -15.644677829656386], [28.947463413211256, -16.043051446194436], [28.825868768028492, -16.389748630440611], [28.467906121542676, -16.468400160388843], [27.598243442502753, -17.290830580314005], [27.044427117630729, -17.938026218337427], [26.706773309035633, -17.961228936436477], [26.381935255648919, -17.846042168857892], [25.264225701608005, -17.736539808831413], [25.084443393664564, -17.661815687737366], [25.076950310982255, -17.578823337476617], [24.6823490740015, -17.35341073981947], [24.033861525170771, -17.29584319424632], [23.215048455506057, -17.52311614346598], [22.562478468524255, -16.89845142992181], [21.887842644953867, -16.080310153876876], [21.933886346125913, -12.898437188369357], [24.016136508894672, -12.91104623784857], [23.930922072045373, -12.565847670138854], [24.079905226342838, -12.191296888887361], [23.904153680118181, -11.722281589406318], [24.017893507592586, -11.237298272347088], [23.912215203555714, -10.926826267137512], [24.257155389103982, -10.951992689663655], [24.314516228947948, -11.262826429899269], [24.783169793402948, -11.238693536018962], [25.418118116973197, -11.330935967659958], [25.752309604604726, -11.784965101776356], [26.55308759939961, -11.924439792532125], [27.164419793412456, -11.608748467661071], [27.38879886242378, -12.132747491100663], [28.15510867687998, -12.272480564017894], [28.52356163912102, -12.698604424696679], [28.934285922976834, -13.248958428605132], [29.699613885219485, -13.257226657771827], [29.616001417771223, -12.178894545137307], [29.341547885869087, -12.36074391037241], [28.642417433392346, -11.971568698782312], [28.372253045370421, -11.793646742401389], [28.496069777141763, -10.789883721564044], [28.673681674928922, -9.605924981324931], [28.449871046672818, -9.164918308146083], [28.734866570762495, -8.526559340044576], [29.002912225060467, -8.40703175215347], [30.34608605319081, -8.238256524288216], [30.740015496551781, -8.340007419470913], [31.157751336950042, -8.594578747317362], [31.55634809746649, -8.76204884199864], [32.191864861791963, -8.930358981973276], [32.759375441221316, -9.230599053589058]]] } }, - { "type": "Feature", "properties": { "admin": "Zimbabwe", "name": "Zimbabwe", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[31.191409132621278, -22.251509698172395], [30.659865350067083, -22.151567478119912], [30.322883335091767, -22.271611830333931], [29.839036899542965, -22.102216485281172], [29.432188348109033, -22.091312758067584], [28.794656202924209, -21.639454034107445], [28.02137007010861, -21.485975030200578], [27.727227817503252, -20.851801853114711], [27.724747348753247, -20.499058526290387], [27.296504754350501, -20.391519870690995], [26.164790887158478, -19.293085625894935], [25.850391473094724, -18.714412937090533], [25.649163445750155, -18.536025892818987], [25.264225701608005, -17.736539808831413], [26.381935255648919, -17.846042168857892], [26.706773309035633, -17.961228936436477], [27.044427117630729, -17.938026218337427], [27.598243442502753, -17.290830580314005], [28.467906121542676, -16.468400160388843], [28.825868768028492, -16.389748630440611], [28.947463413211256, -16.043051446194436], [29.51683434420314, -15.644677829656386], [30.274255812305103, -15.507786960515208], [30.338954705534537, -15.880839125230242], [31.173063999157673, -15.860943698797868], [31.636498243951188, -16.071990248277881], [31.852040643040592, -16.319417006091374], [32.328238966610222, -16.392074069893749], [32.847638787575839, -16.713398125884613], [32.849860874164385, -17.979057305577175], [32.654885695127142, -18.672089939043492], [32.611994256324884, -19.419382826416268], [32.772707960752619, -19.715592136313294], [32.659743279762573, -20.30429005298231], [32.508693068173436, -20.395292250248303], [32.244988234188007, -21.116488539313689], [31.191409132621278, -22.251509698172395]]] } } - ] - }; - -var randomcountriesData1 = [ - { country: "Iran", "continent": "Asia", "CategoryName": "Books", "Sales": 550 }, - { country: "Benin", "continent": "Africa", "CategoryName": "Books", "Sales": 1000 }, - { country: "China", "continent": "Asia", "CategoryName": "Books", "Sales": 420 }, - { country: "Chile", "continent": "South America", "CategoryName": "Books", "Sales": 1100 }, - { country: "Cuba", "continent": "North America", "CategoryName": "Books", "Sales": 450 }, - { country: "Spain", "continent": "Europe", "CategoryName": "Books", "Sales": 1200 }, - { country: "Fiji", "continent": "Oceania", "CategoryName": "Books", "Sales": 618.0 }, -]; - -module mapcomponenet { - $(function () { - var mapsample = new ej.datavisualization.Map($("#map"), { - enableAnimation: true, - navigationControl: { - enableNavigation: true, - orientation: 'vertical', - absolutePosition: { x: 5, y: 15 }, - dockPosition: 'none' - }, - layers: [ - { - layerType: 'geometry', - enableMouseHover: false, - enableSelection: false, - shapeSettings: { - fill: "#626171", - autoFill: false, - highlightStroke: "white", - stroke: "white", - strokeThickness: 0.5, - highlightColor: "#BFBFBF" - }, - shapeData: world_map, - legendSettings: { dockOnMap: false } - } - ] - }); - }); -} - - - - - - -module MenuComponent { - $(function () { - var sample = new ej.Menu($("#syncfusionProducts"),{ - width: "100%", - animationType: ej.AnimationType.Default, - cssClass: 'gradient-lime ', - enableAnimation: true, - enableSeparator: true, - height: 40, - htmlAttributes: { "aria-label": "menu" }, - menuType: "normalmenu", - orientation: ej.Orientation.Horizontal, - showRootLevelArrows: true, - showSubLevelArrows: true, - subMenuDirection: ej.Direction.Right, - titleText: "Menu", - }); - }); -} - - - -module NavigationDrawerComponent { - $(function () { - var navigationdrawerInstance = new ej.NavigationDrawer($("#navpane"), { - targetId: "butdrawer", - contentId: "content_container", - type: "overlay", - direction: "left", - enableListView: true, - listViewSettings: { - width: 300, - selectedItemIndex: 0 - }, - position: "normal" - }); - $("#navpane_listview").click(function(e: any) { - var text=e.target["text"]||$(e.target).closest("li.e-list").text(); - $("#butdrawer").parent().children("h2").text(text); - }); - }); -} - - - -module PDFViewerComponent { - $(function () { - var pdfviewerControl = new ej.PdfViewer($("#pdfviewer"), { - serviceUrl:(window).baseurl+ "api/PdfViewer", - isResponsive: true - }); - }); -} - - - -module PivotChartOlap { - $(function () { - var sample = new ej.PivotChart($("#PivotChart"),{ - dataSource: { - data: "//bi.syncfusion.com/olap/msmdpump.dll", - catalog: "Adventure Works DW 2008 SE", - cube: "Adventure Works", - rows: [ - { - fieldName: "[Date].[Fiscal]" - } - ], - columns: [ - { - fieldName: "[Customer].[Customer Geography]" - } - ], - values: [ - { - measures: [ - { - fieldName: "[Measures].[Internet Sales Amount]" - } - ], - axis: "columns" - } - ], - filters:[] - }, - isResponsive: true,zooming:{enableScrollbar: true}, - commonSeriesOptions: { - type: "column" - }, - size: { height: "460px", width: "100%" }, - primaryXAxis: { title: { text: "Date - Fiscal" }, labelRotation: 0 }, - primaryYAxis: { title: { text: "Internet Sales Amount" } }, - legend: { visible: true, rowCount: 2 }, - load: function () { - var PivotChart = (window).themeStyle + (window).themeColor + (window).themeVarient; - PivotChart = PivotChart.toString(); - if (PivotChart.indexOf("dark") > -1 || PivotChart.indexOf("contrast") > -1) - PivotChart = "flatdark"; - else - PivotChart = "flatlight"; - this.model.theme = PivotChart; - }, - }); - }); -} - - - -var pivot_dataset = [ - { Amount: 100, Country: "Canada", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Alberta" }, - { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Van", Quantity: 3, State: "British Columbia" }, - { Amount: 300, Country: "Canada", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Brunswick" }, - { Amount: 150, Country: "Canada", Date: "FY 2008", Product: "Bike", Quantity: 3, State: "Manitoba" }, - { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Car", Quantity: 4, State: "Ontario" }, - { Amount: 100, Country: "Canada", Date: "FY 2007", Product: "Van", Quantity: 1, State: "Quebec" }, - { Amount: 200, Country: "France", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Charente-Maritime" }, - { Amount: 250, Country: "France", Date: "FY 2006", Product: "Van", Quantity: 4, State: "Essonne" }, - { Amount: 300, Country: "France", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Garonne (Haute)" }, - { Amount: 150, Country: "France", Date: "FY 2008", Product: "Van", Quantity: 2, State: "Gers" }, - { Amount: 200, Country: "Germany", Date: "FY 2006", Product: "Van", Quantity: 3, State: "Bayern" }, - { Amount: 250, Country: "Germany", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Brandenburg" }, - { Amount: 150, Country: "Germany", Date: "FY 2008", Product: "Car", Quantity: 4, State: "Hamburg" }, - { Amount: 200, Country: "Germany", Date: "FY 2008", Product: "Bike", Quantity: 4, State: "Hessen" }, - { Amount: 150, Country: "Germany", Date: "FY 2007", Product: "Van", Quantity: 3, State: "Nordrhein-Westfalen" }, - { Amount: 100, Country: "Germany", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Saarland" }, - { Amount: 150, Country: "United Kingdom", Date: "FY 2008", Product: "Bike", Quantity: 5, State: "England" }, - { Amount: 250, Country: "United States", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Alabama" }, - { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Van", Quantity: 4, State: "California" }, - { Amount: 100, Country: "United States", Date: "FY 2006", Product: "Bike", Quantity: 2, State: "Colorado" }, - { Amount: 150, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "New Mexico" }, - { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Bike", Quantity: 4, State: "New York" }, - { Amount: 250, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "North Carolina" }, - { Amount: 300, Country: "United States", Date: "FY 2007", Product: "Van", Quantity: 4, State: "South Carolina" } -] - -module PivotChartRelational { - - $(function () { - var sample = new ej.PivotChart($("#PivotChart"),{ - dataSource: { - data: pivot_dataset, - rows: [ - { - fieldName: "Country", - fieldCaption: "Country" - }, - { - fieldName: "State", - fieldCaption: "State" - }, - { - fieldName: "Date", - fieldCaption: "Date" - } - ], - columns: [ - { - fieldName: "Product", - fieldCaption: "Product" - } - ], - values: [ - { - fieldName: "Amount", - fieldCaption: "Amount" - } - ], - filters:[] - }, - isResponsive: true,zooming:{enableScrollbar: true}, - commonSeriesOptions: { - type: "column" - }, - size: { height: "460px", width: "100%" }, - primaryYAxis: { title: { text: "Amount" } }, - legend: { visible: true }, - load: function () { - var PivotChart = (window).themeStyle + (window).themeColor + (window).themeVarient; - PivotChart = PivotChart.toString(); - if (PivotChart.indexOf("dark") > -1 || PivotChart.indexOf("contrast") > -1) - PivotChart = "flatdark"; - else - PivotChart = "flatlight"; - this.model.theme = PivotChart; - }, - }); - }); -} - - - -module PivotGaugeOlap { - - $(function () { - var sample = new ej.PivotGauge($("#PivotGauge"),{ - dataSource: { - data: "//bi.syncfusion.com/olap/msmdpump.dll", - catalog: "Adventure Works DW 2008 SE", - cube: "Adventure Works", - rows: [ - { - fieldName: "[Date].[Fiscal]", - filterItems: { filterType: "include", values: ["[Date].[Fiscal].[Fiscal Year].&[2004]"] } - }, - ], - columns: [ - { - fieldName: "[Customer].[Customer Geography]" - } - ], - values: [ - { - measures: [ - { - fieldName: "[Measures].[Internet Sales Amount]" - }, - { - fieldName: "[Measures].[Internet Revenue Status]" - }, - { - fieldName: "[Measures].[Internet Revenue Trend]" - }, - { - fieldName: "[Measures].[Internet Revenue Goal]" - }, - ], - axis: "columns" - } - ], - filters:[] - }, - enableTooltip: true, isResponsive: true, - labelFormatSettings: { decimalPlaces: 2 }, - scales: [{ - showRanges: true, - radius: 150, showScaleBar: true, size: 1, - border: { - width: 0.5 - }, - showIndicators: true, showLabels: true, - pointers: [{ - showBackNeedle: true, - backNeedleLength: 20, - length: 120, - width: 7 - }, - { - type: "marker", - markerType: "diamond", - distanceFromScale: 5, - placement: "center", - backgroundColor: "#29A4D9", - length: 25, - width: 15 - }], - ticks: [{ - type: "major", - distanceFromScale: 2, - height: 16, - width: 1, color: "#8c8c8c" - }, - { - type: "minor", - height: 6, - width: 1, - distanceFromScale: 2, - color: "#8c8c8c" - }], - labels: [{ - color: "#8c8c8c" - }], - ranges: [{ - distanceFromScale: -5, - backgroundColor: "#fc0606", - border: { color: "#fc0606" } - }, - { - distanceFromScale: -5 - }], - customLabels: [{ - position: { x: 180, y: 290 }, - font: { size: "10px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" - }, - { - position: { x: 180, y: 320 }, - font: { size: "10px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" - }, - { - position: { x: 180, y: 150 }, - font: { size: "12px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" - }] - }] - }); - }); -} - - - -var pivot_dataset = [ - { Amount: 100, Country: "Canada", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Alberta" }, - { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Van", Quantity: 3, State: "British Columbia" }, - { Amount: 300, Country: "Canada", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Brunswick" }, - { Amount: 150, Country: "Canada", Date: "FY 2008", Product: "Bike", Quantity: 3, State: "Manitoba" }, - { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Car", Quantity: 4, State: "Ontario" }, - { Amount: 100, Country: "Canada", Date: "FY 2007", Product: "Van", Quantity: 1, State: "Quebec" }, - { Amount: 200, Country: "France", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Charente-Maritime" }, - { Amount: 250, Country: "France", Date: "FY 2006", Product: "Van", Quantity: 4, State: "Essonne" }, - { Amount: 300, Country: "France", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Garonne (Haute)" }, - { Amount: 150, Country: "France", Date: "FY 2008", Product: "Van", Quantity: 2, State: "Gers" }, - { Amount: 200, Country: "Germany", Date: "FY 2006", Product: "Van", Quantity: 3, State: "Bayern" }, - { Amount: 250, Country: "Germany", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Brandenburg" }, - { Amount: 150, Country: "Germany", Date: "FY 2008", Product: "Car", Quantity: 4, State: "Hamburg" }, - { Amount: 200, Country: "Germany", Date: "FY 2008", Product: "Bike", Quantity: 4, State: "Hessen" }, - { Amount: 150, Country: "Germany", Date: "FY 2007", Product: "Van", Quantity: 3, State: "Nordrhein-Westfalen" }, - { Amount: 100, Country: "Germany", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Saarland" }, - { Amount: 150, Country: "United Kingdom", Date: "FY 2008", Product: "Bike", Quantity: 5, State: "England" }, - { Amount: 250, Country: "United States", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Alabama" }, - { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Van", Quantity: 4, State: "California" }, - { Amount: 100, Country: "United States", Date: "FY 2006", Product: "Bike", Quantity: 2, State: "Colorado" }, - { Amount: 150, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "New Mexico" }, - { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Bike", Quantity: 4, State: "New York" }, - { Amount: 250, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "North Carolina" }, - { Amount: 300, Country: "United States", Date: "FY 2007", Product: "Van", Quantity: 4, State: "South Carolina" } -] - -module PivotGaugeRelational { - $(function () { - var sample = new ej.PivotGauge($("#PivotGauge"),{ - dataSource: { - data: pivot_dataset, - rows: [ - { - fieldName: "Country", - }, - { - fieldName: "State", - } - ], - columns: [ - { - fieldName: "Product", - } - ], - values: [ - { - fieldName: "Amount", - }, - { - fieldName: "Quantity", - } - ] - }, - enableTooltip: true, isResponsive: true, - labelFormatSettings: { decimalPlaces: 2 }, - scales: [{ - showRanges: true, - radius: 150, showScaleBar: true, size: 1, - border: { - width: 0.5 - }, - showIndicators: true, showLabels: true, - pointers: [{ - showBackNeedle: true, - backNeedleLength: 20, - length: 120, - width: 7 - }, - { - type: "marker", - markerType: "diamond", - distanceFromScale: 5, - placement: "center", - backgroundColor: "#29A4D9", - length: 25, - width: 15 - }], - ticks: [{ - type: "major", - distanceFromScale: 2, - height: 16, - width: 1, color: "#8c8c8c" - }, - { - type: "minor", - height: 6, - width: 1, - distanceFromScale: 2, - color: "#8c8c8c" - }], - labels: [{ - color: "#8c8c8c" - }], - ranges: [{ - distanceFromScale: -5, - backgroundColor: "#fc0606", - border: { color: "#fc0606" } - }, - { - distanceFromScale: -5 - }], - customLabels: [{ - position: { x: 180, y: 290 }, - font: { size: "10px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" - }, - { - position: { x: 180, y: 320 }, - font: { size: "10px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" - }, - { - position: { x: 180, y: 150 }, - font: { size: "12px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" - }] - }] - }); - }); -} - - - -module PivotGridOlap { - - $(function () { - var sample = new ej.PivotGrid($("#PivotGrid"),{ - dataSource: { - data: "//bi.syncfusion.com/olap/msmdpump.dll", - catalog: "Adventure Works DW 2008 SE", - cube: "Adventure Works", - rows: [ - { - fieldName: "[Date].[Fiscal]" - } - ], - columns: [ - { - fieldName: "[Customer].[Customer Geography]" - } - ], - values: [ - { - measures: [ - { - fieldName: "[Measures].[Internet Sales Amount]", - } - ], - axis: "columns" - } - ], - filters:[] - }, - enableGroupingBar: true, - pivotTableFieldListID:"PivotSchemaDesigner" - }); - $("#PivotSchemaDesigner").ejPivotSchemaDesigner(); - }); -} - - - -var pivot_dataset = [ - { Amount: 100, Country: "Canada", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Alberta" }, - { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Van", Quantity: 3, State: "British Columbia" }, - { Amount: 300, Country: "Canada", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Brunswick" }, - { Amount: 150, Country: "Canada", Date: "FY 2008", Product: "Bike", Quantity: 3, State: "Manitoba" }, - { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Car", Quantity: 4, State: "Ontario" }, - { Amount: 100, Country: "Canada", Date: "FY 2007", Product: "Van", Quantity: 1, State: "Quebec" }, - { Amount: 200, Country: "France", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Charente-Maritime" }, - { Amount: 250, Country: "France", Date: "FY 2006", Product: "Van", Quantity: 4, State: "Essonne" }, - { Amount: 300, Country: "France", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Garonne (Haute)" }, - { Amount: 150, Country: "France", Date: "FY 2008", Product: "Van", Quantity: 2, State: "Gers" }, - { Amount: 200, Country: "Germany", Date: "FY 2006", Product: "Van", Quantity: 3, State: "Bayern" }, - { Amount: 250, Country: "Germany", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Brandenburg" }, - { Amount: 150, Country: "Germany", Date: "FY 2008", Product: "Car", Quantity: 4, State: "Hamburg" }, - { Amount: 200, Country: "Germany", Date: "FY 2008", Product: "Bike", Quantity: 4, State: "Hessen" }, - { Amount: 150, Country: "Germany", Date: "FY 2007", Product: "Van", Quantity: 3, State: "Nordrhein-Westfalen" }, - { Amount: 100, Country: "Germany", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Saarland" }, - { Amount: 150, Country: "United Kingdom", Date: "FY 2008", Product: "Bike", Quantity: 5, State: "England" }, - { Amount: 250, Country: "United States", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Alabama" }, - { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Van", Quantity: 4, State: "California" }, - { Amount: 100, Country: "United States", Date: "FY 2006", Product: "Bike", Quantity: 2, State: "Colorado" }, - { Amount: 150, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "New Mexico" }, - { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Bike", Quantity: 4, State: "New York" }, - { Amount: 250, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "North Carolina" }, - { Amount: 300, Country: "United States", Date: "FY 2007", Product: "Van", Quantity: 4, State: "South Carolina" } -] - -module PivotGridRelational { - $(function () { - var sample = new ej.PivotGrid($("#PivotGrid"),{ - dataSource: { - data: pivot_dataset, - rows: [ - { - fieldName: "Country", - fieldCaption: "Country" - }, - { - fieldName: "State", - fieldCaption: "State" - } - ], - columns: - [{ - fieldName: "Product", - fieldCaption: "Product" - } - ], - values: [ - { - fieldName: "Amount", - fieldCaption: "Amount" - }, - { - fieldName: "Quantity", - fieldCaption: "Quantity" - } - ], - filters:[] - }, - enableGroupingBar: true, - pivotTableFieldListID:"PivotSchemaDesigner" - }); - $("#PivotSchemaDesigner").ejPivotSchemaDesigner(); - }); -} - - - -module PivotTreeMap { - $(function () { - var sample = new ej.PivotTreeMap($("#PivotTreeMap"),{ - dataSource: { - data: "//bi.syncfusion.com/olap/msmdpump.dll;Locale Identifier=1033;", - catalog: "Adventure Works DW 2008 SE", - cube: "Adventure Works", - rows: [ - { - fieldName: "[Customer].[Customer Geography]" - } - ], - columns: [ - { - fieldName: "[Date].[Fiscal]" - } - ], - values: [ - { - measures: [ - { - fieldName: "[Measures].[Customer Count]", - } - ], - axis: "columns" - } - ], - filters:[] - } - }); - }); -} - - - -module ProgressBarComponent { - $(function () { - var sample = new ej.ProgressBar($("#progressBar"),{ - width: 200, - value: 45, - height: 20, - enablePersistence: true, - maxValue: 200, - minValue: 0, - showRoundedCorner: true, - text: 'loading...' - }); - }); - -} - - - - -declare var rteObj: any; -declare var data: any; -var radialEle = $('#defaultradialmenu'), action = 0, forRedo = 0; -var rteEle = $("#rteSample1"); -module RadialMenuComponent { - $(function () { - - if (!(ej.browserInfo().name == "msie" && parseInt(ej.browserInfo().version) < 9)) { - var radialmenuInstance = new ej.RadialMenu($("#defaultradialmenu"), { - imageClass: "imageclass", - backImageClass: "backimageclass", - targetElementId: "radialtarget1" - }); - $("#radialtarget1").parent().css("position", "relative"); - } - else { - $("#contentDiv").html("Radial Menu is only supported from Internet Explorer Versioned 9 and above.").css({ "font-size": "20px", "color": "red" }); - } - var rteInstance = new ej.RTE($("#rteSample1"), { - width: "100%", - minWidth: "10px", - change: (e) => { radialEle.ejRadialMenu("enableItem", "Undo"); }, - select: (e) => { - var target = $("#radialtarget1"), radialRadius = 150, radialDiameter = 2 * radialRadius, - // To get Iframe positions - iframeY = e.event.clientY, iframeX = e.event.clientX, - // To set Radial Menu position within target - x = iframeX > target.width() - radialRadius ? target.width() - radialDiameter : (iframeX > radialRadius ? iframeX - radialRadius : 0), - y = iframeY > target.height() - radialRadius ? target.height() - radialDiameter : (iframeY > radialRadius ? iframeY - radialRadius : 0); - radialEle.ejRadialMenu("setPosition", x, y); - radialEle.focus(); - $('iframe').contents().find('body').blur(); - }, - showToolbar: false, - showContextMenu: false - }); - $(window).resize(function () { - if (ej.isMobile() && ej.isPortrait()) - $('#defaultradialmenu').css({ "left": 25 }); - }); - }); -} - -function bold(e: any) { - - rteObj = rteEle.data("ejRTE"); - rteObj.executeCommand("bold"); - data = rteObj._getSelectedHtmlString() ? true : false; - if (data) action += 1; - forRedo = action; - radialEle.focus(); -} -function italic(e: any) { - rteObj = rteEle.data("ejRTE"); - rteObj.executeCommand("italic"); - data = rteObj._getSelectedHtmlString() ? true : false; - if (data) action += 1; - forRedo = action; - radialEle.focus(); -} -function undo(e: any) { - rteObj = rteEle.data("ejRTE"); - rteObj.executeCommand("undo"); - action -= 1; - if (action == 0) - radialEle.ejRadialMenu("disableItem", "Undo"); - radialEle.ejRadialMenu("enableItem", "Redo"); - radialEle.focus(); -} -function redo(e: any) { - rteObj = rteEle.data("ejRTE"); - rteObj.executeCommand("redo"); - action += 1; - if (forRedo == action) radialEle.ejRadialMenu("disableItem", "Redo"); - radialEle.ejRadialMenu("enableItem", "Undo"); - radialEle.focus(); -} - - - -module RadialSliderComponent { - $(function () { - var radialsliderInstance = new ej.RadialSlider($("#radialSlider"), { - innerCircleImageUrl: "images/radialslider/chevron-right.png" - }); - }); -} - - -module rangecomponent { - $(function () { - var linearsample = new ej.datavisualization.RangeNavigator($("#RangeNavigator"), { - enableDeferredUpdate: true, - padding: "15", - allowSnapping: true, - selectedRangeSettings: { - start: "2010/5/1", end: "2011/10/1" - }, - isResponsive: true, - tooltipSettings: { - visible: true, labelFormat: "MM/dd/yyyy", backgroundColor: "gray", tooltipDisplayMode: "ondemand" - }, - load: () => { - var rn = $("#RangeNavigator").data("ejRangeNavigator"); - rn.model.series = [ - { - type: 'line', - dataSource: data.Open, xName: "XValue", yName: "YValue", - fill: '#69D2E7' - } - ]; - }, - loaded: function () { - var sender = $("#RangeNavigator").data("ejRangeNavigator"); - var theme = (window).themeStyle + (window).themeColor + (window).themeVarient; - if (theme) { - switch (theme) { - case "flatazurelight": - theme = "azurelight"; - break; - case "flatlimelight": - theme = "limelight"; - break; - case "flatsaffronlight": - theme = "saffronlight"; - break; - case "gradientazurelight": - theme = "gradientazure"; - break; - case "gradientlimelight": - theme = "gradientlime"; - break; - case "gradientsaffronlight": - theme = "gradientsaffron"; - break; - case "flatazuredark": - theme = "azuredark"; - break; - case "flatlimedark": - theme = "limedark"; - break; - case "flatsaffrondark": - theme = "saffrondark"; - break; - case "gradientazuredark": - theme = "gradientazuredark"; - break; - case "gradientlimedark": - theme = "gradientlimedark"; - break; - case "gradientsaffrondark": - theme = "gradientsaffrondark"; - break; - case "flathigh-contrast-01dark": - theme = "highcontrast01"; - break; - case "flathigh-contrast-02dark": - theme = "highcontrast02"; - break; - case "flatmateriallight": - theme = "material"; - break; - case "flatoffice-365light": - theme = "office"; - break; - default: - theme = "flatlight"; - break; - } - sender.model.theme = theme; - } - } - - }); - }); -} -var data; -data = GetData(); - -function GetData() { - var series1:any[]=[]; - var series2:any[]= []; - var value = 100; - var value1 = 120; - for (var i = 1; i < 730; i++) { - - if (Math.random() > .5) { - value += Math.random(); - value1 += Math.random(); - } else { - value -= Math.random(); - value1 -= Math.random(); - } - var point1 = { XValue: new Date(2010, 0, i), YValue: value }; - var point2 = { XValue: new Date(2010, 0, i), YValue: value1 }; - series1.push(point1); - series2.push(point2); - } - - data = { Open: series1, Close: series2 }; - return data; -}; - - - -module RatingComponent { - $(function () { - - var sample1 = new ej.Rating($("#fullRating"),{ - value: 4, - precision: ej.Rating.Precision.Full, - allowReset: true, - cssClass: "gradient-lime", - enabled: true, - enablePersistence: true, - incrementStep: 2, - maxValue: 10, - minValue: 0, - orientation: ej.Orientation.Horizontal, - shapeHeight: 25, - shapeWidth: 25, - showTooltip: true - }); - - var sample2 = new ej.Rating($("#halfRating"),{ - precision: ej.Rating.Precision.Half, - value: 3.5, - allowReset: true, - cssClass: "gradient-lime", - enabled: true, - enablePersistence: true, - incrementStep: 2, - maxValue: 10, - minValue: 0, - orientation: "horizontal", - shapeHeight: 25, - shapeWidth: 25, - showTooltip: true - }); - - var sample3 = new ej.Rating($("#exactRating"),{ - precision: ej.Rating.Precision.Exact, - value: 3.7, - allowReset: true, - cssClass: "gradient-lime", - enabled: true, - enablePersistence: true, - incrementStep: 2, - maxValue: 10, - minValue: 0, - orientation: "horizontal", - shapeHeight: 25, - shapeWidth: 25, - showTooltip: true - }); - }); -} - - - -module ReportViewerComponent { - $(function () { - var report = new ej.ReportViewer($("#DefaultReportViewer"), { - reportServiceUrl: (window).baseurl + 'api/ReportViewer', - processingMode: ej.ReportViewer.ProcessingMode.Remote, - reportPath: "ConditionalFormating.rdl", - isResponsive: true - }); - }); -} - - - -var fontfamily = ["Segoe UI", "Arial", "Times New Roman", "Tahoma", "Helvetica"], fontsize = ["1pt", "2pt", "3pt", "4pt", "5pt"], action1 = ["New", "Clear"], action2 = ["Bold", "Italic", "Underline", "strikethrough", "superscript", "subscript", "JustifyLeft", "JustifyCenter", "JustifyRight", "JustifyFull", "Undo", "Redo"]; -module RibbonComponent { - $(function () { - var sample = new ej.Ribbon($("#defaultRibbon"), { - width: "100%", - expandPinSettings: { - toolTip: "Collapse the Ribbon" - }, - collapsePinSettings: { - toolTip: "Pin the Ribbon" - }, - applicationTab: { - type: ej.Ribbon.ApplicationTabType.Menu, menuItemID: "ribbonmenu", menuSettings: { openOnClick: false } - }, - tabs: [{ - id: "home", text: "HOME", groups: [{ - text: "New", alignType: ej.Ribbon.AlignType.Rows, content: [{ - groups: [{ - id: "new", - text: "New", - toolTip: "New", - buttonSettings: { - contentType: ej.ContentType.ImageOnly, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-new", - click: "onClick" - } - } - ], - defaults: { - type: "button", - width: 60, - height: 70 - } - }] - }, - { - text: "Clipboard", alignType: ej.Ribbon.AlignType.Columns, content: [{ - groups: [{ - id: "paste", - text: "paste", - toolTip: "Paste", - splitButtonSettings: { - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon e-ribbonpaste", - targetID: "pasteSplit", - buttonMode: "dropdown", - click: "onClick", - arrowPosition: ej.ArrowPosition.Bottom - } - } - ], - defaults: { - type: "splitbutton", - width: 50, - height: 70 - } - }, - { - groups: [{ - id: "cut", - text: "Cut", - toolTip: "Cut", - buttonSettings: { - contentType: ej.ContentType.TextAndImage, - click: "onClick", - prefixIcon: "e-icon e-ribbon e-ribboncut" - } - }, - { - id: "copy", - text: "Copy", - toolTip: "Copy", - buttonSettings: { - contentType: ej.ContentType.TextAndImage, - click: "onClick", - prefixIcon: "e-icon e-ribbon e-ribboncopy" - } - }, - { - id: "clear", - text: "Clear", - toolTip: "Clear All", - buttonSettings: { - contentType: ej.ContentType.TextAndImage, - click: "onClick", - prefixIcon: "e-icon e-ribbon clearAll" - } - }], - defaults: { - type: "button", - width: 60, - isBig: false - } - }] - }, - { - text: "Font", alignType: "rows", content: [{ - groups: [{ - id: "fontfamily", - toolTip: "Font", - dropdownSettings: { - dataSource: fontfamily, - text: "Segoe UI", - select: "onClick", - width: 150 - } - }, - { - id: "fontsize", - toolTip: "FontSize", - dropdownSettings: { - dataSource: fontsize, - text: "1pt", - select: "onClick", - width: 65 - } - }], - defaults: { - type: "dropdownlist", - height: 28 - } - }, - { - groups: [{ - id: "bold", - toolTip: "Bold", - type: ej.Ribbon.Type.ToggleButton, - toggleButtonSettings: { - contentType: ej.ContentType.ImageOnly, - defaultText: "Bold", - activeText: "Bold", - click: "onClick", - defaultPrefixIcon: "e-icon e-ribbon bold", - activePrefixIcon: "e-icon e-ribbon bold" - } - }, - { - id: "italic", - toolTip: "Italic", - type: ej.Ribbon.Type.ToggleButton, - toggleButtonSettings: { - contentType: ej.ContentType.ImageOnly, - defaultText: "Italic", - activeText: "Italic", - click: "onClick", - defaultPrefixIcon: "e-icon e-ribbon e-ribbonitalic", - activePrefixIcon: "e-icon e-ribbon e-ribbonitalic" - } - }, - { - id: "underline", - text: "Underline", - toolTip: "Underline", - type: ej.Ribbon.Type.ToggleButton, - toggleButtonSettings: { - contentType: ej.ContentType.ImageOnly, - defaultText: "Underline", - activeText: "Underline", - click: "onClick", - defaultPrefixIcon: "e-icon e-ribbon e-ribbonunderline", - activePrefixIcon: "e-icon e-ribbon e-ribbonunderline" - } - }, - { - id: "strikethrough", - text: "strikethrough", - toolTip: "Strikethrough", - type: ej.Ribbon.Type.ToggleButton, - toggleButtonSettings: { - contentType: ej.ContentType.ImageOnly, - defaultText: "Strikethrough", - activeText: "Strikethrough", - click: "onClick", - defaultPrefixIcon: "e-icon e-ribbon strikethrough", - activePrefixIcon: "e-icon e-ribbon strikethrough" - } - }, - { - id: "superscript", - text: "superscript", - toolTip: "Superscript", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon e-superscripticon" - } - }, - { - id: "subscript", - text: "subscript", - toolTip: "Subscript", - enableSeparator: true, - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon e-subscripticon" - } - }, - { - id: "fontcolor", - text: "Font Color", - toolTip: "Font Color", - type: ej.Ribbon.Type.Custom, - contentID: "fontcolor" - }, - { - id: "fillcolor", - text: "Fill Color", - toolTip: "Fill Color", - type: ej.Ribbon.Type.Custom, - contentID: "fillcolor" - } - ], - defaults: { - isBig: false - } - }] - }, - { - text: "Alignment", alignType: ej.Ribbon.AlignType.Rows, content: [ - { - groups: [{ - id: "bullet", - text: "Bullet Format", - toolTip: "Bullets", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon e-bullet" - } - }, - { - id: "number", - text: "Number Format", - toolTip: "Numbering", - enableSeparator: true, - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon e-numbericon" - } - }, - { - id: "textindent", - text: "Indent", - toolTip: "Text Indent", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon e-indent" - } - }, - { - id: "textoudent", - text: "Outdent", - toolTip: "Text Outdent", - enableSeparator: true, - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon e-outdent" - } - }, - { - id: "sortascending", - text: "Sort", - toolTip: "Sort", - enableSeparator: true, - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon e-sort" - } - }, - { - id: "border", - text: "Border", - toolTip: "Border", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon e-border" - } - }], - defaults: { - type: "button", - isBig: false - } - }, - { - groups: [{ - id: "alignleft", - text: "JustifyLeft", - toolTip: "Align Left", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon alignleft" - } - }, - { - id: "aligncenter", - text: "JustifyCenter", - toolTip: "Align Center", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon aligncenter" - } - }, - { - id: "alignright", - text: "JustifyRight", - toolTip: "Align Right", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon alignright" - } - }, - { - id: "justify", - text: "JustifyFull", - toolTip: "Justify", - enableSeparator: true, - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon justify" - } - }, - { - id: "uppercase", - text: "Upper Case", - toolTip: "Upper Case", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon e-uppercase" - } - }, - { - id: "lowercase", - text: "Lower Case", - toolTip: "Lower Case", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon e-lowercase" - } - }], - defaults: { - type: "button", - isBig: false - } - }] - }, - { - text: "Actions", alignType: ej.Ribbon.AlignType.Rows, content: [{ - groups: [{ - id: "undo", - text: "Undo", - toolTip: "Undo", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-undo" - } - }, - { - id: "redo", - text: "Redo", - toolTip: "Redo", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-redo" - } - } - ], - defaults: { - type: "button", - width: 40, - height: 70 - } - }] - }, - { - text: "View", alignType: ej.Ribbon.AlignType.Rows, content: [{ - groups: [{ - id: "zoomin", - text: "Zoom In", - toolTip: "Zoom In", - buttonSettings: { - width: 58, - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-zoomin" - } - }, - { - id: "zoomout", - text: "Zoom Out", - toolTip: "Zoom Out", - buttonSettings: { - width: 70, - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-zoomout" - } - }, - { - id: "fullscreen", - text: "Full Screen", - toolTip: "Full Screen", - buttonSettings: { - width: 73, - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-fullscreen" - } - } - ], - defaults: { - type: "button", - height: 70 - } - }] - }] - },{ - id: "insert", text: "INSERT", groups: [{ - text: "Tables", alignType: ej.Ribbon.AlignType.Columns, content: [{ - groups: [{ - id: "tables", - text: "Tables", - toolTip: "Tables", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-table" - } - } - ], - defaults: { - type: "button", - width: 50, - height: 70 - } - }] - }, - { - text: "Illustrations", alignType: ej.Ribbon.AlignType.Rows, content: [{ - groups: [{ - id: "pictures", - text: "Pictures", - toolTip: "Pictures", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-picture" - } - }, - { - id: "videos", - text: "Videos", - toolTip: "Videos", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-video" - } - }, - { - id: "shapes", - text: "Shapes", - toolTip: "Shapes", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-shape" - } - }, - { - id: "charts", - text: "Charts", - toolTip: "Charts", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-chart" - } - } - ], - defaults: { - type: "button", - width: 56, - height: 70 - } - }] - }, - { - text: "Comments", alignType: ej.Ribbon.AlignType.Rows, content: [{ - groups: [{ - id: "comments", - text: "Comments", - toolTip: "Comments", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-comment" - } - } - ], - defaults: { - type: "button", - width: 70, - height: 70 - } - }] - }, - { - text: "Text", alignType: ej.Ribbon.AlignType.Rows, content: [{ - groups: [{ - id: "text", - text: "Text", - toolTip: "Text", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-text", - width: 50 - } - }, - { - id: "datetime", - text: "Date Time", - toolTip: "DateTime", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-datetimenew" - } - } - ], - defaults: { - type: "button", - width: 70, - height: 70 - } - }] - }, - { - text: "Hyperlink", alignType: ej.Ribbon.AlignType.Rows, content: [{ - groups: [{ - id: "hyperlink", - text: "Hyperlink", - toolTip: "Hyperlink", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-hyperlink" - } - } - ], - defaults: { - type: "button", - width: 70, - height: 70 - } - }] - }, - { - text: "Equation", alignType: ej.Ribbon.AlignType.Rows, content: [{ - groups: [{ - id: "equation", - text: "Equation", - toolTip: "Equation", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-equation" - } - } - ], - defaults: { - type: "button", - width: 60, - height: 70 - } - }] - }, - { - text: "Print Layout", alignType: ej.Ribbon.AlignType.Rows, content: [{ - groups: [{ - id: "printlayout", - text: "Print Layout", - toolTip: "Print Layout", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-printlayout" - } - } - ], - defaults: { - type: "button", - width: 80, - height: 70 - } - }] - }, - { - text: "Save", alignType: ej.Ribbon.AlignType.Rows, content: [{ - groups: [{ - id: "print", - text: "Print", - toolTip: "Print", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-print" - } - }, - { - id: "save", - text: "Save", - toolTip: "Save", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-save" - } - } - ], - defaults: { - type: "button", - width: 50, - height: 70 - } - }] - } - ] - } - ], - create: function createControl(args) { - var ribbon = $("#defaultRibbon").data("ejRibbon"); - $("#fontcolor").ejColorPicker({ value: "#FFFF00", modelType: "palette", cssClass: "e-ribbon", toolIcon: "e-fontcoloricon", select: colorHandler }); - $("#fillcolor").ejColorPicker({ value: "#FF0000", modelType: "palette", cssClass: "e-ribbon", toolIcon: "e-fillcoloricon", select: colorHandler }); - } - }); - }); -} -function colorHandler(args:any) { - (this._id.indexOf("fillcolor") != -1) ? $("#contenteditor").css('background-color', args.value) : document.execCommand('forecolor', false, args.value); -} -function onClick(args:any) { - let val:any, prop = args.text; - val = (ej.isNullOrUndefined(args.model.text)) ? args.model.activeText : args.model.text; - if (action1.indexOf(val) != -1) - $("#contenteditor").empty(); - else if (action2.indexOf(val) != -1) - document.execCommand(val, false, null); - else if (fontfamily.indexOf(prop) != -1) - document.execCommand("FontName", false, prop); - else if (fontsize.indexOf(prop) != -1) - document.execCommand("FontSize", false, prop.replace("pt", "")); - else - $("#contenteditor").append("

    Action: " + val + " Triggered

    "); -} - - - -module RotatorComponent { - $(function () { - var rotatorInstance = new ej.Rotator($("#sliderContent"), { - slideWidth: "100%", - frameSpace: "0px", - slideHeight: "auto", - displayItemsCount: "1", - navigateSteps: "1", - pagerPosition:"outside", - orientation: "horizontal", - showPager: true, - enabled: true, - showCaption: true, - allowKeyboardNavigation: true, - showPlayButton: true, - isResponsive:true, - animationType: "slide", - }); - }); -} - - - -module RTEComponent { - $(function () { - var sample = new ej.RTE($("#rteSample"),{ - width: "100%", - minWidth: "150px", - showFooter: true, - showHtmlSource: true, - allowEditing: true, - allowKeyboardNavigation: true, - autoFocus: true, - autoHeight: true, - colorPaletteColumns: 10, - colorPaletteRows: 5, - cssClass: 'gradient-lime', - enableResize: true, - enableTabKeyNavigation: true, - fileBrowser: { - filePath: (window).baseurl + "Content/FileBrowser/", - extensionAllow: "*.png, *.doc, *.pdf, *.txt, *.docx", - ajaxAction: (window).baseurl + "api/FileExplorer/FileOperations" - }, - imageBrowser: { - filePath: (window).baseurl + "Content/FileBrowser/", - extensionAllow: "*.png, *.gif, *.jpg, *.jpeg, *.docx", - ajaxAction: (window).baseurl + "api/FileExplorer/FileOperations" - }, - isResponsive: true, - showClearAll: true, - showClearFormat: true, - showDimensions: true, - showCharCount: true, - tools: { - formatStyle: ["format"], - edit: ["findAndReplace"], - font: ["fontName", "fontSize", "fontColor", "backgroundColor"], - style: ["bold", "italic", "underline", "strikethrough"], - alignment: ["justifyLeft", "justifyCenter", "justifyRight", "justifyFull"], - lists: ["unorderedList", "orderedList"], - clipboard: ["cut", "copy", "paste"], - doAction: ["undo", "redo"], - indenting: ["outdent", "indent"], - clear: ["clearFormat", "clearAll"], - links: ["createLink", "removeLink"], - images: ["image"], - media: ["video"], - tables: ["createTable", "addRowAbove", "addRowBelow", "addColumnLeft", "addColumnRight", "deleteRow", "deleteColumn", "deleteTable"], - effects: ["superscript", "subscript"], - casing: ["upperCase", "lowerCase"], - view: ["fullScreen", "zoomIn", "zoomOut"], - print: ["print"], - customUnorderedList: [{ - name: "unOrderInsert", - tooltip: "Custom UnOrderList", - css: "e-rte-toolbar-icon e-rte-unlistitems customUnOrder", - text: "Smiley", - listImage: "url('../content/images/rte/Smiley-GIF.gif')" - }], - customOrderedList: [{ - name: "orderInsert", - tooltip: "Custom OrderList", - css: "e-rte-toolbar-icon e-rte-listitems customOrder", - text: "Lower-Greek", - listStyle: "lower-greek" - }] - } - }); - }); - -} - - - -module ScheduleComponent { - $(function () { - var sample = new ej.Schedule($("#Schedule1"), { - width: "100%", - height: "525px", - currentDate: new Date(2017, 5, 5), - timeScale: { - minorSlotCount: 4, - majorSlot: 60 - }, - contextMenuSettings: { - enable: true, - menuItems: { - appointment: [ - { id: "open", text: "Open Appointment" }, - { id: "delete", text: "Delete Appointment" }, - { id: "customMenu3", text: "Menu Item 3" }, - { id: "customMenu4", text: "Menu Item 4" } - ], - cells: [ - { id: "new", text: "New Appointment" }, - { id: "recurrence", text: "New Recurring Appointment" }, - { id: "today", text: "Today" }, - { id: "gotodate", text: "Go to date" }, - { id: "settings", text: "Settings" }, - { id: "view", text: "View", parentId: "settings" }, - { id: "timemode", text: "TimeMode", parentId: "settings" }, - { id: "view_Day", text: "Day", parentId: "view" }, - { id: "view_Week", text: "Week", parentId: "view" }, - { id: "view_Workweek", text: "Workweek", parentId: "view" }, - { id: "view_Month", text: "Month", parentId: "view" }, - { id: "timemode_Hour12", text: "12 Hours", parentId: "timemode" }, - { id: "timemode_Hour24", text: "24 Hours", parentId: "timemode" }, - { id: "workhours", text: "Work Hours", parentId: "settings" }, - { id: "customMenu1", text: "Menu Item 1" }, - { id: "customMenu2", text: "Menu Item 2" } - ] - } - }, - resources: [{ - field: "ownerId", - title: "Owner", - name: "Owners", allowMultiple: true, - resourceSettings: { - dataSource: [ - { text: "Nancy", id: 1, groupId: 1, color: "#f8a398" }, - { text: "Steven", id: 3, groupId: 2, color: "#56ca85" }, - { text: "Michael", id: 5, groupId: 1, color: "#51a0ed" } - ], - text: "text", id: "id", groupId: "groupId", color: "color" - } - }], - appointmentSettings: { - dataSource: new ej.DataManager((window).ResourcesData).executeLocal(new ej.Query().take(10)), - id: "Id", - subject: "Subject", - startTime: "StartTime", - endTime: "EndTime", - description: "Description", - allDay: "AllDay", - recurrence: "Recurrence", - recurrenceRule: "RecurrenceRule", - resourceFields: "ownerId" - } - }); - }); -} - - - -module ScrollerComponent { - $(function () { - var scrollerSample = new ej.Scroller($("#scrollcontent"), { - height: "300px", - width: "100%" - }); - $(window).bind('resize', function () { - scrollerSample.refresh(); - }); - - }); -} - - - -module SignatureComponent { - $(function () { - var basicSignature = new ej.Signature($("#signature"), { - height: "400px", - isResponsive: true, - strokeWidth: 3 - }); - }); -} - - - - -module SliderComponent { - $(function () { - var slider = new ej.Slider($("#minSlider"), { - sliderType: "MinRange", - value: 60, - minValue: 0, - maxValue: 100 - }); - var rangeslider = new ej.Slider($("#rangeSlider"), { - sliderType: "Range", - values: [30, 60], - minValue: 0 - }); - - }); -} - - - - - - -module linesparkline { - $(function () { - - var sparklinesample = new ej.Sparkline($("#line"), { - dataSource: [12, 14, 11, 12, 11, 15, 12, 10, 11, 12, 15, 13, 12, 11, 10, 13, 15, 12, 14, 16, 14, 12, 11], - tooltip: { - visible: true, - font: { size:"12px" } - }, - type: "line", - size: { height: "40", width:"170" }, - }); - }); -} - -module columnsparkline { - $(function () { - var sparkcolumnsample = new ej.Sparkline($("#column"), { - dataSource: [2, 6, -1, 1, 12, 5, -2, 7, -3, 5, 8, 10,], - negativePointColor: "red", - highPointColor: "blue", - tooltip: { - visible: true, - font: { - size: "12px", - } - }, - type: "column", - size: { height: "100", width: "150" }, - }); - }); -} - -module areasparkline { - $(function () { - var sparkareasample = new ej.Sparkline($("#area"), { - dataSource: [12, -10, 11, 8, 17, 6, 2, -17, 13, -6, 8, 10,], - markerSettings: { visible: true }, - highPointColor: "blue", - lowPointColor: "orange", - type: "area", - opacity: 0.5, - tooltip: { - visible: true, - font: { - size: "12px", - } - }, - size: { height: "100", width: "150" }, - }); - }); -} - -module windlosssparkline { - $(function () { - var sparkwinlosssample = new ej.Sparkline($("#winloss"), { - dataSource: [12, 15, -11, 13, 17, 0, -12, 17, 13, -15, 8, 10,], - type: "winloss", - size: { height: "100", width: "150" }, - }); - }); -} - -module piesparkline1 { - $(function () { - var sparkpiesample1 = new ej.Sparkline($("#pie1"), { - dataSource: [4, 6, 7], - type: "pie", - tooltip: { - visible: true, - font: { - size: "12px", - } - }, - size: { height: "40", width: "40" }, - }); - }); -} - -module piesparkline2 { - $(function () { - var sparkpiesample2 = new ej.Sparkline($("#pie2"), { - dataSource: [8, 9, 1,], - type: "pie", - tooltip: { - visible: true, - font: { - size: "12px", - } - }, - size: { height: "40", width: "40" }, - }); - }); -} - -module piesparkline3 { - $(function () { - var sparkpiesample3 = new ej.Sparkline($("#pie3"), { - dataSource: [2, 3, 5], - type: "pie", - tooltip: { - visible: true, - font: { - size: "12px", - } - }, - size: { height: "40", width: "40" }, - }); - }); -} - -module piesparkline4 { - $(function () { - var sparkpiesample4 = new ej.Sparkline($("#pie4"), { - dataSource: [10, 12, 11], - type: "pie", - tooltip: { - visible: true, - font: { - size: "12px", - } - }, - size: { height: "40", width: "40" }, - }); - }); -} - - - - -module SplitterComponent { - $(function () { - var splitterInstance = new ej.Splitter($("#outterSpliter"), { - height: "250px", - width: "50%", - orientation: ej.Orientation.Vertical, - properties: [{}, { paneSize: 80 }], - isResponsive:true - }); - var splitterInstance1 = new ej.Splitter($("#innerSpliter"), { - isResponsive:true, - }); - }); -} - - - -module SpreadsheetComponent { -$(function () { - var sample = new ej.Spreadsheet($("#basicSpreadsheet"), { - scrollSettings: { - height: 550, - }, - importSettings: { - importMapper: (window).baseurl + "api/Spreadsheet/Import" - }, - exportSettings: { - excelUrl: (window).baseurl + "api/Spreadsheet/ExcelExport", - csvUrl: (window).baseurl + "api/Spreadsheet/CsvExport", - pdfUrl: (window).baseurl + "api/Spreadsheet/PdfExport" - }, - sheets: [{ rangeSettings: [{ dataSource: (window).defaultData, startCell: "A1" }] }], - loadComplete: () => { - var spreadsheet = $("#basicSpreadsheet").data("ejSpreadsheet"), xlFormat = spreadsheet.XLFormat; - if (!(spreadsheet).isImport) { - spreadsheet.setWidthToColumns([140, 128, 105, 100, 100, 110, 120, 120, 100]); - xlFormat.format({ "style": { "font-weight": "bold" } }, "A1:H1"); - xlFormat.format({ "type": "currency" }, "E2:H11"); - spreadsheet.XLRibbon.updateRibbonIcons(); - }} - }); - }); -} - - - -var default_data: Array = [ - { Category : "Employees", Country : "USA", JobDescription : "Sales", JobGroup:"Executive", EmployeesCount : 50 }, - { Category : "Employees", Country : "USA", JobDescription : "Sales", JobGroup : "Analyst", EmployeesCount : 40 }, - { Category : "Employees", Country : "USA", JobDescription : "Marketing", EmployeesCount : 40 }, - { Category : "Employees", Country : "USA", JobDescription : "Technical", JobGroup : "Testers", EmployeesCount : 55 }, - { Category : "Employees", Country : "USA", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Windows", EmployeesCount : 175}, - { Category : "Employees", Country : "USA", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Web", EmployeesCount : 70 }, - { Category : "Employees", Country : "USA", JobDescription : "Management", EmployeesCount : 40 }, - { Category : "Employees", Country : "USA", JobDescription : "Accounts", EmployeesCount : 60 }, - - { Category : "Employees", Country : "India", JobDescription : "Technical", JobGroup : "Testers", EmployeesCount : 43 }, - { Category : "Employees", Country : "India", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Windows", EmployeesCount : 125}, - { Category : "Employees", Country : "India", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Web", EmployeesCount : 60 }, - { Category : "Employees", Country : "India", JobDescription : "HR Executives", EmployeesCount : 70 }, - { Category : "Employees", Country : "India", JobDescription : "Accounts", EmployeesCount : 45 }, - - { Category : "Employees", Country : "Germany", JobDescription : "Sales", JobGroup : "Executive", EmployeesCount : 30 }, - { Category : "Employees", Country : "Germany", JobDescription : "Sales", JobGroup : "Analyst", EmployeesCount : 40 }, - { Category : "Employees", Country : "Germany", JobDescription : "Marketing", EmployeesCount : 50 }, - { Category : "Employees", Country : "Germany", JobDescription : "Technical", JobGroup : "Testers", EmployeesCount : 40 }, - { Category : "Employees", Country : "Germany", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Windows", EmployeesCount : 65 }, - { Category : "Employees", Country : "Germany", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Web", EmployeesCount : 27 }, - { Category : "Employees", Country : "Germany", JobDescription : "Management", EmployeesCount : 33 }, - { Category : "Employees", Country : "Germany", JobDescription : "Accounts", EmployeesCount : 55 }, - - { Category : "Employees", Country : "UK", JobDescription : "Technical", JobGroup : "Testers", EmployeesCount : 45 }, - { Category : "Employees", Country : "UK", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Windows", EmployeesCount : 96 }, - { Category : "Employees", Country : "UK", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Web", EmployeesCount : 55 }, - { Category : "Employees", Country : "UK", JobDescription : "HR Executives", EmployeesCount : 60 }, - { Category : "Employees", Country : "UK", JobDescription: "Accounts", EmployeesCount: 30 }, - - { Category : "Employees", Country : "France", JobDescription : "Technical", JobGroup : "Testers", EmployeesCount : 40 }, - { Category : "Employees", Country : "France", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Windows", EmployeesCount : 65 }, - { Category : "Employees", Country : "France", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Web", EmployeesCount : 27 }, - { Category : "Employees", Country : "France", JobDescription: "Marketing", EmployeesCount: 50 } -]; - -module sunburstcomponent { - $(function () { - var sunburstsample = new ej.SunburstChart($("#Sunburst"), { - valueMemberPath: "EmployeesCount", - levels: [ - {groupMemberPath: "Country"}, - {groupMemberPath: "JobDescription"}, - {groupMemberPath: "JobGroup"}, - {groupMemberPath: "JobRole"} - ], - dataSource: default_data, - dataLabelSettings:{visible:true}, - tooltip:{visible:false}, - enableAnimation:false, - size:{height:"600"}, - innerRadius:0.2, - load: function () { - var sender = $("#Sunburst").data("ejSunburstChart"); - var SunBurstTheme = (window).themeStyle + (window).themeColor + (window).themeVarient; - SunBurstTheme = SunBurstTheme.toString(); - if (SunBurstTheme.indexOf("dark") > -1 || SunBurstTheme.indexOf("contrast") > -1) - SunBurstTheme = "flatdark"; - else - SunBurstTheme = "flatlight"; - sender.model.theme = SunBurstTheme; - }, - title:{text:"Employees Count"}, - zoomSettings:{enable:false}, - legend:{visible:true,position:'top'}, - }); - }); -} - - - -module TabComponent { - $(function () { - var sample = new ej.Tab($("#defaultTab"),{ - width: "500px", - collapsible: true, - events: "click", - heightAdjustMode: ej.Tab.HeightAdjustMode.Content, - showCloseButton: true, - showRoundedCorner: false - }); - }); -} - - - -module TagCloudComponent { - - var websiteCollection = [ - { text: "Google", url: "http://www.google.com", frequency: 12 }, - { text: "All Things Digital", url: "http://allthingsd.com/", frequency: 3 }, - { text: "Arts Technica", url: "http://arstechnica.com/", frequency: 8 }, - { text: "Business Week", url: "http://www.businessweek.com/", frequency: 2 }, - { text: "Yahoo", url: "http://in.yahoo.com/", frequency: 12 }, - { text: "Center Networks", url: "http://www.centernetworks.com/", frequency: 5 }, - { text: "Crave", url: "http://news.cnet.com/crave/", frequency: 8 }, - { text: "Crunch Gear", url: "http://techcrunch.com/gadgets/", frequency: 20 }, - { text: "Daily Tech", url: "http://www.dailytech.com/", frequency: 1 }, - { text: "Electronista", url: "http://www.electronista.com/", frequency: 3 }, - { text: "Engadget", url: "http://www.engadget.com/", frequency: 5 }, - { text: "Gearlog", url: "http://www.gearlog.com/", frequency: 9 }, - { text: "Information Week", url: "http://www.informationweek.com/", frequency: 0 }, - { text: "PCWorld", url: "http://www.pcworld.com/", frequency: 11 }, - { text: "Tech Republic", url: "http://techrepublic.com/", frequency: 3 }, - { text: "Valleywag", url: "http://valleywag.gawker.com/", frequency: 6 }, - { text: "Rediff", url: "http://in.rediff.com/", frequency: 9 }, - { text: "WebProNews", url: "http://www.webpronews.com/", frequency: 2 } - ]; - - $(function () { - var sample = new ej.TagCloud($("#techWebList"), { - titleText: "Tech Sites", - dataSource: websiteCollection, - cssClass: "gradient-lime", - fields: { - text: "text", url: "url", frequency: "frequency" - } - }); - }); -} - - -module EditorComponent { - $(function () { - var num = new ej.NumericTextbox($("#numeric"), { - value: 30, - minValue: 1, - maxValue: 100, - name: "numeric", - width: "100%" - }); - var per = new ej.PercentageTextbox($("#percent"), { - value: 60, - minValue: 10, - maxValue: 1000, - name: "percent", - width: "100%" - }); - var cur = new ej.CurrencyTextbox($("#currency"), { - value: 100, - minValue: 10, - maxValue: 1000, - name: "currency", - width: "100%" - }); - var mask = new ej.MaskEdit($("#maskedit"), { - name: "mask", - value: "4242422424", - maskFormat: "99 999-99999", - width: "100%" - }) - }); -} - - - -module TileViewComponent { - $(function () { - var tile1 = new ej.Tile($("#tile1"), { - imagePosition:"fill", - caption:{text:"People"}, - tileSize:"medium", - imageUrl:'content/images/tile/windows/people_1.png' - }); - var tile2 = new ej.Tile($("#tile2"), { - imagePosition:"center", - tileSize:"small", - imageUrl:'content/images/tile/windows/alerts.png', - }); - var tile3 = new ej.Tile($("#tile3"), { - imagePosition:"center", - tileSize:"small", - imageUrl:'content/images/tile/windows/bing.png', - }); - var tile4 = new ej.Tile($("#tile4"), { - tileSize:"small", - imageUrl:'content/images/tile/windows/camera.png', - }); - var tile5 = new ej.Tile($("#tile5"), { - imagePosition:"center", - tileSize:"small", - imageUrl:'content/images/tile/windows/messages.png', - }); - var tile6 = new ej.Tile($("#tile6"), { - imagePosition:"center", - tileSize:"medium", - imageUrl:'content/images/tile/windows/games.png', - caption:{text:"Play"} - }); - var tile7 = new ej.Tile($("#tile7"), { - tileSize:"medium", - imageUrl:'content/images/tile/windows/map.png', - caption:{text:"Maps"} - }); - var tile8 = new ej.Tile($("#tile8"), { - imagePosition:"fill", - tileSize:"wide", - imageUrl:'content/images/tile/windows/sports.png', - caption:{text:"Sports"} - }); - var tile9 = new ej.Tile($("#tile9"), { - imagePosition:"fill", - tileSize:"medium", - imageUrl:'content/images/tile/windows/people_2.png', - caption:{text:"People"} - }); - var tile10 = new ej.Tile($("#tile10"), { - imagePosition:"center", - tileSize:"medium", - imageUrl:'content/images/tile/windows/pictures.png', - caption:{text:"Photo"} - }); - var tile11 = new ej.Tile($("#tile11"), { - imagePosition:"center", - tileSize:"wide", - imageUrl:'content/images/tile/windows/weather.png', - caption:{text:"Weather"} - }); - var tile12 = new ej.Tile($("#tile12"), { - imagePosition:"center", - tileSize:"medium", - imageUrl:'content/images/tile/windows/music.png', - caption:{text:"Music"} - }); - var tile13 = new ej.Tile($("#tile13"), { - imagePosition:"center", - tileSize:"medium", - imageUrl:'content/images/tile/windows/favs.png', - caption:{text:"Favorites"} - }); - }); -} - - - -module TimePickerComponent { - $(function () { - var timeSample = new ej.TimePicker($("#timepick"), { - width: "100%" - }); - }); -} - - - - -module ToolbarComponent { - $(function () { - var sample = new ej.Toolbar($("#editingToolbar"),{ - width: "100%", - cssClass: "gradient-lime", - enableSeparator: true, - isResponsive: true, - orientation: ej.Orientation.Horizontal, - showRoundedCorner: true - }); - }); -} - - - -module TooltipComponent { - $(function () { - - var sample1 = new ej.Tooltip($("#link1"),{ - content: "ECMAScript (or ES) is a trademarked scripting-language specification standardized by Ecma International in ECMA-262 and ISO/IEC 16262.", - associate: "mousefollow", - autoCloseTimeout: 5000, - collision: "fit", - containment: ".frame", - showRoundedCorner: true, - showShadow: true - }); - - var sample2 = new ej.Tooltip($("#link2"),{ - content: "The World Wide Web (WWW) is an information space where documents and other web resources are identified by URLs, interlinked by hypertext links, and can be accessed via the Internet.", - position: { - stem: { - horizontal: "right", - vertical: "center" - }, - target: { - horizontal: "left", - vertical: "center" - } - }, - autoCloseTimeout: 5000, - collision: "fit", - containment: ".frame", - showRoundedCorner: true, - showShadow: true - }); - - var sample3 = new ej.Tooltip($("#link3"),{ - content: 'Object-oriented programming (OOP) is a programming language model organized around objects rather than "actions" and data rather than logic.', - position: { - stem: { - horizontal: "right", - vertical: "center" - }, - target: { - horizontal: "left", - vertical: "center", - }, - }, - associate: "mousefollow", - autoCloseTimeout: 5000, - collision: "fit", - containment: ".frame", - showRoundedCorner: true, - showShadow: true - }); - }); -} - - - -module TreeGridComponent { - $(function () { - var treegridInstance = new ej.TreeGrid($("#TreeGridContainer"), { - dataSource: (window).treeGridData, - childMapping: "subtasks", - allowSorting: true, - allowMultiSorting: true, - enableAltRow: true, - allowFiltering: true, - treeColumnIndex: 1, - allowKeyboardNavigation: true, - showColumnChooser: true, - showColumnOptions: true, - contextMenuSettings: { - showContextMenu: true, - contextMenuItems: ["add", "edit", "delete"] - }, - columnDialogFields: ["field", "headerText", "editType", "width", "visible", "allowSorting", "textAlign", "headerTextAlign"], - editSettings: { - allowAdding: true, - allowEditing: true, - allowDeleting: true, - editMode: "cellEditing", - rowPosition: "belowSelectedRow" - }, - toolbarSettings: { - showToolbar: true, - toolbarItems: ["add","edit","delete","update","cancel","expandAll","collapseAll"] - }, - columns: [ - { field: "taskID", headerText: "Task Id", allowFiltering: false, editType: "numericedit", filterEditType: "numericedit" }, - { field: "taskName", headerText: "Task Name", editType: "stringedit", filterEditType: "stringedit" }, - { field: "startDate", headerText: "Start Date", editType: "datepicker", filterEditType: "datepicker", format:"{0:MM/dd/yyyy}" }, - { field: "endDate", headerText: "End Date", editType: "datepicker", filterEditType: "datepicker", format:"{0:MM/dd/yyyy}" }, - { field: "progress", headerText: "Progress", editType: "numericedit", filterEditType: "numericedit" } - ], - isResponsive: true, - }); -}); -} - - - -var population_data: Array = [ - { Continent: "Asia", Country: "Indonesia", Growth: 3, Population: 237641326 }, - { Continent: "Asia", Country: "Russia", Growth: 2, Population: 152518015 }, - { Continent: "Asia", Country: "Malaysia", Growth: 1, Population: 29672000 }, - { Continent: "North America", Country: "United States", Growth: 4, Population: 315645000 }, - { Continent: "North America", Country: "Mexico", Growth: 2, Population: 112336538 }, - { Continent: "North America", Country: "Canada", Growth: 1, Population: 39056064 }, - { Continent: "South America", Country: "Colombia", Growth: 1, Population: 47000000 }, - { Continent: "South America", Country: "Brazil", Growth: 3, Population: 193946886 }, - { Continent: "Africa", Country: "Nigeria", Growth: 2, Population: 170901000 }, - { Continent: "Africa", Country: "Egypt", Growth: 1, Population: 83661000 }, - { Continent: "Europe", Country: "Germany", Growth: 1, Population: 81993000 }, - { Continent: "Europe", Country: "France", Growth: 1, Population: 65605000 }, - { Continent: "Europe", Country: "UK", Growth: 1, Population: 63181775 } -]; - -module treemapcomponent { - $(function () { - var treemapsample = new ej.datavisualization.TreeMap($("#treemap"), { - leafItemSettings: { showLabels: true, labelPath: "Country" }, - rangeColorMapping: [ - { color: "#77D8D8", legendLabel: "1% Growth", from: 0, to: 1 }, - { color: "#AED960", from: 0, legendLabel: "2% Growth", to: 2 }, - { color: "#FFAF51", from: 0, legendLabel: "3% Growth", to: 3 }, - { color: "#F3D240", from: 0, legendLabel: "4% Growth", to: 4 } - ], - levels: [ - { groupPath: "Continent", groupGap: 5, headerHeight: 25, showHeader: true, headerTemplate: 'headertemplate' } - ], - dataSource: population_data, - colorValuePath: "Growth", - weightValuePath: "Population", - borderThickness: 0, - showLegend: true - }); - }); -} - - - -module TreeViewComponent { - $(function () { - var tree = new ej.TreeView($("#treeView"), { - allowEditing: true, - allowDragAndDrop: true, - allowDropChild: true, - allowDropSibling: true, - }); - }); -} - - - -module UploadboxComponent { - - $(function () { - var sample = new ej.Uploadbox($("#UploadDefault"),{ - saveUrl: (window).baseurl + "api/uploadbox/Save", - removeUrl: (window).baseurl + "api/uploadbox/Remove", - buttonText: { - browse: "Choose File", upload: "Upload", cancel: "Cancel" - }, - cssClass: "gradient- purple", - dialogAction: { - modal: false, closeOnComplete: false, drag: true - }, - extensionsAllow: ".zip", - multipleFilesSelection: true, - showFileDetails: true - }); - }); - -} - - - -module WaitingPopupComponent { - $(function () { - var sample = new ej.WaitingPopup($("#target"),{ - showOnInit: true, - showImage: true, - text: 'waiting…', - target: "#target", - appendTo: "#waiting" - }); - }); - -} + + + +module AccordionComponent { + $(function () { + var sample = new ej.Accordion($("#basicAccordion"), { + width: "100%", + allowKeyboardNavigation: true, + collapseSpeed: 500, + collapsible: true, + enableAnimation: true, + enableMultipleOpen: true, + events: "click", + expandSpeed: 500, + headerSize: "40px", + htmlAttributes: { title: "Demo" }, + selectedItemIndex: 1, + showCloseButton: true, + showRoundedCorner: true + }); + }); +} + + + +module AutocompleteComponent{ + var carList = [ + "Audi S6", "Austin-Healey", "Alfa Romeo", "Aston Martin", + "BMW 7", "Bentley Mulsanne", "Bugatti Veyron", + "Chevrolet Camaro", "Cadillac", + "Duesenberg J", "Dodge Sprinter", + "Elantra", "Excavator", + "Ford Boss 302", "Ferrari 360", "Ford Thunderbird", + "GAZ Siber", + "Honda S2000", "Hyundai Santro", + "Isuzu Swift", "Infiniti Skyline", + "Jaguar XJS", + "Kia Sedona EX", "Koenigsegg Agera", + "Lotus Esprit", "Lamborghini Diablo", + "Mercedes-Benz", "Mercury Coupe", "Maruti Alto 800", + "Nissan Qashqai", + "Oldsmobile S98", "Opel Superboss", + "Porsche 356", "Pontiac Sunbird", + "Scion SRS/SC/SD", "Saab Sportcombi", "Subaru Sambar", "Suzuki Swift", + "Triumph Spitfire", "Toyota 2000GT", + "Volvo P1800", "Volkswagen Shirako" + ]; + $(function () { + var autocompleteInstance =new ej.Autocomplete($("#selectCar"), { + width: "100%", + watermarkText: "Select a car", + dataSource: carList, + enableAutoFill: true, + showPopupButton: true, + multiSelectMode: "delimiter" + }); + }); +} + + + + +module Barcodecomponent { + $(function () { + var barcodesample = new ej.datavisualization.Barcode($("#Barcode"), { + text:"http://www.syncfusion.com" + }); + }); +} + + + + + +module Bulletgraphcomponent { + $(function () { + var bulletsample = new ej.datavisualization.BulletGraph($("#BulletGraph"), { + isResponsive: true, + load: function () { + var sender = $("#BulletGraph").data("ejBulletGraph"); + var bulletTheme = (window).themeStyle + (window).themeColor + (window).themeVarient; + if (bulletTheme) { + switch (bulletTheme) { + case "flatdark": + case "flatazuredark": + case "flatlimedark": + case "flatsaffrondark": + case "gradientdark": + case "gradientazuredark": + case "gradientlimedark": + case "gradientsaffrondark": + case "flathigh-contrast-01dark": + case "flathigh-contrast-02dark": + bulletTheme = "flatdark"; + break; + case "flatoffice-365light": + case "flatmateriallight": + bulletTheme = "material"; + break; + default: + bulletTheme = "flatlight"; + break; + } + sender.model.theme = bulletTheme; + } + + }, + tooltipSettings: { visible: true }, + quantitativeScaleSettings: { + featureMeasures: [{ + value: 8, comparativeMeasureValue:6.7 + }] + }, + qualitativeRanges: [{ + rangeEnd: 4.3, rangeStroke:"#ebebeb", + }, + { + rangeEnd: 7.3, rangeStroke:"#d8d8d8" + }, + { + rangeEnd: 10, rangeStroke: "#7f7f7f" + } + ], + captionSettings: { + textPosition: 'right', text: 'Revenue YTD', + subTitle: { + text: "$ in Thousands", textPosition:"right" + } + } + }); + }); +} + + + + + +module ButtonComponent { + $(function () { + var basicButton = new ej.Button($("#buttonnormal"), { + size: "large", + showRoundedCorner: true, + contentType: "textandimage", + prefixIcon: "e-icon e-save", + text: "Save" + }); + var toggleButton = new ej.ToggleButton($("#TextOnly"), { + showRoundedCorner: true, + size: "large", + contentType: "textandimage", + defaultPrefixIcon: "e-icon e-save", + activePrefixIcon: "e-icon e-delete", + defaultText: "Save", + activeText: "Delete" + }); + var splitbuttonnormal = new ej.SplitButton($("#splitbuttonnormal"), { + showRoundedCorner: true, + size: "large", + prefixIcon: "e-icon e-file-empty", + targetID: "menu1", + contentType: "textandimage", + text: "File" + }); + var groupButton = new ej.GroupButton($("#groupButton"), { + showRoundedCorner: true, + size: "large" + }); + var check1 = new ej.CheckBox($("#check1"), { + size: "medium", enableTriState: true + }); + var check2 = new ej.CheckBox($("#check2"), { + size: "medium", enableTriState: true + }); + var radio1 = new ej.RadioButton($("#radio1"), { + size: "medium" + }); + var radio2 = new ej.RadioButton($("#radio2"), { + size: "medium", checked: true + }); + }); +} + + + + +module ChartComponent { + $(function () { + var chartsample = new ej.datavisualization.Chart($("#Chart"), { + primaryXAxis: { + range: { min: 2005, max: 2011, interval: 1 }, + title: { text: "Year" }, + valueType: "category" + }, + primaryYAxis: { + range: { min: 25, max: 50, interval: 5 }, + labelFormat: "{value}%", + title: { text: "Efficiency" }, + }, + commonSeriesOptions: + { + type: 'line', enableAnimation: true, + tooltip:{ visible :true, template:'Tooltip'}, + marker: + { + shape: 'circle', + size: + { + height: 10, width: 10 + }, + visible: true + }, + border : {width: 2} + }, + series: + [ + { + points: [{ x: 2005, y: 28 }, { x: 2006, y: 25 }, { x: 2007, y: 26 }, { x: 2008, y: 27 }, + { x: 2009, y: 32 }, { x: 2010, y: 35 }, { x: 2011, y: 30 }], + name: 'India' + }, + { + points: [{ x: 2005, y: 31 }, { x: 2006, y: 28 }, { x: 2007, y: 30 }, { x: 2008, y: 36 }, + { x: 2009, y: 36 }, { x: 2010, y: 39 }, { x: 2011, y: 37 }], + name: 'Germany' + }, + { + points: [{ x: 2005, y: 36 }, { x: 2006, y: 32 }, { x: 2007, y: 34 }, { x: 2008, y: 41 }, + { x: 2009, y: 42 }, { x: 2010, y: 42 }, { x: 2011, y: 43 }], + name: 'England' + }, + { + points: [{ x: 2005, y: 39 }, { x: 2006, y: 36 }, { x: 2007, y: 40 }, { x: 2008, y: 44 }, + { x: 2009, y: 45 }, { x: 2010, y: 48 }, { x: 2011, y: 46 }], + name: 'France' + } + ], + isResponsive: true, + load: function () { + var sender = $("#Chart").data("ejChart"); + if (!!window.orientation && sender) { //to modify chart properties for mobile view + var model = sender.model, + seriesLength = model.series.length; + model.legend.visible = false; + model.size.height = null; + model.size.width = null; + for (var i = 0; i < seriesLength; i++) { + if (!model.series[i].marker) + model.series[i].marker = {}; + if (!model.series[i].marker.size) + model.series[i].marker.size = {}; + model.series[i].marker.size.width = 6; + model.series[i].marker.size.height = 6; + } + model.primaryXAxis.labelIntersectAction = "rotate45"; + if (model.primaryXAxis.title) + model.primaryXAxis.title.text = ""; + if (model.primaryYAxis.title) + model.primaryYAxis.title.text = ""; + model.primaryXAxis.edgeLabelPlacement = "hide"; + model.primaryYAxis.labelIntersectAction = "rotate45"; + model.primaryYAxis.edgeLabelPlacement = "hide"; + } + var theme = (window).themeStyle + (window).themeColor + (window).themeVarient; + if (theme) { + switch (theme) { + case "flatdark": + case "flatazuredark": + case "flatlimedark": + case "flatsaffrondark": + theme = "flatdark"; + break; + case "gradientlight": + case "gradientazurelight": + case "gradientlimelight": + case "gradientsaffronlight": + theme = "gradientlight"; + break; + case "gradientdark": + case "gradientazuredark": + case "gradientlimedark": + case "gradientsaffrondark": + theme = "gradientdark"; + break; + case "flatbootstraplight": + theme = "bootstrap"; + break; + case "flathigh-contrast-01dark": + case "flathigh-contrast-02dark": + theme = "high-contrast-01"; + break; + case "flatmateriallight": + case "flatoffice-365light": + theme = "material"; + break; + + default: + theme = "flatlight"; + break; + } + sender.model.theme = theme; + } + }, + title: { text: 'Efficiency of oil-fired power production' }, + size: { height: "600" }, + legend: { visible: true}, + }); + }); +} + + + + +module circulargaugecomponent { + $(function () { + var circularsample = new ej.datavisualization.CircularGauge($("#CircularGauge"), { + enableAnimation: false, + isResponsive: true, + backgroundColor: "transparent", width: 500, + scales: [{ + showRanges: true, + startAngle: 122, sweepAngle: 296, radius: 130, showScaleBar: true, size: 1, maximum: 120, majorIntervalValue: 20, minorIntervalValue: 10, + border: { + width: 0.5, + }, + pointers: [{ + value: 60, + showBackNeedle: true, + backNeedleLength: 20, + length: 95, + width: 7 + }], + ticks: [{ + type: "major", + distanceFromScale: 2, + height: 16, + width: 1, color: "#8c8c8c" + }, { type: "minor", height: 8, width: 1, distanceFromScale: 2, color: "#8c8c8c" }], + labels: [{ + color: "#8c8c8c" + }], + ranges: [{ + distanceFromScale: -30, + startValue: 0, + endValue: 70 + }, { + distanceFromScale: -30, + startValue: 70, + endValue: 110, + backgroundColor: "#fc0606", + border: { color: "#fc0606" } + }, + { + distanceFromScale: -30, + startValue: 110, + endValue: 120, + backgroundColor: "#f5b43f", + border: { color: "#f5b43f" } + }] + }] + }); + }); +} + + + +module ColorPickerComponent { + $(function () { + var colorSample = new ej.ColorPicker($("#colorpick"), { + value: "#278787" + }); + }); +} + + + + +module ComboBoxComponent{ + var BikeList = [ + { empid: "bk1", text: "Apache RTR" }, { empid: "bk2", text: "CBR 150-R" }, { empid: "bk3", text: "CBZ Xtreme" }, + { empid: "bk4", text: "Discover" }, { empid: "bk5", text: "Dazzler" }, { empid: "bk6", text: "Flame" }, + { empid: "bk7", text: "Fazzer" }, { empid: "bk8", text: "FZ-S" }, { empid: "bk9", text: "Pulsar" }, + { empid: "bk10", text: "Shine" }, { empid: "bk11", text: "R15" }, { empid: "bk12", text: "Unicorn" } + ]; + $(function () { + var comboboxInstance =new ej.ComboBox($("#selectCar"), { + width: "100%", + placeholder: "Select a Bike", + fields: { text: "text", value: "empid" }, + dataSource: BikeList, + autofill: true + }); + }); +} + + + +module DatePickerComponent { + $(function () { + var dateSample = new ej.DatePicker($("#datepick"), { + width: "100%" + }); + }); +} + + + + +module DateTimePickerComponent { + $(function () { + var datetimeSample = new ej.DateRangePicker($("#daterangepick"), { + width: "100%" + }); + }); +} + + + +module DateTimePickerComponent { + $(function () { + var datetimeSample = new ej.DateTimePicker($("#datetimepick"), { + width: "100%" + }); + }); +} + + + +$(function () { + var diagram = new ej.datavisualization.Diagram($("#diagram"), { + width: "1000px", + height: "600px", + pageSettings: { + //Sets page size + pageHeight: 500, + pageWidth: 500, + //Customizes the appearance of page + pageBorderWidth: 4, + pageBackgroundColor: "white", + pageBorderColor: "lightgray", + pageMargin: 25, + showPageBreak: true, + multiplePage: true, + pageOrientation: ej.datavisualization.Diagram.PageOrientations.Portrait + }, + scrollSettings: { + horizontalOffset: 0, + verticalOffset: 0 + }, + snapSettings: { + snapConstraints: ej.datavisualization.Diagram.SnapConstraints.ShowLines + }, + nodes: [ + createNode({ name: "NewIdea", width: 150, height: 60, offsetX: 300, offsetY: 60, labels: [createLabel({ "text": "New idea identified" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Terminator }), + createNode({ name: "Meeting", width: 150, height: 60, offsetX: 300, offsetY: 155, labels: [createLabel({ "text": "Meeting with board" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Process }), + createNode({ + name: "BoardDecision", width: 150, height: 110, offsetX: 300, offsetY: 280, labels: [createLabel({ text: "Board decides \nwhether \nto proceed", wrapText: "true", "margin": { left: 20, top: 0, right: 20, bottom: 0 } })], + type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Decision + }), + createNode({ name: "Project", width: 150, height: 100, offsetX: 300, offsetY: 430, labels: [createLabel({ "text": "Find Project \nmanager" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Decision }), + createNode({ + name: "End", width: 150, height: 60, offsetX: 300, offsetY: 555, labels: [createLabel({ "text": "Implement and Deliver" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Process }), + createNode({ name: "Decision", width: 250, height: 60, offsetX: 550, offsetY: 60, labels: [createLabel({ "text": "Decision Process for new software ideas" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Card, fillColor: "#858585", borderColor: "#858585" }), + createNode({ name: "Reject", width: 150, height: 60, offsetX: 550, offsetY: 285, labels: [createLabel({ "text": "Reject and write report" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Process }), + createNode({ name: "Resources", width: 150, height: 60, offsetX: 550, offsetY: 430, labels: [createLabel({ "text": "Hire new resources" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Process }) + ], + connectors: [ + createConnector({ name: "connector1", sourceNode: "NewIdea", targetNode: "Meeting" }), + createConnector({ name: "connector2", sourceNode: "Meeting", targetNode: "BoardDecision" }), + createConnector({ name: "connector3", sourceNode: "BoardDecision", targetNode: "Project", labels: [createLabel({ "text": "Yes" })] }), + createConnector({ name: "connector4", sourceNode: "Project", targetNode: "End", labels: [createLabel({ "text": "Yes" })] }), + createConnector({ name: "connector5", sourceNode: "BoardDecision", targetNode: "Reject", labels: [createLabel({ "text": "No" })] }), + createConnector({ name: "connector6", sourceNode: "Project", targetNode: "Resources", labels: [createLabel({ "text": "No" })] }) + ] + }); +}); + +function createNode(option: ej.datavisualization.Diagram.Node) { + if (!option.fillColor) { + option.borderColor = "#1BA0E2"; + option.fillColor = "#1BA0E2"; + } + option.labels[0].fontColor = "white"; + return option; +} + +function createConnector(option: ej.datavisualization.Diagram.Connector) { + option.targetDecorator = { shape: ej.datavisualization.Diagram.DecoratorShapes.Arrow, borderColor: "#606060", width: 10, height: 10 }; + option.lineColor = "#606060"; + if (option.labels && option.labels.length > 0) { + option.labels[0].fillColor = "white"; + } + return option; +} + +function createLabel(options : any) { + return options; +} + + + +module DialogComponent { + $(function () { + var dialogInstance = new ej.Dialog($("#basicDialog"), { + width: 550, + minWidth: 310, + minHeight: 215, + target:".control", + close:()=>{ + $("#btnOpen").show();} + }); + var btnInstance = new ej.Button($("#btnOpen"), { + size: "medium", + click: ()=>{ + $("#btnOpen").hide(); + $("#basicDialog").ejDialog("open");}, + type: "button", + height: 30, + width: 150 + }); + }); +} + + + + +module digitalgaugecomponent { + $(function () { + var digitalgaugesample = new ej.datavisualization.DigitalGauge($("#DigitalGauge"), { + width: 525, + height: 305, + isResponsive: true, + items: [{ + segmentSettings: { + width: 1, + spacing: 0, + color: "#8c8c8c" + }, + characterSettings: { + opacity: 0.8, + }, + value: "Syncfusion", + position: { x: 52, y: 52 } + }] + }); + }); +} + + + + + + +module DropDownListComponent { + var BikeList = [ + { empid: "bk1", text: "Apache RTR" }, { empid: "bk2", text: "CBR 150-R" }, { empid: "bk3", text: "CBZ Xtreme" }, + { empid: "bk4", text: "Discover" }, { empid: "bk5", text: "Dazzler" }, { empid: "bk6", text: "Flame" }, + { empid: "bk7", text: "Fazzer" }, { empid: "bk8", text: "FZ-S" }, { empid: "bk9", text: "Pulsar" }, + { empid: "bk10", text: "Shine" }, { empid: "bk11", text: "R15" }, { empid: "bk12", text: "Unicorn" } + ]; + $(function () { + var sample = new ej.DropDownList($("#bikeList"),{ + dataSource: BikeList, + width: "100%", + watermarkText: "Select a bike", + fields: { id: "empid", text: "text", value: "text" }, + enableFilterSearch: true, + caseSensitiveSearch: true, + enableIncrementalSearch: true, + enablePopupResize: true, + delimiterChar: ";", + multiSelectMode: ej.MultiSelectMode.Delimiter, + maxPopupHeight: "300px", + minPopupHeight: "150px", + maxPopupWidth: "500px", + minPopupWidth: "350px", + showCheckbox: true, + showRoundedCorner: true + }); + }); +} + + + + + +module ExplorerComponent { + $(function () { + var file = new ej.FileExplorer($("#fileExplorer"), { + path: (window).baseurl + "Content/FileBrowser/", + width: "100%", + minWidth: "150px", + layout: "tile", + isResponsive: true, + ajaxAction: (window).baseurl + "api/FileExplorer/FileOperations" + }); + }); +} + + + + +module GanttComponent { + $(function () { + var ganttInstance = new ej.Gantt($("#GanttContainer"), { + dataSource: (window).projectData, + allowColumnResize: true, + allowSorting: true, + allowSelection: true, + enableContextMenu: true, + taskIdMapping: "taskID", + allowDragAndDrop: true, + taskNameMapping: "taskName", + startDateMapping: "startDate", + showColumnChooser: true, + showColumnOptions: true, + progressMapping: "progress", + durationMapping: "duration", + endDateMapping: "endDate", + childMapping: "subtasks", + scheduleStartDate: "02/01/2017", + scheduleEndDate: "04/09/2017", + //Resources mapping + resourceInfoMapping: "resourceId", + resourceNameMapping: "resourceName", + resourceIdMapping: "resourceId", + resources: (window).projectResources, + predecessorMapping: "predecessor", + showResourceNames: true, + toolbarSettings: { + showToolbar: true, + toolbarItems: ["add","edit","delete","update","cancel","indent","outdent","expandAll","collapseAll","search"] + }, + editSettings: { + allowEditing: true, + allowAdding: true, + allowDeleting: true, + allowIndent: true, + editMode: "cellEditing" + }, + sizeSettings: { + width: "100%", + height: "100%" + }, + dragTooltip: { showTooltip: true }, + showGridCellTooltip: true, + treeColumnIndex: 1, + isResponsive: true, + }); +}); +} + + + +module GridComponent { + $(function () { + var gridInstance = new ej.Grid($("#Grid"), { + dataSource: (window).gridData, + allowGrouping: true, + allowSorting: true, + allowMultiSorting: true, + enableAltRow: true, + allowPaging: true, + allowReordering: true, + allowResizing: true, + allowFiltering: true, + allowScrolling: true, + enableRowHover: true, + selectionType: "multiple", + selectionSettings: { enableToggle: true, selectionMode: ["row", "cell", "column"] }, + allowKeyboardNavigation: true, + editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true, allowEditOnDblClick: true, showDeleteConfirmDialog: true }, + toolbarSettings: { showToolbar: true, toolbarItems: ["add", "edit", "delete", "update", "cancel", "search"] }, + columns: [ + { field: "OrderID", headerText: "Order ID", isPrimaryKey: true, width: 75, textAlign: ej.TextAlign.Right }, + { field: "CustomerID", headerText: "Customer ID", editType: ej.Grid.EditingType.String, width: 80 }, + { field: "EmployeeID", headerText: "Employee ID", width: 75, editType: ej.Grid.EditingType.Dropdown, textAlign: ej.TextAlign.Right, priority: 4 }, + { field: "Freight", width: 75, format: "{0:C}", editType: ej.Grid.EditingType.Numeric, textAlign: ej.TextAlign.Right, priority: 3 }, + { field: "OrderDate", headerText: "Order Date", width: 80, format: "{0:MM/dd/yyyy}", textAlign: ej.TextAlign.Right, priority: 2 }, + { field: "ShipCity", headerText: "Ship City", editType: ej.Grid.EditingType.Dropdown, width: 110, priority: 2 } + ], + isResponsive: true, + minWidth: 700, + showSummary: true, + summaryRows: [{ title: "Sum", summaryColumns: [{ summaryType: ej.Grid.SummaryType.Sum, displayColumn: "Freight", dataMember: "Freight", format: "{0:C2}" }] }] + }); + }); +} + + + +var columns = ["Vegie-spread", "Tofuaa", "Alice Mutton", "Konbu", "Fløtemysost"] +var itemSource: any[] = []; +for (var i = 0; i < columns.length; i++) { + for (var j = 0; j < 6; j++) { + var value = Math.floor((Math.random() * 100) + 1); + itemSource.push({ ProductName: columns[i], Year: "Y" + (2011 + j), Value: value }) + } +} + +$(function () { + var heatmap = new ej.datavisualization.HeatMap($("#heatmap"), { + colorMappingCollection: [ + { value: 0, color: "#8ec8f8", label: { text: "0" } }, + { value: 100, color: "#0d47a1", label: { text: "100" } } + ], + isResponsive: true, + itemsSource: itemSource, + width: "100%", + itemsMapping: { + column: { propertyName: "ProductName", displayName: "Product Name" }, + row: { propertyName: "Year", displayName: "Year" }, + value: { propertyName: "Value" }, + columnMapping: [ + { "propertyName": columns[0], "displayName": columns[0] }, + { "propertyName": columns[1], "displayName": columns[1] }, + { "propertyName": columns[2], "displayName": columns[2] }, + { "propertyName": columns[3], "displayName": columns[3] }, + { "propertyName": columns[4], "displayName": columns[4] }, + { "propertyName": columns[5], "displayName": columns[5] } + ], + headerMapping: { propertyName: "Year", displayName: "Year", columnStyle: { width: 105, textAlign: "right" } }, + }, + legendCollection: ["heatmap_legend"] + }); + var heatmaplegend = new ej.datavisualization.HeatMapLegend($("#heatmap_legend"), { + colorMappingCollection: [ + { value: 0, color: "#8ec8f8", label: { text: "0" } }, + { value: 100, color: "#0d47a1", label: { text: "100" } } + ], + height: "50px", + width: "75%", + isResponsive: true + }); +}); + + + + +module KanbanComponent { + $(function () { + var sample = new ej.Kanban($("#Kanban"), { + dataSource: new ej.DataManager((window).kanbanData).executeLocal(new ej.Query().take(20)), + columns: [ + { headerText: "Backlog", key: "Open" }, + { headerText: "In Progress", key: "InProgress" }, + { headerText: "Testing", key: "Testing" }, + { headerText: "Done", key: "Close" } + ], + keyField: "Status", + allowTitle: true, + fields: { + content: "Summary", + primaryKey: "Id", + imageUrl: "ImgUrl" + }, + allowSelection: false + }); + }); +} + + +module lineargaugecomponent { + $(function () { + var linearsample = new ej.datavisualization.LinearGauge($("#LinearGauge"), { + labelColor: "#8c8c8c", width: 500, + isResponsive: true, enableAnimation: false, + scales: [{ + width: 4, border: { color: "transparent", width: 0 }, showBarPointers: false, showRanges: true, length: 310, + position: { x: 52, y: 50 }, markerPointers: [{ + value: 50, length: 10, width: 10, backgroundColor: "#4D4D4D", border: { color: "#4D4D4D" } + }], + labels: [{ font: { size: "11px", fontFamily: "Segoe UI", fontStyle: "bold" }, distanceFromScale: { x: -13 } }], + ticks: [{ type: "majorinterval", width: 1, color: "#8c8c8c" }], + ranges: [{ + endValue: 60, + startValue: 0, + backgroundColor: "#F6B53F", + border: { color: "#F6B53F" }, startWidth: 4, endWidth: 4 + }, { + endValue: 100, + startValue: 60, + backgroundColor: "#E94649", + border: { color: "#E94649" }, startWidth: 4, endWidth: 4 + }] + }] + }); + }); +} + + + +module ListBoxComponent { + $(function () { + var listboxInstance = new ej.ListBox($("#selectcar"), { + showCheckbox: true + }); + }); +} + + + +module ListviewComponent { + $(function () { + var listviewInstance = new ej.ListView($("#defaultlistview"), { + enableCheckMark: true, + width: 400 + }); + }); +} + + +var world_map= + { + "type": "FeatureCollection", + "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, + "features": [ + { "type": "Feature", "properties": { "admin": "Afghanistan", "name": "Afghanistan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[61.21081709172573, 35.650072333309218], [62.230651483005879, 35.270663967422287], [62.984662306576588, 35.404040839167614], [63.193538445900337, 35.857165635718907], [63.982895949158696, 36.007957465146596], [64.546479119733888, 36.31207326918426], [64.746105177677393, 37.111817735333297], [65.588947788357828, 37.305216783185628], [65.745630731066811, 37.661164048812061], [66.217384881459324, 37.393790188133913], [66.518606805288655, 37.362784328758785], [67.075782098259609, 37.35614390720928], [67.829999627559502, 37.144994004864678], [68.135562371701369, 37.023115139304302], [68.859445835245921, 37.344335842430588], [69.196272820924364, 37.15114350030742], [69.518785434857946, 37.608996690413413], [70.116578403610319, 37.588222764632086], [70.270574171840124, 37.73516469985401], [70.376304152309274, 38.138395901027515], [70.806820509732873, 38.486281643216408], [71.348131137990251, 38.258905341132156], [71.239403924448155, 37.953265082341879], [71.541917759084768, 37.905774441065631], [71.448693475230229, 37.065644843080513], [71.84463829945058, 36.738171291646914], [72.193040805962383, 36.94828766534566], [72.636889682917271, 37.047558091778349], [73.260055779924983, 37.495256862938994], [73.948695916646486, 37.421566270490786], [74.980002475895404, 37.419990139305888], [75.158027785140902, 37.13303091078911], [74.575892775372964, 37.02084137628345], [74.067551710917812, 36.836175645488446], [72.920024855444453, 36.720007025696312], [71.846291945283909, 36.509942328429851], [71.262348260385735, 36.074387518857797], [71.498767938121077, 35.650563259415996], [71.613076206350698, 35.153203436822857], [71.115018751921625, 34.733125718722228], [71.156773309213449, 34.348911444632144], [70.881803012988385, 33.988855902638512], [69.93054324735958, 34.020120144175102], [70.323594191371583, 33.358532619758385], [69.687147251264847, 33.105498969041228], [69.262522007122541, 32.501944078088293], [69.317764113242546, 31.901412258424436], [68.926676873657655, 31.620189113892064], [68.556932000609308, 31.713310044882011], [67.792689243444769, 31.582930406209623], [67.683393589147457, 31.303154201781414], [66.938891229118454, 31.304911200479346], [66.38145755398601, 30.738899237586448], [66.346472609324408, 29.88794342703617], [65.046862013616092, 29.472180691031902], [64.350418735618504, 29.560030625928089], [64.148002150331237, 29.340819200145965], [63.550260858011164, 29.468330796826162], [62.549856805272775, 29.318572496044304], [60.874248488208778, 29.829238999952604], [61.78122155136343, 30.735850328081231], [61.699314406180811, 31.379506130492661], [60.941944614511115, 31.548074652628745], [60.863654819588952, 32.182919623334421], [60.536077915290761, 32.981268825811561], [60.963700392505991, 33.528832302376252], [60.528429803311575, 33.676446031217999], [60.80319339380744, 34.404101874319856], [61.21081709172573, 35.650072333309218]]] } }, + { "type": "Feature", "properties": { "admin": "Angola", "name": "Angola", "continent": "Africa" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[16.326528354567042, -5.877470391466217], [16.573179965896141, -6.622644545115092], [16.860190870845226, -7.222297865429978], [17.089995965247166, -7.545688978712474], [17.472970004962288, -8.068551120641656], [18.134221632569048, -7.987677504104865], [18.464175652752683, -7.847014255406475], [19.016751743249664, -7.988245944860138], [19.166613396896079, -7.738183688999724], [19.417502475673214, -7.155428562044277], [20.037723016040214, -7.116361179231658], [20.091621534920616, -6.943090101756949], [20.60182295093832, -6.939317722199688], [20.514748162526526, -7.299605808138663], [21.728110792739752, -7.290872491081315], [21.74645592620336, -7.920084730667113], [21.949130893652033, -8.305900974158304], [21.80180138518795, -8.908706556842985], [21.875181919042397, -9.523707777548564], [22.208753289486417, -9.894796237836529], [22.155268182064326, -11.084801120653777], [22.402798292742428, -10.99307545333569], [22.837345411884762, -11.017621758674334], [23.456790805767461, -10.867863457892481], [23.912215203555743, -10.926826267137541], [24.017893507592614, -11.237298272347115], [23.904153680118235, -11.722281589406332], [24.079905226342895, -12.191296888887305], [23.930922072045373, -12.565847670138821], [24.0161365088947, -12.91104623784855], [21.933886346125941, -12.898437188369353], [21.887842644953871, -16.080310153876891], [22.562478468524283, -16.898451429921831], [23.215048455506086, -17.523116143465952], [21.377176141045592, -17.930636488519706], [18.956186964603628, -17.789094740472233], [18.263309360434217, -17.309950860262003], [14.209706658595049, -17.353100681225708], [14.058501417709035, -17.423380629142653], [13.462362094789963, -16.971211846588741], [12.814081251688405, -16.941342868724075], [12.21546146001938, -17.111668389558059], [11.734198846085146, -17.301889336824498], [11.640096062881609, -16.673142185129205], [11.778537224991563, -15.793816013250687], [12.123580763404444, -14.878316338767927], [12.175618930722264, -14.449143568583889], [12.500095249083014, -13.547699883684398], [12.738478631245439, -13.137905775609934], [13.312913852601834, -12.483630466362511], [13.633721144269824, -12.038644707897189], [13.738727654686924, -11.297863050993142], [13.686379428775293, -10.73107594161584], [13.38732791510216, -10.373578383020726], [13.120987583069873, -9.766897067914112], [12.875369500386567, -9.166933689005488], [12.929061313537797, -8.959091078327573], [13.23643273280987, -8.56262948978434], [12.933040398824314, -7.596538588087752], [12.728298374083916, -6.927122084178803], [12.227347039446441, -6.294447523629372], [12.322431674863562, -6.100092461779651], [12.735171339578695, -5.965682061388476], [13.024869419006988, -5.984388929878106], [13.375597364971892, -5.864241224799555], [16.326528354567042, -5.877470391466217]]], [[[12.436688266660919, -5.684303887559223], [12.182336866920277, -5.789930515163801], [11.914963006242115, -5.037986748884733], [12.318607618873923, -4.606230157086158], [12.620759718484548, -4.438023369976121], [12.995517205465202, -4.781103203961918], [12.631611769265842, -4.991271254092935], [12.468004184629759, -5.248361504744991], [12.436688266660919, -5.684303887559223]]]] } }, + { "type": "Feature", "properties": { "admin": "Albania", "name": "Albania", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[20.590247430104906, 41.855404161133592], [20.463175083099195, 41.515089016275333], [20.605181919037356, 41.086226304685219], [21.020040317476397, 40.842726955725873], [20.99998986174722, 40.580003973953964], [20.67499677906363, 40.43499990494302], [20.61500044117275, 40.110006822259365], [20.150015903410516, 39.624997666983965], [19.980000441170144, 39.694993394523401], [19.9600016618732, 39.915005805006039], [19.40608198413673, 40.250773423822459], [19.319058872157139, 40.727230129553554], [19.403549838954287, 41.409565741535445], [19.540027296637099, 41.71998607031275], [19.371768833094958, 41.87754751237064], [19.304486118250786, 42.195745144207812], [19.738051385179627, 42.688247382165564], [19.801613396898681, 42.500093492190835], [20.0707, 42.58863], [20.28375451018189, 42.320259507815074], [20.52295, 42.21787], [20.590247430104906, 41.855404161133592]]] } }, + { "type": "Feature", "properties": { "admin": "United Arab Emirates", "name": "United Arab Emirates", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[51.579518670463258, 24.245497137951102], [51.757440626844172, 24.294072984305462], [51.794389275932865, 24.019826158132499], [52.577080519425593, 24.177439276622703], [53.404006788960139, 24.151316840099167], [54.008000929587574, 24.121757920828212], [54.693023716048614, 24.797892360935084], [55.439024692614126, 25.439145209244934], [56.070820753814544, 26.055464178973978], [56.261041701080948, 25.714606431576762], [56.396847365143991, 24.924732163995483], [55.886232537667993, 24.92083059335744], [55.804118686756212, 24.269604193615258], [55.981213820220454, 24.130542914317822], [55.528631626208231, 23.933604030853498], [55.525841098864461, 23.524869289640929], [55.234489373602869, 23.110992743415316], [55.208341098863187, 22.708329982997039], [55.006803012924898, 22.496947536707129], [52.000733270074321, 23.001154486578937], [51.617707553926969, 24.014219265228824], [51.579518670463258, 24.245497137951102]]] } }, + { "type": "Feature", "properties": { "admin": "Argentina", "name": "Argentina", "continent": "South America" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-65.5, -55.2], [-66.45, -55.25], [-66.95992, -54.89681], [-67.56244, -54.87001], [-68.63335, -54.8695], [-68.634010227583147, -52.636370458874453], [-68.25, -53.1], [-67.75, -53.85], [-66.45, -54.45], [-65.05, -54.7], [-65.5, -55.2]]], [[[-64.964892137294569, -22.075861504812348], [-64.377021043542257, -22.79809132252354], [-63.986838141522462, -21.993644301035953], [-62.84646847192154, -22.034985446869452], [-62.685057135657885, -22.249029229422401], [-60.846564704009928, -23.880712579038299], [-60.028966030503973, -24.032796319273238], [-58.807128465394939, -24.771459242453268], [-57.777217169817952, -25.162339776309032], [-57.633660040911124, -25.603656508081666], [-58.618173590719707, -27.123718763947117], [-57.609759690976134, -27.395898532828419], [-56.486701626192989, -27.548499037386243], [-55.695845506398186, -27.387837009390815], [-54.788794928595038, -26.621785577096087], [-54.625290696823541, -25.739255466415479], [-54.130049607954412, -25.547639255477243], [-53.628348965048716, -26.12486500417743], [-53.648735317587885, -26.923472588816104], [-54.490725267135517, -27.474756768505767], [-55.162286342984586, -27.881915378533414], [-56.290899624239088, -28.852760512000849], [-57.62513342958291, -30.21629485445424], [-57.874937303281897, -31.016556084926158], [-58.14244035504074, -32.044503676076182], [-58.132647671121404, -33.040566908502008], [-58.349611172098818, -33.263188978815428], [-58.427074144104367, -33.909454441057541], [-58.495442064026541, -34.4314897600701], [-57.225829637263629, -35.288026625307886], [-57.362358771378737, -35.977390232081497], [-56.737487352105447, -36.413125909166574], [-56.788285285048339, -36.901571547189327], [-57.749156867083421, -38.183870538079901], [-59.231857062401865, -38.720220228837199], [-61.2374452378656, -38.92842457454114], [-62.335956997310134, -38.827707208004362], [-62.125763108962914, -39.424104913084868], [-62.33053097191943, -40.172586358400316], [-62.145994432205228, -40.676896661136723], [-62.74580278181697, -41.028761488612083], [-63.770494757732514, -41.166789239263657], [-64.732089809819698, -40.802677097335128], [-65.118035244391578, -41.064314874028874], [-64.97856055363583, -42.058000990569312], [-64.303407965742466, -42.359016208669495], [-63.755947842042339, -42.043686618824495], [-63.458059048095883, -42.563138116222355], [-64.378803880456289, -42.873558444999638], [-65.181803961839691, -43.495380954767782], [-65.328823411710133, -44.501366062193689], [-65.565268927661592, -45.03678557716978], [-66.509965786389344, -45.039627780945843], [-67.293793911392427, -45.551896254255183], [-67.580546434180079, -46.301772963242527], [-66.597066413017259, -47.033924655953804], [-65.641026577401433, -47.23613453551188], [-65.98508826360073, -48.133289076531128], [-67.166178961847649, -48.697337334996931], [-67.816087612566449, -49.869668877970412], [-68.728745083273154, -50.26421843851886], [-69.138539191347789, -50.732510267947788], [-68.815561489523517, -51.771104011594097], [-68.149994879820397, -52.349983406127699], [-68.571545376241332, -52.299443855346247], [-69.498362189396076, -52.142760912637236], [-71.914803839796321, -52.009022305865912], [-72.329403856074023, -51.425956312872394], [-72.309973517532342, -50.677009779666342], [-72.975746832964617, -50.741450290734299], [-73.328050910114456, -50.378785088909865], [-73.415435757120022, -49.318436374712952], [-72.648247443314929, -48.878618259476774], [-72.331160854771937, -48.244238376661819], [-72.44735531278026, -47.738532810253517], [-71.917258470330196, -46.884838148791786], [-71.552009446891233, -45.560732924177117], [-71.659315558545316, -44.973688653341434], [-71.222778896759721, -44.784242852559409], [-71.329800788036195, -44.407521661151677], [-71.793622606071935, -44.207172133156099], [-71.464056159130493, -43.787611179378324], [-71.915423956983901, -43.408564548517404], [-72.148898078078517, -42.254888197601375], [-71.746803758415453, -42.051386407235988], [-71.915734015577542, -40.832339369470716], [-71.680761277946445, -39.808164157878061], [-71.413516608349042, -38.916022230791107], [-70.814664272734703, -38.552995293940732], [-71.118625047475419, -37.576827487947192], [-71.121880662709771, -36.65812387466233], [-70.364769253201658, -36.005088799789931], [-70.388049485949082, -35.169687595359441], [-69.817309129501453, -34.193571465798279], [-69.814776984319209, -33.273886000299839], [-70.074399380153622, -33.09120981214803], [-70.535068935819439, -31.365010267870279], [-69.919008348251921, -30.336339206668306], [-70.013550381129861, -29.367922865518544], [-69.656130337183143, -28.459141127233686], [-69.001234910748266, -27.521213881136127], [-68.295541551370391, -26.899339694935787], [-68.594799770772667, -26.50690886811126], [-68.386001146097342, -26.185016371365229], [-68.417652960876111, -24.518554782816874], [-67.328442959244128, -24.025303236590908], [-66.985233934177629, -22.986348565362825], [-67.106673550063604, -22.735924574476392], [-66.273339402924833, -21.832310479420677], [-64.964892137294569, -22.075861504812348]]]] } }, + { "type": "Feature", "properties": { "admin": "Armenia", "name": "Armenia", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[43.582745802592726, 41.09214325618256], [44.972480096218071, 41.248128567055588], [45.179495883979335, 40.985353908851401], [45.560351189970433, 40.812289537105919], [45.359174839058156, 40.561503811193447], [45.891907179555076, 40.218475653639992], [45.610012241402913, 39.899993801425175], [46.034534132680662, 39.628020738273058], [46.483498976432443, 39.464154771475528], [46.505719842317966, 38.770605373686287], [46.143623081248812, 38.74120148371221], [45.735379266143006, 39.319719143219736], [45.739978468616975, 39.473999131827114], [45.298144972521456, 39.471751207022422], [45.00198733905674, 39.740003567049548], [44.793989699081934, 39.713002631177041], [44.400008579288695, 40.005000311842267], [43.656436395040934, 40.253563951166178], [43.752657911968399, 40.740200914058754], [43.582745802592726, 41.09214325618256]]] } }, + { "type": "Feature", "properties": { "admin": "French Southern and Antarctic Lands", "name": "Fr. S. Antarctic Lands", "continent": "Seven seas (open ocean)" }, "geometry": { "type": "Polygon", "coordinates": [[[68.935, -48.625], [69.58, -48.94], [70.525, -49.065], [70.56, -49.255], [70.28, -49.71], [68.745, -49.775], [68.72, -49.2425], [68.8675, -48.83], [68.935, -48.625]]] } }, + { "type": "Feature", "properties": { "admin": "Australia", "name": "Australia", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[145.397978143494782, -40.792548516605883], [146.364120721623692, -41.137695407883335], [146.908583612250823, -41.000546156580668], [147.689259474884125, -40.808258152022681], [148.289067824495987, -40.875437514002122], [148.359864536735785, -42.062445163746439], [148.017301467073082, -42.40702361426861], [147.914051955353784, -43.211522312188485], [147.564564243763982, -42.937688897473855], [146.87034305235494, -43.634597263362082], [146.663327264593647, -43.580853773778543], [146.048377720320389, -43.54974456153888], [145.431929559510536, -42.693776137056268], [145.295090366801674, -42.03360971452755], [144.7180713238306, -41.162551771815707], [144.743754510679622, -40.703975111657705], [145.397978143494782, -40.792548516605883]]], [[[143.561811151299935, -13.763655694232209], [143.922099237238882, -14.548310642152], [144.563713820574804, -14.171176039285879], [144.894908075133515, -14.594457696188622], [145.374723748963419, -14.984976495018284], [145.271991001567244, -15.428205254785691], [145.48525963763575, -16.285672295804769], [145.637033319276952, -16.784918308176611], [145.888904250267672, -16.906926364817647], [146.160308872664473, -17.76165455492524], [146.063673944278662, -18.280072523677315], [146.387478469019584, -18.958274021075905], [147.471081577747896, -19.480722751546676], [148.177601760042478, -19.955939222902767], [148.848413527623222, -20.391209812097252], [148.717465448195583, -20.633468926681513], [149.289420200802056, -21.260510756111096], [149.678337030230637, -22.342511895438388], [150.07738244038859, -22.122783705333315], [150.482939081015161, -22.556142266533012], [150.727265252891158, -22.402404880464655], [150.899554478152254, -23.462236830338679], [151.609175246384211, -24.076256198830755], [152.07353966695905, -24.45788665130619], [152.855197381805908, -25.267501316023008], [153.136162144176751, -26.071173191026187], [153.161948683890358, -26.641319268502439], [153.09290897034856, -27.260299574494503], [153.569469028944184, -28.110066827102099], [153.512108189100218, -28.995077406532751], [153.339095493787056, -29.458201592732443], [153.069241164358857, -30.350240166954809], [153.089601678681788, -30.923641859665445], [152.891577590139377, -31.640445651985949], [152.450002476205327, -32.550002536755237], [151.709117466436766, -33.041342054986337], [151.343971795862387, -33.816023451473846], [151.010555454715103, -34.310360202777879], [150.714139439089024, -35.173459974916803], [150.328219842733233, -35.671879164371923], [150.075212030232251, -36.420205580390508], [149.946124302367139, -37.109052422841224], [149.997283970336127, -37.425260512035123], [149.423882277625523, -37.772681166333463], [148.304622430615893, -37.809061374666875], [147.38173302631526, -38.219217217767543], [146.922122837511324, -38.606532077795116], [146.317921991154776, -39.035756524411433], [145.489652134380549, -38.593767999019043], [144.876976353128157, -38.41744801203911], [145.032212355732952, -37.896187839510972], [144.485682407814011, -38.085323581699257], [143.609973586196077, -38.809465427405321], [142.745426873952965, -38.538267510737519], [142.17832970598198, -38.380034275059835], [141.606581659104677, -38.308514092767872], [140.638578729413211, -38.019332777662541], [139.992158237874321, -37.402936293285094], [139.806588169514043, -36.643602797188272], [139.574147577065219, -36.138362318670666], [139.082808058834075, -35.732754001611774], [138.120747918856296, -35.612296237939397], [138.449461704664998, -35.127261244447887], [138.207564325106659, -34.384722588845925], [137.719170363516128, -35.07682504653102], [136.829405552314711, -35.260534763328614], [137.352371047108477, -34.707338555644093], [137.503886346588331, -34.130267836240769], [137.890116001537649, -33.640478610978327], [137.810327590079112, -32.900007012668105], [136.996837192940347, -33.752771498348629], [136.372069126531642, -34.094766127256186], [135.98904341038434, -34.89011809666048], [135.208212518454104, -34.478670342752601], [135.239218377829161, -33.947953383114971], [134.613416782774607, -33.222778008763136], [134.085903761939107, -32.848072198214759], [134.273902622617015, -32.617233575166949], [132.990776808809812, -32.011224053680188], [132.288080682504869, -31.982646986622761], [131.326330601120901, -31.495803318001041], [129.535793898639668, -31.590422865527476], [128.240937534702198, -31.948488864877849], [127.102867466338282, -32.282266941051041], [126.148713820501129, -32.2159660784206], [125.088623488465586, -32.728751316052829], [124.22164798390493, -32.959486586236061], [124.028946567888511, -33.483847344701708], [123.65966678273071, -33.890179131812722], [122.811036411633609, -33.914467054989835], [122.18306440642283, -34.003402194964217], [121.299190708502579, -33.821036065406126], [120.580268182458113, -33.930176690406618], [119.893695103028222, -33.976065362281808], [119.298899367348781, -34.50936614353396], [119.007340936357977, -34.464149265278529], [118.505717808100769, -34.746819349915093], [118.024971958489516, -35.064732761374707], [117.295507440257438, -35.025458672832862], [116.62510908413492, -35.025096937806829], [115.564346958479689, -34.386427911111547], [115.026808709779516, -34.196517022438918], [115.048616164206763, -33.623425388322026], [115.545123325667078, -33.487257989232951], [115.714673700016661, -33.259571628554944], [115.679378696761376, -32.900368747694124], [115.801645135563959, -32.205062351207026], [115.689610630355105, -31.612437025683782], [115.160909051576937, -30.601594333622455], [114.99704308477942, -30.030724786094162], [115.040037876446249, -29.461095472940794], [114.64197431850198, -28.810230808224706], [114.61649783738217, -28.516398614213042], [114.173579136208446, -28.118076674107321], [114.048883905088132, -27.33476531342712], [113.477497593236876, -26.543134047147898], [113.338953078262477, -26.116545098578477], [113.77835778204026, -26.549025160429174], [113.440962355606587, -25.621278171493152], [113.936901076311642, -25.911234633082877], [114.232852004047288, -26.298446140245868], [114.216160516417006, -25.786281019801105], [113.721255324357685, -24.998938897402123], [113.625343866024025, -24.683971042583146], [113.393523390762667, -24.384764499613262], [113.502043898575607, -23.80635019297025], [113.706992629045146, -23.56021534596406], [113.843418410295669, -23.059987481378734], [113.736551548316072, -22.475475355725372], [114.149756300921865, -21.755881036061009], [114.225307244932651, -22.51748829517863], [114.64776207891866, -21.829519952076904], [115.460167270979298, -21.495173435148541], [115.94737267462699, -21.068687839443708], [116.711615431791529, -20.701681817306817], [117.166316359527684, -20.623598728113802], [117.441545037914238, -20.746898695562162], [118.229558953932951, -20.374208265873232], [118.836085239742701, -20.263310642174822], [118.987807244951753, -20.044202569257319], [119.252493931150624, -19.952941989829835], [119.805225050944543, -19.976506442954978], [120.856220330896633, -19.683707777589188], [121.399856398607199, -19.239755547769729], [121.655137974129062, -18.70531788500713], [122.241665480641757, -18.197648614171765], [122.286623976735655, -17.798603204013911], [122.312772251475408, -17.254967136303446], [123.012574497571904, -16.405199883695854], [123.433789097183009, -17.268558037996225], [123.859344517106592, -17.069035332917249], [123.503242222183232, -16.596506036040363], [123.817073195491915, -16.11131601325199], [124.258286574399847, -16.32794361741956], [124.379726190285794, -15.567059828353973], [124.926152785340022, -15.07510019293532], [125.167275018413875, -14.680395603090004], [125.670086704613823, -14.510070082256018], [125.685796340030493, -14.230655612853834], [126.125149367376096, -14.347340996968949], [126.142822707219864, -14.095986830301211], [126.582589146023736, -13.95279143642041], [127.065867140817332, -13.817967624570922], [127.804633416861932, -14.276906019755042], [128.359689976108939, -14.869169610252253], [128.985543247595899, -14.875990899314738], [129.621473423379598, -14.969783623924553], [129.409600050982988, -14.420669854391031], [129.888640578328591, -13.618703301653481], [130.339465773642928, -13.357375583553473], [130.183506300985982, -13.107520033422301], [130.617795037966971, -12.536392103732464], [131.223494500859999, -12.183648776908113], [131.73509118054946, -12.302452894747159], [132.575298293183096, -12.114040622611013], [132.557211541881031, -11.603012383676683], [131.824698114143644, -11.273781833545097], [132.357223748911395, -11.128519382372641], [133.019560581596409, -11.376411228076844], [133.550845981989028, -11.786515394745134], [134.393068475481982, -12.042365411022173], [134.678632440327021, -11.9411829565947], [135.298491245667975, -12.248606052299051], [135.882693312727611, -11.962266940969796], [136.258380975489445, -12.049341729381606], [136.492475213771627, -11.857208754120389], [136.951620314684988, -12.351958916882735], [136.685124953355739, -12.887223402562054], [136.305406528875096, -13.291229750219895], [135.961758254134111, -13.324509372615889], [136.077616815332533, -13.72427825282578], [135.783836297753226, -14.223989353088211], [135.4286641786112, -14.715432224183896], [135.500184360903177, -14.997740573794427], [136.295174595281367, -15.550264987859121], [137.065360142159477, -15.870762220933353], [137.580470819244795, -16.215082289294084], [138.303217401278971, -16.807604261952658], [138.58516401586337, -16.806622409739173], [139.108542922115475, -17.062679131745366], [139.260574985918197, -17.371600843986183], [140.215245396078274, -17.710804945550063], [140.875463495039241, -17.36906869880394], [141.071110467696258, -16.832047214426719], [141.274095493738798, -16.388870131091604], [141.398222284103781, -15.840531508042584], [141.702183058844611, -15.044921156476928], [141.563380161708665, -14.561333103089506], [141.635520461188094, -14.270394789286284], [141.519868605718955, -13.698078301653805], [141.650920038011009, -12.944687595270562], [141.842691278246207, -12.741547539931187], [141.68699018775078, -12.407614434461134], [141.928629185147543, -11.877465915578778], [142.118488397387978, -11.328042087451619], [142.14370649634634, -11.04273650476814], [142.51526004452495, -10.668185723516642], [142.797310011974048, -11.157354831591515], [142.866763136974271, -11.784706719614929], [143.11594689348567, -11.90562957117791], [143.158631626558758, -12.325655612846187], [143.522123651299864, -12.834358412327429], [143.597157830987669, -13.400422051652594], [143.561811151299935, -13.763655694232209]]]] } }, + { "type": "Feature", "properties": { "admin": "Austria", "name": "Austria", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[16.979666782304033, 48.123497015976298], [16.903754103267257, 47.714865627628321], [16.340584344150411, 47.712901923201215], [16.534267612380372, 47.496170966169103], [16.202298211337361, 46.852385972676949], [16.011663852612653, 46.683610744811688], [15.137091912504982, 46.658702704447016], [14.632471551174827, 46.431817328469535], [13.806475457421524, 46.509306138691201], [12.376485223040813, 46.767559109069843], [12.153088006243051, 47.115393174826437], [11.164827915093268, 46.941579494812721], [11.048555942436533, 46.751358547546324], [10.442701450246627, 46.893546250997424], [9.932448357796657, 46.920728054382948], [9.479969516649019, 47.102809963563367], [9.632931756232974, 47.347601223329974], [9.594226108446346, 47.525058091820256], [9.896068149463188, 47.58019684507569], [10.402083774465209, 47.302487697939156], [10.544504021861625, 47.566399237653762], [11.426414015354736, 47.523766181012967], [12.141357456112784, 47.703083401065761], [12.620759718484491, 47.672387600284395], [12.932626987365945, 47.467645575543983], [13.025851271220487, 47.637583523135824], [12.884102817443901, 48.289145819687903], [13.243357374736998, 48.41611481382904], [13.595945672264433, 48.877171942737135], [14.33889773932472, 48.555305284207193], [14.901447381254055, 48.964401760445817], [15.253415561593979, 49.039074205107575], [16.029647251050218, 48.733899034207916], [16.49928266771877, 48.785808010445095], [16.960288120194573, 48.596982326850593], [16.879982944412998, 48.470013332709463], [16.979666782304033, 48.123497015976298]]] } }, + { "type": "Feature", "properties": { "admin": "Azerbaijan", "name": "Azerbaijan", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[45.001987339056789, 39.740003567049591], [45.298144972521435, 39.471751207022422], [45.739978468616997, 39.473999131827149], [45.735379266143092, 39.319719143219785], [46.143623081248812, 38.74120148371221], [45.457721795438729, 38.874139105783108], [44.952688022650264, 39.33576467544642], [44.79398969908199, 39.713002631177027], [45.001987339056789, 39.740003567049591]]], [[[47.373315464066216, 41.219732367511249], [47.81566572448471, 41.151416124021338], [47.987283156126033, 41.405819200194223], [48.584352654826283, 41.808869533854669], [49.110263706260653, 41.282286688800518], [49.618914829309588, 40.572924302729966], [50.084829542853093, 40.526157131505776], [50.392821079312704, 40.256561184239096], [49.569202101444795, 40.176100979160701], [49.395259230350419, 39.39948171646224], [49.2232283872507, 39.04921885838791], [48.856532423707584, 38.815486355131775], [48.883249139202533, 38.320245266262638], [48.634375441284831, 38.270377509100925], [48.010744256386502, 38.794014797514528], [48.355529412637928, 39.288764960276886], [48.060095249225256, 39.582235419262439], [47.685079380083117, 39.508363959301185], [46.505719842317966, 38.770605373686251], [46.483498976432443, 39.464154771475528], [46.034534132680697, 39.628020738273044], [45.610012241402913, 39.899993801425175], [45.891907179555133, 40.21847565363997], [45.359174839058156, 40.561503811193482], [45.560351189970469, 40.812289537105947], [45.179495883979392, 40.98535390885143], [44.972480096218156, 41.248128567055623], [45.217426385281634, 41.411451931314041], [45.962600538930438, 41.123872585609789], [46.501637404166978, 41.064444688474104], [46.637908156120567, 41.181672675128219], [46.145431756378983, 41.72280243587263], [46.404950799348818, 41.860675157227341], [46.686070591016652, 41.827137152669899], [47.373315464066216, 41.219732367511249]]]] } }, + { "type": "Feature", "properties": { "admin": "Burundi", "name": "Burundi", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[29.339997592900342, -4.499983412294092], [29.276383904749046, -3.293907159034063], [29.02492638521678, -2.839257907730157], [29.632176141078585, -2.917857761246096], [29.938359002407935, -2.348486830254238], [30.469696079232978, -2.413857517103458], [30.527677036264457, -2.807631931167534], [30.743012729624692, -3.034284763199686], [30.752262811004943, -3.359329522315569], [30.505559523243559, -3.568567396665364], [30.116332635221166, -4.090137627787242], [29.753512404099919, -4.45238941815328], [29.339997592900342, -4.499983412294092]]] } }, + { "type": "Feature", "properties": { "admin": "Belgium", "name": "Belgium", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[3.314971144228536, 51.345780951536071], [4.047071160507527, 51.267258612668556], [4.973991326526913, 51.475023708698124], [5.60697594567, 51.037298488969768], [6.156658155958779, 50.803721015010574], [6.043073357781109, 50.128051662794221], [5.782417433300905, 50.090327867221205], [5.674051954784828, 49.52948354755749], [4.799221632515809, 49.985373033236371], [4.286022983425084, 49.90749664977254], [3.588184441755685, 50.378992418003563], [3.123251580425801, 50.780363267614561], [2.658422071960274, 50.796848049515731], [2.513573032246142, 51.148506171261815], [3.314971144228536, 51.345780951536071]]] } }, + { "type": "Feature", "properties": { "admin": "Benin", "name": "Benin", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[2.691701694356254, 6.258817246928628], [1.865240512712318, 6.14215770102973], [1.618950636409238, 6.832038072126236], [1.664477573258381, 9.128590399609378], [1.46304284018467, 9.334624335157086], [1.425060662450136, 9.825395412632998], [1.077795037448737, 10.175606594275022], [0.772335646171484, 10.470808213742357], [0.899563022474069, 10.997339382364258], [1.243469679376488, 11.11051076908346], [1.447178175471066, 11.547719224488857], [1.93598554851988, 11.641150214072551], [2.154473504249921, 11.940150051313337], [2.49016360841793, 12.233052069543671], [2.84864301922667, 12.235635891158266], [3.611180454125558, 11.660167141155966], [3.572216424177469, 11.327939357951516], [3.797112257511713, 10.734745591673104], [3.600070021182801, 10.332186184119406], [3.705438266625918, 10.063210354040207], [3.220351596702101, 9.4441525333997], [2.912308383810255, 9.13760793704432], [2.723792758809509, 8.506845404489708], [2.74906253420022, 7.870734361192886], [2.691701694356254, 6.258817246928628]]] } }, + { "type": "Feature", "properties": { "admin": "Burkina Faso", "name": "Burkina Faso", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-2.827496303712706, 9.642460842319775], [-3.511898972986272, 9.900326239456216], [-3.980449184576684, 9.862344061721698], [-4.330246954760383, 9.610834865757139], [-4.779883592131966, 9.821984768101741], [-4.954653286143098, 10.152713934769732], [-5.404341599946973, 10.370736802609144], [-5.470564947929004, 10.951269842976044], [-5.197842576508648, 11.375145778850136], [-5.220941941743119, 11.713858954307224], [-4.427166103523802, 12.542645575404292], [-4.280405035814879, 13.228443508349738], [-4.006390753587225, 13.472485459848112], [-3.52280270019986, 13.337661647998612], [-3.103706834312759, 13.54126679122859], [-2.967694464520576, 13.798150336151506], [-2.191824510090384, 14.246417548067352], [-2.001035122068771, 14.559008287000887], [-1.066363491205663, 14.973815009007764], [-0.515854458000348, 15.116157741755725], [-0.26625729003058, 14.924308986872147], [0.374892205414682, 14.928908189346128], [0.295646396495101, 14.444234930880651], [0.429927605805517, 13.988733018443922], [0.993045688490071, 13.335749620003821], [1.024103224297477, 12.851825669806573], [2.177107781593775, 12.625017808477532], [2.154473504249921, 11.940150051313337], [1.93598554851988, 11.641150214072551], [1.447178175471066, 11.547719224488857], [1.243469679376488, 11.11051076908346], [0.899563022474069, 10.997339382364258], [0.023802524423701, 11.018681748900802], [-0.438701544588582, 11.09834096927872], [-0.761575893548183, 10.936929633015053], [-1.203357713211431, 11.009819240762736], [-2.94040930827046, 10.962690334512557], [-2.963896246747111, 10.395334784380081], [-2.827496303712706, 9.642460842319775]]] } }, + { "type": "Feature", "properties": { "admin": "Bangladesh", "name": "Bangladesh", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[92.672720981825549, 22.041238918541247], [92.652257114637976, 21.324047552978481], [92.30323449093865, 21.475485337809815], [92.368553501355606, 20.670883287025344], [92.082886183646124, 21.192195135985767], [92.025215285208361, 21.701569729086764], [91.834890985077408, 22.182935695885561], [91.417087029997646, 22.765019029221218], [90.496006300827247, 22.805016587815125], [90.586956821660948, 22.392793687422863], [90.272970819055544, 21.836367702720107], [89.847467075564268, 22.039146023033421], [89.70204959509492, 21.857115790285299], [89.41886274613546, 21.966178900637296], [89.031961297566198, 22.055708319582973], [88.876311883503064, 22.879146429937826], [88.529769728553759, 23.631141872649163], [88.699940220090895, 24.233714911388557], [88.084422235062405, 24.501657212821918], [88.30637251175601, 24.866079413344199], [88.931553989623069, 25.238692328384769], [88.209789259802477, 25.768065700782707], [88.56304935094974, 26.446525580342716], [89.355094028687276, 26.014407253518065], [89.832480910199592, 25.965082098895476], [89.920692580121838, 25.269749864192171], [90.872210727912105, 25.13260061288954], [91.799595981822065, 25.14743174895731], [92.376201613334786, 24.976692816664961], [91.915092807994398, 24.130413723237108], [91.467729933643668, 24.072639471934789], [91.158963250699713, 23.503526923104381], [91.706475050832083, 22.985263983649183], [91.869927606171302, 23.62434642180278], [92.146034783906799, 23.62749868417259], [92.672720981825549, 22.041238918541247]]] } }, + { "type": "Feature", "properties": { "admin": "Bulgaria", "name": "Bulgaria", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[22.657149692482985, 44.234923000661276], [22.94483239105184, 43.823785305347123], [23.332302280376322, 43.897010809904707], [24.100679152124169, 43.741051337247846], [25.569271681426923, 43.688444729174712], [26.065158725699739, 43.943493760751259], [27.242399529740904, 44.175986029632398], [27.970107049275068, 43.812468166675202], [28.55808149589199, 43.707461656258118], [28.039095086384712, 43.293171698574177], [27.673897739378042, 42.577892361006214], [27.996720411905383, 42.007358710287775], [27.135739373490473, 42.141484890301335], [26.117041863720793, 41.826904608724554], [26.106138136507205, 41.328898830727766], [25.197201368925441, 41.234485988930523], [24.492644891058031, 41.583896185872028], [23.692073601992345, 41.309080918943842], [22.952377150166445, 41.337993882811141], [22.881373732197424, 41.999297186850242], [22.380525750424585, 42.320259507815081], [22.545011834409614, 42.461362006188025], [22.436594679461273, 42.580321153323929], [22.604801466571324, 42.898518785161137], [22.986018507588479, 43.211161200526959], [22.500156691180276, 43.642814439460977], [22.410446404721593, 44.008063462899948], [22.657149692482985, 44.234923000661276]]] } }, + { "type": "Feature", "properties": { "admin": "The Bahamas", "name": "Bahamas", "continent": "North America" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-77.53466, 23.75975], [-77.78, 23.71], [-78.03405, 24.28615], [-78.40848, 24.57564], [-78.19087, 25.2103], [-77.89, 25.17], [-77.54, 24.34], [-77.53466, 23.75975]]], [[[-77.82, 26.58], [-78.91, 26.42], [-78.98, 26.79], [-78.51, 26.87], [-77.85, 26.84], [-77.82, 26.58]]], [[[-77.0, 26.59], [-77.17255, 25.87918], [-77.35641, 26.00735], [-77.34, 26.53], [-77.78802, 26.92516], [-77.79, 27.04], [-77.0, 26.59]]]] } }, + { "type": "Feature", "properties": { "admin": "Bosnia and Herzegovina", "name": "Bosnia and Herz.", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[19.005486281010118, 44.860233669609144], [19.36803, 44.863], [19.11761, 44.42307], [19.59976, 44.03847], [19.454, 43.568100000000115], [19.21852, 43.52384], [19.03165, 43.43253], [18.70648, 43.20011], [18.56, 42.65], [17.674921502358981, 43.028562527023603], [17.297373488034449, 43.446340643887353], [16.916156447017325, 43.667722479825663], [16.456442905348862, 44.041239732431265], [16.239660271884528, 44.351143296885695], [15.750026075918978, 44.81871165626255], [15.959367303133373, 45.233776760430935], [16.318156772535868, 45.004126695325901], [16.534939406000202, 45.211607570977705], [17.00214603035101, 45.233776760430935], [17.861783481526398, 45.067740383477137], [18.553214145591646, 45.08158966733145], [19.005486281010118, 44.860233669609144]]] } }, + { "type": "Feature", "properties": { "admin": "Belarus", "name": "Belarus", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[23.484127638449841, 53.912497667041123], [24.45068362803703, 53.905702216194747], [25.536353794056989, 54.282423407602515], [25.768432651479792, 54.846962592175082], [26.588279249790386, 55.167175604871659], [26.494331495883749, 55.61510691997762], [27.102459751094525, 55.783313707087672], [28.17670942557799, 56.169129950578807], [29.2295133806603, 55.918344224666356], [29.371571893030669, 55.67009064393617], [29.896294386522353, 55.789463202530406], [30.87390913262, 55.550976467503396], [30.971835971813132, 55.081547756564028], [30.75753380709871, 54.811770941784303], [31.384472283663733, 54.157056382862422], [31.791424187962232, 53.974638576872117], [31.731272820774503, 53.794029446012011], [32.405598585751157, 53.618045355842028], [32.693643019346034, 53.351420803432106], [32.304519484188226, 53.132726141972903], [31.497643670382924, 53.167426866256889], [31.30520063652801, 53.073995876673195], [31.540018344862254, 52.742052313846344], [31.78599816257158, 52.10167796488544], [30.927549269338975, 52.042353420614383], [30.619454380014837, 51.822806098022362], [30.55511722181145, 51.319503485715643], [30.157363722460889, 51.416138414101454], [29.254938185347921, 51.368234361366881], [28.992835320763522, 51.602044379271462], [28.617612745892242, 51.427713934934836], [28.241615024536564, 51.572227077839059], [27.454066196408426, 51.59230337178446], [26.337958611768549, 51.832288723347915], [25.327787713327005, 51.910656032918538], [24.553106316839511, 51.888461005249177], [24.005077752384206, 51.617443956094448], [23.52707075368437, 51.578454087930233], [23.508002150168689, 52.023646552124717], [23.19949384938618, 52.486977444053664], [23.799198846133375, 52.691099351606553], [23.804934930117774, 53.08973135030606], [23.527535841574995, 53.47012156840654], [23.484127638449841, 53.912497667041123]]] } }, + { "type": "Feature", "properties": { "admin": "Belize", "name": "Belize", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-89.143080410503302, 17.808318996649316], [-89.150909389995519, 17.955467637600414], [-89.029857347351808, 18.001511338772485], [-88.848343878926585, 17.883198147040229], [-88.490122850279334, 18.486830552641603], [-88.300031094093669, 18.499982204659897], [-88.296336229184803, 18.353272813383263], [-88.106812913754368, 18.348673610909284], [-88.123478563168476, 18.076674709541003], [-88.285354987322776, 17.644142971258031], [-88.197866787452625, 17.489475409408453], [-88.302640753924422, 17.13169363043566], [-88.239517991879893, 17.036066392479551], [-88.355428229510551, 16.530774237529624], [-88.551824510435821, 16.265467434143144], [-88.732433641295927, 16.233634751851351], [-88.930612759135244, 15.887273464415072], [-89.229121670269265, 15.886937567605166], [-89.15080603713092, 17.015576687075832], [-89.143080410503302, 17.808318996649316]]] } }, + { "type": "Feature", "properties": { "admin": "Bolivia", "name": "Bolivia", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-62.84646847192154, -22.034985446869442], [-63.986838141522462, -21.993644301035946], [-64.377021043542243, -22.798091322523533], [-64.964892137294598, -22.07586150481232], [-66.273339402924833, -21.832310479420713], [-67.10667355006359, -22.735924574476414], [-67.82817989772272, -22.872918796482171], [-68.219913092711266, -21.494346612231858], [-68.757167121033731, -20.372657972904459], [-68.442225104430904, -19.405068454671426], [-68.966818406841853, -18.9816834449041], [-69.100246955019472, -18.260125420812674], [-69.590423753524036, -17.580011895419329], [-68.959635382753291, -16.500697930571267], [-69.389764166934697, -15.66012908291165], [-69.160346645774936, -15.323973890853015], [-69.339534674747, -14.953195489158828], [-68.94888668483658, -14.45363941819328], [-68.929223802349526, -13.602683607643007], [-68.880079515239956, -12.89972909917665], [-68.665079718689611, -12.561300144097171], [-69.52967810736493, -10.951734307502193], [-68.786157599549469, -11.036380303596276], [-68.27125362819325, -11.014521172736817], [-68.048192308205373, -10.712059014532484], [-67.173801235610725, -10.30681243249961], [-66.646908331962791, -9.931331475466861], [-65.33843522811641, -9.76198780684639], [-65.444837002205375, -10.51145110437543], [-65.321898769783004, -10.895872084194675], [-65.402281460213018, -11.566270440317151], [-64.31635291203159, -12.461978041232191], [-63.196498786050562, -12.627032565972433], [-62.803060268796372, -13.000653171442682], [-62.127080857986371, -13.19878061284972], [-61.713204311760769, -13.489202162330049], [-61.084121263255646, -13.479383640194595], [-60.503304002511122, -13.775954685117656], [-60.459198167550014, -14.354007256734551], [-60.264326341377355, -14.645979099183638], [-60.251148851142922, -15.077218926659318], [-60.542965664295131, -15.093910414289592], [-60.158389655179022, -16.258283786690082], [-58.241219855366673, -16.299573256091289], [-58.388058437724027, -16.877109063385273], [-58.280804002502244, -17.271710300366014], [-57.734558274960989, -17.552468357007765], [-57.498371141170971, -18.174187513911289], [-57.676008877174297, -18.961839694904025], [-57.949997321185819, -19.400004164306814], [-57.853801642474494, -19.969995212486186], [-58.166392381408038, -20.176700941653674], [-58.183471442280492, -19.868399346600359], [-59.11504248720609, -19.356906019775398], [-60.043564622626477, -19.342746677327419], [-61.786326463453761, -19.633736667562957], [-62.265961269770784, -20.513734633061272], [-62.291179368729203, -21.051634616787389], [-62.685057135657871, -22.24902922942238], [-62.84646847192154, -22.034985446869442]]] } }, + { "type": "Feature", "properties": { "admin": "Brazil", "name": "Brazil", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-57.625133429582945, -30.216294854454258], [-56.290899624239067, -28.852760512000884], [-55.162286342984558, -27.881915378533456], [-54.49072526713551, -27.474756768505785], [-53.648735317587885, -26.923472588816086], [-53.628348965048737, -26.124865004177465], [-54.130049607954376, -25.547639255477247], [-54.625290696823562, -25.739255466415507], [-54.428946092330577, -25.162184747012162], [-54.293476325077435, -24.570799655863958], [-54.292959560754511, -24.021014092710722], [-54.652834235235119, -23.839578138933955], [-55.027901780809543, -24.001273695575225], [-55.400747239795407, -23.956935316668797], [-55.517639329639621, -23.57199757252663], [-55.61068274598113, -22.655619398694839], [-55.797958136606894, -22.356929620047815], [-56.473317430229379, -22.086300144135279], [-56.881509568902885, -22.282153822521476], [-57.937155727761287, -22.090175876557169], [-57.870673997617786, -20.732687676681948], [-58.166392381408038, -20.176700941653674], [-57.853801642474494, -19.969995212486186], [-57.949997321185819, -19.400004164306814], [-57.676008877174297, -18.961839694904025], [-57.498371141170971, -18.174187513911289], [-57.734558274960989, -17.552468357007765], [-58.280804002502244, -17.271710300366014], [-58.388058437724027, -16.877109063385273], [-58.241219855366673, -16.299573256091289], [-60.158389655179022, -16.258283786690082], [-60.542965664295131, -15.093910414289592], [-60.251148851142922, -15.077218926659318], [-60.264326341377355, -14.645979099183638], [-60.459198167550014, -14.354007256734551], [-60.503304002511122, -13.775954685117656], [-61.084121263255646, -13.479383640194595], [-61.713204311760769, -13.489202162330049], [-62.127080857986371, -13.19878061284972], [-62.803060268796372, -13.000653171442682], [-63.196498786050562, -12.627032565972433], [-64.31635291203159, -12.461978041232191], [-65.402281460213018, -11.566270440317151], [-65.321898769783004, -10.895872084194675], [-65.444837002205375, -10.51145110437543], [-65.33843522811641, -9.76198780684639], [-66.646908331962791, -9.931331475466861], [-67.173801235610725, -10.30681243249961], [-68.048192308205373, -10.712059014532484], [-68.27125362819325, -11.014521172736817], [-68.786157599549469, -11.036380303596276], [-69.52967810736493, -10.951734307502193], [-70.093752204046879, -11.123971856331011], [-70.548685675728393, -11.009146823778462], [-70.481893886991159, -9.490118096558842], [-71.302412278921523, -10.079436130415372], [-72.184890713169821, -10.05359791426943], [-72.563033006465631, -9.520193780152715], [-73.226713426390148, -9.462212823121233], [-73.015382656532537, -9.03283334720806], [-73.571059332967053, -8.424446709835832], [-73.987235480429646, -7.523829847853063], [-73.723401455363486, -7.340998630404412], [-73.724486660441627, -6.918595472850638], [-73.120027431923575, -6.629930922068238], [-73.219711269814596, -6.089188734566076], [-72.964507208941185, -5.741251315944892], [-72.891927659787243, -5.274561455916979], [-71.748405727816532, -4.59398284263301], [-70.928843349883564, -4.401591485210367], [-70.79476884630229, -4.251264743673302], [-69.893635219996611, -4.298186944194326], [-69.444101935489599, -1.556287123219817], [-69.420485805932216, -1.122618503426409], [-69.577065395776586, -0.549991957200163], [-70.02065589057004, -0.185156345219539], [-70.015565761989293, 0.541414292804205], [-69.452396002872447, 0.706158758950693], [-69.252434048119042, 0.602650865070075], [-69.218637661400166, 0.985676581217433], [-69.804596727157701, 1.089081122233466], [-69.816973232691609, 1.714805202639624], [-67.868565029558823, 1.692455145673392], [-67.537810024674684, 2.037162787276329], [-67.25999752467358, 1.719998684084956], [-67.065048183852483, 1.130112209473225], [-66.876325853122566, 1.253360500489336], [-66.325765143484944, 0.724452215982012], [-65.548267381437554, 0.78925446207603], [-65.354713304288353, 1.0952822941085], [-64.611011928959854, 1.328730576987041], [-64.199305792890499, 1.49285492594602], [-64.083085496666072, 1.91636912679408], [-63.368788011311644, 2.200899562993129], [-63.422867397705105, 2.411067613124174], [-64.269999152265783, 2.497005520025566], [-64.408827887617903, 3.126786200366623], [-64.368494432214092, 3.797210394705246], [-64.816064012294007, 4.056445217297422], [-64.628659430587533, 4.14848094320925], [-63.888342861574145, 4.020530096854571], [-63.093197597899092, 3.770571193858784], [-62.804533047116692, 4.006965033377951], [-62.085429653559125, 4.162123521334308], [-60.966893276601517, 4.536467596856638], [-60.601179165271922, 4.918098049332129], [-60.733574184803707, 5.2002772078619], [-60.213683437731319, 5.2444863956876], [-59.980958624904865, 5.014061184098138], [-60.111002366767373, 4.574966538914082], [-59.767405768458701, 4.423502915866606], [-59.538039923731219, 3.958802598481937], [-59.815413174057852, 3.606498521332085], [-59.974524909084543, 2.755232652188055], [-59.718545701726732, 2.249630438644359], [-59.646043667221242, 1.786893825686789], [-59.030861579002639, 1.317697658692722], [-58.540012986878288, 1.26808828369252], [-58.429477098205957, 1.46394196207872], [-58.113449876525003, 1.507195135907025], [-57.660971035377358, 1.682584947105638], [-57.33582292339689, 1.948537705895759], [-56.782704230360814, 1.863710842288653], [-56.53938574891454, 1.89952260986692], [-55.995698004771739, 1.817667141116601], [-55.905600145070871, 2.021995754398659], [-56.073341844290283, 2.220794989425499], [-55.973322109589361, 2.510363877773016], [-55.569755011605984, 2.42150625244713], [-55.097587449755125, 2.523748073736612], [-54.524754197799709, 2.311848863123785], [-54.088062506717243, 2.105556545414629], [-53.778520677288903, 2.376702785650081], [-53.554839240113537, 2.33489655192595], [-53.4184651352953, 2.05338918701598], [-52.939657151894949, 2.124857692875636], [-52.556424730018414, 2.504705308437053], [-52.249337531123942, 3.241094468596244], [-51.657797410678882, 4.156232408053028], [-51.317146369010842, 4.203490505383953], [-51.069771287629649, 3.65039765056403], [-50.508875291533641, 1.901563828942456], [-49.974075893745045, 1.736483465986069], [-49.947100796088705, 1.046189683431223], [-50.699251268096901, 0.222984117021681], [-50.388210822132123, -0.078444512536819], [-48.620566779156313, -0.235489190271821], [-48.584496629416577, -1.237805271005001], [-47.824956427590621, -0.5816179337628], [-46.566583624851219, -0.941027520352776], [-44.9057030909904, -1.551739597178134], [-44.417619187993658, -2.137750339367975], [-44.581588507655773, -2.691308282078523], [-43.418791266440188, -2.383110039889793], [-41.47265682632824, -2.912018324397116], [-39.97866533055403, -2.87305429444904], [-38.50038347019656, -3.700652357603394], [-37.223252122535193, -4.820945733258915], [-36.45293738457638, -5.109403578312153], [-35.597795783010454, -5.149504489770648], [-35.235388963347553, -5.464937432480245], [-34.896029832486825, -6.738193047719709], [-34.729993455533027, -7.343220716992965], [-35.128212042774216, -8.996401462442284], [-35.636966518687707, -9.649281508017811], [-37.046518724096991, -11.040721123908799], [-37.683611619607355, -12.17119475672582], [-38.423876512188436, -13.038118584854285], [-38.673887091616507, -13.057652276260615], [-38.953275722802537, -13.79336964280002], [-38.882298143049645, -15.667053724838764], [-39.161092495264306, -17.208406670808468], [-39.267339240056394, -17.867746270420479], [-39.583521491034219, -18.262295830968934], [-39.76082333022763, -19.599113457927402], [-40.774740770010332, -20.90451181405242], [-40.944756232250597, -21.937316989837807], [-41.75416419123821, -22.370675551037454], [-41.988284267736546, -22.970070489190888], [-43.074703742024738, -22.967693373305462], [-44.647811855637798, -23.351959323827838], [-45.35213578955991, -23.796841729428579], [-46.472093268405523, -24.088968601174539], [-47.648972337420645, -24.885199069927715], [-48.495458136577689, -25.877024834905647], [-48.641004808127725, -26.623697605090928], [-48.474735887228647, -27.175911960561887], [-48.661520351747612, -28.186134535435713], [-48.888457404157393, -28.674115085567877], [-49.587329474472668, -29.224469089476333], [-50.696874152211478, -30.984465020472953], [-51.576226162306149, -31.777698256153204], [-52.256081305538032, -32.245369968394662], [-52.71209998229768, -33.196578057591175], [-53.373661668498229, -33.768377780900757], [-53.650543992718084, -33.202004082981823], [-53.209588995971529, -32.727666110974717], [-53.787951626182185, -32.047242526987617], [-54.572451544805105, -31.494511407193745], [-55.601510179249331, -30.853878676071385], [-55.97324459494093, -30.883075860316296], [-56.976025763564721, -30.109686374636119], [-57.625133429582945, -30.216294854454258]]] } }, + { "type": "Feature", "properties": { "admin": "Brunei", "name": "Brunei", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[114.204016554828343, 4.525873928236805], [114.599961379048707, 4.900011298029965], [115.450710483869798, 5.447729803891532], [115.405700311343566, 4.955227565933837], [115.347460972150643, 4.316636053887009], [114.869557326315373, 4.348313706881924], [114.659595981913498, 4.007636826997753], [114.204016554828343, 4.525873928236805]]] } }, + { "type": "Feature", "properties": { "admin": "Bhutan", "name": "Bhutan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[91.69665652869665, 27.771741848251661], [92.10371178585973, 27.4526140406332], [92.033483514375078, 26.838310451763554], [91.217512648486405, 26.808648179628019], [90.37327477413406, 26.875724188742872], [89.744527622438838, 26.71940298105995], [88.835642531289366, 27.098966376243755], [88.814248488320544, 27.299315904239361], [89.475810174521101, 28.04275889740639], [90.015828891971154, 28.296438503527209], [90.730513950567769, 28.064953925075748], [91.258853794319904, 28.040614325466287], [91.69665652869665, 27.771741848251661]]] } }, + { "type": "Feature", "properties": { "admin": "Botswana", "name": "Botswana", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[25.649163445750155, -18.536025892818987], [25.850391473094724, -18.714412937090533], [26.164790887158478, -19.293085625894935], [27.296504754350501, -20.391519870690995], [27.724747348753247, -20.499058526290387], [27.727227817503252, -20.851801853114711], [28.02137007010861, -21.485975030200578], [28.794656202924209, -21.639454034107445], [29.432188348109033, -22.091312758067584], [28.017235955525244, -22.827753594659072], [27.119409620886238, -23.574323011979772], [26.78640669119741, -24.240690606383478], [26.485753208123292, -24.616326592713097], [25.941652052522151, -24.696373386333214], [25.765848829865206, -25.174845472923671], [25.664666375437712, -25.486816094669706], [25.025170525825782, -25.719670098576891], [24.211266717228792, -25.670215752873567], [23.733569777122703, -25.39012948985161], [23.312096795350179, -25.268689873965712], [22.824271274514896, -25.500458672794768], [22.579531691180584, -25.979447523708142], [22.105968865657864, -26.28025603607913], [21.60589603036939, -26.726533705351748], [20.889609002371731, -26.828542982695907], [20.666470167735437, -26.477453301704916], [20.758609246511831, -25.868136488551446], [20.165725538827186, -24.917961928000768], [19.895767856534427, -24.767790215760588], [19.895457797940672, -21.849156996347865], [20.881134067475866, -21.814327080983144], [20.910641310314531, -18.252218926672018], [21.655040317478971, -18.219146010005222], [23.196858351339298, -17.869038181227783], [23.579005568137713, -18.281261081620055], [24.217364536239209, -17.889347019118485], [24.520705193792534, -17.887124932529932], [25.084443393664564, -17.661815687737366], [25.264225701608005, -17.736539808831413], [25.649163445750155, -18.536025892818987]]] } }, + { "type": "Feature", "properties": { "admin": "Central African Republic", "name": "Central African Rep.", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[15.279460483469107, 7.421924546737968], [16.106231723706767, 7.497087917506504], [16.290561557691884, 7.754307359239304], [16.456184523187343, 7.734773667832966], [16.705988396886251, 7.508327541529978], [17.964929640380884, 7.890914008002865], [18.389554884523218, 8.281303615751822], [18.911021762780504, 8.630894680206351], [18.81200971850927, 8.982914536978596], [19.094008009526018, 9.074846910025837], [20.059685499764267, 9.01270600019485], [21.00086836109616, 9.475985215691507], [21.723821648859452, 10.567055568885973], [22.231129184668784, 10.971888739460507], [22.864165480244218, 11.142395127807543], [22.977543572692603, 10.714462591998538], [23.554304233502187, 10.089255275915306], [23.557249790142826, 9.681218166538683], [23.394779087017181, 9.26506785729222], [23.459012892355979, 8.954285793488891], [23.805813429466745, 8.666318874542425], [24.567369012152078, 8.229187933785466], [25.114932488716786, 7.825104071479172], [25.12413089366472, 7.500085150579436], [25.796647983511171, 6.979315904158069], [26.21341840994511, 6.546603298362071], [26.465909458123232, 5.94671743410187], [27.213409051225163, 5.550953477394557], [27.374226108517483, 5.233944403500059], [27.044065382604703, 5.127852688004835], [26.402760857862535, 5.150874538590869], [25.650455356557465, 5.256087754737123], [25.278798455514302, 5.170408229997191], [25.128833449003274, 4.927244777847789], [24.805028924262409, 4.897246608902349], [24.41053104014625, 5.108784084489129], [23.297213982850135, 4.609693101414221], [22.841479526468103, 4.710126247573483], [22.704123569436284, 4.633050848810156], [22.405123732195531, 4.02916006104732], [21.659122755630019, 4.224341945813719], [20.927591180106273, 4.322785549329736], [20.290679152108932, 4.691677761245287], [19.467783644293146, 5.031527818212779], [18.932312452884755, 4.709506130385973], [18.542982211997778, 4.201785183118317], [18.453065219809925, 3.504385891123348], [17.809900343505259, 3.560196437998569], [17.133042433346297, 3.728196519379451], [16.537058139724135, 3.198254706226278], [16.01285241055535, 2.267639675298084], [15.907380812247649, 2.557389431158612], [15.862732374747479, 3.013537298998982], [15.405395948964379, 3.335300604664339], [15.036219516671249, 3.851367295747123], [14.950953403389658, 4.21038930909492], [14.478372430080466, 4.732605495620446], [14.558935988023501, 5.03059764243153], [14.459407179429345, 5.451760565610299], [14.536560092841111, 6.22695872642069], [14.776545444404572, 6.408498033062044], [15.279460483469107, 7.421924546737968]]] } }, + { "type": "Feature", "properties": { "admin": "Canada", "name": "Canada", "continent": "North America" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-63.6645, 46.55001], [-62.9393, 46.41587], [-62.01208, 46.44314], [-62.50391, 46.03339], [-62.87433, 45.96818], [-64.1428, 46.39265], [-64.39261, 46.72747], [-64.01486, 47.03601], [-63.6645, 46.55001]]], [[[-61.806305, 49.10506], [-62.29318, 49.08717], [-63.58926, 49.40069], [-64.51912, 49.87304], [-64.17322, 49.95718], [-62.85829, 49.70641], [-61.835585, 49.28855], [-61.806305, 49.10506]]], [[[-123.510001587551116, 48.51001089130343], [-124.012890788399474, 48.370846259141402], [-125.655012777338342, 48.825004584338494], [-125.954994466792726, 49.179995835967638], [-126.850004435871853, 49.530000311880421], [-127.029993449544392, 49.814995835970073], [-128.059336304366212, 49.994959011426594], [-128.444584107102145, 50.53913768167611], [-128.358413656255408, 50.770648098343678], [-127.308581096029883, 50.552573554071948], [-126.695000977212302, 50.40090322529538], [-125.755006673823161, 50.295018215529367], [-125.415001587558791, 49.950000515332604], [-124.920768189119315, 49.47527497008339], [-123.92250870832099, 49.062483628935794], [-123.510001587551116, 48.51001089130343]]], [[[-56.134035814017111, 50.687009792679298], [-56.795881720595261, 49.812308661490945], [-56.143105027884289, 50.15011749938283], [-55.471492275602934, 49.935815334668447], [-55.822401089080913, 49.587128607779093], [-54.93514258484565, 49.313010972686833], [-54.473775397343772, 49.556691189159167], [-53.47654944519131, 49.24913890237405], [-53.786013759971233, 48.516780503933617], [-53.086133999226249, 48.687803656603528], [-52.95864824076223, 48.157164211614472], [-52.648098720904173, 47.53554840757549], [-53.069158291218336, 46.655498765644936], [-53.521456264853029, 46.618291734394823], [-54.178935512902527, 46.807065741556997], [-53.961868659060471, 47.625207017601909], [-54.240482143762122, 47.752279364607617], [-55.400773078011483, 46.88499380145312], [-55.997480841685835, 46.919720363953289], [-55.291219041552765, 47.389562486350982], [-56.250798712780508, 47.632545070987383], [-57.325229254777085, 47.572807115257987], [-59.26601518414676, 47.603347886742498], [-59.41949418805369, 47.89945384377485], [-58.796586473207398, 48.251525376979473], [-59.23162451845652, 48.523188381537793], [-58.391804979065213, 49.125580552764163], [-57.358689744686025, 50.718274034215845], [-56.738650071831998, 51.287438259478527], [-55.87097693543528, 51.632094224649187], [-55.406974249886602, 51.588272610065722], [-55.600218268442077, 51.317074693397913], [-56.134035814017111, 50.687009792679298]]], [[[-133.180004041711669, 54.169975490935308], [-132.710007884431292, 54.040009315423518], [-131.749989584003259, 54.120004380909208], [-132.049480347350965, 52.984621487024519], [-131.179042521826574, 52.18043284769827], [-131.577829549822894, 52.182370713909236], [-132.180428426778519, 52.639707139692391], [-132.549992432313843, 53.100014960332132], [-133.054611178755493, 53.411468817755363], [-133.239664482792676, 53.851080227262386], [-133.180004041711669, 54.169975490935308]]], [[[-79.26582, 62.158675], [-79.65752, 61.63308], [-80.09956, 61.7181], [-80.36215, 62.01649], [-80.315395, 62.085565], [-79.92939, 62.3856], [-79.52002, 62.36371], [-79.26582, 62.158675]]], [[[-81.89825, 62.7108], [-83.06857, 62.15922], [-83.77462, 62.18231], [-83.99367, 62.4528], [-83.25048, 62.91409], [-81.87699, 62.90458], [-81.89825, 62.7108]]], [[[-85.161307949549851, 65.657284654392797], [-84.975763719405933, 65.217518215588981], [-84.464012010419495, 65.371772365980163], [-83.88262630891974, 65.109617824963536], [-82.78757687043877, 64.766693020274673], [-81.642013719392509, 64.455135809986942], [-81.553440314444245, 63.979609280037131], [-80.817361212878851, 64.057485663500998], [-80.103451300766594, 63.725981350348597], [-80.991019863595653, 63.41124603947496], [-82.547178107416997, 63.651722317145229], [-83.108797573565042, 64.101875718839707], [-84.100416632813847, 63.569711819098004], [-85.523404710618991, 63.052379055424076], [-85.866768764982339, 63.637252916103542], [-87.221983201836721, 63.541238104905212], [-86.352759772471259, 64.035833238370699], [-86.224886440765133, 64.822916978608262], [-85.883847825854858, 65.738778388117041], [-85.161307949549851, 65.657284654392797]]], [[[-75.86588, 67.14886], [-76.98687, 67.09873], [-77.2364, 67.58809], [-76.81166, 68.14856], [-75.89521, 68.28721], [-75.1145, 68.01036], [-75.10333, 67.58202], [-75.21597, 67.44425], [-75.86588, 67.14886]]], [[[-95.647681203800488, 69.107690358321761], [-96.269521203800579, 68.757040358321731], [-97.61740120380054, 69.060030358321782], [-98.431801203800504, 68.950700358321768], [-99.797401203800504, 69.400030358321786], [-98.917401203800523, 69.710030358321788], [-98.218261203800466, 70.143540358321744], [-97.157401203800532, 69.860030358321794], [-96.557401203800524, 69.680030358321758], [-96.257401203800498, 69.490030358321761], [-95.647681203800488, 69.107690358321761]]], [[[-90.5471, 69.49766], [-90.55151, 68.47499], [-89.21515, 69.25873], [-88.01966, 68.61508], [-88.31749, 67.87338], [-87.35017, 67.19872], [-86.30607, 67.92146], [-85.57664, 68.78456], [-85.52197, 69.88211], [-84.10081, 69.80539], [-82.62258, 69.65826], [-81.28043, 69.16202], [-81.2202, 68.66567], [-81.96436, 68.13253], [-81.25928, 67.59716], [-81.38653, 67.11078], [-83.34456, 66.41154], [-84.73542, 66.2573], [-85.76943, 66.55833], [-86.0676, 66.05625], [-87.03143, 65.21297], [-87.32324, 64.77563], [-88.48296, 64.09897], [-89.91444, 64.03273], [-90.70398, 63.61017], [-90.77004, 62.96021], [-91.93342, 62.83508], [-93.15698, 62.02469], [-94.24153, 60.89865], [-94.62931, 60.11021], [-94.6846, 58.94882], [-93.21502, 58.78212], [-92.76462, 57.84571], [-92.297029999999893, 57.08709], [-90.89769, 57.28468], [-89.03953, 56.85172], [-88.03978, 56.47162], [-87.32421, 55.99914], [-86.07121, 55.72383], [-85.01181, 55.3026], [-83.36055, 55.24489], [-82.27285, 55.14832], [-82.4362, 54.28227], [-82.12502, 53.27703], [-81.40075, 52.15788], [-79.91289, 51.20842], [-79.14301, 51.53393], [-78.60191, 52.56208], [-79.12421, 54.14145], [-79.82958, 54.66772], [-78.22874, 55.13645], [-77.0956, 55.83741], [-76.54137, 56.53423], [-76.62319, 57.20263], [-77.30226, 58.05209], [-78.51688, 58.80458], [-77.33676, 59.85261], [-77.77272, 60.75788], [-78.10687, 62.31964], [-77.41067, 62.55053], [-75.69621, 62.2784], [-74.6682, 62.18111], [-73.83988, 62.4438], [-72.90853, 62.10507], [-71.67708, 61.52535], [-71.37369, 61.13717], [-69.59042, 61.06141], [-69.62033, 60.22125], [-69.2879, 58.95736], [-68.37455, 58.80106], [-67.64976, 58.21206], [-66.20178, 58.76731], [-65.24517, 59.87071], [-64.58352, 60.33558], [-63.80475, 59.4426], [-62.50236, 58.16708], [-61.39655, 56.96745], [-61.79866, 56.33945], [-60.46853, 55.77548], [-59.56962, 55.20407], [-57.97508, 54.94549], [-57.3332, 54.6265], [-56.93689, 53.78032], [-56.15811, 53.64749], [-55.75632, 53.27036], [-55.68338, 52.14664], [-56.40916, 51.7707], [-57.12691, 51.41972], [-58.77482, 51.0643], [-60.03309, 50.24277], [-61.72366, 50.08046], [-63.86251, 50.29099], [-65.36331, 50.2982], [-66.39905, 50.22897], [-67.23631, 49.51156], [-68.51114, 49.06836], [-69.95362, 47.74488], [-71.10458, 46.82171], [-70.25522, 46.98606], [-68.65, 48.3], [-66.55243, 49.1331], [-65.05626, 49.23278], [-64.17099, 48.74248], [-65.11545, 48.07085], [-64.79854, 46.99297], [-64.47219, 46.23849], [-63.17329, 45.73902], [-61.52072, 45.88377], [-60.51815, 47.00793], [-60.4486, 46.28264], [-59.80287, 45.9204], [-61.03988, 45.26525], [-63.25471, 44.67014], [-64.24656, 44.26553], [-65.36406, 43.54523], [-66.1234, 43.61867], [-66.16173, 44.46512], [-64.42549, 45.29204], [-66.02605, 45.25931], [-67.13741, 45.13753], [-67.79134, 45.70281], [-67.79046, 47.06636], [-68.23444, 47.35486], [-68.905, 47.185], [-69.237216, 47.447781], [-69.99997, 46.69307], [-70.305, 45.915], [-70.66, 45.46], [-71.08482, 45.30524], [-71.405, 45.255], [-71.50506, 45.0082], [-73.34783, 45.00738], [-74.867, 45.00048], [-75.31821, 44.81645], [-76.375, 44.09631], [-76.5, 44.018458893758712], [-76.820034145805565, 43.628784288093748], [-77.737885097957687, 43.62905558936329], [-78.720279914042365, 43.625089423184868], [-79.171673550111862, 43.466339423184216], [-79.01, 43.27], [-78.92, 42.965], [-78.939362148743683, 42.863611355148031], [-80.247447679347928, 42.366199856122584], [-81.277746548167144, 42.209025987306845], [-82.439277716791608, 41.675105088867149], [-82.690089280920162, 41.675105088867149], [-83.029810146806909, 41.832795722005834], [-83.141999681312555, 41.975681057292825], [-83.12, 42.08], [-82.9, 42.43], [-82.43, 42.98], [-82.137642381503881, 43.571087551439909], [-82.337763125431053, 44.44], [-82.550924648758169, 45.347516587905368], [-83.592850714843067, 45.816893622412373], [-83.469550747394621, 45.994686387712584], [-83.616130947590563, 46.116926988299056], [-83.890765347005726, 46.116926988299056], [-84.091851264161463, 46.27541860613816], [-84.14211951367335, 46.512225857115723], [-84.3367, 46.40877], [-84.6049, 46.4396], [-84.543748745445853, 46.538684190449132], [-84.779238247399888, 46.637101955749038], [-84.876079881514855, 46.900083319682366], [-85.652363247403414, 47.220218817730498], [-86.461990831228249, 47.553338019392037], [-87.439792623300207, 47.94], [-88.378114183286698, 48.302917588893727], [-89.272917446636654, 48.019808254582657], [-89.6, 48.01], [-90.83, 48.27], [-91.64, 48.14], [-92.61, 48.45], [-93.63087, 48.60926], [-94.32914, 48.67074], [-94.64, 48.84], [-94.81758, 49.38905], [-95.15609, 49.38425], [-95.159069509172014, 49.0], [-97.228720000004799, 49.0007], [-100.65, 49.0], [-104.04826, 48.99986], [-107.05, 49.0], [-110.05, 49.0], [-113.0, 49.0], [-116.04818, 49.0], [-117.03121, 49.0], [-120.0, 49.0], [-122.84, 49.0], [-122.97421, 49.002537777777789], [-124.91024, 49.98456], [-125.62461, 50.41656], [-127.43561, 50.83061], [-127.99276, 51.71583], [-127.85032, 52.32961], [-129.12979, 52.75538], [-129.30523, 53.56159], [-130.51497, 54.28757], [-130.53611, 54.80278], [-129.98, 55.285], [-130.00778, 55.91583], [-131.70781, 56.55212], [-132.73042, 57.69289], [-133.35556, 58.41028], [-134.27111, 58.86111], [-134.945, 59.27056], [-135.47583, 59.78778], [-136.47972, 59.46389], [-137.4525, 58.905], [-138.34089, 59.56211], [-139.039, 60.0], [-140.013, 60.27682], [-140.99778, 60.30639], [-140.9925, 66.00003], [-140.986, 69.712], [-139.12052, 69.47102], [-137.54636, 68.99002], [-136.50358, 68.89804], [-135.62576, 69.31512], [-134.41464, 69.62743], [-132.92925, 69.50534], [-131.43136, 69.94451], [-129.79471, 70.19369], [-129.10773, 69.77927], [-128.36156, 70.01286], [-128.13817, 70.48384], [-127.44712, 70.37721], [-125.75632, 69.48058], [-124.42483, 70.1584], [-124.28968, 69.39969], [-123.06108, 69.56372], [-122.6835, 69.85553], [-121.47226, 69.79778], [-119.94288, 69.37786], [-117.60268, 69.01128], [-116.22643, 68.84151], [-115.2469, 68.90591], [-113.89794, 68.3989], [-115.30489, 67.90261], [-113.49727, 67.68815], [-110.798, 67.80612], [-109.94619, 67.98104], [-108.8802, 67.38144], [-107.79239, 67.88736], [-108.81299, 68.31164], [-108.16721, 68.65392], [-106.95, 68.7], [-106.15, 68.8], [-105.34282, 68.56122], [-104.33791, 68.018], [-103.22115, 68.09775], [-101.45433, 67.64689], [-99.90195, 67.80566], [-98.4432, 67.78165], [-98.5586, 68.40394], [-97.66948, 68.57864], [-96.11991, 68.23939], [-96.12588, 67.29338], [-95.48943, 68.0907], [-94.685, 68.06383], [-94.23282, 69.06903], [-95.30408, 69.68571], [-96.47131, 70.08976], [-96.39115, 71.19482], [-95.2088, 71.92053], [-93.88997, 71.76015], [-92.87818, 71.31869], [-91.51964, 70.19129], [-92.40692, 69.69997], [-90.5471, 69.49766]]], [[[-114.167169999999871, 73.12145], [-114.66634, 72.65277], [-112.441019999999867, 72.9554], [-111.05039, 72.4504], [-109.920349999999857, 72.96113], [-109.00654, 72.63335], [-108.188349999999886, 71.65089], [-107.68599, 72.06548], [-108.39639, 73.08953], [-107.51645, 73.23598], [-106.522589999999866, 73.07601], [-105.402459999999877, 72.67259], [-104.77484, 71.6984], [-104.464759999999814, 70.99297], [-102.78537, 70.49776], [-100.980779999999868, 70.02432], [-101.089289999999892, 69.58447000000011], [-102.731159999999875, 69.50402], [-102.09329, 69.11962], [-102.43024, 68.75282], [-104.24, 68.91], [-105.96, 69.180000000000135], [-107.12254, 69.11922], [-108.999999999999872, 68.78], [-111.534148875200117, 68.630059156817921], [-113.3132, 68.53554], [-113.854959999999807, 69.007440000000102], [-115.22, 69.28], [-116.10794, 69.16821], [-117.34, 69.960000000000107], [-116.674729999999869, 70.06655], [-115.13112, 70.2373], [-113.72141, 70.19237], [-112.4161, 70.36638], [-114.35, 70.6], [-116.48684, 70.52045], [-117.9048, 70.540560000000127], [-118.43238, 70.9092], [-116.11311, 71.30918], [-117.65568, 71.2952], [-119.40199, 71.55859], [-118.56267, 72.30785], [-117.866419999999877, 72.70594], [-115.18909, 73.314590000000109], [-114.167169999999871, 73.12145]]], [[[-104.5, 73.42], [-105.38, 72.76], [-106.94, 73.46], [-106.6, 73.6], [-105.26, 73.64], [-104.5, 73.42]]], [[[-76.34, 73.102684989953005], [-76.251403808593736, 72.826385498046861], [-77.314437866210895, 72.85554504394527], [-78.391670227050795, 72.876655578613253], [-79.486251831054645, 72.742202758789062], [-79.775833129882827, 72.80290222167973], [-80.876098632812514, 73.333183288574205], [-80.833885192871051, 73.693183898925767], [-80.353057861328111, 73.75971984863277], [-78.064437866210923, 73.651931762695327], [-76.34, 73.102684989953005]]], [[[-86.562178514334107, 73.157447007938444], [-85.774371304044521, 72.534125881633798], [-84.850112474288224, 73.34027822538711], [-82.315590176100969, 73.750950832810574], [-80.600087653307611, 72.716543687624181], [-80.748941616524391, 72.061906643350753], [-78.770638597310764, 72.352173163534147], [-77.824623989559569, 72.749616604291035], [-75.605844692675717, 72.243678493937381], [-74.228616095664975, 71.767144273557889], [-74.099140794557698, 71.330840155717638], [-72.242225714797641, 71.556924546994495], [-71.200015428335192, 70.920012518997211], [-68.78605424668487, 70.525023708774242], [-67.914970465756923, 70.121947536897594], [-66.969033372654152, 69.18608734809186], [-68.805122850200533, 68.720198472764409], [-66.449866095633851, 68.067163397892003], [-64.862314419195215, 67.847538560651614], [-63.424934454996745, 66.928473212340649], [-61.851981370680569, 66.862120673277829], [-62.163176845942296, 66.160251369889593], [-63.91844438338417, 64.998668524832837], [-65.148860236253611, 65.426032619886669], [-66.72121904159853, 66.388041083432185], [-68.015016038673949, 66.262725735124391], [-68.141287400979152, 65.689789130304362], [-67.089646165623392, 65.108455105236985], [-65.732080451099748, 64.64840566675862], [-65.320167609301265, 64.382737128346051], [-64.669406297449669, 63.392926744227474], [-65.013803880458894, 62.674185085695974], [-66.275044725190455, 62.945098781986069], [-68.783186204692711, 63.745670071051805], [-67.369680752213029, 62.883965562584869], [-66.328297288667201, 62.28007477482204], [-66.165568203380147, 61.930897121825879], [-68.877366502544632, 62.330149237712803], [-71.023437059193824, 62.910708116295829], [-72.23537858751898, 63.397836005295154], [-71.886278449171286, 63.679989325608837], [-73.37830624051837, 64.193963121183813], [-74.834418911422588, 64.679075629323776], [-74.818502570276706, 64.389093329517962], [-77.709979824520019, 64.229542344816778], [-78.55594885935416, 64.572906399180127], [-77.897281053361908, 65.309192206474776], [-76.018274298797181, 65.326968899183143], [-73.95979529488271, 65.454764716240888], [-74.293883429649625, 65.81177134872938], [-73.94491248238262, 66.310578111426722], [-72.65116716173938, 67.284575507263853], [-72.926059943316076, 67.726925767682374], [-73.311617804645721, 68.069437160912898], [-74.8433072577768, 68.554627183701271], [-76.869100918266739, 68.894735622830254], [-76.228649054657339, 69.147769273547411], [-77.28736996123709, 69.769540106883269], [-78.168633999326588, 69.826487535268896], [-78.95724219431672, 70.166880194775402], [-79.492455003563649, 69.871807766388898], [-81.305470954091732, 69.743185126414332], [-84.944706183598456, 69.966634019644388], [-87.060003424817864, 70.260001125765356], [-88.681713223001495, 70.410741278760796], [-89.513419562523012, 70.762037665480975], [-88.467721116880753, 71.218185533321318], [-89.888151211287465, 71.222552191849942], [-90.205160285181989, 72.235074367960792], [-89.43657670770493, 73.129464219852352], [-88.408241543312784, 73.537888902471209], [-85.826151089200906, 73.803815823045213], [-86.562178514334107, 73.157447007938444]]], [[[-100.35642, 73.84389], [-99.16387, 73.63339], [-97.38, 73.76], [-97.12, 73.47], [-98.05359, 72.99052], [-96.54, 72.56], [-96.72, 71.66], [-98.35966, 71.27285], [-99.32286, 71.35639], [-100.01482, 71.73827], [-102.5, 72.51], [-102.48, 72.83], [-100.43836, 72.70588], [-101.54, 73.36], [-100.35642, 73.84389]]], [[[-93.196295539100205, 72.771992499473342], [-94.26904659704725, 72.024596259235949], [-95.409855516322637, 72.061880805134578], [-96.033745083382428, 72.940276801231789], [-96.01826799191096, 73.437429918095788], [-95.495793423224001, 73.862416897264154], [-94.503657599652328, 74.134906724739196], [-92.420012173211745, 74.100025132942179], [-90.509792853542578, 73.85673248971203], [-92.003965216829869, 72.966244208458477], [-93.196295539100205, 72.771992499473342]]], [[[-120.46, 71.383601793087578], [-123.09219, 70.90164], [-123.62, 71.34], [-125.92894873747332, 71.868688463011395], [-125.499999999999872, 72.292260811795003], [-124.80729, 73.02256], [-123.94, 73.680000000000135], [-124.917749999999899, 74.292750000000112], [-121.53788, 74.44893], [-120.10978, 74.24135], [-117.55564, 74.18577], [-116.58442, 73.89607], [-115.51081, 73.47519], [-116.767939999999882, 73.22292], [-119.22, 72.52], [-120.46, 71.82], [-120.46, 71.383601793087578]]], [[[-93.612755906940464, 74.979997260224437], [-94.156908738973812, 74.59234650338685], [-95.60868058956558, 74.666863918751758], [-96.820932176484561, 74.927623196096576], [-96.288587409229791, 75.377828274223333], [-94.850819871789113, 75.647217515760886], [-93.977746548217908, 75.296489569795952], [-93.612755906940464, 74.979997260224437]]], [[[-98.5, 76.72], [-97.735585, 76.25656], [-97.704415, 75.74344], [-98.16, 75.0], [-99.80874, 74.89744], [-100.88366, 75.05736], [-100.86292, 75.64075], [-102.50209, 75.5638], [-102.56552, 76.3366], [-101.48973, 76.30537], [-99.98349, 76.64634], [-98.57699, 76.58859], [-98.5, 76.72]]], [[[-108.21141, 76.20168], [-107.81943, 75.84552], [-106.92893, 76.01282], [-105.881, 75.9694], [-105.70498, 75.47951], [-106.31347, 75.00527], [-109.7, 74.85], [-112.22307, 74.41696], [-113.74381, 74.39427], [-113.87135, 74.72029], [-111.79421, 75.1625], [-116.31221, 75.04343], [-117.7104, 75.2222], [-116.34602, 76.19903], [-115.40487, 76.47887], [-112.59056, 76.14134], [-110.81422, 75.54919], [-109.0671, 75.47321], [-110.49726, 76.42982], [-109.5811, 76.79417], [-108.54859, 76.67832], [-108.21141, 76.20168]]], [[[-94.684085862999439, 77.097878323058367], [-93.573921068073105, 76.776295884906062], [-91.605023159536586, 76.778517971494594], [-90.741845872749209, 76.449597479956807], [-90.969661424507976, 76.074013170059445], [-89.822237921899244, 75.847773749485626], [-89.187082892599776, 75.610165513807615], [-87.838276333349611, 75.566188869927217], [-86.379192267588664, 75.482421373182163], [-84.789625210290595, 75.699204006646497], [-82.753444586910049, 75.784315090631225], [-81.12853084992436, 75.713983466282016], [-80.05751095245914, 75.336848863415867], [-79.833932868148324, 74.923127346487192], [-80.457770758775823, 74.657303778777774], [-81.948842536125511, 74.442459011524321], [-83.2288936022114, 74.564027818490928], [-86.097452358733292, 74.410032050261137], [-88.150350307960196, 74.392307033984977], [-89.764722052758358, 74.515555325001117], [-92.422440965529418, 74.837757880340973], [-92.768285488642789, 75.38681997344213], [-92.889905972041717, 75.882655341282629], [-93.893824022175977, 76.319243679500516], [-95.962457445035795, 76.44138092722244], [-97.121378953829463, 76.751077785947587], [-96.745122850312342, 77.161388658345132], [-94.684085862999439, 77.097878323058367]]], [[[-116.198586595507322, 77.645286770326194], [-116.335813361458349, 76.876961575010554], [-117.106050584768766, 76.530031846819114], [-118.040412157038119, 76.481171780087081], [-119.899317586885687, 76.053213406061971], [-121.499995077126471, 75.900018622532784], [-122.85492448615895, 76.116542873835684], [-122.854925293603188, 76.116542873835684], [-121.157535360328239, 76.864507554828336], [-119.103938971821023, 77.512219957174608], [-117.570130784965954, 77.498318996888102], [-116.198586595507322, 77.645286770326194]]], [[[-93.840003017943971, 77.51999726023449], [-94.295608283245244, 77.491342678528682], [-96.169654100310055, 77.55511139597688], [-96.436304490936109, 77.83462921824362], [-94.422577277386353, 77.820004787904978], [-93.720656297565867, 77.634331366680314], [-93.840003017943971, 77.51999726023449]]], [[[-110.186938035912945, 77.697014879050286], [-112.051191169058455, 77.409228827616843], [-113.534278937619035, 77.732206529441143], [-112.724586758253835, 78.051050116681935], [-111.264443325630822, 78.152956041161545], [-109.854451870547067, 77.996324774884812], [-110.186938035912945, 77.697014879050286]]], [[[-109.663145718202557, 78.601972561345676], [-110.88131425661885, 78.406919867659994], [-112.542091437615142, 78.407901719873493], [-112.525890876091566, 78.550554511215225], [-111.500010342233367, 78.849993598130538], [-110.96366065147599, 78.804440823065207], [-109.663145718202557, 78.601972561345676]]], [[[-95.830294969449312, 78.056941229963243], [-97.309842902397975, 77.85059723582178], [-98.124289313533964, 78.082856960757567], [-98.55286780474664, 78.458105373845086], [-98.631984422585504, 78.871930243638374], [-97.337231411512604, 78.831984361476756], [-96.754398769908761, 78.765812689926989], [-95.559277920294562, 78.41831452098026], [-95.830294969449312, 78.056941229963243]]], [[[-100.060191820052111, 78.324754340315891], [-99.670939093813601, 77.907544664207393], [-101.303940192452984, 78.018984890444798], [-102.949808722733025, 78.343228664860206], [-105.176132778731514, 78.38033234324574], [-104.210429450277147, 78.677420152491777], [-105.419580451258511, 78.918335679836431], [-105.492289191493128, 79.301593939929177], [-103.529282396237917, 79.16534902619162], [-100.8251580472688, 78.80046173777869], [-100.060191820052111, 78.324754340315891]]], [[[-87.02, 79.66], [-85.81435, 79.3369], [-87.18756, 79.0393], [-89.03535, 78.28723], [-90.80436, 78.21533], [-92.87669, 78.34333], [-93.95116, 78.75099], [-93.93574, 79.11373], [-93.14524, 79.3801], [-94.974, 79.37248], [-96.07614, 79.70502], [-96.70972, 80.15777], [-96.01644, 80.60233], [-95.32345, 80.90729], [-94.29843, 80.97727], [-94.73542, 81.20646], [-92.40984, 81.25739], [-91.13289, 80.72345], [-89.45, 80.509322033898258], [-87.81, 80.32], [-87.02, 79.66]]], [[[-68.5, 83.106321516765732], [-65.82735, 83.02801], [-63.68, 82.9], [-61.85, 82.6286], [-61.89388, 82.36165], [-64.334, 81.92775], [-66.75342, 81.72527], [-67.65755, 81.50141], [-65.48031, 81.50657], [-67.84, 80.9], [-69.4697, 80.61683], [-71.18, 79.8], [-73.2428, 79.63415], [-73.88, 79.430162204802073], [-76.90773, 79.32309], [-75.52924, 79.19766], [-76.22046, 79.01907], [-75.39345, 78.52581], [-76.34354, 78.18296], [-77.88851, 77.89991], [-78.36269, 77.50859], [-79.75951, 77.20968], [-79.61965, 76.98336], [-77.91089, 77.022045], [-77.88911, 76.777955], [-80.56125, 76.17812], [-83.17439, 76.45403], [-86.11184, 76.29901], [-87.6, 76.42], [-89.49068, 76.47239], [-89.6161, 76.95213], [-87.76739, 77.17833], [-88.26, 77.9], [-87.65, 77.970222222222205], [-84.97634, 77.53873], [-86.34, 78.18], [-87.96192, 78.37181], [-87.15198, 78.75867], [-85.37868, 78.9969], [-85.09495, 79.34543], [-86.50734, 79.73624], [-86.93179, 80.25145], [-84.19844, 80.20836], [-83.408695652173819, 80.1], [-81.84823, 80.46442], [-84.1, 80.58], [-87.59895, 80.51627], [-89.36663, 80.85569], [-90.2, 81.26], [-91.36786, 81.5531], [-91.58702, 81.89429], [-90.1, 82.085], [-88.93227, 82.11751], [-86.97024, 82.27961], [-85.5, 82.652273458057024], [-84.260005, 82.6], [-83.18, 82.32], [-82.42, 82.86], [-81.1, 83.02], [-79.30664, 83.13056], [-76.25, 83.172058823529369], [-75.71878, 83.06404], [-72.83153, 83.23324], [-70.665765, 83.169780758382828], [-68.5, 83.106321516765732]]]] } }, + { "type": "Feature", "properties": { "admin": "Switzerland", "name": "Switzerland", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[9.594226108446346, 47.525058091820256], [9.632931756232974, 47.347601223329974], [9.479969516649019, 47.102809963563367], [9.932448357796657, 46.920728054382948], [10.442701450246627, 46.893546250997424], [10.36337812667861, 46.483571275409851], [9.922836541390378, 46.314899400409182], [9.182881707403054, 46.440214748716976], [8.966305779667804, 46.036931871111186], [8.489952426801322, 46.005150865251672], [8.316629672894377, 46.163642483090847], [7.755992058959832, 45.824490057959302], [7.273850945676655, 45.776947740250769], [6.843592970414504, 45.991146552100595], [6.500099724970424, 46.429672756529428], [6.022609490593537, 46.272989813820466], [6.037388950229, 46.725778713561859], [6.768713820023605, 47.287708238303686], [6.736571079138058, 47.541801255882838], [7.192202182655505, 47.449765529971003], [7.466759067422228, 47.620581976911794], [8.31730146651415, 47.613579820336255], [8.522611932009765, 47.830827541691285], [9.594226108446346, 47.525058091820256]]] } }, + { "type": "Feature", "properties": { "admin": "Chile", "name": "Chile", "continent": "South America" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-68.634010227583147, -52.636370458874353], [-68.633349999999879, -54.8695], [-67.56244, -54.87001], [-66.95992, -54.89681], [-67.291029999999878, -55.30124], [-68.148629999999841, -55.61183], [-68.639990810811796, -55.580017999086877], [-69.2321, -55.49906], [-69.95809, -55.19843], [-71.00568, -55.05383], [-72.2639, -54.49514], [-73.2852, -53.957519999999874], [-74.66253, -52.83749], [-73.8381, -53.04743], [-72.43418, -53.7154], [-71.10773, -54.07433], [-70.591779999999787, -53.61583], [-70.26748, -52.93123], [-69.345649999999878, -52.5183], [-68.634010227583147, -52.636370458874353]]], [[[-68.219913092711224, -21.49434661223183], [-67.828179897722634, -22.872918796482178], [-67.106673550063604, -22.735924574476392], [-66.985233934177629, -22.986348565362825], [-67.328442959244128, -24.025303236590908], [-68.417652960876111, -24.518554782816874], [-68.386001146097342, -26.185016371365229], [-68.594799770772667, -26.50690886811126], [-68.295541551370391, -26.899339694935787], [-69.001234910748266, -27.521213881136127], [-69.656130337183143, -28.459141127233686], [-70.013550381129861, -29.367922865518544], [-69.919008348251921, -30.336339206668306], [-70.535068935819439, -31.365010267870279], [-70.074399380153622, -33.09120981214803], [-69.814776984319209, -33.273886000299839], [-69.817309129501453, -34.193571465798279], [-70.388049485949082, -35.169687595359441], [-70.364769253201658, -36.005088799789931], [-71.121880662709771, -36.65812387466233], [-71.118625047475419, -37.576827487947192], [-70.814664272734703, -38.552995293940732], [-71.413516608349042, -38.916022230791107], [-71.680761277946445, -39.808164157878061], [-71.915734015577542, -40.832339369470716], [-71.746803758415453, -42.051386407235988], [-72.148898078078517, -42.254888197601375], [-71.915423956983901, -43.408564548517404], [-71.464056159130493, -43.787611179378324], [-71.793622606071935, -44.207172133156099], [-71.329800788036195, -44.407521661151677], [-71.222778896759721, -44.784242852559409], [-71.659315558545316, -44.973688653341434], [-71.552009446891233, -45.560732924177117], [-71.917258470330196, -46.884838148791786], [-72.44735531278026, -47.738532810253517], [-72.331160854771937, -48.244238376661819], [-72.648247443314929, -48.878618259476774], [-73.415435757120022, -49.318436374712952], [-73.328050910114456, -50.378785088909865], [-72.975746832964617, -50.741450290734299], [-72.309973517532342, -50.677009779666342], [-72.329403856074023, -51.425956312872394], [-71.914803839796321, -52.009022305865912], [-69.498362189396076, -52.142760912637236], [-68.571545376241332, -52.299443855346247], [-69.461284349226617, -52.291950772663924], [-69.94277950710611, -52.537930590373243], [-70.8451016913545, -52.899200528525711], [-71.006332160105217, -53.833252042201345], [-71.429794684520928, -53.856454760300373], [-72.557942877884855, -53.531410001184447], [-73.702756720662862, -52.835069268607249], [-73.702756720662862, -52.835070076051487], [-74.946763475225154, -52.262753588419017], [-75.260026007778507, -51.62935475037321], [-74.976632453089806, -51.043395684615675], [-75.47975419788348, -50.378371677451547], [-75.608015102831942, -48.673772881871784], [-75.182769741502128, -47.711919447623153], [-74.126580980104677, -46.939253431995084], [-75.644395311165439, -46.647643324572016], [-74.69215369332305, -45.76397633238097], [-74.351709357384252, -44.10304412208788], [-73.240356004515192, -44.454960625995611], [-72.717803921179765, -42.383355808278985], [-73.388899909138232, -42.117532240569567], [-73.701335618774834, -43.365776462579738], [-74.33194312203257, -43.224958184584395], [-74.017957119427152, -41.794812920906828], [-73.677099372029943, -39.942212823243111], [-73.217592536090663, -39.258688653318508], [-73.505559455037044, -38.282882582351064], [-73.588060879191076, -37.156284681956016], [-73.166717088499283, -37.123780206044351], [-72.553136969681717, -35.508840020491022], [-71.861732143832555, -33.909092706031522], [-71.438450486929895, -32.418899428030819], [-71.668720669222424, -30.920644626592516], [-71.370082567007714, -30.095682061484997], [-71.48989437527645, -28.861442152625909], [-70.905123867461569, -27.640379734001193], [-70.724953986275963, -25.705924167587209], [-70.403965827095035, -23.628996677344542], [-70.091245897080668, -21.393319187101223], [-70.164419725205974, -19.756468194256183], [-70.372572394477714, -18.347975355708879], [-69.858443569605797, -18.092693780187027], [-69.590423753523979, -17.580011895419286], [-69.100246955019401, -18.260125420812653], [-68.966818406841824, -18.981683444904089], [-68.442225104430918, -19.405068454671419], [-68.757167121033703, -20.37265797290447], [-68.219913092711224, -21.49434661223183]]]] } }, + { "type": "Feature", "properties": { "admin": "China", "name": "China", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[110.339187860151526, 18.678395087147603], [109.475209588663702, 18.19770091396861], [108.655207961056135, 18.507681993071397], [108.626217482540426, 19.367887885001974], [109.119055617308007, 19.821038519769385], [110.211598748822837, 20.101253973872073], [110.786550734502228, 20.077534491450077], [111.01005130416462, 19.695929877190732], [110.570646600386794, 19.255879218009305], [110.339187860151526, 18.678395087147603]]], [[[127.657407261262378, 49.760270494172929], [129.397817824420429, 49.440600084015429], [130.58229332898236, 48.729687404976112], [130.987281528853828, 47.790132351261391], [132.506671991099495, 47.788969631534876], [133.373595819228001, 48.183441677434914], [135.026311476786702, 48.478229885443902], [134.500813836810607, 47.578439846377833], [134.112362095272601, 47.212467352886719], [133.76964399631288, 46.116926988299056], [133.097126906466428, 45.14406647397216], [131.883454217659562, 45.32116160743643], [131.025212030156069, 44.967953192721573], [131.288555129115537, 44.111519680348252], [131.144687941614848, 42.929989732426932], [130.633866408409801, 42.903014634770543], [130.640015903852429, 42.39500946712527], [129.994267205933227, 42.985386867843793], [129.596668735879462, 42.424981797854592], [128.05221520397231, 41.994284572917984], [128.208433058790717, 41.466771552082534], [127.343782993683021, 41.503151760415953], [126.869083286649854, 41.816569322266155], [126.18204511932943, 41.107336127276362], [125.079941847840587, 40.569823716792449], [124.265624627785314, 39.928493353834135], [122.86757042856101, 39.637787583976255], [122.131387974130917, 39.170451768544623], [121.054554478032856, 38.89747101496291], [121.585994907722466, 39.360853583324136], [121.376757033372641, 39.750261338859524], [122.168595005381007, 40.422442531896046], [121.640358514493528, 40.946389878903304], [120.768628778161954, 40.593388169917596], [119.639602085449056, 39.898055935214209], [119.023463983233015, 39.252333075511096], [118.042748651197897, 39.204273993479674], [117.532702264477052, 38.73763580988409], [118.05969852098967, 38.061475531561051], [118.878149855628351, 37.897325344385898], [118.911636183753501, 37.448463853498723], [119.702802362142037, 37.156388658185072], [120.823457472823648, 37.870427761377968], [121.711258579597938, 37.481123358707165], [122.357937453298462, 37.454484157860684], [122.519994744965814, 36.930614325501828], [121.104163853033029, 36.651329047180432], [120.63700890511457, 36.111439520811125], [119.66456180224607, 35.609790554337728], [119.151208123858567, 34.909859117160458], [120.227524855633717, 34.360331936168613], [120.620369093916565, 33.37672272392512], [121.229014113450219, 32.460318711877186], [121.908145786630044, 31.692174384074683], [121.891919386890336, 30.949351508095098], [121.264257440273298, 30.676267401648712], [121.503519321784722, 30.14291494396425], [122.092113885589086, 29.832520453403156], [121.93842817595305, 29.018022365834803], [121.684438511238469, 28.225512600206677], [121.125661248866436, 28.135673122667178], [120.395473260582307, 27.053206895449385], [119.585496860839555, 25.740780544532605], [118.656871372554519, 24.547390855400234], [117.281606479970833, 23.624501451099714], [115.890735304835118, 22.782873236578094], [114.763827345846209, 22.668074042241663], [114.152546828265656, 22.223760077396204], [113.806779819800752, 22.548339748621423], [113.241077915501592, 22.051367499270462], [111.843592157032447, 21.550493679281512], [110.78546552942413, 21.39714386645533], [110.444039341271662, 20.34103261970639], [109.88986128137357, 20.282457383703441], [109.627655063924635, 21.008227037026725], [109.864488153118316, 21.395050970947516], [108.522812941524421, 21.715212307211821], [108.050180291782979, 21.552379869060101], [107.043420037872636, 21.8118989120299], [106.567273390735352, 22.21820486092474], [106.725403273548466, 22.794267889898375], [105.811247186305209, 22.976892401617899], [105.329209425886631, 23.352063300056976], [104.476858351664475, 22.819150092046918], [103.504514601660503, 22.703756618739217], [102.706992222100155, 22.708795070887696], [102.170435825613552, 22.464753119389336], [101.652017856861576, 22.318198757409554], [101.803119744882906, 21.174366766845051], [101.27002566936001, 21.201651923095167], [101.180005324307558, 21.436572984294052], [101.150032993578236, 21.849984442629015], [100.416537713627349, 21.558839423096654], [99.983489211021549, 21.742936713136451], [99.240898878987196, 22.118314317304559], [99.53199222208741, 22.949038804612591], [98.898749220782804, 23.142722072842581], [98.66026248575578, 24.063286037690002], [97.604719679762027, 23.897404690033049], [97.724609002679131, 25.083637193293036], [98.671838006589212, 25.91870250091349], [98.712093947344556, 26.743535874940243], [98.682690057370507, 27.508812160750658], [98.246230910233351, 27.747221381129172], [97.91198774616943, 28.335945136014367], [97.327113885490007, 28.261582749946339], [96.248833449287829, 28.411030992134467], [96.586590610747521, 28.830979519154361], [96.117678664131006, 29.452802028922513], [95.404802280664626, 29.031716620392157], [94.565990431702929, 29.27743805593996], [93.413347609432662, 28.640629380807233], [92.503118931043616, 27.896876329046442], [91.696656528696693, 27.771741848251615], [91.258853794319876, 28.040614325466343], [90.730513950567797, 28.064953925075738], [90.015828891971182, 28.296438503527177], [89.475810174521158, 28.042758897406365], [88.814248488320573, 27.299315904239389], [88.730325962278528, 28.086864732367552], [88.120440708369941, 27.876541652939572], [86.954517043000635, 27.974261786403524], [85.823319940131526, 28.203575954698742], [85.011638218123053, 28.642773952747369], [84.23457970575015, 28.839893703724691], [83.89899295444674, 29.320226141877633], [83.337115106137176, 29.463731594352193], [82.327512648450877, 30.115268052688204], [81.525804477874786, 30.422716986608659], [81.111256138029276, 30.183480943313402], [79.721366815107118, 30.882714748654728], [78.738894484374001, 31.515906073527045], [78.458446486326025, 32.61816437431272], [79.176128777995544, 32.483779812137747], [79.208891636068543, 32.994394639613738], [78.811086460285722, 33.506198025032397], [78.912268914713209, 34.321936346975768], [77.83745079947461, 35.494009507787794], [76.192848341785705, 35.89840342868785], [75.896897414050173, 36.666806138651872], [75.158027785140987, 37.133030910789152], [74.980002475895404, 37.419990139305888], [74.829985792952144, 37.990007025701445], [74.864815708316783, 38.378846340481587], [74.25751427602269, 38.606506862943476], [73.928852166646394, 38.505815334622717], [73.675379266254836, 39.431236884105566], [73.960013055318427, 39.660008449861714], [73.822243686828315, 39.893973497063136], [74.776862420556043, 40.366425279291619], [75.467827996730719, 40.56207225194867], [76.526368035797432, 40.427946071935132], [76.90448449087711, 41.066485907549648], [78.187196893226044, 41.185315863604799], [78.543660923175253, 41.582242540038713], [80.119430373051401, 42.12394074153822], [80.259990268885318, 42.34999929459908], [80.180150180994374, 42.920067857426844], [80.866206496101213, 43.180362046881008], [79.966106398441426, 44.917516994804622], [81.947070753918084, 45.317027492853143], [82.458925815769035, 45.539649563166499], [83.180483839860543, 47.330031236350735], [85.164290399113213, 47.000955715516099], [85.720483839870667, 47.452969468773077], [85.76823286330837, 48.455750637396896], [86.59877648310335, 48.549181626980605], [87.359970330762692, 49.214980780629148], [87.751264276076668, 49.297197984405464], [88.013832228551678, 48.599462795600594], [88.854297723346747, 48.069081732773007], [90.280825636763893, 47.693549099307901], [90.970809360724957, 46.88814606382293], [90.585768263718307, 45.719716091487491], [90.945539585334316, 45.286073309910243], [92.133890822318222, 45.115075995456429], [93.480733677141316, 44.97547211362], [94.688928664125356, 44.352331854828456], [95.306875441471504, 44.241330878265458], [95.762454868556688, 43.319449164394619], [96.349395786527808, 42.725635280928643], [97.451757440177971, 42.74888967546007], [99.515817498779995, 42.524691473961688], [100.845865513108279, 42.663804429691417], [101.833040399179936, 42.51487295182627], [103.312278273534787, 41.907468166667613], [104.522281935649005, 41.90834666601662], [104.964993931093431, 41.597409572916334], [106.129315627061658, 42.134327704428891], [107.744772576937976, 42.481515814781908], [109.243595819131428, 42.519446316084149], [110.412103306115299, 42.871233628911014], [111.129682244920218, 43.406834011400171], [111.82958784388137, 43.743118394539486], [111.667737257943202, 44.073175767587706], [111.348376906379428, 44.457441718110047], [111.87330610560025, 45.102079372735112], [112.436062453258842, 45.01164561622425], [113.463906691544196, 44.808893134127111], [114.46033165899604, 45.339816799493875], [115.985096470200133, 45.727235012386004], [116.717868280098855, 46.38820241961524], [117.421701287914246, 46.67273285581421], [118.874325799638711, 46.805412095723646], [119.663269891438745, 46.692679958678944], [119.772823927897562, 47.048058783550132], [118.866574334794947, 47.747060044946195], [118.064142694166719, 48.06673045510373], [117.295507440257438, 47.697709052107385], [116.308952671373234, 47.853410142602812], [115.742837355615734, 47.726544501326273], [115.485282017073018, 48.135382595403442], [116.191802199367601, 49.134598090199056], [116.67880089728618, 49.888531399121398], [117.879244419426371, 49.510983384796944], [119.288460728025839, 50.142882798862033], [119.279365675942358, 50.582907619827282], [120.182049595216924, 51.64356639261802], [120.738191359541972, 51.964115302124547], [120.725789015791975, 52.516226304730814], [120.177088657716865, 52.753886216841195], [121.003084751470226, 53.251401068731226], [122.245747918792858, 53.431725979213681], [123.571506789240843, 53.458804429734627], [125.068211297710434, 53.161044826868832], [125.946348911646169, 52.792798570356936], [126.564399041856959, 51.784255479532689], [126.939156528837657, 51.353894151405896], [127.287455682484904, 50.739797268265434], [127.657407261262378, 49.760270494172929]]]] } }, + { "type": "Feature", "properties": { "admin": "Ivory Coast", "name": "Côte d'Ivoire", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-2.856125047202397, 4.994475816259508], [-3.311084357100071, 4.984295559098014], [-4.008819545904941, 5.179813340674314], [-4.64991736491791, 5.168263658057084], [-5.834496222344525, 4.993700669775135], [-6.528769090185845, 4.705087795425015], [-7.518941209330434, 4.338288479017307], [-7.712159389669749, 4.364565944837721], [-7.63536821128403, 5.188159084489455], [-7.53971513511176, 5.313345241716517], [-7.570152553731686, 5.707352199725903], [-7.993692592795879, 6.126189683451541], [-8.311347622094017, 6.193033148621081], [-8.602880214868618, 6.467564195171659], [-8.385451626000572, 6.911800645368742], [-8.485445522485348, 7.395207831243068], [-8.439298468448696, 7.686042792181736], [-8.280703497744936, 7.687179673692156], [-8.221792364932197, 8.123328762235571], [-8.299048631208562, 8.316443589710302], [-8.203498907900878, 8.455453192575446], [-7.832100389019186, 8.575704250518625], [-8.079113735374348, 9.376223863152033], [-8.309616461612249, 9.789531968622439], [-8.22933712404682, 10.129020290563897], [-8.029943610048617, 10.206534939001711], [-7.89958980959237, 10.297382106970824], [-7.622759161804808, 10.147236232946792], [-6.850506557635057, 10.138993841996237], [-6.666460944027547, 10.430810655148447], [-6.493965013037267, 10.411302801958268], [-6.205222947606429, 10.524060777219132], [-6.050452032892266, 10.096360785355442], [-5.816926235365286, 10.222554633012191], [-5.404341599946973, 10.370736802609144], [-4.954653286143098, 10.152713934769732], [-4.779883592131966, 9.821984768101741], [-4.330246954760383, 9.610834865757139], [-3.980449184576684, 9.862344061721698], [-3.511898972986272, 9.900326239456216], [-2.827496303712706, 9.642460842319775], [-2.56218950032624, 8.219627793811481], [-2.983584967450326, 7.379704901555511], [-3.244370083011261, 6.2504715031135], [-2.810701463217839, 5.389051215024109], [-2.856125047202397, 4.994475816259508]]] } }, + { "type": "Feature", "properties": { "admin": "Cameroon", "name": "Cameroon", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[13.07582238124675, 2.267097072759014], [12.951333855855605, 2.321615708826939], [12.359380323952218, 2.19281220133945], [11.751665480199787, 2.326757513839993], [11.276449008843711, 2.261050930180871], [9.649158155972627, 2.283866075037735], [9.795195753629455, 3.073404445809117], [9.404366896205998, 3.734526882335202], [8.948115675501068, 3.904128933117135], [8.744923943729416, 4.352215277519959], [8.488815545290889, 4.495617377129917], [8.500287713259693, 4.771982937026847], [8.757532993208626, 5.47966583904791], [9.233162876023043, 6.444490668153334], [9.522705926154398, 6.453482367372116], [10.118276808318255, 7.038769639509879], [10.497375115611417, 7.055357774275562], [11.058787876030349, 6.644426784690593], [11.745774366918509, 6.981382961449753], [11.839308709366801, 7.397042344589434], [12.063946160539556, 7.799808457872301], [12.218872104550597, 8.305824082874322], [12.753671502339214, 8.717762762888993], [12.955467970438971, 9.417771714714702], [13.1675997249971, 9.64062632897341], [13.308676385153914, 10.160362046748926], [13.572949659894558, 10.798565985553564], [14.415378859116682, 11.572368882692071], [14.468192172918974, 11.90475169519341], [14.57717776862253, 12.085360826053501], [14.181336297266792, 12.483656927943112], [14.213530714584634, 12.802035427293344], [14.495787387762842, 12.859396267137326], [14.893385857816522, 12.219047756392582], [14.960151808337598, 11.555574042197222], [14.923564894274955, 10.891325181517471], [15.467872755605269, 9.982336737503429], [14.909353875394713, 9.99212942142273], [14.627200555081057, 9.920919297724536], [14.171466098699025, 10.021378282099928], [13.954218377344002, 9.549494940626685], [14.544466586981766, 8.965861314322266], [14.979995558337688, 8.796104234243471], [15.120865512765331, 8.382150173369423], [15.436091749745765, 7.692812404811971], [15.279460483469107, 7.421924546737968], [14.776545444404572, 6.408498033062044], [14.536560092841111, 6.22695872642069], [14.459407179429345, 5.451760565610299], [14.558935988023501, 5.03059764243153], [14.478372430080466, 4.732605495620446], [14.950953403389658, 4.21038930909492], [15.036219516671249, 3.851367295747123], [15.405395948964379, 3.335300604664339], [15.862732374747479, 3.013537298998982], [15.907380812247649, 2.557389431158612], [16.01285241055535, 2.267639675298084], [15.940918816805061, 1.727672634280295], [15.14634199388524, 1.964014797367184], [14.337812534246577, 2.22787466064949], [13.07582238124675, 2.267097072759014]]] } }, + { "type": "Feature", "properties": { "admin": "Democratic Republic of the Congo", "name": "Dem. Rep. Congo", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[30.833859897593801, 3.50916596111034], [30.773346795380036, 2.339883327642127], [31.174149204235807, 2.204465236821263], [30.852670118948048, 1.849396470543809], [30.468507521290292, 1.58380544677972], [30.086153598762703, 1.062312730306288], [29.875778842902488, 0.597379868976304], [29.819503208136634, -0.205310153813372], [29.587837762172164, -0.58740569417948], [29.579466180140876, -1.341313164885626], [29.29188683443661, -1.620055840667987], [29.254834832483336, -2.215109958508911], [29.117478875451546, -2.292211195488384], [29.02492638521678, -2.839257907730157], [29.276383904749046, -3.293907159034063], [29.339997592900342, -4.499983412294092], [29.519986606572925, -5.419978936386313], [29.41999271008816, -5.939998874539432], [29.620032179490003, -6.520015150583424], [30.199996779101692, -7.079980970898161], [30.740015496551781, -8.340007419470913], [30.34608605319081, -8.238256524288216], [29.002912225060467, -8.40703175215347], [28.734866570762495, -8.526559340044576], [28.449871046672818, -9.164918308146083], [28.673681674928922, -9.605924981324931], [28.496069777141763, -10.789883721564044], [28.372253045370421, -11.793646742401389], [28.642417433392346, -11.971568698782312], [29.341547885869087, -12.36074391037241], [29.616001417771223, -12.178894545137307], [29.699613885219485, -13.257226657771827], [28.934285922976834, -13.248958428605132], [28.52356163912102, -12.698604424696679], [28.15510867687998, -12.272480564017894], [27.38879886242378, -12.132747491100663], [27.164419793412456, -11.608748467661071], [26.55308759939961, -11.924439792532125], [25.752309604604726, -11.784965101776356], [25.418118116973197, -11.330935967659958], [24.783169793402948, -11.238693536018962], [24.314516228947948, -11.262826429899269], [24.257155389103982, -10.951992689663655], [23.912215203555714, -10.926826267137512], [23.456790805767433, -10.867863457892481], [22.837345411884733, -11.017621758674329], [22.402798292742371, -10.99307545333569], [22.155268182064304, -11.084801120653768], [22.208753289486388, -9.894796237836507], [21.87518191904234, -9.523707777548564], [21.801801385187897, -8.908706556842978], [21.949130893652036, -8.305900974158275], [21.746455926203303, -7.920084730667147], [21.728110792739695, -7.2908724910813], [20.514748162526498, -7.299605808138629], [20.601822950938292, -6.93931772219968], [20.091621534920645, -6.943090101756993], [20.037723016040214, -7.116361179231644], [19.417502475673157, -7.155428562044297], [19.166613396896107, -7.738183688999753], [19.016751743249664, -7.988245944860132], [18.464175652752683, -7.847014255406442], [18.134221632569048, -7.98767750410492], [17.472970004962232, -8.068551120641699], [17.089995965247166, -7.545688978712525], [16.860190870845198, -7.222297865429984], [16.573179965896141, -6.622644545115087], [16.326528354567042, -5.877470391466267], [13.375597364971892, -5.864241224799548], [13.02486941900696, -5.984388929878157], [12.735171339578695, -5.965682061388497], [12.322431674863507, -6.100092461779658], [12.182336866920249, -5.789930515163837], [12.436688266660866, -5.684303887559245], [12.468004184629734, -5.248361504745003], [12.631611769265788, -4.991271254092935], [12.995517205465173, -4.781103203961883], [13.258240187237044, -4.882957452009165], [13.600234816144676, -4.500138441590969], [14.144956088933295, -4.510008640158715], [14.209034864975219, -4.793092136253597], [14.582603794013179, -4.970238946150139], [15.170991652088441, -4.3435071753143], [15.753540073314749, -3.855164890156096], [16.006289503654298, -3.535132744972528], [15.972803175529149, -2.712392266453612], [16.407091912510051, -1.740927015798682], [16.86530683764212, -1.225816338713287], [17.523716261472853, -0.743830254726987], [17.638644646889983, -0.424831638189246], [17.663552687254676, -0.058083998213817], [17.826540154703245, 0.288923244626105], [17.774191928791563, 0.855658677571085], [17.89883548347958, 1.741831976728278], [18.09427575040743, 2.365721543788055], [18.39379235197114, 2.90044342692822], [18.453065219809925, 3.504385891123348], [18.542982211997778, 4.201785183118317], [18.932312452884755, 4.709506130385973], [19.467783644293146, 5.031527818212779], [20.290679152108932, 4.691677761245287], [20.927591180106273, 4.322785549329736], [21.659122755630019, 4.224341945813719], [22.405123732195531, 4.02916006104732], [22.704123569436284, 4.633050848810156], [22.841479526468103, 4.710126247573483], [23.297213982850135, 4.609693101414221], [24.41053104014625, 5.108784084489129], [24.805028924262409, 4.897246608902349], [25.128833449003274, 4.927244777847789], [25.278798455514302, 5.170408229997191], [25.650455356557465, 5.256087754737123], [26.402760857862535, 5.150874538590869], [27.044065382604703, 5.127852688004835], [27.374226108517483, 5.233944403500059], [27.979977247842807, 4.408413397637373], [28.428993768026906, 4.287154649264493], [28.696677687298795, 4.455077215996936], [29.159078403446497, 4.38926727947323], [29.715995314256013, 4.600804755060024], [29.953500197069467, 4.173699042167683], [30.833859897593801, 3.50916596111034]]] } }, + { "type": "Feature", "properties": { "admin": "Republic of Congo", "name": "Congo", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[12.995517205465173, -4.781103203961883], [12.620759718484491, -4.438023369976135], [12.318607618873923, -4.606230157086187], [11.914963006242086, -5.037986748884789], [11.093772820691923, -3.978826592630546], [11.855121697648114, -3.42687061932105], [11.478038771214299, -2.765618991714241], [11.820963575903189, -2.514161472181982], [12.495702752338159, -2.391688327650242], [12.575284458067639, -1.948511244315134], [13.109618767965626, -2.428740329603513], [13.992407260807706, -2.470804945489099], [14.299210239324564, -1.998275648612213], [14.425455763413593, -1.333406670744971], [14.316418491277741, -0.552627455247048], [13.843320753645653, 0.038757635901149], [14.276265903386953, 1.196929836426619], [14.026668735417214, 1.395677395021153], [13.282631463278816, 1.31418366129688], [13.003113641012074, 1.830896307783319], [13.07582238124675, 2.267097072759014], [14.337812534246577, 2.22787466064949], [15.14634199388524, 1.964014797367184], [15.940918816805061, 1.727672634280295], [16.01285241055535, 2.267639675298084], [16.537058139724135, 3.198254706226278], [17.133042433346297, 3.728196519379451], [17.809900343505259, 3.560196437998569], [18.453065219809925, 3.504385891123348], [18.39379235197114, 2.90044342692822], [18.09427575040743, 2.365721543788055], [17.89883548347958, 1.741831976728278], [17.774191928791563, 0.855658677571085], [17.826540154703245, 0.288923244626105], [17.663552687254676, -0.058083998213817], [17.638644646889983, -0.424831638189246], [17.523716261472853, -0.743830254726987], [16.86530683764212, -1.225816338713287], [16.407091912510051, -1.740927015798682], [15.972803175529149, -2.712392266453612], [16.006289503654298, -3.535132744972528], [15.753540073314749, -3.855164890156096], [15.170991652088441, -4.3435071753143], [14.582603794013179, -4.970238946150139], [14.209034864975219, -4.793092136253597], [14.144956088933295, -4.510008640158715], [13.600234816144676, -4.500138441590969], [13.258240187237044, -4.882957452009165], [12.995517205465173, -4.781103203961883]]] } }, + { "type": "Feature", "properties": { "admin": "Colombia", "name": "Colombia", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-75.373223232713841, -0.15203175212045], [-75.801465827116587, 0.084801337073202], [-76.292314419240938, 0.416047268064119], [-76.576379767549383, 0.256935533037435], [-77.424984300430367, 0.395686753741117], [-77.668612840470416, 0.825893052570961], [-77.855061408179509, 0.809925034992773], [-78.855258755188686, 1.380923773601822], [-78.990935228171026, 1.691369940595251], [-78.617831387023699, 1.766404120283056], [-78.662118089497838, 2.267355454920476], [-78.427610439757302, 2.629555568854215], [-77.931542527971473, 2.696605739752925], [-77.510431281224996, 3.325016994638246], [-77.127689785455246, 3.849636135265356], [-77.496271938776999, 4.087606105969427], [-77.307601284479375, 4.667984117039452], [-77.533220587865713, 5.582811997902496], [-77.318815070286718, 5.845354112161359], [-77.476660732722266, 6.691116441266301], [-77.881571417945239, 7.223771267114783], [-77.75341386586139, 7.709839789252141], [-77.431107957656977, 7.638061224798733], [-77.242566494440069, 7.935278225125442], [-77.474722866511314, 8.524286200388216], [-77.353360765273848, 8.670504665558068], [-76.836673957003541, 8.638749497914715], [-76.086383836557843, 9.336820583529486], [-75.674600185840035, 9.443248195834597], [-75.664704149056149, 9.774003200718736], [-75.480425991503338, 10.618990383339305], [-74.906895107711975, 11.08304474532032], [-74.276752692344871, 11.102035834187586], [-74.197222663047683, 11.310472723836865], [-73.414763963500278, 11.227015285685479], [-72.62783525255962, 11.731971543825519], [-72.238194953078903, 11.955549628136325], [-71.754090135368628, 12.437303168177305], [-71.399822353791691, 12.376040757695289], [-71.137461107045866, 12.112981879113503], [-71.331583624950284, 11.776284084515805], [-71.973921678338272, 11.608671576377116], [-72.227575446242923, 11.108702093953237], [-72.614657762325194, 10.821975409381777], [-72.905286017534692, 10.45034434655477], [-73.027604132769554, 9.736770331252441], [-73.304951544880026, 9.151999823437604], [-72.788729824500379, 9.085027167187331], [-72.660494757768092, 8.62528778730268], [-72.439862230097944, 8.405275376820027], [-72.360900641555958, 8.002638454617893], [-72.479678921178831, 7.632506008327352], [-72.444487270788059, 7.42378489830048], [-72.19835242378187, 7.340430813013682], [-71.960175747348629, 6.991614895043538], [-70.674233567981503, 7.087784735538717], [-70.093312954372408, 6.960376491723109], [-69.389479946557103, 6.099860541198835], [-68.985318569602327, 6.206804917826856], [-68.265052456318216, 6.153268133972473], [-67.695087246355001, 6.267318020040645], [-67.34143958196556, 6.095468044454021], [-67.521531948502741, 5.556870428891968], [-67.744696621355203, 5.221128648291667], [-67.823012254493534, 4.503937282728898], [-67.621835903581271, 3.839481716319994], [-67.33756384954367, 3.542342230641721], [-67.303173183853417, 3.31845408773718], [-67.809938117123693, 2.820655015469569], [-67.447092047786299, 2.600280869960869], [-67.181294318293041, 2.250638129074062], [-66.876325853122566, 1.253360500489336], [-67.065048183852483, 1.130112209473225], [-67.25999752467358, 1.719998684084956], [-67.537810024674684, 2.037162787276329], [-67.868565029558823, 1.692455145673392], [-69.816973232691609, 1.714805202639624], [-69.804596727157701, 1.089081122233466], [-69.218637661400166, 0.985676581217433], [-69.252434048119042, 0.602650865070075], [-69.452396002872447, 0.706158758950693], [-70.015565761989293, 0.541414292804205], [-70.02065589057004, -0.185156345219539], [-69.577065395776586, -0.549991957200163], [-69.420485805932216, -1.122618503426409], [-69.444101935489599, -1.556287123219817], [-69.893635219996611, -4.298186944194326], [-70.394043952094975, -3.766591485207825], [-70.692682054309699, -3.742872002785858], [-70.047708502874841, -2.725156345229699], [-70.813475714791949, -2.256864515800742], [-71.413645799429773, -2.342802422702128], [-71.774760708285385, -2.169789727388937], [-72.325786505813639, -2.434218031426453], [-73.070392218707212, -2.308954359550952], [-73.659503546834586, -1.260491224781134], [-74.122395189089048, -1.002832533373848], [-74.441600511355958, -0.530820000819887], [-75.106624518520064, -0.05720549886486], [-75.373223232713841, -0.15203175212045]]] } }, + { "type": "Feature", "properties": { "admin": "Costa Rica", "name": "Costa Rica", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-82.965783047197348, 8.225027980985983], [-83.508437262694287, 8.446926581247281], [-83.711473965169063, 8.656836249216864], [-83.596313035806631, 8.830443223501417], [-83.632641567707822, 9.051385809765319], [-83.909885626953724, 9.290802720573579], [-84.303401658856345, 9.487354030795712], [-84.64764421256865, 9.615537421095707], [-84.713350796227743, 9.908051866083849], [-84.975660366541319, 10.086723130733004], [-84.911374884770211, 9.795991522658921], [-85.110923428065291, 9.557039699741308], [-85.339488288092255, 9.834542141148658], [-85.660786505866966, 9.93334747969072], [-85.797444831062819, 10.134885565629032], [-85.791708747078417, 10.439337266476612], [-85.65931372754666, 10.754330959511718], [-85.941725430021748, 10.895278428587799], [-85.712540452807289, 11.088444932494822], [-85.561851976244171, 11.217119248901593], [-84.903003302738924, 10.952303371621895], [-84.673069017256239, 11.082657172078139], [-84.355930752281026, 10.999225572142901], [-84.190178595704822, 10.793450018756671], [-83.895054490885926, 10.726839097532444], [-83.655611741861563, 10.938764146361418], [-83.402319708982944, 10.39543813724465], [-83.015676642575158, 9.992982082555553], [-82.546196255203469, 9.566134751824674], [-82.932890998043561, 9.476812038608172], [-82.927154914059145, 9.074330145702914], [-82.719183112300513, 8.925708726431493], [-82.868657192704759, 8.807266343618521], [-82.829770677405151, 8.626295477732368], [-82.9131764391242, 8.423517157419068], [-82.965783047197348, 8.225027980985983]]] } }, + { "type": "Feature", "properties": { "admin": "Cuba", "name": "Cuba", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-82.268151211257035, 23.188610744717703], [-81.404457160146819, 23.117271429938775], [-80.61876868358118, 23.105980129482994], [-79.679523688460222, 22.765303249598823], [-79.281485968732071, 22.399201565027049], [-78.347434455056472, 22.512166246017085], [-77.993295864560253, 22.277193508385928], [-77.146422492161037, 21.657851467367831], [-76.523824835908528, 21.20681956632437], [-76.194620123993175, 21.220565497314006], [-75.598222418912655, 21.01662445727413], [-75.671060350228032, 20.735091254147999], [-74.933896043584483, 20.693905137611381], [-74.178024868451246, 20.284627793859737], [-74.296648118777242, 20.050378526280678], [-74.961594611292924, 19.923435370355687], [-75.634680141894577, 19.873774318923193], [-76.323656175425981, 19.952890936762056], [-77.755480923153044, 19.855480861891873], [-77.085108405246729, 20.413353786698789], [-77.492654588516601, 20.673105373613886], [-78.137292243141573, 20.739948838783427], [-78.482826707661161, 21.028613389565848], [-78.719866502583997, 21.598113511638431], [-79.284999966127913, 21.559175319906497], [-80.217475348618635, 21.827324327069032], [-80.517534552721401, 22.037078965741756], [-81.820943366203167, 22.192056586185068], [-82.169991828118611, 22.387109279870746], [-81.79500179719264, 22.636964830001951], [-82.775897996740838, 22.688150336187057], [-83.494458787759328, 22.168517971276124], [-83.908800421875611, 22.154565334557329], [-84.052150845053248, 21.910575059491251], [-84.547030198896351, 21.801227728761639], [-84.974911058273079, 21.896028143801082], [-84.44706214062775, 22.204949856041903], [-84.23035702181177, 22.56575470630376], [-83.778239915690165, 22.78811839445569], [-83.267547573565736, 22.983041897060641], [-82.510436164057495, 23.078746649665181], [-82.268151211257035, 23.188610744717703]]] } }, + { "type": "Feature", "properties": { "admin": "Northern Cyprus", "name": "N. Cyprus", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[32.731780226377445, 35.14002594658843], [32.802473585752743, 35.145503648411363], [32.946960890440799, 35.38670339613369], [33.667227003724939, 35.373215847305509], [34.576473829900458, 35.671595567358786], [33.900804477684197, 35.245755927057608], [33.973616570783456, 35.058506374647997], [33.866439650210104, 35.093594672174177], [33.675391880027057, 35.017862860650446], [33.525685255677494, 35.038688462864066], [33.475817498515845, 35.000344550103499], [33.45592207208346, 35.101423651666401], [33.383833449036295, 35.162711900364563], [33.190977003723042, 35.173124701471373], [32.919572381326127, 35.087832749973636], [32.731780226377445, 35.14002594658843]]] } }, + { "type": "Feature", "properties": { "admin": "Cyprus", "name": "Cyprus", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[33.973616570783456, 35.058506374647997], [34.004880812320032, 34.978097846001852], [32.97982710137844, 34.571869411755436], [32.490296258277532, 34.701654771456468], [32.256667107885953, 35.103232326796622], [32.731780226377445, 35.14002594658843], [32.919572381326127, 35.087832749973636], [33.190977003723042, 35.173124701471373], [33.383833449036295, 35.162711900364563], [33.45592207208346, 35.101423651666401], [33.475817498515845, 35.000344550103499], [33.525685255677494, 35.038688462864066], [33.675391880027057, 35.017862860650446], [33.866439650210104, 35.093594672174177], [33.973616570783456, 35.058506374647997]]] } }, + { "type": "Feature", "properties": { "admin": "Czech Republic", "name": "Czech Rep.", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[16.960288120194573, 48.596982326850593], [16.49928266771877, 48.785808010445095], [16.029647251050218, 48.733899034207916], [15.253415561593979, 49.039074205107575], [14.901447381254055, 48.964401760445817], [14.33889773932472, 48.555305284207193], [13.595945672264433, 48.877171942737135], [13.031328973043427, 49.307068182973232], [12.52102420416119, 49.54741526956272], [12.415190870827441, 49.96912079528056], [12.240111118222556, 50.266337795607271], [12.96683678554319, 50.484076443069071], [13.338131951560282, 50.733234361364346], [14.05622765468817, 50.926917629594286], [14.307013380600633, 51.117267767941399], [14.570718214586062, 51.002339382524262], [15.016995883858666, 51.106674099321566], [15.490972120839725, 50.7847299261432], [16.238626743238566, 50.697732652379827], [16.176253289462263, 50.4226073268579], [16.719475945714429, 50.215746568393527], [16.868769158605655, 50.473973700556016], [17.554567091551117, 50.36214590107641], [17.649445021238986, 50.049038397819942], [18.392913852622168, 49.988628648470737], [18.85314415861361, 49.496229763377634], [18.554971144289478, 49.495015367218777], [18.399993523846174, 49.315000515330034], [18.170498488037961, 49.271514797556421], [18.104972771891848, 49.043983466175298], [17.913511590250462, 48.996492824899072], [17.886484816161808, 48.903475246773695], [17.545006951577101, 48.800019029325362], [17.101984897538895, 48.8169688991171], [16.960288120194573, 48.596982326850593]]] } }, + { "type": "Feature", "properties": { "admin": "Germany", "name": "Germany", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[9.92190636560923, 54.983104153048025], [9.939579705452898, 54.596641954153242], [10.950112338920517, 54.363607082733147], [10.939466993868447, 54.008693345752583], [11.95625247564328, 54.196485500701144], [12.518440382546711, 54.470370591847988], [13.647467075259495, 54.075510972705885], [14.119686313542555, 53.757029120491026], [14.353315463934164, 53.248171291713092], [14.074521111719431, 52.981262518925334], [14.437599725002197, 52.62485016540829], [14.685026482815713, 52.089947414755208], [14.607098422919645, 51.745188096719964], [15.016995883858781, 51.106674099321701], [14.570718214586119, 51.002339382524369], [14.307013380600662, 51.117267767941364], [14.05622765468831, 50.92691762959435], [13.338131951560397, 50.733234361364268], [12.966836785543249, 50.484076443069164], [12.240111118222668, 50.266337795607214], [12.41519087082747, 49.969120795280602], [12.521024204161332, 49.547415269562741], [13.031328973043513, 49.307068182973232], [13.595945672264575, 48.877171942737156], [13.243357374737112, 48.416114813829026], [12.884102817443873, 48.289145819687846], [13.025851271220514, 47.637583523135945], [12.93262698736606, 47.467645575543983], [12.620759718484519, 47.672387600284409], [12.141357456112869, 47.703083401065768], [11.426414015354847, 47.523766181013045], [10.544504021861597, 47.566399237653783], [10.402083774465321, 47.302487697939164], [9.896068149463188, 47.58019684507569], [9.594226108446376, 47.525058091820185], [8.522611932009793, 47.830827541691342], [8.317301466514092, 47.613579820336263], [7.466759067422286, 47.620581976911907], [7.59367638513106, 48.333019110703724], [8.099278598674855, 49.017783515003423], [6.658229607783709, 49.201958319691627], [6.186320428094176, 49.4638028021145], [6.242751092156992, 49.90222565367872], [6.043073357781109, 50.128051662794221], [6.156658155958779, 50.803721015010574], [5.988658074577812, 51.85161570902504], [6.589396599970825, 51.85202912048338], [6.842869500362381, 52.228440253297542], [7.092053256873895, 53.14404328064488], [6.905139601274128, 53.482162177130633], [7.100424838905268, 53.693932196662658], [7.936239454793961, 53.748295803433777], [8.121706170289483, 53.527792466844275], [8.800734490604667, 54.02078563090889], [8.572117954145368, 54.395646470754045], [8.526229282270206, 54.962743638725144], [9.282048780971136, 54.830865383516297], [9.92190636560923, 54.983104153048025]]] } }, + { "type": "Feature", "properties": { "admin": "Djibouti", "name": "Djibouti", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[43.081226027200152, 12.699638576707112], [43.317852410664663, 12.390148423711022], [43.286381463398911, 11.974928290245883], [42.715873650896519, 11.735640570518338], [43.145304803242126, 11.462039699748853], [42.776851841000948, 10.926878566934416], [42.55493000000012, 11.105110000000193], [42.314140000000116, 11.0342], [41.755570000000191, 11.05091], [41.739590000000177, 11.355110000000137], [41.661760000000122, 11.6312], [42.000000000000107, 12.100000000000133], [42.351560000000106, 12.54223000000013], [42.779642368344739, 12.455415757695672], [43.081226027200152, 12.699638576707112]]] } }, + { "type": "Feature", "properties": { "admin": "Denmark", "name": "Denmark", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[12.690006137755629, 55.60999095318077], [12.089991082414738, 54.800014553437919], [11.043543328504226, 55.36486379660424], [10.90391360845163, 55.779954738988735], [12.370904168353288, 56.111407375708822], [12.690006137755629, 55.60999095318077]]], [[[10.912181837618359, 56.4586213242779], [10.667803989309986, 56.081383368547208], [10.369992710011983, 56.190007229224719], [9.649984978889306, 55.469999498102041], [9.921906365609173, 54.983104153048046], [9.282048780971136, 54.830865383516155], [8.526229282270235, 54.962743638724973], [8.120310906617588, 55.517722683323612], [8.089976840862247, 56.540011705137587], [8.256581658571262, 56.809969387430286], [8.543437534223385, 57.110002753316891], [9.424469028367609, 57.172066148499468], [9.775558709358561, 57.447940782289649], [10.580005730846151, 57.730016587954843], [10.54610599126269, 57.21573273378614], [10.250000034230222, 56.890016181050456], [10.369992710011983, 56.60998159446082], [10.912181837618359, 56.4586213242779]]]] } }, + { "type": "Feature", "properties": { "admin": "Dominican Republic", "name": "Dominican Rep.", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-71.71236141629295, 19.714455878167353], [-71.587304450146604, 19.884910590082093], [-70.806706102161726, 19.880285549391981], [-70.214364997016119, 19.622885240146157], [-69.950815192327568, 19.647999986240002], [-69.769250047470067, 19.293267116772437], [-69.222125820579862, 19.313214219637096], [-69.254346076113819, 19.015196234609871], [-68.809411994080818, 18.979074408437846], [-68.317943284768958, 18.612197577381689], [-68.689315965434503, 18.205142320218609], [-69.164945848248905, 18.422648423735108], [-69.623987596297624, 18.380712998930246], [-69.952933926051529, 18.428306993071057], [-70.133232998317879, 18.245915025296892], [-70.517137213814195, 18.184290879788829], [-70.669298468697619, 18.42688589118303], [-70.999950120717173, 18.283328762276206], [-71.400209927033885, 17.598564357976596], [-71.657661912712001, 17.757572740138695], [-71.708304816358037, 18.044997056546091], [-71.687737596305865, 18.316660061104468], [-71.945112067335543, 18.616900132720257], [-71.701302659782485, 18.785416978424049], [-71.624873216422813, 19.169837958243303], [-71.71236141629295, 19.714455878167353]]] } }, + { "type": "Feature", "properties": { "admin": "Algeria", "name": "Algeria", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[11.99950564947161, 23.471668402596443], [8.572893100629782, 21.565660712159136], [5.677565952180684, 19.601206976799713], [4.267419467800038, 19.155265204336995], [3.158133172222704, 19.057364203360034], [3.146661004253899, 19.693578599521441], [2.683588494486428, 19.856230170160114], [2.060990838233919, 20.142233384679482], [1.823227573259032, 20.61080943448604], [-1.550054897457613, 22.792665920497377], [-4.92333736817423, 24.974574082940993], [-8.684399786809051, 27.395744126895998], [-8.66512447756419, 27.58947907155822], [-8.665589565454805, 27.656425889592349], [-8.674116176782972, 28.841288967396572], [-7.059227667661928, 29.579228420524522], [-6.060632290053772, 29.731699734001687], [-5.242129278982786, 30.000443020135581], [-4.859646165374469, 30.501187649043839], [-3.690441046554695, 30.896951605751152], [-3.647497931320145, 31.637294012980668], [-3.068980271812647, 31.724497992473207], [-2.616604783529567, 32.094346218386143], [-1.30789913573787, 32.262888902306095], [-1.124551153966308, 32.651521511357124], [-1.388049282222567, 32.864015000941301], [-1.733454555661467, 33.91971283623198], [-1.792985805661686, 34.527918606091198], [-2.169913702798624, 35.168396307916673], [-1.208602871089056, 35.71484874118709], [-0.127454392894606, 35.888662421200799], [0.503876580415209, 36.301272894835272], [1.466918572606545, 36.605647081034398], [3.161698846050824, 36.783904934225205], [4.815758090849129, 36.865036932923452], [5.320120070017792, 36.716518866516616], [6.261819695672611, 37.110655015606731], [7.330384962603969, 37.118380642234364], [7.737078484741003, 36.885707505840209], [8.420964389691674, 36.946427313783154], [8.217824334352313, 36.433176988260271], [8.376367628623766, 35.479876003555937], [8.140981479534302, 34.655145982393783], [7.524481642292242, 34.097376410451453], [7.612641635782181, 33.344114895148955], [8.430472853233367, 32.748337307255944], [8.439102817426116, 32.506284898400814], [9.055602654668148, 32.102691962201284], [9.482139926805273, 30.307556057246181], [9.805634392952411, 29.424638373323383], [9.859997999723443, 28.959989732371007], [9.683884718472765, 28.144173895779193], [9.756128370816779, 27.688258571884141], [9.629056023811073, 27.140953477480913], [9.716285841519747, 26.512206325785691], [9.319410841518161, 26.094324856057447], [9.910692579801774, 25.365454616796733], [9.948261346077969, 24.93695364023251], [10.30384687667836, 24.37931325937091], [10.771363559622925, 24.562532050061744], [11.560669386449002, 24.097909247325511], [11.99950564947161, 23.471668402596443]]] } }, + { "type": "Feature", "properties": { "admin": "Ecuador", "name": "Ecuador", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-80.302560594387188, -3.404856459164712], [-79.770293341780913, -2.65751189535964], [-79.986559210922394, -2.220794366061014], [-80.368783942369234, -2.685158786635788], [-80.967765469064332, -2.246942640800703], [-80.764806281238023, -1.965047702648532], [-80.933659023751702, -1.057454522306358], [-80.583370327461239, -0.906662692878683], [-80.39932471385373, -0.283703301600141], [-80.020898200180355, 0.360340074053468], [-80.090609707342097, 0.768428859862396], [-79.542762010399784, 0.982937730305963], [-78.855258755188686, 1.380923773601822], [-77.855061408179509, 0.809925034992773], [-77.668612840470416, 0.825893052570961], [-77.424984300430367, 0.395686753741117], [-76.576379767549383, 0.256935533037435], [-76.292314419240938, 0.416047268064119], [-75.801465827116587, 0.084801337073202], [-75.373223232713841, -0.15203175212045], [-75.233722703741932, -0.911416924649529], [-75.544995693652027, -1.56160979574588], [-76.635394253226707, -2.608677666843817], [-77.83790483265858, -3.003020521663103], [-78.450683966775628, -3.873096612161375], [-78.639897223612323, -4.547784112164072], [-79.205289069317715, -4.959128513207388], [-79.62497921417615, -4.454198093283494], [-80.028908047185581, -4.346090996928893], [-80.442241990872134, -4.425724379090673], [-80.46929460317692, -4.059286797708999], [-80.184014858709645, -3.821161797708043], [-80.302560594387188, -3.404856459164712]]] } }, + { "type": "Feature", "properties": { "admin": "Egypt", "name": "Egypt", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[34.9226, 29.50133], [34.64174, 29.09942], [34.42655, 28.34399], [34.15451, 27.8233], [33.92136, 27.6487], [33.58811, 27.97136], [33.13676, 28.41765], [32.42323, 29.85108], [32.32046, 29.76043], [32.73482, 28.70523], [33.34876, 27.69989], [34.10455, 26.14227], [34.47387, 25.59856], [34.79507, 25.03375], [35.69241, 23.92671], [35.49372, 23.75237], [35.52598, 23.10244], [36.69069, 22.20485], [36.86623, 22.0], [32.9, 22.0], [29.02, 22.0], [25.0, 22.0], [25.0, 25.682499996360992], [25.0, 29.238654529533452], [24.70007, 30.04419], [24.95762, 30.6616], [24.80287, 31.08929], [25.16482, 31.56915], [26.49533, 31.58568], [27.45762, 31.32126], [28.45048, 31.02577], [28.91353, 30.87005], [29.68342, 31.18686], [30.09503, 31.4734], [30.97693, 31.55586], [31.68796, 31.4296], [31.96041, 30.9336], [32.19247, 31.26034], [32.99392, 31.02407], [33.7734, 30.96746], [34.26544, 31.21936], [34.9226, 29.50133]]] } }, + { "type": "Feature", "properties": { "admin": "Eritrea", "name": "Eritrea", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[42.351560000000106, 12.54223000000013], [42.00975, 12.86582], [41.59856, 13.452090000000108], [41.15519371924983, 13.773319810435224], [40.8966, 14.118640000000138], [40.026218702969167, 14.519579169162281], [39.34061, 14.53155], [39.0994, 14.74064], [38.51295, 14.50547], [37.90607, 14.959430000000165], [37.59377, 14.2131], [36.42951, 14.42211], [36.323188917798113, 14.822480577041057], [36.753860304518575, 16.291874091044289], [36.852530000000108, 16.95655], [37.16747, 17.263140000000128], [37.904000000000103, 17.42754], [38.410089959473218, 17.998307399970312], [38.990622999839999, 16.84062612555169], [39.266110060388016, 15.922723496967246], [39.814293654140208, 15.435647284400314], [41.179274936697645, 14.491079616753209], [41.734951613132345, 13.921036892141554], [42.276830682144848, 13.34399201095442], [42.589576450375255, 13.000421250861901], [43.081226027200152, 12.699638576707112], [42.779642368344739, 12.455415757695672], [42.351560000000106, 12.54223000000013]]] } }, + { "type": "Feature", "properties": { "admin": "Spain", "name": "Spain", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[-9.034817674180244, 41.880570583659669], [-8.98443315269567, 42.592775173506261], [-9.392883673530644, 43.026624660812686], [-7.978189663108308, 43.748337714200979], [-6.754491746436754, 43.567909450853918], [-5.411886359061596, 43.574239813809669], [-4.347842779955783, 43.403449205085025], [-3.51753170410609, 43.455900783861296], [-1.901351284177764, 43.422802028978332], [-1.502770961910528, 43.034014390630425], [0.338046909190581, 42.579546006839543], [0.701590610363894, 42.795734361332599], [1.826793247087153, 42.343384711265678], [2.985998976258457, 42.473015041669854], [3.039484083680548, 41.892120266276891], [2.091841668312184, 41.226088568683082], [0.810524529635188, 41.014731960609332], [0.721331007499401, 40.678318386389229], [0.106691521819869, 40.123933620762003], [-0.278711310212941, 39.309978135732713], [0.111290724293838, 38.738514309233032], [-0.467123582349103, 38.292365831041138], [-0.683389451490598, 37.642353827457811], [-1.438382127274849, 37.443063666324214], [-2.146452602538119, 36.674144192037282], [-3.415780808923386, 36.658899644511173], [-4.368900926114718, 36.677839056946141], [-4.995219285492211, 36.32470815687963], [-5.377159796561457, 35.946850083961458], [-5.866432257500902, 36.02981659600605], [-6.236693894872174, 36.367677110330327], [-6.520190802425402, 36.942913316387312], [-7.45372555177809, 37.097787583966053], [-7.537105475281022, 37.428904323876232], [-7.166507941099863, 37.803894354802217], [-7.029281175148794, 38.075764065089757], [-7.374092169616317, 38.373058580064914], [-7.098036668313126, 39.03007274022378], [-7.498632371439724, 39.629571031241802], [-7.066591559263527, 39.711891587882768], [-7.026413133156593, 40.184524237624238], [-6.864019944679383, 40.330871893874821], [-6.851126674822551, 41.111082668617513], [-6.389087693700914, 41.381815497394641], [-6.668605515967655, 41.883386949219577], [-7.251308966490822, 41.91834605566504], [-7.422512986673794, 41.792074693359822], [-8.01317460776991, 41.790886135417118], [-8.26385698081779, 42.280468654950326], [-8.671945766626719, 42.134689439454952], [-9.034817674180244, 41.880570583659669]]] } }, + { "type": "Feature", "properties": { "admin": "Estonia", "name": "Estonia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[24.312862583114615, 57.793423570376966], [24.428927850042154, 58.383413397853275], [24.061198357853179, 58.257374579493394], [23.426560092876681, 58.612753404364618], [23.339795363058641, 59.187240302153363], [24.604214308376182, 59.465853786855007], [25.864189080516631, 59.611090399811324], [26.949135776484518, 59.445803331125767], [27.981114129353237, 59.47538808861286], [28.131699253051742, 59.300825100330904], [27.420166456824941, 58.724581203844224], [27.716685825315714, 57.791899115624354], [27.288184848751509, 57.474528306703817], [26.46353234223778, 57.476388658266316], [25.602809685984365, 57.847528794986559], [25.164593540149262, 57.970156968815175], [24.312862583114615, 57.793423570376966]]] } }, + { "type": "Feature", "properties": { "admin": "Ethiopia", "name": "Ethiopia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[37.90607, 14.959430000000165], [38.51295, 14.50547], [39.0994, 14.74064], [39.34061, 14.53155], [40.026250000000111, 14.51959], [40.8966, 14.118640000000138], [41.1552, 13.77333], [41.59856, 13.452090000000108], [42.00975, 12.86582], [42.351560000000106, 12.54223000000013], [42.000000000000107, 12.100000000000133], [41.661760000000122, 11.6312], [41.739590000000177, 11.355110000000137], [41.755570000000191, 11.05091], [42.314140000000116, 11.0342], [42.55493000000012, 11.105110000000193], [42.776851841000948, 10.926878566934416], [42.55876, 10.572580000000126], [42.92812, 10.021940000000139], [43.29699, 9.540480000000169], [43.67875, 9.183580000000116], [46.94834, 7.99688], [47.78942, 8.003], [44.9636, 5.001620000000115], [43.66087, 4.95755], [42.769670000000119, 4.252590000000223], [42.12861, 4.234130000000163], [41.855083092644108, 3.918911920483764], [41.171800000000125, 3.91909], [40.768480000000118, 4.257020000000124], [39.854940000000106, 3.83879000000013], [39.559384258765917, 3.422060000000215], [38.89251, 3.50074], [38.67114, 3.61607], [38.436970000000137, 3.58851], [38.120915000000132, 3.598605], [36.85509323800823, 4.447864127672857], [36.159078632855646, 4.447864127672857], [35.817447662353622, 4.776965663462021], [35.817447662353622, 5.338232082790852], [35.298007118233095, 5.506], [34.70702, 6.59422000000012], [34.25032, 6.82607], [34.075100000000184, 7.22595], [33.56829, 7.71334], [32.954180000000228, 7.7849700000001], [33.294800000000116, 8.35458], [33.82550000000014, 8.37916], [33.97498, 8.684560000000145], [33.96162, 9.58358], [34.25745, 10.63009], [34.73115000000012, 10.910170000000106], [34.831630000000125, 11.318960000000116], [35.26049, 12.08286], [35.863630000000164, 12.57828], [36.27022, 13.563330000000118], [36.42951, 14.42211], [37.59377, 14.2131], [37.90607, 14.959430000000165]]] } }, + { "type": "Feature", "properties": { "admin": "Finland", "name": "Finland", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[28.591929559043187, 69.064776923286644], [28.445943637818651, 68.36461294216403], [29.9774263852206, 67.698297024192641], [29.054588657352319, 66.944286200621917], [30.21765, 65.80598], [29.544429559046982, 64.948671576590471], [30.444684686003704, 64.204453436939076], [30.035872430142714, 63.552813625738544], [31.516092156711117, 62.867687486412869], [31.139991082490891, 62.357692776124395], [30.211107212044443, 61.780027777749673], [28.06999759289527, 60.503516547275829], [26.25517296723697, 60.423960679762487], [24.496623976344516, 60.057316392651636], [22.869694858499454, 59.846373196036211], [22.290763787533589, 60.391921291741525], [21.322244093519313, 60.720169989659503], [21.544866163832687, 61.705329494871783], [21.059211053153682, 62.607393296958726], [21.536029493910799, 63.189735012455863], [22.442744174903986, 63.817810370531276], [24.730511508897528, 64.902343655040823], [25.398067661243939, 65.111426500093728], [25.2940430030404, 65.53434642197044], [23.903378533633795, 66.006927395279604], [23.565879754335576, 66.396050930437411], [23.539473097434435, 67.936008612735236], [21.978534783626113, 68.616845608180682], [20.645592889089521, 69.106247260200846], [21.244936150810666, 69.370443020293067], [22.356237827247405, 68.841741441514898], [23.662049594830751, 68.891247463650529], [24.735679152126721, 68.649556789821446], [25.689212680776361, 69.092113755969024], [26.179622023226241, 69.825298977326113], [27.732292107867856, 70.164193020296239], [29.015572950971968, 69.766491197377974], [28.591929559043187, 69.064776923286644]]] } }, + { "type": "Feature", "properties": { "admin": "Fiji", "name": "Fiji", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[178.3736, -17.33992], [178.71806, -17.62846], [178.55271, -18.15059], [177.93266, -18.28799], [177.38146, -18.16432], [177.28504, -17.72465], [177.67087, -17.38114], [178.12557, -17.50481], [178.3736, -17.33992]]], [[[179.364142661964223, -16.801354076946847], [178.725059362997058, -17.012041674368017], [178.596838595117021, -16.63915], [179.096609362997128, -16.43398427754742], [179.413509362997075, -16.379054277547393], [180.000000000000114, -16.067132663642436], [180.000000000000114, -16.555216566639157], [179.364142661964223, -16.801354076946847]]], [[[-179.917369384765237, -16.501783135649358], [-180.0, -16.555216566639157], [-180.0, -16.067132663642436], [-179.793320109048551, -16.020882256741228], [-179.917369384765237, -16.501783135649358]]]] } }, + { "type": "Feature", "properties": { "admin": "Falkland Islands", "name": "Falkland Is.", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-61.2, -51.85], [-60.0, -51.25], [-59.15, -51.5], [-58.55, -51.1], [-57.75, -51.55], [-58.05, -51.9], [-59.4, -52.2], [-59.85, -51.85], [-60.7, -52.3], [-61.2, -51.85]]] } }, + { "type": "Feature", "properties": { "admin": "France", "name": "France", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-52.556424730018378, 2.504705308437053], [-52.939657151894963, 2.124857692875622], [-53.41846513529525, 2.053389187016037], [-53.554839240113481, 2.334896551925964], [-53.778520677288881, 2.376702785650053], [-54.088062506717264, 2.105556545414629], [-54.524754197799737, 2.311848863123785], [-54.271229620975781, 2.738747870286942], [-54.184284023644743, 3.194172268075234], [-54.011503872276812, 3.622569891774857], [-54.3995422023565, 4.212611395683481], [-54.478632981979203, 4.896755682795642], [-53.958044603070917, 5.756548163267808], [-53.618452928264837, 5.646529038918401], [-52.882141282754063, 5.409850979021598], [-51.823342861525916, 4.565768133966144], [-51.657797410678874, 4.156232408053028], [-52.249337531123977, 3.241094468596287], [-52.556424730018378, 2.504705308437053]]], [[[9.560016310269132, 42.152491970379558], [9.229752231491771, 41.380006822264441], [8.77572309737536, 41.583611965494427], [8.544212680707828, 42.256516628583078], [8.746009148807586, 42.628121853193946], [9.390000848028901, 43.009984849614725], [9.560016310269132, 42.152491970379558]]], [[[3.588184441755714, 50.378992418003563], [4.28602298342514, 49.90749664977254], [4.799221632515752, 49.985373033236314], [5.674051954784885, 49.529483547557433], [5.897759230176375, 49.442667141307155], [6.186320428094204, 49.463802802114444], [6.658229607783538, 49.201958319691549], [8.09927859867477, 49.017783515003366], [7.59367638513106, 48.333019110703724], [7.466759067422228, 47.620581976911851], [7.192202182655533, 47.449765529970982], [6.736571079138086, 47.541801255882874], [6.768713820023634, 47.287708238303672], [6.037388950228971, 46.725778713561894], [6.022609490593566, 46.272989813820502], [6.500099724970453, 46.429672756529428], [6.84359297041456, 45.991146552100659], [6.80235517744566, 45.708579820328673], [7.096652459347835, 45.333098863295859], [6.749955275101711, 45.028517971367584], [7.007562290076661, 44.254766750661382], [7.549596388386161, 44.127901109384808], [7.435184767291841, 43.693844916349164], [6.529245232783068, 43.12889232031835], [4.556962517931395, 43.399650987311581], [3.100410597352719, 43.075200507167118], [2.985998976258486, 42.473015041669882], [1.826793247087181, 42.343384711265649], [0.701590610363922, 42.795734361332642], [0.338046909190581, 42.57954600683955], [-1.502770961910471, 43.034014390630482], [-1.901351284177735, 43.422802028978332], [-1.384225226232956, 44.022610378590166], [-1.193797573237361, 46.014917710954862], [-2.225724249673788, 47.064362697938201], [-2.963276129559573, 47.570326646507958], [-4.491554938159481, 47.95495433205641], [-4.592349819344746, 48.68416046812694], [-3.295813971357745, 48.901692409859628], [-1.616510789384932, 48.644421291694577], [-1.933494025063254, 49.776341864615759], [-0.98946895995536, 49.347375800160869], [1.338761020522753, 50.127173163445256], [1.6390010921385, 50.9466063502975], [2.51357303224617, 51.14850617126185], [2.65842207196033, 50.796848049515646], [3.123251580425716, 50.780363267614504], [3.588184441755714, 50.378992418003563]]]] } }, + { "type": "Feature", "properties": { "admin": "Gabon", "name": "Gabon", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[11.093772820691923, -3.978826592630546], [10.066135288135738, -2.969482517105681], [9.405245395554969, -2.144313246269042], [8.797995639693168, -1.111301364754496], [8.830086704146423, -0.779073581550037], [9.048419630579586, -0.459351494960217], [9.291350538783687, 0.268666083167687], [9.492888624721981, 1.010119533691494], [9.83028405115564, 1.067893784993799], [11.285078973036461, 1.057661851400013], [11.276449008843711, 2.261050930180871], [11.751665480199787, 2.326757513839993], [12.359380323952218, 2.19281220133945], [12.951333855855605, 2.321615708826939], [13.07582238124675, 2.267097072759014], [13.003113641012074, 1.830896307783319], [13.282631463278816, 1.31418366129688], [14.026668735417214, 1.395677395021153], [14.276265903386953, 1.196929836426619], [13.843320753645653, 0.038757635901149], [14.316418491277741, -0.552627455247048], [14.425455763413593, -1.333406670744971], [14.299210239324564, -1.998275648612213], [13.992407260807706, -2.470804945489099], [13.109618767965626, -2.428740329603513], [12.575284458067639, -1.948511244315134], [12.495702752338159, -2.391688327650242], [11.820963575903189, -2.514161472181982], [11.478038771214299, -2.765618991714241], [11.855121697648114, -3.42687061932105], [11.093772820691923, -3.978826592630546]]] } }, + { "type": "Feature", "properties": { "admin": "United Kingdom", "name": "United Kingdom", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-5.661948614921896, 54.554603176483838], [-6.197884894220976, 53.867565009163329], [-6.953730231137994, 54.073702297575622], [-7.572167934591078, 54.059956366585979], [-7.366030646178785, 54.595840969452688], [-7.572167934591078, 55.131622219454883], [-6.733847011736144, 55.172860012423783], [-5.661948614921896, 54.554603176483838]]], [[[-3.00500484863528, 58.635000108466322], [-4.073828497728015, 57.55302480735525], [-3.055001796877661, 57.690019029360933], [-1.959280564776918, 57.684799709699512], [-2.219988165689301, 56.870017401753515], [-3.119003058271118, 55.97379303651546], [-2.085009324543023, 55.909998480851264], [-2.005675679673856, 55.804902850350217], [-1.11499101399221, 54.624986477265388], [-0.4304849918542, 54.464376125702145], [0.184981316742039, 53.325014146531018], [0.469976840831777, 52.929999498091959], [1.681530795914739, 52.739520168663987], [1.559987827164377, 52.099998480836], [1.050561557630914, 51.806760565795678], [1.4498653499503, 51.289427802121949], [0.550333693045502, 50.765738837275862], [-0.787517462558639, 50.774988918656206], [-2.489997524414377, 50.500018622431227], [-2.956273972984035, 50.696879991247002], [-3.617448085942327, 50.228355617872708], [-4.542507900399243, 50.341837063185658], [-5.245023159191134, 49.959999904981082], [-5.776566941745299, 50.159677639356815], [-4.309989793301837, 51.210001125689146], [-3.414850633142122, 51.426008612669236], [-3.422719467108322, 51.426848167406078], [-4.984367234710873, 51.593466091510962], [-5.267295701508885, 51.991400458374571], [-4.222346564134852, 52.30135569926135], [-4.770013393564112, 52.840004991255611], [-4.579999152026914, 53.495003770555165], [-3.093830673788658, 53.404547400669671], [-3.092079637047106, 53.404440822963544], [-2.945008510744343, 53.98499970154667], [-3.614700825433033, 54.60093677329256], [-3.63000545898933, 54.615012925833], [-4.844169073903003, 54.790971177786837], [-5.082526617849224, 55.061600653699358], [-4.719112107756643, 55.508472601943467], [-5.047980922862108, 55.783985500707516], [-5.586397670911139, 55.311146145236805], [-5.64499874513018, 56.275014960344791], [-6.149980841486352, 56.785009670633528], [-5.78682471355529, 57.818848375064633], [-5.009998745127574, 58.630013332750039], [-4.211494513353555, 58.550845038479153], [-3.00500484863528, 58.635000108466322]]]] } }, + { "type": "Feature", "properties": { "admin": "Georgia", "name": "Georgia", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[41.55408410011065, 41.535656236327561], [41.703170607272703, 41.962942816732912], [41.453470086438379, 42.645123399417926], [40.875469191253785, 43.013628038091277], [40.321394484220313, 43.128633938156831], [39.955008579270917, 43.434997666999216], [40.07696495947976, 43.553104153002309], [40.922184686045618, 43.38215851498078], [42.394394565608806, 43.220307929042619], [43.756016880067378, 42.74082815202248], [43.931199985536828, 42.554973863284758], [44.537622918481979, 42.71199270280362], [45.470279168485703, 42.502780666669963], [45.776410353382758, 42.09244395605635], [46.404950799348818, 41.860675157227298], [46.145431756379004, 41.722802435872573], [46.637908156120574, 41.181672675128219], [46.501637404166921, 41.064444688474104], [45.962600538930381, 41.123872585609767], [45.217426385281577, 41.411451931314041], [44.972480096218071, 41.248128567055588], [43.582745802592726, 41.09214325618256], [42.619548781104484, 41.583172715819934], [41.55408410011065, 41.535656236327561]]] } }, + { "type": "Feature", "properties": { "admin": "Ghana", "name": "Ghana", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[1.060121697604927, 5.928837388528875], [-0.507637905265938, 5.343472601742675], [-1.063624640294193, 5.000547797053811], [-1.964706590167594, 4.71046214438337], [-2.856125047202397, 4.994475816259508], [-2.810701463217839, 5.389051215024109], [-3.244370083011261, 6.2504715031135], [-2.983584967450326, 7.379704901555511], [-2.56218950032624, 8.219627793811481], [-2.827496303712706, 9.642460842319775], [-2.963896246747111, 10.395334784380081], [-2.94040930827046, 10.962690334512557], [-1.203357713211431, 11.009819240762736], [-0.761575893548183, 10.936929633015053], [-0.438701544588582, 11.09834096927872], [0.023802524423701, 11.018681748900802], [-0.049784715159944, 10.706917832883928], [0.367579990245389, 10.191212876827176], [0.365900506195885, 9.46500397382948], [0.461191847342121, 8.677222601756013], [0.712029249686878, 8.312464504423827], [0.490957472342245, 7.411744289576474], [0.570384148774849, 6.914358628767188], [0.836931186536333, 6.279978745952147], [1.060121697604927, 5.928837388528875]]] } }, + { "type": "Feature", "properties": { "admin": "Guinea", "name": "Guinea", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-8.439298468448696, 7.686042792181736], [-8.722123582382123, 7.711674302598509], [-8.926064622422002, 7.309037380396375], [-9.208786383490844, 7.313920803247952], [-9.403348151069748, 7.526905218938906], [-9.33727983238458, 7.928534450711351], [-9.755342169625832, 8.541055202666923], [-10.016566534861253, 8.42850393313523], [-10.230093553091276, 8.406205552601291], [-10.505477260774667, 8.348896389189603], [-10.494315151399629, 8.715540676300433], [-10.65477047366589, 8.977178452994194], [-10.622395188835037, 9.267910061068276], [-10.839151984083299, 9.688246161330367], [-11.117481248407328, 10.045872911006283], [-11.917277390988655, 10.046983954300556], [-12.150338100625003, 9.858571682164378], [-12.425928514037562, 9.835834051955953], [-12.596719122762206, 9.620188300001969], [-12.711957566773076, 9.342711696810765], [-13.246550258832512, 8.903048610871506], [-13.685153977909788, 9.494743760613458], [-14.074044969122278, 9.886166897008248], [-14.330075852912367, 10.015719712763966], [-14.579698859098254, 10.214467271358513], [-14.693231980843501, 10.65630076745404], [-14.83955379887794, 10.876571560098139], [-15.130311245168167, 11.040411688679525], [-14.685687221728896, 11.527823798056485], [-14.382191534878727, 11.509271958863691], [-14.121406419317776, 11.677117010947693], [-13.900799729863772, 11.678718980348744], [-13.743160773157411, 11.811269029177408], [-13.828271857142122, 12.142644151249041], [-13.718743658899511, 12.247185573775507], [-13.700476040084322, 12.586182969610192], [-13.217818162478235, 12.575873521367964], [-12.499050665730561, 12.332089952031053], [-12.278599005573438, 12.354440008997285], [-12.20356482588563, 12.465647691289401], [-11.658300950557928, 12.386582749882834], [-11.513942836950587, 12.442987575729415], [-11.456168585648269, 12.076834214725336], [-11.297573614944508, 12.077971096235768], [-11.036555955438256, 12.211244615116513], [-10.870829637078211, 12.177887478072106], [-10.593223842806278, 11.923975328005977], [-10.165213792348835, 11.844083563682743], [-9.890992804392011, 12.060478623904968], [-9.567911749703212, 12.194243068892472], [-9.327616339546008, 12.334286200403451], [-9.127473517279581, 12.308060411015331], [-8.905264858424529, 12.088358059126433], [-8.786099005559462, 11.812560939984705], [-8.376304897484911, 11.393645941610627], [-8.581305304386772, 11.136245632364801], [-8.620321010767126, 10.810890814655181], [-8.407310756860026, 10.90925690352276], [-8.282357143578279, 10.792597357623842], [-8.335377163109738, 10.494811916541932], [-8.029943610048617, 10.206534939001711], [-8.22933712404682, 10.129020290563897], [-8.309616461612249, 9.789531968622439], [-8.079113735374348, 9.376223863152033], [-7.832100389019186, 8.575704250518625], [-8.203498907900878, 8.455453192575446], [-8.299048631208562, 8.316443589710302], [-8.221792364932197, 8.123328762235571], [-8.280703497744936, 7.687179673692156], [-8.439298468448696, 7.686042792181736]]] } }, + { "type": "Feature", "properties": { "admin": "Gambia", "name": "Gambia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-16.84152462408127, 13.151393947802557], [-16.713728807023468, 13.594958604379853], [-15.624596320039936, 13.623587347869556], [-15.398770310924457, 13.860368760630916], [-15.081735398813816, 13.876491807505982], [-14.687030808968483, 13.63035696049978], [-14.376713833055785, 13.625680243377371], [-14.046992356817478, 13.794067898000446], [-13.844963344772404, 13.505041612191999], [-14.277701788784553, 13.28058502853224], [-14.712197231494626, 13.298206691943774], [-15.141163295949463, 13.509511623585235], [-15.511812506562931, 13.278569647672864], [-15.691000535534991, 13.270353094938455], [-15.931295945692208, 13.130284125211331], [-16.84152462408127, 13.151393947802557]]] } }, + { "type": "Feature", "properties": { "admin": "Guinea Bissau", "name": "Guinea-Bissau", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-15.130311245168167, 11.040411688679525], [-15.664180467175523, 11.458474025920792], [-16.085214199273562, 11.524594021038236], [-16.314786749730199, 11.806514797406548], [-16.308947312881227, 11.958701890506116], [-16.613838263403277, 12.170911159712698], [-16.67745195155457, 12.38485158940105], [-16.147716844130581, 12.547761542201185], [-15.816574266004251, 12.515567124883345], [-15.548476935274005, 12.628170070847343], [-13.700476040084322, 12.586182969610192], [-13.718743658899511, 12.247185573775507], [-13.828271857142122, 12.142644151249041], [-13.743160773157411, 11.811269029177408], [-13.900799729863772, 11.678718980348744], [-14.121406419317776, 11.677117010947693], [-14.382191534878727, 11.509271958863691], [-14.685687221728896, 11.527823798056485], [-15.130311245168167, 11.040411688679525]]] } }, + { "type": "Feature", "properties": { "admin": "Equatorial Guinea", "name": "Eq. Guinea", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[9.492888624721981, 1.010119533691494], [9.305613234096255, 1.160911363119183], [9.649158155972627, 2.283866075037735], [11.276449008843711, 2.261050930180871], [11.285078973036461, 1.057661851400013], [9.83028405115564, 1.067893784993799], [9.492888624721981, 1.010119533691494]]] } }, + { "type": "Feature", "properties": { "admin": "Greece", "name": "Greece", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[23.699980096133, 35.705004380835526], [24.246665073348673, 35.368022365860149], [25.025015496528873, 35.424995632461979], [25.769207797964182, 35.354018052709073], [25.745023227651579, 35.179997666966209], [26.290002882601719, 35.299990342747911], [26.164997592887651, 35.004995429009789], [24.724982130642299, 34.919987697889603], [24.735007358506941, 35.084990546197581], [23.514978468528106, 35.27999156345097], [23.699980096133, 35.705004380835526]]], [[[26.604195590936282, 41.562114569661098], [26.294602085075777, 40.936261298174244], [26.056942172965499, 40.824123440100827], [25.44767703624418, 40.852545477861455], [24.925848422960932, 40.947061672523226], [23.714811232200809, 40.687129218095116], [24.407998894964063, 40.124992987624083], [23.89996788910258, 39.962005520175573], [23.342999301860797, 39.960997829745786], [22.813987664488959, 40.476005153966547], [22.626298862404777, 40.256561184239175], [22.849747755634805, 39.659310818025759], [23.350027296652595, 39.190011298167256], [22.97309939951554, 38.97090322524965], [23.53001631032495, 38.51000112563846], [24.025024855248937, 38.219992987616443], [24.040011020613601, 37.655014553369419], [23.115002882589145, 37.920011298162215], [23.409971958111065, 37.409990749657389], [22.77497195810863, 37.305010077456551], [23.154225294698612, 36.422505804992042], [22.4900281104511, 36.410000108377446], [21.670026482843692, 36.84498647719419], [21.295010613701574, 37.644989325504689], [21.120034213961329, 38.31032339126272], [20.730032179454579, 38.769985256498778], [20.217712029712853, 39.340234686839629], [20.150015903410516, 39.624997666984022], [20.615000441172779, 40.110006822259422], [20.67499677906363, 40.434999904943048], [20.999989861747274, 40.580003973953964], [21.020040317476422, 40.842726955725873], [21.674160597426969, 40.931274522457976], [22.055377638444266, 41.149865831052686], [22.597308383889008, 41.130487168943198], [22.76177, 41.3048], [22.952377150166562, 41.337993882811212], [23.692073601992455, 41.309080918943849], [24.492644891058031, 41.583896185872035], [25.19720136892553, 41.234485988930651], [26.106138136507177, 41.328898830727823], [26.11704186372091, 41.826904608724725], [26.604195590936282, 41.562114569661098]]]] } }, + { "type": "Feature", "properties": { "admin": "Greenland", "name": "Greenland", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-46.76379, 82.62796], [-43.40644, 83.22516], [-39.89753, 83.18018], [-38.62214, 83.54905], [-35.08787, 83.64513], [-27.10046, 83.51966], [-20.84539, 82.72669], [-22.69182, 82.34165], [-26.51753, 82.29765], [-31.9, 82.2], [-31.39646, 82.02154], [-27.85666, 82.13178], [-24.84448, 81.78697], [-22.90328, 82.09317], [-22.07175, 81.73449], [-23.16961, 81.15271], [-20.62363, 81.52462], [-15.76818, 81.91245], [-12.77018, 81.71885], [-12.20855, 81.29154], [-16.28533, 80.58004], [-16.85, 80.35], [-20.04624, 80.17708], [-17.73035, 80.12912], [-18.9, 79.4], [-19.70499, 78.75128], [-19.67353, 77.63859], [-18.47285, 76.98565], [-20.03503, 76.94434], [-21.67944, 76.62795], [-19.83407, 76.09808], [-19.59896, 75.24838], [-20.66818, 75.15585], [-19.37281, 74.29561], [-21.59422, 74.22382], [-20.43454, 73.81713], [-20.76234, 73.46436], [-22.17221, 73.30955], [-23.56593, 73.30663], [-22.31311, 72.62928], [-22.29954, 72.18409], [-24.27834, 72.59788], [-24.79296, 72.3302], [-23.44296, 72.08016], [-22.13281, 71.46898], [-21.75356, 70.66369], [-23.53603, 70.471], [-24.30702, 70.85649], [-25.54341, 71.43094], [-25.20135, 70.75226], [-26.36276, 70.22646], [-23.72742, 70.18401], [-22.34902, 70.12946], [-25.02927, 69.2588], [-27.74737, 68.47046], [-30.67371, 68.12503], [-31.77665, 68.12078], [-32.81105, 67.73547], [-34.20196, 66.67974], [-36.35284, 65.9789], [-37.04378, 65.93768], [-38.37505, 65.69213], [-39.81222, 65.45848], [-40.66899, 64.83997], [-40.68281, 64.13902], [-41.1887, 63.48246], [-42.81938, 62.68233], [-42.41666, 61.90093], [-42.86619, 61.07404], [-43.3784, 60.09772], [-44.7875, 60.03676], [-46.26364, 60.85328], [-48.26294, 60.85843], [-49.23308, 61.40681], [-49.90039, 62.38336], [-51.63325, 63.62691], [-52.14014, 64.27842], [-52.27659, 65.1767], [-53.66166, 66.09957], [-53.30161, 66.8365], [-53.96911, 67.18899], [-52.9804, 68.35759], [-51.47536, 68.72958], [-51.08041, 69.14781], [-50.87122, 69.9291], [-52.013585, 69.574925], [-52.55792, 69.42616], [-53.45629, 69.283625], [-54.68336, 69.61003], [-54.75001, 70.28932], [-54.35884, 70.821315], [-53.431315, 70.835755], [-51.39014, 70.56978], [-53.10937, 71.20485], [-54.00422, 71.54719], [-55.0, 71.406536967272558], [-55.83468, 71.65444], [-54.71819, 72.58625], [-55.32634, 72.95861], [-56.12003, 73.64977], [-57.32363, 74.71026], [-58.59679, 75.09861], [-58.58516, 75.51727], [-61.26861, 76.10238], [-63.39165, 76.1752], [-66.06427, 76.13486], [-68.50438, 76.06141], [-69.66485, 76.37975], [-71.40257, 77.00857], [-68.77671, 77.32312], [-66.76397, 77.37595], [-71.04293, 77.63595], [-73.297, 78.04419], [-73.15938, 78.43271], [-69.37345, 78.91388], [-65.7107, 79.39436], [-65.3239, 79.75814], [-68.02298, 80.11721], [-67.15129, 80.51582], [-63.68925, 81.21396], [-62.23444, 81.3211], [-62.65116, 81.77042], [-60.28249, 82.03363], [-57.20744, 82.19074], [-54.13442, 82.19962], [-53.04328, 81.88833], [-50.39061, 82.43883], [-48.00386, 82.06481], [-46.59984, 81.985945], [-44.523, 81.6607], [-46.9007, 82.19979], [-46.76379, 82.62796]]] } }, + { "type": "Feature", "properties": { "admin": "Guatemala", "name": "Guatemala", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-90.095554572290951, 13.73533763270073], [-90.608624030300817, 13.909771429901948], [-91.232410244496037, 13.927832342987953], [-91.689746670279106, 14.126218166556452], [-92.227750006869812, 14.538828640190925], [-92.203229539747298, 14.830102850804066], [-92.087215949252041, 15.064584662328436], [-92.229248623406249, 15.251446641495857], [-91.747960171255912, 16.066564846251719], [-90.464472622422647, 16.069562079324651], [-90.438866950222021, 16.410109768128091], [-90.600846727240906, 16.470777899638758], [-90.711821865587694, 16.687483018454724], [-91.081670091500641, 16.918476670799404], [-91.453921271515128, 17.252177232324168], [-91.002269253284197, 17.254657701074176], [-91.001519945015943, 17.817594916245707], [-90.067933519230948, 17.819326076727474], [-89.143080410503302, 17.808318996649316], [-89.15080603713092, 17.015576687075832], [-89.229121670269265, 15.886937567605166], [-88.930612759135244, 15.887273464415072], [-88.604586147805833, 15.706380113177358], [-88.518364020526846, 15.855389105690971], [-88.22502275262201, 15.727722479713901], [-88.680679694355618, 15.346247056535301], [-89.15481096063354, 15.066419175674806], [-89.225220099631244, 14.874286200413618], [-89.145535041037149, 14.67801911056908], [-89.353325975282772, 14.424132798719112], [-89.587342698916544, 14.362586167859485], [-89.5342193265205, 14.244815578666302], [-89.7219339668207, 14.134228013561694], [-90.064677903996568, 13.881969509328924], [-90.095554572290951, 13.73533763270073]]] } }, + { "type": "Feature", "properties": { "admin": "Guyana", "name": "Guyana", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-59.758284878159181, 8.367034816924045], [-59.10168412945864, 7.99920197187049], [-58.482962205628041, 7.347691351750696], [-58.454876064677414, 6.832787380394463], [-58.078103196837361, 6.809093736188641], [-57.542218593970631, 6.321268215353355], [-57.147436489476874, 5.973149929219161], [-57.307245856339492, 5.073566595882225], [-57.914288906472123, 4.812626451024413], [-57.860209520078691, 4.576801052260449], [-58.044694383360664, 4.060863552258382], [-57.601568976457848, 3.334654649260684], [-57.281433478409703, 3.333491929534119], [-57.150097825739898, 2.768926906745406], [-56.53938574891454, 1.89952260986692], [-56.782704230360814, 1.863710842288653], [-57.33582292339689, 1.948537705895759], [-57.660971035377358, 1.682584947105638], [-58.113449876525003, 1.507195135907025], [-58.429477098205957, 1.46394196207872], [-58.540012986878288, 1.26808828369252], [-59.030861579002639, 1.317697658692722], [-59.646043667221242, 1.786893825686789], [-59.718545701726732, 2.249630438644359], [-59.974524909084543, 2.755232652188055], [-59.815413174057852, 3.606498521332085], [-59.538039923731219, 3.958802598481937], [-59.767405768458701, 4.423502915866606], [-60.111002366767373, 4.574966538914082], [-59.980958624904865, 5.014061184098138], [-60.213683437731319, 5.2444863956876], [-60.733574184803707, 5.2002772078619], [-61.410302903881941, 5.959068101419616], [-61.139415045807937, 6.234296779806142], [-61.159336310456467, 6.696077378766317], [-60.543999192940966, 6.856584377464881], [-60.295668097562377, 7.043911444522918], [-60.637972785063752, 7.414999904810853], [-60.550587938058186, 7.779602972846178], [-59.758284878159181, 8.367034816924045]]] } }, + { "type": "Feature", "properties": { "admin": "Honduras", "name": "Honduras", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-87.316654425795463, 12.984685777229], [-87.48940873894712, 13.29753489832393], [-87.793111131526501, 13.384480495655165], [-87.723502977229288, 13.785050360565602], [-87.859515347021599, 13.893312486217097], [-88.065342576840109, 13.964625962779788], [-88.503997972349609, 13.845485948130939], [-88.541230841815931, 13.98015473068352], [-88.843072882832743, 14.140506700085208], [-89.058511929057644, 14.340029405164213], [-89.353325975282786, 14.424132798719084], [-89.145535041037164, 14.678019110569149], [-89.22522009963123, 14.874286200413675], [-89.154810960633526, 15.066419175674863], [-88.680679694355575, 15.346247056535386], [-88.225022752621925, 15.727722479714027], [-88.121153123715359, 15.688655096901355], [-87.901812506852394, 15.864458319558194], [-87.615680101252309, 15.878798529519198], [-87.522920905288444, 15.797278957578779], [-87.367762417332116, 15.846940009011286], [-86.903191291028165, 15.756712958229565], [-86.440945604177372, 15.782835394753189], [-86.119233974944322, 15.893448798073958], [-86.00195431185783, 16.005405788634388], [-85.68331743034625, 15.953651841693949], [-85.444003872402547, 15.885749009662444], [-85.182443610357183, 15.909158433490628], [-84.98372188997881, 15.995923163308698], [-84.526979743167118, 15.857223619037423], [-84.36825558138257, 15.835157782448729], [-84.063054572266807, 15.648244126849132], [-83.773976610026111, 15.42407176356687], [-83.410381232420363, 15.27090281825377], [-83.147219000974104, 14.995829169164207], [-83.489988776366005, 15.01626719813566], [-83.628584967772866, 14.880073960830368], [-83.975721401693576, 14.749435939996483], [-84.228341640952394, 14.748764146376626], [-84.449335903648588, 14.62161428472251], [-84.64958207877963, 14.666805324761865], [-84.820036790694289, 14.819586696832628], [-84.924500698572302, 14.790492865452332], [-85.052787441736868, 14.551541042534719], [-85.148750576502877, 14.560196844943615], [-85.165364549484806, 14.354369615125048], [-85.514413011400265, 14.079011745657905], [-85.698665330736944, 13.960078436737998], [-85.801294725268505, 13.8360549992376], [-86.096263800790595, 14.03818736414723], [-86.312142096689826, 13.771356106008223], [-86.520708177419891, 13.778487453664464], [-86.755086636079596, 13.754845485890936], [-86.733821784191463, 13.263092556201398], [-86.880557013684353, 13.254204209847213], [-87.005769009127434, 13.025794379117254], [-87.316654425795463, 12.984685777229]]] } }, + { "type": "Feature", "properties": { "admin": "Croatia", "name": "Croatia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[18.829838087650039, 45.908877671891837], [19.072768995854172, 45.521511135432078], [19.390475701584588, 45.236515611342369], [19.005486281010118, 44.860233669609144], [18.553214145591646, 45.08158966733145], [17.861783481526398, 45.067740383477137], [17.00214603035101, 45.233776760430935], [16.534939406000202, 45.211607570977705], [16.318156772535868, 45.004126695325901], [15.959367303133373, 45.233776760430935], [15.750026075918978, 44.81871165626255], [16.239660271884528, 44.351143296885695], [16.456442905348862, 44.041239732431265], [16.916156447017325, 43.667722479825663], [17.297373488034449, 43.446340643887353], [17.674921502358981, 43.028562527023603], [18.56, 42.65], [18.450016310304814, 42.47999136002931], [17.509970330483323, 42.84999461523914], [16.930005730871638, 43.209998480800373], [16.015384555737679, 43.507215481127204], [15.174453973052094, 44.243191229827907], [15.376250441151793, 44.317915350922064], [14.920309279040504, 44.73848399512945], [14.901602410550874, 45.076060289076104], [14.258747592839992, 45.233776760430935], [13.952254672917032, 44.802123521496853], [13.65697553880119, 45.136935126315947], [13.679403110415816, 45.484149074884996], [13.715059848697248, 45.500323798192419], [14.411968214585496, 45.466165676447403], [14.595109490627916, 45.63494090431282], [14.935243767972961, 45.471695054702757], [15.327674594797424, 45.452316392593325], [15.323953891672428, 45.731782538427687], [15.671529575267638, 45.8341535507979], [15.768732944408608, 46.23810822202352], [16.564808383864939, 46.503750922219794], [16.882515089595412, 46.380631822284428], [17.630066359129554, 45.951769110694087], [18.456062452882858, 45.759481106136143], [18.829838087650039, 45.908877671891837]]] } }, + { "type": "Feature", "properties": { "admin": "Haiti", "name": "Haiti", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-73.189790615517595, 19.915683905511909], [-72.579672817663607, 19.871500555902351], [-71.71236141629295, 19.714455878167353], [-71.624873216422813, 19.169837958243303], [-71.701302659782485, 18.785416978424049], [-71.945112067335543, 18.616900132720257], [-71.687737596305865, 18.316660061104468], [-71.708304816358037, 18.044997056546091], [-72.372476162389333, 18.214960842354053], [-72.844411180294856, 18.145611070218362], [-73.454554816365018, 18.217906398994696], [-73.922433234335642, 18.030992743395], [-74.458033616824764, 18.342549953682703], [-74.369925299767118, 18.664907538319408], [-73.449542202432696, 18.526052964751141], [-72.694937099890623, 18.445799465401858], [-72.334881557896992, 18.66842153571525], [-72.791649542924873, 19.101625067618027], [-72.784104783810264, 19.483591416903405], [-73.41502234566174, 19.639550889560276], [-73.189790615517595, 19.915683905511909]]] } }, + { "type": "Feature", "properties": { "admin": "Hungary", "name": "Hungary", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[16.202298211337361, 46.852385972676949], [16.534267612380372, 47.496170966169103], [16.340584344150411, 47.712901923201215], [16.903754103267257, 47.714865627628321], [16.979666782304033, 48.123497015976298], [17.488472934649813, 47.867466132186209], [17.857132602620023, 47.758428860050365], [18.696512892336923, 47.88095368101439], [18.777024773847668, 48.081768296900627], [19.174364861739885, 48.111378892603859], [19.66136355965849, 48.266614895208647], [19.769470656013109, 48.2026911484636], [20.239054396249344, 48.327567247096916], [20.473562045989862, 48.562850043321809], [20.801293979584919, 48.62385407164237], [21.872236362401729, 48.319970811550007], [22.085608351334848, 48.422264309271782], [22.640819939878746, 48.150239569687351], [22.710531447040488, 47.882193915389394], [22.09976769378283, 47.672439276716695], [21.626514926853869, 46.994237779318148], [21.021952345471245, 46.316087958351886], [20.220192498462833, 46.127468980486547], [19.596044549241579, 46.171729844744533], [18.829838087649957, 45.908877671891915], [18.456062452882858, 45.759481106136121], [17.630066359129554, 45.95176911069418], [16.882515089595298, 46.380631822284428], [16.564808383864854, 46.503750922219822], [16.370504998447412, 46.841327216166498], [16.202298211337361, 46.852385972676949]]] } }, + { "type": "Feature", "properties": { "admin": "Indonesia", "name": "Indonesia", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[120.715608758630438, -10.239581394087862], [120.295014276206871, -10.258649997603525], [118.967808465654684, -9.55796925215803], [119.900309686361609, -9.361340427287514], [120.425755649905398, -9.665921319215796], [120.775501743656719, -9.969675388227456], [120.715608758630438, -10.239581394087862]]], [[[124.435950148619384, -10.14000090906144], [123.579981724136701, -10.359987481327961], [123.459989048354998, -10.239994805546171], [123.55000939340745, -9.900015557497978], [123.980008986508096, -9.290026950724693], [124.96868248911619, -8.892790215697046], [125.070019972840612, -9.089987481322835], [125.088520135601073, -9.393173109579321], [124.435950148619384, -10.14000090906144]]], [[[117.900018345207741, -8.095681247594923], [118.260616489740471, -8.362383314653327], [118.87845991422212, -8.280682875199828], [119.126506789223086, -8.705824883665072], [117.97040164598927, -8.906639499551257], [117.277730747549015, -9.040894870645557], [116.74014082241662, -9.032936700072637], [117.083737420725313, -8.457157891476539], [117.632024367342126, -8.44930307376819], [117.900018345207741, -8.095681247594923]]], [[[122.903537225436082, -8.094234307490735], [122.756982863456287, -8.649807631060638], [121.2544905945701, -8.933666273639941], [119.924390903809567, -8.810417982623873], [119.920928582846102, -8.44485890059107], [120.715091994307542, -8.236964613480863], [121.341668735846554, -8.53673959720602], [122.007364536630405, -8.46062021244016], [122.903537225436082, -8.094234307490735]]], [[[108.623478631628927, -6.777673841990675], [110.539227329553285, -6.877357679881682], [110.759575636845909, -6.465186455921751], [112.614811232556349, -6.946035658397589], [112.978768345188087, -7.594213148634578], [114.478935174621142, -7.776527601760277], [115.705526971501058, -8.370806573116864], [114.564511346496488, -8.75181690840483], [113.464733514460875, -8.348947442257424], [112.559672479301028, -8.376180922075163], [111.522061395312448, -8.302128594600957], [110.586149530074294, -8.122604668819021], [109.427667270955183, -7.740664157749761], [108.693655226681301, -7.641600437046219], [108.277763299596302, -7.766657403192579], [106.454102004016136, -7.354899590690947], [106.280624220812285, -6.924899997590201], [105.365486281355516, -6.851416110871169], [106.051645949327053, -5.895918877794499], [107.265008579540165, -5.954985039904058], [108.072091099074683, -6.345762220895237], [108.486846144649235, -6.421984958525768], [108.623478631628927, -6.777673841990675]]], [[[134.724624465066654, -6.214400730009286], [134.210133905168902, -6.895237725454704], [134.112775506730998, -6.142467136259014], [134.290335728085779, -5.783057549669038], [134.499625278867882, -5.445042006047898], [134.727001580952106, -5.737582289252158], [134.724624465066654, -6.214400730009286]]], [[[127.249215122588893, -3.459065036638889], [126.874922723498855, -3.790982761249579], [126.183802118027302, -3.607376397316556], [125.989033644719257, -3.177273451351325], [127.00065148326496, -3.12931772218441], [127.249215122588893, -3.459065036638889]]], [[[130.471344028851775, -3.09376433676762], [130.834836053592767, -3.858472181822761], [129.990546502808115, -3.446300957862817], [129.155248651242403, -3.362636813982248], [128.590683628453633, -3.428679294451256], [127.898891229362334, -3.393435967628192], [128.135879347852779, -2.843650404474914], [129.370997756060888, -2.802154229344551], [130.471344028851775, -3.09376433676762]]], [[[134.143367954647772, -1.151867364103594], [134.422627394753022, -2.769184665542383], [135.457602980694674, -3.367752780779113], [136.293314243718754, -2.30704233155609], [137.4407377463275, -1.703513278819372], [138.329727411044757, -1.70268645590265], [139.18492068904294, -2.051295668143637], [139.926684198160387, -2.409051608900284], [141.000210402591847, -2.600151055515624], [141.017056919519007, -5.85902190513802], [141.033851760013874, -9.117892754760417], [140.143415155192542, -8.297167657100955], [139.127766554928087, -8.096042982620942], [138.881476678624949, -8.380935153846094], [137.614473911692812, -8.41168263105976], [138.039099155835174, -7.597882175327354], [138.668621454014783, -7.320224704623072], [138.407913853102343, -6.232849216337483], [137.927839797110835, -5.393365573755998], [135.989250116113453, -4.546543877789047], [135.164597609599667, -4.462931410340771], [133.662880487197867, -3.538853448097526], [133.367704705946778, -4.024818617370314], [132.983955519747326, -4.112978610860281], [132.75694095268895, -3.746282647317129], [132.753788690319197, -3.311787204607071], [131.989804315316178, -2.820551039240455], [133.066844517143466, -2.460417982598443], [133.780030959203486, -2.479848321140209], [133.69621178602614, -2.214541517753687], [132.232373488494204, -2.212526136894325], [131.836221958544684, -1.617161960459597], [130.942839797082797, -1.432522067880796], [130.519558140180038, -0.937720228686075], [131.867537876513609, -0.695461114101818], [132.380116408416768, -0.369537855636977], [133.985548130428384, -0.780210463060442], [134.143367954647772, -1.151867364103594]]], [[[125.240500522971573, 1.419836127117605], [124.43703535369734, 0.427881171058971], [123.685504998876695, 0.235593166500877], [122.723083123872854, 0.431136786293337], [121.056724888189081, 0.381217352699451], [120.18308312386273, 0.23724681233422], [120.040869582195455, -0.519657891444851], [120.935905389490699, -1.408905938323372], [121.475820754076167, -0.955962009285116], [123.34056481332847, -0.615672702643081], [123.258399285984481, -1.076213067228337], [122.822715285331597, -0.930950616055881], [122.388529901215364, -1.516858005381124], [121.508273553555455, -1.904482924002422], [122.454572381684272, -3.186058444840881], [122.271896193532541, -3.529500013852696], [123.170962762546537, -4.683693129091707], [123.162332798353759, -5.34060393638596], [122.628515252778683, -5.634591159694494], [122.236394484548057, -5.282933037948281], [122.71956912647704, -4.46417164471579], [121.738233677254357, -4.851331475446499], [121.48946333220124, -4.574552504091215], [121.619171177253861, -4.188477878438674], [120.898181593917684, -3.602105401222828], [120.972388950688767, -2.627642917494909], [120.305452915529884, -2.931603692235725], [120.39004723519173, -4.097579034037223], [120.430716587405371, -5.528241062037778], [119.796543410319487, -5.67340016034565], [119.36690555224493, -5.379878024927804], [119.653606398600104, -4.459417412944958], [119.498835483885969, -3.49441171632651], [119.078344354326987, -3.487021986508764], [118.767768996252869, -2.801999200047688], [119.180973748858662, -2.147103773612798], [119.323393996255049, -1.35314706788047], [119.825998976725828, 0.154254462073496], [120.035701938966341, 0.566477362465804], [120.885779250167687, 1.309222723796835], [121.666816847826965, 1.013943589681076], [122.927566766451818, 0.875192368977465], [124.077522414242836, 0.917101955566139], [125.065989211121803, 1.643259182131558], [125.240500522971573, 1.419836127117605]]], [[[128.688248732620707, 1.132385972494106], [128.635952183141342, 0.258485826006179], [128.120169712436166, 0.356412665199286], [127.968034295768845, -0.252077325037533], [128.379998813999691, -0.780003757331286], [128.100015903842291, -0.899996433112974], [127.69647464407501, -0.266598402511505], [127.399490187693743, 1.011721503092573], [127.600511509309044, 1.81069082275718], [127.932377557487484, 2.174596258956555], [128.004156121940809, 1.628531398928331], [128.594559360875451, 1.540810655112864], [128.688248732620707, 1.132385972494106]]], [[[117.875627069166001, 1.827640692548911], [118.996747267738158, 0.902219143066048], [117.811858351717788, 0.784241848143722], [117.478338657706047, 0.102474676917026], [117.521643507966587, -0.803723239753211], [116.560048455879496, -1.487660821136231], [116.533796828275158, -2.483517347832901], [116.148083937648607, -4.012726332214014], [116.000857782049067, -3.657037448749008], [114.864803094544513, -4.106984144714416], [114.468651564595064, -3.49570362713382], [113.755671828264099, -3.439169610206519], [113.256994256647545, -3.118775729996854], [112.068126255340644, -3.478392022316071], [111.703290643359992, -2.994442233902631], [111.04824018762821, -3.049425957861188], [110.223846063275971, -2.934032484553483], [110.070935500124335, -1.592874037282414], [109.571947869914041, -1.314906507984489], [109.091873813922518, -0.459506524257051], [108.952657505328162, 0.415375474444346], [109.069136183714036, 1.341933905437642], [109.663260125773718, 2.006466986494984], [109.830226678508836, 1.338135687664191], [110.514060907027101, 0.773131415200993], [111.159137811326559, 0.976478176269509], [111.797548455860408, 0.904441229654651], [112.380251906383648, 1.410120957846757], [112.859809198052176, 1.497790025229946], [113.805849644019531, 1.217548732911041], [114.621355422017473, 1.430688177898886], [115.134037306785231, 2.821481838386219], [115.51907840379198, 3.169238389494395], [115.86551720587677, 4.306559149590156], [117.01521447150634, 4.306094061699468], [117.882034946770162, 4.137551377779487], [117.313232456533513, 3.234428208830578], [118.048329705885351, 2.287690131027361], [117.875627069166001, 1.827640692548911]]], [[[105.817655063909356, -5.852355645372411], [104.710384149191498, -5.873284600450644], [103.868213332130736, -5.037314955264974], [102.584260695406897, -4.220258884298203], [102.156173130300999, -3.614146009946765], [101.399113397225051, -2.799777113459171], [100.902502882900137, -2.05026213949786], [100.141980828860596, -0.650347588710957], [99.26373986206022, 0.183141587724663], [98.970011020913319, 1.042882391764536], [98.601351352943084, 1.823506577965616], [97.699597609449881, 2.453183905442116], [97.17694217324987, 3.30879059489861], [96.424016554757316, 3.86885976807791], [95.380876092513475, 4.970782172053673], [95.293026157617305, 5.479820868344816], [95.936862827541745, 5.439513251157108], [97.484882033277088, 5.24632090903401], [98.369169142655679, 4.268370266126366], [99.142558628335792, 3.590349636240915], [99.693997837322399, 3.174328518075156], [100.641433546961665, 2.099381211755798], [101.658012323007313, 2.083697414555189], [102.498271112073212, 1.398700466310217], [103.076840448013002, 0.561361395668854], [103.838396030698348, 0.104541734208666], [103.437645298274973, -0.711945896002845], [104.010788608824001, -1.059211521004229], [104.369991489684878, -1.084843031421016], [104.539490187602155, -1.782371514496716], [104.887892694113987, -2.340425306816655], [105.622111444116982, -2.42884368246807], [106.10859337771268, -3.06177662517895], [105.857445916774111, -4.305524997579723], [105.817655063909356, -5.852355645372411]]]] } }, + { "type": "Feature", "properties": { "admin": "India", "name": "India", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[77.837450799474553, 35.494009507787759], [78.912268914713209, 34.321936346975782], [78.811086460285722, 33.506198025032404], [79.208891636068572, 32.994394639613709], [79.176128777995501, 32.483779812137705], [78.458446486325997, 32.61816437431272], [78.738894484374001, 31.515906073527056], [79.721366815107089, 30.882714748654724], [81.11125613802929, 30.183480943313398], [80.476721225917373, 29.729865220655334], [80.088424513676259, 28.794470119740136], [81.057202589851997, 28.416095282499036], [81.999987420584958, 27.925479234319987], [83.304248895199535, 27.364505723575554], [84.675017938173767, 27.234901231387528], [85.25177859898335, 26.726198431906337], [86.024392938179147, 26.630984605408567], [87.22747195836628, 26.39789805755607], [88.060237664749806, 26.414615383402484], [88.174804315140904, 26.810405178325944], [88.043132765661198, 27.445818589786818], [88.120440708369841, 27.876541652939586], [88.730325962278528, 28.086864732367509], [88.814248488320544, 27.299315904239361], [88.835642531289366, 27.098966376243755], [89.744527622438838, 26.71940298105995], [90.37327477413406, 26.875724188742872], [91.217512648486405, 26.808648179628019], [92.033483514375078, 26.838310451763554], [92.10371178585973, 27.4526140406332], [91.69665652869665, 27.771741848251661], [92.503118931043616, 27.896876329046442], [93.413347609432662, 28.640629380807219], [94.565990431702929, 29.277438055939978], [95.404802280664612, 29.031716620392125], [96.117678664131006, 29.452802028922459], [96.586590610747479, 28.830979519154337], [96.248833449287758, 28.411030992134435], [97.327113885490007, 28.261582749946331], [97.402561476636123, 27.88253611908544], [97.051988559968066, 27.699058946233144], [97.133999058015277, 27.08377350514996], [96.419365675850941, 27.264589341739221], [95.124767694074933, 26.573572089132295], [95.155153436262566, 26.001307277932078], [94.603249139385355, 25.162495428970399], [94.552657912171611, 24.675238348890328], [94.106741977925054, 23.850740871673477], [93.325187615942767, 24.078556423432197], [93.286326938859247, 23.043658352138998], [93.060294224014598, 22.703110663335565], [93.166127557348361, 22.278459580977099], [92.672720981825549, 22.041238918541247], [92.146034783906799, 23.62749868417259], [91.869927606171302, 23.62434642180278], [91.706475050832083, 22.985263983649183], [91.158963250699713, 23.503526923104381], [91.467729933643668, 24.072639471934789], [91.915092807994398, 24.130413723237108], [92.376201613334786, 24.976692816664961], [91.799595981822065, 25.14743174895731], [90.872210727912105, 25.13260061288954], [89.920692580121838, 25.269749864192171], [89.832480910199592, 25.965082098895476], [89.355094028687276, 26.014407253518065], [88.56304935094974, 26.446525580342716], [88.209789259802477, 25.768065700782707], [88.931553989623069, 25.238692328384769], [88.30637251175601, 24.866079413344199], [88.084422235062405, 24.501657212821918], [88.699940220090895, 24.233714911388557], [88.529769728553759, 23.631141872649163], [88.876311883503064, 22.879146429937826], [89.031961297566198, 22.055708319582973], [88.888765903685396, 21.690588487224741], [88.208497348995209, 21.703171698487804], [86.975704380240259, 21.495561631755201], [87.033168572948853, 20.743307806882406], [86.499351027373777, 20.151638495356604], [85.060265740909671, 19.478578802971096], [83.941005893899998, 18.302009792549722], [83.189217156917834, 17.671221421778977], [82.192792189465905, 17.016636053937813], [82.191241896497175, 16.556664130107844], [81.692719354177456, 16.3102192245079], [80.791999139330116, 15.951972357644488], [80.324895867843864, 15.899184882058346], [80.025069207686428, 15.136414903214144], [80.23327355339039, 13.835770778859978], [80.286293572921849, 13.006260687710832], [79.862546828128487, 12.056215318240886], [79.85799930208681, 10.357275091997108], [79.340511509115984, 10.308854274939618], [78.885345493489169, 9.54613597252772], [79.189719679688281, 9.216543687370146], [78.27794070833049, 8.933046779816932], [77.94116539908434, 8.25295909263974], [77.539897902337927, 7.965534776232331], [76.592978957021657, 8.899276231314188], [76.130061476551063, 10.299630031775518], [75.746467319648488, 11.308250637248303], [75.396101108709573, 11.781245022015822], [74.864815708316812, 12.741935736537895], [74.616717156883524, 13.992582912649677], [74.443859490867197, 14.617221787977693], [73.534199253233368, 15.990652167214957], [73.119909295549419, 17.928570054592495], [72.820909458308634, 19.208233547436162], [72.824475132136783, 20.41950328214153], [72.630533481745388, 21.356009426351001], [71.175273471973938, 20.757441311114228], [70.470458611945091, 20.877330634031381], [69.164130080038817, 22.089298000572697], [69.644927606082391, 22.450774644454334], [69.349596795534325, 22.843179633062686], [68.176645135373377, 23.691965033456704], [68.842599318318761, 24.359133612560932], [71.0432401874682, 24.356523952730193], [70.844699334602822, 25.215102037043511], [70.282873162725579, 25.722228705339823], [70.168926629522005, 26.491871649678835], [69.514392938113119, 26.940965684511365], [70.61649620960192, 27.989196275335861], [71.777665643200308, 27.913180243434521], [72.823751662084689, 28.961591701772047], [73.450638462217412, 29.976413479119863], [74.421380242820263, 30.97981476493117], [74.405928989564998, 31.692639471965272], [75.258641798813187, 32.271105455040491], [74.451559279278698, 32.764899603805489], [74.104293654277328, 33.441473293586846], [73.749948358051952, 34.317698879527846], [74.240202671204955, 34.748887030571247], [75.757060988268321, 34.504922593721311], [76.871721632804011, 34.653544012992732], [77.837450799474553, 35.494009507787759]]] } }, + { "type": "Feature", "properties": { "admin": "Ireland", "name": "Ireland", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[-6.197884894220989, 53.86756500916335], [-6.032985398777609, 53.153164170944336], [-6.788856573910847, 52.260117906292322], [-8.561616583683557, 51.669301255899349], [-9.977085740590267, 51.820454820353071], [-9.16628251793078, 52.864628811242667], [-9.688524542672452, 53.881362616585285], [-8.327987433292007, 54.664518947968624], [-7.572167934591064, 55.131622219454854], [-7.366030646178785, 54.595840969452709], [-7.572167934591064, 54.059956366585986], [-6.953730231138065, 54.073702297575622], [-6.197884894220989, 53.86756500916335]]] } }, + { "type": "Feature", "properties": { "admin": "Iran", "name": "Iran", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[53.921597934795543, 37.198918361961255], [54.800303989486558, 37.392420762678178], [55.511578403551894, 37.964117133123153], [56.180374790273319, 37.935126654607423], [56.619366082592805, 38.121394354803478], [57.330433790928964, 38.029229437810933], [58.436154412678192, 37.522309475243794], [59.234761997316795, 37.412987982730336], [60.377637973883864, 36.52738312432836], [61.123070509694131, 36.491597194966239], [61.21081709172573, 35.650072333309218], [60.80319339380744, 34.404101874319856], [60.528429803311575, 33.676446031217999], [60.963700392505991, 33.528832302376252], [60.536077915290761, 32.981268825811561], [60.863654819588952, 32.182919623334421], [60.941944614511115, 31.548074652628745], [61.699314406180811, 31.379506130492661], [61.78122155136343, 30.735850328081231], [60.874248488208778, 29.829238999952604], [61.369308709564926, 29.303276272085917], [61.771868117118615, 28.699333807890792], [62.727830438085974, 28.259644883735383], [62.755425652929851, 27.378923448184985], [63.23389773952028, 27.217047024030702], [63.316631707619578, 26.756532497661659], [61.874187453056535, 26.239974880472097], [61.497362908784183, 25.078237006118492], [59.616134067630831, 25.380156561783775], [58.525761346272297, 25.609961656185725], [57.39725141788238, 25.739902045183634], [56.97076582217754, 26.966106268821356], [56.492138706290199, 27.14330475515019], [55.723710158110059, 26.964633490501036], [54.715089552637252, 26.480657863871507], [53.493096958231334, 26.812368882753042], [52.483597853409599, 27.580849107365488], [51.520762566947404, 27.865689602158291], [50.852948032439528, 28.814520575469377], [50.115008579311571, 30.14777252859971], [49.576850213423988, 29.9857152369324], [48.941333449098536, 30.31709035900403], [48.567971225789748, 29.926778265903515], [48.014568312376085, 30.452456773392594], [48.00469811380831, 30.985137437457237], [47.685286085812258, 30.984853217079621], [47.849203729042095, 31.709175930298663], [47.334661492711895, 32.469155381799105], [46.109361606639304, 33.017287299118998], [45.416690708199035, 33.967797756479577], [45.648459507028079, 34.748137722303007], [46.15178795755093, 35.093258775364284], [46.076340366404786, 35.67738332777548], [45.420618117053202, 35.977545884742817], [44.77267, 37.17045], [44.225755649600522, 37.971584377589345], [44.421402622257538, 38.281281236314534], [44.109225294782334, 39.428136298168091], [44.793989699081934, 39.713002631177041], [44.9526880226503, 39.335764675446363], [45.457721795438765, 38.874139105783051], [46.143623081248812, 38.74120148371221], [46.505719842317966, 38.770605373686287], [47.685079380083081, 39.508363959301207], [48.060095249225235, 39.582235419262453], [48.355529412637871, 39.2887649602769], [48.010744256386474, 38.794014797514514], [48.634375441284803, 38.27037750910096], [48.883249139202483, 38.32024526626261], [49.199612257693332, 37.582874253889877], [50.147771437384606, 37.37456655532133], [50.842354363819695, 36.872814235983384], [52.26402469260141, 36.700421657857696], [53.825789829326411, 36.965030829408228], [53.921597934795543, 37.198918361961255]]] } }, + { "type": "Feature", "properties": { "admin": "Iraq", "name": "Iraq", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[45.420618117053202, 35.977545884742817], [46.076340366404786, 35.67738332777548], [46.15178795755093, 35.093258775364284], [45.648459507028079, 34.748137722303007], [45.416690708199035, 33.967797756479577], [46.109361606639304, 33.017287299118998], [47.334661492711895, 32.469155381799105], [47.849203729042095, 31.709175930298663], [47.685286085812258, 30.984853217079621], [48.00469811380831, 30.985137437457237], [48.014568312376085, 30.452456773392594], [48.567971225789748, 29.926778265903515], [47.974519077349889, 29.975819200148493], [47.302622104690947, 30.059069932570711], [46.568713413281742, 29.099025173452283], [44.709498732284736, 29.178891099559376], [41.889980910007829, 31.190008653278362], [40.399994337736238, 31.889991766887931], [39.195468377444961, 32.16100881604266], [38.792340529136077, 33.378686428352218], [41.00615888851992, 34.419372260062111], [41.383965285005807, 35.628316555314349], [41.289707472505448, 36.358814602192261], [41.837064243340954, 36.605853786763568], [42.349591098811764, 37.22987254490409], [42.779125604021822, 37.385263576805741], [43.942258742047287, 37.256227525372942], [44.293451775902852, 37.001514390606289], [44.772699008977689, 37.170444647768427], [45.420618117053202, 35.977545884742817]]] } }, + { "type": "Feature", "properties": { "admin": "Iceland", "name": "Iceland", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[-14.508695441129232, 66.455892239031414], [-14.739637417041605, 65.808748277440287], [-13.609732224979807, 65.126671047619851], [-14.9098337467949, 64.36408193628867], [-17.794438035543418, 63.67874909123384], [-18.656245896874989, 63.496382961675806], [-19.972754685942757, 63.643634955491514], [-22.762971971110154, 63.960178941495371], [-21.778484259517676, 64.402115790455497], [-23.955043911219104, 64.891129869233481], [-22.184402635170354, 65.084968166760291], [-22.227423265053329, 65.378593655042721], [-24.326184047939332, 65.611189276788451], [-23.650514695723082, 66.262519029395207], [-22.134922451250883, 66.410468655046856], [-20.576283738679543, 65.732112128351417], [-19.056841600001587, 66.276600857194751], [-17.798623826559048, 65.993853257909763], [-16.167818976292121, 66.526792304135853], [-14.508695441129232, 66.455892239031414]]] } }, + { "type": "Feature", "properties": { "admin": "Israel", "name": "Israel", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[35.719918247222743, 32.709192409794859], [35.545665317534535, 32.393992011030569], [35.183930291491428, 32.532510687788935], [34.974640740709319, 31.866582343059715], [35.225891554512422, 31.754341132121759], [34.970506626125989, 31.616778469360803], [34.927408481594554, 31.35343537040141], [35.397560662586038, 31.489086005167572], [35.420918409981958, 31.100065822874349], [34.922602573391423, 29.501326198844517], [34.26543338393568, 31.219360866820146], [34.556371697738903, 31.548823960896989], [34.48810713068135, 31.605538845337314], [34.752587111151165, 32.07292633720116], [34.955417107896771, 32.827376410446369], [35.098457472480668, 33.080539252244257], [35.126052687324538, 33.090900376918775], [35.460709262846699, 33.089040025356276], [35.552796665190805, 33.264274807258012], [35.821100701650231, 33.277426459276292], [35.836396925608618, 32.868123277308506], [35.700797967274745, 32.716013698857374], [35.719918247222743, 32.709192409794859]]] } }, + { "type": "Feature", "properties": { "admin": "Italy", "name": "Italy", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[15.52037601081383, 38.231155096991465], [15.160242954171732, 37.444045518537813], [15.309897902089002, 37.134219468731793], [15.099988234119445, 36.61998729099539], [14.335228712632013, 36.996630967754747], [13.826732618879927, 37.104531358380186], [12.431003859108809, 37.612949937483812], [12.570943637755132, 38.126381130519682], [13.741156447004581, 38.03496552179535], [14.761249220446157, 38.143873602850498], [15.52037601081383, 38.231155096991465]]], [[[9.210011834356264, 41.209991360024212], [9.809975213264973, 40.500008856766094], [9.669518670295671, 39.177376410471787], [9.214817742559486, 39.240473334300127], [8.806935662479729, 38.906617743478471], [8.428302443077113, 39.171847032216611], [8.388253208050939, 40.378310858718798], [8.159998406617659, 40.950007229163774], [8.709990675500107, 40.899984442705225], [9.210011834356264, 41.209991360024212]]], [[[12.376485223040842, 46.767559109069872], [13.806475457421552, 46.50930613869118], [13.698109978905475, 46.016778062517368], [13.937630242578335, 45.59101593686465], [13.141606479554294, 45.736691799495411], [12.328581170306304, 45.38177806251484], [12.383874952858601, 44.885374253919075], [12.261453484759157, 44.600482082694008], [12.589237094786482, 44.091365871754462], [13.526905958722491, 43.587727362637899], [14.029820997787024, 42.761007798832473], [15.142569614327952, 41.955139675456891], [15.926191033601892, 41.961315009115729], [16.169897088290409, 41.740294908203417], [15.889345737377793, 41.541082261718195], [16.785001661860573, 41.179605617836579], [17.519168735431204, 40.877143459632229], [18.376687452882575, 40.355624904942651], [18.4802470231954, 40.168866278639818], [18.293385044028096, 39.810774441073235], [17.738380161213279, 40.277671006830289], [16.869595981522334, 40.442234605463838], [16.448743116937319, 39.795400702466473], [17.171489698971495, 39.424699815420716], [17.052840610429339, 38.902871202137291], [16.635088331781841, 38.843572496082395], [16.100960727613053, 37.985898749334176], [15.684086948314498, 37.908849188787023], [15.687962680736318, 38.214592800441849], [15.891981235424705, 38.750942491199218], [16.109332309644312, 38.964547024077682], [15.718813510814638, 39.544072374014938], [15.413612501698818, 40.048356838535163], [14.998495721098234, 40.172948716790913], [14.703268263414767, 40.604550279292617], [14.06067182786526, 40.786347968095434], [13.627985060285393, 41.188287258461649], [12.888081902730418, 41.253089504555604], [12.106682570044907, 41.7045348170574], [11.191906365614184, 42.355425319989671], [10.511947869517794, 42.93146251074721], [10.200028924204046, 43.920006822274608], [9.702488234097812, 44.036278794931313], [8.888946160526869, 44.366336167979533], [8.428560825238575, 44.23122813575241], [7.8507666357832, 43.767147935555236], [7.435184767291841, 43.693844916349164], [7.549596388386161, 44.127901109384808], [7.007562290076661, 44.254766750661382], [6.749955275101711, 45.028517971367584], [7.096652459347835, 45.333098863295859], [6.80235517744566, 45.708579820328673], [6.84359297041456, 45.991146552100659], [7.273850945676683, 45.776947740250748], [7.755992058959832, 45.824490057959267], [8.316629672894377, 46.16364248309084], [8.489952426801294, 46.005150865251736], [8.966305779667833, 46.03693187111115], [9.18288170740311, 46.440214748716976], [9.92283654139035, 46.314899400409182], [10.363378126678665, 46.48357127540983], [10.4427014502466, 46.893546250997431], [11.048555942436504, 46.751358547546396], [11.164827915093325, 46.941579494812729], [12.153088006243079, 47.115393174826423], [12.376485223040842, 46.767559109069872]]]] } }, + { "type": "Feature", "properties": { "admin": "Jamaica", "name": "Jamaica", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-77.569600796199197, 18.490525417550483], [-76.896618618462114, 18.400866807524078], [-76.365359056285527, 18.16070058844759], [-76.19965857614163, 17.886867173732963], [-76.902561408175671, 17.868237819891743], [-77.206341315403449, 17.701116237859818], [-77.766022915340599, 17.861597398342237], [-78.337719285785596, 18.225967922432226], [-78.217726610003865, 18.454532782459193], [-77.797364671525614, 18.524218451404774], [-77.569600796199197, 18.490525417550483]]] } }, + { "type": "Feature", "properties": { "admin": "Jordan", "name": "Jordan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[35.545665317534535, 32.393992011030569], [35.719918247222743, 32.709192409794859], [36.834062127435537, 32.312937526980768], [38.792340529136077, 33.378686428352218], [39.195468377444961, 32.16100881604266], [39.004885695152545, 32.010216986614971], [37.002165561681004, 31.508412990844736], [37.998848911294367, 30.508499864213128], [37.668119744626374, 30.338665269485894], [37.503581984209028, 30.003776150018396], [36.740527784987243, 29.865283311476183], [36.501214227043583, 29.505253607698702], [36.068940870922049, 29.19749461518445], [34.956037225084252, 29.356554673778835], [34.922602573391423, 29.501326198844517], [35.420918409981958, 31.100065822874349], [35.397560662586038, 31.489086005167572], [35.545251906076196, 31.782504787720832], [35.545665317534535, 32.393992011030569]]] } }, + { "type": "Feature", "properties": { "admin": "Japan", "name": "Japan", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[134.638428176003856, 34.149233710256418], [134.766379022358478, 33.806334743783673], [134.20341596897083, 33.201177883429622], [133.792950067276479, 33.521985175097583], [133.280268182508848, 33.289570420864941], [133.014858026257855, 32.704567369104772], [132.363114862192674, 32.989382025681373], [132.371176385630179, 33.463642483040068], [132.924372593314786, 34.060298570282036], [133.492968377822194, 33.944620876596694], [133.904106073136347, 34.364931138642611], [134.638428176003856, 34.149233710256418]]], [[[140.976387567305267, 37.142074286440156], [140.599769728762084, 36.343983466124534], [140.774074334882641, 35.842877102190229], [140.253279250245072, 35.138113918593653], [138.975527785396196, 34.667600002576101], [137.217598911691198, 34.606285915661843], [135.792983026268871, 33.46480520276662], [135.120982700745401, 33.849071153289053], [135.07943484918269, 34.596544908174813], [133.340316196831964, 34.375938218720755], [132.156770868051296, 33.904933376596503], [130.986144647343451, 33.885761420216276], [132.000036248910021, 33.149992377244608], [131.33279015515734, 31.450354519164836], [130.68631798718593, 31.029579169228235], [130.202419875204953, 31.418237616495411], [130.447676222862128, 32.319474595665717], [129.81469160371887, 32.610309556604385], [129.408463169472554, 33.296055813117583], [130.353935174684636, 33.604150702441693], [130.878450962447118, 34.232742824840031], [131.884229364143891, 34.749713853487911], [132.617672967662486, 35.433393052709413], [134.608300815977771, 35.731617743465812], [135.677537876528902, 35.527134100886819], [136.723830601142424, 37.304984239240376], [137.390611607004473, 36.827390651998819], [138.857602166906247, 37.827484646143454], [139.426404657142882, 38.215962225897634], [140.054790073812057, 39.438807481436378], [139.883379347899847, 40.563312486323682], [140.305782505453664, 41.195005194659551], [141.368973423426667, 41.378559882160282], [141.914263136970476, 39.991616115878678], [141.884600864834965, 39.18086456965149], [140.959489373945729, 38.174000962876583], [140.976387567305267, 37.142074286440156]]], [[[143.910161981379474, 44.174099839853724], [144.613426548439634, 43.960882880217511], [145.320825230083074, 44.384732977875437], [145.543137241802754, 43.262088324550596], [144.059661899999867, 42.988358262700551], [143.183849725517291, 41.995214748699183], [141.611490920172457, 42.678790595056071], [141.067286411706618, 41.58459381770799], [139.95510623592105, 41.56955597591103], [139.817543573159924, 42.563758856774392], [140.312087030193169, 43.333272610032644], [141.380548944259999, 43.388824774746489], [141.671952345953912, 44.772125352551477], [141.967644891527982, 45.551483466161343], [143.142870314709796, 44.510358384776957], [143.910161981379474, 44.174099839853724]]]] } }, + { "type": "Feature", "properties": { "admin": "Kazakhstan", "name": "Kazakhstan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[70.962314894499272, 42.26615428320553], [70.388964878220776, 42.081307684897517], [69.070027296835221, 41.384244289712335], [68.632482944620037, 40.668680731766855], [68.259895867795635, 40.662324530594894], [67.985855747351806, 41.135990708982199], [66.714047072216587, 41.168443508461557], [66.510648634715707, 41.987644151368549], [66.023391554635609, 41.994646307944031], [66.098012322865188, 42.997660020513074], [64.90082441595932, 43.728080552742647], [63.18578698105658, 43.650074978197999], [62.013300408786264, 43.504476630215649], [61.05831994003249, 44.405816962250576], [60.239971958258472, 44.784036770194739], [58.689989048095796, 45.500013739598721], [58.503127068928428, 45.58680430763296], [55.928917270741167, 44.995858466159163], [55.968191359283011, 41.30864166926937], [55.455251092353805, 41.259859117185826], [54.755345493392653, 42.04397146256661], [54.079417759014959, 42.324109402020831], [52.944293247291725, 42.116034247397572], [52.502459751196277, 41.783315538086462], [52.446339145727208, 42.027150783855561], [52.692112257707251, 42.443895372073364], [52.501426222550315, 42.792297878585188], [51.342427199108201, 43.132974758469338], [50.891291945200223, 44.031033637053774], [50.339129266161358, 44.284015611338468], [50.305642938036257, 44.609835516938908], [51.278503452363211, 44.514854234386448], [51.316899041556034, 45.245998236667894], [52.167389764215713, 45.408391425145098], [53.040876499245194, 45.259046535821753], [53.220865512917712, 46.23464590105992], [53.042736850807771, 46.853006089864486], [52.042022739475598, 46.804636949239232], [51.191945428274252, 47.048704738953909], [50.034083286342465, 46.608989976582208], [49.10116, 46.39933000000012], [48.593241001180495, 46.561034247415471], [48.694733514201729, 47.075628160177921], [48.057253045449258, 47.743752753279516], [47.315231154170242, 47.715847479841948], [46.466445753776256, 48.394152330104923], [47.043671502476506, 49.1520388860976], [46.751596307162728, 49.35600576435376], [47.549480421749301, 50.454698391311119], [48.577841424357523, 49.874759629915658], [48.702381626181008, 50.605128485712825], [50.766648390512145, 51.692762356159889], [52.328723585830957, 51.71865224873811], [54.53287845237621, 51.026239732459302], [55.716940545479801, 50.62171662047853], [56.777961053296551, 51.043551337277037], [58.363290643146733, 51.063653469438563], [59.642282342370599, 50.545442206415707], [59.932807244715484, 50.842194118851857], [61.337424350840919, 50.799070136104248], [61.588003371024158, 51.2726587998432], [59.967533807215531, 51.960420437215696], [60.927268507740258, 52.447548326215028], [60.739993117114572, 52.719986477257734], [61.699986199800584, 52.979996446334255], [60.978066440683151, 53.664993394579128], [61.436591424409052, 54.006264553434775], [65.178533563095911, 54.354227810272093], [65.66687584825398, 54.601266994843449], [68.169100376258811, 54.970391750704309], [69.068166945272864, 55.385250149143516], [70.865266554655122, 55.169733588270091], [71.180131056609397, 54.133285224008247], [72.224150018202167, 54.376655381886728], [73.508516066384388, 54.035616766976588], [73.425678745420427, 53.489810289109741], [74.384845005190044, 53.546861070360066], [76.891100294913414, 54.490524400441913], [76.525179477854735, 54.177003485727127], [77.800915561844221, 53.404414984747561], [80.035559523441663, 50.864750881547238], [80.568446893235475, 51.388336493528456], [81.945985548839914, 50.812195949906354], [83.383003778012366, 51.069182847693909], [83.935114780618832, 50.889245510453563], [84.416377394553052, 50.311399644565817], [85.115559523462011, 50.117302964877631], [85.541269972682457, 49.69285858824815], [86.829356723989619, 49.826674709668154], [87.359970330762664, 49.214980780629148], [86.598776483103379, 48.549181626980605], [85.768232863308285, 48.455750637396974], [85.72048383987071, 47.452969468773112], [85.164290399113355, 47.000955715516099], [83.180483839860443, 47.330031236350848], [82.458925815769106, 45.539649563166499], [81.947070753918112, 45.317027492853235], [79.966106398441397, 44.917516994804643], [80.866206496101356, 43.180362046881037], [80.180150180994289, 42.920067857426936], [80.259990268885332, 42.349999294599101], [79.643645460940135, 42.496682847659649], [79.142177361979776, 42.856092434249589], [77.658391961583206, 42.960685533208327], [76.000353631498555, 42.988022365890622], [75.636964959622091, 42.877899888676765], [74.212865838522575, 43.298339341803505], [73.645303582660901, 43.091271877609863], [73.489757521462337, 42.500894476891276], [71.844638299450637, 42.845395412765178], [71.186280552052253, 42.704292914392219], [70.962314894499272, 42.26615428320553]]] } }, + { "type": "Feature", "properties": { "admin": "Kenya", "name": "Kenya", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[40.993, -0.85829], [41.58513, -1.68325], [40.88477, -2.08255], [40.63785, -2.49979], [40.26304, -2.57309], [40.12119, -3.27768], [39.80006, -3.68116], [39.60489, -4.34653], [39.20222, -4.67677], [37.7669, -3.67712], [37.69869, -3.09699], [34.07262, -1.05982], [33.903711197104521, -0.95], [33.893568969666937, 0.109813537861896], [34.18, 0.515], [34.6721, 1.17694], [35.03599, 1.90584], [34.59607, 3.05374], [34.47913, 3.5556], [34.005, 4.249884947362047], [34.620196267853871, 4.847122742081987], [35.298007118232974, 5.506], [35.817447662353501, 5.338232082790795], [35.817447662353501, 4.776965663461889], [36.159078632855639, 4.447864127672768], [36.855093238008116, 4.447864127672768], [38.120915, 3.598605], [38.43697, 3.58851], [38.67114, 3.61607], [38.89251, 3.50074], [39.559384258765846, 3.42206], [39.85494, 3.83879], [40.76848, 4.25702], [41.1718, 3.91909], [41.855083092643966, 3.918911920483726], [40.98105, 2.78452], [40.993, -0.85829]]] } }, + { "type": "Feature", "properties": { "admin": "Kyrgyzstan", "name": "Kyrgyzstan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[70.96231489449913, 42.266154283205481], [71.186280552052111, 42.704292914392127], [71.84463829945058, 42.845395412765093], [73.489757521462337, 42.500894476891311], [73.645303582660901, 43.09127187760982], [74.212865838522546, 43.298339341803363], [75.636964959622006, 42.877899888676673], [76.000353631498442, 42.988022365890664], [77.658391961583206, 42.960685533208256], [79.142177361979762, 42.856092434249511], [79.643645460940107, 42.496682847659514], [80.259990268885289, 42.349999294599044], [80.119430373051358, 42.123940741538235], [78.543660923175295, 41.582242540038685], [78.187196893225959, 41.185315863604792], [76.904484490877067, 41.066485907549634], [76.526368035797432, 40.427946071935111], [75.467827996730691, 40.562072251948663], [74.776862420556043, 40.366425279291619], [73.822243686828287, 39.893973497063179], [73.960013055318413, 39.660008449861721], [73.67537926625478, 39.431236884105594], [71.784693637991992, 39.279463202464363], [70.549161818325601, 39.604197902986492], [69.464886915977516, 39.526683254548693], [69.559609816368507, 40.103211371412968], [70.648018833299957, 39.935753892571157], [71.014198032520156, 40.244365546218226], [71.774875115856545, 40.145844428053763], [73.055417108049156, 40.86603302668945], [71.870114780570447, 41.392900092121259], [71.157858514291576, 41.143587144529107], [70.420022414028196, 41.519998277343134], [71.259247674448218, 42.167710679689456], [70.96231489449913, 42.266154283205481]]] } }, + { "type": "Feature", "properties": { "admin": "Cambodia", "name": "Cambodia", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[103.497279901139677, 10.632555446815926], [103.090689731867229, 11.153660590047162], [102.58493248902667, 12.186594956913279], [102.348099399833004, 13.39424734135822], [102.988422072361601, 14.225721136934464], [104.281418084736586, 14.416743068901363], [105.218776890078871, 14.27321177821069], [106.04394616091551, 13.881091009979952], [106.496373325630856, 14.57058380783428], [107.382727492301058, 14.202440904186968], [107.614547967562402, 13.535530707244202], [107.491403029410861, 12.337205918827944], [105.810523716253101, 11.567614650921225], [106.249670037869436, 10.961811835163585], [105.199914992292321, 10.889309800658094], [104.334334751403446, 10.486543687375228], [103.497279901139677, 10.632555446815926]]] } }, + { "type": "Feature", "properties": { "admin": "South Korea", "name": "Korea", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[128.349716424676586, 38.612242946927843], [129.212919549680038, 37.432392483055942], [129.460449660358137, 36.784189154602821], [129.468304478066472, 35.632140611303939], [129.091376580929563, 35.08248423923142], [128.18585045787907, 34.890377102186385], [127.386519403188373, 34.475673733044111], [126.485747511908713, 34.390045884736473], [126.3739197124291, 34.934560451795939], [126.559231398627773, 35.684540513647896], [126.117397902532261, 36.725484727519252], [126.860143263863364, 36.893924058574612], [126.174758742376213, 37.749685777328033], [126.237338901881742, 37.840377916000271], [126.683719924018888, 37.804772854151174], [127.073308547067342, 38.256114813788393], [127.780035435090966, 38.304535630845884], [128.205745884311426, 38.370397243801882], [128.349716424676586, 38.612242946927843]]] } }, + { "type": "Feature", "properties": { "admin": "Kosovo", "name": "Kosovo", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[20.76216, 42.05186], [20.717310000000108, 41.84711], [20.59023, 41.85541], [20.52295, 42.21787], [20.28374, 42.32025], [20.0707, 42.58863], [20.25758, 42.81275], [20.49679, 42.88469], [20.63508, 43.21671], [20.81448, 43.27205], [20.95651, 43.13094], [21.143395, 43.068685000000123], [21.27421, 42.90959], [21.43866, 42.86255], [21.63302, 42.67717], [21.77505, 42.6827], [21.66292, 42.43922], [21.54332, 42.32025], [21.576635989402117, 42.245224397061847], [21.352700000000134, 42.2068], [20.76216, 42.05186]]] } }, + { "type": "Feature", "properties": { "admin": "Kuwait", "name": "Kuwait", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[47.974519077349889, 29.975819200148493], [48.183188510944483, 29.534476630159759], [48.09394331237641, 29.306299343374999], [48.416094191283939, 28.552004299426663], [47.708850538937376, 28.526062730416136], [47.459821811722819, 29.002519436147217], [46.568713413281742, 29.099025173452283], [47.302622104690947, 30.059069932570711], [47.974519077349889, 29.975819200148493]]] } }, + { "type": "Feature", "properties": { "admin": "Laos", "name": "Lao PDR", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[105.218776890078871, 14.27321177821069], [105.544338413517664, 14.723933620660414], [105.589038527450128, 15.570316066952856], [104.779320509868768, 16.441864935771445], [104.716947056092465, 17.428858954330078], [103.956476678485288, 18.240954087796872], [103.200192091893726, 18.309632066312769], [102.998705682387694, 17.961694647691598], [102.413004998791592, 17.932781683824281], [102.113591750092453, 18.109101670804161], [101.059547560635139, 17.512497259994486], [101.035931431077742, 18.408928330961611], [101.282014601651667, 19.462584947176762], [100.606293573003128, 19.508344427971217], [100.548881056726856, 20.109237982661124], [100.115987583417819, 20.41784963630818], [100.329101190189519, 20.786121731036229], [101.180005324307515, 21.436572984294024], [101.270025669359939, 21.201651923095177], [101.803119744882906, 21.174366766845065], [101.652017856861491, 22.318198757409544], [102.170435825613552, 22.464753119389297], [102.754896274834636, 21.675137233969462], [103.203861118586431, 20.766562201413745], [104.435000441508024, 20.758733221921528], [104.822573683697073, 19.886641750563879], [104.183387892678908, 19.624668077060214], [103.896532017026701, 19.265180975821799], [105.094598423281496, 18.666974595611073], [105.925762160264, 17.485315456608955], [106.55600792849566, 16.604283962464802], [107.312705926545576, 15.908538316303177], [107.564525181103875, 15.202173163305554], [107.382727492301058, 14.202440904186968], [106.496373325630856, 14.57058380783428], [106.04394616091551, 13.881091009979952], [105.218776890078871, 14.27321177821069]]] } }, + { "type": "Feature", "properties": { "admin": "Lebanon", "name": "Lebanon", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[35.821100701650231, 33.277426459276292], [35.552796665190805, 33.264274807258012], [35.460709262846699, 33.089040025356276], [35.126052687324538, 33.090900376918775], [35.48220665868012, 33.905450140919434], [35.979592319489392, 34.610058295219126], [35.998402540843628, 34.644914048799997], [36.448194207512095, 34.59393524834406], [36.611750115715886, 34.201788641897174], [36.066460402172048, 33.824912421192543], [35.821100701650231, 33.277426459276292]]] } }, + { "type": "Feature", "properties": { "admin": "Liberia", "name": "Liberia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-7.712159389669749, 4.364565944837721], [-7.974107224957249, 4.355755113131961], [-9.004793667018673, 4.832418524592199], [-9.913420376006682, 5.593560695819205], [-10.765383876986643, 6.140710760925556], [-11.438779466182053, 6.785916856305746], [-11.199801805048278, 7.105845648624735], [-11.14670427086838, 7.396706447779534], [-10.695594855176477, 7.939464016141085], [-10.230093553091276, 8.406205552601291], [-10.016566534861253, 8.42850393313523], [-9.755342169625832, 8.541055202666923], [-9.33727983238458, 7.928534450711351], [-9.403348151069748, 7.526905218938906], [-9.208786383490844, 7.313920803247952], [-8.926064622422002, 7.309037380396375], [-8.722123582382123, 7.711674302598509], [-8.439298468448696, 7.686042792181736], [-8.485445522485348, 7.395207831243068], [-8.385451626000572, 6.911800645368742], [-8.602880214868618, 6.467564195171659], [-8.311347622094017, 6.193033148621081], [-7.993692592795879, 6.126189683451541], [-7.570152553731686, 5.707352199725903], [-7.53971513511176, 5.313345241716517], [-7.63536821128403, 5.188159084489455], [-7.712159389669749, 4.364565944837721]]] } }, + { "type": "Feature", "properties": { "admin": "Libya", "name": "Libya", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[14.8513, 22.862950000000119], [14.143870883855239, 22.491288967371126], [13.581424594790459, 23.040506089769274], [11.999505649471697, 23.471668402596432], [11.560669386449032, 24.09790924732561], [10.771363559622952, 24.562532050061741], [10.303846876678445, 24.379313259370967], [9.948261346078024, 24.936953640232613], [9.910692579801774, 25.365454616796789], [9.319410841518218, 26.094324856057476], [9.716285841519662, 26.512206325785652], [9.629056023811073, 27.140953477481041], [9.756128370816779, 27.688258571884198], [9.68388471847288, 28.144173895779311], [9.859997999723472, 28.959989732371064], [9.805634392952353, 29.424638373323369], [9.482139926805415, 30.307556057246181], [9.970017124072966, 30.539324856075375], [10.056575148161697, 30.961831366493517], [9.950225050505194, 31.376069647745275], [10.636901482799484, 31.761420803345679], [10.944789666394511, 32.081814683555358], [11.43225345220378, 32.368903103152824], [11.488787469131008, 33.136995754523234], [12.66331, 32.79278], [13.08326, 32.87882], [13.91868, 32.71196], [15.24563, 32.26508], [15.71394, 31.37626], [16.61162, 31.18218], [18.02109, 30.76357], [19.08641, 30.26639], [19.57404, 30.52582], [20.05335, 30.98576], [19.82033, 31.751790000000135], [20.13397, 32.2382], [20.85452, 32.7068], [21.54298, 32.8432], [22.89576, 32.63858], [23.2368, 32.19149], [23.6091300000001, 32.18726], [23.9275, 32.01667], [24.92114, 31.89936], [25.16482, 31.56915], [24.80287, 31.08929], [24.95762, 30.6616], [24.70007, 30.04419], [25.00000000000011, 29.238654529533552], [25.00000000000011, 25.682499996360995], [25.00000000000011, 22.0], [25.00000000000011, 20.00304], [23.850000000000129, 20.0], [23.837660000000135, 19.580470000000101], [19.84926, 21.49509], [15.86085, 23.40972], [14.8513, 22.862950000000119]]] } }, + { "type": "Feature", "properties": { "admin": "Sri Lanka", "name": "Sri Lanka", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[81.787959018891371, 7.523055324733162], [81.637322218760573, 6.481775214051921], [81.218019647144317, 6.197141424988287], [80.348356968104397, 5.968369859232154], [79.872468703128519, 6.763463446474928], [79.6951668639351, 8.200843410673384], [80.147800734379629, 9.824077663609554], [80.838817986986541, 9.268426825391186], [81.304319289071756, 8.564206244333688], [81.787959018891371, 7.523055324733162]]] } }, + { "type": "Feature", "properties": { "admin": "Lesotho", "name": "Lesotho", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[28.978262566857236, -28.955596612261708], [29.325166456832587, -29.257386976846245], [29.018415154748016, -29.743765557577362], [28.848399692507734, -30.070050551068245], [28.291069370239903, -30.226216729454293], [28.107204624145421, -30.545732110314944], [27.749397006956478, -30.645105889612214], [26.999261915807629, -29.875953871379977], [27.532511020627471, -29.242710870075353], [28.07433841320778, -28.851468601193581], [28.541700066855491, -28.647501722937562], [28.978262566857236, -28.955596612261708]]] } }, + { "type": "Feature", "properties": { "admin": "Lithuania", "name": "Lithuania", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[22.731098667092649, 54.327536932993311], [22.651051873472536, 54.582740993866729], [22.757763706155256, 54.856574408581366], [22.31572350433057, 55.01529857036585], [21.26844892750346, 55.190481675835301], [21.05580040862241, 56.031076361711051], [22.201156853939491, 56.337801825579483], [23.878263787539957, 56.273671373105259], [24.860684441840753, 56.372528388079616], [25.000934279080887, 56.164530748104831], [25.533046502390327, 56.100296942766029], [26.494331495883749, 55.61510691997762], [26.588279249790386, 55.167175604871659], [25.768432651479792, 54.846962592175082], [25.536353794056989, 54.282423407602515], [24.45068362803703, 53.905702216194747], [23.484127638449841, 53.912497667041123], [23.243987257589506, 54.220566718149129], [22.731098667092649, 54.327536932993311]]] } }, + { "type": "Feature", "properties": { "admin": "Luxembourg", "name": "Luxembourg", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[6.043073357781109, 50.128051662794221], [6.242751092156992, 49.90222565367872], [6.186320428094176, 49.4638028021145], [5.897759230176403, 49.442667141307012], [5.674051954784828, 49.52948354755749], [5.782417433300905, 50.090327867221205], [6.043073357781109, 50.128051662794221]]] } }, + { "type": "Feature", "properties": { "admin": "Latvia", "name": "Latvia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[21.05580040862241, 56.031076361711051], [21.090423618257965, 56.783872789122924], [21.581866489353668, 57.411870632549913], [22.524341261492872, 57.753374335350756], [23.31845299652209, 57.006236477274854], [24.120729607853423, 57.025692654032753], [24.312862583114615, 57.793423570376966], [25.164593540149262, 57.970156968815175], [25.602809685984365, 57.847528794986559], [26.46353234223778, 57.476388658266316], [27.288184848751509, 57.474528306703817], [27.770015903440925, 57.244258124411218], [27.855282016722519, 56.759326483784278], [28.17670942557799, 56.169129950578807], [27.102459751094525, 55.783313707087672], [26.494331495883749, 55.61510691997762], [25.533046502390327, 56.100296942766029], [25.000934279080887, 56.164530748104831], [24.860684441840753, 56.372528388079616], [23.878263787539957, 56.273671373105259], [22.201156853939491, 56.337801825579483], [21.05580040862241, 56.031076361711051]]] } }, + { "type": "Feature", "properties": { "admin": "Morocco", "name": "Morocco", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-5.193863491222031, 35.755182196590845], [-4.591006232105143, 35.330711981745644], [-3.640056525070007, 35.39985504815197], [-2.604305792644111, 35.17909332940112], [-2.169913702798624, 35.168396307916694], [-1.792985805661658, 34.527918606091298], [-1.73345455566141, 33.919712836232115], [-1.388049282222596, 32.864015000941372], [-1.124551153966195, 32.651521511357195], [-1.30789913573787, 32.262888902306024], [-2.616604783529567, 32.094346218386157], [-3.068980271812648, 31.724497992473285], [-3.647497931320145, 31.637294012980814], [-3.690441046554666, 30.896951605751152], [-4.859646165374442, 30.501187649043874], [-5.242129278982786, 30.00044302013557], [-6.060632290053745, 29.731699734001801], [-7.059227667661899, 29.57922842052465], [-8.67411617678283, 28.841288967396643], [-8.665589565454836, 27.656425889592462], [-8.817809007940523, 27.656425889592462], [-8.817828334986642, 27.656425889592462], [-8.794883999049032, 27.120696316022553], [-9.413037482124507, 27.088476060488539], [-9.735343390328749, 26.860944729107409], [-10.189424200877452, 26.860944729107409], [-10.551262579785258, 26.990807603456879], [-11.392554897496948, 26.883423977154386], [-11.718219773800339, 26.104091701760801], [-12.030758836301654, 26.030866197203121], [-12.500962693725368, 24.770116278578136], [-13.891110398809044, 23.691009019459383], [-14.22116777185715, 22.310163072188338], [-14.630832688850942, 21.860939846274867], [-14.750954555713404, 21.500600083903802], [-17.002961798561071, 21.42073415779668], [-17.020428432675768, 21.422310288981631], [-16.973247849993182, 21.88574453377495], [-16.589136928767626, 22.158234361250091], [-16.26192175949566, 22.679339504481273], [-16.326413946995896, 23.017768459560894], [-15.982610642958059, 23.723358466074096], [-15.426003790742183, 24.359133612561035], [-15.089331834360729, 24.520260728446964], [-14.824645148161689, 25.103532619725307], [-14.800925665739666, 25.636264960222285], [-14.439939947964827, 26.254418443297645], [-13.773804897506462, 26.618892320252279], [-13.13994177901429, 27.640147813420491], [-13.121613369914709, 27.654147671719805], [-12.61883663578311, 28.038185533148656], [-11.688919236690761, 28.148643907172577], [-10.9009569971044, 28.832142238880913], [-10.39959225100864, 29.09858592377778], [-9.564811163765624, 29.933573716749855], [-9.814718390329174, 31.177735500609053], [-9.434793260119362, 32.038096421836478], [-9.300692918321827, 32.564679266890629], [-8.657476365585039, 33.24024526624239], [-7.654178432638217, 33.697064927702506], [-6.912544114601358, 34.11047638603744], [-6.24434200685141, 35.145865383437517], [-5.929994269219832, 35.759988104793983], [-5.193863491222031, 35.755182196590845]]] } }, + { "type": "Feature", "properties": { "admin": "Moldova", "name": "Moldova", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[26.619336785597788, 48.220726223333457], [26.857823520624798, 48.368210761094488], [27.52253746919515, 48.467119452501102], [28.259546746541837, 48.155562242213406], [28.670891147585163, 48.118148505234089], [29.122698195113024, 47.849095160506458], [29.050867954227321, 47.510226955752493], [29.415135125452732, 47.346645209332571], [29.559674106573105, 46.928582872091312], [29.908851759569295, 46.67436066343145], [29.838210076626289, 46.525325832701675], [30.024658644335364, 46.423936672545032], [29.759971958136383, 46.349987697935354], [29.170653924279879, 46.379262396828693], [29.072106967899288, 46.517677720722482], [28.862972446414055, 46.437889309263824], [28.933717482221621, 46.258830471372491], [28.659987420371575, 45.939986884131628], [28.48526940279276, 45.596907050145887], [28.233553501099035, 45.488283189468369], [28.054442986775392, 45.944586086605618], [28.160017937947707, 46.371562608417207], [28.128030226359037, 46.81047638608824], [27.551166212684841, 47.405117092470817], [27.233872918412736, 47.826770941756365], [26.924176059687561, 48.123264472030982], [26.619336785597788, 48.220726223333457]]] } }, + { "type": "Feature", "properties": { "admin": "Madagascar", "name": "Madagascar", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[49.543518914595737, -12.469832858940553], [49.80898074727908, -12.895284925999551], [50.05651085795715, -13.555761407121981], [50.217431268114055, -14.758788750876795], [50.476536899625515, -15.226512139550541], [50.377111443895942, -15.706069431219122], [50.200274692593169, -16.000263360256763], [49.860605503138665, -15.414252618066913], [49.672606642460849, -15.710203545802477], [49.863344354050142, -16.451036879138773], [49.774564243372694, -16.875042006093597], [49.49861209493411, -17.10603565843827], [49.435618523970298, -17.953064060134363], [49.04179243347393, -19.118781019774442], [48.548540887247995, -20.496888116134119], [47.930749139198653, -22.391501153251077], [47.547723423051295, -23.781958916928513], [47.095761346226588, -24.941629733990446], [46.282477654817079, -25.178462823184102], [45.409507684110444, -25.601434421493082], [44.833573846217547, -25.346101169538933], [44.039720493349755, -24.9883452287823], [43.763768344911156, -24.460677178649988], [43.697777540874441, -23.574116306250595], [43.345654331237611, -22.77690398528387], [43.254187046080986, -22.057413018484116], [43.433297560404633, -21.336475111580185], [43.893682895692919, -21.163307386970121], [43.89637007017209, -20.830459486578167], [44.374325392439644, -20.072366224856385], [44.464397413924374, -19.435454196859045], [44.23242190936616, -18.961994724200899], [44.042976108584149, -18.331387220943167], [43.963084344260899, -17.409944756746778], [44.312468702986273, -16.850495700754951], [44.446517368351387, -16.216219170804504], [44.944936557806521, -16.179373874580396], [45.502731967964976, -15.974373467678538], [45.872993605336255, -15.793454278224681], [46.312243279817203, -15.780018405828795], [46.882182651564271, -15.210182386946309], [47.70512983581235, -14.594302666891762], [48.005214878131241, -14.091232598530372], [47.869047479042152, -13.663868503476582], [48.29382775248137, -13.784067884987483], [48.845060255738773, -13.08917489995866], [48.863508742066976, -12.487867933810417], [49.194651320193302, -12.040556735891967], [49.543518914595737, -12.469832858940553]]] } }, + { "type": "Feature", "properties": { "admin": "Mexico", "name": "Mexico", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-97.140008307670684, 25.869997463478395], [-97.528072475966539, 24.992144069920297], [-97.702945522842214, 24.272343044526728], [-97.776041836319024, 22.932579860927653], [-97.872366706111094, 22.444211737553356], [-97.699043952204164, 21.898689480064256], [-97.388959520236739, 21.411018988525818], [-97.189333462293277, 20.635433254473124], [-96.525575527720306, 19.890930894444061], [-96.292127244841737, 19.32037140550954], [-95.90088497595994, 18.828024196848727], [-94.8390634834427, 18.562717393462204], [-94.425729539756205, 18.144370835843343], [-93.548651292682365, 18.423836981677933], [-92.786113857783477, 18.524838568592255], [-92.037348192090391, 18.704569200103432], [-91.407903408559235, 18.876083278880227], [-90.771869879910852, 19.284120388256778], [-90.533589850613026, 19.867418117751292], [-90.451475999701231, 20.707521877520428], [-90.278618333684889, 20.999855454995547], [-89.601321173851474, 21.261725775634485], [-88.543866339862845, 21.493675441976613], [-87.658416510757704, 21.458845526611977], [-87.051890224948053, 21.543543199138295], [-86.811982388032931, 21.331514797444747], [-86.845907965832595, 20.849864610268348], [-87.383291185235848, 20.255404771398727], [-87.621054450210721, 19.646553046135917], [-87.436750454441764, 19.472403469312265], [-87.586560431655911, 19.040130113190738], [-87.837191128271485, 18.259815985583426], [-88.090664028663156, 18.516647854074048], [-88.300031094093626, 18.499982204659997], [-88.490122850279278, 18.486830552641717], [-88.84834387892657, 17.883198147040329], [-89.029857347351737, 18.001511338772556], [-89.150909389995462, 17.955467637600403], [-89.143080410503316, 17.808318996649401], [-90.067933519230891, 17.819326076727517], [-91.001519945015943, 17.817594916245692], [-91.002269253284155, 17.254657701074272], [-91.453921271515114, 17.252177232324183], [-91.08167009150057, 16.918476670799517], [-90.711821865587623, 16.687483018454767], [-90.600846727240921, 16.470777899638787], [-90.438866950221993, 16.410109768128105], [-90.464472622422633, 16.069562079324722], [-91.747960171255926, 16.066564846251762], [-92.229248623406278, 15.251446641495871], [-92.087215949252013, 15.06458466232851], [-92.203229539747255, 14.830102850804108], [-92.227750006869812, 14.538828640190953], [-93.359463874061746, 15.61542959234367], [-93.875168830118511, 15.94016429286591], [-94.691656460330108, 16.20097524664288], [-95.250227016973014, 16.128318182840641], [-96.053382127653293, 15.752087917539592], [-96.557434048228274, 15.653515122942787], [-97.263592495496624, 15.917064927631312], [-98.013029954809596, 16.107311713113912], [-98.947675747456486, 16.566043402568763], [-99.697397427147024, 16.706164048728166], [-100.829498867581293, 17.171071071842047], [-101.666088629954444, 17.649026394109622], [-101.918528001700196, 17.916090196193974], [-102.478132086988907, 17.975750637275095], [-103.500989549558057, 18.292294623278845], [-103.917527432046811, 18.748571682200005], [-104.992009650475467, 19.316133938061679], [-105.493038499761411, 19.946767279535429], [-105.731396043707633, 20.434101874264108], [-105.397772996831321, 20.531718654863422], [-105.500660773524402, 20.816895046466122], [-105.27075232625792, 21.076284898355137], [-105.265817226974022, 21.422103583252348], [-105.603160976975374, 21.871145941652568], [-105.693413865973113, 22.269080308516148], [-106.028716396898943, 22.77375234627862], [-106.909980434988341, 23.767774359628895], [-107.91544877809136, 24.548915310152946], [-108.401904873470954, 25.172313951105931], [-109.260198737406625, 25.580609442644054], [-109.444089321717314, 25.824883938087673], [-109.291643846456267, 26.44293406829842], [-109.801457689231796, 26.676175645447923], [-110.391731737085692, 27.162114976504533], [-110.641018846461606, 27.859876003525521], [-111.178918830187826, 27.941240546169062], [-111.759606899851619, 28.467952582303944], [-112.228234626090369, 28.954408677683482], [-112.27182369672866, 29.266844387320074], [-112.80959448937395, 30.021113593052341], [-113.163810594518651, 30.786880804969424], [-113.148669399857141, 31.170965887978912], [-113.871881069781836, 31.56760834403519], [-114.205736660603506, 31.524045111613123], [-114.776451178835003, 31.79953217216114], [-114.936699795372121, 31.393484605427595], [-114.771231859173483, 30.91361725516526], [-114.673899298951739, 30.162681179315985], [-114.330974494262918, 29.750432440707407], [-113.588875088335413, 29.061611436473008], [-113.424053107540516, 28.826173610951223], [-113.271969367305502, 28.754782619739892], [-113.140039435664363, 28.411289374295954], [-112.962298346796473, 28.425190334582503], [-112.761587083774856, 27.78021678314752], [-112.457910529411635, 27.525813706974752], [-112.24495195193677, 27.171726792910754], [-111.616489020619184, 26.662817287700474], [-111.284674648872993, 25.732589830014426], [-110.987819383572386, 25.294606228124557], [-110.71000688357131, 24.826004340101854], [-110.655048997828871, 24.298594672131113], [-110.17285620811343, 24.265547593680417], [-109.771847093528521, 23.811182562754194], [-109.409104377055698, 23.364672349536242], [-109.433392300232896, 23.185587673428696], [-109.85421932660168, 22.818271592698061], [-110.031391974714424, 22.823077500901199], [-110.295070970483636, 23.430973212166684], [-110.949501309028022, 24.000964260345988], [-111.670568407012681, 24.484423122652508], [-112.182035895621468, 24.73841278736716], [-112.148988817170817, 25.470125230404044], [-112.300710822379671, 26.012004299416613], [-112.777296719191526, 26.321959540303162], [-113.464670783321907, 26.768185533143416], [-113.596729906043805, 26.639459540304465], [-113.848936733844241, 26.900063788352437], [-114.465746629680027, 27.142090358991361], [-115.055142178184965, 27.722726752222904], [-114.982252570437382, 27.798200181585109], [-114.570365566854917, 27.741485297144884], [-114.199328782999231, 28.115002549750553], [-114.162018398884612, 28.566111965442296], [-114.931842210736605, 29.279479275015483], [-115.518653937626965, 29.556361599235395], [-115.887365282029563, 30.180793768834171], [-116.2583503894529, 30.836464341753572], [-116.721526252084956, 31.635743720012037], [-117.127759999999839, 32.53534], [-115.99135, 32.612390000000111], [-114.72139, 32.72083], [-114.815, 32.52528], [-113.30498, 32.03914], [-111.02361, 31.33472], [-109.035, 31.341940000000129], [-108.24194, 31.34222], [-108.24, 31.754853718166366], [-106.507589999999851, 31.75452], [-106.1429, 31.39995], [-105.63159, 31.08383], [-105.03737, 30.64402], [-104.70575, 30.12173], [-104.456969999999885, 29.57196], [-103.94, 29.27], [-103.11, 28.97], [-102.48, 29.76], [-101.6624, 29.7793], [-100.9576, 29.380710000000125], [-100.45584, 28.696120000000118], [-100.11, 28.11000000000012], [-99.52, 27.54], [-99.3, 26.84], [-99.019999999999897, 26.37], [-98.24, 26.06], [-97.529999999999887, 25.84], [-97.140008307670684, 25.869997463478395]]] } }, + { "type": "Feature", "properties": { "admin": "Macedonia", "name": "Macedonia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[20.59023, 41.85541], [20.717310000000108, 41.84711], [20.76216, 42.05186], [21.352700000000134, 42.2068], [21.576635989402117, 42.245224397061847], [21.917080000000105, 42.30364], [22.380525750424674, 42.320259507815074], [22.881373732197339, 41.999297186850349], [22.952377150166505, 41.337993882811176], [22.76177, 41.3048], [22.597308383889008, 41.130487168943198], [22.055377638444266, 41.149865831052686], [21.674160597426969, 40.93127452245794], [21.020040317476397, 40.842726955725873], [20.60518, 41.08622], [20.46315, 41.51509], [20.59023, 41.85541]]] } }, + { "type": "Feature", "properties": { "admin": "Mali", "name": "Mali", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-12.170750291380299, 14.616834214735503], [-11.834207526079465, 14.799096991428936], [-11.666078253617853, 15.388208319556295], [-11.349095017939502, 15.411256008358475], [-10.650791388379414, 15.132745876521422], [-10.086846482778212, 15.330485744686269], [-9.700255092802703, 15.264107367407359], [-9.550238409859388, 15.486496893775435], [-5.537744309908446, 15.501689764869253], [-5.315277268891931, 16.201853745991837], [-5.488522508150438, 16.325102037007962], [-5.971128709324247, 20.640833441647626], [-6.453786586930334, 24.956590684503418], [-4.92333736817423, 24.974574082940993], [-1.550054897457613, 22.792665920497377], [1.823227573259032, 20.61080943448604], [2.060990838233919, 20.142233384679482], [2.683588494486428, 19.856230170160114], [3.146661004253899, 19.693578599521441], [3.158133172222704, 19.057364203360034], [4.267419467800038, 19.155265204336995], [4.270209995143801, 16.852227484601212], [3.723421665063482, 16.184283759012612], [3.638258904646476, 15.568119818580453], [2.749992709981483, 15.409524847876693], [1.385528191746857, 15.323561102759168], [1.01578331869851, 14.968182277887944], [0.374892205414682, 14.928908189346128], [-0.26625729003058, 14.924308986872147], [-0.515854458000348, 15.116157741755725], [-1.066363491205663, 14.973815009007764], [-2.001035122068771, 14.559008287000887], [-2.191824510090384, 14.246417548067352], [-2.967694464520576, 13.798150336151506], [-3.103706834312759, 13.54126679122859], [-3.52280270019986, 13.337661647998612], [-4.006390753587225, 13.472485459848112], [-4.280405035814879, 13.228443508349738], [-4.427166103523802, 12.542645575404292], [-5.220941941743119, 11.713858954307224], [-5.197842576508648, 11.375145778850136], [-5.470564947929004, 10.951269842976044], [-5.404341599946973, 10.370736802609144], [-5.816926235365286, 10.222554633012191], [-6.050452032892266, 10.096360785355442], [-6.205222947606429, 10.524060777219132], [-6.493965013037267, 10.411302801958268], [-6.666460944027547, 10.430810655148447], [-6.850506557635057, 10.138993841996237], [-7.622759161804808, 10.147236232946792], [-7.89958980959237, 10.297382106970824], [-8.029943610048617, 10.206534939001711], [-8.335377163109738, 10.494811916541932], [-8.282357143578279, 10.792597357623842], [-8.407310756860026, 10.90925690352276], [-8.620321010767126, 10.810890814655181], [-8.581305304386772, 11.136245632364801], [-8.376304897484911, 11.393645941610627], [-8.786099005559462, 11.812560939984705], [-8.905264858424529, 12.088358059126433], [-9.127473517279581, 12.308060411015331], [-9.327616339546008, 12.334286200403451], [-9.567911749703212, 12.194243068892472], [-9.890992804392011, 12.060478623904968], [-10.165213792348835, 11.844083563682743], [-10.593223842806278, 11.923975328005977], [-10.870829637078211, 12.177887478072106], [-11.036555955438256, 12.211244615116513], [-11.297573614944508, 12.077971096235768], [-11.456168585648269, 12.076834214725336], [-11.513942836950587, 12.442987575729415], [-11.467899135778522, 12.754518947800973], [-11.553397793005427, 13.141213690641063], [-11.927716030311613, 13.422075100147392], [-12.124887457721256, 13.994727484589784], [-12.170750291380299, 14.616834214735503]]] } }, + { "type": "Feature", "properties": { "admin": "Myanmar", "name": "Myanmar", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[99.543309360759281, 20.186597601802056], [98.959675734454848, 19.752980658440944], [98.253723992915582, 19.708203029860041], [97.797782830804394, 18.627080389881751], [97.375896437573516, 18.445437730375811], [97.859122755934848, 17.567946071843657], [98.493761020911322, 16.837835598207928], [98.90334842325673, 16.177824204976115], [98.537375929765687, 15.308497422746081], [98.192074009191373, 15.123702500870349], [98.430819126379859, 14.622027696180831], [99.097755161538728, 13.827502549693275], [99.212011753336071, 13.269293728076462], [99.196353794351637, 12.804748439988666], [99.587286004639694, 11.892762762901695], [99.038120558673953, 10.960545762572435], [98.553550653073017, 9.932959906448543], [98.457174106848697, 10.675266018105146], [98.764545526120756, 11.441291612183745], [98.428338657629823, 12.032986761925681], [98.509574009192661, 13.122377631070675], [98.103603957107666, 13.64045970301285], [97.777732375075161, 14.837285874892638], [97.597071567782749, 16.100567938699765], [97.164539829499773, 16.928734442609336], [96.505768670642965, 16.427240505432845], [95.369352248112378, 15.714389960182599], [94.808404575584092, 15.803454291237637], [94.188804152404515, 16.037936102762014], [94.533485955791321, 17.277240301985724], [94.324816522196741, 18.213513902249893], [93.540988397193615, 19.366492621330021], [93.663254835996199, 19.726961574781992], [93.078277622452163, 19.855144965081973], [92.368553501355606, 20.670883287025344], [92.30323449093865, 21.475485337809815], [92.652257114637976, 21.324047552978481], [92.672720981825549, 22.041238918541247], [93.166127557348361, 22.278459580977099], [93.060294224014598, 22.703110663335565], [93.286326938859247, 23.043658352138998], [93.325187615942767, 24.078556423432197], [94.106741977925054, 23.850740871673477], [94.552657912171611, 24.675238348890328], [94.603249139385355, 25.162495428970399], [95.155153436262566, 26.001307277932078], [95.124767694074933, 26.573572089132295], [96.419365675850941, 27.264589341739221], [97.133999058015277, 27.08377350514996], [97.051988559968066, 27.699058946233144], [97.402561476636123, 27.88253611908544], [97.327113885490007, 28.261582749946331], [97.91198774616943, 28.335945136014338], [98.24623091023328, 27.747221381129172], [98.682690057370451, 27.508812160750612], [98.712093947344499, 26.74353587494026], [98.671838006589127, 25.918702500913518], [97.724609002679117, 25.083637193292994], [97.604719679761956, 23.897404690033039], [98.660262485755737, 24.063286037689959], [98.898749220782747, 23.142722072842524], [99.531992222087382, 22.949038804612574], [99.240898878987224, 22.118314317304577], [99.983489211021464, 21.742936713136398], [100.416537713627349, 21.558839423096607], [101.150032993578222, 21.849984442629015], [101.180005324307515, 21.436572984294024], [100.329101190189519, 20.786121731036229], [100.115987583417819, 20.41784963630818], [99.543309360759281, 20.186597601802056]]] } }, + { "type": "Feature", "properties": { "admin": "Montenegro", "name": "Montenegro", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[19.801613396898681, 42.500093492190835], [19.738051385179627, 42.688247382165564], [19.30449, 42.19574], [19.371770000000136, 41.87755], [19.16246, 41.95502], [18.88214, 42.28151], [18.45, 42.48], [18.56, 42.65], [18.70648, 43.20011], [19.03165, 43.43253], [19.21852, 43.52384], [19.48389, 43.35229], [19.63, 43.213779970270522], [19.95857, 43.10604], [20.3398, 42.89852], [20.25758, 42.81275], [20.0707, 42.58863], [19.801613396898681, 42.500093492190835]]] } }, + { "type": "Feature", "properties": { "admin": "Mongolia", "name": "Mongolia", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[87.751264276076697, 49.297197984405479], [88.805566847695488, 49.470520738312409], [90.713667433640666, 50.331811835321076], [92.234711541719662, 50.802170722041716], [93.104219191462661, 50.495290228876414], [94.147566359435615, 50.480536607457083], [94.815949334698701, 50.013433335970838], [95.814027947983973, 49.977466539095708], [97.259727817781396, 49.726060695995727], [98.231761509191543, 50.422400621128737], [97.825739780674283, 51.010995184933165], [98.861490513100307, 52.047366034546684], [99.981732212323507, 51.634006252643978], [100.889480421962588, 51.516855780638316], [102.065222609467298, 51.25992055928311], [102.255908644624299, 50.510560614618669], [103.676545444760194, 50.089966132195109], [104.621552362081687, 50.275329494826067], [105.886591424586726, 50.406019192092209], [106.888804152455336, 50.274295966180219], [107.868175897250936, 49.793705145865808], [108.475167270951275, 49.282547715850725], [109.402449171996636, 49.292960516957535], [110.662010532678764, 49.130128078805861], [111.581230910286607, 49.377968248077678], [112.897739699354361, 49.543565375356984], [114.362456496235239, 50.248302720737399], [114.962109816550154, 50.140247300815112], [115.485695428531386, 49.805177313834591], [116.678800897286152, 49.888531399121376], [116.191802199367544, 49.134598090199091], [115.485282017073018, 48.135382595403428], [115.742837355615748, 47.726544501326273], [116.308952671373206, 47.853410142602826], [117.295507440257396, 47.69770905210742], [118.064142694166691, 48.066730455103674], [118.866574334794933, 47.747060044946153], [119.772823927897477, 47.048058783550125], [119.66326989143873, 46.692679958678909], [118.874325799638711, 46.805412095723646], [117.421701287914175, 46.672732855814253], [116.717868280098841, 46.388202419615205], [115.985096470200062, 45.727235012385989], [114.46033165899604, 45.339816799493811], [113.463906691544139, 44.808893134127111], [112.436062453258785, 45.011645616224278], [111.873306105600278, 45.102079372735055], [111.348376906379428, 44.457441718110083], [111.667737257943202, 44.073175767587706], [111.829587843881342, 43.743118394539515], [111.129682244920218, 43.406834011400136], [110.412103306115256, 42.871233628911014], [109.243595819131428, 42.519446316084093], [107.744772576937933, 42.481515814781865], [106.129315627061658, 42.134327704428898], [104.964993931093446, 41.597409572916334], [104.522281935648977, 41.908346666016541], [103.312278273534787, 41.907468166667591], [101.833040399179922, 42.51487295182627], [100.845865513108237, 42.663804429691439], [99.515817498780009, 42.524691473961717], [97.451757440177985, 42.748889675460013], [96.349395786527793, 42.725635280928678], [95.762454868556674, 43.319449164394598], [95.306875441471504, 44.241330878265458], [94.688928664125299, 44.352331854828414], [93.480733677141274, 44.975472113619951], [92.133890822318193, 45.115075995456444], [90.945539585334288, 45.286073309910265], [90.585768263718265, 45.719716091487513], [90.970809360724985, 46.888146063822923], [90.280825636763893, 47.693549099307923], [88.854297723346733, 48.06908173277295], [88.013832228551721, 48.599462795600601], [87.751264276076697, 49.297197984405479]]] } }, + { "type": "Feature", "properties": { "admin": "Mozambique", "name": "Mozambique", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[34.559989047999345, -11.520020033415923], [35.312397902169032, -11.439146416879145], [36.514081658684248, -11.720938002166733], [36.775150994622791, -11.594537448780804], [37.471284214026596, -11.568750909067157], [37.827644891111383, -11.268769219612834], [38.427556593587745, -11.285202325081654], [39.521029900883768, -10.896853936408224], [40.316588576017182, -10.317096042525696], [40.478387485523022, -10.765440769089992], [40.437253045418672, -11.761710707245014], [40.560811395028558, -12.639176527561023], [40.599620395679743, -14.201975192931858], [40.775475294768988, -14.691764418194239], [40.477250604012596, -15.406294447493968], [40.089263950365208, -16.100774021064456], [39.452558628097044, -16.720891208566936], [38.53835086442151, -17.101023044505954], [37.411132846838875, -17.586368096591233], [36.281279331209348, -18.659687595293445], [35.896496616364054, -18.842260430580634], [35.198399692533137, -19.552811374593887], [34.786383497870041, -19.784011732667732], [34.701892531072836, -20.497043145431007], [35.176127150215358, -21.254361260668407], [35.373427768705731, -21.840837090748874], [35.385848253705397, -22.14], [35.562545536369079, -22.09], [35.533934767404297, -23.070787855727751], [35.371774122872374, -23.535358982031692], [35.607470330555621, -23.706563002214676], [35.458745558419615, -24.122609958596545], [35.040734897610655, -24.478350518493798], [34.215824008935463, -24.816314385682652], [33.013210076639005, -25.357573337507731], [32.574632195777859, -25.727318210556088], [32.660363396950082, -26.148584486599443], [32.915955031065685, -26.215867201443459], [32.830120477028878, -26.74219166433619], [32.071665480281062, -26.733820082304902], [31.985779249811962, -26.29177988048022], [31.837777947728057, -25.843331801051342], [31.752408481581874, -25.484283949487406], [31.930588820124242, -24.369416599222532], [31.670397983534645, -23.658969008073861], [31.191409132621278, -22.251509698172395], [32.244988234188007, -21.116488539313689], [32.508693068173436, -20.395292250248303], [32.659743279762573, -20.30429005298231], [32.772707960752619, -19.715592136313294], [32.611994256324884, -19.419382826416268], [32.654885695127142, -18.672089939043492], [32.849860874164385, -17.979057305577175], [32.847638787575839, -16.713398125884613], [32.328238966610222, -16.392074069893749], [31.852040643040592, -16.319417006091374], [31.636498243951188, -16.071990248277881], [31.173063999157673, -15.860943698797868], [30.338954705534537, -15.880839125230242], [30.274255812305103, -15.507786960515208], [30.179481235481827, -14.796099134991525], [33.214024692525207, -13.97186003993615], [33.789700148256678, -14.451830743063068], [34.064825473778619, -14.359950046448118], [34.459633416488536, -14.613009535381421], [34.517666049952304, -15.013708591372609], [34.307291294092089, -15.478641452702592], [34.381291945134045, -16.183559665596039], [35.033810255683527, -16.801299737213089], [35.339062941231639, -16.107440280830108], [35.771904738108347, -15.896858819240721], [35.686845330555926, -14.611045830954328], [35.267956170398001, -13.887834161029563], [34.907151320136158, -13.565424899960565], [34.559989047999345, -13.579997653866872], [34.280006137841973, -12.280025323132504], [34.559989047999345, -11.520020033415923]]] } }, + { "type": "Feature", "properties": { "admin": "Mauritania", "name": "Mauritania", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-12.170750291380299, 14.616834214735503], [-12.830658331747513, 15.303691514542942], [-13.43573767745306, 16.039383042866188], [-14.099521450242175, 16.304302273010489], [-14.577347581428977, 16.598263658102805], [-15.135737270558813, 16.587282416240779], [-15.623666144258689, 16.369337063049809], [-16.120690070041928, 16.45566254319338], [-16.463098110407881, 16.135036119038457], [-16.549707810929061, 16.673892116761959], [-16.270551723688353, 17.166962795474866], [-16.146347418674846, 18.108481553616652], [-16.256883307347163, 19.096715806550304], [-16.377651129613266, 19.593817246981981], [-16.277838100641514, 20.092520656814695], [-16.536323614965465, 20.567866319251486], [-17.063423224342568, 20.99975210213082], [-16.845193650773989, 21.333323472574875], [-12.929101935263528, 21.327070624267559], [-13.118754441774708, 22.771220201096249], [-12.874221564169574, 23.284832261645171], [-11.93722449385332, 23.374594224536164], [-11.969418911171159, 25.933352769468261], [-8.687293667017398, 25.881056219988899], [-8.684399786809051, 27.395744126895998], [-4.92333736817423, 24.974574082940993], [-6.453786586930334, 24.956590684503418], [-5.971128709324247, 20.640833441647626], [-5.488522508150438, 16.325102037007962], [-5.315277268891931, 16.201853745991837], [-5.537744309908446, 15.501689764869253], [-9.550238409859388, 15.486496893775435], [-9.700255092802703, 15.264107367407359], [-10.086846482778212, 15.330485744686269], [-10.650791388379414, 15.132745876521422], [-11.349095017939502, 15.411256008358475], [-11.666078253617853, 15.388208319556295], [-11.834207526079465, 14.799096991428936], [-12.170750291380299, 14.616834214735503]]] } }, + { "type": "Feature", "properties": { "admin": "Malawi", "name": "Malawi", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[34.559989047999345, -11.520020033415923], [34.280006137841973, -12.280025323132504], [34.559989047999345, -13.579997653866872], [34.907151320136158, -13.565424899960565], [35.267956170398001, -13.887834161029563], [35.686845330555926, -14.611045830954328], [35.771904738108347, -15.896858819240721], [35.339062941231639, -16.107440280830108], [35.033810255683527, -16.801299737213089], [34.381291945134045, -16.183559665596039], [34.307291294092089, -15.478641452702592], [34.517666049952304, -15.013708591372609], [34.459633416488536, -14.613009535381421], [34.064825473778619, -14.359950046448118], [33.789700148256678, -14.451830743063068], [33.214024692525207, -13.97186003993615], [32.688165317523122, -13.712857761289273], [32.991764357237876, -12.783870537978272], [33.306422153463068, -12.435778090060214], [33.114289178201908, -11.607198174692311], [33.315310499817279, -10.796549981329695], [33.485687697083584, -10.525558770391111], [33.231387973775291, -9.676721693564799], [32.759375441221316, -9.230599053589058], [33.739729038230443, -9.417150974162722], [33.940837724096532, -9.693673841980292], [34.280006137841973, -10.159999688358402], [34.559989047999345, -11.520020033415923]]] } }, + { "type": "Feature", "properties": { "admin": "Malaysia", "name": "Malaysia", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[101.075515578213299, 6.204867051615891], [101.154218784593809, 5.691384182147713], [101.814281854258013, 5.810808417174228], [102.141186964936423, 6.221636053894655], [102.371147088635212, 6.12820506431096], [102.961705356866673, 5.524495144061077], [103.381214634212142, 4.855001125503746], [103.438575474056165, 4.181605536308381], [103.332122023534851, 3.72669790284297], [103.42942874554052, 3.382868760589019], [103.502447544368877, 2.791018581550204], [103.854674106870334, 2.515454006353763], [104.247931756611479, 1.631141058759055], [104.228811476663523, 1.293048000489534], [103.519707472754433, 1.226333726400682], [102.573615350354771, 1.967115383304744], [101.39063846232915, 2.760813706875623], [101.273539666755838, 3.27029165284118], [100.69543541870668, 3.939139715994869], [100.557407668055092, 4.767280381688279], [100.19670617065772, 5.312492580583678], [100.306260207116509, 6.040561835143875], [100.085756870527078, 6.46448944745029], [100.259596388756918, 6.64282481528957], [101.075515578213299, 6.204867051615891]]], [[[118.618320754064825, 4.47820241944754], [117.882034946770162, 4.137551377779487], [117.01521447150634, 4.306094061699468], [115.86551720587677, 4.306559149590156], [115.51907840379198, 3.169238389494395], [115.134037306785231, 2.821481838386219], [114.621355422017473, 1.430688177898886], [113.805849644019531, 1.217548732911041], [112.859809198052176, 1.497790025229946], [112.380251906383648, 1.410120957846757], [111.797548455860408, 0.904441229654651], [111.159137811326559, 0.976478176269509], [110.514060907027101, 0.773131415200993], [109.830226678508836, 1.338135687664191], [109.663260125773718, 2.006466986494984], [110.396135288537039, 1.663774725751395], [111.168852980597478, 1.850636704918784], [111.370081007942076, 2.697303371588872], [111.796928338672842, 2.885896511238073], [112.995614862115247, 3.102394924324869], [113.712935418758718, 3.893509426281127], [114.204016554828399, 4.525873928236819], [114.659595981913526, 4.00763682699781], [114.869557326315373, 4.348313706881952], [115.347460972150671, 4.316636053887009], [115.405700311343594, 4.955227565933824], [115.450710483869798, 5.447729803891561], [116.220741001450961, 6.143191229675621], [116.725102980619752, 6.924771429873998], [117.129626092600461, 6.928052883324566], [117.643393182446303, 6.422166449403305], [117.689075148592337, 5.98749013918018], [118.347691278152197, 5.708695786965462], [119.181903924639926, 5.407835598162249], [119.110693800941718, 5.016128241389864], [118.439727004064082, 4.966518866389619], [118.618320754064825, 4.47820241944754]]]] } }, + { "type": "Feature", "properties": { "admin": "Namibia", "name": "Namibia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[16.344976840895239, -28.576705010697697], [15.601818068105812, -27.821247247022797], [15.210472446359457, -27.09095590587404], [14.989710727608548, -26.117371921495153], [14.74321414557633, -25.392920017195376], [14.40814415859583, -23.85301401132984], [14.385716586981145, -22.656652927340687], [14.257714064194172, -22.111208184499951], [13.868642205468657, -21.699036960539974], [13.352497999737437, -20.872834161057497], [12.82684533046449, -19.673165785401661], [12.608564080463617, -19.045348809487695], [11.794918654028063, -18.069129327061912], [11.734198846085118, -17.30188933682447], [12.215461460019352, -17.11166838955808], [12.814081251688405, -16.941342868724067], [13.462362094789963, -16.971211846588769], [14.058501417709007, -17.42338062914266], [14.209706658595021, -17.353100681225715], [18.26330936043416, -17.309950860262003], [18.956186964603599, -17.789094740472255], [21.377176141045563, -17.930636488519688], [23.215048455506057, -17.52311614346598], [24.033861525170771, -17.29584319424632], [24.6823490740015, -17.35341073981947], [25.076950310982255, -17.578823337476617], [25.084443393664564, -17.661815687737366], [24.520705193792534, -17.887124932529932], [24.217364536239209, -17.889347019118485], [23.579005568137713, -18.281261081620055], [23.196858351339298, -17.869038181227783], [21.655040317478971, -18.219146010005222], [20.910641310314531, -18.252218926672018], [20.881134067475866, -21.814327080983144], [19.895457797940672, -21.849156996347865], [19.895767856534427, -24.767790215760588], [19.89473432788861, -28.461104831660769], [19.002127312911082, -28.972443129188857], [18.464899122804745, -29.045461928017271], [17.836151971109526, -28.856377862261311], [17.387497185951499, -28.783514092729774], [17.218928663815401, -28.355943291946804], [16.824017368240899, -28.082161553664466], [16.344976840895239, -28.576705010697697]]] } }, + { "type": "Feature", "properties": { "admin": "New Caledonia", "name": "New Caledonia", "continent": "Oceania" }, "geometry": { "type": "Polygon", "coordinates": [[[165.779989862326346, -21.080004978115621], [166.599991489933814, -21.700018812753523], [167.120011428086883, -22.159990736583488], [166.74003462144475, -22.399976088146943], [166.189732293968632, -22.129708347260447], [165.474375441752159, -21.679606621998229], [164.829815301775653, -21.149819838141948], [164.16799523341362, -20.444746595951624], [164.029605747735957, -20.105645847252347], [164.459967075862664, -20.120011895429492], [165.020036249041993, -20.459991143477726], [165.460009393575064, -20.800022067958253], [165.779989862326346, -21.080004978115621]]] } }, + { "type": "Feature", "properties": { "admin": "Niger", "name": "Niger", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[2.154473504249949, 11.940150051313422], [2.177107781593917, 12.625017808477534], [1.024103224297619, 12.851825669806598], [0.993045688490156, 13.335749620003865], [0.429927605805517, 13.988733018443893], [0.295646396495215, 14.444234930880663], [0.374892205414767, 14.928908189346144], [1.015783318698481, 14.968182277887989], [1.385528191746971, 15.323561102759237], [2.74999270998154, 15.409524847876751], [3.63825890464659, 15.56811981858044], [3.723421665063596, 16.184283759012654], [4.270209995143886, 16.852227484601311], [4.267419467800095, 19.155265204337123], [5.677565952180712, 19.601206976799794], [8.572893100629868, 21.565660712159225], [11.999505649471697, 23.471668402596432], [13.581424594790459, 23.040506089769274], [14.143870883855239, 22.491288967371126], [14.8513, 22.862950000000119], [15.096887648181847, 21.308518785074902], [15.471076694407314, 21.048457139565979], [15.487148064850143, 20.730414537025634], [15.90324669766431, 20.387618923417499], [15.68574059414777, 19.957180080642384], [15.300441114979716, 17.927949937405], [15.247731154041842, 16.627305813050778], [13.972201775781681, 15.684365953021139], [13.540393507550785, 14.36713369390122], [13.956698846094124, 13.996691189016925], [13.954476759505607, 13.353448798063765], [14.595781284247604, 13.330426947477859], [14.495787387762899, 12.859396267137353], [14.213530714584746, 12.80203542729333], [14.181336297266906, 12.483656927943169], [13.995352817448289, 12.4615652531383], [13.318701613018558, 13.55635630945795], [13.083987257548809, 13.596147162322492], [12.302071160540546, 13.037189032437535], [11.527803175511504, 13.328980007373556], [10.989593133191532, 13.387322699431191], [10.701031935273816, 13.246917832894038], [10.114814487354748, 13.277251898649464], [9.524928012743088, 12.85110219975456], [9.014933302454436, 12.826659247280414], [7.804671258178869, 13.343526923063731], [7.330746697630046, 13.098038031461213], [6.82044192874781, 13.115091254117598], [6.445426059605721, 13.492768459522718], [5.443058302440135, 13.865923977102225], [4.368343540066006, 13.747481594289408], [4.107945997747378, 13.531215725147941], [3.967282749048933, 12.956108710171574], [3.680633579125924, 12.552903347214167], [3.611180454125587, 11.660167141155965], [2.848643019226585, 12.235635891158207], [2.490163608418015, 12.233052069543588], [2.154473504249949, 11.940150051313422]]] } }, + { "type": "Feature", "properties": { "admin": "Nigeria", "name": "Nigeria", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[8.500287713259693, 4.771982937026847], [7.462108188515939, 4.41210826254624], [7.082596469764438, 4.464689032403228], [6.698072137080598, 4.240594183769516], [5.898172641634686, 4.262453314628984], [5.362804803090881, 4.887970689305957], [5.033574252959368, 5.611802476418233], [4.325607130560683, 6.270651149923466], [3.574180128604552, 6.258300482605717], [2.691701694356254, 6.258817246928628], [2.74906253420022, 7.870734361192886], [2.723792758809509, 8.506845404489708], [2.912308383810255, 9.13760793704432], [3.220351596702101, 9.4441525333997], [3.705438266625918, 10.063210354040207], [3.600070021182801, 10.332186184119406], [3.797112257511713, 10.734745591673104], [3.572216424177469, 11.327939357951516], [3.611180454125558, 11.660167141155966], [3.68063357912581, 12.552903347214222], [3.967282749048848, 12.956108710171572], [4.107945997747321, 13.531215725147829], [4.368343540066063, 13.747481594289324], [5.443058302440163, 13.865923977102295], [6.445426059605636, 13.492768459522676], [6.820441928747753, 13.115091254117514], [7.330746697630017, 13.098038031461199], [7.804671258178784, 13.343526923063745], [9.014933302454462, 12.826659247280427], [9.524928012742945, 12.851102199754477], [10.114814487354689, 13.277251898649409], [10.701031935273702, 13.246917832894081], [10.989593133191532, 13.387322699431108], [11.527803175511393, 13.328980007373584], [12.302071160540521, 13.037189032437521], [13.083987257548866, 13.596147162322563], [13.318701613018558, 13.556356309457824], [13.995352817448346, 12.461565253138343], [14.181336297266792, 12.483656927943112], [14.57717776862253, 12.085360826053501], [14.468192172918974, 11.90475169519341], [14.415378859116682, 11.572368882692071], [13.572949659894558, 10.798565985553564], [13.308676385153914, 10.160362046748926], [13.1675997249971, 9.64062632897341], [12.955467970438971, 9.417771714714702], [12.753671502339214, 8.717762762888993], [12.218872104550597, 8.305824082874322], [12.063946160539556, 7.799808457872301], [11.839308709366801, 7.397042344589434], [11.745774366918509, 6.981382961449753], [11.058787876030349, 6.644426784690593], [10.497375115611417, 7.055357774275562], [10.118276808318255, 7.038769639509879], [9.522705926154398, 6.453482367372116], [9.233162876023043, 6.444490668153334], [8.757532993208626, 5.47966583904791], [8.500287713259693, 4.771982937026847]]] } }, + { "type": "Feature", "properties": { "admin": "Nicaragua", "name": "Nicaragua", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-85.712540452807289, 11.088444932494822], [-86.058488328785245, 11.40343862552994], [-86.525849982432931, 11.806876532432593], [-86.7459915839963, 12.143961900272483], [-87.167516242201131, 12.458257961471656], [-87.668493415054698, 12.909909979702629], [-87.557466600275603, 13.064551703336061], [-87.392386237319201, 12.914018256069836], [-87.316654425795463, 12.984685777228972], [-87.005769009127562, 13.025794379117157], [-86.880557013684339, 13.254204209847241], [-86.733821784191576, 13.263092556201441], [-86.755086636079696, 13.754845485890909], [-86.520708177419877, 13.778487453664436], [-86.312142096689911, 13.771356106008167], [-86.096263800790581, 14.038187364147245], [-85.801294725268576, 13.836054999237586], [-85.698665330736901, 13.960078436738083], [-85.514413011400222, 14.079011745657834], [-85.165364549484792, 14.354369615125076], [-85.148750576502948, 14.560196844943615], [-85.052787441736925, 14.551541042534719], [-84.924500698572388, 14.790492865452348], [-84.820036790694346, 14.819586696832669], [-84.649582078779602, 14.66680532476175], [-84.449335903648588, 14.621614284722494], [-84.228341640952394, 14.748764146376654], [-83.975721401693576, 14.749435939996458], [-83.628584967772895, 14.880073960830298], [-83.489988776366104, 15.016267198135534], [-83.147219000974104, 14.995829169164109], [-83.233234422523907, 14.8998660343981], [-83.28416154654758, 14.676623846897197], [-83.182126430987267, 14.310703029838447], [-83.412499966144424, 13.970077826386554], [-83.519831916014667, 13.56769928634588], [-83.55220720084553, 13.127054348193084], [-83.498515387694255, 12.869292303921226], [-83.473323126951968, 12.419087225794424], [-83.626104499022887, 12.320850328007563], [-83.719613003255034, 11.893124497927724], [-83.650857510090702, 11.629032090700116], [-83.855470343750369, 11.373311265503785], [-83.808935716471538, 11.103043524617274], [-83.655611741861563, 10.938764146361418], [-83.895054490885926, 10.726839097532444], [-84.190178595704822, 10.793450018756671], [-84.355930752281026, 10.999225572142901], [-84.673069017256239, 11.082657172078139], [-84.903003302738924, 10.952303371621895], [-85.561851976244171, 11.217119248901593], [-85.712540452807289, 11.088444932494822]]] } }, + { "type": "Feature", "properties": { "admin": "Netherlands", "name": "Netherlands", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[6.074182570020922, 53.51040334737813], [6.905139601274128, 53.482162177130633], [7.092053256873895, 53.14404328064488], [6.842869500362381, 52.228440253297542], [6.589396599970825, 51.85202912048338], [5.988658074577812, 51.85161570902504], [6.156658155958779, 50.803721015010574], [5.60697594567, 51.037298488969768], [4.973991326526913, 51.475023708698124], [4.047071160507527, 51.267258612668556], [3.314971144228536, 51.345755113319903], [3.830288527043137, 51.620544542031936], [4.705997348661184, 53.091798407597757], [6.074182570020922, 53.51040334737813]]] } }, + { "type": "Feature", "properties": { "admin": "Norway", "name": "Norway", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[28.165547316202911, 71.185474351680497], [31.293418409965472, 70.453787746859902], [30.005435011522785, 70.186258856884876], [31.101078728975118, 69.558080145944857], [29.399580519332879, 69.156916002063056], [28.591929559043187, 69.064776923286686], [29.015572950971968, 69.76649119737796], [27.732292107867885, 70.164193020296281], [26.179622023226298, 69.825298977326142], [25.689212680776389, 69.092113755968995], [24.735679152126714, 68.649556789821432], [23.662049594830759, 68.891247463650515], [22.356237827247405, 68.841741441514941], [21.244936150810723, 69.370443020293109], [20.645592889089581, 69.106247260200846], [20.02526899585791, 69.065138658312705], [19.878559604581248, 68.407194322372604], [17.993868442464386, 68.567391262477329], [17.729181756265344, 68.01055186631622], [16.768878614985535, 68.013936672631374], [16.108712192456832, 67.302455552836889], [15.108411492583055, 66.193866889095418], [13.555689731509087, 64.787027696381458], [13.919905226302202, 64.445420640716108], [13.571916131248766, 64.049114081469654], [12.57993533697393, 64.066218980558332], [11.930569288794228, 63.128317572676977], [11.992064243221531, 61.800362453856557], [12.63114668137524, 61.293571682370079], [12.300365838274896, 60.117932847730046], [11.468271925511173, 59.432393296945989], [11.027368605196925, 58.856149400459394], [10.356556837616095, 59.469807033925363], [8.382000359743641, 58.313288479233265], [7.048748406613297, 58.078884182357271], [5.665835402050418, 58.588155422593658], [5.308234490590733, 59.663231919993805], [4.992078077829005, 61.97099803328426], [5.912900424837885, 62.614472968182682], [8.553411085655766, 63.454008287196459], [10.527709181366784, 64.486038316497471], [12.358346795306371, 65.879725857193151], [14.7611458675816, 67.810641587995121], [16.435927361728968, 68.563205471461671], [19.184028354578512, 69.817444159617807], [21.378416375420606, 70.255169379346043], [23.02374230316158, 70.202071845166259], [24.546543409938515, 71.030496731237221], [26.370049676221807, 70.986261705195361], [28.165547316202911, 71.185474351680497]]], [[[24.72412, 77.85385], [22.49032, 77.44493], [20.72601, 77.67704], [21.41611, 77.93504], [20.8119, 78.25463], [22.88426, 78.45494], [23.28134, 78.07954], [24.72412, 77.85385]]], [[[18.25183, 79.70175], [21.54383, 78.95611], [19.02737, 78.5626], [18.47172, 77.82669], [17.59441, 77.63796], [17.1182, 76.80941], [15.91315, 76.77045], [13.76259, 77.38035], [14.66956, 77.73565], [13.1706, 78.02493], [11.22231, 78.8693], [10.44453, 79.65239], [13.17077, 80.01046], [13.71852, 79.66039], [15.14282, 79.67431], [15.52255, 80.01608], [16.99085, 80.05086], [18.25183, 79.70175]]], [[[25.447625359811887, 80.407340399894494], [27.407505730913492, 80.056405748200447], [25.924650506298171, 79.517833970854539], [23.024465773213613, 79.40001170522909], [20.075188429451877, 79.566823228667232], [19.897266473070907, 79.842361965647498], [18.46226362475792, 79.859880276194403], [17.368015170977454, 80.318896186027004], [20.455992059010693, 80.598155626132225], [21.907944777115397, 80.357679348462071], [22.919252557067431, 80.657144273593488], [25.447625359811887, 80.407340399894494]]]] } }, + { "type": "Feature", "properties": { "admin": "Nepal", "name": "Nepal", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[88.120440708369841, 27.876541652939586], [88.043132765661198, 27.445818589786818], [88.174804315140904, 26.810405178325944], [88.060237664749806, 26.414615383402484], [87.22747195836628, 26.39789805755607], [86.024392938179147, 26.630984605408567], [85.25177859898335, 26.726198431906337], [84.675017938173767, 27.234901231387528], [83.304248895199535, 27.364505723575554], [81.999987420584958, 27.925479234319987], [81.057202589851997, 28.416095282499036], [80.088424513676259, 28.794470119740136], [80.476721225917373, 29.729865220655334], [81.11125613802929, 30.183480943313398], [81.525804477874729, 30.422716986608627], [82.327512648450863, 30.115268052688126], [83.337115106137176, 29.463731594352193], [83.898992954446712, 29.320226141877654], [84.234579705750136, 28.839893703724691], [85.011638218123025, 28.642773952747337], [85.823319940131498, 28.203575954698699], [86.954517043000592, 27.97426178640351], [88.120440708369841, 27.876541652939586]]] } }, + { "type": "Feature", "properties": { "admin": "New Zealand", "name": "New Zealand", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[173.020374790740703, -40.919052422856417], [173.247234328502003, -41.331998793300777], [173.958405389702875, -40.926700534835604], [174.2475867048081, -41.349155368821663], [174.248516880589449, -41.770008233406749], [173.876446568087886, -42.233184096038819], [173.222739699595621, -42.970038344088557], [172.711246372770717, -43.372287693048492], [173.080112746470206, -43.853343601253577], [172.308583612352464, -43.865694268571332], [171.452925246463622, -44.24251881284372], [171.185137974327233, -44.897104180684885], [170.616697219116588, -45.908928724959701], [169.83142215400926, -46.355774834987585], [169.332331170934253, -46.641235446967848], [168.411353794628525, -46.619944756863582], [167.763744745146823, -46.290197442409195], [166.676886021184202, -46.219917494492236], [166.509144321964669, -45.852704766626204], [167.046424188503238, -45.110941257508664], [168.303763462596862, -44.12397307716612], [168.949408807651508, -43.93581918719142], [169.667814569373149, -43.555325616226334], [170.524919875366152, -43.031688327812823], [171.125089960004004, -42.512753594737781], [171.569713983443194, -41.767424411792128], [171.948708937871885, -41.514416599291145], [172.097227004278722, -40.956104424809674], [172.798579543343948, -40.493962090823466], [173.020374790740703, -40.919052422856417]]], [[[174.612008905330526, -36.156397393540537], [175.336615838927173, -37.209097995758263], [175.3575964704375, -36.52619394302112], [175.808886753642469, -36.798942152657681], [175.958490025127475, -37.555381768546063], [176.763195428776555, -37.881253350578696], [177.438813104560495, -37.961248467766488], [178.010354445708657, -37.579824721020124], [178.517093540762801, -37.695373223624792], [178.274731073313802, -38.582812595373092], [177.970460239979332, -39.166342868812968], [177.206992629299123, -39.145775648760839], [176.939980503647007, -39.449736423501562], [177.032946405340113, -39.879942722331471], [176.8858236026052, -40.06597787858216], [176.508017206119348, -40.60480803808958], [176.012440220440283, -41.289624118821493], [175.239567499082966, -41.688307793953236], [175.067898391009408, -41.425894870775075], [174.650972935278418, -41.281820977545443], [175.227630243223615, -40.459235528323397], [174.900156691789959, -39.908933200847216], [173.824046665743992, -39.508854262043506], [173.852261997775315, -39.146602471677461], [174.57480187408035, -38.797683200842748], [174.743473749081033, -38.027807712558378], [174.69701663645057, -37.381128838857954], [174.292028436579187, -36.71109221776144], [174.319003534235549, -36.534823907213884], [173.840996535535766, -36.121980889634109], [173.05417117745958, -35.237125339500331], [172.636005487353714, -34.529106540669382], [173.007042271209457, -34.450661716450334], [173.551298456107475, -35.006183363587958], [174.329390497126241, -35.265495700828616], [174.612008905330526, -36.156397393540537]]]] } }, + { "type": "Feature", "properties": { "admin": "Oman", "name": "Oman", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[58.861141391846573, 21.114034532144299], [58.487985874266961, 20.428985907467101], [58.03431847517659, 20.481437486243347], [57.826372511634098, 20.24300242764863], [57.66576216007094, 19.736004950433109], [57.788700392493368, 19.067570298737646], [57.694390903560667, 18.944709580963799], [57.2342639504338, 18.947991034414255], [56.609650913321971, 18.574267076079476], [56.512189162019482, 18.087113348863934], [56.283520949128011, 17.876066799383945], [55.661491733630683, 17.884128322821535], [55.269939406155189, 17.632309068263194], [55.274900343655091, 17.228354397037659], [54.791002231674113, 16.950696926333357], [54.239252964093751, 17.04498057704998], [53.57050825380459, 16.707662665264674], [53.108572625547502, 16.651051133688977], [52.782184279192066, 17.349742336491229], [52.000009800022227, 19.000003363516068], [54.999981723862405, 19.999994004796118], [55.666659376859869, 22.000001125572307], [55.208341098863187, 22.708329982997007], [55.234489373602869, 23.110992743415348], [55.52584109886449, 23.524869289640911], [55.528631626208288, 23.933604030853498], [55.981213820220503, 24.130542914317854], [55.80411868675624, 24.269604193615287], [55.88623253766805, 24.920830593357486], [56.396847365143984, 24.924732163995508], [56.845140415276049, 24.241673081961487], [57.403452589757428, 23.878594468678834], [58.136947869708322, 23.747930609628835], [58.729211460205427, 23.565667832935414], [59.180501743410346, 22.992395331305456], [59.450097690677033, 22.660270900965592], [59.80806033716285, 22.533611965418199], [59.806148309168087, 22.31052480721419], [59.442191196536399, 21.71454051359208], [59.282407667889871, 21.433885809814875], [58.861141391846573, 21.114034532144299]]], [[[56.391421339753393, 25.895990708921254], [56.261041701080913, 25.714606431576748], [56.070820753814544, 26.055464178973946], [56.362017449779344, 26.395934353128947], [56.485679152253809, 26.309117946878665], [56.391421339753393, 25.895990708921254]]]] } }, + { "type": "Feature", "properties": { "admin": "Pakistan", "name": "Pakistan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[75.158027785140902, 37.13303091078911], [75.896897414050116, 36.666806138651829], [76.192848341785677, 35.898403428687821], [77.837450799474553, 35.494009507787759], [76.871721632804011, 34.653544012992732], [75.757060988268321, 34.504922593721311], [74.240202671204955, 34.748887030571247], [73.749948358051952, 34.317698879527846], [74.104293654277328, 33.441473293586846], [74.451559279278698, 32.764899603805489], [75.258641798813187, 32.271105455040491], [74.405928989564998, 31.692639471965272], [74.421380242820263, 30.97981476493117], [73.450638462217412, 29.976413479119863], [72.823751662084689, 28.961591701772047], [71.777665643200308, 27.913180243434521], [70.61649620960192, 27.989196275335861], [69.514392938113119, 26.940965684511365], [70.168926629522005, 26.491871649678835], [70.282873162725579, 25.722228705339823], [70.844699334602822, 25.215102037043511], [71.0432401874682, 24.356523952730193], [68.842599318318761, 24.359133612560932], [68.176645135373377, 23.691965033456704], [67.443666619745457, 23.944843654876983], [67.145441928989058, 24.663611151624639], [66.37282758979326, 25.425140896093847], [64.530407749291115, 25.237038682551425], [62.905700718034595, 25.218409328710202], [61.497362908784183, 25.078237006118492], [61.874187453056535, 26.239974880472097], [63.316631707619578, 26.756532497661659], [63.23389773952028, 27.217047024030702], [62.755425652929851, 27.378923448184985], [62.727830438085974, 28.259644883735383], [61.771868117118615, 28.699333807890792], [61.369308709564926, 29.303276272085917], [60.874248488208778, 29.829238999952604], [62.549856805272775, 29.318572496044304], [63.550260858011164, 29.468330796826162], [64.148002150331237, 29.340819200145965], [64.350418735618504, 29.560030625928089], [65.046862013616092, 29.472180691031902], [66.346472609324408, 29.88794342703617], [66.38145755398601, 30.738899237586448], [66.938891229118454, 31.304911200479346], [67.683393589147457, 31.303154201781414], [67.792689243444769, 31.582930406209623], [68.556932000609308, 31.713310044882011], [68.926676873657655, 31.620189113892064], [69.317764113242546, 31.901412258424436], [69.262522007122541, 32.501944078088293], [69.687147251264847, 33.105498969041228], [70.323594191371583, 33.358532619758385], [69.93054324735958, 34.020120144175102], [70.881803012988385, 33.988855902638512], [71.156773309213449, 34.348911444632144], [71.115018751921625, 34.733125718722228], [71.613076206350698, 35.153203436822857], [71.498767938121077, 35.650563259415996], [71.262348260385735, 36.074387518857797], [71.846291945283909, 36.509942328429851], [72.920024855444453, 36.720007025696312], [74.067551710917812, 36.836175645488446], [74.575892775372964, 37.02084137628345], [75.158027785140902, 37.13303091078911]]] } }, + { "type": "Feature", "properties": { "admin": "Panama", "name": "Panama", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-77.881571417945239, 7.223771267114783], [-78.214936082660103, 7.512254950384159], [-78.429160732726061, 8.052041123888925], [-78.182095709938608, 8.319182440621772], [-78.43546525746568, 8.387705389840788], [-78.622120530903928, 8.718124497915026], [-79.120307176413732, 8.996092027213022], [-79.557877366845176, 8.932374986197145], [-79.760578172510037, 8.584515082224398], [-80.164481167303322, 8.333315944853593], [-80.382659064439608, 8.29840851484043], [-80.480689256497286, 8.090307522001067], [-80.003689948227148, 7.54752411542337], [-80.276670701808982, 7.419754136581713], [-80.421158006497066, 7.271571966984763], [-80.886400926420791, 7.220541490096535], [-81.059542812814698, 7.817921047390596], [-81.189715745757937, 7.647905585150339], [-81.519514736644666, 7.706610012233908], [-81.721311204744453, 8.108962714058434], [-82.131441209628889, 8.175392767769635], [-82.390934414382542, 8.292362372262287], [-82.820081346350406, 8.290863755725821], [-82.850958014644803, 8.073822740099954], [-82.965783047197348, 8.225027980985983], [-82.9131764391242, 8.423517157419068], [-82.829770677405151, 8.626295477732368], [-82.868657192704759, 8.807266343618521], [-82.719183112300513, 8.925708726431493], [-82.927154914059145, 9.074330145702914], [-82.932890998043561, 9.476812038608172], [-82.546196255203469, 9.566134751824674], [-82.187122565423394, 9.207448635286779], [-82.207586432610952, 8.995575262890098], [-81.808566860669259, 8.95061676679617], [-81.714154018872023, 9.031955471223581], [-81.43928707551153, 8.786234035675715], [-80.947301601876745, 8.858503526235905], [-80.521901211250054, 9.11107208906243], [-79.914599778955974, 9.312765204297618], [-79.573302781884294, 9.611610012241526], [-79.021191779277913, 9.552931423374103], [-79.058450486960353, 9.454565334506523], [-78.500887620747164, 9.420458889193879], [-78.055927700497989, 9.247730414258296], [-77.729513515926399, 8.946844387238867], [-77.353360765273848, 8.670504665558068], [-77.474722866511314, 8.524286200388216], [-77.242566494440069, 7.935278225125442], [-77.431107957656977, 7.638061224798733], [-77.75341386586139, 7.709839789252141], [-77.881571417945239, 7.223771267114783]]] } }, + { "type": "Feature", "properties": { "admin": "Peru", "name": "Peru", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-69.590423753524036, -17.580011895419329], [-69.858443569605839, -18.092693780187009], [-70.3725723944777, -18.347975355708861], [-71.375250210236914, -17.77379851651385], [-71.462040778271117, -17.363487644116379], [-73.444529588500401, -16.359362888252992], [-75.23788265654143, -15.26568287522778], [-76.009205084929931, -14.649286390850317], [-76.423469204397733, -13.823186944232431], [-76.259241502574156, -13.535039157772939], [-77.10619238962181, -12.222716159720816], [-78.092152879534623, -10.377712497604062], [-79.036953091126918, -8.38656788496589], [-79.445920376284832, -7.930833428583859], [-79.760578172510037, -7.194340915560081], [-80.537481655586049, -6.541667575713715], [-81.249996304026411, -6.136834405139182], [-80.926346808582423, -5.690556735866563], [-81.410942552399433, -4.736764825055459], [-81.099669562489353, -4.036394138203696], [-80.302560594387188, -3.404856459164712], [-80.184014858709645, -3.821161797708043], [-80.46929460317692, -4.059286797708999], [-80.442241990872134, -4.425724379090673], [-80.028908047185581, -4.346090996928893], [-79.62497921417615, -4.454198093283494], [-79.205289069317715, -4.959128513207388], [-78.639897223612323, -4.547784112164072], [-78.450683966775628, -3.873096612161375], [-77.83790483265858, -3.003020521663103], [-76.635394253226707, -2.608677666843817], [-75.544995693652027, -1.56160979574588], [-75.233722703741932, -0.911416924649529], [-75.373223232713841, -0.15203175212045], [-75.106624518520064, -0.05720549886486], [-74.441600511355958, -0.530820000819887], [-74.122395189089048, -1.002832533373848], [-73.659503546834586, -1.260491224781134], [-73.070392218707212, -2.308954359550952], [-72.325786505813639, -2.434218031426453], [-71.774760708285385, -2.169789727388937], [-71.413645799429773, -2.342802422702128], [-70.813475714791949, -2.256864515800742], [-70.047708502874841, -2.725156345229699], [-70.692682054309699, -3.742872002785858], [-70.394043952094975, -3.766591485207825], [-69.893635219996611, -4.298186944194326], [-70.79476884630229, -4.251264743673302], [-70.928843349883564, -4.401591485210367], [-71.748405727816532, -4.59398284263301], [-72.891927659787243, -5.274561455916979], [-72.964507208941185, -5.741251315944892], [-73.219711269814596, -6.089188734566076], [-73.120027431923575, -6.629930922068238], [-73.724486660441627, -6.918595472850638], [-73.723401455363486, -7.340998630404412], [-73.987235480429646, -7.523829847853063], [-73.571059332967053, -8.424446709835832], [-73.015382656532537, -9.03283334720806], [-73.226713426390148, -9.462212823121233], [-72.563033006465631, -9.520193780152715], [-72.184890713169821, -10.05359791426943], [-71.302412278921523, -10.079436130415372], [-70.481893886991159, -9.490118096558842], [-70.548685675728393, -11.009146823778462], [-70.093752204046879, -11.123971856331011], [-69.52967810736493, -10.951734307502193], [-68.665079718689611, -12.561300144097171], [-68.880079515239956, -12.89972909917665], [-68.929223802349526, -13.602683607643007], [-68.94888668483658, -14.45363941819328], [-69.339534674747, -14.953195489158828], [-69.160346645774936, -15.323973890853015], [-69.389764166934697, -15.66012908291165], [-68.959635382753291, -16.500697930571267], [-69.590423753524036, -17.580011895419329]]] } }, + { "type": "Feature", "properties": { "admin": "Philippines", "name": "Philippines", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[126.376813592637447, 8.414706325713352], [126.478512811387873, 7.750354112168976], [126.537423944200611, 7.189380601424572], [126.19677290253253, 6.274294338400038], [125.831420526229081, 7.293715318221855], [125.363852166852283, 6.78648529706099], [125.683160841983707, 6.049656887227257], [125.396511672060626, 5.581003322772288], [124.219787632342332, 6.16135549562618], [123.938719517106918, 6.88513560630612], [124.243662144061318, 7.360610459823659], [123.610212437027542, 7.833527329942753], [123.29607140512519, 7.418875637232786], [122.825505812675388, 7.457374579290216], [122.085499302255769, 6.899424139834847], [121.919928013192603, 7.192119452336072], [122.312358840017112, 8.034962063016506], [122.94239790251963, 8.316236883981174], [123.487687616063511, 8.693009751821192], [123.841154412939815, 8.240324204944384], [124.6014697612502, 8.514157619659015], [124.764612257995623, 8.960409450715458], [125.471390822451539, 8.986996975129641], [125.412117954612754, 9.760334784377545], [126.222714471543156, 9.28607432701885], [126.306636997585073, 8.782487494334573], [126.376813592637447, 8.414706325713352]]], [[[123.982437778825798, 10.278778591345811], [123.62318322153277, 9.950090643753297], [123.309920688979332, 9.318268744336676], [122.995883009941636, 9.022188625520398], [122.380054966319463, 9.713360907424201], [122.586088901867072, 9.981044826696104], [122.837081333508706, 10.261156927934234], [122.947410516451896, 10.881868394408029], [123.498849725438447, 10.940624497923945], [123.337774285984722, 10.267383938025445], [124.077935825701218, 11.232725531453706], [123.982437778825798, 10.278778591345811]]], [[[118.504580926590336, 9.316382554558087], [117.174274530100675, 8.367499904814663], [117.664477166821371, 9.066888739452933], [118.386913690261736, 9.684499619989223], [118.98734215706105, 10.376292019080507], [119.511496209797528, 11.36966807702721], [119.689676548339889, 10.554291490109872], [119.029458449378978, 10.003653265823869], [118.504580926590336, 9.316382554558087]]], [[[121.883547804859106, 11.891755072471977], [122.483821242361458, 11.582187404827506], [123.120216506035959, 11.583660183147867], [123.100837843926442, 11.165933742716486], [122.637713657726692, 10.741308498574226], [122.002610304859559, 10.441016750526087], [121.967366978036523, 10.905691229694622], [122.038370396005519, 11.415840969280039], [121.883547804859106, 11.891755072471977]]], [[[125.502551711123488, 12.162694606978347], [125.783464797062152, 11.046121934447767], [125.01188398651226, 11.311454576050377], [125.032761265158115, 10.975816148314703], [125.277449172060244, 10.358722032101308], [124.801819289245714, 10.134678859899889], [124.760168084818474, 10.8379951033923], [124.459101190286049, 10.889929917845633], [124.302521600441722, 11.495370998577227], [124.891012811381572, 11.415582587118589], [124.877990350443952, 11.794189968304988], [124.266761509295705, 12.557760931849682], [125.22711632700782, 12.53572093347719], [125.502551711123488, 12.162694606978347]]], [[[121.527393833503481, 13.069590155484516], [121.262190382981544, 12.2055602075644], [120.833896112146533, 12.704496161342416], [120.323436313967477, 13.466413479053866], [121.18012820850214, 13.429697373910439], [121.527393833503481, 13.069590155484516]]], [[[121.321308221523566, 18.504064642811013], [121.937601353036371, 18.21855235439838], [122.246006300954264, 18.478949896717094], [122.336956821787965, 18.224882717354173], [122.174279412933174, 17.810282701076371], [122.51565392465335, 17.09350474697197], [122.252310825693883, 16.262444362854122], [121.662786086108255, 15.931017564350125], [121.505069614753367, 15.124813544164621], [121.728828566577249, 14.328376369682244], [122.258925409027313, 14.218202216035973], [122.701275669445636, 14.336541245984417], [123.950295037940236, 13.782130642141066], [123.855107049658599, 13.237771104378464], [124.181288690284873, 12.997527370653469], [124.077419061378222, 12.536676947474573], [123.298035109552245, 13.027525539598981], [122.928651971529902, 13.552919826710404], [122.671355015148663, 13.185836289925131], [122.034649692880521, 13.784481919810343], [121.126384718918587, 13.636687323455559], [120.628637323083296, 13.857655747935649], [120.679383579593832, 14.271015529838319], [120.99181928923052, 14.525392767795079], [120.693336216312687, 14.756670640517282], [120.564145135582976, 14.396279201713821], [120.070428501466367, 14.970869452367094], [119.920928582846102, 15.406346747290735], [119.883773228028247, 16.363704331929963], [120.286487664878791, 16.034628811095327], [120.39004723519173, 17.599081122299506], [120.7158671407919, 18.505227362537536], [121.321308221523566, 18.504064642811013]]]] } }, + { "type": "Feature", "properties": { "admin": "Papua New Guinea", "name": "Papua New Guinea", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[155.880025669578401, -6.819996840037758], [155.599991082988765, -6.919990736522491], [155.166994256815087, -6.535931491729299], [154.729191522438327, -5.900828138862208], [154.514114211239644, -5.139117526880012], [154.652503696917336, -5.042430922061839], [154.759990676084357, -5.339983819198493], [155.062917922179338, -5.566791680527486], [155.547746209941693, -6.200654799019658], [156.019965448224752, -6.540013929880386], [155.880025669578401, -6.819996840037758]]], [[[151.982795851854462, -5.478063246282344], [151.459106887008659, -5.560280450058739], [151.301390415653884, -5.840728448106701], [150.754447056276661, -6.083762709175387], [150.241196730753813, -6.317753594592984], [149.709963006793316, -6.316513360218051], [148.890064732050462, -6.026040134305432], [148.318936802360696, -5.74714242922613], [148.401825799756864, -5.437755629094722], [149.298411900020824, -5.583741550319216], [149.845561965127217, -5.505503431829339], [149.996250441690279, -5.026101169457674], [150.139755894164921, -5.001348158389788], [150.236907586873485, -5.53222014732428], [150.807467075808063, -5.455842380396886], [151.089672072553981, -5.113692722192368], [151.647880894170811, -4.757073662946168], [151.537861769821518, -4.167807305521889], [152.136791620084352, -4.148790378438519], [152.338743117480988, -4.31296640382976], [152.318692661751754, -4.867661228050748], [151.982795851854462, -5.478063246282344]]], [[[147.191873814074938, -7.388024183789978], [148.084635858349372, -8.044108168167609], [148.734105259393573, -9.104663588093755], [149.306835158484432, -9.071435642130067], [149.266630894161324, -9.514406019736027], [150.038728469034311, -9.684318129111698], [149.738798456012262, -9.872937106977002], [150.801627638959133, -10.29368661869742], [150.690574985963849, -10.582712904505865], [150.028393182575826, -10.652476088099929], [149.782310012001972, -10.393267103723941], [148.923137648717216, -10.28092253992136], [147.913018426707993, -10.130440769087469], [147.135443150012236, -9.492443536012017], [146.567880894150619, -8.942554619994153], [146.048481073184917, -8.067414239131308], [144.74416792213799, -7.630128269077473], [143.897087844009661, -7.915330498896279], [143.286375767184268, -8.245491224809056], [143.413913202080664, -8.983068942910945], [142.628431431244223, -9.326820570516501], [142.068258905200196, -9.159595635620034], [141.033851760013874, -9.117892754760417], [141.017056919519007, -5.85902190513802], [141.000210402591847, -2.600151055515624], [142.735246616791443, -3.289152927263216], [144.583970982033236, -3.861417738463401], [145.27317955950997, -4.373737888205027], [145.829786411725649, -4.876497897972683], [145.981921828392956, -5.465609226100012], [147.648073358347574, -6.083659356310803], [147.891107619416175, -6.614014580922315], [146.970905389594861, -6.721656589386255], [147.191873814074938, -7.388024183789978]]], [[[153.14003787659874, -4.499983412294113], [152.827292108368255, -4.766427097190998], [152.63867313050298, -4.176127211120927], [152.406025832324929, -3.789742526874561], [151.953236932583536, -3.462062269711821], [151.384279413050024, -3.035421644710111], [150.6620495953388, -2.741486097833956], [150.939965448204532, -2.500002129734028], [151.479984165654514, -2.779985039891386], [151.820015090135087, -2.999971612157907], [152.239989455371074, -3.24000864015366], [152.640016717742526, -3.659983005389647], [153.019993524384631, -3.980015150573293], [153.14003787659874, -4.499983412294113]]]] } }, + { "type": "Feature", "properties": { "admin": "Poland", "name": "Poland", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[15.016995883858666, 51.106674099321566], [14.607098422919531, 51.745188096719964], [14.685026482815685, 52.089947414755187], [14.437599725002197, 52.624850165408382], [14.074521111719488, 52.981262518925426], [14.353315463934136, 53.248171291712957], [14.119686313542584, 53.757029120491026], [14.802900424873455, 54.050706285205735], [16.363477003655728, 54.513158677785711], [17.622831658608671, 54.851535956432897], [18.620858595461637, 54.682605699270766], [18.696254510175461, 54.438718777069276], [19.6606400896064, 54.426083889373913], [20.89224450041862, 54.312524929412518], [22.731098667092649, 54.327536932993311], [23.243987257589506, 54.220566718149129], [23.484127638449841, 53.912497667041123], [23.527535841574995, 53.47012156840654], [23.804934930117774, 53.08973135030606], [23.799198846133375, 52.691099351606553], [23.19949384938618, 52.486977444053664], [23.508002150168689, 52.023646552124717], [23.52707075368437, 51.578454087930233], [24.029985792748899, 50.705406602575174], [23.922757195743259, 50.424881089878738], [23.426508416444388, 50.308505764357449], [22.518450148211596, 49.476773586619736], [22.776418898212619, 49.027395331409608], [22.558137648211751, 49.08573802346713], [21.607808058364206, 49.470107326854077], [20.887955356538406, 49.328772284535823], [20.415839471119849, 49.431453355499755], [19.825022820726865, 49.217125352569219], [19.320712517990469, 49.571574001659179], [18.909574822676316, 49.435845852244562], [18.85314415861361, 49.496229763377634], [18.392913852622168, 49.988628648470737], [17.649445021238986, 50.049038397819942], [17.554567091551117, 50.36214590107641], [16.868769158605655, 50.473973700556016], [16.719475945714429, 50.215746568393527], [16.176253289462263, 50.4226073268579], [16.238626743238566, 50.697732652379827], [15.490972120839725, 50.7847299261432], [15.016995883858666, 51.106674099321566]]] } }, + { "type": "Feature", "properties": { "admin": "Puerto Rico", "name": "Puerto Rico", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-66.2824344550082, 18.51476166429536], [-65.771302863209286, 18.426679185453875], [-65.591003790942935, 18.228034979723912], [-65.847163865813755, 17.975905666571855], [-66.599934455009475, 17.98182261806927], [-67.184162360285256, 17.946553453030074], [-67.24242753769434, 18.374460150622934], [-67.100679083917726, 18.520601101144347], [-66.2824344550082, 18.51476166429536]]] } }, + { "type": "Feature", "properties": { "admin": "North Korea", "name": "Dem. Rep. Korea", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[130.640015903852401, 42.39500946712527], [130.780007358931101, 42.220007229168843], [130.400030552288996, 42.280003567059701], [129.965948521037234, 41.941367906251052], [129.667362095254788, 41.601104437825221], [129.705189243692445, 40.882827867184318], [129.188114862179958, 40.661807766271984], [129.010399611528186, 40.485436102859801], [128.633368361526692, 40.189846910150301], [127.967414178581322, 40.025412502597547], [127.533435500194145, 39.756850083976694], [127.502119582225276, 39.323930772451526], [127.385434198110261, 39.213472398427648], [127.783342726757709, 39.050898342437414], [128.349716424676586, 38.612242946927843], [128.205745884311426, 38.370397243801882], [127.780035435090966, 38.304535630845884], [127.073308547067342, 38.256114813788393], [126.683719924018888, 37.804772854151174], [126.237338901881742, 37.840377916000271], [126.174758742376213, 37.749685777328033], [125.689103631697165, 37.940010077459014], [125.568439162295675, 37.752088731429616], [125.275330438336184, 37.66907054295271], [125.24008711151312, 37.857224432927424], [124.981033156433952, 37.948820909164773], [124.712160679219352, 38.108346055649783], [124.985994093933954, 38.548474229479673], [125.221948683778677, 38.665857245430665], [125.13285851450749, 38.848559271798578], [125.386589797060566, 39.387957872061158], [125.321115757346774, 39.551384589184202], [124.737482131042384, 39.660344346671614], [124.265624627785286, 39.928493353834149], [125.079941847840615, 40.569823716792442], [126.182045119329402, 41.107336127276362], [126.86908328664984, 41.816569322266176], [127.343782993682993, 41.50315176041596], [128.208433058790632, 41.466771552082477], [128.052215203972281, 41.994284572917934], [129.59666873587949, 42.424981797854542], [129.994267205933198, 42.985386867843779], [130.640015903852401, 42.39500946712527]]] } }, + { "type": "Feature", "properties": { "admin": "Portugal", "name": "Portugal", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[-9.034817674180244, 41.880570583659669], [-8.671945766626719, 42.134689439454952], [-8.26385698081779, 42.280468654950326], [-8.01317460776991, 41.790886135417118], [-7.422512986673794, 41.792074693359822], [-7.251308966490822, 41.91834605566504], [-6.668605515967655, 41.883386949219577], [-6.389087693700914, 41.381815497394641], [-6.851126674822551, 41.111082668617513], [-6.864019944679383, 40.330871893874821], [-7.026413133156593, 40.184524237624238], [-7.066591559263527, 39.711891587882768], [-7.498632371439724, 39.629571031241802], [-7.098036668313126, 39.03007274022378], [-7.374092169616317, 38.373058580064914], [-7.029281175148794, 38.075764065089757], [-7.166507941099863, 37.803894354802217], [-7.537105475281022, 37.428904323876232], [-7.45372555177809, 37.097787583966053], [-7.855613165711985, 36.838268540996253], [-8.382816127953687, 36.978880113262449], [-8.898856980820325, 36.868809312480771], [-8.746101446965552, 37.6513455266766], [-8.839997524439879, 38.266243394517609], [-9.287463751655221, 38.358485826158592], [-9.526570603869713, 38.737429104154906], [-9.44698889814023, 39.392066148428363], [-9.048305223008425, 39.755093085278766], [-8.977353481471679, 40.159306138665798], [-8.7686840478771, 40.76063894303018], [-8.790853237330309, 41.18433401139125], [-8.990789353867568, 41.543459377603625], [-9.034817674180244, 41.880570583659669]]] } }, + { "type": "Feature", "properties": { "admin": "Paraguay", "name": "Paraguay", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-62.685057135657871, -22.24902922942238], [-62.291179368729203, -21.051634616787389], [-62.265961269770784, -20.513734633061272], [-61.786326463453761, -19.633736667562957], [-60.043564622626477, -19.342746677327419], [-59.11504248720609, -19.356906019775398], [-58.183471442280492, -19.868399346600359], [-58.166392381408038, -20.176700941653674], [-57.870673997617786, -20.732687676681948], [-57.937155727761287, -22.090175876557169], [-56.881509568902885, -22.282153822521476], [-56.473317430229379, -22.086300144135279], [-55.797958136606894, -22.356929620047815], [-55.61068274598113, -22.655619398694839], [-55.517639329639621, -23.57199757252663], [-55.400747239795407, -23.956935316668797], [-55.027901780809543, -24.001273695575225], [-54.652834235235119, -23.839578138933955], [-54.292959560754511, -24.021014092710722], [-54.293476325077435, -24.570799655863958], [-54.428946092330577, -25.162184747012162], [-54.625290696823562, -25.739255466415507], [-54.788794928595038, -26.621785577096126], [-55.695845506398143, -27.387837009390857], [-56.486701626192989, -27.548499037386286], [-57.609759690976134, -27.395898532828383], [-58.618173590719735, -27.123718763947089], [-57.633660040911117, -25.603656508081638], [-57.777217169817924, -25.162339776309032], [-58.807128465394968, -24.771459242453307], [-60.028966030504016, -24.032796319273267], [-60.846564704009907, -23.880712579038288], [-62.685057135657871, -22.24902922942238]]] } }, + { "type": "Feature", "properties": { "admin": "Palestine", "name": "Palestine", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[35.545665317534535, 32.393992011030569], [35.545251906076196, 31.782504787720832], [35.397560662586038, 31.489086005167572], [34.927408481594554, 31.35343537040141], [34.970506626125989, 31.616778469360803], [35.225891554512422, 31.754341132121759], [34.974640740709319, 31.866582343059715], [35.183930291491428, 32.532510687788935], [35.545665317534535, 32.393992011030569]]] } }, + { "type": "Feature", "properties": { "admin": "Qatar", "name": "Qatar", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[50.810108270069563, 24.754742539971371], [50.743910760303677, 25.482424221289389], [51.01335167827348, 26.006991685484191], [51.286461622936045, 26.114582017515865], [51.589078810437243, 25.801112779233375], [51.606700473848804, 25.215670477798735], [51.389607781790623, 24.627385972588051], [51.112415398977006, 24.556330878186721], [50.810108270069563, 24.754742539971371]]] } }, + { "type": "Feature", "properties": { "admin": "Romania", "name": "Romania", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[22.710531447040488, 47.882193915389394], [23.142236362406798, 48.096341050806942], [23.760958286237404, 47.985598456405448], [24.402056105250374, 47.981877753280422], [24.866317172960571, 47.737525743188307], [25.207743361112986, 47.891056423527459], [25.945941196402394, 47.987148749374207], [26.197450392366925, 48.220881252630342], [26.619336785597788, 48.220726223333457], [26.924176059687561, 48.123264472030982], [27.233872918412736, 47.826770941756365], [27.551166212684841, 47.405117092470817], [28.128030226359037, 46.81047638608824], [28.160017937947707, 46.371562608417207], [28.054442986775392, 45.944586086605618], [28.233553501099035, 45.488283189468369], [28.679779493939371, 45.30403087013169], [29.149724969201646, 45.464925442072442], [29.603289015427425, 45.293308010431119], [29.62654340995876, 45.035390936862392], [29.141611769331831, 44.820210272799038], [28.837857700320196, 44.913873806328041], [28.55808149589199, 43.707461656258118], [27.970107049275068, 43.812468166675202], [27.242399529740904, 44.175986029632398], [26.065158725699739, 43.943493760751259], [25.569271681426923, 43.688444729174712], [24.100679152124169, 43.741051337247846], [23.332302280376322, 43.897010809904707], [22.94483239105184, 43.823785305347123], [22.657149692482985, 44.234923000661276], [22.474008416440594, 44.409227606781762], [22.705725538837349, 44.578002834647016], [22.459022251075933, 44.702517198254291], [22.145087924902807, 44.478422349620573], [21.562022739353605, 44.768947251965486], [21.483526238702233, 45.181170152357772], [20.874312778413351, 45.416375433934228], [20.76217492033998, 45.734573065771428], [20.220192498462833, 46.127468980486547], [21.021952345471245, 46.316087958351886], [21.626514926853869, 46.994237779318148], [22.09976769378283, 47.672439276716695], [22.710531447040488, 47.882193915389394]]] } }, + { "type": "Feature", "properties": { "admin": "Russia", "name": "Russia", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[143.648007440362846, 50.747600409541512], [144.65414757708561, 48.976390692737581], [143.173927850517174, 49.306551418650365], [142.558668247650076, 47.861575018904908], [143.533492466404027, 46.836728013692479], [143.505277134372591, 46.137907619809475], [142.747700636973889, 46.740764878926562], [142.092030064054484, 45.966755276058777], [141.906925083585008, 46.805928860046535], [142.018442824470867, 47.780132961612921], [141.904444614835029, 48.859188544299563], [142.135800002205656, 49.615163072297449], [142.179983351815281, 50.952342434281903], [141.594075962490024, 51.935434882202529], [141.682546014573632, 53.301966457728767], [142.606934035410745, 53.762145087287891], [142.209748976815376, 54.225475979216853], [142.654786411712934, 54.365880845753864], [142.914615513276544, 53.704577541714734], [143.260847609632037, 52.740760403039033], [143.235267775647628, 51.756660264688733], [143.648007440362846, 50.747600409541512]]], [[[22.731098667092649, 54.327536932993311], [20.892244500418652, 54.312524929412568], [19.6606400896064, 54.42608388937397], [19.88848147958134, 54.866160386771483], [21.268448927503492, 55.190481675835279], [22.315723504330599, 55.015298570365886], [22.757763706155281, 54.856574408581416], [22.651051873472564, 54.582740993866693], [22.731098667092649, 54.327536932993311]]], [[[180.000000000000114, 70.832199208546669], [178.903425, 70.78114], [178.7253, 71.0988], [180.000000000000114, 71.515714336428246], [180.000000000000114, 70.832199208546669]]], [[[143.60385, 73.21244], [142.08763, 73.20544], [140.038155, 73.31692], [139.86312, 73.36983], [140.81171, 73.76506], [142.06207, 73.85758], [143.48283, 73.47525], [143.60385, 73.21244]]], [[[150.73167, 75.08406], [149.575925, 74.68892], [147.977465, 74.778355], [146.11919, 75.17298], [146.358485, 75.49682], [148.22223, 75.345845], [150.73167, 75.08406]]], [[[145.086285, 75.562625], [144.3, 74.82], [140.61381, 74.84768], [138.95544, 74.61148], [136.97439, 75.26167], [137.51176, 75.94917], [138.831075, 76.13676], [141.471615, 76.09289], [145.086285, 75.562625]]], [[[57.535692579992386, 70.720463975702145], [56.944979282463933, 70.63274323188665], [53.677375115784187, 70.762657782668455], [53.412016635965372, 71.206661688920192], [51.601894565645708, 71.474759019650477], [51.455753615124209, 72.014881089965129], [52.478275180883564, 72.229441636840946], [52.444168735570841, 72.77473135038484], [54.427613559797649, 73.627547512497571], [53.508289829325136, 73.749813951300141], [55.902458937407644, 74.627486477345329], [55.631932814359701, 75.081412258597155], [57.868643833248839, 75.609390367323186], [61.170044386647497, 76.251883450008123], [64.498368361270209, 76.439055487769267], [66.210977003855092, 76.809782213031227], [68.157059767534818, 76.939696763812904], [68.852211134725124, 76.544811306454605], [68.180572544227644, 76.233641669409096], [64.637326287703004, 75.737754625136219], [61.583507521414752, 75.260884507946784], [58.477082147053366, 74.309056301562819], [56.986785516187993, 73.333043524866227], [55.41933597191094, 72.371267605265956], [55.622837762276291, 71.540594794390316], [57.535692579992386, 70.720463975702145]]], [[[106.970130000000111, 76.97419], [107.240000000000123, 76.48], [108.1538, 76.723350000000138], [111.077260000000138, 76.71], [113.33151, 76.22224], [114.13417, 75.84764], [113.88539, 75.327790000000121], [112.77918, 75.03186], [110.151250000000175, 74.47673], [109.4, 74.18], [110.64, 74.04], [112.11919, 73.787740000000113], [113.019540000000234, 73.976930000000138], [113.529580000000294, 73.33505], [113.96881, 73.59488], [115.56782, 73.75285], [118.776330000000215, 73.58772], [119.02, 73.12], [123.20066, 72.97122], [123.257770000000178, 73.73503], [125.380000000000166, 73.56], [126.97644, 73.56549], [128.59126, 73.03871], [129.05157, 72.39872], [128.46, 71.98], [129.715990000000204, 71.19304], [131.288580000000252, 70.786990000000102], [132.253500000000145, 71.8363], [133.857660000000294, 71.386420000000143], [135.56193, 71.655250000000123], [137.49755, 71.34763], [138.234090000000123, 71.62803], [139.86983, 71.487830000000116], [139.14791, 72.4161900000001], [140.46817, 72.849410000000134], [149.5, 72.2], [150.35118000000017, 71.60643], [152.96890000000019, 70.84222], [157.00688, 71.03141], [158.99779, 70.86672], [159.830310000000225, 70.45324], [159.70866, 69.72198], [160.94053000000028, 69.43728], [162.279070000000104, 69.64204], [164.05248, 69.66823], [165.940370000000172, 69.47199], [167.83567, 69.58269], [169.57763000000017, 68.6938], [170.816880000000253, 69.01363], [170.008200000000159, 69.65276], [170.453450000000259, 70.09703], [173.643910000000204, 69.81743], [175.72403000000017, 69.877250000000217], [178.6, 69.4], [180.000000000000114, 68.963636363636553], [180.000000000000114, 64.979708702198465], [179.99281, 64.97433], [178.707200000000199, 64.53493], [177.411280000000147, 64.60821], [178.313000000000187, 64.07593], [178.90825000000018, 63.251970000000128], [179.37034, 62.98262], [179.48636, 62.56894], [179.228250000000116, 62.304100000000133], [177.3643, 62.5219], [174.569290000000194, 61.76915], [173.68013, 61.65261], [172.15, 60.95], [170.6985, 60.33618], [170.330850000000282, 59.88177], [168.90046, 60.57355], [166.294980000000265, 59.7885500000002], [165.840000000000202, 60.16], [164.87674, 59.7316], [163.539290000000108, 59.86871], [163.217110000000218, 59.21101], [162.01733, 58.24328], [162.05297, 57.83912], [163.19191, 57.61503], [163.057940000000144, 56.159240000000111], [162.129580000000203, 56.12219], [161.70146, 55.285680000000148], [162.117490000000117, 54.85514], [160.368770000000325, 54.34433], [160.021730000000218, 53.20257], [158.530940000000157, 52.958680000000236], [158.23118, 51.94269], [156.789790000000266, 51.01105], [156.42000000000013, 51.7], [155.99182, 53.15895], [155.43366, 55.381030000000109], [155.914420000000291, 56.767920000000132], [156.75815, 57.3647], [156.81035, 57.83204], [158.364330000000166, 58.05575], [160.150640000000124, 59.314770000000109], [161.87204, 60.343000000000117], [163.66969, 61.1409], [164.473550000000103, 62.55061], [163.258420000000172, 62.46627], [162.65791, 61.6425], [160.12148, 60.54423], [159.30232, 61.77396], [156.72068, 61.43442], [154.218060000000293, 59.758180000000117], [155.04375, 59.14495], [152.81185, 58.88385], [151.265730000000246, 58.78089], [151.33815, 59.50396], [149.78371, 59.655730000000126], [148.54481, 59.16448], [145.48722, 59.33637], [142.197820000000121, 59.03998], [138.958480000000293, 57.08805], [135.12619, 54.72959], [136.70171, 54.603550000000112], [137.19342, 53.97732], [138.1647, 53.755010000000247], [138.80463, 54.25455], [139.90151, 54.189680000000166], [141.34531, 53.089570000000109], [141.37923, 52.23877], [140.59742000000017, 51.23967], [140.51308, 50.045530000000113], [140.061930000000189, 48.446710000000152], [138.554720000000202, 46.99965], [138.21971, 46.30795], [136.86232, 45.143500000000174], [135.515350000000183, 43.989], [134.869390000000237, 43.39821], [133.536870000000249, 42.81147], [132.90627, 42.79849], [132.278070000000241, 43.284560000000106], [130.935870000000136, 42.55274], [130.78, 42.220000000000191], [130.640000000000157, 42.395], [130.633866408409801, 42.903014634770543], [131.144687941614961, 42.929989732426932], [131.288555129115593, 44.111519680348252], [131.025190000000237, 44.96796], [131.883454217659562, 45.321161607436508], [133.097120000000189, 45.14409], [133.769643996313164, 46.116926988299149], [134.112350000000163, 47.212480000000127], [134.50081, 47.578450000000139], [135.026311476786759, 48.478229885443902], [133.373595819228001, 48.183441677434836], [132.506690000000106, 47.78896], [130.987260000000106, 47.79013], [130.582293328982644, 48.72968740497619], [129.397817824420486, 49.4406000840156], [127.657400000000351, 49.76027], [127.287455682484904, 50.739797268265434], [126.939156528837827, 51.353894151405896], [126.564399041856959, 51.784255479532689], [125.946348911646439, 52.792798570356936], [125.068211297710434, 53.161044826868924], [123.57147, 53.4588], [122.245747918793043, 53.431725979213681], [121.003084751470354, 53.251401068731226], [120.177088657716865, 52.753886216841195], [120.725789015791975, 52.516226304730893], [120.7382, 51.96411], [120.182080000000155, 51.64355], [119.27939, 50.58292], [119.288460728025839, 50.142882798861947], [117.87924441942647, 49.510983384797036], [116.67880089728618, 49.888531399121398], [115.485695428531415, 49.805177313834733], [114.962109816550353, 50.140247300815119], [114.362456496235325, 50.24830272073747], [112.897739699354361, 49.543565375356984], [111.581230910286649, 49.377968248077671], [110.662010532678835, 49.130128078805846], [109.402449171996707, 49.292960516957685], [108.475167270951275, 49.282547715850704], [107.868175897251092, 49.793705145865871], [106.888804152455293, 50.274295966180276], [105.886591424586868, 50.40601919209216], [104.62158, 50.275320000000157], [103.676545444760336, 50.08996613219513], [102.25589, 50.510560000000105], [102.06521, 51.25991], [100.889480421962631, 51.516855780638409], [99.981732212323564, 51.63400625264395], [98.861490513100492, 52.047366034546698], [97.82573978067451, 51.010995184933236], [98.231761509191699, 50.422400621128716], [97.259760000000199, 49.72605], [95.814020000000156, 49.977460000000114], [94.815949334698757, 50.01343333597088], [94.147566359435601, 50.480536607457161], [93.10421, 50.49529], [92.234711541719676, 50.802170722041737], [90.713667433640765, 50.331811835321098], [88.805566847695573, 49.470520738312459], [87.751264276076824, 49.297197984405543], [87.359970330762692, 49.214980780629148], [86.829356723989648, 49.826674709668133], [85.541269972682485, 49.69285858824815], [85.115559523462082, 50.117302964877631], [84.416377394553038, 50.311399644565817], [83.935114780618903, 50.889245510453563], [83.383003778012451, 51.069182847693881], [81.945985548839943, 50.812195949906325], [80.568446893235446, 51.388336493528435], [80.035559523441705, 50.864750881547209], [77.80091556184432, 53.404414984747532], [76.525179477854749, 54.177003485727127], [76.891100294913443, 54.490524400441913], [74.384820000000119, 53.546850000000113], [73.425678745420512, 53.489810289109741], [73.50851606638436, 54.035616766976588], [72.224150018202195, 54.376655381886778], [71.180131056609468, 54.133285224008247], [70.86526655465515, 55.169733588270091], [69.068166945272893, 55.385250149143488], [68.169100376258896, 54.970391750704366], [65.66687, 54.601250000000149], [65.178533563095939, 54.354227810272064], [61.436600000000126, 54.00625], [60.978066440683236, 53.664993394579128], [61.69998619980062, 52.979996446334255], [60.73999311711453, 52.719986477257734], [60.927268507740237, 52.447548326214999], [59.967533807215567, 51.96042043721566], [61.588003371024136, 51.272658799843171], [61.337424350840998, 50.799070136104248], [59.932807244715555, 50.842194118851822], [59.642282342370564, 50.545442206415707], [58.363320000000122, 51.06364], [56.77798, 51.04355], [55.71694, 50.621710000000142], [54.532878452376181, 51.026239732459359], [52.328723585831042, 51.718652248738088], [50.766648390512174, 51.692762356159861], [48.702381626181044, 50.605128485712825], [48.577841424357601, 49.87475962991563], [47.549480421749379, 50.454698391311119], [46.751596307162764, 49.356005764353725], [47.043671502476585, 49.152038886097571], [46.466445753776291, 48.394152330104923], [47.315240000000152, 47.71585], [48.05725, 47.74377], [48.694733514201872, 47.075628160177885], [48.59325000000014, 46.56104], [49.101160000000121, 46.39933], [48.645410000000105, 45.80629], [47.67591, 45.641490000000111], [46.68201, 44.6092], [47.59094, 43.660160000000118], [47.49252, 42.98658], [48.58437000000017, 41.80888], [47.987283156126033, 41.405819200194387], [47.815665724484653, 41.151416124021338], [47.373315464066387, 41.219732367511135], [46.686070591016708, 41.827137152669899], [46.404950799348924, 41.860675157227426], [45.7764, 42.092440000000224], [45.470279168485909, 42.502780666670041], [44.537622918482057, 42.711992702803677], [43.93121, 42.554960000000101], [43.755990000000182, 42.74083], [42.394400000000154, 43.2203], [40.922190000000128, 43.382150000000131], [40.076964959479838, 43.553104153002486], [39.95500857927108, 43.434997666999287], [38.68, 44.28], [37.539120000000104, 44.65721], [36.675460000000122, 45.24469], [37.40317, 45.40451], [38.23295, 46.24087], [37.67372, 46.63657], [39.14767, 47.044750000000128], [39.121200000000123, 47.26336], [38.22353803889947, 47.102189846375971], [38.2551123390298, 47.546400458356956], [38.77057, 47.825620000000228], [39.738277622238982, 47.898937079452068], [39.895620000000136, 48.23241], [39.67465, 48.783820000000127], [40.080789015469477, 49.307429917999364], [40.069040000000108, 49.60105], [38.594988234213552, 49.926461900423718], [38.010631137857068, 49.915661526074715], [37.393459506995228, 50.383953355503664], [36.626167840325387, 50.225590928745127], [35.35611616388811, 50.577197374059139], [35.37791, 50.77394], [35.02218305841793, 51.207572333371495], [34.224815708154402, 51.255993150428921], [34.141978387190612, 51.56641347920619], [34.391730584457228, 51.768881740925892], [33.75269982273587, 52.335074571331646], [32.715760532367163, 52.238465481162159], [32.412058139787767, 52.288694973349763], [32.15944000000021, 52.061250000000101], [31.78597, 52.10168], [31.540018344862254, 52.742052313846429], [31.305200636527978, 53.073995876673301], [31.49764, 53.167430000000124], [32.304519484188368, 53.132726141972839], [32.693643019346119, 53.351420803432141], [32.405598585751157, 53.618045355842], [31.731272820774585, 53.794029446012011], [31.791424187962399, 53.974638576872181], [31.384472283663818, 54.157056382862365], [30.757533807098774, 54.811770941784388], [30.971835971813245, 55.08154775656412], [30.873909132620064, 55.55097646750351], [29.896294386522435, 55.789463202530484], [29.371571893030783, 55.670090643936263], [29.229513380660389, 55.918344224666399], [28.176709425577933, 56.169129950578778], [27.855282016722519, 56.759326483784363], [27.770015903440985, 57.244258124411189], [27.288184848751648, 57.474528306703903], [27.716685825315771, 57.791899115624439], [27.420150000000202, 58.724570000000128], [28.131699253051856, 59.300825100330982], [27.98112, 59.47537], [29.1177, 60.028050000000107], [28.07, 60.503520000000137], [30.211107212044645, 61.780027777749673], [31.139991082491029, 62.357692776124431], [31.516092156711263, 62.867687486412898], [30.035872430142796, 63.552813625738551], [30.444684686003736, 64.204453436939062], [29.544429559047014, 64.948671576590542], [30.21765, 65.80598], [29.054588657352376, 66.944286200622017], [29.977426385220689, 67.69829702419274], [28.445943637818765, 68.364612942163987], [28.591929559043358, 69.064776923286686], [29.39955, 69.15692000000017], [31.101080000000103, 69.55811], [32.132720000000255, 69.905950000000232], [33.77547, 69.301420000000107], [36.51396, 69.06342], [40.292340000000159, 67.9324], [41.059870000000124, 67.457130000000106], [41.125950000000174, 66.79158000000011], [40.01583, 66.266180000000119], [38.38295, 65.99953], [33.918710000000168, 66.75961], [33.18444, 66.63253], [34.81477, 65.900150000000124], [34.87857425307876, 65.436212877048192], [34.943910000000152, 64.414370000000147], [36.23129, 64.10945], [37.012730000000111, 63.84983], [37.141970000000143, 64.33471], [36.539579035089801, 64.76446], [37.176040000000135, 65.143220000000113], [39.59345, 64.520790000000162], [40.4356, 64.76446], [39.762600000000148, 65.49682], [42.09309, 66.47623], [43.01604000000011, 66.41858], [43.94975000000013, 66.06908], [44.53226, 66.756340000000122], [43.69839, 67.35245], [44.187950000000136, 67.95051], [43.45282, 68.57079], [46.250000000000135, 68.25], [46.821340000000156, 67.68997], [45.55517, 67.56652], [45.56202, 67.010050000000192], [46.349150000000137, 66.66767], [47.894160000000248, 66.884550000000146], [48.13876, 67.52238], [50.227660000000142, 67.998670000000132], [53.717430000000164, 68.85738], [54.47171, 68.80815], [53.485820000000118, 68.20131], [54.72628, 68.09702], [55.442680000000124, 68.43866], [57.317020000000149, 68.46628], [58.802000000000206, 68.88082], [59.941420000000178, 68.27844], [61.077840000000165, 68.94069], [60.03, 69.52], [60.55, 69.85], [63.504000000000147, 69.54739], [64.888115, 69.234835000000132], [68.512160000000108, 68.09233000000016], [69.18068, 68.61563000000011], [68.16444, 69.14436], [68.13522, 69.35649], [66.930080000000103, 69.454610000000102], [67.25976, 69.92873], [66.724920000000125, 70.708890000000125], [66.69466, 71.028970000000228], [68.540060000000111, 71.934500000000227], [69.19636, 72.843360000000146], [69.94, 73.04000000000012], [72.58754, 72.77629], [72.79603, 72.22006], [71.84811, 71.40898], [72.47011, 71.09019], [72.79188, 70.39114], [72.564700000000201, 69.02085], [73.66787, 68.4079], [73.2387, 67.7404], [71.280000000000101, 66.320000000000149], [72.423010000000147, 66.172670000000167], [72.82077, 66.53267], [73.920990000000131, 66.789460000000119], [74.186510000000183, 67.28429], [75.052, 67.760470000000154], [74.469260000000148, 68.32899], [74.93584, 68.98918], [73.84236, 69.07146], [73.601870000000204, 69.62763], [74.3998, 70.63175], [73.1011, 71.447170000000241], [74.890820000000204, 72.12119], [74.65926, 72.83227], [75.158010000000175, 72.854970000000108], [75.68351, 72.300560000000118], [75.288980000000109, 71.33556], [76.35911, 71.152870000000135], [75.903130000000161, 71.87401], [77.5766500000001, 72.26717], [79.652020000000107, 72.32011], [81.5, 71.75], [80.61071, 72.582850000000107], [80.51109, 73.6482], [82.25, 73.85], [84.65526, 73.805910000000154], [86.822300000000226, 73.93688], [86.00956, 74.459670000000145], [87.166820000000143, 75.11643], [88.31571, 75.14393], [90.26, 75.64], [92.90058, 75.77333], [93.234210000000132, 76.0472], [95.860000000000127, 76.14], [96.67821, 75.91548], [98.922540000000197, 76.44689], [100.759670000000199, 76.43028], [101.03532, 76.86189], [101.990840000000105, 77.287540000000192], [104.3516, 77.69792], [106.066640000000135, 77.37389], [104.705000000000211, 77.1274], [106.970130000000111, 76.97419]]], [[[105.07547, 78.30689], [99.43814, 77.921], [101.2649, 79.23399], [102.08635, 79.34641], [102.837815, 79.28129], [105.37243, 78.71334], [105.07547, 78.30689]]], [[[51.136186557831266, 80.54728017854093], [49.793684523320692, 80.415427761548202], [48.894411248577526, 80.33956675894369], [48.75493655782175, 80.175468248200829], [47.586119012244147, 80.010181179515328], [46.502825962109647, 80.247246812654339], [47.072455275262897, 80.559424140129451], [44.846958042181107, 80.589809882317169], [46.799138624871226, 80.771917629713627], [48.31847741068465, 80.784009914869927], [48.52280602396668, 80.514568996900138], [49.097189568890897, 80.753985907708412], [50.039767693894603, 80.918885403151791], [51.522932977103679, 80.699725653801906], [51.136186557831266, 80.54728017854093]]], [[[99.93976, 78.88094], [97.75794, 78.7562], [94.97259, 79.044745], [93.31288, 79.4265], [92.5454, 80.14379], [91.18107, 80.34146], [93.77766, 81.0246], [95.940895, 81.2504], [97.88385, 80.746975], [100.186655, 79.780135], [99.93976, 78.88094]]]] } }, + { "type": "Feature", "properties": { "admin": "Rwanda", "name": "Rwanda", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[30.419104852019235, -1.134659112150416], [30.816134881317705, -1.698914076345388], [30.758308953583104, -2.287250257988368], [30.469696079232978, -2.413857517103458], [29.938359002407935, -2.348486830254238], [29.632176141078585, -2.917857761246096], [29.02492638521678, -2.839257907730157], [29.117478875451546, -2.292211195488384], [29.254834832483336, -2.215109958508911], [29.29188683443661, -1.620055840667987], [29.579466180140876, -1.341313164885626], [29.821518588996003, -1.443322442229785], [30.419104852019235, -1.134659112150416]]] } }, + { "type": "Feature", "properties": { "admin": "Western Sahara", "name": "W. Sahara", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-8.794883999049075, 27.120696316022503], [-8.81782833498667, 27.656425889592349], [-8.665589565454805, 27.656425889592349], [-8.66512447756419, 27.58947907155822], [-8.684399786809051, 27.395744126895998], [-8.687293667017398, 25.881056219988899], [-11.969418911171159, 25.933352769468261], [-11.93722449385332, 23.374594224536164], [-12.874221564169574, 23.284832261645171], [-13.118754441774708, 22.771220201096249], [-12.929101935263528, 21.327070624267559], [-16.845193650773989, 21.333323472574875], [-17.063423224342568, 20.99975210213082], [-17.020428432675736, 21.422310288981475], [-17.002961798561085, 21.420734157796574], [-14.750954555713532, 21.50060008390366], [-14.630832688851068, 21.860939846274899], [-14.221167771857251, 22.310163072188153], [-13.891110398809044, 23.691009019459297], [-12.500962693725368, 24.770116278578193], [-12.030758836301613, 26.030866197203036], [-11.718219773800353, 26.104091701760616], [-11.392554897496977, 26.883423977154358], [-10.551262579785272, 26.990807603456879], [-10.18942420087758, 26.860944729107398], [-9.735343390328877, 26.860944729107398], [-9.413037482124464, 27.088476060488514], [-8.794883999049075, 27.120696316022503]]] } }, + { "type": "Feature", "properties": { "admin": "Saudi Arabia", "name": "Saudi Arabia", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[42.779332309750963, 16.34789134364868], [42.64957278826607, 16.77463532151496], [42.347989129410706, 17.075805568911996], [42.270887892431219, 17.474721787989122], [41.754381951673949, 17.833046169500971], [41.221391229015573, 18.671599636301206], [40.939341261566533, 19.486485297111752], [40.247652215339819, 20.174634507726488], [39.801684604660934, 20.338862209550054], [39.139399448408277, 21.29190481209293], [39.023695916506782, 21.986875311770191], [39.066328973147577, 22.579655666590263], [38.492772251140075, 23.688451036060851], [38.023860304523616, 24.078685614512928], [37.483634881344379, 24.285494696545008], [37.154817742671177, 24.858482977797301], [37.209491408035994, 25.084541530858104], [36.931627231602583, 25.602959499610172], [36.639603712721218, 25.826227525327219], [36.249136590323808, 26.570135606384873], [35.640181512196385, 27.376520494083415], [35.130186801907875, 28.063351955674712], [34.632336053207972, 28.058546047471559], [34.787778761541936, 28.607427273059692], [34.832220493312938, 28.957483425404838], [34.956037225084252, 29.356554673778835], [36.068940870922049, 29.19749461518445], [36.501214227043583, 29.505253607698702], [36.740527784987243, 29.865283311476183], [37.503581984209028, 30.003776150018396], [37.668119744626374, 30.338665269485894], [37.998848911294367, 30.508499864213128], [37.002165561681004, 31.508412990844736], [39.004885695152545, 32.010216986614971], [39.195468377444961, 32.16100881604266], [40.399994337736238, 31.889991766887931], [41.889980910007829, 31.190008653278362], [44.709498732284736, 29.178891099559376], [46.568713413281742, 29.099025173452283], [47.459821811722819, 29.002519436147217], [47.708850538937376, 28.526062730416136], [48.416094191283939, 28.552004299426663], [48.807594842327163, 27.689627997339876], [49.299554477745815, 27.461218166609804], [49.470913527225647, 27.109999294538078], [50.152422316290874, 26.689663194275994], [50.212935418504671, 26.277026882425371], [50.113303257045928, 25.943972276304248], [50.23985883972874, 25.608049628190923], [50.527386509000728, 25.327808335872099], [50.660556675016885, 24.999895534764018], [50.810108270069563, 24.754742539971371], [51.112415398977006, 24.556330878186721], [51.389607781790623, 24.627385972588051], [51.579518670463258, 24.245497137951102], [51.617707553926969, 24.014219265228824], [52.000733270074321, 23.001154486578937], [55.006803012924898, 22.496947536707129], [55.208341098863187, 22.708329982997039], [55.666659376859812, 22.000001125572336], [54.999981723862355, 19.999994004796104], [52.000009800022227, 19.000003363516054], [49.116671583864857, 18.616667588774941], [48.183343540241324, 18.166669216377311], [47.466694777217626, 17.116681626854877], [47.000004917189749, 16.949999294497438], [46.749994337761642, 17.283338120996174], [46.366658563020529, 17.233315334537632], [45.399999220568752, 17.333335069238554], [45.216651238797184, 17.43332896572333], [44.062613152855072, 17.410358791569589], [43.791518589051904, 17.319976711491105], [43.380794305196098, 17.579986680567668], [43.115797560403351, 17.088440456607369], [43.218375278502734, 16.666889960186406], [42.779332309750963, 16.34789134364868]]] } }, + { "type": "Feature", "properties": { "admin": "Sudan", "name": "Sudan", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[33.963392794971178, 9.464285229420623], [33.824963480907506, 9.48406084571536], [33.842130853028145, 9.981914637215992], [33.721959248183097, 10.325262079630191], [33.206938084561777, 10.720111638406591], [33.086766479716729, 11.441141267476493], [33.206938084561777, 12.179338268667093], [32.743419037302537, 12.24800775714999], [32.674749548819641, 12.024831919580716], [32.073891524594778, 11.973329803218517], [32.314234734284746, 11.681484477166519], [32.400071594888338, 11.080626452941486], [31.850715687025509, 10.531270545078822], [31.352861895524875, 9.810240916008693], [30.837840731903377, 9.707236683284519], [29.996639497988546, 10.290927335388684], [29.618957311332842, 10.084918869940223], [29.515953078608607, 9.793073543888053], [29.000931914987166, 9.604232450560287], [28.966597170745779, 9.398223985111654], [27.970889587744345, 9.398223985111654], [27.833550610778783, 9.604232450560287], [27.112520981708876, 9.638567194801622], [26.752006167173811, 9.466893473594492], [26.477328213242508, 9.552730334198086], [25.96230704962101, 10.136420986302422], [25.790633328413943, 10.411098940233726], [25.069603699343979, 10.27375996326799], [24.79492574541268, 9.810240916008693], [24.537415163602017, 8.917537565731719], [24.194067721187643, 8.728696472403895], [23.886979580860665, 8.619729712933063], [23.805813429466745, 8.666318874542522], [23.459012892355979, 8.954285793489019], [23.394779087017291, 9.26506785729225], [23.557249790142915, 9.681218166538766], [23.554304233502187, 10.089255275915319], [22.977543572692749, 10.714462591998538], [22.864165480244246, 11.142395127807616], [22.87622, 11.384610000000119], [22.50869, 11.67936], [22.49762, 12.26024], [22.28801, 12.64605], [21.93681, 12.588180000000133], [22.03759, 12.95546], [22.29658, 13.37232], [22.18329, 13.78648], [22.51202, 14.09318], [22.30351, 14.32682], [22.567950000000106, 14.944290000000134], [23.02459, 15.68072], [23.886890000000101, 15.61084], [23.837660000000135, 19.580470000000101], [23.850000000000129, 20.0], [25.00000000000011, 20.00304], [25.00000000000011, 22.0], [29.02, 22.0], [32.9, 22.0], [36.86623, 22.0], [37.18872, 21.01885], [36.96941, 20.837440000000125], [37.114700000000134, 19.80796], [37.48179, 18.61409], [37.86276, 18.36786], [38.410089959473218, 17.998307399970312], [37.904000000000103, 17.42754], [37.16747, 17.263140000000128], [36.852530000000108, 16.95655], [36.75389, 16.29186], [36.32322, 14.82249], [36.42951, 14.42211], [36.27022, 13.563330000000118], [35.86363, 12.57828], [35.26049, 12.08286], [34.831630000000125, 11.318960000000116], [34.73115000000012, 10.910170000000106], [34.25745, 10.63009], [33.96162, 9.58358], [33.963392794971178, 9.464285229420623]]] } }, + { "type": "Feature", "properties": { "admin": "South Sudan", "name": "S. Sudan", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[33.963392794971178, 9.464285229420623], [33.97498, 8.68456], [33.82550000000014, 8.37916], [33.294800000000116, 8.35458], [32.95418, 7.7849700000001], [33.56829, 7.71334], [34.0751, 7.22595], [34.25032, 6.82607], [34.70702, 6.59422000000012], [35.298007118233095, 5.506], [34.620196267853935, 4.847122742082034], [34.005, 4.249884947362147], [33.39, 3.79], [32.68642, 3.79232], [31.881450000000136, 3.55827], [31.24556, 3.7819], [30.83385, 3.50917], [29.95349, 4.1737], [29.715995314256013, 4.600804755060152], [29.159078403446635, 4.389267279473244], [28.696677687298795, 4.455077215996993], [28.428993768026992, 4.287154649264607], [27.979977247842946, 4.408413397637388], [27.374226108517625, 5.233944403500173], [27.213409051225248, 5.550953477394613], [26.465909458123289, 5.946717434101855], [26.213418409945113, 6.546603298362127], [25.796647983511257, 6.979315904158169], [25.124130893664805, 7.500085150579422], [25.114932488716867, 7.825104071479244], [24.567369012152191, 8.229187933785452], [23.886979580860665, 8.619729712933063], [24.194067721187643, 8.728696472403895], [24.537415163602017, 8.917537565731719], [24.79492574541268, 9.810240916008693], [25.069603699343979, 10.27375996326799], [25.790633328413943, 10.411098940233726], [25.96230704962101, 10.136420986302422], [26.477328213242508, 9.552730334198086], [26.752006167173811, 9.466893473594492], [27.112520981708876, 9.638567194801622], [27.833550610778783, 9.604232450560287], [27.970889587744345, 9.398223985111654], [28.966597170745779, 9.398223985111654], [29.000931914987166, 9.604232450560287], [29.515953078608607, 9.793073543888053], [29.618957311332842, 10.084918869940223], [29.996639497988546, 10.290927335388684], [30.837840731903377, 9.707236683284519], [31.352861895524875, 9.810240916008693], [31.850715687025509, 10.531270545078822], [32.400071594888338, 11.080626452941486], [32.314234734284746, 11.681484477166519], [32.073891524594778, 11.973329803218517], [32.674749548819641, 12.024831919580716], [32.743419037302537, 12.24800775714999], [33.206938084561777, 12.179338268667093], [33.086766479716729, 11.441141267476493], [33.206938084561777, 10.720111638406591], [33.721959248183097, 10.325262079630191], [33.842130853028145, 9.981914637215992], [33.824963480907506, 9.48406084571536], [33.963392794971178, 9.464285229420623]]] } }, + { "type": "Feature", "properties": { "admin": "Senegal", "name": "Senegal", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-16.713728807023468, 13.594958604379853], [-17.126106736712611, 14.373515733289221], [-17.625042690490655, 14.72954051356407], [-17.185172898822227, 14.91947724045286], [-16.700706346085919, 15.621527411354107], [-16.463098110407881, 16.135036119038457], [-16.120690070041928, 16.45566254319338], [-15.623666144258689, 16.369337063049809], [-15.135737270558813, 16.587282416240779], [-14.577347581428977, 16.598263658102805], [-14.099521450242175, 16.304302273010489], [-13.43573767745306, 16.039383042866188], [-12.830658331747513, 15.303691514542942], [-12.170750291380299, 14.616834214735503], [-12.124887457721256, 13.994727484589784], [-11.927716030311613, 13.422075100147392], [-11.553397793005427, 13.141213690641063], [-11.467899135778522, 12.754518947800973], [-11.513942836950587, 12.442987575729415], [-11.658300950557928, 12.386582749882834], [-12.20356482588563, 12.465647691289401], [-12.278599005573438, 12.354440008997285], [-12.499050665730561, 12.332089952031053], [-13.217818162478235, 12.575873521367964], [-13.700476040084322, 12.586182969610192], [-15.548476935274005, 12.628170070847343], [-15.816574266004251, 12.515567124883345], [-16.147716844130581, 12.547761542201185], [-16.67745195155457, 12.38485158940105], [-16.84152462408127, 13.151393947802557], [-15.931295945692208, 13.130284125211331], [-15.691000535534991, 13.270353094938455], [-15.511812506562931, 13.278569647672864], [-15.141163295949463, 13.509511623585235], [-14.712197231494626, 13.298206691943774], [-14.277701788784553, 13.28058502853224], [-13.844963344772404, 13.505041612191999], [-14.046992356817478, 13.794067898000446], [-14.376713833055785, 13.625680243377371], [-14.687030808968483, 13.63035696049978], [-15.081735398813816, 13.876491807505982], [-15.398770310924457, 13.860368760630916], [-15.624596320039936, 13.623587347869556], [-16.713728807023468, 13.594958604379853]]] } }, + { "type": "Feature", "properties": { "admin": "Solomon Islands", "name": "Solomon Is.", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[162.119024693040842, -10.482719008021133], [162.398645868172196, -10.826367282762119], [161.700032180018354, -10.820011081590222], [161.319796991214702, -10.204751478723123], [161.917383254237933, -10.446700534713653], [162.119024693040842, -10.482719008021133]]], [[[160.852228631837903, -9.872937106977002], [160.462588332357228, -9.89520964929484], [159.849447463214176, -9.794027194867367], [159.640002883135139, -9.639979750205269], [159.70294477766663, -9.242949720906777], [160.362956170898428, -9.400304457235533], [160.688517694337179, -9.610162448772808], [160.852228631837903, -9.872937106977002]]], [[[161.679981724289121, -9.599982191611373], [161.52939660059053, -9.784312025596433], [160.788253208660507, -8.917543226764918], [160.579997186524338, -8.320008640173965], [160.92002811100491, -8.320008640173965], [161.280006138349961, -9.120011488484449], [161.679981724289121, -9.599982191611373]]], [[[159.875027297198585, -8.337320244991714], [159.917401971677975, -8.538289890174864], [159.133677199539335, -8.114181410355398], [158.586113722974687, -7.754823500197713], [158.211149530264834, -7.421872246941147], [158.359977655265425, -7.320017998893915], [158.820001255527671, -7.56000335045739], [159.640002883135139, -8.020026950719567], [159.875027297198585, -8.337320244991714]]], [[[157.53842573468927, -7.347819919466928], [157.339419793933217, -7.404767347852554], [156.902030471014768, -7.176874281445391], [156.491357863591304, -6.765943291860394], [156.542827590153934, -6.599338474151478], [157.140000441718882, -7.021638278840653], [157.53842573468927, -7.347819919466928]]]] } }, + { "type": "Feature", "properties": { "admin": "Sierra Leone", "name": "Sierra Leone", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-11.438779466182053, 6.785916856305746], [-11.708194545935736, 6.860098374860724], [-12.428098924193815, 7.262942002792029], [-12.949049038128193, 7.798645738145736], [-13.124025437868479, 8.163946438016977], [-13.246550258832512, 8.903048610871506], [-12.711957566773076, 9.342711696810765], [-12.596719122762206, 9.620188300001969], [-12.425928514037562, 9.835834051955953], [-12.150338100625003, 9.858571682164378], [-11.917277390988655, 10.046983954300556], [-11.117481248407328, 10.045872911006283], [-10.839151984083299, 9.688246161330367], [-10.622395188835037, 9.267910061068276], [-10.65477047366589, 8.977178452994194], [-10.494315151399629, 8.715540676300433], [-10.505477260774667, 8.348896389189603], [-10.230093553091276, 8.406205552601291], [-10.695594855176477, 7.939464016141085], [-11.14670427086838, 7.396706447779534], [-11.199801805048278, 7.105845648624735], [-11.438779466182053, 6.785916856305746]]] } }, + { "type": "Feature", "properties": { "admin": "El Salvador", "name": "El Salvador", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-87.793111131526558, 13.384480495655051], [-87.904112108089507, 13.149016831917134], [-88.483301561216791, 13.163951320849488], [-88.843227912129692, 13.259733588102474], [-89.256742723329282, 13.4585328231293], [-89.812393561547637, 13.520622056527994], [-90.095554572290951, 13.73533763270073], [-90.064677903996568, 13.881969509328924], [-89.7219339668207, 14.134228013561694], [-89.5342193265205, 14.244815578666302], [-89.587342698916544, 14.362586167859485], [-89.353325975282772, 14.424132798719112], [-89.058511929057644, 14.340029405164085], [-88.843072882832814, 14.140506700085169], [-88.541230841815974, 13.980154730683475], [-88.50399797234968, 13.845485948130854], [-88.065342576840123, 13.964625962779774], [-87.859515347021585, 13.893312486216979], [-87.723502977229387, 13.785050360565503], [-87.793111131526558, 13.384480495655051]]] } }, + { "type": "Feature", "properties": { "admin": "Somaliland", "name": "Somaliland", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[48.938129510296491, 9.451748968946672], [48.486735874226994, 8.837626247589979], [47.78942, 8.003], [46.948328484897942, 7.996876532417386], [43.67875, 9.183580000000116], [43.296975132018744, 9.540477403191742], [42.92812, 10.021940000000139], [42.55876, 10.572580000000126], [42.776851841000948, 10.926878566934416], [43.145304803242126, 11.462039699748853], [43.470659620951658, 11.27770986576388], [43.666668328634834, 10.864169216348158], [44.117803582542805, 10.445538438351603], [44.614259067570849, 10.442205308468941], [45.556940545439133, 10.698029486529775], [46.645401238802997, 10.816549383991171], [47.525657586462778, 11.127228094929986], [48.021596307167769, 11.193063869669741], [48.378783807169263, 11.375481675660122], [48.948206414593457, 11.410621649618516], [48.942005242718423, 11.394266058798163], [48.938491245322595, 10.982327378783451], [48.938232863161076, 9.973500067581481], [48.938129510296491, 9.451748968946672]]] } }, + { "type": "Feature", "properties": { "admin": "Somalia", "name": "Somalia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[49.72862, 11.5789], [50.25878, 11.67957], [50.73202, 12.0219], [51.1112, 12.02464], [51.13387, 11.74815], [51.04153, 11.16651], [51.04531, 10.6409], [50.83418, 10.27972], [50.55239, 9.19874], [50.07092, 8.08173], [49.4527, 6.80466], [48.59455, 5.33911], [47.74079, 4.2194], [46.56476, 2.85529], [45.56399, 2.04576], [44.06815, 1.05283], [43.13597, 0.2922], [42.04157, -0.91916], [41.81095, -1.44647], [41.58513, -1.68325], [40.993, -0.85829], [40.98105, 2.78452], [41.855083092643966, 3.918911920483726], [42.12861, 4.23413], [42.76967, 4.25259], [43.66087, 4.95755], [44.9636, 5.00162], [47.78942, 8.003], [48.486735874226937, 8.837626247589993], [48.938129510296442, 9.451748968946616], [48.938232863161026, 9.973500067581508], [48.938491245322481, 10.982327378783465], [48.942005242718345, 11.394266058798136], [48.948204758509732, 11.410617281697961], [49.26776, 11.43033], [49.72862, 11.5789]]] } }, + { "type": "Feature", "properties": { "admin": "Republic of Serbia", "name": "Serbia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[20.874312778413408, 45.416375433934306], [21.483526238702204, 45.181170152357865], [21.562022739353718, 44.768947251965635], [22.145087924902892, 44.478422349620573], [22.459022251075961, 44.702517198254426], [22.705725538837434, 44.578002834647002], [22.47400841644065, 44.409227606781762], [22.657149692483067, 44.234923000661347], [22.410446404721593, 44.008063462900047], [22.500156691180219, 43.642814439460999], [22.986018507588479, 43.211161200527094], [22.604801466571352, 42.898518785161109], [22.43659467946139, 42.580321153323943], [22.545011834409642, 42.461362006188025], [22.380525750424674, 42.320259507815074], [21.917080000000105, 42.30364], [21.576635989402117, 42.245224397061847], [21.54332, 42.32025], [21.66292, 42.43922], [21.77505, 42.6827], [21.63302, 42.67717], [21.43866, 42.86255], [21.27421, 42.90959], [21.143395, 43.068685000000123], [20.95651, 43.13094], [20.81448, 43.27205], [20.63508, 43.21671], [20.49679, 42.88469], [20.25758, 42.81275], [20.3398, 42.89852], [19.95857, 43.10604], [19.63, 43.213779970270522], [19.48389, 43.35229], [19.21852, 43.52384], [19.454, 43.568100000000115], [19.59976, 44.03847], [19.11761, 44.42307], [19.36803, 44.863], [19.00548, 44.86023], [19.390475701584588, 45.236515611342369], [19.072768995854172, 45.521511135432078], [18.82982, 45.90888], [19.596044549241636, 46.171729844744547], [20.22019249846289, 46.127468980486569], [20.76217492033998, 45.734573065771478], [20.874312778413408, 45.416375433934306]]] } }, + { "type": "Feature", "properties": { "admin": "Suriname", "name": "Suriname", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-57.147436489476874, 5.973149929219161], [-55.949318406789786, 5.772877915872], [-55.841779751190408, 5.953125311706059], [-55.033250291551759, 6.025291449401662], [-53.958044603070888, 5.756548163267764], [-54.478632981979224, 4.896755682795585], [-54.3995422023565, 4.212611395683466], [-54.006930508018996, 3.620037746592558], [-54.181726040246261, 3.189779771330421], [-54.269705166223183, 2.732391669115046], [-54.524754197799709, 2.311848863123785], [-55.097587449755125, 2.523748073736612], [-55.569755011605984, 2.42150625244713], [-55.973322109589361, 2.510363877773016], [-56.073341844290283, 2.220794989425499], [-55.905600145070871, 2.021995754398659], [-55.995698004771739, 1.817667141116601], [-56.53938574891454, 1.89952260986692], [-57.150097825739898, 2.768926906745406], [-57.281433478409703, 3.333491929534119], [-57.601568976457848, 3.334654649260684], [-58.044694383360664, 4.060863552258382], [-57.860209520078691, 4.576801052260449], [-57.914288906472123, 4.812626451024413], [-57.307245856339492, 5.073566595882225], [-57.147436489476874, 5.973149929219161]]] } }, + { "type": "Feature", "properties": { "admin": "Slovakia", "name": "Slovakia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[18.85314415861361, 49.496229763377634], [18.909574822676316, 49.435845852244562], [19.320712517990469, 49.571574001659179], [19.825022820726865, 49.217125352569219], [20.415839471119849, 49.431453355499755], [20.887955356538406, 49.328772284535823], [21.607808058364206, 49.470107326854077], [22.558137648211751, 49.08573802346713], [22.280841912533553, 48.825392157580659], [22.085608351334848, 48.422264309271782], [21.872236362401729, 48.319970811550007], [20.801293979584919, 48.62385407164237], [20.473562045989862, 48.562850043321809], [20.239054396249344, 48.327567247096916], [19.769470656013109, 48.2026911484636], [19.66136355965849, 48.266614895208647], [19.174364861739885, 48.111378892603859], [18.777024773847668, 48.081768296900627], [18.696512892336923, 47.88095368101439], [17.857132602620023, 47.758428860050365], [17.488472934649813, 47.867466132186209], [16.979666782304033, 48.123497015976298], [16.879982944412998, 48.470013332709463], [16.960288120194573, 48.596982326850593], [17.101984897538895, 48.8169688991171], [17.545006951577101, 48.800019029325362], [17.886484816161808, 48.903475246773695], [17.913511590250462, 48.996492824899072], [18.104972771891848, 49.043983466175298], [18.170498488037961, 49.271514797556421], [18.399993523846174, 49.315000515330034], [18.554971144289478, 49.495015367218777], [18.85314415861361, 49.496229763377634]]] } }, + { "type": "Feature", "properties": { "admin": "Slovenia", "name": "Slovenia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[13.806475457421524, 46.509306138691201], [14.632471551174827, 46.431817328469535], [15.137091912504982, 46.658702704447016], [16.011663852612653, 46.683610744811688], [16.202298211337361, 46.852385972676949], [16.370504998447412, 46.841327216166498], [16.564808383864854, 46.503750922219822], [15.768732944408548, 46.238108222023442], [15.671529575267552, 45.834153550797865], [15.323953891672403, 45.731782538427673], [15.327674594797424, 45.452316392593218], [14.935243767972931, 45.471695054702671], [14.595109490627804, 45.6349409043127], [14.411968214585411, 45.466165676447446], [13.715059848697221, 45.500323798192369], [13.937630242578305, 45.591015936864608], [13.698109978905475, 46.016778062517339], [13.806475457421524, 46.509306138691201]]] } }, + { "type": "Feature", "properties": { "admin": "Sweden", "name": "Sweden", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[22.183173455501922, 65.723740546320158], [21.213516879977213, 65.02600535751526], [21.369631381930954, 64.413587958424273], [19.778875766690216, 63.609554348395022], [17.847779168375208, 62.749400132896803], [17.11955488451812, 61.341165676510954], [17.831346062906388, 60.636583360427394], [18.787721795332086, 60.081914374422581], [17.869224887776337, 58.95376618105869], [16.829185011470084, 58.719826972073385], [16.44770958829147, 57.041118069071871], [15.87978559740378, 56.104301866268649], [14.666681349352071, 56.20088511822216], [14.100721062891461, 55.407781073622637], [12.942910597392054, 55.361737372450563], [12.625100538797025, 56.307080186581956], [11.787942335668671, 57.441817125063061], [11.027368605196866, 58.856149400459344], [11.468271925511145, 59.432393296946024], [12.300365838274896, 60.117932847730025], [12.631146681375181, 61.293571682370121], [11.992064243221559, 61.800362453856543], [11.930569288794228, 63.128317572676963], [12.57993533697393, 64.066218980558318], [13.571916131248711, 64.049114081469696], [13.9199052263022, 64.445420640716065], [13.555689731509087, 64.7870276963815], [15.108411492582999, 66.19386688909546], [16.108712192456775, 67.302455552836875], [16.768878614985478, 68.013936672631388], [17.729181756265344, 68.010551866316263], [17.993868442464329, 68.567391262477344], [19.878559604581248, 68.407194322372561], [20.025268995857882, 69.065138658312691], [20.645592889089521, 69.106247260200846], [21.978534783626113, 68.616845608180682], [23.539473097434435, 67.936008612735236], [23.565879754335576, 66.396050930437411], [23.903378533633795, 66.006927395279604], [22.183173455501922, 65.723740546320158]]] } }, + { "type": "Feature", "properties": { "admin": "Swaziland", "name": "Swaziland", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[32.071665480281062, -26.733820082304902], [31.868060337051073, -27.17792734142127], [31.282773064913325, -27.285879408478991], [30.685961948374477, -26.743845310169526], [30.676608514129633, -26.398078301704604], [30.949666782359905, -26.022649021104144], [31.044079624157146, -25.731452325139436], [31.333157586397899, -25.660190525008943], [31.837777947728057, -25.843331801051342], [31.985779249811962, -26.29177988048022], [32.071665480281062, -26.733820082304902]]] } }, + { "type": "Feature", "properties": { "admin": "Syria", "name": "Syria", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[38.792340529136077, 33.378686428352218], [36.834062127435537, 32.312937526980768], [35.719918247222743, 32.709192409794859], [35.700797967274745, 32.716013698857374], [35.836396925608618, 32.868123277308506], [35.821100701650231, 33.277426459276292], [36.066460402172048, 33.824912421192543], [36.611750115715886, 34.201788641897174], [36.448194207512095, 34.59393524834406], [35.998402540843628, 34.644914048799997], [35.905023227692219, 35.410009467097318], [36.149762811026527, 35.821534735653664], [36.417550083163029, 36.040616970355053], [36.685389031731795, 36.259699205056457], [36.739494256341395, 36.817520453431079], [37.066761102045824, 36.623036200500614], [38.167727492024191, 36.901210435527766], [38.699891391765895, 36.712927354472335], [39.522580193852541, 36.716053778625984], [40.673259311695681, 37.091276353497285], [41.212089471203043, 37.074352321921687], [42.349591098811764, 37.22987254490409], [41.837064243340954, 36.605853786763568], [41.289707472505448, 36.358814602192261], [41.383965285005807, 35.628316555314349], [41.00615888851992, 34.419372260062111], [38.792340529136077, 33.378686428352218]]] } }, + { "type": "Feature", "properties": { "admin": "Chad", "name": "Chad", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[14.495787387762899, 12.859396267137353], [14.595781284247604, 13.330426947477859], [13.954476759505607, 13.353448798063765], [13.956698846094124, 13.996691189016925], [13.540393507550785, 14.36713369390122], [13.97217, 15.68437], [15.247731154041842, 16.627305813050778], [15.300441114979716, 17.927949937405], [15.68574059414777, 19.957180080642384], [15.90324669766431, 20.387618923417499], [15.487148064850143, 20.730414537025634], [15.47106, 21.04845], [15.096887648181847, 21.308518785074902], [14.8513, 22.862950000000119], [15.86085, 23.40972], [19.84926, 21.49509], [23.837660000000135, 19.580470000000101], [23.886890000000101, 15.61084], [23.02459, 15.68072], [22.567950000000106, 14.944290000000134], [22.30351, 14.32682], [22.51202, 14.09318], [22.18329, 13.78648], [22.29658, 13.37232], [22.03759, 12.95546], [21.93681, 12.588180000000133], [22.28801, 12.64605], [22.49762, 12.26024], [22.50869, 11.67936], [22.87622, 11.384610000000119], [22.864165480244246, 11.142395127807616], [22.231129184668756, 10.971888739460608], [21.723821648859538, 10.567055568885959], [21.000868361096305, 9.475985215691479], [20.059685499764267, 9.012706000194838], [19.094008009526071, 9.074846910025768], [18.81200971850927, 8.982914536978623], [18.911021762780589, 8.630894680206435], [18.389554884523303, 8.281303615751879], [17.964929640380884, 7.890914008002992], [16.705988396886365, 7.508327541529978], [16.4561845231874, 7.734773667832938], [16.290561557691884, 7.754307359239417], [16.106231723706738, 7.497087917506461], [15.279460483469164, 7.42192454673801], [15.436091749745737, 7.692812404811887], [15.120865512765302, 8.382150173369437], [14.979995558337688, 8.796104234243442], [14.544466586981851, 8.965861314322238], [13.954218377344088, 9.549494940626685], [14.17146609869911, 10.021378282100043], [14.627200555081057, 9.920919297724591], [14.909353875394796, 9.992129421422758], [15.46787275560524, 9.982336737503543], [14.923564894275042, 10.891325181517514], [14.960151808337679, 11.555574042197234], [14.89336, 12.21905], [14.495787387762899, 12.859396267137353]]] } }, + { "type": "Feature", "properties": { "admin": "Togo", "name": "Togo", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[1.865240512712318, 6.14215770102973], [1.060121697604927, 5.928837388528875], [0.836931186536333, 6.279978745952147], [0.570384148774849, 6.914358628767188], [0.490957472342245, 7.411744289576474], [0.712029249686878, 8.312464504423827], [0.461191847342121, 8.677222601756013], [0.365900506195885, 9.46500397382948], [0.367579990245389, 10.191212876827176], [-0.049784715159944, 10.706917832883928], [0.023802524423701, 11.018681748900802], [0.899563022474069, 10.997339382364258], [0.772335646171484, 10.470808213742357], [1.077795037448737, 10.175606594275022], [1.425060662450136, 9.825395412632998], [1.46304284018467, 9.334624335157086], [1.664477573258381, 9.128590399609378], [1.618950636409238, 6.832038072126236], [1.865240512712318, 6.14215770102973]]] } }, + { "type": "Feature", "properties": { "admin": "Thailand", "name": "Thailand", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[102.58493248902667, 12.186594956913279], [101.687157830819928, 12.645740057826568], [100.831809523524839, 12.627084865769204], [100.978467238369191, 13.412721665902563], [100.097797479251099, 13.406856390837429], [100.018732537844528, 12.307001044153353], [99.478920526123602, 10.846366685423545], [99.153772414143134, 9.963061428258554], [99.222398716226749, 9.239255479362425], [99.873831821698118, 9.207862046745118], [100.279646844486194, 8.29515289960605], [100.45927412313273, 7.429572658717175], [101.017327915452697, 6.856868597842476], [101.623079054778032, 6.740622463401918], [102.141186964936367, 6.221636053894626], [101.81428185425797, 5.810808417174242], [101.154218784593837, 5.691384182147713], [101.075515578213327, 6.20486705161592], [100.259596388756933, 6.642824815289542], [100.085756870527092, 6.46448944745029], [99.690690545655727, 6.848212795433595], [99.519641554769606, 7.343453884302759], [98.988252801512289, 7.907993068875325], [98.503786248775967, 8.382305202666286], [98.339661899816988, 7.794511623562384], [98.150009393305808, 8.350007432483876], [98.259150018306229, 8.973922837759799], [98.553550653073017, 9.932959906448543], [99.038120558673953, 10.960545762572435], [99.587286004639694, 11.892762762901695], [99.196353794351637, 12.804748439988666], [99.212011753336071, 13.269293728076462], [99.097755161538728, 13.827502549693275], [98.430819126379859, 14.622027696180831], [98.192074009191373, 15.123702500870349], [98.537375929765687, 15.308497422746081], [98.90334842325673, 16.177824204976115], [98.493761020911322, 16.837835598207928], [97.859122755934848, 17.567946071843657], [97.375896437573516, 18.445437730375811], [97.797782830804394, 18.627080389881751], [98.253723992915582, 19.708203029860041], [98.959675734454848, 19.752980658440944], [99.543309360759281, 20.186597601802056], [100.115987583417819, 20.41784963630818], [100.548881056726856, 20.109237982661124], [100.606293573003128, 19.508344427971217], [101.282014601651667, 19.462584947176762], [101.035931431077742, 18.408928330961611], [101.059547560635139, 17.512497259994486], [102.113591750092453, 18.109101670804161], [102.413004998791592, 17.932781683824281], [102.998705682387694, 17.961694647691598], [103.200192091893726, 18.309632066312769], [103.956476678485288, 18.240954087796872], [104.716947056092465, 17.428858954330078], [104.779320509868768, 16.441864935771445], [105.589038527450128, 15.570316066952856], [105.544338413517664, 14.723933620660414], [105.218776890078871, 14.27321177821069], [104.281418084736586, 14.416743068901363], [102.988422072361601, 14.225721136934464], [102.348099399833004, 13.39424734135822], [102.58493248902667, 12.186594956913279]]] } }, + { "type": "Feature", "properties": { "admin": "Tajikistan", "name": "Tajikistan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[71.014198032520156, 40.244365546218226], [70.648018833299957, 39.935753892571157], [69.559609816368507, 40.103211371412968], [69.464886915977516, 39.526683254548693], [70.549161818325601, 39.604197902986492], [71.784693637991992, 39.279463202464363], [73.67537926625478, 39.431236884105594], [73.928852166646408, 38.505815334622724], [74.257514276022718, 38.606506862943441], [74.864815708316812, 38.378846340481587], [74.829985792952087, 37.990007025701388], [74.980002475895404, 37.419990139305888], [73.948695916646486, 37.421566270490786], [73.260055779924983, 37.495256862938994], [72.636889682917271, 37.047558091778349], [72.193040805962383, 36.94828766534566], [71.84463829945058, 36.738171291646914], [71.448693475230229, 37.065644843080513], [71.541917759084768, 37.905774441065631], [71.239403924448155, 37.953265082341879], [71.348131137990251, 38.258905341132156], [70.806820509732873, 38.486281643216408], [70.376304152309274, 38.138395901027515], [70.270574171840124, 37.73516469985401], [70.116578403610319, 37.588222764632086], [69.518785434857946, 37.608996690413413], [69.196272820924364, 37.15114350030742], [68.859445835245921, 37.344335842430588], [68.135562371701369, 37.023115139304302], [67.829999627559502, 37.144994004864678], [68.392032505165943, 38.157025254868728], [68.176025018185911, 38.901553453113898], [67.442219679641298, 39.140143541005479], [67.701428664017342, 39.580478420564518], [68.536416456989414, 39.533452867178923], [69.011632928345477, 40.086158148756653], [69.329494663372813, 40.727824408524839], [70.666622348925031, 40.960213324541407], [70.458159621059608, 40.49649485937028], [70.601406691372674, 40.218527330072284], [71.014198032520156, 40.244365546218226]]] } }, + { "type": "Feature", "properties": { "admin": "Turkmenistan", "name": "Turkmenistan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[61.21081709172573, 35.650072333309218], [61.123070509694131, 36.491597194966239], [60.377637973883864, 36.52738312432836], [59.234761997316795, 37.412987982730336], [58.436154412678192, 37.522309475243794], [57.330433790928964, 38.029229437810933], [56.619366082592805, 38.121394354803478], [56.180374790273319, 37.935126654607423], [55.511578403551894, 37.964117133123153], [54.800303989486558, 37.392420762678178], [53.921597934795543, 37.198918361961255], [53.735511102112504, 37.906136176091685], [53.880928582581831, 38.952093003895349], [53.101027866432894, 39.290573635407121], [53.357808058491216, 39.975286363274442], [52.693972609269807, 40.033629055331964], [52.91525109234361, 40.87652334244472], [53.85813927594112, 40.631034450842165], [54.736845330632136, 40.951014919593455], [54.0083109881813, 41.551210842447404], [53.721713494690576, 42.123191433270016], [52.916749708880069, 41.868116563477322], [52.81468875510361, 41.135370591794704], [52.502459751196135, 41.783315538086356], [52.94429324729164, 42.116034247397586], [54.079417759014937, 42.324109402020817], [54.755345493392625, 42.04397146256656], [55.455251092353755, 41.259859117185826], [55.968191359282898, 41.308641669269356], [57.096391229079089, 41.32231008561056], [56.93221520368779, 41.82602610937559], [57.786529982337065, 42.170552883465511], [58.629010857991453, 42.751551011723045], [59.976422153569771, 42.223081976890199], [60.083340691981654, 41.425146185871391], [60.46595299667068, 41.22032664648254], [61.547178989513547, 41.2663703476546], [61.882714064384679, 41.084856879229392], [62.374260288344992, 40.053886216790382], [63.518014764261018, 39.363256537425627], [64.170223016216752, 38.892406724598231], [65.215998976507379, 38.402695013984292], [66.546150343700205, 37.974684963526855], [66.518606805288655, 37.362784328758785], [66.217384881459324, 37.393790188133913], [65.745630731066811, 37.661164048812061], [65.588947788357828, 37.305216783185628], [64.746105177677393, 37.111817735333297], [64.546479119733888, 36.31207326918426], [63.982895949158696, 36.007957465146596], [63.193538445900337, 35.857165635718907], [62.984662306576588, 35.404040839167614], [62.230651483005879, 35.270663967422287], [61.21081709172573, 35.650072333309218]]] } }, + { "type": "Feature", "properties": { "admin": "East Timor", "name": "Timor-Leste", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[124.96868248911619, -8.892790215697081], [125.086246372580248, -8.656887302284678], [125.947072381698234, -8.432094821815033], [126.64470421763852, -8.39824675866385], [126.957243280139792, -8.273344821814396], [127.335928175974615, -8.397316582882601], [126.967991978056517, -8.668256117388891], [125.925885044458568, -9.106007175333351], [125.088520135601073, -9.393173109579292], [125.070019972840583, -9.08998748132287], [124.96868248911619, -8.892790215697081]]] } }, + { "type": "Feature", "properties": { "admin": "Trinidad and Tobago", "name": "Trinidad and Tobago", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-61.68, 10.76], [-61.105, 10.89], [-60.895, 10.855], [-60.935, 10.11], [-61.77, 10.0], [-61.95, 10.09], [-61.66, 10.365], [-61.68, 10.76]]] } }, + { "type": "Feature", "properties": { "admin": "Tunisia", "name": "Tunisia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[9.482139926805273, 30.307556057246181], [9.055602654668148, 32.102691962201284], [8.439102817426116, 32.506284898400814], [8.430472853233367, 32.748337307255944], [7.612641635782181, 33.344114895148955], [7.524481642292242, 34.097376410451453], [8.140981479534302, 34.655145982393783], [8.376367628623766, 35.479876003555937], [8.217824334352313, 36.433176988260271], [8.420964389691674, 36.946427313783154], [9.509993523810605, 37.349994411766531], [10.210002475636315, 37.230001735984807], [10.180650262094529, 36.724037787415071], [11.028867221733348, 37.09210317641395], [11.100025668999249, 36.899996039368908], [10.600004510143092, 36.410000108377368], [10.593286573945134, 35.947444362932806], [10.939518670300686, 35.698984076473486], [10.807847120821007, 34.833507188449182], [10.149592726287123, 34.330773016897702], [10.339658644256613, 33.785741685515312], [10.856836378633684, 33.768740139291275], [11.108500603895118, 33.293342800422188], [11.488787469131008, 33.136995754523134], [11.432253452203692, 32.368903103152867], [10.944789666394453, 32.081814683555358], [10.636901482799484, 31.761420803345747], [9.950225050505081, 31.376069647745251], [10.056575148161752, 30.961831366493595], [9.97001712407285, 30.539324856075236], [9.482139926805273, 30.307556057246181]]] } }, + { "type": "Feature", "properties": { "admin": "Turkey", "name": "Turkey", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[36.913127068842151, 41.335358384764291], [38.347664829264502, 40.948586127275711], [39.512606642420238, 41.102762763018561], [40.373432651538245, 41.013672593747337], [41.554084100110707, 41.535656236327604], [42.619548781104548, 41.58317271581992], [43.582745802592704, 41.09214325618256], [43.752657911968491, 40.740200914058811], [43.656436395040963, 40.253563951166157], [44.400008579288759, 40.005000311842302], [44.79398969908199, 39.713002631177027], [44.109225294782355, 39.428136298168049], [44.421402622257595, 38.281281236314513], [44.225755649600522, 37.971584377589345], [44.772699008977739, 37.170444647768441], [44.293451775902852, 37.001514390606353], [43.942258742047343, 37.256227525372928], [42.77912560402185, 37.385263576805798], [42.349591098811764, 37.229872544904104], [41.212089471203015, 37.074352321921729], [40.673259311695702, 37.091276353497356], [39.522580193852512, 36.716053778626012], [38.699891391765917, 36.712927354472313], [38.167727492024156, 36.90121043552778], [37.066761102045824, 36.623036200500614], [36.739494256341366, 36.817520453431108], [36.685389031731816, 36.259699205056499], [36.417550083163086, 36.040616970355096], [36.149762811026584, 35.821534735653664], [35.782084995269848, 36.274995429014915], [36.160821567537049, 36.650605577128367], [35.550936313628334, 36.565442816711325], [34.714553256984367, 36.795532131490909], [34.026894972476455, 36.219960028623966], [32.509158156064096, 36.107563788389193], [31.69959516777956, 36.644275214172602], [30.621624790171062, 36.677864895162308], [30.391096225717114, 36.262980658506983], [29.69997562024556, 36.144357408181001], [28.732902866335387, 36.676831366516431], [27.641186557737363, 36.658822129862749], [27.048767937943289, 37.653360907536005], [26.318218214633042, 38.208133246405382], [26.804700148228726, 38.985760199533551], [26.170785353304375, 39.463612168936457], [27.280019972449388, 40.420013739578302], [28.819977654747209, 40.460011298172212], [29.240003696415574, 41.219990749672682], [31.145933872204434, 41.087621568357058], [32.347979363745786, 41.736264146484629], [33.513282911927512, 42.018960069337304], [35.167703891751863, 42.040224921225438], [36.913127068842151, 41.335358384764291]]], [[[27.192376743282406, 40.690565700842448], [26.358009067497782, 40.151993923496477], [26.043351271272535, 40.617753607743161], [26.056942172965332, 40.824123440100735], [26.294602085075692, 40.936261298174166], [26.604195590936282, 41.562114569661013], [26.117041863720825, 41.826904608724554], [27.135739373490505, 42.141484890301307], [27.996720411905407, 42.007358710287768], [28.115524529744441, 41.622886054036279], [28.988442824018779, 41.299934190428175], [28.806438429486743, 41.05496206314853], [27.619017368284112, 40.999823309893102], [27.192376743282406, 40.690565700842448]]]] } }, + { "type": "Feature", "properties": { "admin": "Taiwan", "name": "Taiwan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[121.777817824389899, 24.394273586519393], [121.175632358892713, 22.790857245367164], [120.747079705896198, 21.970571397382106], [120.220083449383651, 22.814860948166732], [120.106188592612369, 23.556262722258229], [120.694679803552233, 24.53845083261373], [121.49504438688875, 25.295458889257379], [121.951243931161429, 24.997595933527034], [121.777817824389899, 24.394273586519393]]] } }, + { "type": "Feature", "properties": { "admin": "United Republic of Tanzania", "name": "Tanzania", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[33.903711197104592, -0.95], [34.07262, -1.05982], [37.69869, -3.09699], [37.7669, -3.67712], [39.20222, -4.67677], [38.74054, -5.90895], [38.79977, -6.47566], [39.44, -6.84], [39.470000000000134, -7.1], [39.19469, -7.7039], [39.25203, -8.00781], [39.18652, -8.48551], [39.53574, -9.112369999999883], [39.9496, -10.0984], [40.31659, -10.317099999999867], [39.521, -10.89688], [38.427556593587767, -11.285202325081626], [37.82764, -11.26879], [37.47129, -11.56876], [36.775150994622884, -11.59453744878078], [36.514081658684397, -11.720938002166745], [35.312397902169145, -11.439146416879165], [34.559989047999451, -11.520020033415845], [34.28, -10.16], [33.940837724096518, -9.693673841980283], [33.73972, -9.41715], [32.759375441221373, -9.230599053589001], [32.191864861791935, -8.930358981973255], [31.556348097466628, -8.762048841998647], [31.157751336950064, -8.594578747317312], [30.74, -8.34], [30.2, -7.08], [29.62, -6.52], [29.419992710088305, -5.939998874539297], [29.519986606573063, -5.419978936386257], [29.339997592900367, -4.499983412294113], [29.753512404099858, -4.452389418153301], [30.11632, -4.09012], [30.50554, -3.56858], [30.75224, -3.35931], [30.74301, -3.03431], [30.52766, -2.80762], [30.46967, -2.41383], [30.758308953583132, -2.287250257988375], [30.816134881317844, -1.698914076345374], [30.419104852019291, -1.134659112150416], [30.769860000000101, -1.01455], [31.86617, -1.02736], [33.903711197104592, -0.95]]] } }, + { "type": "Feature", "properties": { "admin": "Uganda", "name": "Uganda", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[31.86617, -1.02736], [30.769860000000101, -1.01455], [30.419104852019291, -1.134659112150416], [29.821518588996121, -1.443322442229771], [29.579466180141019, -1.341313164885605], [29.587837762172164, -0.587405694179381], [29.8195, -0.2053], [29.875778842902431, 0.597379868976361], [30.086153598762785, 1.062312730306416], [30.468507521290285, 1.583805446779706], [30.852670118948133, 1.849396470543752], [31.174149204235952, 2.204465236821306], [30.77332, 2.339890000000139], [30.83385, 3.50917], [31.24556, 3.7819], [31.88145, 3.55827], [32.68642, 3.79232], [33.39, 3.79], [34.005, 4.249884947362147], [34.47913, 3.5556], [34.59607, 3.053740000000118], [35.03599, 1.90584], [34.6721, 1.17694], [34.18, 0.515], [33.893568969666994, 0.109813537861839], [33.903711197104592, -0.95], [31.86617, -1.02736]]] } }, + { "type": "Feature", "properties": { "admin": "Ukraine", "name": "Ukraine", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[31.78599816257158, 52.10167796488544], [32.159412062312661, 52.061266994833204], [32.412058139787625, 52.288694973349735], [32.715760532366964, 52.238465481162038], [33.7526998227357, 52.335074571331681], [34.391730584457001, 51.768881740925778], [34.141978387190385, 51.566413479206226], [34.22481570815426, 51.255993150428942], [35.022183058417873, 51.207572333371445], [35.377923618315116, 50.773955390010343], [35.35611616388794, 50.577197374059054], [36.62616784032533, 50.225590928745127], [37.393459506995065, 50.383953355503586], [38.01063113785689, 49.915661526074622], [38.59498823421341, 49.926461900423618], [40.069058465339097, 49.601055406281688], [40.080789015469342, 49.307429917999272], [39.674663934087526, 48.783818467801872], [39.895632358567575, 48.232405097031425], [39.738277622238819, 47.898937079451983], [38.770584751141186, 47.825608222029807], [38.255112339029743, 47.546400458356807], [38.223538038899413, 47.102189846375872], [37.42513715998998, 47.022220567404197], [36.759854770664383, 46.698700263040919], [35.823684523264816, 46.645964463887054], [34.962341749823871, 46.273196519549636], [35.020787794745978, 45.65121898048465], [35.51000857925316, 45.409993394546177], [36.529997999830151, 45.46998973243705], [36.334712762199146, 45.113215643893952], [35.239999220528112, 44.939996242851599], [33.882511020652878, 44.361478583344066], [33.326420932760037, 44.564877020844875], [33.546924269349446, 45.034770819674883], [32.454174432105496, 45.327466132176063], [32.630804477679128, 45.519185695978905], [33.588162062318382, 45.851568508480227], [33.298567335754704, 46.08059845639783], [31.744140252415171, 46.333347886737378], [31.675307244602401, 46.706245022155528], [30.748748813609094, 46.583100084003995], [30.37760867688888, 46.032410183285663], [29.603289015427425, 45.293308010431119], [29.149724969201646, 45.464925442072442], [28.679779493939371, 45.30403087013169], [28.233553501099035, 45.488283189468369], [28.48526940279276, 45.596907050145887], [28.659987420371575, 45.939986884131628], [28.933717482221621, 46.258830471372491], [28.862972446414055, 46.437889309263824], [29.072106967899288, 46.517677720722482], [29.170653924279879, 46.379262396828693], [29.759971958136383, 46.349987697935354], [30.024658644335364, 46.423936672545032], [29.838210076626289, 46.525325832701675], [29.908851759569295, 46.67436066343145], [29.559674106573105, 46.928582872091312], [29.415135125452732, 47.346645209332571], [29.050867954227321, 47.510226955752493], [29.122698195113024, 47.849095160506458], [28.670891147585163, 48.118148505234089], [28.259546746541837, 48.155562242213406], [27.52253746919515, 48.467119452501102], [26.857823520624798, 48.368210761094488], [26.619336785597788, 48.220726223333457], [26.197450392366925, 48.220881252630342], [25.945941196402394, 47.987148749374207], [25.207743361112986, 47.891056423527459], [24.866317172960571, 47.737525743188307], [24.402056105250374, 47.981877753280422], [23.760958286237404, 47.985598456405448], [23.142236362406798, 48.096341050806942], [22.710531447040488, 47.882193915389394], [22.640819939878746, 48.150239569687351], [22.085608351334848, 48.422264309271782], [22.280841912533553, 48.825392157580659], [22.558137648211751, 49.08573802346713], [22.776418898212619, 49.027395331409608], [22.518450148211596, 49.476773586619736], [23.426508416444388, 50.308505764357449], [23.922757195743259, 50.424881089878738], [24.029985792748899, 50.705406602575174], [23.52707075368437, 51.578454087930233], [24.005077752384206, 51.617443956094448], [24.553106316839511, 51.888461005249177], [25.327787713327005, 51.910656032918538], [26.337958611768549, 51.832288723347915], [27.454066196408426, 51.59230337178446], [28.241615024536564, 51.572227077839059], [28.617612745892242, 51.427713934934836], [28.992835320763522, 51.602044379271462], [29.254938185347921, 51.368234361366881], [30.157363722460889, 51.416138414101454], [30.55511722181145, 51.319503485715643], [30.619454380014837, 51.822806098022362], [30.927549269338975, 52.042353420614383], [31.78599816257158, 52.10167796488544]]] } }, + { "type": "Feature", "properties": { "admin": "Uruguay", "name": "Uruguay", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-57.625133429582945, -30.216294854454258], [-56.976025763564721, -30.109686374636119], [-55.97324459494093, -30.883075860316296], [-55.601510179249331, -30.853878676071385], [-54.572451544805105, -31.494511407193745], [-53.787951626182185, -32.047242526987617], [-53.209588995971529, -32.727666110974717], [-53.650543992718084, -33.202004082981823], [-53.373661668498229, -33.768377780900757], [-53.806425950726521, -34.396814874002224], [-54.935866054897716, -34.952646579733617], [-55.674089728403274, -34.752658786764066], [-56.215297003796053, -34.85983570733741], [-57.139685024633096, -34.430456231424238], [-57.817860683815489, -34.462547295877492], [-58.427074144104381, -33.909454441057569], [-58.349611172098854, -33.2631889788154], [-58.132647671121433, -33.040566908502008], [-58.142440355040748, -32.044503676076147], [-57.874937303281875, -31.016556084926201], [-57.625133429582945, -30.216294854454258]]] } }, + { "type": "Feature", "properties": { "admin": "United States of America", "name": "United States", "continent": "North America" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-155.54211, 19.08348], [-155.68817, 18.91619], [-155.93665, 19.05939], [-155.90806, 19.33888], [-156.07347, 19.70294], [-156.02368, 19.81422], [-155.85008, 19.97729], [-155.91907, 20.17395], [-155.86108, 20.26721], [-155.78505, 20.2487], [-155.40214, 20.07975], [-155.22452, 19.99302], [-155.06226, 19.8591], [-154.80741, 19.50871], [-154.83147, 19.45328], [-155.222169999999892, 19.23972], [-155.54211, 19.08348]]], [[[-156.07926, 20.64397], [-156.41445, 20.57241], [-156.58673, 20.783], [-156.70167, 20.8643], [-156.71055, 20.92676], [-156.61258, 21.01249], [-156.25711, 20.91745], [-155.99566, 20.76404], [-156.07926, 20.64397]]], [[[-156.75824, 21.17684], [-156.78933, 21.06873], [-157.32521, 21.09777], [-157.25027, 21.21958], [-156.75824, 21.17684]]], [[[-157.65283, 21.32217], [-157.70703, 21.26442], [-157.7786, 21.27729], [-158.12667, 21.31244], [-158.2538, 21.53919], [-158.29265, 21.57912], [-158.0252, 21.71696], [-157.94161, 21.65272], [-157.65283, 21.32217]]], [[[-159.34512, 21.982], [-159.46372, 21.88299], [-159.80051, 22.06533], [-159.74877, 22.1382], [-159.5962, 22.23618], [-159.36569, 22.21494], [-159.34512, 21.982]]], [[[-94.81758, 49.38905], [-94.639999999999858, 48.840000000000103], [-94.32914, 48.67074], [-93.63087, 48.60926], [-92.61, 48.45], [-91.64, 48.14], [-90.829999999999856, 48.27], [-89.6, 48.01], [-89.272917446636654, 48.019808254582834], [-88.378114183286513, 48.302917588893806], [-87.439792623300207, 47.94], [-86.461990831228135, 47.553338019392037], [-85.652363247403215, 47.220218817730498], [-84.876079881514855, 46.900083319682366], [-84.779238247399817, 46.637101955749117], [-84.54374874544564, 46.538684190449224], [-84.6049, 46.4396], [-84.3367, 46.408770000000104], [-84.142119513673279, 46.512225857115723], [-84.091851264161463, 46.275418606138253], [-83.890765347005654, 46.116926988299149], [-83.616130947590491, 46.116926988299149], [-83.469550747394621, 45.994686387712584], [-83.592850714843067, 45.816893622412543], [-82.550924648758169, 45.347516587905446], [-82.337763125431053, 44.44], [-82.137642381503952, 43.571087551439987], [-82.43, 42.98], [-82.899999999999878, 42.430000000000135], [-83.119999999999877, 42.08], [-83.141999681312555, 41.975681057292995], [-83.029810146806909, 41.832795722005997], [-82.690089280920162, 41.675105088867319], [-82.439277716791608, 41.675105088867319], [-81.277746548167059, 42.209025987306845], [-80.247447679347843, 42.36619985612267], [-78.939362148743683, 42.863611355148116], [-78.92, 42.965], [-79.009999999999863, 43.27], [-79.171673550111862, 43.466339423184301], [-78.720279914042365, 43.625089423184953], [-77.737885097957601, 43.629055589363382], [-76.820034145805565, 43.628784288093748], [-76.5, 44.018458893758599], [-76.375, 44.09631], [-75.31821, 44.81645000000016], [-74.867, 45.00048000000011], [-73.347829999999874, 45.00738], [-71.505059999999858, 45.0082], [-71.405, 45.255000000000123], [-71.08482, 45.305240000000154], [-70.659999999999783, 45.46], [-70.305, 45.915], [-69.99997, 46.69307], [-69.237216, 47.447781], [-68.905, 47.185], [-68.23444, 47.35486], [-67.79046, 47.06636], [-67.79134, 45.702810000000134], [-67.13741, 45.13753], [-66.96466, 44.809700000000149], [-68.03252, 44.3252], [-69.059999999999874, 43.98], [-70.116169999999897, 43.684050000000141], [-70.645475633410967, 43.090238348964043], [-70.81489, 42.8653], [-70.825, 42.335], [-70.494999999999891, 41.805], [-70.08, 41.78], [-70.185, 42.145], [-69.88497, 41.922830000000111], [-69.96503, 41.637170000000161], [-70.64, 41.475], [-71.12039, 41.494450000000164], [-71.859999999999829, 41.32], [-72.295, 41.27], [-72.87643, 41.22065], [-73.71, 40.931102351654481], [-72.24126, 41.119480000000138], [-71.944999999999808, 40.93], [-73.345, 40.63], [-73.982, 40.628], [-73.952325, 40.75075], [-74.25671, 40.47351], [-73.96244, 40.42763], [-74.17838, 39.70926], [-74.90604, 38.93954], [-74.98041, 39.1964], [-75.20002, 39.24845], [-75.52805, 39.4985], [-75.32, 38.96], [-75.071834764789784, 38.782032230179276], [-75.05673, 38.404120000000106], [-75.37747, 38.01551], [-75.94023, 37.21689], [-76.03127, 37.2566], [-75.722049999999783, 37.937050000000106], [-76.23287, 38.319215], [-76.35, 39.15], [-76.542725, 38.717615], [-76.32933, 38.08326], [-76.98999793161353, 38.239991766913384], [-76.301619999999886, 37.917945], [-76.25874, 36.9664000000001], [-75.9718, 36.89726], [-75.868039999999809, 36.55125], [-75.72749, 35.550740000000125], [-76.36318, 34.808540000000129], [-77.39763499999988, 34.51201], [-78.05496, 33.92547], [-78.554349999999815, 33.861330000000116], [-79.06067, 33.49395], [-79.20357, 33.15839], [-80.301325, 32.509355], [-80.86498, 32.0333], [-81.33629, 31.44049], [-81.49042, 30.729990000000122], [-81.31371, 30.03552], [-80.98, 29.18000000000011], [-80.53558499999987, 28.47213], [-80.529999999999774, 28.04], [-80.056539284977532, 26.88000000000013], [-80.088015, 26.205765], [-80.131559999999837, 25.816775], [-80.38103, 25.20616], [-80.679999999999879, 25.08], [-81.17213, 25.201260000000126], [-81.33, 25.64], [-81.709999999999795, 25.87], [-82.239999999999895, 26.730000000000125], [-82.70515, 27.49504], [-82.85526, 27.88624], [-82.65, 28.550000000000146], [-82.929999999999865, 29.100000000000129], [-83.70959, 29.93656], [-84.1, 30.090000000000114], [-85.10882, 29.63615], [-85.28784, 29.686120000000127], [-85.7731, 30.152610000000116], [-86.399999999999878, 30.400000000000112], [-87.530359999999831, 30.27433], [-88.41782, 30.3849], [-89.180489999999836, 30.31598], [-89.593831178419748, 30.159994004836843], [-89.413735, 29.89419], [-89.43, 29.48864], [-89.21767, 29.29108], [-89.40823, 29.15961], [-89.77928, 29.307140000000135], [-90.15463, 29.11743], [-90.880224999999896, 29.148535000000116], [-91.626784999999842, 29.677000000000127], [-92.49906, 29.5523], [-93.22637, 29.78375], [-93.84842, 29.71363], [-94.69, 29.480000000000125], [-95.60026, 28.73863], [-96.59404, 28.30748], [-97.139999999999802, 27.83], [-97.37, 27.38], [-97.379999999999853, 26.69], [-97.33, 26.210000000000115], [-97.139999999999802, 25.87], [-97.529999999999859, 25.84], [-98.239999999999895, 26.060000000000109], [-99.019999999999854, 26.37], [-99.3, 26.84], [-99.52, 27.54], [-100.11, 28.11000000000012], [-100.45584, 28.696120000000118], [-100.957599999999886, 29.380710000000125], [-101.6624, 29.779300000000113], [-102.48, 29.76], [-103.11, 28.97], [-103.94, 29.27], [-104.456969999999814, 29.57196], [-104.705749999999895, 30.12173], [-105.03737, 30.64402], [-105.63159, 31.083830000000113], [-106.1429, 31.39995], [-106.507589999999794, 31.75452], [-108.24, 31.754853718166398], [-108.24194, 31.34222], [-109.035, 31.341940000000161], [-111.02361, 31.33472], [-113.30498, 32.03914], [-114.815, 32.52528], [-114.721389999999829, 32.72083], [-115.991349999999869, 32.61239000000014], [-117.127759999999753, 32.53534], [-117.295937691273863, 33.04622461520389], [-117.944, 33.621236431201389], [-118.410602275897475, 33.740909223124497], [-118.519894822799685, 34.027781577575745], [-119.081, 34.078], [-119.438840642016658, 34.348477178284291], [-120.36778, 34.44711], [-120.62286, 34.60855], [-120.74433, 35.156860000000101], [-121.714569999999853, 36.16153], [-122.54747, 37.551760000000101], [-122.51201, 37.783390000000132], [-122.95319, 38.113710000000104], [-123.7272, 38.951660000000111], [-123.865169999999878, 39.766990000000128], [-124.39807, 40.3132], [-124.17886, 41.142020000000109], [-124.2137, 41.999640000000134], [-124.532839999999894, 42.76599], [-124.14214, 43.70838], [-124.020535, 44.615895], [-123.898929999999893, 45.52341], [-124.079635, 46.86475], [-124.395669999999896, 47.72017], [-124.687210083007812, 48.184432983398537], [-124.566101074218736, 48.379714965820384], [-123.12, 48.04], [-122.587359999999876, 47.096], [-122.34, 47.36], [-122.5, 48.18], [-122.84, 49.0], [-120.0, 49.0], [-117.03121, 49.0], [-116.04818, 49.0], [-112.999999999999872, 49.0], [-110.049999999999812, 49.0], [-107.049999999999898, 49.0], [-104.04826, 48.99986], [-100.65, 49.0], [-97.228720000004699, 49.0007], [-95.159069509171943, 49.0], [-95.15609, 49.38425], [-94.81758, 49.38905]]], [[[-153.006314053336837, 57.115842190165878], [-154.0050902984581, 56.734676825581047], [-154.516402757770067, 56.992748928446687], [-154.670992804971092, 57.461195787172493], [-153.762779507441451, 57.816574612043773], [-153.228729417921073, 57.968968410872421], [-152.564790615835108, 57.901427313866961], [-152.141147223906273, 57.591058661521977], [-153.006314053336837, 57.115842190165878]]], [[[-165.579164191733554, 59.909986884187539], [-166.192770148767238, 59.754440822988961], [-166.848337368821944, 59.941406155020942], [-167.455277066090048, 60.213069159579376], [-166.467792121424566, 60.384169826897775], [-165.674429694663644, 60.293606879306232], [-165.579164191733554, 59.909986884187539]]], [[[-171.731656867539357, 63.782515367275906], [-171.114433560245175, 63.592191067144981], [-170.491112433940657, 63.694975490973505], [-169.682505459653555, 63.431115627691142], [-168.689439460300662, 63.297506212000584], [-168.77194088445458, 63.188598130945437], [-169.529439867204985, 62.976931464277882], [-170.290556200215917, 63.194437567794452], [-170.671385667990847, 63.375821845138965], [-171.553063117538642, 63.317789211675077], [-171.791110602891166, 63.40584585230048], [-171.731656867539357, 63.782515367275906]]], [[[-155.067790290324211, 71.147776394323685], [-154.344165208941206, 70.696408596470192], [-153.900006273392563, 70.889988511835682], [-152.210006069935275, 70.829992173944831], [-152.270002407826127, 70.60000621202984], [-150.739992438744508, 70.430016588005699], [-149.720003018167489, 70.530010484490433], [-147.613361579357047, 70.214034939241785], [-145.689989800225248, 70.120009670686741], [-144.920010959076393, 69.989991767040479], [-143.58944618042517, 70.152514146598307], [-142.072510348713365, 69.851938178172631], [-140.985987521560702, 69.711998399526365], [-140.985988329004869, 69.711998399526365], [-140.992498752029377, 66.000028591568665], [-140.997769748123119, 60.306396796298593], [-140.012997816153074, 60.276837877027575], [-139.03900042031583, 60.000007229240012], [-138.340889999999888, 59.562110000000146], [-137.4525, 58.905000000000101], [-136.47972, 59.46389], [-135.47583, 59.78778], [-134.945, 59.270560000000117], [-134.27111, 58.86111], [-133.355548882207188, 58.410285142645151], [-132.73042, 57.692890000000105], [-131.707809999999853, 56.55212], [-130.00778, 55.91583], [-129.979994263358265, 55.284997870497207], [-130.536110189467223, 54.802753404349389], [-131.08581823797212, 55.178906155002025], [-131.967211467142278, 55.497775580459049], [-132.250010742859445, 56.369996242897443], [-133.539181084356386, 57.178887437562125], [-134.07806292029602, 58.123067531966889], [-135.038211032279037, 58.187714748763931], [-136.628062309954629, 58.212209377670447], [-137.800006279686016, 58.499995429103777], [-139.867787041412981, 59.537761542389134], [-140.825273817133024, 59.72751740176507], [-142.574443535564427, 60.084446519604981], [-143.958880994879848, 59.99918040632339], [-145.925556816827822, 60.458609727614274], [-147.114373949146625, 60.884656073644628], [-148.224306200127643, 60.672989406977152], [-148.018065558850736, 59.978328965893631], [-148.570822516860858, 59.914172675203297], [-149.727857835875824, 59.705658270905545], [-150.608243374616421, 59.368211168039487], [-151.716392788683294, 59.155821031319974], [-151.859433153267105, 59.74498403587959], [-151.40971900124714, 60.725802720779392], [-150.346941494732505, 61.033587551509854], [-150.621110806256951, 61.284424953854447], [-151.895839199816834, 60.727197984451273], [-152.578329841095581, 60.061657212964285], [-154.019172126257558, 59.350279446034264], [-153.287511359653166, 58.864727688219787], [-154.232492438758442, 58.146373602930531], [-155.307491421510207, 57.727794501366319], [-156.308334723923082, 57.422774359763636], [-156.556097378546298, 56.979984849670636], [-158.117216559867728, 56.463608099994175], [-158.433321296197136, 55.994153550838533], [-159.603327399717415, 55.566686102920116], [-160.289719611634183, 55.643580634170561], [-161.223047655257773, 55.364734605523481], [-162.23776607974105, 55.024186916720097], [-163.069446581046378, 54.689737046927171], [-164.785569221027174, 54.40417308208216], [-164.942226325520011, 54.572224839895327], [-163.84833960676562, 55.039431464246107], [-162.870001390615897, 55.348043117893198], [-161.804174974596009, 55.894986477270429], [-160.563604702781134, 56.008054511125025], [-160.070559862284483, 56.418055324928744], [-158.684442918919416, 57.016675116597852], [-158.461097378553944, 57.216921291728866], [-157.722770352183858, 57.570000515363056], [-157.550274421193564, 58.328326321030218], [-157.041674974576949, 58.918884589261708], [-158.194731208305427, 58.615802313869828], [-158.517217984023034, 58.787781480537305], [-159.058606126928709, 58.424186102931671], [-159.711667040017318, 58.931390285876333], [-159.981288825500144, 58.572549140041623], [-160.355271165996498, 59.071123358793628], [-161.355003425115001, 58.670837714260742], [-161.968893602526293, 58.671664537177371], [-162.054986538724648, 59.266925360747436], [-161.874170702135331, 59.633621324290587], [-162.518059048492034, 59.989723619213905], [-163.818341437820123, 59.798055731843377], [-164.662217577146407, 60.267484442782639], [-165.346387702474772, 60.507495632562396], [-165.350831875651835, 61.073895168697497], [-166.121379157555907, 61.500019029376212], [-165.734451870770471, 62.074996853271792], [-164.919178636717788, 62.633076483807919], [-164.562507901039339, 63.146378485763044], [-163.753332485996964, 63.219448961023758], [-163.067224494457832, 63.05945872664801], [-162.260555386381697, 63.541935736741159], [-161.534449836248569, 63.455816962326757], [-160.772506680321101, 63.76610810002326], [-160.958335130842528, 64.222798570402759], [-161.518068407212184, 64.402787584075313], [-160.777777676414729, 64.788603827566405], [-161.391926235987597, 64.777235012462327], [-162.453050096668818, 64.559444688568206], [-162.757786017894034, 64.338605455168803], [-163.54639421288428, 64.559160468190484], [-164.960829841145141, 64.446945095468848], [-166.425288255864473, 64.686672064870706], [-166.845004238939026, 65.088895575614529], [-168.110560065767146, 65.669997056736733], [-166.70527116602193, 66.088317776139391], [-164.474709642575448, 66.576660061297488], [-163.652511766595637, 66.576660061297488], [-163.788601651036117, 66.077207343196662], [-161.677774421210131, 66.116119696712403], [-162.489714525379981, 66.735565090595102], [-163.719716966791083, 67.116394558370089], [-164.430991380856511, 67.616338202577779], [-165.390286831706703, 68.042772121850234], [-166.764440680995989, 68.35887685817967], [-166.204707404626561, 68.883030910916162], [-164.430810513343431, 68.915535386827727], [-163.168613654614489, 69.371114813912882], [-162.930566169261965, 69.858061835399255], [-161.908897264635499, 70.333329983187625], [-160.93479651593367, 70.447689927849567], [-159.039175788387126, 70.891642157668926], [-158.119722866833939, 70.824721177851032], [-156.580824551398024, 71.357763576941736], [-155.067790290324211, 71.147776394323685]]]] } }, + { "type": "Feature", "properties": { "admin": "Uzbekistan", "name": "Uzbekistan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[66.518606805288655, 37.362784328758785], [66.546150343700205, 37.974684963526855], [65.215998976507379, 38.402695013984292], [64.170223016216752, 38.892406724598231], [63.518014764261018, 39.363256537425627], [62.374260288344992, 40.053886216790382], [61.882714064384679, 41.084856879229392], [61.547178989513547, 41.2663703476546], [60.46595299667068, 41.22032664648254], [60.083340691981654, 41.425146185871391], [59.976422153569771, 42.223081976890199], [58.629010857991453, 42.751551011723045], [57.786529982337065, 42.170552883465511], [56.93221520368779, 41.82602610937559], [57.096391229079089, 41.32231008561056], [55.968191359282898, 41.308641669269356], [55.928917270741081, 44.995858466159099], [58.503127068928457, 45.586804307632818], [58.689989048095882, 45.500013739598621], [60.239971958258316, 44.784036770194717], [61.05831994003244, 44.405816962250505], [62.013300408786236, 43.504476630215642], [63.185786981056559, 43.650074978197999], [64.900824415959264, 43.728080552742576], [66.098012322865074, 42.997660020513088], [66.023391554635609, 41.994646307943974], [66.510648634715707, 41.987644151368436], [66.714047072216502, 41.168443508461493], [67.985855747351806, 41.135990708982213], [68.259895867795606, 40.662324530594894], [68.632482944620008, 40.668680731766798], [69.070027296835306, 41.384244289712363], [70.388964878220776, 42.081307684897439], [70.96231489449913, 42.266154283205481], [71.259247674448218, 42.167710679689456], [70.420022414028196, 41.519998277343134], [71.157858514291576, 41.143587144529107], [71.870114780570447, 41.392900092121259], [73.055417108049156, 40.86603302668945], [71.774875115856545, 40.145844428053763], [71.014198032520156, 40.244365546218226], [70.601406691372674, 40.218527330072284], [70.458159621059608, 40.49649485937028], [70.666622348925031, 40.960213324541407], [69.329494663372813, 40.727824408524839], [69.011632928345477, 40.086158148756653], [68.536416456989414, 39.533452867178923], [67.701428664017342, 39.580478420564518], [67.442219679641298, 39.140143541005479], [68.176025018185911, 38.901553453113898], [68.392032505165943, 38.157025254868728], [67.829999627559502, 37.144994004864678], [67.075782098259609, 37.35614390720928], [66.518606805288655, 37.362784328758785]]] } }, + { "type": "Feature", "properties": { "admin": "Venezuela", "name": "Venezuela", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-71.331583624950284, 11.776284084515805], [-71.36000566271079, 11.53999359786121], [-71.947049933546495, 11.423282375530018], [-71.620868292920164, 10.969459947142791], [-71.633063930941063, 10.446494452349027], [-72.074173956984495, 9.865651353388369], [-71.695644090446521, 9.072263088411246], [-71.26455929226772, 9.137194525585981], [-71.039999355743376, 9.859992784052407], [-71.350083787710773, 10.211935126176213], [-71.400623338492224, 10.968969021036013], [-70.155298834906503, 11.375481675660039], [-70.293843349881016, 11.846822414594211], [-69.943244594996813, 12.162307033736095], [-69.584300096297454, 11.459610907431211], [-68.882999233664435, 11.44338450769156], [-68.233271450458716, 10.885744126829945], [-68.194126552997616, 10.554653225135921], [-67.296248541926317, 10.545868231646306], [-66.227864142507983, 10.648626817258684], [-65.655237596281737, 10.20079885501732], [-64.890452236578156, 10.077214667191296], [-64.329478725833724, 10.389598700395679], [-64.318006557864933, 10.641417954953978], [-63.079322475828725, 10.701724351438598], [-61.880946010980182, 10.7156253117251], [-62.730118984616396, 10.420268662960904], [-62.388511928950969, 9.948204453974636], [-61.588767462801918, 9.873066921422263], [-60.830596686431711, 9.38133982994894], [-60.671252407459718, 8.580174261911877], [-60.150095587796166, 8.602756862823425], [-59.758284878159181, 8.367034816924045], [-60.550587938058186, 7.779602972846178], [-60.637972785063752, 7.414999904810853], [-60.295668097562377, 7.043911444522918], [-60.543999192940966, 6.856584377464881], [-61.159336310456467, 6.696077378766317], [-61.139415045807937, 6.234296779806142], [-61.410302903881941, 5.959068101419616], [-60.733574184803707, 5.2002772078619], [-60.601179165271922, 4.918098049332129], [-60.966893276601517, 4.536467596856638], [-62.085429653559125, 4.162123521334308], [-62.804533047116692, 4.006965033377951], [-63.093197597899092, 3.770571193858784], [-63.888342861574145, 4.020530096854571], [-64.628659430587533, 4.14848094320925], [-64.816064012294007, 4.056445217297422], [-64.368494432214092, 3.797210394705246], [-64.408827887617903, 3.126786200366623], [-64.269999152265783, 2.497005520025566], [-63.422867397705105, 2.411067613124174], [-63.368788011311644, 2.200899562993129], [-64.083085496666072, 1.91636912679408], [-64.199305792890499, 1.49285492594602], [-64.611011928959854, 1.328730576987041], [-65.354713304288353, 1.0952822941085], [-65.548267381437554, 0.78925446207603], [-66.325765143484944, 0.724452215982012], [-66.876325853122566, 1.253360500489336], [-67.181294318293041, 2.250638129074062], [-67.447092047786299, 2.600280869960869], [-67.809938117123693, 2.820655015469569], [-67.303173183853417, 3.31845408773718], [-67.33756384954367, 3.542342230641721], [-67.621835903581271, 3.839481716319994], [-67.823012254493534, 4.503937282728898], [-67.744696621355203, 5.221128648291667], [-67.521531948502741, 5.556870428891968], [-67.34143958196556, 6.095468044454021], [-67.695087246355001, 6.267318020040645], [-68.265052456318216, 6.153268133972473], [-68.985318569602327, 6.206804917826856], [-69.389479946557103, 6.099860541198835], [-70.093312954372408, 6.960376491723109], [-70.674233567981503, 7.087784735538717], [-71.960175747348629, 6.991614895043538], [-72.19835242378187, 7.340430813013682], [-72.444487270788059, 7.42378489830048], [-72.479678921178831, 7.632506008327352], [-72.360900641555958, 8.002638454617893], [-72.439862230097944, 8.405275376820027], [-72.660494757768092, 8.62528778730268], [-72.788729824500379, 9.085027167187331], [-73.304951544880026, 9.151999823437604], [-73.027604132769554, 9.736770331252441], [-72.905286017534692, 10.45034434655477], [-72.614657762325194, 10.821975409381777], [-72.227575446242923, 11.108702093953237], [-71.973921678338272, 11.608671576377116], [-71.331583624950284, 11.776284084515805]]] } }, + { "type": "Feature", "properties": { "admin": "Vietnam", "name": "Vietnam", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[108.050180291782908, 21.552379869060111], [106.715067987090066, 20.696850694252014], [105.881682163519002, 19.752050482659694], [105.662005649846279, 19.058165188060567], [106.426816847765991, 18.004120998603224], [107.36195356651973, 16.697456569887049], [108.269495070429599, 16.079742336486145], [108.877106561317447, 15.276690578670436], [109.335269810017209, 13.42602834721772], [109.200135939573954, 11.666859239137761], [108.366129998815424, 11.00832062422627], [107.22092858279521, 10.36448395430183], [106.4051127462034, 9.530839748569317], [105.158263787865081, 8.599759629750492], [104.795185174582372, 9.2410383162765], [105.076201613385592, 9.918490505406806], [104.334334751403446, 10.486543687375228], [105.199914992292321, 10.889309800658094], [106.249670037869436, 10.961811835163585], [105.810523716253101, 11.567614650921225], [107.491403029410861, 12.337205918827944], [107.614547967562402, 13.535530707244202], [107.382727492301058, 14.202440904186968], [107.564525181103875, 15.202173163305554], [107.312705926545576, 15.908538316303177], [106.55600792849566, 16.604283962464802], [105.925762160264, 17.485315456608955], [105.094598423281496, 18.666974595611073], [103.896532017026701, 19.265180975821799], [104.183387892678908, 19.624668077060214], [104.822573683697073, 19.886641750563879], [104.435000441508024, 20.758733221921528], [103.203861118586431, 20.766562201413745], [102.754896274834636, 21.675137233969462], [102.170435825613552, 22.464753119389297], [102.706992222100084, 22.708795070887668], [103.504514601660546, 22.703756618739202], [104.476858351664447, 22.819150092046961], [105.329209425886603, 23.352063300056908], [105.811247186305209, 22.976892401617899], [106.725403273548451, 22.794267889898414], [106.567273390735295, 22.218204860924768], [107.043420037872608, 21.811898912029907], [108.050180291782908, 21.552379869060111]]] } }, + { "type": "Feature", "properties": { "admin": "Vanuatu", "name": "Vanuatu", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[167.844876743845077, -16.466333103097153], [167.515181105822847, -16.597849623279966], [167.180007765977791, -16.159995212470957], [167.2168013857696, -15.891846205308449], [167.844876743845077, -16.466333103097153]]], [[[167.107712437201485, -14.933920179913951], [167.2700281110302, -15.74002084723487], [167.001207310247935, -15.614602146062492], [166.79315799384085, -15.668810723536719], [166.649859247095549, -15.392703545801192], [166.629136997746429, -14.6264970842096], [167.107712437201485, -14.933920179913951]]]] } }, + { "type": "Feature", "properties": { "admin": "Yemen", "name": "Yemen", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[53.108572625547502, 16.651051133688949], [52.385205926325874, 16.38241120041965], [52.191729363825075, 15.938433132384018], [52.168164910699986, 15.597420355689945], [51.172515089732471, 15.175249742081489], [49.574576450403136, 14.708766587782746], [48.679230584514151, 14.003202419485657], [48.238947381387412, 13.948089504446369], [47.938914015500771, 14.007233181204423], [47.354453566279702, 13.592219753468379], [46.71707645039173, 13.399699204965016], [45.877592807810252, 13.347764390511681], [45.625050083199874, 13.290946153206759], [45.406458774605241, 13.02690542241143], [45.144355910020849, 12.953938300015306], [44.9895333188744, 12.699586900274708], [44.494576450382844, 12.721652736863344], [44.175112745954486, 12.585950425664873], [43.48295861183712, 12.63680003504008], [43.222871128112118, 13.220950425667422], [43.251448195169516, 13.767583726450848], [43.087943963398047, 14.062630316621306], [42.892245314308717, 14.802249253798745], [42.604872674333606, 15.213335272680592], [42.805015496600042, 15.261962795467252], [42.702437778500652, 15.718885809791995], [42.823670688657408, 15.911742255105263], [42.779332309750963, 16.34789134364868], [43.218375278502734, 16.666889960186406], [43.115797560403351, 17.088440456607369], [43.380794305196098, 17.579986680567668], [43.791518589051904, 17.319976711491105], [44.062613152855072, 17.410358791569589], [45.216651238797184, 17.43332896572333], [45.399999220568752, 17.333335069238554], [46.366658563020529, 17.233315334537632], [46.749994337761642, 17.283338120996174], [47.000004917189749, 16.949999294497438], [47.466694777217626, 17.116681626854877], [48.183343540241324, 18.166669216377311], [49.116671583864857, 18.616667588774941], [52.000009800022227, 19.000003363516054], [52.782184279192037, 17.349742336491229], [53.108572625547502, 16.651051133688949]]] } }, + { "type": "Feature", "properties": { "admin": "South Africa", "name": "South Africa", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[31.521001417778869, -29.257386976846245], [31.325561150850994, -29.401977634398907], [30.901762729625336, -29.909956963828034], [30.622813348113816, -30.423775730106122], [30.055716180142774, -31.140269463832951], [28.925552605919535, -32.172041110972494], [28.219755893677092, -32.771952813448848], [27.464608188595967, -33.226963799778794], [26.419452345492818, -33.614950453426175], [25.909664340933482, -33.667040297176392], [25.78062828950069, -33.944646091448334], [25.172861769315965, -33.796851495093577], [24.67785322439212, -33.987175795224537], [23.594043409934635, -33.794474379208147], [22.988188917744729, -33.916430759416976], [22.574157342222232, -33.864082533505304], [21.542799106541022, -34.258838799782922], [20.689052768646999, -34.417175388325226], [20.071261020597628, -34.795136814107984], [19.616405063564567, -34.819166355123706], [19.193278435958714, -34.462598972309777], [18.855314568769867, -34.444305515278458], [18.424643182049376, -33.997872816708963], [18.377410922934612, -34.13652068454806], [18.244499139079917, -33.867751560198023], [18.250080193767442, -33.281430759414434], [17.925190463948436, -32.61129078545342], [18.247909783611185, -32.429131361624563], [18.221761508871477, -31.661632989225662], [17.566917758868861, -30.72572112398754], [17.0644161312627, -29.878641045859158], [17.06291751472622, -29.875953871379977], [16.344976840895239, -28.576705010697697], [16.824017368240899, -28.082161553664466], [17.218928663815401, -28.355943291946804], [17.387497185951499, -28.783514092729774], [17.836151971109526, -28.856377862261311], [18.464899122804745, -29.045461928017271], [19.002127312911082, -28.972443129188857], [19.89473432788861, -28.461104831660769], [19.895767856534427, -24.767790215760588], [20.165725538827186, -24.917961928000768], [20.758609246511831, -25.868136488551446], [20.666470167735437, -26.477453301704916], [20.889609002371731, -26.828542982695907], [21.60589603036939, -26.726533705351748], [22.105968865657864, -26.28025603607913], [22.579531691180584, -25.979447523708142], [22.824271274514896, -25.500458672794768], [23.312096795350179, -25.268689873965712], [23.733569777122703, -25.39012948985161], [24.211266717228792, -25.670215752873567], [25.025170525825782, -25.719670098576891], [25.664666375437712, -25.486816094669706], [25.765848829865206, -25.174845472923671], [25.941652052522151, -24.696373386333214], [26.485753208123292, -24.616326592713097], [26.78640669119741, -24.240690606383478], [27.119409620886238, -23.574323011979772], [28.017235955525244, -22.827753594659072], [29.432188348109033, -22.091312758067584], [29.839036899542965, -22.102216485281172], [30.322883335091767, -22.271611830333931], [30.659865350067083, -22.151567478119912], [31.191409132621278, -22.251509698172395], [31.670397983534645, -23.658969008073861], [31.930588820124242, -24.369416599222532], [31.752408481581874, -25.484283949487406], [31.837777947728057, -25.843331801051342], [31.333157586397899, -25.660190525008943], [31.044079624157146, -25.731452325139436], [30.949666782359905, -26.022649021104144], [30.676608514129633, -26.398078301704604], [30.685961948374477, -26.743845310169526], [31.282773064913325, -27.285879408478991], [31.868060337051073, -27.17792734142127], [32.071665480281062, -26.733820082304902], [32.830120477028878, -26.74219166433619], [32.580264926897677, -27.470157566031808], [32.462132602678444, -28.30101124442055], [32.203388706193032, -28.752404880490065], [31.521001417778869, -29.257386976846245]], [[28.978262566857236, -28.955596612261708], [28.541700066855491, -28.647501722937562], [28.07433841320778, -28.851468601193581], [27.532511020627471, -29.242710870075353], [26.999261915807629, -29.875953871379977], [27.749397006956478, -30.645105889612214], [28.107204624145421, -30.545732110314944], [28.291069370239903, -30.226216729454293], [28.848399692507734, -30.070050551068245], [29.018415154748016, -29.743765557577362], [29.325166456832587, -29.257386976846245], [28.978262566857236, -28.955596612261708]]] } }, + { "type": "Feature", "properties": { "admin": "Zambia", "name": "Zambia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[32.759375441221316, -9.230599053589058], [33.231387973775291, -9.676721693564799], [33.485687697083584, -10.525558770391111], [33.315310499817279, -10.796549981329695], [33.114289178201908, -11.607198174692311], [33.306422153463068, -12.435778090060214], [32.991764357237876, -12.783870537978272], [32.688165317523122, -13.712857761289273], [33.214024692525207, -13.97186003993615], [30.179481235481827, -14.796099134991525], [30.274255812305103, -15.507786960515208], [29.51683434420314, -15.644677829656386], [28.947463413211256, -16.043051446194436], [28.825868768028492, -16.389748630440611], [28.467906121542676, -16.468400160388843], [27.598243442502753, -17.290830580314005], [27.044427117630729, -17.938026218337427], [26.706773309035633, -17.961228936436477], [26.381935255648919, -17.846042168857892], [25.264225701608005, -17.736539808831413], [25.084443393664564, -17.661815687737366], [25.076950310982255, -17.578823337476617], [24.6823490740015, -17.35341073981947], [24.033861525170771, -17.29584319424632], [23.215048455506057, -17.52311614346598], [22.562478468524255, -16.89845142992181], [21.887842644953867, -16.080310153876876], [21.933886346125913, -12.898437188369357], [24.016136508894672, -12.91104623784857], [23.930922072045373, -12.565847670138854], [24.079905226342838, -12.191296888887361], [23.904153680118181, -11.722281589406318], [24.017893507592586, -11.237298272347088], [23.912215203555714, -10.926826267137512], [24.257155389103982, -10.951992689663655], [24.314516228947948, -11.262826429899269], [24.783169793402948, -11.238693536018962], [25.418118116973197, -11.330935967659958], [25.752309604604726, -11.784965101776356], [26.55308759939961, -11.924439792532125], [27.164419793412456, -11.608748467661071], [27.38879886242378, -12.132747491100663], [28.15510867687998, -12.272480564017894], [28.52356163912102, -12.698604424696679], [28.934285922976834, -13.248958428605132], [29.699613885219485, -13.257226657771827], [29.616001417771223, -12.178894545137307], [29.341547885869087, -12.36074391037241], [28.642417433392346, -11.971568698782312], [28.372253045370421, -11.793646742401389], [28.496069777141763, -10.789883721564044], [28.673681674928922, -9.605924981324931], [28.449871046672818, -9.164918308146083], [28.734866570762495, -8.526559340044576], [29.002912225060467, -8.40703175215347], [30.34608605319081, -8.238256524288216], [30.740015496551781, -8.340007419470913], [31.157751336950042, -8.594578747317362], [31.55634809746649, -8.76204884199864], [32.191864861791963, -8.930358981973276], [32.759375441221316, -9.230599053589058]]] } }, + { "type": "Feature", "properties": { "admin": "Zimbabwe", "name": "Zimbabwe", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[31.191409132621278, -22.251509698172395], [30.659865350067083, -22.151567478119912], [30.322883335091767, -22.271611830333931], [29.839036899542965, -22.102216485281172], [29.432188348109033, -22.091312758067584], [28.794656202924209, -21.639454034107445], [28.02137007010861, -21.485975030200578], [27.727227817503252, -20.851801853114711], [27.724747348753247, -20.499058526290387], [27.296504754350501, -20.391519870690995], [26.164790887158478, -19.293085625894935], [25.850391473094724, -18.714412937090533], [25.649163445750155, -18.536025892818987], [25.264225701608005, -17.736539808831413], [26.381935255648919, -17.846042168857892], [26.706773309035633, -17.961228936436477], [27.044427117630729, -17.938026218337427], [27.598243442502753, -17.290830580314005], [28.467906121542676, -16.468400160388843], [28.825868768028492, -16.389748630440611], [28.947463413211256, -16.043051446194436], [29.51683434420314, -15.644677829656386], [30.274255812305103, -15.507786960515208], [30.338954705534537, -15.880839125230242], [31.173063999157673, -15.860943698797868], [31.636498243951188, -16.071990248277881], [31.852040643040592, -16.319417006091374], [32.328238966610222, -16.392074069893749], [32.847638787575839, -16.713398125884613], [32.849860874164385, -17.979057305577175], [32.654885695127142, -18.672089939043492], [32.611994256324884, -19.419382826416268], [32.772707960752619, -19.715592136313294], [32.659743279762573, -20.30429005298231], [32.508693068173436, -20.395292250248303], [32.244988234188007, -21.116488539313689], [31.191409132621278, -22.251509698172395]]] } } + ] + }; + +var randomcountriesData1 = [ + { country: "Iran", "continent": "Asia", "CategoryName": "Books", "Sales": 550 }, + { country: "Benin", "continent": "Africa", "CategoryName": "Books", "Sales": 1000 }, + { country: "China", "continent": "Asia", "CategoryName": "Books", "Sales": 420 }, + { country: "Chile", "continent": "South America", "CategoryName": "Books", "Sales": 1100 }, + { country: "Cuba", "continent": "North America", "CategoryName": "Books", "Sales": 450 }, + { country: "Spain", "continent": "Europe", "CategoryName": "Books", "Sales": 1200 }, + { country: "Fiji", "continent": "Oceania", "CategoryName": "Books", "Sales": 618.0 }, +]; + +module mapcomponenet { + $(function () { + var mapsample = new ej.datavisualization.Map($("#map"), { + enableAnimation: true, + navigationControl: { + enableNavigation: true, + orientation: 'vertical', + absolutePosition: { x: 5, y: 15 }, + dockPosition: 'none' + }, + layers: [ + { + layerType: 'geometry', + enableMouseHover: false, + enableSelection: false, + shapeSettings: { + fill: "#626171", + autoFill: false, + highlightStroke: "white", + stroke: "white", + strokeThickness: 0.5, + highlightColor: "#BFBFBF" + }, + shapeData: world_map, + legendSettings: { dockOnMap: false } + } + ] + }); + }); +} + + + + + + +module MenuComponent { + $(function () { + var sample = new ej.Menu($("#syncfusionProducts"),{ + width: "100%", + animationType: ej.AnimationType.Default, + cssClass: 'gradient-lime ', + enableAnimation: true, + enableSeparator: true, + height: 40, + htmlAttributes: { "aria-label": "menu" }, + menuType: "normalmenu", + orientation: ej.Orientation.Horizontal, + showRootLevelArrows: true, + showSubLevelArrows: true, + subMenuDirection: ej.Direction.Right, + titleText: "Menu", + }); + }); +} + + + +module NavigationDrawerComponent { + $(function () { + var navigationdrawerInstance = new ej.NavigationDrawer($("#navpane"), { + targetId: "butdrawer", + contentId: "content_container", + type: "overlay", + direction: "left", + enableListView: true, + listViewSettings: { + width: 300, + selectedItemIndex: 0 + }, + position: "normal" + }); + $("#navpane_listview").click(function(e: any) { + var text=e.target["text"]||$(e.target).closest("li.e-list").text(); + $("#butdrawer").parent().children("h2").text(text); + }); + }); +} + + + +module PDFViewerComponent { + $(function () { + var pdfviewerControl = new ej.PdfViewer($("#pdfviewer"), { + serviceUrl:(window).baseurl+ "api/PdfViewer", + isResponsive: true + }); + }); +} + + + +module PivotChartOlap { + $(function () { + var sample = new ej.PivotChart($("#PivotChart"),{ + dataSource: { + data: "//bi.syncfusion.com/olap/msmdpump.dll", + catalog: "Adventure Works DW 2008 SE", + cube: "Adventure Works", + rows: [ + { + fieldName: "[Date].[Fiscal]" + } + ], + columns: [ + { + fieldName: "[Customer].[Customer Geography]" + } + ], + values: [ + { + measures: [ + { + fieldName: "[Measures].[Internet Sales Amount]" + } + ], + axis: "columns" + } + ], + filters:[] + }, + isResponsive: true,zooming:{enableScrollbar: true}, + commonSeriesOptions: { + type: "column" + }, + size: { height: "460px", width: "100%" }, + primaryXAxis: { title: { text: "Date - Fiscal" }, labelRotation: 0 }, + primaryYAxis: { title: { text: "Internet Sales Amount" } }, + legend: { visible: true, rowCount: 2 }, + load: function () { + var PivotChart = (window).themeStyle + (window).themeColor + (window).themeVarient; + PivotChart = PivotChart.toString(); + if (PivotChart.indexOf("dark") > -1 || PivotChart.indexOf("contrast") > -1) + PivotChart = "flatdark"; + else + PivotChart = "flatlight"; + this.model.theme = PivotChart; + }, + }); + }); +} + + + +var pivot_dataset = [ + { Amount: 100, Country: "Canada", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Alberta" }, + { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Van", Quantity: 3, State: "British Columbia" }, + { Amount: 300, Country: "Canada", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Brunswick" }, + { Amount: 150, Country: "Canada", Date: "FY 2008", Product: "Bike", Quantity: 3, State: "Manitoba" }, + { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Car", Quantity: 4, State: "Ontario" }, + { Amount: 100, Country: "Canada", Date: "FY 2007", Product: "Van", Quantity: 1, State: "Quebec" }, + { Amount: 200, Country: "France", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Charente-Maritime" }, + { Amount: 250, Country: "France", Date: "FY 2006", Product: "Van", Quantity: 4, State: "Essonne" }, + { Amount: 300, Country: "France", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Garonne (Haute)" }, + { Amount: 150, Country: "France", Date: "FY 2008", Product: "Van", Quantity: 2, State: "Gers" }, + { Amount: 200, Country: "Germany", Date: "FY 2006", Product: "Van", Quantity: 3, State: "Bayern" }, + { Amount: 250, Country: "Germany", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Brandenburg" }, + { Amount: 150, Country: "Germany", Date: "FY 2008", Product: "Car", Quantity: 4, State: "Hamburg" }, + { Amount: 200, Country: "Germany", Date: "FY 2008", Product: "Bike", Quantity: 4, State: "Hessen" }, + { Amount: 150, Country: "Germany", Date: "FY 2007", Product: "Van", Quantity: 3, State: "Nordrhein-Westfalen" }, + { Amount: 100, Country: "Germany", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Saarland" }, + { Amount: 150, Country: "United Kingdom", Date: "FY 2008", Product: "Bike", Quantity: 5, State: "England" }, + { Amount: 250, Country: "United States", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Alabama" }, + { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Van", Quantity: 4, State: "California" }, + { Amount: 100, Country: "United States", Date: "FY 2006", Product: "Bike", Quantity: 2, State: "Colorado" }, + { Amount: 150, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "New Mexico" }, + { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Bike", Quantity: 4, State: "New York" }, + { Amount: 250, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "North Carolina" }, + { Amount: 300, Country: "United States", Date: "FY 2007", Product: "Van", Quantity: 4, State: "South Carolina" } +] + +module PivotChartRelational { + + $(function () { + var sample = new ej.PivotChart($("#PivotChart"),{ + dataSource: { + data: pivot_dataset, + rows: [ + { + fieldName: "Country", + fieldCaption: "Country" + }, + { + fieldName: "State", + fieldCaption: "State" + }, + { + fieldName: "Date", + fieldCaption: "Date" + } + ], + columns: [ + { + fieldName: "Product", + fieldCaption: "Product" + } + ], + values: [ + { + fieldName: "Amount", + fieldCaption: "Amount" + } + ], + filters:[] + }, + isResponsive: true,zooming:{enableScrollbar: true}, + commonSeriesOptions: { + type: "column" + }, + size: { height: "460px", width: "100%" }, + primaryYAxis: { title: { text: "Amount" } }, + legend: { visible: true }, + load: function () { + var PivotChart = (window).themeStyle + (window).themeColor + (window).themeVarient; + PivotChart = PivotChart.toString(); + if (PivotChart.indexOf("dark") > -1 || PivotChart.indexOf("contrast") > -1) + PivotChart = "flatdark"; + else + PivotChart = "flatlight"; + this.model.theme = PivotChart; + }, + }); + }); +} + + + +module PivotGaugeOlap { + + $(function () { + var sample = new ej.PivotGauge($("#PivotGauge"),{ + dataSource: { + data: "//bi.syncfusion.com/olap/msmdpump.dll", + catalog: "Adventure Works DW 2008 SE", + cube: "Adventure Works", + rows: [ + { + fieldName: "[Date].[Fiscal]", + filterItems: { filterType: "include", values: ["[Date].[Fiscal].[Fiscal Year].&[2004]"] } + }, + ], + columns: [ + { + fieldName: "[Customer].[Customer Geography]" + } + ], + values: [ + { + measures: [ + { + fieldName: "[Measures].[Internet Sales Amount]" + }, + { + fieldName: "[Measures].[Internet Revenue Status]" + }, + { + fieldName: "[Measures].[Internet Revenue Trend]" + }, + { + fieldName: "[Measures].[Internet Revenue Goal]" + }, + ], + axis: "columns" + } + ], + filters:[] + }, + enableTooltip: true, isResponsive: true, + labelFormatSettings: { decimalPlaces: 2 }, + scales: [{ + showRanges: true, + radius: 150, showScaleBar: true, size: 1, + border: { + width: 0.5 + }, + showIndicators: true, showLabels: true, + pointers: [{ + showBackNeedle: true, + backNeedleLength: 20, + length: 120, + width: 7 + }, + { + type: "marker", + markerType: "diamond", + distanceFromScale: 5, + placement: "center", + backgroundColor: "#29A4D9", + length: 25, + width: 15 + }], + ticks: [{ + type: "major", + distanceFromScale: 2, + height: 16, + width: 1, color: "#8c8c8c" + }, + { + type: "minor", + height: 6, + width: 1, + distanceFromScale: 2, + color: "#8c8c8c" + }], + labels: [{ + color: "#8c8c8c" + }], + ranges: [{ + distanceFromScale: -5, + backgroundColor: "#fc0606", + border: { color: "#fc0606" } + }, + { + distanceFromScale: -5 + }], + customLabels: [{ + position: { x: 180, y: 290 }, + font: { size: "10px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" + }, + { + position: { x: 180, y: 320 }, + font: { size: "10px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" + }, + { + position: { x: 180, y: 150 }, + font: { size: "12px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" + }] + }] + }); + }); +} + + + +var pivot_dataset = [ + { Amount: 100, Country: "Canada", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Alberta" }, + { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Van", Quantity: 3, State: "British Columbia" }, + { Amount: 300, Country: "Canada", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Brunswick" }, + { Amount: 150, Country: "Canada", Date: "FY 2008", Product: "Bike", Quantity: 3, State: "Manitoba" }, + { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Car", Quantity: 4, State: "Ontario" }, + { Amount: 100, Country: "Canada", Date: "FY 2007", Product: "Van", Quantity: 1, State: "Quebec" }, + { Amount: 200, Country: "France", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Charente-Maritime" }, + { Amount: 250, Country: "France", Date: "FY 2006", Product: "Van", Quantity: 4, State: "Essonne" }, + { Amount: 300, Country: "France", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Garonne (Haute)" }, + { Amount: 150, Country: "France", Date: "FY 2008", Product: "Van", Quantity: 2, State: "Gers" }, + { Amount: 200, Country: "Germany", Date: "FY 2006", Product: "Van", Quantity: 3, State: "Bayern" }, + { Amount: 250, Country: "Germany", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Brandenburg" }, + { Amount: 150, Country: "Germany", Date: "FY 2008", Product: "Car", Quantity: 4, State: "Hamburg" }, + { Amount: 200, Country: "Germany", Date: "FY 2008", Product: "Bike", Quantity: 4, State: "Hessen" }, + { Amount: 150, Country: "Germany", Date: "FY 2007", Product: "Van", Quantity: 3, State: "Nordrhein-Westfalen" }, + { Amount: 100, Country: "Germany", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Saarland" }, + { Amount: 150, Country: "United Kingdom", Date: "FY 2008", Product: "Bike", Quantity: 5, State: "England" }, + { Amount: 250, Country: "United States", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Alabama" }, + { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Van", Quantity: 4, State: "California" }, + { Amount: 100, Country: "United States", Date: "FY 2006", Product: "Bike", Quantity: 2, State: "Colorado" }, + { Amount: 150, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "New Mexico" }, + { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Bike", Quantity: 4, State: "New York" }, + { Amount: 250, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "North Carolina" }, + { Amount: 300, Country: "United States", Date: "FY 2007", Product: "Van", Quantity: 4, State: "South Carolina" } +] + +module PivotGaugeRelational { + $(function () { + var sample = new ej.PivotGauge($("#PivotGauge"),{ + dataSource: { + data: pivot_dataset, + rows: [ + { + fieldName: "Country", + }, + { + fieldName: "State", + } + ], + columns: [ + { + fieldName: "Product", + } + ], + values: [ + { + fieldName: "Amount", + }, + { + fieldName: "Quantity", + } + ] + }, + enableTooltip: true, isResponsive: true, + labelFormatSettings: { decimalPlaces: 2 }, + scales: [{ + showRanges: true, + radius: 150, showScaleBar: true, size: 1, + border: { + width: 0.5 + }, + showIndicators: true, showLabels: true, + pointers: [{ + showBackNeedle: true, + backNeedleLength: 20, + length: 120, + width: 7 + }, + { + type: "marker", + markerType: "diamond", + distanceFromScale: 5, + placement: "center", + backgroundColor: "#29A4D9", + length: 25, + width: 15 + }], + ticks: [{ + type: "major", + distanceFromScale: 2, + height: 16, + width: 1, color: "#8c8c8c" + }, + { + type: "minor", + height: 6, + width: 1, + distanceFromScale: 2, + color: "#8c8c8c" + }], + labels: [{ + color: "#8c8c8c" + }], + ranges: [{ + distanceFromScale: -5, + backgroundColor: "#fc0606", + border: { color: "#fc0606" } + }, + { + distanceFromScale: -5 + }], + customLabels: [{ + position: { x: 180, y: 290 }, + font: { size: "10px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" + }, + { + position: { x: 180, y: 320 }, + font: { size: "10px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" + }, + { + position: { x: 180, y: 150 }, + font: { size: "12px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" + }] + }] + }); + }); +} + + + +module PivotGridOlap { + + $(function () { + var sample = new ej.PivotGrid($("#PivotGrid"),{ + dataSource: { + data: "//bi.syncfusion.com/olap/msmdpump.dll", + catalog: "Adventure Works DW 2008 SE", + cube: "Adventure Works", + rows: [ + { + fieldName: "[Date].[Fiscal]" + } + ], + columns: [ + { + fieldName: "[Customer].[Customer Geography]" + } + ], + values: [ + { + measures: [ + { + fieldName: "[Measures].[Internet Sales Amount]", + } + ], + axis: "columns" + } + ], + filters:[] + }, + enableGroupingBar: true, + pivotTableFieldListID:"PivotSchemaDesigner" + }); + $("#PivotSchemaDesigner").ejPivotSchemaDesigner(); + }); +} + + + +var pivot_dataset = [ + { Amount: 100, Country: "Canada", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Alberta" }, + { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Van", Quantity: 3, State: "British Columbia" }, + { Amount: 300, Country: "Canada", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Brunswick" }, + { Amount: 150, Country: "Canada", Date: "FY 2008", Product: "Bike", Quantity: 3, State: "Manitoba" }, + { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Car", Quantity: 4, State: "Ontario" }, + { Amount: 100, Country: "Canada", Date: "FY 2007", Product: "Van", Quantity: 1, State: "Quebec" }, + { Amount: 200, Country: "France", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Charente-Maritime" }, + { Amount: 250, Country: "France", Date: "FY 2006", Product: "Van", Quantity: 4, State: "Essonne" }, + { Amount: 300, Country: "France", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Garonne (Haute)" }, + { Amount: 150, Country: "France", Date: "FY 2008", Product: "Van", Quantity: 2, State: "Gers" }, + { Amount: 200, Country: "Germany", Date: "FY 2006", Product: "Van", Quantity: 3, State: "Bayern" }, + { Amount: 250, Country: "Germany", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Brandenburg" }, + { Amount: 150, Country: "Germany", Date: "FY 2008", Product: "Car", Quantity: 4, State: "Hamburg" }, + { Amount: 200, Country: "Germany", Date: "FY 2008", Product: "Bike", Quantity: 4, State: "Hessen" }, + { Amount: 150, Country: "Germany", Date: "FY 2007", Product: "Van", Quantity: 3, State: "Nordrhein-Westfalen" }, + { Amount: 100, Country: "Germany", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Saarland" }, + { Amount: 150, Country: "United Kingdom", Date: "FY 2008", Product: "Bike", Quantity: 5, State: "England" }, + { Amount: 250, Country: "United States", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Alabama" }, + { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Van", Quantity: 4, State: "California" }, + { Amount: 100, Country: "United States", Date: "FY 2006", Product: "Bike", Quantity: 2, State: "Colorado" }, + { Amount: 150, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "New Mexico" }, + { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Bike", Quantity: 4, State: "New York" }, + { Amount: 250, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "North Carolina" }, + { Amount: 300, Country: "United States", Date: "FY 2007", Product: "Van", Quantity: 4, State: "South Carolina" } +] + +module PivotGridRelational { + $(function () { + var sample = new ej.PivotGrid($("#PivotGrid"),{ + dataSource: { + data: pivot_dataset, + rows: [ + { + fieldName: "Country", + fieldCaption: "Country" + }, + { + fieldName: "State", + fieldCaption: "State" + } + ], + columns: + [{ + fieldName: "Product", + fieldCaption: "Product" + } + ], + values: [ + { + fieldName: "Amount", + fieldCaption: "Amount" + }, + { + fieldName: "Quantity", + fieldCaption: "Quantity" + } + ], + filters:[] + }, + enableGroupingBar: true, + pivotTableFieldListID:"PivotSchemaDesigner" + }); + $("#PivotSchemaDesigner").ejPivotSchemaDesigner(); + }); +} + + + +module PivotTreeMap { + $(function () { + var sample = new ej.PivotTreeMap($("#PivotTreeMap"),{ + dataSource: { + data: "//bi.syncfusion.com/olap/msmdpump.dll;Locale Identifier=1033;", + catalog: "Adventure Works DW 2008 SE", + cube: "Adventure Works", + rows: [ + { + fieldName: "[Customer].[Customer Geography]" + } + ], + columns: [ + { + fieldName: "[Date].[Fiscal]" + } + ], + values: [ + { + measures: [ + { + fieldName: "[Measures].[Customer Count]", + } + ], + axis: "columns" + } + ], + filters:[] + } + }); + }); +} + + + +module ProgressBarComponent { + $(function () { + var sample = new ej.ProgressBar($("#progressBar"),{ + width: 200, + value: 45, + height: 20, + enablePersistence: true, + maxValue: 200, + minValue: 0, + showRoundedCorner: true, + text: 'loading...' + }); + }); + +} + + + + +declare var rteObj: any; +declare var data: any; +var radialEle = $('#defaultradialmenu'), action = 0, forRedo = 0; +var rteEle = $("#rteSample1"); +module RadialMenuComponent { + $(function () { + + if (!(ej.browserInfo().name == "msie" && parseInt(ej.browserInfo().version) < 9)) { + var radialmenuInstance = new ej.RadialMenu($("#defaultradialmenu"), { + imageClass: "imageclass", + backImageClass: "backimageclass", + targetElementId: "radialtarget1" + }); + $("#radialtarget1").parent().css("position", "relative"); + } + else { + $("#contentDiv").html("Radial Menu is only supported from Internet Explorer Versioned 9 and above.").css({ "font-size": "20px", "color": "red" }); + } + var rteInstance = new ej.RTE($("#rteSample1"), { + width: "100%", + minWidth: "10px", + change: (e) => { radialEle.ejRadialMenu("enableItem", "Undo"); }, + select: (e) => { + var target = $("#radialtarget1"), radialRadius = 150, radialDiameter = 2 * radialRadius, + // To get Iframe positions + iframeY = e.event.clientY, iframeX = e.event.clientX, + // To set Radial Menu position within target + x = iframeX > target.width() - radialRadius ? target.width() - radialDiameter : (iframeX > radialRadius ? iframeX - radialRadius : 0), + y = iframeY > target.height() - radialRadius ? target.height() - radialDiameter : (iframeY > radialRadius ? iframeY - radialRadius : 0); + radialEle.ejRadialMenu("setPosition", x, y); + radialEle.focus(); + $('iframe').contents().find('body').blur(); + }, + showToolbar: false, + showContextMenu: false + }); + $(window).resize(function () { + if (ej.isMobile() && ej.isPortrait()) + $('#defaultradialmenu').css({ "left": 25 }); + }); + }); +} + +function bold(e: any) { + + rteObj = rteEle.data("ejRTE"); + rteObj.executeCommand("bold"); + data = rteObj._getSelectedHtmlString() ? true : false; + if (data) action += 1; + forRedo = action; + radialEle.focus(); +} +function italic(e: any) { + rteObj = rteEle.data("ejRTE"); + rteObj.executeCommand("italic"); + data = rteObj._getSelectedHtmlString() ? true : false; + if (data) action += 1; + forRedo = action; + radialEle.focus(); +} +function undo(e: any) { + rteObj = rteEle.data("ejRTE"); + rteObj.executeCommand("undo"); + action -= 1; + if (action == 0) + radialEle.ejRadialMenu("disableItem", "Undo"); + radialEle.ejRadialMenu("enableItem", "Redo"); + radialEle.focus(); +} +function redo(e: any) { + rteObj = rteEle.data("ejRTE"); + rteObj.executeCommand("redo"); + action += 1; + if (forRedo == action) radialEle.ejRadialMenu("disableItem", "Redo"); + radialEle.ejRadialMenu("enableItem", "Undo"); + radialEle.focus(); +} + + + +module RadialSliderComponent { + $(function () { + var radialsliderInstance = new ej.RadialSlider($("#radialSlider"), { + innerCircleImageUrl: "images/radialslider/chevron-right.png" + }); + }); +} + + +module rangecomponent { + $(function () { + var linearsample = new ej.datavisualization.RangeNavigator($("#RangeNavigator"), { + enableDeferredUpdate: true, + padding: "15", + allowSnapping: true, + selectedRangeSettings: { + start: "2010/5/1", end: "2011/10/1" + }, + isResponsive: true, + tooltipSettings: { + visible: true, labelFormat: "MM/dd/yyyy", backgroundColor: "gray", tooltipDisplayMode: "ondemand" + }, + load: () => { + var rn = $("#RangeNavigator").data("ejRangeNavigator"); + rn.model.series = [ + { + type: 'line', + dataSource: data.Open, xName: "XValue", yName: "YValue", + fill: '#69D2E7' + } + ]; + }, + loaded: function () { + var sender = $("#RangeNavigator").data("ejRangeNavigator"); + var theme = (window).themeStyle + (window).themeColor + (window).themeVarient; + if (theme) { + switch (theme) { + case "flatazurelight": + theme = "azurelight"; + break; + case "flatlimelight": + theme = "limelight"; + break; + case "flatsaffronlight": + theme = "saffronlight"; + break; + case "gradientazurelight": + theme = "gradientazure"; + break; + case "gradientlimelight": + theme = "gradientlime"; + break; + case "gradientsaffronlight": + theme = "gradientsaffron"; + break; + case "flatazuredark": + theme = "azuredark"; + break; + case "flatlimedark": + theme = "limedark"; + break; + case "flatsaffrondark": + theme = "saffrondark"; + break; + case "gradientazuredark": + theme = "gradientazuredark"; + break; + case "gradientlimedark": + theme = "gradientlimedark"; + break; + case "gradientsaffrondark": + theme = "gradientsaffrondark"; + break; + case "flathigh-contrast-01dark": + theme = "highcontrast01"; + break; + case "flathigh-contrast-02dark": + theme = "highcontrast02"; + break; + case "flatmateriallight": + theme = "material"; + break; + case "flatoffice-365light": + theme = "office"; + break; + default: + theme = "flatlight"; + break; + } + sender.model.theme = theme; + } + } + + }); + }); +} +var data; +data = GetData(); + +function GetData() { + var series1:any[]=[]; + var series2:any[]= []; + var value = 100; + var value1 = 120; + for (var i = 1; i < 730; i++) { + + if (Math.random() > .5) { + value += Math.random(); + value1 += Math.random(); + } else { + value -= Math.random(); + value1 -= Math.random(); + } + var point1 = { XValue: new Date(2010, 0, i), YValue: value }; + var point2 = { XValue: new Date(2010, 0, i), YValue: value1 }; + series1.push(point1); + series2.push(point2); + } + + data = { Open: series1, Close: series2 }; + return data; +}; + + + +module RatingComponent { + $(function () { + + var sample1 = new ej.Rating($("#fullRating"),{ + value: 4, + precision: ej.Rating.Precision.Full, + allowReset: true, + cssClass: "gradient-lime", + enabled: true, + enablePersistence: true, + incrementStep: 2, + maxValue: 10, + minValue: 0, + orientation: ej.Orientation.Horizontal, + shapeHeight: 25, + shapeWidth: 25, + showTooltip: true + }); + + var sample2 = new ej.Rating($("#halfRating"),{ + precision: ej.Rating.Precision.Half, + value: 3.5, + allowReset: true, + cssClass: "gradient-lime", + enabled: true, + enablePersistence: true, + incrementStep: 2, + maxValue: 10, + minValue: 0, + orientation: "horizontal", + shapeHeight: 25, + shapeWidth: 25, + showTooltip: true + }); + + var sample3 = new ej.Rating($("#exactRating"),{ + precision: ej.Rating.Precision.Exact, + value: 3.7, + allowReset: true, + cssClass: "gradient-lime", + enabled: true, + enablePersistence: true, + incrementStep: 2, + maxValue: 10, + minValue: 0, + orientation: "horizontal", + shapeHeight: 25, + shapeWidth: 25, + showTooltip: true + }); + }); +} + + + +module ReportViewerComponent { + $(function () { + var report = new ej.ReportViewer($("#DefaultReportViewer"), { + reportServiceUrl: (window).baseurl + 'api/ReportViewer', + processingMode: ej.ReportViewer.ProcessingMode.Remote, + reportPath: "ConditionalFormating.rdl", + isResponsive: true + }); + }); +} + + + +var fontfamily = ["Segoe UI", "Arial", "Times New Roman", "Tahoma", "Helvetica"], fontsize = ["1pt", "2pt", "3pt", "4pt", "5pt"], action1 = ["New", "Clear"], action2 = ["Bold", "Italic", "Underline", "strikethrough", "superscript", "subscript", "JustifyLeft", "JustifyCenter", "JustifyRight", "JustifyFull", "Undo", "Redo"]; +module RibbonComponent { + $(function () { + var sample = new ej.Ribbon($("#defaultRibbon"), { + width: "100%", + expandPinSettings: { + toolTip: "Collapse the Ribbon" + }, + collapsePinSettings: { + toolTip: "Pin the Ribbon" + }, + applicationTab: { + type: ej.Ribbon.ApplicationTabType.Menu, menuItemID: "ribbonmenu", menuSettings: { openOnClick: false } + }, + tabs: [{ + id: "home", text: "HOME", groups: [{ + text: "New", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "new", + text: "New", + toolTip: "New", + buttonSettings: { + contentType: ej.ContentType.ImageOnly, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-new", + click: "onClick" + } + } + ], + defaults: { + type: "button", + width: 60, + height: 70 + } + }] + }, + { + text: "Clipboard", alignType: ej.Ribbon.AlignType.Columns, content: [{ + groups: [{ + id: "paste", + text: "paste", + toolTip: "Paste", + splitButtonSettings: { + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-ribbonpaste", + targetID: "pasteSplit", + buttonMode: "dropdown", + click: "onClick", + arrowPosition: ej.ArrowPosition.Bottom + } + } + ], + defaults: { + type: "splitbutton", + width: 50, + height: 70 + } + }, + { + groups: [{ + id: "cut", + text: "Cut", + toolTip: "Cut", + buttonSettings: { + contentType: ej.ContentType.TextAndImage, + click: "onClick", + prefixIcon: "e-icon e-ribbon e-ribboncut" + } + }, + { + id: "copy", + text: "Copy", + toolTip: "Copy", + buttonSettings: { + contentType: ej.ContentType.TextAndImage, + click: "onClick", + prefixIcon: "e-icon e-ribbon e-ribboncopy" + } + }, + { + id: "clear", + text: "Clear", + toolTip: "Clear All", + buttonSettings: { + contentType: ej.ContentType.TextAndImage, + click: "onClick", + prefixIcon: "e-icon e-ribbon clearAll" + } + }], + defaults: { + type: "button", + width: 60, + isBig: false + } + }] + }, + { + text: "Font", alignType: "rows", content: [{ + groups: [{ + id: "fontfamily", + toolTip: "Font", + dropdownSettings: { + dataSource: fontfamily, + text: "Segoe UI", + select: "onClick", + width: 150 + } + }, + { + id: "fontsize", + toolTip: "FontSize", + dropdownSettings: { + dataSource: fontsize, + text: "1pt", + select: "onClick", + width: 65 + } + }], + defaults: { + type: "dropdownlist", + height: 28 + } + }, + { + groups: [{ + id: "bold", + toolTip: "Bold", + type: ej.Ribbon.Type.ToggleButton, + toggleButtonSettings: { + contentType: ej.ContentType.ImageOnly, + defaultText: "Bold", + activeText: "Bold", + click: "onClick", + defaultPrefixIcon: "e-icon e-ribbon bold", + activePrefixIcon: "e-icon e-ribbon bold" + } + }, + { + id: "italic", + toolTip: "Italic", + type: ej.Ribbon.Type.ToggleButton, + toggleButtonSettings: { + contentType: ej.ContentType.ImageOnly, + defaultText: "Italic", + activeText: "Italic", + click: "onClick", + defaultPrefixIcon: "e-icon e-ribbon e-ribbonitalic", + activePrefixIcon: "e-icon e-ribbon e-ribbonitalic" + } + }, + { + id: "underline", + text: "Underline", + toolTip: "Underline", + type: ej.Ribbon.Type.ToggleButton, + toggleButtonSettings: { + contentType: ej.ContentType.ImageOnly, + defaultText: "Underline", + activeText: "Underline", + click: "onClick", + defaultPrefixIcon: "e-icon e-ribbon e-ribbonunderline", + activePrefixIcon: "e-icon e-ribbon e-ribbonunderline" + } + }, + { + id: "strikethrough", + text: "strikethrough", + toolTip: "Strikethrough", + type: ej.Ribbon.Type.ToggleButton, + toggleButtonSettings: { + contentType: ej.ContentType.ImageOnly, + defaultText: "Strikethrough", + activeText: "Strikethrough", + click: "onClick", + defaultPrefixIcon: "e-icon e-ribbon strikethrough", + activePrefixIcon: "e-icon e-ribbon strikethrough" + } + }, + { + id: "superscript", + text: "superscript", + toolTip: "Superscript", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-superscripticon" + } + }, + { + id: "subscript", + text: "subscript", + toolTip: "Subscript", + enableSeparator: true, + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-subscripticon" + } + }, + { + id: "fontcolor", + text: "Font Color", + toolTip: "Font Color", + type: ej.Ribbon.Type.Custom, + contentID: "fontcolor" + }, + { + id: "fillcolor", + text: "Fill Color", + toolTip: "Fill Color", + type: ej.Ribbon.Type.Custom, + contentID: "fillcolor" + } + ], + defaults: { + isBig: false + } + }] + }, + { + text: "Alignment", alignType: ej.Ribbon.AlignType.Rows, content: [ + { + groups: [{ + id: "bullet", + text: "Bullet Format", + toolTip: "Bullets", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-bullet" + } + }, + { + id: "number", + text: "Number Format", + toolTip: "Numbering", + enableSeparator: true, + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-numbericon" + } + }, + { + id: "textindent", + text: "Indent", + toolTip: "Text Indent", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-indent" + } + }, + { + id: "textoudent", + text: "Outdent", + toolTip: "Text Outdent", + enableSeparator: true, + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-outdent" + } + }, + { + id: "sortascending", + text: "Sort", + toolTip: "Sort", + enableSeparator: true, + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-sort" + } + }, + { + id: "border", + text: "Border", + toolTip: "Border", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-border" + } + }], + defaults: { + type: "button", + isBig: false + } + }, + { + groups: [{ + id: "alignleft", + text: "JustifyLeft", + toolTip: "Align Left", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon alignleft" + } + }, + { + id: "aligncenter", + text: "JustifyCenter", + toolTip: "Align Center", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon aligncenter" + } + }, + { + id: "alignright", + text: "JustifyRight", + toolTip: "Align Right", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon alignright" + } + }, + { + id: "justify", + text: "JustifyFull", + toolTip: "Justify", + enableSeparator: true, + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon justify" + } + }, + { + id: "uppercase", + text: "Upper Case", + toolTip: "Upper Case", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-uppercase" + } + }, + { + id: "lowercase", + text: "Lower Case", + toolTip: "Lower Case", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-lowercase" + } + }], + defaults: { + type: "button", + isBig: false + } + }] + }, + { + text: "Actions", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "undo", + text: "Undo", + toolTip: "Undo", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-undo" + } + }, + { + id: "redo", + text: "Redo", + toolTip: "Redo", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-redo" + } + } + ], + defaults: { + type: "button", + width: 40, + height: 70 + } + }] + }, + { + text: "View", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "zoomin", + text: "Zoom In", + toolTip: "Zoom In", + buttonSettings: { + width: 58, + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-zoomin" + } + }, + { + id: "zoomout", + text: "Zoom Out", + toolTip: "Zoom Out", + buttonSettings: { + width: 70, + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-zoomout" + } + }, + { + id: "fullscreen", + text: "Full Screen", + toolTip: "Full Screen", + buttonSettings: { + width: 73, + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-fullscreen" + } + } + ], + defaults: { + type: "button", + height: 70 + } + }] + }] + },{ + id: "insert", text: "INSERT", groups: [{ + text: "Tables", alignType: ej.Ribbon.AlignType.Columns, content: [{ + groups: [{ + id: "tables", + text: "Tables", + toolTip: "Tables", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-table" + } + } + ], + defaults: { + type: "button", + width: 50, + height: 70 + } + }] + }, + { + text: "Illustrations", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "pictures", + text: "Pictures", + toolTip: "Pictures", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-picture" + } + }, + { + id: "videos", + text: "Videos", + toolTip: "Videos", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-video" + } + }, + { + id: "shapes", + text: "Shapes", + toolTip: "Shapes", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-shape" + } + }, + { + id: "charts", + text: "Charts", + toolTip: "Charts", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-chart" + } + } + ], + defaults: { + type: "button", + width: 56, + height: 70 + } + }] + }, + { + text: "Comments", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "comments", + text: "Comments", + toolTip: "Comments", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-comment" + } + } + ], + defaults: { + type: "button", + width: 70, + height: 70 + } + }] + }, + { + text: "Text", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "text", + text: "Text", + toolTip: "Text", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-text", + width: 50 + } + }, + { + id: "datetime", + text: "Date Time", + toolTip: "DateTime", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-datetimenew" + } + } + ], + defaults: { + type: "button", + width: 70, + height: 70 + } + }] + }, + { + text: "Hyperlink", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "hyperlink", + text: "Hyperlink", + toolTip: "Hyperlink", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-hyperlink" + } + } + ], + defaults: { + type: "button", + width: 70, + height: 70 + } + }] + }, + { + text: "Equation", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "equation", + text: "Equation", + toolTip: "Equation", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-equation" + } + } + ], + defaults: { + type: "button", + width: 60, + height: 70 + } + }] + }, + { + text: "Print Layout", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "printlayout", + text: "Print Layout", + toolTip: "Print Layout", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-printlayout" + } + } + ], + defaults: { + type: "button", + width: 80, + height: 70 + } + }] + }, + { + text: "Save", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "print", + text: "Print", + toolTip: "Print", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-print" + } + }, + { + id: "save", + text: "Save", + toolTip: "Save", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-save" + } + } + ], + defaults: { + type: "button", + width: 50, + height: 70 + } + }] + } + ] + } + ], + create: function createControl(args) { + var ribbon = $("#defaultRibbon").data("ejRibbon"); + $("#fontcolor").ejColorPicker({ value: "#FFFF00", modelType: "palette", cssClass: "e-ribbon", toolIcon: "e-fontcoloricon", select: colorHandler }); + $("#fillcolor").ejColorPicker({ value: "#FF0000", modelType: "palette", cssClass: "e-ribbon", toolIcon: "e-fillcoloricon", select: colorHandler }); + } + }); + }); +} +function colorHandler(args:any) { + (this._id.indexOf("fillcolor") != -1) ? $("#contenteditor").css('background-color', args.value) : document.execCommand('forecolor', false, args.value); +} +function onClick(args:any) { + let val:any, prop = args.text; + val = (ej.isNullOrUndefined(args.model.text)) ? args.model.activeText : args.model.text; + if (action1.indexOf(val) != -1) + $("#contenteditor").empty(); + else if (action2.indexOf(val) != -1) + document.execCommand(val, false, null); + else if (fontfamily.indexOf(prop) != -1) + document.execCommand("FontName", false, prop); + else if (fontsize.indexOf(prop) != -1) + document.execCommand("FontSize", false, prop.replace("pt", "")); + else + $("#contenteditor").append("

    Action: " + val + " Triggered

    "); +} + + + +module RotatorComponent { + $(function () { + var rotatorInstance = new ej.Rotator($("#sliderContent"), { + slideWidth: "100%", + frameSpace: "0px", + slideHeight: "auto", + displayItemsCount: "1", + navigateSteps: "1", + pagerPosition:"outside", + orientation: "horizontal", + showPager: true, + enabled: true, + showCaption: true, + allowKeyboardNavigation: true, + showPlayButton: true, + isResponsive:true, + animationType: "slide", + }); + }); +} + + + +module RTEComponent { + $(function () { + var sample = new ej.RTE($("#rteSample"),{ + width: "100%", + minWidth: "150px", + showFooter: true, + showHtmlSource: true, + allowEditing: true, + allowKeyboardNavigation: true, + autoFocus: true, + autoHeight: true, + colorPaletteColumns: 10, + colorPaletteRows: 5, + cssClass: 'gradient-lime', + enableResize: true, + enableTabKeyNavigation: true, + fileBrowser: { + filePath: (window).baseurl + "Content/FileBrowser/", + extensionAllow: "*.png, *.doc, *.pdf, *.txt, *.docx", + ajaxAction: (window).baseurl + "api/FileExplorer/FileOperations" + }, + imageBrowser: { + filePath: (window).baseurl + "Content/FileBrowser/", + extensionAllow: "*.png, *.gif, *.jpg, *.jpeg, *.docx", + ajaxAction: (window).baseurl + "api/FileExplorer/FileOperations" + }, + isResponsive: true, + showClearAll: true, + showClearFormat: true, + showDimensions: true, + showCharCount: true, + tools: { + formatStyle: ["format"], + edit: ["findAndReplace"], + font: ["fontName", "fontSize", "fontColor", "backgroundColor"], + style: ["bold", "italic", "underline", "strikethrough"], + alignment: ["justifyLeft", "justifyCenter", "justifyRight", "justifyFull"], + lists: ["unorderedList", "orderedList"], + clipboard: ["cut", "copy", "paste"], + doAction: ["undo", "redo"], + indenting: ["outdent", "indent"], + clear: ["clearFormat", "clearAll"], + links: ["createLink", "removeLink"], + images: ["image"], + media: ["video"], + tables: ["createTable", "addRowAbove", "addRowBelow", "addColumnLeft", "addColumnRight", "deleteRow", "deleteColumn", "deleteTable"], + effects: ["superscript", "subscript"], + casing: ["upperCase", "lowerCase"], + view: ["fullScreen", "zoomIn", "zoomOut"], + print: ["print"], + customUnorderedList: [{ + name: "unOrderInsert", + tooltip: "Custom UnOrderList", + css: "e-rte-toolbar-icon e-rte-unlistitems customUnOrder", + text: "Smiley", + listImage: "url('../content/images/rte/Smiley-GIF.gif')" + }], + customOrderedList: [{ + name: "orderInsert", + tooltip: "Custom OrderList", + css: "e-rte-toolbar-icon e-rte-listitems customOrder", + text: "Lower-Greek", + listStyle: "lower-greek" + }] + } + }); + }); + +} + + + +module ScheduleComponent { + $(function () { + var sample = new ej.Schedule($("#Schedule1"), { + width: "100%", + height: "525px", + currentDate: new Date(2017, 5, 5), + timeScale: { + minorSlotCount: 4, + majorSlot: 60 + }, + contextMenuSettings: { + enable: true, + menuItems: { + appointment: [ + { id: "open", text: "Open Appointment" }, + { id: "delete", text: "Delete Appointment" }, + { id: "customMenu3", text: "Menu Item 3" }, + { id: "customMenu4", text: "Menu Item 4" } + ], + cells: [ + { id: "new", text: "New Appointment" }, + { id: "recurrence", text: "New Recurring Appointment" }, + { id: "today", text: "Today" }, + { id: "gotodate", text: "Go to date" }, + { id: "settings", text: "Settings" }, + { id: "view", text: "View", parentId: "settings" }, + { id: "timemode", text: "TimeMode", parentId: "settings" }, + { id: "view_Day", text: "Day", parentId: "view" }, + { id: "view_Week", text: "Week", parentId: "view" }, + { id: "view_Workweek", text: "Workweek", parentId: "view" }, + { id: "view_Month", text: "Month", parentId: "view" }, + { id: "timemode_Hour12", text: "12 Hours", parentId: "timemode" }, + { id: "timemode_Hour24", text: "24 Hours", parentId: "timemode" }, + { id: "workhours", text: "Work Hours", parentId: "settings" }, + { id: "customMenu1", text: "Menu Item 1" }, + { id: "customMenu2", text: "Menu Item 2" } + ] + } + }, + resources: [{ + field: "ownerId", + title: "Owner", + name: "Owners", allowMultiple: true, + resourceSettings: { + dataSource: [ + { text: "Nancy", id: 1, groupId: 1, color: "#f8a398" }, + { text: "Steven", id: 3, groupId: 2, color: "#56ca85" }, + { text: "Michael", id: 5, groupId: 1, color: "#51a0ed" } + ], + text: "text", id: "id", groupId: "groupId", color: "color" + } + }], + appointmentSettings: { + dataSource: new ej.DataManager((window).ResourcesData).executeLocal(new ej.Query().take(10)), + id: "Id", + subject: "Subject", + startTime: "StartTime", + endTime: "EndTime", + description: "Description", + allDay: "AllDay", + recurrence: "Recurrence", + recurrenceRule: "RecurrenceRule", + resourceFields: "ownerId" + } + }); + }); +} + + + +module ScrollerComponent { + $(function () { + var scrollerSample = new ej.Scroller($("#scrollcontent"), { + height: "300px", + width: "100%" + }); + $(window).bind('resize', function () { + scrollerSample.refresh(); + }); + }); +} + + + +module SignatureComponent { + $(function () { + var basicSignature = new ej.Signature($("#signature"), { + height: "400px", + isResponsive: true, + strokeWidth: 3 + }); + }); +} + + + + +module SliderComponent { + $(function () { + var slider = new ej.Slider($("#minSlider"), { + sliderType: "MinRange", + value: 60, + minValue: 0, + maxValue: 100 + }); + var rangeslider = new ej.Slider($("#rangeSlider"), { + sliderType: "Range", + values: [30, 60], + minValue: 0 + }); + + }); +} + + + + + + +module linesparkline { + $(function () { + + var sparklinesample = new ej.Sparkline($("#line"), { + dataSource: [12, 14, 11, 12, 11, 15, 12, 10, 11, 12, 15, 13, 12, 11, 10, 13, 15, 12, 14, 16, 14, 12, 11], + tooltip: { + visible: true, + font: { size:"12px" } + }, + type: "line", + size: { height: "40", width:"170" }, + }); + }); +} + +module columnsparkline { + $(function () { + var sparkcolumnsample = new ej.Sparkline($("#column"), { + dataSource: [2, 6, -1, 1, 12, 5, -2, 7, -3, 5, 8, 10,], + negativePointColor: "red", + highPointColor: "blue", + tooltip: { + visible: true, + font: { + size: "12px", + } + }, + type: "column", + size: { height: "100", width: "150" }, + }); + }); +} + +module areasparkline { + $(function () { + var sparkareasample = new ej.Sparkline($("#area"), { + dataSource: [12, -10, 11, 8, 17, 6, 2, -17, 13, -6, 8, 10,], + markerSettings: { visible: true }, + highPointColor: "blue", + lowPointColor: "orange", + type: "area", + opacity: 0.5, + tooltip: { + visible: true, + font: { + size: "12px", + } + }, + size: { height: "100", width: "150" }, + }); + }); +} + +module windlosssparkline { + $(function () { + var sparkwinlosssample = new ej.Sparkline($("#winloss"), { + dataSource: [12, 15, -11, 13, 17, 0, -12, 17, 13, -15, 8, 10,], + type: "winloss", + size: { height: "100", width: "150" }, + }); + }); +} + +module piesparkline1 { + $(function () { + var sparkpiesample1 = new ej.Sparkline($("#pie1"), { + dataSource: [4, 6, 7], + type: "pie", + tooltip: { + visible: true, + font: { + size: "12px", + } + }, + size: { height: "40", width: "40" }, + }); + }); +} + +module piesparkline2 { + $(function () { + var sparkpiesample2 = new ej.Sparkline($("#pie2"), { + dataSource: [8, 9, 1,], + type: "pie", + tooltip: { + visible: true, + font: { + size: "12px", + } + }, + size: { height: "40", width: "40" }, + }); + }); +} + +module piesparkline3 { + $(function () { + var sparkpiesample3 = new ej.Sparkline($("#pie3"), { + dataSource: [2, 3, 5], + type: "pie", + tooltip: { + visible: true, + font: { + size: "12px", + } + }, + size: { height: "40", width: "40" }, + }); + }); +} + +module piesparkline4 { + $(function () { + var sparkpiesample4 = new ej.Sparkline($("#pie4"), { + dataSource: [10, 12, 11], + type: "pie", + tooltip: { + visible: true, + font: { + size: "12px", + } + }, + size: { height: "40", width: "40" }, + }); + }); +} + + + + +module SplitterComponent { + $(function () { + var splitterInstance = new ej.Splitter($("#outterSpliter"), { + height: "250px", + width: "50%", + orientation: ej.Orientation.Vertical, + properties: [{}, { paneSize: 80 }], + isResponsive:true + }); + var splitterInstance1 = new ej.Splitter($("#innerSpliter"), { + isResponsive:true, + }); + }); +} + + + +module SpreadsheetComponent { +$(function () { + var sample = new ej.Spreadsheet($("#basicSpreadsheet"), { + scrollSettings: { + height: 550, + }, + importSettings: { + importMapper: (window).baseurl + "api/Spreadsheet/Import" + }, + exportSettings: { + excelUrl: (window).baseurl + "api/Spreadsheet/ExcelExport", + csvUrl: (window).baseurl + "api/Spreadsheet/CsvExport", + pdfUrl: (window).baseurl + "api/Spreadsheet/PdfExport" + }, + sheets: [{ rangeSettings: [{ dataSource: (window).defaultData, startCell: "A1" }] }], + loadComplete: () => { + var spreadsheet = $("#basicSpreadsheet").data("ejSpreadsheet"), xlFormat = spreadsheet.XLFormat; + if (!(spreadsheet).isImport) { + spreadsheet.setWidthToColumns([140, 128, 105, 100, 100, 110, 120, 120, 100]); + xlFormat.format({ "style": { "font-weight": "bold" } }, "A1:H1"); + xlFormat.format({ "type": "currency" }, "E2:H11"); + spreadsheet.XLRibbon.updateRibbonIcons(); + }} + }); + }); +} + + + +var default_data: Array = [ + { Category : "Employees", Country : "USA", JobDescription : "Sales", JobGroup:"Executive", EmployeesCount : 50 }, + { Category : "Employees", Country : "USA", JobDescription : "Sales", JobGroup : "Analyst", EmployeesCount : 40 }, + { Category : "Employees", Country : "USA", JobDescription : "Marketing", EmployeesCount : 40 }, + { Category : "Employees", Country : "USA", JobDescription : "Technical", JobGroup : "Testers", EmployeesCount : 55 }, + { Category : "Employees", Country : "USA", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Windows", EmployeesCount : 175}, + { Category : "Employees", Country : "USA", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Web", EmployeesCount : 70 }, + { Category : "Employees", Country : "USA", JobDescription : "Management", EmployeesCount : 40 }, + { Category : "Employees", Country : "USA", JobDescription : "Accounts", EmployeesCount : 60 }, + + { Category : "Employees", Country : "India", JobDescription : "Technical", JobGroup : "Testers", EmployeesCount : 43 }, + { Category : "Employees", Country : "India", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Windows", EmployeesCount : 125}, + { Category : "Employees", Country : "India", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Web", EmployeesCount : 60 }, + { Category : "Employees", Country : "India", JobDescription : "HR Executives", EmployeesCount : 70 }, + { Category : "Employees", Country : "India", JobDescription : "Accounts", EmployeesCount : 45 }, + + { Category : "Employees", Country : "Germany", JobDescription : "Sales", JobGroup : "Executive", EmployeesCount : 30 }, + { Category : "Employees", Country : "Germany", JobDescription : "Sales", JobGroup : "Analyst", EmployeesCount : 40 }, + { Category : "Employees", Country : "Germany", JobDescription : "Marketing", EmployeesCount : 50 }, + { Category : "Employees", Country : "Germany", JobDescription : "Technical", JobGroup : "Testers", EmployeesCount : 40 }, + { Category : "Employees", Country : "Germany", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Windows", EmployeesCount : 65 }, + { Category : "Employees", Country : "Germany", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Web", EmployeesCount : 27 }, + { Category : "Employees", Country : "Germany", JobDescription : "Management", EmployeesCount : 33 }, + { Category : "Employees", Country : "Germany", JobDescription : "Accounts", EmployeesCount : 55 }, + + { Category : "Employees", Country : "UK", JobDescription : "Technical", JobGroup : "Testers", EmployeesCount : 45 }, + { Category : "Employees", Country : "UK", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Windows", EmployeesCount : 96 }, + { Category : "Employees", Country : "UK", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Web", EmployeesCount : 55 }, + { Category : "Employees", Country : "UK", JobDescription : "HR Executives", EmployeesCount : 60 }, + { Category : "Employees", Country : "UK", JobDescription: "Accounts", EmployeesCount: 30 }, + + { Category : "Employees", Country : "France", JobDescription : "Technical", JobGroup : "Testers", EmployeesCount : 40 }, + { Category : "Employees", Country : "France", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Windows", EmployeesCount : 65 }, + { Category : "Employees", Country : "France", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Web", EmployeesCount : 27 }, + { Category : "Employees", Country : "France", JobDescription: "Marketing", EmployeesCount: 50 } +]; + +module sunburstcomponent { + $(function () { + var sunburstsample = new ej.SunburstChart($("#Sunburst"), { + valueMemberPath: "EmployeesCount", + levels: [ + {groupMemberPath: "Country"}, + {groupMemberPath: "JobDescription"}, + {groupMemberPath: "JobGroup"}, + {groupMemberPath: "JobRole"} + ], + dataSource: default_data, + dataLabelSettings:{visible:true}, + tooltip:{visible:false}, + enableAnimation:false, + size:{height:"600"}, + innerRadius:0.2, + load: function () { + var sender = $("#Sunburst").data("ejSunburstChart"); + var SunBurstTheme = (window).themeStyle + (window).themeColor + (window).themeVarient; + SunBurstTheme = SunBurstTheme.toString(); + if (SunBurstTheme.indexOf("dark") > -1 || SunBurstTheme.indexOf("contrast") > -1) + SunBurstTheme = "flatdark"; + else + SunBurstTheme = "flatlight"; + sender.model.theme = SunBurstTheme; + }, + title:{text:"Employees Count"}, + zoomSettings:{enable:false}, + legend:{visible:true,position:'top'}, + }); + }); +} + + + +module TabComponent { + $(function () { + var sample = new ej.Tab($("#defaultTab"),{ + width: "500px", + collapsible: true, + events: "click", + heightAdjustMode: ej.Tab.HeightAdjustMode.Content, + showCloseButton: true, + showRoundedCorner: false + }); + }); +} + + + +module TagCloudComponent { + + var websiteCollection = [ + { text: "Google", url: "http://www.google.com", frequency: 12 }, + { text: "All Things Digital", url: "http://allthingsd.com/", frequency: 3 }, + { text: "Arts Technica", url: "http://arstechnica.com/", frequency: 8 }, + { text: "Business Week", url: "http://www.businessweek.com/", frequency: 2 }, + { text: "Yahoo", url: "http://in.yahoo.com/", frequency: 12 }, + { text: "Center Networks", url: "http://www.centernetworks.com/", frequency: 5 }, + { text: "Crave", url: "http://news.cnet.com/crave/", frequency: 8 }, + { text: "Crunch Gear", url: "http://techcrunch.com/gadgets/", frequency: 20 }, + { text: "Daily Tech", url: "http://www.dailytech.com/", frequency: 1 }, + { text: "Electronista", url: "http://www.electronista.com/", frequency: 3 }, + { text: "Engadget", url: "http://www.engadget.com/", frequency: 5 }, + { text: "Gearlog", url: "http://www.gearlog.com/", frequency: 9 }, + { text: "Information Week", url: "http://www.informationweek.com/", frequency: 0 }, + { text: "PCWorld", url: "http://www.pcworld.com/", frequency: 11 }, + { text: "Tech Republic", url: "http://techrepublic.com/", frequency: 3 }, + { text: "Valleywag", url: "http://valleywag.gawker.com/", frequency: 6 }, + { text: "Rediff", url: "http://in.rediff.com/", frequency: 9 }, + { text: "WebProNews", url: "http://www.webpronews.com/", frequency: 2 } + ]; + + $(function () { + var sample = new ej.TagCloud($("#techWebList"), { + titleText: "Tech Sites", + dataSource: websiteCollection, + cssClass: "gradient-lime", + fields: { + text: "text", url: "url", frequency: "frequency" + } + }); + }); +} + + +module EditorComponent { + $(function () { + var num = new ej.NumericTextbox($("#numeric"), { + value: 30, + minValue: 1, + maxValue: 100, + name: "numeric", + width: "100%" + }); + var per = new ej.PercentageTextbox($("#percent"), { + value: 60, + minValue: 10, + maxValue: 1000, + name: "percent", + width: "100%" + }); + var cur = new ej.CurrencyTextbox($("#currency"), { + value: 100, + minValue: 10, + maxValue: 1000, + name: "currency", + width: "100%" + }); + var mask = new ej.MaskEdit($("#maskedit"), { + name: "mask", + value: "4242422424", + maskFormat: "99 999-99999", + width: "100%" + }) + }); +} + + + +module TileViewComponent { + $(function () { + var tile1 = new ej.Tile($("#tile1"), { + imagePosition:"fill", + caption:{text:"People"}, + tileSize:"medium", + imageUrl:'content/images/tile/windows/people_1.png' + }); + var tile2 = new ej.Tile($("#tile2"), { + imagePosition:"center", + tileSize:"small", + imageUrl:'content/images/tile/windows/alerts.png', + }); + var tile3 = new ej.Tile($("#tile3"), { + imagePosition:"center", + tileSize:"small", + imageUrl:'content/images/tile/windows/bing.png', + }); + var tile4 = new ej.Tile($("#tile4"), { + tileSize:"small", + imageUrl:'content/images/tile/windows/camera.png', + }); + var tile5 = new ej.Tile($("#tile5"), { + imagePosition:"center", + tileSize:"small", + imageUrl:'content/images/tile/windows/messages.png', + }); + var tile6 = new ej.Tile($("#tile6"), { + imagePosition:"center", + tileSize:"medium", + imageUrl:'content/images/tile/windows/games.png', + caption:{text:"Play"} + }); + var tile7 = new ej.Tile($("#tile7"), { + tileSize:"medium", + imageUrl:'content/images/tile/windows/map.png', + caption:{text:"Maps"} + }); + var tile8 = new ej.Tile($("#tile8"), { + imagePosition:"fill", + tileSize:"wide", + imageUrl:'content/images/tile/windows/sports.png', + caption:{text:"Sports"} + }); + var tile9 = new ej.Tile($("#tile9"), { + imagePosition:"fill", + tileSize:"medium", + imageUrl:'content/images/tile/windows/people_2.png', + caption:{text:"People"} + }); + var tile10 = new ej.Tile($("#tile10"), { + imagePosition:"center", + tileSize:"medium", + imageUrl:'content/images/tile/windows/pictures.png', + caption:{text:"Photo"} + }); + var tile11 = new ej.Tile($("#tile11"), { + imagePosition:"center", + tileSize:"wide", + imageUrl:'content/images/tile/windows/weather.png', + caption:{text:"Weather"} + }); + var tile12 = new ej.Tile($("#tile12"), { + imagePosition:"center", + tileSize:"medium", + imageUrl:'content/images/tile/windows/music.png', + caption:{text:"Music"} + }); + var tile13 = new ej.Tile($("#tile13"), { + imagePosition:"center", + tileSize:"medium", + imageUrl:'content/images/tile/windows/favs.png', + caption:{text:"Favorites"} + }); + }); +} + + + +module TimePickerComponent { + $(function () { + var timeSample = new ej.TimePicker($("#timepick"), { + width: "100%" + }); + }); +} + + + + +module ToolbarComponent { + $(function () { + var sample = new ej.Toolbar($("#editingToolbar"),{ + width: "100%", + cssClass: "gradient-lime", + enableSeparator: true, + isResponsive: true, + orientation: ej.Orientation.Horizontal, + showRoundedCorner: true + }); + }); +} + + + +module TooltipComponent { + $(function () { + + var sample1 = new ej.Tooltip($("#link1"),{ + content: "ECMAScript (or ES) is a trademarked scripting-language specification standardized by Ecma International in ECMA-262 and ISO/IEC 16262.", + associate: "mousefollow", + autoCloseTimeout: 5000, + collision: "fit", + containment: ".frame", + showRoundedCorner: true, + showShadow: true + }); + + var sample2 = new ej.Tooltip($("#link2"),{ + content: "The World Wide Web (WWW) is an information space where documents and other web resources are identified by URLs, interlinked by hypertext links, and can be accessed via the Internet.", + position: { + stem: { + horizontal: "right", + vertical: "center" + }, + target: { + horizontal: "left", + vertical: "center" + } + }, + autoCloseTimeout: 5000, + collision: "fit", + containment: ".frame", + showRoundedCorner: true, + showShadow: true + }); + + var sample3 = new ej.Tooltip($("#link3"),{ + content: 'Object-oriented programming (OOP) is a programming language model organized around objects rather than "actions" and data rather than logic.', + position: { + stem: { + horizontal: "right", + vertical: "center" + }, + target: { + horizontal: "left", + vertical: "center", + }, + }, + associate: "mousefollow", + autoCloseTimeout: 5000, + collision: "fit", + containment: ".frame", + showRoundedCorner: true, + showShadow: true + }); + }); +} + + + +module TreeGridComponent { + $(function () { + var treegridInstance = new ej.TreeGrid($("#TreeGridContainer"), { + dataSource: (window).treeGridData, + childMapping: "subtasks", + allowSorting: true, + allowMultiSorting: true, + enableAltRow: true, + allowFiltering: true, + treeColumnIndex: 1, + allowKeyboardNavigation: true, + showColumnChooser: true, + showColumnOptions: true, + contextMenuSettings: { + showContextMenu: true, + contextMenuItems: ["add", "edit", "delete"] + }, + columnDialogFields: ["field", "headerText", "editType", "width", "visible", "allowSorting", "textAlign", "headerTextAlign"], + editSettings: { + allowAdding: true, + allowEditing: true, + allowDeleting: true, + editMode: "cellEditing", + rowPosition: "belowSelectedRow" + }, + toolbarSettings: { + showToolbar: true, + toolbarItems: ["add","edit","delete","update","cancel","expandAll","collapseAll"] + }, + columns: [ + { field: "taskID", headerText: "Task Id", allowFiltering: false, editType: "numericedit", filterEditType: "numericedit" }, + { field: "taskName", headerText: "Task Name", editType: "stringedit", filterEditType: "stringedit" }, + { field: "startDate", headerText: "Start Date", editType: "datepicker", filterEditType: "datepicker", format:"{0:MM/dd/yyyy}" }, + { field: "endDate", headerText: "End Date", editType: "datepicker", filterEditType: "datepicker", format:"{0:MM/dd/yyyy}" }, + { field: "progress", headerText: "Progress", editType: "numericedit", filterEditType: "numericedit" } + ], + isResponsive: true, + }); +}); +} + + + +var population_data: Array = [ + { Continent: "Asia", Country: "Indonesia", Growth: 3, Population: 237641326 }, + { Continent: "Asia", Country: "Russia", Growth: 2, Population: 152518015 }, + { Continent: "Asia", Country: "Malaysia", Growth: 1, Population: 29672000 }, + { Continent: "North America", Country: "United States", Growth: 4, Population: 315645000 }, + { Continent: "North America", Country: "Mexico", Growth: 2, Population: 112336538 }, + { Continent: "North America", Country: "Canada", Growth: 1, Population: 39056064 }, + { Continent: "South America", Country: "Colombia", Growth: 1, Population: 47000000 }, + { Continent: "South America", Country: "Brazil", Growth: 3, Population: 193946886 }, + { Continent: "Africa", Country: "Nigeria", Growth: 2, Population: 170901000 }, + { Continent: "Africa", Country: "Egypt", Growth: 1, Population: 83661000 }, + { Continent: "Europe", Country: "Germany", Growth: 1, Population: 81993000 }, + { Continent: "Europe", Country: "France", Growth: 1, Population: 65605000 }, + { Continent: "Europe", Country: "UK", Growth: 1, Population: 63181775 } +]; + +module treemapcomponent { + $(function () { + var treemapsample = new ej.datavisualization.TreeMap($("#treemap"), { + leafItemSettings: { showLabels: true, labelPath: "Country" }, + rangeColorMapping: [ + { color: "#77D8D8", legendLabel: "1% Growth", from: 0, to: 1 }, + { color: "#AED960", from: 0, legendLabel: "2% Growth", to: 2 }, + { color: "#FFAF51", from: 0, legendLabel: "3% Growth", to: 3 }, + { color: "#F3D240", from: 0, legendLabel: "4% Growth", to: 4 } + ], + levels: [ + { groupPath: "Continent", groupGap: 5, headerHeight: 25, showHeader: true, headerTemplate: 'headertemplate' } + ], + dataSource: population_data, + colorValuePath: "Growth", + weightValuePath: "Population", + borderThickness: 0, + showLegend: true + }); + }); +} + + + +module TreeViewComponent { + $(function () { + var tree = new ej.TreeView($("#treeView"), { + allowEditing: true, + allowDragAndDrop: true, + allowDropChild: true, + allowDropSibling: true, + }); + }); +} + + + +module UploadboxComponent { + + $(function () { + var sample = new ej.Uploadbox($("#UploadDefault"),{ + saveUrl: (window).baseurl + "api/uploadbox/Save", + removeUrl: (window).baseurl + "api/uploadbox/Remove", + buttonText: { + browse: "Choose File", upload: "Upload", cancel: "Cancel" + }, + cssClass: "gradient- purple", + dialogAction: { + modal: false, closeOnComplete: false, drag: true + }, + extensionsAllow: ".zip", + multipleFilesSelection: true, + showFileDetails: true + }); + }); + +} + + + +module WaitingPopupComponent { + $(function () { + var sample = new ej.WaitingPopup($("#target"),{ + showOnInit: true, + showImage: true, + text: 'waiting…', + target: "#target", + appendTo: "#waiting" + }); + }); + +} diff --git a/types/ej.web.all/index.d.ts b/types/ej.web.all/index.d.ts index 32b9d1a18b..88f43378c3 100644 --- a/types/ej.web.all/index.d.ts +++ b/types/ej.web.all/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for ej.web.all 16.3 +// Type definitions for ej.web.all 16.4 // Project: http://help.syncfusion.com/js/typescript // Definitions by: Syncfusion // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -8,7 +8,7 @@ /*! * filename: ej.web.all.d.ts -* version : 16.3.0.21 +* version : 16.4.0.40-beta * Copyright Syncfusion Inc. 2001 - 2018. All rights reserved. * Use of this code is subject to the terms of our license. * A copy of the current license can be obtained at any time by e-mailing @@ -590,6 +590,21 @@ declare namespace ej { */ scope?: string; + /** Used to enable auto scroll while drag and drop the element. + * @Default {'false'} + */ + autoScroll?: boolean; + + /** Represents when to start the scrolling inside the scroll container on dragging + * @Default {'20'} + */ + scrollSensitivity?: number; + + /** Specifies how much distance of scroll should move on dragging once reached scroll sensitivity area. + * @Default {'20'} + */ + scrollSpeed?: number; + /** This event is triggered when dragging element is destroyed. */ destroy?(e: DestroyEventArgs): void; @@ -6293,6 +6308,11 @@ declare namespace ej { */ getValue(): string; + /** sets the date value for the DatePicker. + * @returns {string} + */ + setValue(): string; + /** Close the DatePicker popup, if it is in opened state. * @returns {void} */ @@ -10920,7 +10940,7 @@ declare namespace ej { show(): void; /** To show item in the given index. - * @param {number} Specifies the index value to show the hided item. + * @param {number} Specifies the index value to show the hidden item. * @returns {void} */ showItem(index: number): void; @@ -11069,7 +11089,7 @@ declare namespace ej { itemRequestCount?: number; /** Specifies the maximum number of items to be fetched. Note: This will work only with Virtual scrolling - * @Default {null} + * @Default {5} */ totalItemsCount?: number; @@ -29321,6 +29341,11 @@ declare namespace ej { */ memberEditorPageSize?: number; + /** Enables/Disables sorting option in member editor dialog for the members of the respective field. + * @Default {false} + */ + enableMemberEditorSorting?: boolean; + /** Enables/disables the display of grand total for rows and columns. * @Default {true} */ @@ -31523,6 +31548,11 @@ declare namespace ej { */ memberEditorPageSize?: number; + /** Enables/Disables sorting option in member editor dialog for the members of the respective field. + * @Default {false} + */ + enableMemberEditorSorting?: boolean; + /** Sets the summary layout for the pivot grid. Following are the ways in which the summary can be positioned: normal summary (bottom), top summary, no summary, and Microsoft Excel * summary. * @Default {ej.PivotGrid.Layout.Normal} @@ -37776,6 +37806,11 @@ declare namespace ej { */ reportLoaded?(e: ReportLoadedEventArgs): void; + /** Fires when user clicks on a failed report item in the rendered report, before displaying error details dialog. If you want to show custom error detail or perform any action before + * viewing error detail, you can make use of the showError event. + */ + showError?(e: ShowErrorEventArgs): void; + /** Fires when click the View Report Button. */ viewReportClick?(e: ViewReportClickEventArgs): void; @@ -37914,6 +37949,25 @@ declare namespace ej { type?: string; } + export interface ShowErrorEventArgs { + + /** true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the error code. + */ + errorCode?: string; + + /** returns the error message. + */ + message?: string; + + /** returns the detailed error information. + */ + detail?: string; + } + export interface ViewReportClickEventArgs { /** true if the event should be canceled; otherwise, false. @@ -42902,17 +42956,22 @@ declare namespace ej { */ redo(): void; - /** This method is used to refresh the content in Spreadsheet. + /** This method is used to refresh the Spreadsheet based on the sheet model values. * @param {number} Pass the index of the sheet. * @returns {void} */ refreshContent(sheetIdx: number): void; - /** This method is used to refresh the Spreadsheet. + /** This method is used to refresh the Spreadsheet element based on the page layout. * @returns {void} */ refreshSpreadsheet(): void; + /** This method destroys and re-creates the entire Spreadsheet control. + * @returns {void} + */ + refresh(): void; + /** This method is used to remove custom formulae in Spreadsheet. * @param {string} Pass the name of the formula. * @param {string} Pass the name of the function. @@ -44335,6 +44394,11 @@ declare namespace ej { */ importSettings?: ImportSettings; + /** Gets a value that indicates whether importing or not while loading the sheets in Spreadsheet. + * @Default {false} + */ + isImport?: boolean; + /** Gets or sets a value that indicates whether to enable or disable readonly support in the Spreadsheet. * @Default {false} */ @@ -46435,6 +46499,11 @@ declare namespace ej { */ abortPrint(): void; + /** Aborts the download operation. + * @returns {void} + */ + abortDownload(): void; + /** Shows/hides the print icon in the toolbar. * @param {boolean} shows/hides print button in the toolbar * @returns {void} @@ -46508,6 +46577,12 @@ declare namespace ej { */ showMagnificationTools(show: boolean): void; + /** Shows/hides the search tool in the toolbar. + * @param {boolean} shows/hides search tool in the toolbar + * @returns {void} + */ + showTextSearchTool(show: boolean): void; + /** Scales the page to fit the page in the container in the control. * @returns {void} */ @@ -46528,6 +46603,11 @@ declare namespace ej { */ zoomOut(): void; + /** Resize the viewer based on the parent element height. + * @returns {void} + */ + updateViewerSize(): void; + /** Scales the page to the specified percentage ranging from 50 to 400. If the given zoomValue is less than 50 or greater than 400; the PDF viewer scales the page to 50 and 400 * respectively. * @param {number} zoom value for scaling the pages in the PDF Viewer @@ -46551,6 +46631,17 @@ declare namespace ej { */ searchPrevious(): void; + /** Aborts the search operation. + * @returns {void} + */ + cancelSearchText(): void; + + /** Set the JSON data that are formed for rendering the document content in PDF viewer. + * @param {any} Set the JSON data that are formed for rendering the document content. + * @returns {void} + */ + setJSONData(jsonData: any): void; + /** Searches the target text with its casing. * @param {boolean} Specifies whether the text search must be performed with match case or not. * @returns {void} @@ -46643,6 +46734,14 @@ declare namespace ej { */ signatureSettings?: SignatureSettings; + /** Enables/ disables the text selection context menu. + */ + textSelectionContextMenu?: TextSelectionContextMenu; + + /** Enables/disables the annotation context menu. + */ + annotationContextMenu?: AnnotationContextMenu; + /** Specifies the type of the annotations. */ annotationType?: ej.PdfViewer.AnnotationType|string; @@ -46667,6 +46766,10 @@ declare namespace ej { */ interactionMode?: ej.PdfViewer.InteractionMode|string; + /** Gets or sets the buffering mode of the PDF viewer control when allowClientBuffering is set to true. + */ + bufferingMode?: ej.PdfViewer.BufferingMode|string; + /** Specifies the open state of the hyperlink in the PDF document. */ hyperlinkOpenState?: ej.PdfViewer.LinkTarget|string; @@ -46711,6 +46814,10 @@ declare namespace ej { */ ajaxRequestFailure?(e: AjaxRequestFailureEventArgs): void; + /** Triggers when the ajax request is Success. + */ + ajaxRequestSuccess?(e: AjaxRequestSuccessEventArgs): void; + /** Triggers when there is change in the magnification value. */ zoomChange?(e: ZoomChangeEventArgs): void; @@ -46767,6 +46874,14 @@ declare namespace ej { */ bufferEnd?(e: BufferEndEventArgs): void; + /** Triggers when the download is started. + */ + downloadStart?(e: DownloadStartEventArgs): void; + + /** Triggers when the download is completed or aborted. + */ + downloadEnd?(e: DownloadEndEventArgs): void; + /** Triggers when PDF viewer control is destroyed successfully. */ destroy?(e: DestroyEventArgs): void; @@ -46844,6 +46959,25 @@ declare namespace ej { message?: string; } + export interface AjaxRequestSuccessEventArgs { + + /** true, if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** Returns the PDF viewer model + */ + model?: any; + + /** Returns the name of the event + */ + type?: string; + + /** Returns the response data on ajax success. + */ + responseData?: string; + } + export interface ZoomChangeEventArgs { /** Returns the cancel option value. @@ -47194,6 +47328,52 @@ declare namespace ej { isBuffering?: boolean; } + export interface DownloadStartEventArgs { + + /** true, if the event should be canceled; otherwise, false + */ + cancel?: boolean; + + /** Returns the PDF viewer model + */ + model?: any; + + /** Returns the name of the event + */ + type?: string; + + /** Returns the name of the file being displayed in the PDF viewer. + */ + fileName?: string; + + /** Returns the status about the download is started. + */ + status?: string; + } + + export interface DownloadEndEventArgs { + + /** true, if the event should be canceled; otherwise, false + */ + cancel?: boolean; + + /** Returns the PDF viewer model + */ + model?: any; + + /** Returns the name of the event + */ + type?: string; + + /** Returns the name of the file being displayed in the PDF viewer. + */ + fileName?: string; + + /** Returns the status about the download is completed or aborted. + */ + status?: string; + } + export interface DestroyEventArgs { /** Returns the cancel option value. @@ -47331,6 +47511,48 @@ declare namespace ej { opacity?: number; } + export interface TextSelectionContextMenu { + + /** Enables/ disables the text selection context menu. + */ + isEnable?: boolean; + + /** Enables/disables the copy menu in the text selection context menu. + */ + isCopyEnable?: boolean; + + /** Enables/disables the search menu in the text selection context menu. + */ + isSearchEnable?: boolean; + + /** Enables/disables the highlight annotation menu in the text selection context menu. + */ + isHighlightEnable?: boolean; + + /** Enables/disables the strikeout annotation menu in the text selection context menu. + */ + isStrikeoutEnable?: boolean; + } + + export interface AnnotationContextMenu { + + /** Enables/disables the annotation context menu. + */ + isEnable?: boolean; + + /** Enables/disables the popup menu in the annotation context menu. + */ + isPopupEnable?: boolean; + + /** Enables/disables the delete menu in the annotation context menu. + */ + isDeleteEnable?: boolean; + + /** Enables/disables the properties menu in the annotation context menu. + */ + isPropertiesEnable?: boolean; + } + enum ToolbarItems { ///Shows only magnification tools in the toolbar. @@ -47395,6 +47617,16 @@ declare namespace ej { } + enum BufferingMode { + + ///Retrieves details to render first two pages in a request and rest of the pages in other request. + Default, + + ///Retrieves complete details to render all the pages in a single request. + Complete + } + + enum LinkTarget { ///Opens the hyperlink in the same tab of the browser. @@ -47533,6 +47765,11 @@ declare namespace ej { */ enableAsync?: boolean; + /** To set either ‘Post’ or ‘Get’ for ajax request type which invokes when validate, get suggestion and dictionary action.Possible values are ‘POST’ or ‘GET’ + * @Default {GET} + */ + ajaxRequestType?: string; + /** Sets the data type for the ajax call used within the SpellCheck control, denoting the type of data that are expected to be retrieved from the server. The applicable values are * json and jsonp. * @Default {jsonp} @@ -50374,11 +50611,11 @@ declare namespace ej.datavisualization { /** returns the pointer element. */ - markerpointerelement?: any; + markerPointerElement?: any; /** returns the value of the pointer. */ - markerpointervalue?: number; + markerPointerValue?: number; /** returns the pointer style */ From 3fcb1213a842f48ed2527a0ec4a2f643aa665965 Mon Sep 17 00:00:00 2001 From: AntoineC Date: Mon, 10 Dec 2018 17:18:24 +0100 Subject: [PATCH 510/608] Fix type of scaling property from number to Point --- types/paper/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/paper/index.d.ts b/types/paper/index.d.ts index d3c818b112..5709826f6a 100644 --- a/types/paper/index.d.ts +++ b/types/paper/index.d.ts @@ -4865,7 +4865,7 @@ declare module paper { /** * The current scale factor of the view, as described by its matrix. */ - scaling: number; + scaling: Point; /** * The view’s transformation matrix, defining the view onto the project’s contents (position, zoom level, rotation, etc). From efa3d46697306e80172b37b095a7a07d567ba6d8 Mon Sep 17 00:00:00 2001 From: Nikk Radetskiy Date: Mon, 10 Dec 2018 19:22:38 +0200 Subject: [PATCH 511/608] exports reorganized to match documentation, async function declared --- types/favicons/favicons-tests.ts | 14 ++- types/favicons/index.d.ts | 153 ++++++++++++++++--------------- 2 files changed, 92 insertions(+), 75 deletions(-) diff --git a/types/favicons/favicons-tests.ts b/types/favicons/favicons-tests.ts index 485ea1d505..ce64c84e67 100644 --- a/types/favicons/favicons-tests.ts +++ b/types/favicons/favicons-tests.ts @@ -1,6 +1,6 @@ -import favicons, { Configuration } from "favicons"; +import * as favicons from "favicons"; -let config: Partial = { +let config: Partial = { path: "/foo/bar" }; @@ -19,7 +19,15 @@ favicons("path/to/file.png", config, (err, res) => { } }); -favicons("file.png", (err, res) => { +favicons("file.png", (err: any, res: any) => { + html = res.html.join(""); + + for (const { name, contents } of [...res.files, ...res.images]) { + html = name + contents.toString(); + } +}); + +favicons("file.png").then((res) => { html = res.html.join(""); for (const { name, contents } of [...res.files, ...res.images]) { diff --git a/types/favicons/index.d.ts b/types/favicons/index.d.ts index 47a9a9d24a..623fd0cb98 100644 --- a/types/favicons/index.d.ts +++ b/types/favicons/index.d.ts @@ -1,79 +1,84 @@ // Type definitions for favicons 5.1 // Project: https://github.com/evilebottnawi/favicons/blob/master/package.json -// Definitions by: Mohsen Azimi +// Definitions by: Mohsen Azimi , Nikk Radetskiy // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.1 /// -export interface Configuration { - /** Path for overriding default icons path @default "/" */ - path: string; - /** Your application's name @default null */ - appName: string | null; - /** Your application's description @default null */ - appDescription: string | null; - /** Your (or your developer's) name @default null */ - developerName: string | null; - /** Your (or your developer's) URL @default null */ - developerURL: string | null; - /** Primary text direction for name, short_name, and description @default "auto" */ - dir: string; - /** Primary language for name and short_name @default "en-US */ - lang: string; - /** Background colour for flattened icons @default "#fff" */ - background: string; - /** Theme color user for example in Android's task switcher @default "#fff" */ - theme_color: string; - /** Preferred display mode: "fullscreen", "standalone", "minimal-ui" or "browser" @default "standalone" */ - display: "fullscreen" | "standalone" | "minimal-ui" | "browser"; - /** Default orientation: "any", "natural", "portrait" or "landscape" @default "any" */ - orientation: "any" | "natural" | "portrait" | "landscape"; - /** Start URL when launching the application from a device @default "/?homescreen=1" */ - start_url: string; - /** Your application's version string @default "1.0" */ - version: string; - /** Print logs to console? @default false */ - logging: boolean; - /** - * Platform Options: - * - offset - offset in percentage - * - background: - * * false - use default - * * true - force use default, e.g. set background for Android icons - * * color - set background for the specified icons - */ - icons: Partial<{ - /* Create Android homescreen icon. */ - android: boolean | { offset: string; background: string }; - /* Create Apple touch icons. */ - appleIcon: boolean | { offset: string; background: string }; - /* Create Apple startup images. */ - appleStartup: boolean | { offset: string; background: string }; - /* Create Opera Coast icon. */ - coast: boolean | { offset: string; background: string }; - /* Create regular favicons. */ - favicons: boolean; - /* Create Firefox OS icons. */ - firefox: boolean | { offset: string; background: string }; - /* Create Windows 8 tile icons. */ - windows: boolean | { background: string }; - /* Create Yandex browser icon. */ - yandex: boolean | { background: string }; - }>; +import { Duplex } from "stream"; + +declare namespace favicons { + interface Configuration { + /** Path for overriding default icons path @default "/" */ + path: string; + /** Your application's name @default null */ + appName: string | null; + /** Your application's description @default null */ + appDescription: string | null; + /** Your (or your developer's) name @default null */ + developerName: string | null; + /** Your (or your developer's) URL @default null */ + developerURL: string | null; + /** Primary text direction for name, short_name, and description @default "auto" */ + dir: string; + /** Primary language for name and short_name @default "en-US */ + lang: string; + /** Background colour for flattened icons @default "#fff" */ + background: string; + /** Theme color user for example in Android's task switcher @default "#fff" */ + theme_color: string; + /** Preferred display mode: "fullscreen", "standalone", "minimal-ui" or "browser" @default "standalone" */ + display: "fullscreen" | "standalone" | "minimal-ui" | "browser"; + /** Default orientation: "any", "natural", "portrait" or "landscape" @default "any" */ + orientation: "any" | "natural" | "portrait" | "landscape"; + /** Start URL when launching the application from a device @default "/?homescreen=1" */ + start_url: string; + /** Your application's version string @default "1.0" */ + version: string; + /** Print logs to console? @default false */ + logging: boolean; + /** + * Platform Options: + * - offset - offset in percentage + * - background: + * * false - use default + * * true - force use default, e.g. set background for Android icons + * * color - set background for the specified icons + */ + icons: Partial<{ + /* Create Android homescreen icon. */ + android: boolean | { offset: string; background: string }; + /* Create Apple touch icons. */ + appleIcon: boolean | { offset: string; background: string }; + /* Create Apple startup images. */ + appleStartup: boolean | { offset: string; background: string }; + /* Create Opera Coast icon. */ + coast: boolean | { offset: string; background: string }; + /* Create regular favicons. */ + favicons: boolean; + /* Create Firefox OS icons. */ + firefox: boolean | { offset: string; background: string }; + /* Create Windows 8 tile icons. */ + windows: boolean | { background: string }; + /* Create Yandex browser icon. */ + yandex: boolean | { background: string }; + }>; + } + + interface FavIconResponse { + images: Array<{ name: string; contents: Buffer }>; + files: Array<{ name: string; contents: Buffer }>; + html: string[]; + } + + type Callback = (error: Error | null, response: FavIconResponse) => void; + + /** You can programmatically access Favicons configuration (icon filenames, HTML, manifest files, etc) with this export */ + const config: Configuration; + + function stream(configuration?: Configuration): Duplex; } - -export interface FavIconResponse { - images: Array<{ name: string; contents: Buffer }>; - files: Array<{ name: string; contents: Buffer }>; - html: string[]; -} - -export type Callback = (error: Error | null, response: FavIconResponse) => void; - -/** You can programmatically access Favicons configuration (icon filenames, HTML, manifest files, etc) with this export */ -export const config: Configuration; - /** * Generate favicons * @param source Source image(s) @@ -82,12 +87,16 @@ export const config: Configuration; */ declare function favicons( source: string | Buffer | string[], - callback?: Callback + configuration?: Partial, +): Promise; +declare function favicons( + source: string | Buffer | string[], + callback?: favicons.Callback ): void; declare function favicons( source: string | Buffer | string[], - configuration?: Partial, - callback?: Callback + configuration?: Partial, + callback?: favicons.Callback ): void; -export default favicons; +export = favicons; From 242eb56ec6748c52a6b21182a75591c2b927d318 Mon Sep 17 00:00:00 2001 From: Nikk Radetskiy Date: Mon, 10 Dec 2018 19:29:00 +0200 Subject: [PATCH 512/608] version bump --- types/favicons/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/favicons/index.d.ts b/types/favicons/index.d.ts index 623fd0cb98..6bd3a4892e 100644 --- a/types/favicons/index.d.ts +++ b/types/favicons/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for favicons 5.1 +// Type definitions for favicons 5.3 // Project: https://github.com/evilebottnawi/favicons/blob/master/package.json // Definitions by: Mohsen Azimi , Nikk Radetskiy // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped From 77acc1c821bc309be2e1a947fb37c6503f8a66de Mon Sep 17 00:00:00 2001 From: Richie Foreman Date: Mon, 10 Dec 2018 09:31:03 -0800 Subject: [PATCH 513/608] Add '$mdInkRippleProvider' defs to 'angular-material' ref: https://github.com/angular/material/blob/master/src/core/services/ripple/ripple.js#L102 --- types/angular-material/index.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/types/angular-material/index.d.ts b/types/angular-material/index.d.ts index db74c97d10..cfa894b87f 100644 --- a/types/angular-material/index.d.ts +++ b/types/angular-material/index.d.ts @@ -152,6 +152,10 @@ declare module 'angular' { defaultViewBoxSize(viewBoxSize: number): IIconProvider; // default: 24 defaultFontSet(name: string): IIconProvider; } + + interface IInkRippleProvider { + disableInkRipple(): void; + } type IMedia = (media: string) => boolean; From 084b2d56eaad28caee9f7255fe7c0c881313909d Mon Sep 17 00:00:00 2001 From: "Charnoz, Antoine" Date: Mon, 10 Dec 2018 19:24:02 +0100 Subject: [PATCH 514/608] Add test for scaling of view --- types/paper/paper-tests.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/types/paper/paper-tests.ts b/types/paper/paper-tests.ts index 165c64b2d8..1d1bc32abe 100644 --- a/types/paper/paper-tests.ts +++ b/types/paper/paper-tests.ts @@ -79,6 +79,8 @@ hitTestResults = paper.project.hitTestAll(hitTestPoint, hitOptionsInterfaceEmpty hitTestResults = paper.project.hitTestAll(hitTestPoint, hitOptionsInterfacePartial); hitTestResults = paper.project.hitTestAll(hitTestPoint, hitOptionsInterfaceFull); +paper.view.scaling = new paper.Point(1, 1); + function Examples() { function BooleanOperations(){ let text = new paper.PointText({ From a410c93186c77eb745911eb0103cb17fa283dfad Mon Sep 17 00:00:00 2001 From: Dima Smirnov Date: Mon, 10 Dec 2018 22:12:29 +0300 Subject: [PATCH 515/608] added FindOptionsOrderArray type for find options --- types/sequelize/index.d.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/types/sequelize/index.d.ts b/types/sequelize/index.d.ts index 06f27421cb..6898a82ca4 100644 --- a/types/sequelize/index.d.ts +++ b/types/sequelize/index.d.ts @@ -3291,6 +3291,11 @@ declare namespace sequelize { */ type FindOptionsAttributesArray = Array; + /** + * Shortcut for order type in FindOptions.attributes + */ + type FindOptionsOrderArray = Array | { model: Model, as?: string } | fn>; + /** * Options that are passed to any model creating a SELECT query * @@ -3331,7 +3336,7 @@ declare namespace sequelize { * first element is the column / function to order by, the second is the direction. For example: * `order: [['name', 'DESC']]`. In this way the column will be escaped, but the direction will not. */ - order?: string | col | literal | Array | { model: Model, as?: string } | fn> | fn | Array | { model: Model, as?: string }| fn>| fn>; + order?: string | col | literal | FindOptionsOrderArray | fn | Array; /** * Limit the results From a10c1b112f97c3104a6b73f1e9022eeeab27ef2a Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Mon, 10 Dec 2018 23:21:51 +0100 Subject: [PATCH 516/608] Add types for has-emoji --- types/has-emoji/has-emoji-tests.ts | 6 ++++++ types/has-emoji/index.d.ts | 8 ++++++++ types/has-emoji/tsconfig.json | 23 +++++++++++++++++++++++ types/has-emoji/tslint.json | 1 + 4 files changed, 38 insertions(+) create mode 100644 types/has-emoji/has-emoji-tests.ts create mode 100644 types/has-emoji/index.d.ts create mode 100644 types/has-emoji/tsconfig.json create mode 100644 types/has-emoji/tslint.json diff --git a/types/has-emoji/has-emoji-tests.ts b/types/has-emoji/has-emoji-tests.ts new file mode 100644 index 0000000000..f1453f4cf5 --- /dev/null +++ b/types/has-emoji/has-emoji-tests.ts @@ -0,0 +1,6 @@ +import hasEmoji = require('has-emoji'); + +// $ExpectType boolean +hasEmoji('Unicorn 🦄'); +// $ExpectType boolean +hasEmoji('Cat'); diff --git a/types/has-emoji/index.d.ts b/types/has-emoji/index.d.ts new file mode 100644 index 0000000000..2160e66497 --- /dev/null +++ b/types/has-emoji/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for has-emoji 1.0 +// Project: https://github.com/sindresorhus/has-emoji#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = hasEmoji; + +declare function hasEmoji(candidate: string): boolean; diff --git a/types/has-emoji/tsconfig.json b/types/has-emoji/tsconfig.json new file mode 100644 index 0000000000..646f983707 --- /dev/null +++ b/types/has-emoji/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "has-emoji-tests.ts" + ] +} diff --git a/types/has-emoji/tslint.json b/types/has-emoji/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/has-emoji/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From dcd364079b5b48c940bf14a9c113268d62a74254 Mon Sep 17 00:00:00 2001 From: Richie Foreman Date: Mon, 10 Dec 2018 18:59:51 -0800 Subject: [PATCH 517/608] Update index.d.ts --- types/angular-material/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/angular-material/index.d.ts b/types/angular-material/index.d.ts index cfa894b87f..9202829175 100644 --- a/types/angular-material/index.d.ts +++ b/types/angular-material/index.d.ts @@ -152,7 +152,7 @@ declare module 'angular' { defaultViewBoxSize(viewBoxSize: number): IIconProvider; // default: 24 defaultFontSet(name: string): IIconProvider; } - + interface IInkRippleProvider { disableInkRipple(): void; } From ee2d459f330f322e7531ace80692b0d31541c69e Mon Sep 17 00:00:00 2001 From: Ben Talbot Date: Mon, 10 Dec 2018 19:28:08 -0800 Subject: [PATCH 518/608] Remove declare module '@google-cloud/kms' and change to use 4 spaces instead of tabs. --- .../google-cloud__kms-tests.ts | 170 +++---- types/google-cloud__kms/index.d.ts | 428 +++++++++--------- types/google-cloud__kms/tslint.json | 5 +- 3 files changed, 299 insertions(+), 304 deletions(-) diff --git a/types/google-cloud__kms/google-cloud__kms-tests.ts b/types/google-cloud__kms/google-cloud__kms-tests.ts index e3f6648310..96ab80c7c1 100644 --- a/types/google-cloud__kms/google-cloud__kms-tests.ts +++ b/types/google-cloud__kms/google-cloud__kms-tests.ts @@ -4,114 +4,114 @@ let kmsClientV1: kms.v1.KeyManagementServiceClient; kmsClientV1 = new kms.v1.KeyManagementServiceClient(); const credentials = { - type: 'service_account', - project_id: '****', - private_key_id: '****', - private_key: '****', - client_email: '****', - client_id: '****', - auth_uri: 'https://accounts.google.com/o/oauth2/auth', - token_uri: 'https://oauth2.googleapis.com/token', - auth_provider_x509_cert_url: 'https://www.googleapis.com/oauth2/v1/certs', - client_x509_cert_url: '****' + type: 'service_account', + project_id: '****', + private_key_id: '****', + private_key: '****', + client_email: '****', + client_id: '****', + auth_uri: 'https://accounts.google.com/o/oauth2/auth', + token_uri: 'https://oauth2.googleapis.com/token', + auth_provider_x509_cert_url: 'https://www.googleapis.com/oauth2/v1/certs', + client_x509_cert_url: '****' }; let kmsClient: kms.KeyManagementServiceClient; kmsClient = new kms.KeyManagementServiceClient({ credentials }); async function exampleListKeyRings() { - const locationPath = kmsClient.locationPath('[PROJECT_ID]', '[LOCATION]'); - const [ asyncKeyRings ] = await kmsClient.listKeyRings({parent: locationPath}); - if (asyncKeyRings.length > 0) { - const keyRing = asyncKeyRings[ 0 ]; - console.log(`KeyRing: ${keyRing.name}`); - } + const locationPath = kmsClient.locationPath('[PROJECT_ID]', '[LOCATION]'); + const [ asyncKeyRings ] = await kmsClient.listKeyRings({parent: locationPath}); + if (asyncKeyRings.length > 0) { + const keyRing = asyncKeyRings[ 0 ]; + console.log(`KeyRing: ${keyRing.name}`); + } - kmsClient.listKeyRings({parent: locationPath}, (err, [ callbackKeyRings ]) => { - if (callbackKeyRings.length > 0) { - const keyRing = callbackKeyRings[ 0 ]; - console.log(`KeyRing: ${keyRing.name}`); - } - }); + kmsClient.listKeyRings({parent: locationPath}, (err, [ callbackKeyRings ]) => { + if (callbackKeyRings.length > 0) { + const keyRing = callbackKeyRings[ 0 ]; + console.log(`KeyRing: ${keyRing.name}`); + } + }); - kmsClient.listKeyRings({parent: locationPath}, { timeout: 1000 }, (err, [ callbackWithOptionsKeyRings ]) => { - if (callbackWithOptionsKeyRings.length > 0) { - const keyRing = callbackWithOptionsKeyRings[ 0 ]; - console.log(`KeyRing: ${keyRing.name}`); - } - }); + kmsClient.listKeyRings({parent: locationPath}, { timeout: 1000 }, (err, [ callbackWithOptionsKeyRings ]) => { + if (callbackWithOptionsKeyRings.length > 0) { + const keyRing = callbackWithOptionsKeyRings[ 0 ]; + console.log(`KeyRing: ${keyRing.name}`); + } + }); } async function exampleListCryptoKeys() { - const keyRingPath = kmsClient.keyRingPath('[PROJECT_ID]', '[LOCATION]', '[KEYRING_ID]'); - const [ asyncKeys ] = await kmsClient.listCryptoKeys({parent: keyRingPath}); - if (asyncKeys.length > 0) { - const key = asyncKeys[ 0 ]; - console.log(`CryptoKey: ${key.name} Version: ${key.primary.name}`); - } + const keyRingPath = kmsClient.keyRingPath('[PROJECT_ID]', '[LOCATION]', '[KEYRING_ID]'); + const [ asyncKeys ] = await kmsClient.listCryptoKeys({parent: keyRingPath}); + if (asyncKeys.length > 0) { + const key = asyncKeys[ 0 ]; + console.log(`CryptoKey: ${key.name} Version: ${key.primary.name}`); + } - kmsClient.listCryptoKeys({parent: keyRingPath}, (err, [ callbackKeys ]) => { - if (callbackKeys.length > 0) { - const key = callbackKeys[ 0 ]; - console.log(`CryptoKey: ${key.name} Version: ${key.primary.name}`); - } - }); + kmsClient.listCryptoKeys({parent: keyRingPath}, (err, [ callbackKeys ]) => { + if (callbackKeys.length > 0) { + const key = callbackKeys[ 0 ]; + console.log(`CryptoKey: ${key.name} Version: ${key.primary.name}`); + } + }); - kmsClient.listCryptoKeys({parent: keyRingPath}, { timeout: 1000 }, (err, [ callbackWithOptionsKeys ]) => { - if (callbackWithOptionsKeys.length > 0) { - const key = callbackWithOptionsKeys[ 0 ]; - console.log(`CryptoKey: ${key.name} Version: ${key.primary.name}`); - } - }); + kmsClient.listCryptoKeys({parent: keyRingPath}, { timeout: 1000 }, (err, [ callbackWithOptionsKeys ]) => { + if (callbackWithOptionsKeys.length > 0) { + const key = callbackWithOptionsKeys[ 0 ]; + console.log(`CryptoKey: ${key.name} Version: ${key.primary.name}`); + } + }); } async function exampleEncrypt() { - const formattedName = kmsClient.cryptoKeyPath('[PROJECT_ID]', '[LOCATION]', '[KEYRING_ID]', '[KEY_ID]'); - const unencryptedText = new Buffer('Hello World'); + const formattedName = kmsClient.cryptoKeyPath('[PROJECT_ID]', '[LOCATION]', '[KEYRING_ID]', '[KEY_ID]'); + const unencryptedText = new Buffer('Hello World'); - const [ asyncEncryptResult ] = await kmsClient.encrypt({ name: formattedName, plaintext: unencryptedText.toString('base64') }); - if (asyncEncryptResult != null) { - console.log(`Encrypted: ${asyncEncryptResult.ciphertext.toString('base64')}`); - } + const [ asyncEncryptResult ] = await kmsClient.encrypt({ name: formattedName, plaintext: unencryptedText.toString('base64') }); + if (asyncEncryptResult != null) { + console.log(`Encrypted: ${asyncEncryptResult.ciphertext.toString('base64')}`); + } - kmsClient.encrypt({ name: formattedName, plaintext: unencryptedText.toString('base64') }, (err, [ callbackEncryptResult ]) => { - if (callbackEncryptResult != null) { - console.log(`Encrypted: ${callbackEncryptResult.ciphertext.toString('base64')}`); - } - }); + kmsClient.encrypt({ name: formattedName, plaintext: unencryptedText.toString('base64') }, (err, [ callbackEncryptResult ]) => { + if (callbackEncryptResult != null) { + console.log(`Encrypted: ${callbackEncryptResult.ciphertext.toString('base64')}`); + } + }); - kmsClient.encrypt({ name: formattedName, plaintext: unencryptedText.toString('base64') }, { timeout: 1000 }, (err, [ callbackWithOptionsEncryptResult ]) => { - if (callbackWithOptionsEncryptResult != null) { - console.log(`Encrypted: ${callbackWithOptionsEncryptResult.ciphertext.toString('base64')}`); - } - }); + kmsClient.encrypt({ name: formattedName, plaintext: unencryptedText.toString('base64') }, { timeout: 1000 }, (err, [ callbackWithOptionsEncryptResult ]) => { + if (callbackWithOptionsEncryptResult != null) { + console.log(`Encrypted: ${callbackWithOptionsEncryptResult.ciphertext.toString('base64')}`); + } + }); } async function exampleDecrypt() { - // Example pulling a file from Cloud Storage - // const secretsStorage = new Storage({ credentials }); - // const bucket = secretsStorage.bucket('[KMS_STORAGE_BUCKET]'); - // const filePath = '[PATH_TO_KMS_ENCRYPTED_FILE'; - // const file = bucket.file(filePath); - // const buffers = await file.download(); - // const buffer = buffers[ 0 ]; + // Example pulling a file from Cloud Storage + // const secretsStorage = new Storage({ credentials }); + // const bucket = secretsStorage.bucket('[KMS_STORAGE_BUCKET]'); + // const filePath = '[PATH_TO_KMS_ENCRYPTED_FILE'; + // const file = bucket.file(filePath); + // const buffers = await file.download(); + // const buffer = buffers[ 0 ]; - const buffer = new Buffer('[ENCRYPTED_SOURCE_BUFFER]'); - const formattedName = kmsClient.cryptoKeyPath('[PROJECT_ID]', '[LOCATION]', '[KEYRING_ID]', '[KEY_ID]'); - const [ asyncDecryptResult ] = await kmsClient.decrypt({name: formattedName, ciphertext: buffer.toString('base64') }); - if (asyncDecryptResult != null) { - console.log(`Decrypted: ${asyncDecryptResult.plaintext}`); - } + const buffer = new Buffer('[ENCRYPTED_SOURCE_BUFFER]'); + const formattedName = kmsClient.cryptoKeyPath('[PROJECT_ID]', '[LOCATION]', '[KEYRING_ID]', '[KEY_ID]'); + const [ asyncDecryptResult ] = await kmsClient.decrypt({name: formattedName, ciphertext: buffer.toString('base64') }); + if (asyncDecryptResult != null) { + console.log(`Decrypted: ${asyncDecryptResult.plaintext}`); + } - kmsClient.decrypt({ name: formattedName, ciphertext: buffer.toString('base64') }, (err, [ callbackDecryptResult ]) => { - if (callbackDecryptResult != null) { - console.log(`Decrypted: ${callbackDecryptResult.plaintext}`); - } - }); + kmsClient.decrypt({ name: formattedName, ciphertext: buffer.toString('base64') }, (err, [ callbackDecryptResult ]) => { + if (callbackDecryptResult != null) { + console.log(`Decrypted: ${callbackDecryptResult.plaintext}`); + } + }); - kmsClient.decrypt({ name: formattedName, ciphertext: buffer.toString('base64') }, (err, [ callbackWithOptionsDecryptResult ]) => { - if (callbackWithOptionsDecryptResult != null) { - console.log(`Decrypted: ${callbackWithOptionsDecryptResult.plaintext}`); - } - }); + kmsClient.decrypt({ name: formattedName, ciphertext: buffer.toString('base64') }, (err, [ callbackWithOptionsDecryptResult ]) => { + if (callbackWithOptionsDecryptResult != null) { + console.log(`Decrypted: ${callbackWithOptionsDecryptResult.plaintext}`); + } + }); } diff --git a/types/google-cloud__kms/index.d.ts b/types/google-cloud__kms/index.d.ts index 7f14a731bd..237c7115a0 100644 --- a/types/google-cloud__kms/index.d.ts +++ b/types/google-cloud__kms/index.d.ts @@ -8,268 +8,266 @@ import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; -declare module '@google-cloud/kms' { - namespace v1 { - enum CryptoKeyVersionAlgorithm { - // Not specified. - CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0, +export namespace v1 { + enum CryptoKeyVersionAlgorithm { + // Not specified. + CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0, - // Creates symmetric encryption keys. - GOOGLE_SYMMETRIC_ENCRYPTION = 1, + // Creates symmetric encryption keys. + GOOGLE_SYMMETRIC_ENCRYPTION = 1, - // RSASSA-PSS 2048 bit key with a SHA256 digest. - RSA_SIGN_PSS_2048_SHA256 = 2, + // RSASSA-PSS 2048 bit key with a SHA256 digest. + RSA_SIGN_PSS_2048_SHA256 = 2, - // RSASSA-PSS 3072 bit key with a SHA256 digest. - RSA_SIGN_PSS_3072_SHA256 = 3, + // RSASSA-PSS 3072 bit key with a SHA256 digest. + RSA_SIGN_PSS_3072_SHA256 = 3, - // RSASSA-PSS 4096 bit key with a SHA256 digest. - RSA_SIGN_PSS_4096_SHA256 = 4, + // RSASSA-PSS 4096 bit key with a SHA256 digest. + RSA_SIGN_PSS_4096_SHA256 = 4, - // RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest. - RSA_SIGN_PKCS1_2048_SHA256 = 5, + // RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest. + RSA_SIGN_PKCS1_2048_SHA256 = 5, - // RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest. - RSA_SIGN_PKCS1_3072_SHA256 = 6, + // RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest. + RSA_SIGN_PKCS1_3072_SHA256 = 6, - // RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest. - RSA_SIGN_PKCS1_4096_SHA256 = 7, + // RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest. + RSA_SIGN_PKCS1_4096_SHA256 = 7, - // RSAES-OAEP 2048 bit key with a SHA256 digest. - RSA_DECRYPT_OAEP_2048_SHA256 = 8, + // RSAES-OAEP 2048 bit key with a SHA256 digest. + RSA_DECRYPT_OAEP_2048_SHA256 = 8, - // RSAES-OAEP 3072 bit key with a SHA256 digest. - RSA_DECRYPT_OAEP_3072_SHA256 = 9, + // RSAES-OAEP 3072 bit key with a SHA256 digest. + RSA_DECRYPT_OAEP_3072_SHA256 = 9, - // RSAES-OAEP 4096 bit key with a SHA256 digest. - RSA_DECRYPT_OAEP_4096_SHA256 = 10, + // RSAES-OAEP 4096 bit key with a SHA256 digest. + RSA_DECRYPT_OAEP_4096_SHA256 = 10, - // ECDSA on the NIST P-256 curve with a SHA256 digest. - EC_SIGN_P256_SHA256 = 12, + // ECDSA on the NIST P-256 curve with a SHA256 digest. + EC_SIGN_P256_SHA256 = 12, - // ECDSA on the NIST P-384 curve with a SHA384 digest. - EC_SIGN_P384_SHA384 = 13, - } + // ECDSA on the NIST P-384 curve with a SHA384 digest. + EC_SIGN_P384_SHA384 = 13, + } - enum CryptoKeyVersionState { - // Not specified. - CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0, + enum CryptoKeyVersionState { + // Not specified. + CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0, - // This version is still being generated. It may not be used, enabled, - // disabled, or destroyed yet. Cloud KMS will automatically mark this - // version [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] as soon as the version is ready. - PENDING_GENERATION = 5, + // This version is still being generated. It may not be used, enabled, + // disabled, or destroyed yet. Cloud KMS will automatically mark this + // version [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] as soon as the version is ready. + PENDING_GENERATION = 5, - // This version may be used for cryptographic operations. - ENABLED = 1, + // This version may be used for cryptographic operations. + ENABLED = 1, - // This version may not be used, but the key material is still available, - // and the version can be placed back into the [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] state. - DISABLED = 2, + // This version may not be used, but the key material is still available, + // and the version can be placed back into the [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] state. + DISABLED = 2, - // This version is destroyed, and the key material is no longer stored. - // A version may not leave this state once entered. - DESTROYED = 3, + // This version is destroyed, and the key material is no longer stored. + // A version may not leave this state once entered. + DESTROYED = 3, - // This version is scheduled for destruction, and will be destroyed soon. - // Call - // [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] - // to put it back into the [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED] state. - DESTROY_SCHEDULED = 4, - } + // This version is scheduled for destruction, and will be destroyed soon. + // Call + // [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] + // to put it back into the [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED] state. + DESTROY_SCHEDULED = 4, + } - enum CryptoKeyVersionView { - // Default view for each [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Does not include - // the [attestation][google.cloud.kms.v1.CryptoKeyVersion.attestation] field. - CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0, + enum CryptoKeyVersionView { + // Default view for each [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Does not include + // the [attestation][google.cloud.kms.v1.CryptoKeyVersion.attestation] field. + CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0, - // Provides all fields in each [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], including the - // [attestation][google.cloud.kms.v1.CryptoKeyVersion.attestation]. - FULL = 1, - } + // Provides all fields in each [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], including the + // [attestation][google.cloud.kms.v1.CryptoKeyVersion.attestation]. + FULL = 1, + } - enum ProtectionLevel { - // Not specified. - PROTECTION_LEVEL_UNSPECIFIED = 0, + enum ProtectionLevel { + // Not specified. + PROTECTION_LEVEL_UNSPECIFIED = 0, - // Crypto operations are performed in software. - SOFTWARE = 1, + // Crypto operations are performed in software. + SOFTWARE = 1, - // Crypto operations are performed in a Hardware Security Module. - HSM = 2, - } + // Crypto operations are performed in a Hardware Security Module. + HSM = 2, + } - enum AttestationFormat { - ATTESTATION_FORMAT_UNSPECIFIED = 0, + enum AttestationFormat { + ATTESTATION_FORMAT_UNSPECIFIED = 0, - // Cavium HSM attestation compressed with gzip. Note that this format is - // defined by Cavium and subject to change at any time. - CAVIUM_V1_COMPRESSED = 3, - } + // Cavium HSM attestation compressed with gzip. Note that this format is + // defined by Cavium and subject to change at any time. + CAVIUM_V1_COMPRESSED = 3, + } - interface KeyOperationAttestation { - format: AttestationFormat; - } + interface KeyOperationAttestation { + format: AttestationFormat; + } - interface CryptoKeyVersion { - name: string; - state: CryptoKeyVersionState; - protectionLevel: ProtectionLevel; - algorithm: CryptoKeyVersionAlgorithm; - attestation?: KeyOperationAttestation; - createTime: google_protobuf_timestamp_pb.Timestamp.AsObject; - generateTime: google_protobuf_timestamp_pb.Timestamp.AsObject; - destroyTime?: google_protobuf_timestamp_pb.Timestamp.AsObject; - destroyEventTime?: google_protobuf_timestamp_pb.Timestamp.AsObject; - } + interface CryptoKeyVersion { + name: string; + state: CryptoKeyVersionState; + protectionLevel: ProtectionLevel; + algorithm: CryptoKeyVersionAlgorithm; + attestation?: KeyOperationAttestation; + createTime: google_protobuf_timestamp_pb.Timestamp.AsObject; + generateTime: google_protobuf_timestamp_pb.Timestamp.AsObject; + destroyTime?: google_protobuf_timestamp_pb.Timestamp.AsObject; + destroyEventTime?: google_protobuf_timestamp_pb.Timestamp.AsObject; + } - interface CryptoKeyVersionTemplate { - protectionLevel: ProtectionLevel; - algorithm: CryptoKeyVersionAlgorithm; - } + interface CryptoKeyVersionTemplate { + protectionLevel: ProtectionLevel; + algorithm: CryptoKeyVersionAlgorithm; + } - enum CryptoKeyPurpose { - // Not specified. - CRYPTO_KEY_PURPOSE_UNSPECIFIED = 0, + enum CryptoKeyPurpose { + // Not specified. + CRYPTO_KEY_PURPOSE_UNSPECIFIED = 0, - // [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used with - // [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] and - // [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt]. - ENCRYPT_DECRYPT = 1, + // [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used with + // [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] and + // [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt]. + ENCRYPT_DECRYPT = 1, - // [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used with - // [AsymmetricSign][google.cloud.kms.v1.KeyManagementService.AsymmetricSign] and - // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]. - ASYMMETRIC_SIGN = 5, + // [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used with + // [AsymmetricSign][google.cloud.kms.v1.KeyManagementService.AsymmetricSign] and + // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]. + ASYMMETRIC_SIGN = 5, - // [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used with - // [AsymmetricDecrypt][google.cloud.kms.v1.KeyManagementService.AsymmetricDecrypt] and - // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]. - ASYMMETRIC_DECRYPT = 6, - } + // [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used with + // [AsymmetricDecrypt][google.cloud.kms.v1.KeyManagementService.AsymmetricDecrypt] and + // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]. + ASYMMETRIC_DECRYPT = 6, + } - interface CryptoKey { - name: string; - primary: CryptoKeyVersion; - purpose: CryptoKeyPurpose; - createTime: google_protobuf_timestamp_pb.Timestamp.AsObject; - nextRotationTime?: google_protobuf_timestamp_pb.Timestamp.AsObject; - versionTemplate: CryptoKeyVersionTemplate; - labels: { [s: string]: string; }; - } + interface CryptoKey { + name: string; + primary: CryptoKeyVersion; + purpose: CryptoKeyPurpose; + createTime: google_protobuf_timestamp_pb.Timestamp.AsObject; + nextRotationTime?: google_protobuf_timestamp_pb.Timestamp.AsObject; + versionTemplate: CryptoKeyVersionTemplate; + labels: { [s: string]: string; }; + } - interface KeyRing { - name: string; - createTime: google_protobuf_timestamp_pb.Timestamp.AsObject; - } + interface KeyRing { + name: string; + createTime: google_protobuf_timestamp_pb.Timestamp.AsObject; + } - namespace KeyManagementServiceClient { - interface ConfigurationObject { - credentials?: { - client_email?: string; - private_key?: string - }; - email?: string; - keyFilename?: string; - port?: number; - projectId?: string; - promise?: any; - servicePath?: string; - } + namespace KeyManagementServiceClient { + interface ConfigurationObject { + credentials?: { + client_email?: string; + private_key?: string + }; + email?: string; + keyFilename?: string; + port?: number; + projectId?: string; + promise?: any; + servicePath?: string; + } - interface EncryptRequest { - name: string; - plaintext: string; - additionalAuthenticatedData?: string; - } - interface EncryptResponse { - name: string; - ciphertext: Buffer; - } - type EncryptCallback = (err: Error | null, apiResponse: [EncryptResponse, any, any]) => void; + interface EncryptRequest { + name: string; + plaintext: string; + additionalAuthenticatedData?: string; + } + interface EncryptResponse { + name: string; + ciphertext: Buffer; + } + type EncryptCallback = (err: Error | null, apiResponse: [EncryptResponse, any, any]) => void; - interface DecryptRequest { - name: string; - ciphertext: string; - additionalAuthenticatedData?: string; - } - interface DecryptResponse { - plaintext: Buffer; - } - type DecryptCallback = (err: Error | null, apiResponse: [DecryptResponse, any, any]) => void; + interface DecryptRequest { + name: string; + ciphertext: string; + additionalAuthenticatedData?: string; + } + interface DecryptResponse { + plaintext: Buffer; + } + type DecryptCallback = (err: Error | null, apiResponse: [DecryptResponse, any, any]) => void; - interface ListKeyRingsRequest { - parent: string; - page_size?: number; - page_token?: string; - } - type ListKeyRingsCallback = (err: Error | null, apiResponse: [KeyRing[], any, any]) => void; + interface ListKeyRingsRequest { + parent: string; + page_size?: number; + page_token?: string; + } + type ListKeyRingsCallback = (err: Error | null, apiResponse: [KeyRing[], any, any]) => void; - interface ListCryptoKeysRequest { - parent: string; - page_size?: number; - page_token?: string; - } - type ListCryptoKeysCallback = (err: Error | null, apiResponse: [CryptoKey[], any, any]) => void; - } + interface ListCryptoKeysRequest { + parent: string; + page_size?: number; + page_token?: string; + } + type ListCryptoKeysCallback = (err: Error | null, apiResponse: [CryptoKey[], any, any]) => void; + } - class KeyManagementServiceClient { - constructor(options?: KeyManagementServiceClient.ConfigurationObject); + class KeyManagementServiceClient { + constructor(options?: KeyManagementServiceClient.ConfigurationObject); - keyRingPath(project: string, location: string, keyRing: string): string; - cryptoKeyPathPath(project: string, location: string, keyRing: string, cryptoKeyPath: string): string; - locationPath(project: string, location: string): string; - cryptoKeyPath(project: string, location: string, keyRing: string, cryptoKey: string): string; - cryptoKeyVersionPath(project: string, location: string, keyRing: string, cryptoKey: string, cryptoKeyVersion: string): string; + keyRingPath(project: string, location: string, keyRing: string): string; + cryptoKeyPathPath(project: string, location: string, keyRing: string, cryptoKeyPath: string): string; + locationPath(project: string, location: string): string; + cryptoKeyPath(project: string, location: string, keyRing: string, cryptoKey: string): string; + cryptoKeyVersionPath(project: string, location: string, keyRing: string, cryptoKey: string, cryptoKeyVersion: string): string; - encrypt(request: KeyManagementServiceClient.EncryptRequest, gaxOpts?: GAX.CallOptions): Promise<[KeyManagementServiceClient.EncryptResponse, any, any]>; - encrypt(request: KeyManagementServiceClient.EncryptRequest, callback: KeyManagementServiceClient.EncryptCallback): void; - encrypt(request: KeyManagementServiceClient.EncryptRequest, gaxOpts: GAX.CallOptions, callback: KeyManagementServiceClient.EncryptCallback): void; + encrypt(request: KeyManagementServiceClient.EncryptRequest, gaxOpts?: GAX.CallOptions): Promise<[KeyManagementServiceClient.EncryptResponse, any, any]>; + encrypt(request: KeyManagementServiceClient.EncryptRequest, callback: KeyManagementServiceClient.EncryptCallback): void; + encrypt(request: KeyManagementServiceClient.EncryptRequest, gaxOpts: GAX.CallOptions, callback: KeyManagementServiceClient.EncryptCallback): void; - decrypt(request: KeyManagementServiceClient.DecryptRequest, gaxOpts?: GAX.CallOptions): Promise<[KeyManagementServiceClient.DecryptResponse, any, any]>; - decrypt(request: KeyManagementServiceClient.DecryptRequest, callback: KeyManagementServiceClient.DecryptCallback): void; - decrypt(request: KeyManagementServiceClient.DecryptRequest, gaxOpts: GAX.CallOptions, callback: KeyManagementServiceClient.DecryptCallback): void; + decrypt(request: KeyManagementServiceClient.DecryptRequest, gaxOpts?: GAX.CallOptions): Promise<[KeyManagementServiceClient.DecryptResponse, any, any]>; + decrypt(request: KeyManagementServiceClient.DecryptRequest, callback: KeyManagementServiceClient.DecryptCallback): void; + decrypt(request: KeyManagementServiceClient.DecryptRequest, gaxOpts: GAX.CallOptions, callback: KeyManagementServiceClient.DecryptCallback): void; - listKeyRings(request: KeyManagementServiceClient.ListKeyRingsRequest, gaxOpts?: GAX.CallOptions): Promise<[KeyRing[], any, any]>; - listKeyRings(request: KeyManagementServiceClient.ListKeyRingsRequest, callback: KeyManagementServiceClient.ListKeyRingsCallback): void; - listKeyRings(request: KeyManagementServiceClient.ListKeyRingsRequest, gaxOpts: GAX.CallOptions, callback: KeyManagementServiceClient.ListKeyRingsCallback): void; + listKeyRings(request: KeyManagementServiceClient.ListKeyRingsRequest, gaxOpts?: GAX.CallOptions): Promise<[KeyRing[], any, any]>; + listKeyRings(request: KeyManagementServiceClient.ListKeyRingsRequest, callback: KeyManagementServiceClient.ListKeyRingsCallback): void; + listKeyRings(request: KeyManagementServiceClient.ListKeyRingsRequest, gaxOpts: GAX.CallOptions, callback: KeyManagementServiceClient.ListKeyRingsCallback): void; - listCryptoKeys(request: KeyManagementServiceClient.ListCryptoKeysRequest, gaxOpts?: GAX.CallOptions): Promise<[CryptoKey[], any, any]>; - listCryptoKeys(request: KeyManagementServiceClient.ListCryptoKeysRequest, callback: KeyManagementServiceClient.ListCryptoKeysCallback): void; - listCryptoKeys(request: KeyManagementServiceClient.ListCryptoKeysRequest, gaxOpts: GAX.CallOptions, callback: KeyManagementServiceClient.ListCryptoKeysCallback): void; - } - } + listCryptoKeys(request: KeyManagementServiceClient.ListCryptoKeysRequest, gaxOpts?: GAX.CallOptions): Promise<[CryptoKey[], any, any]>; + listCryptoKeys(request: KeyManagementServiceClient.ListCryptoKeysRequest, callback: KeyManagementServiceClient.ListCryptoKeysCallback): void; + listCryptoKeys(request: KeyManagementServiceClient.ListCryptoKeysRequest, gaxOpts: GAX.CallOptions, callback: KeyManagementServiceClient.ListCryptoKeysCallback): void; + } +} - class KeyManagementServiceClient extends v1.KeyManagementServiceClient { - constructor(options?: v1.KeyManagementServiceClient.ConfigurationObject); - } +export class KeyManagementServiceClient extends v1.KeyManagementServiceClient { + constructor(options?: v1.KeyManagementServiceClient.ConfigurationObject); +} - namespace GAX { - /** https://googleapis.github.io/gax-nodejs/global.html#CallOptions */ - interface CallOptions { - timeout?: number; - retry?: RetryOptions; - autoPaginate?: boolean; - pageToken?: object; - isBundling?: boolean; - longrunning?: BackoffSettings; - promise?: PromiseConstructor; // FIXME Unsure if this is the correct type; remove this comment if it is - } +export namespace GAX { + /** https://googleapis.github.io/gax-nodejs/global.html#CallOptions */ + interface CallOptions { + timeout?: number; + retry?: RetryOptions; + autoPaginate?: boolean; + pageToken?: object; + isBundling?: boolean; + longrunning?: BackoffSettings; + promise?: PromiseConstructor; // FIXME Unsure if this is the correct type; remove this comment if it is + } - /** https://googleapis.github.io/gax-nodejs/global.html#RetryOptions */ - interface RetryOptions { - retryCodes: string[]; - backoffSettings: BackoffSettings; - } + /** https://googleapis.github.io/gax-nodejs/global.html#RetryOptions */ + interface RetryOptions { + retryCodes: string[]; + backoffSettings: BackoffSettings; + } - /** https://googleapis.github.io/gax-nodejs/global.html#BackoffSettings */ - interface BackoffSettings { - initialRetryDelayMillis: number; - retryDelayMultiplier: number; - maxRetryDelayMillis: number; - initialRpcTimeoutMillis: number; - maxRpcTimeoutMillis: number; - totalTimeoutMillis: number; - } - } + /** https://googleapis.github.io/gax-nodejs/global.html#BackoffSettings */ + interface BackoffSettings { + initialRetryDelayMillis: number; + retryDelayMultiplier: number; + maxRetryDelayMillis: number; + initialRpcTimeoutMillis: number; + maxRpcTimeoutMillis: number; + totalTimeoutMillis: number; + } } diff --git a/types/google-cloud__kms/tslint.json b/types/google-cloud__kms/tslint.json index ffaae9bd46..f93cf8562a 100644 --- a/types/google-cloud__kms/tslint.json +++ b/types/google-cloud__kms/tslint.json @@ -1,6 +1,3 @@ { - "extends": "dtslint/dt.json", - "rules": { - "indent": [true, "tabs"] - } + "extends": "dtslint/dt.json" } From d3ba03f75649289aaa7562d452a8ebdf5ea292e0 Mon Sep 17 00:00:00 2001 From: Junyoung Choi Date: Tue, 11 Dec 2018 13:48:40 +0900 Subject: [PATCH 519/608] Discard context type checking --- types/unist-util-is/index.d.ts | 6 +++--- types/unist-util-is/unist-util-is-tests.ts | 12 ++---------- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/types/unist-util-is/index.d.ts b/types/unist-util-is/index.d.ts index ae92217c6e..82e6e1fdc8 100644 --- a/types/unist-util-is/index.d.ts +++ b/types/unist-util-is/index.d.ts @@ -14,8 +14,8 @@ declare namespace unistUtilIs { * @param index Position of node in parent * @param parent Parent of node */ - type TestFunction = (this: C, node: unknown, index?: number, parent?: Unist.Parent) => boolean | void; - type Test = TestFunction | Partial | string | null; + type TestFunction = (node: unknown, index?: number, parent?: Unist.Parent) => boolean | void; + type Test = TestFunction | Partial | string | null; } /** @@ -31,6 +31,6 @@ declare namespace unistUtilIs { * @param context Context object to invoke `test` with * @returns Whether test passed and `node` is a `Node` (object with `type` set to non-empty `string`). */ -declare function unistUtilIs(test: unistUtilIs.Test | Array>, node: unknown, index?: number, parent?: Unist.Parent, context?: any): boolean; +declare function unistUtilIs(test: unistUtilIs.Test | unistUtilIs.Test[], node: unknown, index?: number, parent?: Unist.Parent, context?: any): boolean; export = unistUtilIs; diff --git a/types/unist-util-is/unist-util-is-tests.ts b/types/unist-util-is/unist-util-is-tests.ts index 4d355c90ec..9f3eecc680 100644 --- a/types/unist-util-is/unist-util-is-tests.ts +++ b/types/unist-util-is/unist-util-is-tests.ts @@ -20,15 +20,7 @@ is(test, node); is(test, node, 4, parent); is(test, node, 5, parent); -interface TestContext { - some: string; -} -function testWithContext(this: TestContext, node: unknown) {} -is(testWithContext, node); +function testFunc(node: unknown) {} +is(testFunc, node); const wrongTestFunc: is.TestFunction = (node: unknown, n: string) => {}; // $ExpectError - -interface OtherTestContext { - some: number; -} -is(testWithContext, node); // $ExpectError From d83c38e33756f0d4865de5cd34beffb399d595cd Mon Sep 17 00:00:00 2001 From: Brian Faust Date: Tue, 11 Dec 2018 08:55:38 +0200 Subject: [PATCH 520/608] Add the `unsafe` method to the NumberSchema of Joi --- types/joi/index.d.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/types/joi/index.d.ts b/types/joi/index.d.ts index 096847a82c..1af519dd5a 100644 --- a/types/joi/index.d.ts +++ b/types/joi/index.d.ts @@ -504,6 +504,11 @@ export interface NumberSchema extends AnySchema { */ integer(): this; + /** + * Allows the number to be outside of JavaScript's safety range (Number.MIN_SAFE_INTEGER & Number.MAX_SAFE_INTEGER). + */ + unsafe(enabled: boolean): this; + /** * Specifies the maximum number of decimal places where: * @param limit - the maximum number of decimal places allowed. From 0a70db0e4c7aa9a78523188c703c07e7d0c44d34 Mon Sep 17 00:00:00 2001 From: Brian Faust Date: Tue, 11 Dec 2018 09:07:03 +0200 Subject: [PATCH 521/608] Add test for `unsafe` for the NumberSchema of Joi --- types/joi/index.d.ts | 2 +- types/joi/joi-tests.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/types/joi/index.d.ts b/types/joi/index.d.ts index 1af519dd5a..404e0339ef 100644 --- a/types/joi/index.d.ts +++ b/types/joi/index.d.ts @@ -507,7 +507,7 @@ export interface NumberSchema extends AnySchema { /** * Allows the number to be outside of JavaScript's safety range (Number.MIN_SAFE_INTEGER & Number.MAX_SAFE_INTEGER). */ - unsafe(enabled: boolean): this; + unsafe(enabled?: boolean): this; /** * Specifies the maximum number of decimal places where: diff --git a/types/joi/joi-tests.ts b/types/joi/joi-tests.ts index 716fc70c16..e21310396b 100644 --- a/types/joi/joi-tests.ts +++ b/types/joi/joi-tests.ts @@ -618,6 +618,7 @@ numSchema = numSchema.greater(ref); numSchema = numSchema.less(num); numSchema = numSchema.less(ref); numSchema = numSchema.integer(); +numSchema = numSchema.unsafe(); numSchema = numSchema.precision(num); numSchema = numSchema.multiple(num); numSchema = numSchema.positive(); From 1f04344d92116837def38f25dd14586e8def467d Mon Sep 17 00:00:00 2001 From: Bradley Ayers Date: Tue, 11 Dec 2018 18:15:20 +1100 Subject: [PATCH 522/608] fix(react-router): match can be null (#31212) * fix(react-router): match can be null * fix(react-router): update tests --- types/react-router-dom/react-router-dom-tests.tsx | 4 ++++ types/react-router/index.d.ts | 2 +- .../test/examples-from-react-router-website/Ambiguous.tsx | 2 +- .../test/examples-from-react-router-website/Animation.tsx | 6 +++--- .../test/examples-from-react-router-website/Basic.tsx | 4 ++-- .../examples-from-react-router-website/ModalGallery.tsx | 8 ++++++++ .../test/examples-from-react-router-website/Params.tsx | 2 +- .../test/examples-from-react-router-website/Recursive.tsx | 4 ++++ 8 files changed, 24 insertions(+), 8 deletions(-) diff --git a/types/react-router-dom/react-router-dom-tests.tsx b/types/react-router-dom/react-router-dom-tests.tsx index a550a579fa..a7715e9ea1 100644 --- a/types/react-router-dom/react-router-dom-tests.tsx +++ b/types/react-router-dom/react-router-dom-tests.tsx @@ -27,6 +27,10 @@ type OtherProps = RouteComponentProps<{ }>; const Component: React.SFC = props => { + if (!props.match) { + return null; + } + const { id } = props.match.params; return (
    {id}
    diff --git a/types/react-router/index.d.ts b/types/react-router/index.d.ts index f62fc44b18..fff900d458 100644 --- a/types/react-router/index.d.ts +++ b/types/react-router/index.d.ts @@ -68,7 +68,7 @@ export interface StaticContext { export interface RouteComponentProps { history: H.History; location: H.Location; - match: match; + match: match | null; staticContext?: C; } diff --git a/types/react-router/test/examples-from-react-router-website/Ambiguous.tsx b/types/react-router/test/examples-from-react-router-website/Ambiguous.tsx index 6e6598fd71..3f2dbc2223 100644 --- a/types/react-router/test/examples-from-react-router-website/Ambiguous.tsx +++ b/types/react-router/test/examples-from-react-router-website/Ambiguous.tsx @@ -41,7 +41,7 @@ const AmbiguousExample = () => ( const About = () =>

    About

    ; const Company = () =>

    Company

    ; -const User: React.SFC> = ({ match }) => ( +const User: React.SFC> = ({ match }) => match && (

    User: {match.params.user}

    diff --git a/types/react-router/test/examples-from-react-router-website/Animation.tsx b/types/react-router/test/examples-from-react-router-website/Animation.tsx index 8133528179..306ad14ea4 100644 --- a/types/react-router/test/examples-from-react-router-website/Animation.tsx +++ b/types/react-router/test/examples-from-react-router-website/Animation.tsx @@ -72,12 +72,12 @@ interface HSLParams { l: string; } -const HSL: React.SFC> = ({ match: { params } }) => ( +const HSL: React.SFC> = ({ match }) => match && (
    hsl({params.h}, {params.s}%, {params.l}%)
    + background: `hsl(${match.params.h}, ${match.params.s}%, ${match.params.l}%)` + }}>hsl({match.params.h}, {match.params.s}%, {match.params.l}%) ); const styles: any = {}; diff --git a/types/react-router/test/examples-from-react-router-website/Basic.tsx b/types/react-router/test/examples-from-react-router-website/Basic.tsx index ba6a5eabe5..05e2101f85 100644 --- a/types/react-router/test/examples-from-react-router-website/Basic.tsx +++ b/types/react-router/test/examples-from-react-router-website/Basic.tsx @@ -36,7 +36,7 @@ const About = () => ( ); -const Topics: React.SFC = ({ match }) => ( +const Topics: React.SFC = ({ match }) => match === null ? null : (

    Topics

      @@ -64,7 +64,7 @@ const Topics: React.SFC = ({ match }) => (
    ); -const Topic: React.SFC> = ({ match }) => ( +const Topic: React.SFC> = ({ match }) => match && (

    {match.params.topicId}

    diff --git a/types/react-router/test/examples-from-react-router-website/ModalGallery.tsx b/types/react-router/test/examples-from-react-router-website/ModalGallery.tsx index c51d63ac0f..be9bd1c322 100644 --- a/types/react-router/test/examples-from-react-router-website/ModalGallery.tsx +++ b/types/react-router/test/examples-from-react-router-website/ModalGallery.tsx @@ -114,6 +114,10 @@ const Gallery = () => ( ); const ImageView: React.SFC> = ({ match }) => { + if (!match) { + return null; + } + const image = IMAGES[parseInt(match.params.id, 10)]; if (!image) { return
    Image not found
    ; @@ -128,6 +132,10 @@ const ImageView: React.SFC> = ({ match }) => }; const Modal: React.SFC> = ({ match, history }) => { + if (!match) { + return null; + } + const image = IMAGES[parseInt(match.params.id, 10)]; if (!image) { return null; diff --git a/types/react-router/test/examples-from-react-router-website/Params.tsx b/types/react-router/test/examples-from-react-router-website/Params.tsx index a6d0bded7f..801a889d79 100644 --- a/types/react-router/test/examples-from-react-router-website/Params.tsx +++ b/types/react-router/test/examples-from-react-router-website/Params.tsx @@ -22,7 +22,7 @@ const ParamsExample = () => ( ); -const Child: React.SFC> = ({ match }) => ( +const Child: React.SFC> = ({ match }) => match && (

    ID: {match.params.id}

    diff --git a/types/react-router/test/examples-from-react-router-website/Recursive.tsx b/types/react-router/test/examples-from-react-router-website/Recursive.tsx index 534fe52931..9489d2fb25 100644 --- a/types/react-router/test/examples-from-react-router-website/Recursive.tsx +++ b/types/react-router/test/examples-from-react-router-website/Recursive.tsx @@ -39,6 +39,10 @@ interface InitialPersonProps { type PersonProps = RouteComponentProps<{ id: string }>; const Person: React.SFC = ({ match }) => { + if (!match) { + return null; + } + const person = find(match.params.id); return ( From a012ca3af167d0247ed96921c3ef6a552decee73 Mon Sep 17 00:00:00 2001 From: Jake Boone Date: Tue, 11 Dec 2018 09:40:17 -0700 Subject: [PATCH 523/608] [react-datepicker] Exported locale functions and added tests --- types/react-datepicker/index.d.ts | 36 +++--- .../react-datepicker-tests.tsx | 118 ++++++++++++++++-- 2 files changed, 131 insertions(+), 23 deletions(-) diff --git a/types/react-datepicker/index.d.ts b/types/react-datepicker/index.d.ts index e727155520..5f07b253f3 100644 --- a/types/react-datepicker/index.d.ts +++ b/types/react-datepicker/index.d.ts @@ -15,6 +15,10 @@ import * as React from "react"; import * as Popper from "popper.js"; +export function registerLocale(localeName: string, localeData: {}): void; +export function setDefaultLocale(localeName: string): void; +export function getDefaultLocale(): string; + export interface ReactDatePickerProps { adjustDateOnChange?: boolean; allowSameDay?: boolean; @@ -24,6 +28,7 @@ export interface ReactDatePickerProps { calendarContainer?(props: { children: React.ReactNode[] }): React.ReactNode; children?: React.ReactNode; className?: string; + clearButtonTitle?: string; customInput?: React.ReactNode; customInputRef?: string; dateFormat?: string | string[]; @@ -38,6 +43,7 @@ export interface ReactDatePickerProps { filterDate?(date: Date): boolean; fixedHeight?: boolean; forceShowMonthNavigation?: boolean; + formatWeekDay?(date: Date): string; formatWeekNumber?(date: Date): string | number; highlightDates?: Date[]; id?: string; @@ -53,18 +59,19 @@ export interface ReactDatePickerProps { minTime?: Date; monthsShown?: number; name?: string; + nextMonthButtonLabel?: string; onBlur?(event: React.FocusEvent): void; onChange(date: Date | null, event: React.SyntheticEvent | undefined): void; onChangeRaw?(event: React.FocusEvent): void; onClickOutside?(event: React.MouseEvent): void; onFocus?(event: React.FocusEvent): void; + onInputClick?(): void; + onInputError?(err: {code: number; msg: string}): void; onKeyDown?(event: React.KeyboardEvent): void; onMonthChange?(date: Date): void; onSelect?(date: Date, event: React.SyntheticEvent | undefined): void; onWeekSelect?(firstDayOfWeek: Date, weekNumber: string | number, event: React.SyntheticEvent | undefined): void; - onInputClick?(): void; onYearChange?(date: Date): void; - onInputError?(err: {code: number; msg: string}): void; open?: boolean; openToDate?: Date; peekNextMonth?: boolean; @@ -75,7 +82,18 @@ export interface ReactDatePickerProps { popperPlacement?: string; popperProps?: {}; preventOpenOnFocus?: boolean; + previousMonthButtonLabel?: string; readOnly?: boolean; + renderCustomHeader?(params: { + date: Date; + changeYear(year: number): void; + changeMonth(month: number): void; + decreaseMonth(): void; + increaseMonth(): void; + prevMonthButtonDisabled: boolean; + nextMonthButtonDisabled: boolean; + }): React.ReactNode; + renderDayContents?(dayOfMonth: number): React.ReactNode; required?: boolean; scrollableMonthYearDropdown?: boolean; scrollableYearDropdown?: boolean; @@ -104,20 +122,6 @@ export interface ReactDatePickerProps { weekLabel?: string; withPortal?: boolean; yearDropdownItemNumber?: number; - formatWeekDay?(date: Date): string; - clearButtonTitle?: string; - previousMonthButtonLabel?: string; - nextMonthButtonLabel?: string; - renderCustomHeader?(params: { - date: Date; - changeYear(year: number): void; - changeMonth(month: number): void; - decreaseMonth(): void; - increaseMonth(): void; - prevMonthButtonDisabled: boolean; - nextMonthButtonDisabled: boolean; - }): React.ReactNode; - renderDayContents?(dayOfMonth: number): React.ReactNode; } declare const ReactDatePicker: React.ClassicComponentClass; export default ReactDatePicker; diff --git a/types/react-datepicker/react-datepicker-tests.tsx b/types/react-datepicker/react-datepicker-tests.tsx index 4a3fd93cac..b47c08ed73 100644 --- a/types/react-datepicker/react-datepicker-tests.tsx +++ b/types/react-datepicker/react-datepicker-tests.tsx @@ -1,17 +1,121 @@ import * as React from 'react'; -import DatePicker from 'react-datepicker'; +import DatePicker, { + registerLocale, + setDefaultLocale, + getDefaultLocale, +} from 'react-datepicker'; + +registerLocale('en-GB', { options: { weekStartsOn: 1 } }); +setDefaultLocale('en-GB'); +const defaultLocale = getDefaultLocale();
    } + className="" + clearButtonTitle="" + customInput={} + customInputRef="" + dateFormat="" + dateFormatCalendar="" + dayClassName={date => ''} + disabled + disabledKeyboardNavigation + dropdownMode="scroll" + endDate={new Date()} + excludeDates={[new Date()]} + excludeTimes={[new Date()]} + filterDate={date => true} + fixedHeight + forceShowMonthNavigation + formatWeekDay={date => ''} + formatWeekNumber={date => 0} + highlightDates={[new Date()]} + id="" + includeDates={[new Date()]} + includeTimes={[new Date()]} + injectTimes={[new Date()]} + inline + isClearable + locale="" + maxDate={new Date()} + maxTime={new Date()} + minDate={new Date()} + minTime={new Date()} + monthsShown={1} + name="" + nextMonthButtonLabel="" + onBlur={event => null} onChange={(date: Date | null) => {}} + onChangeRaw={event => null} + onClickOutside={event => null} + onFocus={event => null} + onInputClick={() => null} + onInputError={err => err.code + err.msg} + onKeyDown={event => null} + onMonthChange={date => null} + onSelect={(date, event) => null} + onWeekSelect={(firstDayOfWeek, weekNumber, event) => null} onYearChange={(date: Date) => {}} + open + openToDate={new Date()} + peekNextMonth + placeholderText="" + popperClassName="" + popperContainer={props =>
    } popperModifiers={{ flip: { - enabled: false - } + enabled: false, + }, }} - includeTimes={[new Date()]} + popperPlacement="" + popperProps={{}} + preventOpenOnFocus + previousMonthButtonLabel="" + readOnly + renderCustomHeader={({ + date, + changeYear, + changeMonth, + decreaseMonth, + increaseMonth, + prevMonthButtonDisabled, + nextMonthButtonDisabled, + }) =>
    } + renderDayContents={dayOfMonth =>
    } + required + scrollableMonthYearDropdown + scrollableYearDropdown + selected={new Date()} + selectsEnd + selectsStart + shouldCloseOnSelect + showDisabledMonthNavigation + showMonthDropdown + showMonthYearDropdown + showTimeSelect + showTimeSelectOnly + showWeekNumbers + showYearDropdown + startDate={new Date()} + startOpen + tabIndex={1} + timeCaption="" + timeFormat="" + timeIntervals={1} + title="" + todayButton={
    } + useShortMonthInDropdown + useWeekdaysShort + value="" + weekLabel="" + withPortal + yearDropdownItemNumber={1} > -
    - +
    + ; From bccc29241bd1993164f45b16225bb93f2b416982 Mon Sep 17 00:00:00 2001 From: gaston Date: Tue, 11 Dec 2018 23:44:47 +0700 Subject: [PATCH 524/608] Added polygon type, geometryEditor namespace, filled placemark options, added vow namespace --- types/yandex-maps/index.d.ts | 5345 ++++++++++++++++++---------------- 1 file changed, 2884 insertions(+), 2461 deletions(-) diff --git a/types/yandex-maps/index.d.ts b/types/yandex-maps/index.d.ts index e7078b4b28..d3c6975e98 100644 --- a/types/yandex-maps/index.d.ts +++ b/types/yandex-maps/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for yandex-maps 2.1 // Project: https://github.com/Delagen/typings-yandex-maps // Definitions by: Delagen +// gastwork13 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.4 @@ -140,1795 +141,2485 @@ declare namespace ymaps { duration?: number; } - class RouteEditor implements IBehavior { - events: IEventManager; - options: IOptionManager; + class RouteEditor implements IBehavior { + events: IEventManager; + options: IOptionManager; - disable(): void; + disable(): void; - enable(): void; + enable(): void; - isEnabled(): boolean; + isEnabled(): boolean; - getParent(): null | IControlParent; + getParent(): null | IControlParent; - setParent(parent: IControlParent): this; + setParent(parent: IControlParent): this; - getRoute(): router.Route; + getRoute(): router.Route; - getState(): string; + getState(): string; - setState(state: string | null): void; - } + setState(state: string | null): void; + } - class Ruler implements IBehavior { - constructor(options?: IRulerOptions) + class Ruler implements IBehavior { + constructor(options?: IRulerOptions) - events: IEventManager; - options: IOptionManager; + events: IEventManager; + options: IOptionManager; - disable(): void; + disable(): void; - enable(): void; + enable(): void; - isEnabled(): boolean; + isEnabled(): boolean; - getParent(): null | IControlParent; + getParent(): null | IControlParent; - setParent(parent: IControlParent): this; + setParent(parent: IControlParent): this; - close(): boolean; + close(): boolean; - getState(): string; + getState(): string; - setState(state: string | null): void; - } + setState(state: string | null): void; + } - interface IRulerOptions { - balloonAutoPan?: boolean; - } + interface IRulerOptions { + balloonAutoPan?: boolean; + } - class ScrollZoom implements IBehavior { - constructor(options?: IScrollZoomOptions) + class ScrollZoom implements IBehavior { + constructor(options?: IScrollZoomOptions) - events: IEventManager; - options: IOptionManager; + events: IEventManager; + options: IOptionManager; - disable(): void; + disable(): void; - enable(): void; + enable(): void; - isEnabled(): boolean; + isEnabled(): boolean; - getParent(): null | IControlParent; + getParent(): null | IControlParent; - setParent(parent: IControlParent): this; - } + setParent(parent: IControlParent): this; + } - interface IScrollZoomOptions { - maximumDelta?: number; - speed?: number; - } + interface IScrollZoomOptions { + maximumDelta?: number; + speed?: number; + } - const storage: util.Storage; - } + const storage: util.Storage; + } - namespace clusterer { - class Balloon implements IBalloonManager { //tslint:disable-line no-shadowed-variable - constructor(clusterer: Clusterer); + namespace clusterer { + class Balloon implements IBalloonManager { //tslint:disable-line no-shadowed-variable + constructor(clusterer: Clusterer); - events: IEventManager; + events: IEventManager; - autoPan(): Promise; + autoPan(): Promise; - close(force?: boolean): Promise; + close(force?: boolean): Promise; - destroy(): void; + destroy(): void; - getData(): object | null; + getData(): object | null; - getOptions(): IOptionManager | null; + getOptions(): IOptionManager | null; - getOverlay(): Promise; + getOverlay(): Promise; - getOverlaySync(): IOverlay | null; + getOverlaySync(): IOverlay | null; - getPosition(): number[] | null; + getPosition(): number[] | null; - isOpen(): boolean; + isOpen(): boolean; - open(position?: number[], data?: object | string | HTMLElement, options?: object): Promise; + open(position?: number[], data?: object | string | HTMLElement, options?: object): Promise; - setData(data: object | string | HTMLElement): Promise; + setData(data: object | string | HTMLElement): Promise; - setOptions(options: object): Promise; + setOptions(options: object): Promise; - setPosition(position: number[]): Promise; - } + setPosition(position: number[]): Promise; + } - class Hint implements IHintManager { - constructor(clusterer: Clusterer); + class Hint implements IHintManager { + constructor(clusterer: Clusterer); - events: IEventManager; + events: IEventManager; - close(force?: boolean): Promise; + close(force?: boolean): Promise; - destroy(): void; + destroy(): void; - getData(): object | null; + getData(): object | null; - getOptions(): IOptionManager | null; + getOptions(): IOptionManager | null; - getOverlay(): Promise; + getOverlay(): Promise; - getOverlaySync(): IOverlay | null; + getOverlaySync(): IOverlay | null; - getPosition(): number[] | null; + getPosition(): number[] | null; - isOpen(): boolean; + isOpen(): boolean; - open(position?: number[], data?: object | string | HTMLElement, options?: object): Promise; + open(position?: number[], data?: object | string | HTMLElement, options?: object): Promise; - setData(data: object | string | HTMLElement): Promise; + setData(data: object | string | HTMLElement): Promise; - setOptions(options: object): Promise; + setOptions(options: object): Promise; - setPosition(position: number[]): Promise; - } - } + setPosition(position: number[]): Promise; + } + } - namespace collection { - class Item implements IChildOnMap, ICustomizable, IEventEmitter, IParentOnMap { - constructor(options?: object); + namespace collection { + class Item implements IChildOnMap, ICustomizable, IEventEmitter, IParentOnMap { + constructor(options?: object); - events: IEventManager; - options: IOptionManager; + events: IEventManager; + options: IOptionManager; - getParent(): null | IControlParent; + getParent(): null | IControlParent; - setParent(parent: IControlParent): this; + setParent(parent: IControlParent): this; - getMap(): Map; + getMap(): Map; - onAddToMap(map: Map): void; + onAddToMap(map: Map): void; - onRemoveFromMap(oldMap: Map): void; - } - } + onRemoveFromMap(oldMap: Map): void; + } + } - namespace control { - class Button implements ICustomizable, ISelectableControl { - constructor(parameters?: IButtonParameters | string); + namespace control { + class Button implements ICustomizable, ISelectableControl { + constructor(parameters?: IButtonParameters | string); - options: IOptionManager; - events: IEventManager; - data: data.Manager; - state: data.Manager; + options: IOptionManager; + events: IEventManager; + data: data.Manager; + state: data.Manager; - deselect(): void; + deselect(): void; - disable(): void; + disable(): void; - enable(): void; + enable(): void; - isEnabled(): boolean; + isEnabled(): boolean; - isSelected(): boolean; + isSelected(): boolean; - select(): void; + select(): void; - getParent(): null | IControlParent; + getParent(): null | IControlParent; - setParent(parent: IControlParent): this; - } + setParent(parent: IControlParent): this; + } - interface IBaseButtonParametersOptions { - adjustMapMargin?: boolean; - float?: "none" | "left" | "right"; - floatIndex?: number; - layout?: IClassConstructor | string; - maxWidth?: number[][] | number[] | number; - position?: { - bottom?: number | string; - left?: number | string; - right?: number | string; - top?: number | string; - }; - visible?: boolean; - } + interface IBaseButtonParametersOptions { + adjustMapMargin?: boolean; + float?: "none" | "left" | "right"; + floatIndex?: number; + layout?: IClassConstructor | string; + maxWidth?: number[][] | number[] | number; + position?: { + bottom?: number | string; + left?: number | string; + right?: number | string; + top?: number | string; + }; + visible?: boolean; + } - interface IButtonParameters { - data?: { - content?: string; - image?: string; - title?: string; - }; - options?: IBaseButtonParametersOptions & { - selectOnClick?: boolean; - size?: "auto" | "small" | "medium" | "large"; - }; - state?: { - enabled?: boolean; - selected?: boolean; - }; - } + interface IButtonParameters { + data?: { + content?: string; + image?: string; + title?: string; + }; + options?: IBaseButtonParametersOptions & { + selectOnClick?: boolean; + size?: "auto" | "small" | "medium" | "large"; + }; + state?: { + enabled?: boolean; + selected?: boolean; + }; + } - class FullscreenControl extends Button { - constructor(parameters?: IFullscreenControlParameters); + class FullscreenControl extends Button { + constructor(parameters?: IFullscreenControlParameters); - enterFullscreen(): void; + enterFullscreen(): void; - exitFullscreen(): void; - } + exitFullscreen(): void; + } - interface IFullscreenControlParameters { - data?: { - title?: string; - }; - options?: IBaseButtonParametersOptions & { - collapseOnBlur?: boolean; - expandOnClick?: boolean; - popupFloat?: "left" | "right"; - }; - state?: { - expanded?: boolean; - }; - } + interface IFullscreenControlParameters { + data?: { + title?: string; + }; + options?: IBaseButtonParametersOptions & { + collapseOnBlur?: boolean; + expandOnClick?: boolean; + popupFloat?: "left" | "right"; + }; + state?: { + expanded?: boolean; + }; + } - class GeolocationControl extends Button { - constructor(parameters?: IGeolocationControlParameters); - } + class GeolocationControl extends Button { + constructor(parameters?: IGeolocationControlParameters); + } - interface IGeolocationControlParameters extends IButtonParameters { - data?: { - image?: string; - title?: string; - }; - options?: IBaseButtonParametersOptions; - } + interface IGeolocationControlParameters extends IButtonParameters { + data?: { + image?: string; + title?: string; + }; + options?: IBaseButtonParametersOptions; + } - class ListBox implements ICollection, IControl, ICustomizable { - constructor(parameters?: IListBoxParameters); + class ListBox implements ICollection, IControl, ICustomizable { + constructor(parameters?: IListBoxParameters); - events: IEventManager; - options: IOptionManager; - data: data.Manager; - state: data.Manager; + events: IEventManager; + options: IOptionManager; + data: data.Manager; + state: data.Manager; - add(object: object): this; + add(object: object): this; - getIterator(): IIterator; + getIterator(): IIterator; - remove(object: object): this; + remove(object: object): this; - getParent(): null | IControlParent; + getParent(): null | IControlParent; - setParent(parent: IControlParent): this; - } + setParent(parent: IControlParent): this; + } - interface IListBoxParameters extends IButtonParameters { - options?: IBaseButtonParametersOptions & { - noPlacemark?: boolean; - }; - } - - class ListBoxItem implements ICustomizable, ISelectableControl { - constructor(parameters?: IListBoxItemParameters); - - options: IOptionManager; - events: IEventManager; - data: data.Manager; - state: data.Manager; - - deselect(): void; - - disable(): void; - - enable(): void; - - isEnabled(): boolean; - - isSelected(): boolean; - - select(): void; - - getParent(): null | IControlParent; - - setParent(parent: IControlParent): this; - - getMap(): Map; - } - - interface IListBoxItemParameters { - data?: { - content?: string; - }; - options?: { - layout?: string | IClassConstructor; - selectableLayout?: string | IClassConstructor; - selectOnClick?: boolean; - separatorLayout?: string | IClassConstructor; - type?: "selectable" | "separator"; - visible?: boolean; - }; - state?: { - selected?: boolean; - }; - } - - class Manager { - constructor(map: Map, controls?: Array, options?: IManagerOptions); - - events: event.Manager; - options: option.Manager; - state: data.Manager; - - add(control: IControl | ControlKey, options?: IManagerControlOptions): this; - - each(callback: (control: IControl) => void, context: object): this; - - get(index: number | string): IControl | null; - - getChildElement(control: IControl): Promise; - - getContainer(): HTMLElement; - - getMap(): Map; - - indexOf(childToFind: IControl | string): number; - - remove(control: IControl | string): this; - } - - interface IManagerOptions { - margin?: number; - pane?: IPane; - states?: string[]; - } + interface IListBoxParameters extends IButtonParameters { + options?: IBaseButtonParametersOptions & { + noPlacemark?: boolean; + }; + } + + class ListBoxItem implements ICustomizable, ISelectableControl { + constructor(parameters?: IListBoxItemParameters); + + options: IOptionManager; + events: IEventManager; + data: data.Manager; + state: data.Manager; + + deselect(): void; + + disable(): void; + + enable(): void; + + isEnabled(): boolean; + + isSelected(): boolean; + + select(): void; + + getParent(): null | IControlParent; + + setParent(parent: IControlParent): this; + + getMap(): Map; + } + + interface IListBoxItemParameters { + data?: { + content?: string; + }; + options?: { + layout?: string | IClassConstructor; + selectableLayout?: string | IClassConstructor; + selectOnClick?: boolean; + separatorLayout?: string | IClassConstructor; + type?: "selectable" | "separator"; + visible?: boolean; + }; + state?: { + selected?: boolean; + }; + } + + class Manager { + constructor(map: Map, controls?: Array, options?: IManagerOptions); + + events: event.Manager; + options: option.Manager; + state: data.Manager; + + add(control: IControl | ControlKey, options?: IManagerControlOptions): this; + + each(callback: (control: IControl) => void, context: object): this; + + get(index: number | string): IControl | null; + + getChildElement(control: IControl): Promise; + + getContainer(): HTMLElement; + + getMap(): Map; + + indexOf(childToFind: IControl | string): number; + + remove(control: IControl | string): this; + } + + interface IManagerOptions { + margin?: number; + pane?: IPane; + states?: string[]; + } - interface IManagerControlOptions { - float?: "none" | "left" | "right"; - floatIndex?: number; - position?: { - bottom?: number | string; - left?: number | string; - right?: number | string; - top?: number | string; - }; - } + interface IManagerControlOptions { + float?: "none" | "left" | "right"; + floatIndex?: number; + position?: { + bottom?: number | string; + left?: number | string; + right?: number | string; + top?: number | string; + }; + } - class RouteButton implements IControl, ICustomizable { - constructor(parameters?: IRouteButtonParameters); + class RouteButton implements IControl, ICustomizable { + constructor(parameters?: IRouteButtonParameters); - events: IEventManager; - options: IOptionManager; - routePanel: IRoutePanel; + events: IEventManager; + options: IOptionManager; + routePanel: IRoutePanel; - getParent(): null | IControlParent; + getParent(): null | IControlParent; - setParent(parent: IControlParent): this; - } + setParent(parent: IControlParent): this; + } - interface IRouteButtonParameters { - options?: { - adjustMapMargin?: boolean; - collapseOnBlur?: boolean; - float?: "none" | "left" | "right"; - floatIndex?: number; - popupAnimate?: boolean; - popupFloat?: "auto" | "left" | "right"; - popupWidth?: string; - position?: { - bottom?: number | string; - left?: number | string; - right?: number | string; - top?: number | string; - }; - size?: "auto" | "small" | "medium" | "large"; - visible?: boolean; - }; - state?: { - expanded?: boolean; - }; - } - - class RouteEditor extends Button { - constructor(parameters?: IRouteEditorParameters); - - getRoute(): router.Route; - } - - interface IRouteEditorParameters { - data?: { - image?: string; - title?: string; - }; - options?: IBaseButtonParametersOptions; - state?: {}; - } - - class RulerControl extends Button { - constructor(parameters?: IRulerControlParameters); - } - - interface IRulerControlParameters { - data?: {}; - options?: { - adjustMapMargin?: boolean; - position?: { - bottom?: number | string; - left?: number | string; - right?: number | string; - top?: number | string; - }; - scaleLine?: boolean; - visible?: boolean; - }; - state?: {}; - } - - class SearchControl implements IControl, ICustomizable { - constructor(parameters?: ISearchControlParameters); - - events: IEventManager; - options: IOptionManager; - state: data.Manager; - - getParent(): null | IControlParent; - - setParent(parent: IControlParent): this; - - clear(): void; - - getMap(): Map; - - getRequestString(): string; - - getResponseMetaData(): object; - - getResult(index: number): Promise; - - getResultsArray(): object[]; - - getResultsCount(): number; + interface IRouteButtonParameters { + options?: { + adjustMapMargin?: boolean; + collapseOnBlur?: boolean; + float?: "none" | "left" | "right"; + floatIndex?: number; + popupAnimate?: boolean; + popupFloat?: "auto" | "left" | "right"; + popupWidth?: string; + position?: { + bottom?: number | string; + left?: number | string; + right?: number | string; + top?: number | string; + }; + size?: "auto" | "small" | "medium" | "large"; + visible?: boolean; + }; + state?: { + expanded?: boolean; + }; + } + + class RouteEditor extends Button { + constructor(parameters?: IRouteEditorParameters); + + getRoute(): router.Route; + } + + interface IRouteEditorParameters { + data?: { + image?: string; + title?: string; + }; + options?: IBaseButtonParametersOptions; + state?: {}; + } + + class RulerControl extends Button { + constructor(parameters?: IRulerControlParameters); + } + + interface IRulerControlParameters { + data?: {}; + options?: { + adjustMapMargin?: boolean; + position?: { + bottom?: number | string; + left?: number | string; + right?: number | string; + top?: number | string; + }; + scaleLine?: boolean; + visible?: boolean; + }; + state?: {}; + } + + class SearchControl implements IControl, ICustomizable { + constructor(parameters?: ISearchControlParameters); + + events: IEventManager; + options: IOptionManager; + state: data.Manager; + + getParent(): null | IControlParent; + + setParent(parent: IControlParent): this; + + clear(): void; + + getMap(): Map; + + getRequestString(): string; + + getResponseMetaData(): object; + + getResult(index: number): Promise; + + getResultsArray(): object[]; + + getResultsCount(): number; - getSelectedIndex(): number; + getSelectedIndex(): number; - hideResult(): void; + hideResult(): void; - search(request: string): Promise; + search(request: string): Promise; - showResult(index: number): this; - } + showResult(index: number): this; + } - interface ISearchControlParameters { - data?: {}; - options?: { - adjustMapMargin?: boolean; - boundedBy?: number[][]; - fitMaxWidth?: boolean; - float?: "none" | "left" | "right"; - floatIndex?: number; - formLayout?: string | IClassConstructor; - kind?: "house" | "street" | "metro" | "district" | "locality"; - layout?: string | IClassConstructor; - maxWidth?: number[][] | number[] | number; - noCentering?: boolean; - noPlacemark?: boolean; - noPopup?: boolean; - noSelect?: boolean; - noSuggestPanel?: boolean; - placeholderContent?: string; - popupItemLayout?: string | IClassConstructor; - popupLayout?: string | IClassConstructor; - position?: { - bottom?: number | string; - left?: number | string; - right?: number | string; - top?: number | string; - }; - provider?: IGeocodeProvider | "yandex#map" | "yandex#search"; - searchCoordOrder?: "latlong" | "longlat"; - size?: "auto" | "small" | "medium" | "large"; - strictBounds?: boolean; - suppressYandexSearch?: boolean; - useMapBounds?: boolean; - zoomMargin?: number; - visible?: boolean; - }; - state?: {}; - } - } + interface ISearchControlParameters { + data?: {}; + options?: { + adjustMapMargin?: boolean; + boundedBy?: number[][]; + fitMaxWidth?: boolean; + float?: "none" | "left" | "right"; + floatIndex?: number; + formLayout?: string | IClassConstructor; + kind?: "house" | "street" | "metro" | "district" | "locality"; + layout?: string | IClassConstructor; + maxWidth?: number[][] | number[] | number; + noCentering?: boolean; + noPlacemark?: boolean; + noPopup?: boolean; + noSelect?: boolean; + noSuggestPanel?: boolean; + placeholderContent?: string; + popupItemLayout?: string | IClassConstructor; + popupLayout?: string | IClassConstructor; + position?: { + bottom?: number | string; + left?: number | string; + right?: number | string; + top?: number | string; + }; + provider?: IGeocodeProvider | "yandex#map" | "yandex#search"; + searchCoordOrder?: "latlong" | "longlat"; + size?: "auto" | "small" | "medium" | "large"; + strictBounds?: boolean; + suppressYandexSearch?: boolean; + useMapBounds?: boolean; + zoomMargin?: number; + visible?: boolean; + }; + state?: {}; + } + } - namespace data { - class Manager implements IDataManager, IFreezable { - constructor(data?: object); + namespace data { + class Manager implements IDataManager, IFreezable { + constructor(data?: object); - events: IEventManager; + events: IEventManager; - get(path: string, defaultValue: object): object; + get(path: string, defaultValue: object): object; - getAll(): object; + getAll(): object; - set(path: object | string, value: object): this; + set(path: object | string, value: object): this; - setAll(): this; + setAll(): this; - unset(path: object | string): this; + unset(path: object | string): this; - unsetAll(): this; + unsetAll(): this; - freeze(): IFreezable; + freeze(): IFreezable; - isFrozen(): boolean; + isFrozen(): boolean; - unfreeze(): IFreezable; + unfreeze(): IFreezable; - add(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; + add(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; - getParent(): IEventManager | null; + getParent(): IEventManager | null; - group(): IEventGroup; + group(): IEventGroup; - remove(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; + remove(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; - setParent(parent: IEventManager | null): this; + setParent(parent: IEventManager | null): this; - fire(type: string, eventobject: object | IEvent): this; - } - } + fire(type: string, eventobject: object | IEvent): this; + } + } - namespace event { - class Manager implements IEventManager { - constructor(params?: { context?: object; controllers?: IEventWorkflowController[]; parent?: IEventManager }); + namespace event { + class Manager implements IEventManager { + constructor(params?: { context?: object; controllers?: IEventWorkflowController[]; parent?: IEventManager }); - add(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; + add(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; - getParent(): IEventManager | null; + getParent(): IEventManager | null; - group(): IEventGroup; + group(): IEventGroup; - remove(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; + remove(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; - setParent(parent: IEventManager | null): this; + setParent(parent: IEventManager | null): this; - fire(type: string, eventobject: object | IEvent): this; + fire(type: string, eventobject: object | IEvent): this; - createEventobject(type: string, event: object, target: object): Event; + createEventobject(type: string, event: object, target: object): Event; - once(types: string[][] | string[] | string, callback: (event: IEvent) => any, context?: object, priority?: number): this; - } - } - - namespace geometry { - namespace base { - class LineString implements IBaseLineStringGeometry { //tslint:disable-line no-shadowed-variable - static fromEncodedCoordinates(encodedCoordinates: string): geometry.LineString; //tslint:disable-line function-name - - static toEncodedCoordinates(geometry: geometry.LineString): string; //tslint:disable-line function-name + once(types: string[][] | string[] | string, callback: (event: IEvent) => any, context?: object, priority?: number): this; + } + } + namespace geometry { + namespace base { + class LineString implements IBaseLineStringGeometry { //tslint:disable-line no-shadowed-variable events: IEventManager; - getBounds(): number[][] | null; + static fromEncodedCoordinates(encodedCoordinates: string): geometry.LineString; //tslint:disable-line function-name - getType(): string; + static toEncodedCoordinates(geometry: geometry.LineString): string; //tslint:disable-line function-name - get(index: number): number[]; + getBounds(): number[][] | null; - getChildGeometry(index: number): IPointGeometryAccess; + getType(): string; - getClosest(anchorPosition: number[]): object; + get(index: number): number[]; - getCoordinates(): number[][]; + getChildGeometry(index: number): IPointGeometryAccess; - getLength(): number; + getClosest(anchorPosition: number[]): object; - insert(index: number, coordinates: number[][]): ILineStringGeometryAccess; + getCoordinates(): number[][]; - remove(index: number): number[]; + getLength(): number; - remove(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; + insert(index: number, coordinates: number[][]): ILineStringGeometryAccess; - set(index: number, coordinates: number[]): ILineStringGeometryAccess; + remove(index: number): number[]; - setCoordinates(coordinates: number[]): ILineStringGeometryAccess; + remove(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; - splice(index: number, length: number): number[][]; + set(index: number, coordinates: number[]): ILineStringGeometryAccess; - freeze(): IFreezable; + setCoordinates(coordinates: number[]): ILineStringGeometryAccess; - isFrozen(): boolean; + splice(index: number, length: number): number[][]; - unfreeze(): IFreezable; + freeze(): IFreezable; - add(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; + isFrozen(): boolean; - getParent(): object | null; + unfreeze(): IFreezable; - group(): IEventGroup; + add(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; - setParent(parent: IEventManager | null): this; + getParent(): object | null; - fire(type: string, eventobject: object | IEvent): this; - } + group(): IEventGroup; - class Point implements IBasePointGeometry { //tslint:disable-line no-shadowed-variable - events: IEventManager; + setParent(parent: IEventManager | null): this; - getBounds(): number[][] | null; + fire(type: string, eventobject: object | IEvent): this; + } - getType(): string; + class Point implements IBasePointGeometry { //tslint:disable-line no-shadowed-variable + events: IEventManager; - getCoordinates(): number[] | null; + getBounds(): number[][] | null; - setCoordinates(coordinates: number[] | null): this; - } - } + getType(): string; - class LineString implements ILineStringGeometry { - constructor(coordinates?: number[][], options?: { - coordRendering?: "shortestPath" | "straightPath"; - geodesic?: boolean; - pixelRendering?: "jumpy" | "static"; - projection?: IProjection; - simplification?: boolean; - }); + getCoordinates(): number[] | null; - static fromEncodedCoordinates(encodedCoordinates: string): LineString; //tslint:disable-line function-name + setCoordinates(coordinates: number[] | null): this; + } + } + class LineString implements ILineStringGeometry { + constructor(coordinates?: number[][], options?: { + coordRendering?: "shortestPath" | "straightPath"; + geodesic?: boolean; + pixelRendering?: "jumpy" | "static"; + projection?: IProjection; + simplification?: boolean; + }); + + events: IEventManager; + options: IOptionManager; + + static fromEncodedCoordinates(encodedCoordinates: string): LineString; //tslint:disable-line function-name static toEncodedCoordinates(geometry: LineString): string; //tslint:disable-line function-name - events: IEventManager; - options: IOptionManager; + getMap(): Map | null; - getMap(): Map | null; + getPixelGeometry(options?: object): IPixelGeometry; - getPixelGeometry(options?: object): IPixelGeometry; + setMap(map: Map): void; - setMap(map: Map): void; + getBounds(): number[][] | null; - getBounds(): number[][] | null; + getType(): string; - getType(): string; + get(index: number): number[]; - get(index: number): number[]; + getChildGeometry(index: number): IPointGeometryAccess; - getChildGeometry(index: number): IPointGeometryAccess; + getClosest(anchorPosition: number[]): object; - getClosest(anchorPosition: number[]): object; + getCoordinates(): number[][]; - getCoordinates(): number[][]; + getLength(): number; - getLength(): number; + insert(index: number, coordinates: number[][]): ILineStringGeometryAccess; - insert(index: number, coordinates: number[][]): ILineStringGeometryAccess; + remove(index: number): number[]; - remove(index: number): number[]; + remove(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; - remove(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; + set(index: number, coordinates: number[]): ILineStringGeometryAccess; - set(index: number, coordinates: number[]): ILineStringGeometryAccess; + setCoordinates(coordinates: number[]): ILineStringGeometryAccess; - setCoordinates(coordinates: number[]): ILineStringGeometryAccess; + splice(index: number, length: number): number[][]; - splice(index: number, length: number): number[][]; + freeze(): IFreezable; - freeze(): IFreezable; + isFrozen(): boolean; - isFrozen(): boolean; + unfreeze(): IFreezable; - unfreeze(): IFreezable; + add(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; - add(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; + getParent(): object | null; - getParent(): object | null; + group(): IEventGroup; - group(): IEventGroup; + setParent(parent: IEventManager | null): this; - setParent(parent: IEventManager | null): this; + fire(type: string, eventobject: object | IEvent): this; + } - fire(type: string, eventobject: object | IEvent): this; - } + class Point implements IPointGeometry { + constructor(coordinates?: number[] | null); - class Point implements IPointGeometry { - constructor(coordinates?: number[] | null); + options: IOptionManager; + events: IEventManager; - options: IOptionManager; - events: IEventManager; + getMap(): Map | null; - getMap(): Map | null; + getPixelGeometry(options?: object): IPixelGeometry; - getPixelGeometry(options?: object): IPixelGeometry; + setMap(map: Map): void; - setMap(map: Map): void; + getBounds(): number[][] | null; - getBounds(): number[][] | null; + getType(): string; - getType(): string; - - getCoordinates(): number[] | null; + getCoordinates(): number[] | null; setCoordinates(coordinates: number[] | null): this; } } - namespace geoObject { - class Balloon implements IBalloonManager { //tslint:disable-line no-shadowed-variable - constructor(geoObject: GeoObject); + namespace geometryEditor { + class Circle implements IGeometryEditor { + constructor(geometry: ICircleGeometry, options?: object); events: IEventManager; - - autoPan(): Promise; - - close(force?: boolean): Promise; - - destroy(): void; - - getData(): object | null; - - getOptions(): IOptionManager | null; - - getOverlay(): Promise; - - getOverlaySync(): IOverlay | null; - - getPosition(): number[] | null; - - isOpen(): boolean; - - open(position?: number[], data?: object | string | HTMLElement, options?: object): Promise; - - setData(data: object | string | HTMLElement): Promise; - - setOptions(options: object): Promise; - - setPosition(position: number[]): Promise; - } - - class Hint implements IHintManager { - constructor(geoObject: GeoObject); - - events: IEventManager; - - close(force?: boolean): Promise; - - destroy(): void; - - getData(): object | null; - - getOptions(): IOptionManager | null; - - getOverlay(): Promise; - - getOverlaySync(): IOverlay | null; - - getPosition(): number[] | null; - - isOpen(): boolean; - - open(position?: number[], data?: object | string | HTMLElement, options?: object): Promise; - - setData(data: object | string | HTMLElement): Promise; - - setOptions(options: object): Promise; - - setPosition(position: number[]): Promise; - } - - class Sequence implements IGeoObject, IGeoObjectSequence { - constructor(geoObject: GeoObject); - - geometry: IGeometry | null; - properties: IDataManager; + geometry: IGeometry; + options: IOptionManager; state: IDataManager; + + startDrawing(): vow.Promise; + + startEditing(): void; + + stopDrawing(): vow.Promise; + + stopEditing(): void; + } + + class LineString implements IGeometryEditor { + constructor(geometry: ILineStringGeometry, options?: object); + events: IEventManager; + geometry: IGeometry; options: IOptionManager; - - getOverlay(): Promise; - - getOverlaySync(): IOverlay | null; - - getParent(): null | IControlParent; - - setParent(parent: IControlParent): this; - - getMap(): Map; - - each(callback: (geoObject: IGeoObject) => void, context?: object): void; - - get(index: number): IGeoObject; - - getBounds(): number[][] | null; - - getIterator(): IIterator; - - getLength(): number; - - getPixelBounds(): number[][] | null; - - indexOf(geoObject: IGeoObject): number; - } - } - - namespace layout { - namespace templateBased { - class Base implements ILayout { - constructor(data: object); - - events: IEventManager; - - destroy(): void; - - getData(): object; - - getParentElement(): HTMLElement; - - getShape(): IShape | null; - - isEmpty(): boolean; - - setData(data: object): void; - - setParentElement(parent: HTMLElement | null): this; - - build(): void; - - clear(): void; - - onSublayoutSizeChange(sublayoutInfo: object, nodeSizeByContent: object): void; - - rebuild(): void; - } - } - } - - namespace map { - namespace action { - class Manager implements IEventEmitter { - constructor(map: Map); - - events: IEventManager; - - breakTick(): void; - - execute(action: IMapAction): void; - - getCurrentState(): object; - - getMap(): Map; - - setCorrection(userFunction: () => void): void; - - stop(): void; - } - } - - namespace behavior { // tslint:disable-line no-shadowed-variable - class Manager implements ICustomizable, IEventEmitter, IParentOnMap { - constructor(map: Map, behaviors?: string[][] | string[], options?: object); - - options: IOptionManager; - events: IEventManager; - - getMap(): Map; - - disable(behaviors: string[][] | string[] | string): this; - - enable(behaviors: string[][] | string[] | string): this; - - get(behaviorName: string): IBehavior; - - isEnabled(behaviorName: string): boolean; - } - } - - namespace layer { - class Manager implements ILayer, IMapObjectCollection { - constructor(map: Map, options?: { - trafficImageZIndex?: number; - trafficInfoZIndex?: number; - trafficJamZIndex?: number; - }); - - events: IEventManager; - options: IOptionManager; - - getParent(): null | IControlParent; - - setParent(parent: IControlParent): this; - - add(object: object): this; - - getIterator(): IIterator; - - remove(object: object): this; - - getMap(): Map; - } - } - - namespace margin { - class Accessor { - constructor(screenArea: object); - - getArea(): object; - - remove(): this; - - setArea(screenArea: object): this; - } - - class Manager { - constructor(map: Map); - - addArea(screenArea: object): Accessor; - - destroy(): this; - - getMargin(): number[]; - - getOffset(): number[]; - - setDefaultMargin(margin: number[][] | number[] | number): void; - } - } - - namespace pane { - class Manager { - constructor(map: Map); - - append(key: string, pane: IPane): void; - - destroy(): void; - - get(key: string): IPane | null; - - getLower(): string; - - getUpper(): string; - - insertBefore(key: string, pane: IPane, referenceKey: string): void; - - remove(pane: IPane): void; - } - } - - class Balloon implements IBalloonManager/*, IBalloonSharingManager*/ { //tslint:disable-line no-shadowed-variable - constructor(map: Map); - - events: IEventManager; - - autoPan(): Promise; - - close(force?: boolean): Promise; - - destroy(): void; - - getData(): object | null; - - getOptions(): IOptionManager | null; - - getOverlay(): Promise; - - getOverlaySync(): IOverlay | null; - - getPosition(): number[] | null; - - isOpen(): boolean; - - open(position?: number[], data?: object | string | HTMLElement, options?: object): Promise; - - setData(data: object | string | HTMLElement): Promise; - - setOptions(options: object): Promise; - - setPosition(position: number[]): Promise; - } - - class Container implements IDomEventEmitter { - constructor(parentElement: string | HTMLElement); - - events: IEventManager; - - enterFullscreen(): void; - - exitFullscreen(): void; - - fitToViewport(preservePixelPosition?: boolean): void; - - getElement(): HTMLElement; - - getOffset(): number[]; - - getParentElement(): HTMLElement; - - getSize(): number[]; - - isFullscreen(): boolean; - } - - class Converter { - constructor(map: Map); - - globalToPage(globalPixelPoint: number[]): number[]; - - pageToGlobal(pagePixelPoint: number[]): number[]; - } - - class Copyrights { - constructor(map: Map); - - add(customCopyrights: string | HTMLElement | Array): ICopyrightsAccessor; - - addProvider(provider: ICopyrightsProvider): this; - - get(point?: number[], zoom?: number): Promise>; - - getPromoLink(): string; - - removeProvider(provider: ICopyrightsProvider): this; - } - - class GeoObjects implements IGeoObjectCollection { - constructor(map: Map, options?: object); - - options: IOptionManager; - events: IEventManager; - - add(child: IGeoObject, index?: number): this; - - each(callback: (object: IGeoObject) => void, context: object): void; - - get(index: number): IGeoObject; - - getBounds(): number[][] | null; - - getIterator(): IIterator; - - getLength(): number; - - getPixelBounds(): number[][] | null; - - indexOf(object: IGeoObject): number; - - remove(child: IGeoObject): this; - - removeAll(): this; - - set(index: number, child: IGeoObject): this; - - splice(index: number, length: number): this; - - getMap(): Map; - } - - class Hint implements IHintManager/*, IHintSharingManager*/ { - constructor(map: Map); - - events: IEventManager; - - close(force?: boolean): Promise; - - destroy(): void; - - getData(): object | null; - - getOptions(): IOptionManager | null; - - getOverlay(): Promise; - - getOverlaySync(): IOverlay | null; - - getPosition(): number[] | null; - - isOpen(): boolean; - - open(position?: number[], data?: object | string | HTMLElement, options?: object): Promise; - - setData(data: object | string | HTMLElement): Promise; - - setOptions(options: object): Promise; - - setPosition(position: number[]): Promise; - } - - class ZoomRange implements IEventEmitter { - constructor(map: Map, constraints: number[]); - - events: IEventManager; - - get(coords?: number[]): Promise; - - getCurrent(): number[]; - } - } - - namespace multiRouter { - namespace driving { - class Path implements IGeoObject { - geometry: IGeometry | null; - properties: data.Manager; - state: IDataManager; - model: PathModel; - events: IEventManager; - options: IOptionManager; - - getOverlay(): Promise; - - getOverlaySync(): IOverlay | null; - - getParent(): object | null; - - setParent(parent: object): this; - - getMap(): Map; - - getSegments(): GeoObjectCollection; - } - - class PathModel implements IEventEmitter { - events: IEventManager; - properties: data.Manager; - route: RouteModel; - - destroy(): void; - - getSegments(): SegmentModel[]; - - getType(): string; - - update(pathJson: object): void; - } - - class Route implements IGeoObject { - geometry: IGeometry | null; - properties: IDataManager; - state: IDataManager; - events: IEventManager; - options: IOptionManager; - - getOverlay(): Promise; - - getOverlaySync(): IOverlay | null; - - getParent(): object | null; - - setParent(parent: object): this; - - getMap(): Map; - - getPaths(): GeoObjectCollection; - } - - class RouteModel implements IEventEmitter { - events: IEventManager; - multiRoute: MultiRouteModel; - properties: data.Manager; - - destroy(): void; - - getPaths(): PathModel[]; - - update(routeJson: object): void; - - getType(): string; - } - - class Segment implements IGeoObject { - geometry: IGeometry | null; - properties: data.Manager; - state: IDataManager; - events: IEventManager; - options: IOptionManager; - - getOverlay(): Promise; - - getOverlaySync(): IOverlay | null; - - getParent(): object | null; - - setParent(parent: object): this; - - getMap(): Map; - } - - class SegmentModel implements IEventEmitter { - events: IEventManager; - geometry: geometry.base.LineString; - path: PathModel; - - destroy(): void; - - getType(): string; - - getViaPoints(): ViaPointModel[]; - - update(segmentJson: object): void; - } - } - - namespace masstransit { - class Path implements IGeoObject { - geometry: IGeometry | null; - properties: data.Manager; - state: IDataManager; - events: IEventManager; - options: IOptionManager; - model: PathModel; - - getOverlay(): Promise; - - getOverlaySync(): IOverlay | null; - - getParent(): object | null; - - setParent(parent: object): this; - - getMap(): Map; - - getSegmentMarkers(): GeoObjectCollection; - - getSegments(): GeoObjectCollection; - } - - class PathModel implements IEventEmitter { - events: IEventManager; - properties: data.Manager; - route: RouteModel; - - destroy(): void; - - getSegments(): Array; - - getType(): string; - - update(pathJson: object): void; - } - - class Route implements IGeoObject { - geometry: IGeometry | null; - properties: data.Manager; - model: RouteModel; - state: IDataManager; - events: IEventManager; - options: IOptionManager; - - getOverlay(): Promise; - - getOverlaySync(): IOverlay | null; - - getParent(): object | null; - - setParent(parent: object): this; - - getMap(): Map; - - getPaths(): GeoObjectCollection; - } - - class RouteModel implements IEventEmitter { - events: IEventManager; - multiRoute: MultiRouteModel; - properties: data.Manager; - - destroy(): void; - - getPaths(): PathModel[]; - - getType(): string; - - update(routeJson: object): void; - } - - class StopModel implements IEventEmitter { - events: IEventManager; - geometry: geometry.base.Point; - properties: data.Manager; - segment: TransportSegmentModel; - - update(stopJson: object): void; - } - - class TransferSegment implements IGeoObject { - geometry: IGeometry | null; - properties: data.Manager; - state: IDataManager; - events: IEventManager; - options: IOptionManager; - model: TransferSegmentModel; - - getOverlay(): Promise; - - getOverlaySync(): IOverlay | null; - - getParent(): object | null; - - setParent(parent: object): this; - - getMap(): Map; - } - - class TransferSegmentModel implements IEventEmitter { - events: IEventManager; - geometry: geometry.base.LineString; - path: PathModel; - properties: data.Manager; - - destroy(segmentJson: object): void; - - getType(): string; - } - - class TransportSegment implements IGeoObject { - geometry: IGeometry | null; - properties: data.Manager; - state: IDataManager; - events: IEventManager; - options: IOptionManager; - model: TransportSegmentModel; - - getOverlay(): Promise; - - getOverlaySync(): IOverlay | null; - - getParent(): object | null; - - setParent(parent: object): this; - - getMap(): Map; - } - - class TransportSegmentModel implements IEventEmitter { - events: IEventManager; - geometry: geometry.base.LineString; - path: PathModel; - properties: data.Manager; - - destroy(): void; - - getStops(): StopModel[]; - - getType(): string; - - update(segmentJson: object): void; - } - - class WalkSegment implements IGeoObject { - geometry: IGeometry | null; - properties: data.Manager; - state: IDataManager; - events: IEventManager; - options: IOptionManager; - model: WalkSegmentModel; - - getOverlay(): Promise; - - getOverlaySync(): IOverlay | null; - - getParent(): object | null; - - setParent(parent: object): this; - - getMap(): Map; - } - - class WalkSegmentModel implements IEventEmitter { - events: IEventManager; - geometry: geometry.base.LineString; - path: PathModel; - properties: data.Manager; - - destroy(): void; - - getType(): string; - } - } - - class EditorAddon implements ICustomizable, IEventEmitter { - options: IOptionManager; - events: IEventManager; - state: data.Manager; - - isActive(): boolean; - - start(state: object): void; - - stop(): void; - } - - class MultiRoute implements IGeoObject { - constructor(model: MultiRouteModel | IMultiRouteModelJson, options?: { - activeRouteAutoSelection?: boolean; - boundsAutoApply?: boolean; - dragUpdateInterval?: string | number; - preventDragUpdate?: boolean; - useMapMargin?: boolean; - zoomMargin?: number[][] | number[] | number; - [index: string]: any; - }); - - editor: EditorAddon; - model: MultiRouteModel; - geometry: IGeometry | null; - properties: IDataManager; state: IDataManager; + + getModel(): vow.Promise; + + getModelSync(): model.RootLineString | null; + + getView(): vow.Promise; + + getViewSync(): view.Path | null; + + startDrawing(): vow.Promise; + + startEditing(): vow.Promise; + + startFraming(): vow.Promise; + + stopDrawing(): void; + + stopEditing(): void; + + stopFraming(): void; + } + + namespace model { + class ChildLinearRing extends ChildLineString {} + + class ChildLineString implements IGeometryEditorChildModel { + editor: IGeometryEditor; + events: IEventManager; + geometry: IBaseGeometry; + + destroy(): void; + + getAllVerticesNumber(): number; + + getEdgeModels(): Edge[]; + + getIndex(): number; + + getParent(): IGeometryEditorModel; + + getPixels(): number[]; + + getVertexModels(): ChildVertex[]; + + setIndex(index: number): void; + + setPixels(pixels: number[]): void; + + spliceVertices(start: number, deleteCount: number): number[][]; + } + + class ChildVertex implements IGeometryEditorChildModel { + editor: IGeometryEditor; + events: IEventManager; + geometry: IBaseGeometry; + + destroy(): void; + + getAllVerticesNumber(): number; + + getIndex(): number; + + getNextVertex(): ChildVertex | null; + + getParent(): IGeometryEditorModel; + + getPixels(): number[]; + + getPrevVertex(): ChildVertex | null; + + setGlobalPixels(pixels: number[]): void; + + setIndex(index: number): void; + + setNextVertex(nextVertex: ChildVertex): void; + + setPixels(pixels: number[]): void; + + setPrevVertex(prevVertex: ChildVertex): void; + } + + class Edge implements IGeometryEditorRootModel { + events: IEventManager; + + destroy(): void; + + getNextVertex(): ChildVertex | null; + + getPixels(): number[]; + + getPrevVertex(): ChildVertex | null; + + setNextVertex(nextVertex: ChildVertex): void; + + setPrevVertex(prevVertex: ChildVertex): void; + } + + class EdgeGeometry implements IGeometry { + events: IEventManager; + options: IOptionManager; + + getBounds(): number[][] | null; + + getMap(): Map | null; + + getPixelGeometry(options?: object): IPixelGeometry; + + getType(): string; + + setMap(map: Map): void; + } + + class RootLineString implements IGeometryEditorRootModel { + events: IEventManager; + + destroy(): void; + + getAllVerticesNumber(): number; + + getPixels(): number[]; + + getVertexModels(): ChildVertex[]; + + spliceVertices(start: number, deleteCount: number): number[][]; + } + + class RootPolygon implements IGeometryEditorRootModel { + events: IEventManager; + + destroy(): void; + + getAllVerticesNumber(): number; + + getPathModels(): ChildLinearRing[]; + + getPixels(): number[]; + + splicePaths(start: number, deleteCount: number): number[][]; + } + } + + class Point implements IGeometryEditor { events: IEventManager; + geometry: IGeometry; options: IOptionManager; - - getOverlay(): Promise; - - getOverlaySync(): IOverlay | null; - - getParent(): object | null; - - setParent(parent: object): this; - - getMap(): Map; - - getActiveRoute(): driving.Route | masstransit.Route | null; - - getBounds(): number[][] | null; - - getPixelBounds(): number[][] | null; - - getRoutes(): GeoObjectCollection; - - getViaPoints(): GeoObjectCollection; - - getWayPoints(): GeoObjectCollection; - - setActiveRoute(route: driving.Route | masstransit.Route | null): void; - } - - class MultiRouteModel implements IEventEmitter { - constructor(referencePoints: IMultiRouteReferencePoint[], params?: IMultiRouteParams); - - events: IEventManager; - properties: data.Manager; - - destroy(): void; - - getAllPoints(): Array; - - getJson(): object; - - getParams(): IMultiRouteParams; - - getPoints(): Array; - - getReferencePointIndexes(): object; - - getReferencePoints(): IMultiRouteReferencePoint[]; - - getRoutes(): driving.RouteModel[] | masstransit.RouteModel[]; - - getViaPoints(): ViaPointModel[]; - - getWayPoints(): WayPointModel[]; - - setParams(params: IMultiRouteParams, extend?: boolean, clearRequests?: boolean): void; - - setReferencePoints(referencePoints: IMultiRouteReferencePoint[], viaIndexes?: number[], clearRequests?: boolean): void; - } - - class ViaPoint implements IGeoObject { - geometry: IGeometry | null; - properties: data.Manager; state: IDataManager; + + startDrawing(): vow.Promise; + + startEditing(): void; + + stopDrawing(): vow.Promise; + + stopEditing(): void; + } + + class Polygon implements IGeometryEditor { + constructor(geometry: IPolygonGeometry, options: object) + events: IEventManager; + geometry: IGeometry; options: IOptionManager; - - getOverlay(): Promise; - - getOverlaySync(): IOverlay | null; - - getParent(): object | null; - - setParent(parent: object): this; - - getMap(): Map; - } - - class ViaPointModel implements IEventEmitter { - events: IEventManager; - geometry: geometry.base.Point; - multiRoute: MultiRouteModel; - properties: data.Manager; - - destroy(): void; - - getReferencePoint(): object; - - getReferencePointIndex(): number; - - setReferencePoint(referencePoint: object): void; - - update(viaPointJson: object): void; - } - - class WayPoint implements IGeoObject { - geometry: IGeometry | null; - properties: data.Manager; state: IDataManager; - events: IEventManager; - options: IOptionManager; - model: WayPointModel; - getOverlay(): Promise; + getModel(): vow.Promise; - getOverlaySync(): IOverlay | null; + getModelSync(): model.RootPolygon | null; - getParent(): object | null; + getView(): vow.Promise; - setParent(parent: object): this; + getViewSync(): view.MultiPath | null; - getMap(): Map; + startDrawing(): vow.Promise; + + startEditing(): vow.Promise; + + startFraming(): vow.Promise; + + stopDrawing(): void; + + stopEditing(): void; + + stopFraming(): void; } - class WayPointModel implements IEventEmitter { - events: IEventManager; - geometry: geometry.base.Point; - multiRoute: MultiRouteModel; - properties: data.Manager; + namespace view { + class Edge { + getPlacemark(): GeoObject; + } - destroy(): void; + class MultiPath { + getEdgePlacemarks(): GeoObjectCollection; - getReferencePoint(): object; + getPathViews(): Path[]; - getReferencePointIndex(): number; + getVertexPlacemarks(): GeoObjectCollection; + } - setReferencePoint(referencePoint: object): void; + class Path { + getEdgePlacemarks(): GeoObjectCollection; - update(wayPointJson: object): void; + getEdgeViews(): Edge[]; + + getVertexPlacemarks(): GeoObjectCollection; + + getVertexViews(): Vertex[]; + } + + class Vertex { + getPlacemark(): GeoObject; + } } } - namespace option { - class Manager implements IOptionManager { - constructor(options?: object, parent?: IOptionManager, name?: string); + namespace geoObject { + class Balloon implements IBalloonManager { //tslint:disable-line no-shadowed-variable + constructor(geoObject: GeoObject); - events: IEventManager; + events: IEventManager; - get(key: string, defaultValue: object): object; + autoPan(): Promise; - getAll(): object; + close(force?: boolean): Promise; - getName(): string; + destroy(): void; - getNative(key: string): object; + getData(): object | null; - resolve(key: string, name?: string): object; + getOptions(): IOptionManager | null; - set(key: object | string, value?: object): this; + getOverlay(): Promise; - unset(keys: string[][] | string[] | string): this; + getOverlaySync(): IOverlay | null; - unsetAll(): this; + getPosition(): number[] | null; - setName(name: string): void; + isOpen(): boolean; - getParent(): null | IOptionManager; + open(position?: number[], data?: object | string | HTMLElement, options?: object): Promise; - setParent(parent: IOptionManager): this; + setData(data: object | string | HTMLElement): Promise; - freeze(): IFreezable; + setOptions(options: object): Promise; - isFrozen(): boolean; + setPosition(position: number[]): Promise; + } - unfreeze(): IFreezable; + class Hint implements IHintManager { + constructor(geoObject: GeoObject); - add(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; + events: IEventManager; - group(): IEventGroup; + close(force?: boolean): Promise; - remove(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; + destroy(): void; - fire(type: string, eventobject: object | IEvent): this; - } - } + getData(): object | null; - namespace panorama { - class Manager implements IEventEmitter { - events: IEventManager; + getOptions(): IOptionManager | null; - closePlayer(): void; + getOverlay(): Promise; - disableLookup(): void; + getOverlaySync(): IOverlay | null; - enableLookup(): void; + getPosition(): number[] | null; - getPlayer(): Player; + isOpen(): boolean; - isLookupEnabled(): boolean; + open(position?: number[], data?: object | string | HTMLElement, options?: object): Promise; - openPlayer(panorama: IPanorama[] | number): Promise; - } + setData(data: object | string | HTMLElement): Promise; - class Player implements IEventEmitter { - constructor(element: HTMLElement | string, panorama: IPanorama, options?: { - autoFitToViewport?: "none" | "ifNull" | "always"; - controls?: string[]; - direction?: number[] | string; - hotkeysEnabled?: boolean; - scrollZoomBehavior?: boolean; - span?: number[] | string; - suppressMapOpenBlock?: boolean; - }) + setOptions(options: object): Promise; - events: IEventManager; + setPosition(position: number[]): Promise; + } - destroy(): void; + class Sequence implements IGeoObject, IGeoObjectSequence { + constructor(geoObject: GeoObject); - fitToViewport(): void; + geometry: IGeometry | null; + properties: IDataManager; + state: IDataManager; + events: IEventManager; + options: IOptionManager; - getDirection(): number[]; + getOverlay(): Promise; - getPanorama(): IPanorama; + getOverlaySync(): IOverlay | null; - getSpan(): number[]; + getParent(): null | IControlParent; - lookAt(point: number[]): this; + setParent(parent: IControlParent): this; - moveTo(point: number[], options?: { - direction?: number[] | string; - layer?: "yandex#panorama" | "yandex#airPanorama"; - span?: number[] | string; - }): Promise; + getMap(): Map; - setDirection(direction: number[] | string): this; + each(callback: (geoObject: IGeoObject) => void, context?: object): void; - setPanorama(panorama: IPanorama): this; + get(index: number): IGeoObject; - setSpan(span: number[] | string): this; - } - } + getBounds(): number[][] | null; - namespace router { - class Editor implements ICustomizable, IEventEmitter { - options: IOptionManager; - events: IEventManager; + getIterator(): IIterator; - start(options?: { - addViaPoints?: boolean; - addWayPoints?: boolean; - editViaPoints?: boolean; - editWayPoints?: boolean; - removeViaPoints?: boolean; - removeWayPoints?: boolean; - }): void; + getLength(): number; - stop(): void; - } + getPixelBounds(): number[][] | null; - abstract class Route implements IGeoObject { - geometry: IGeometry | null; - properties: IDataManager; - state: IDataManager; - events: IEventManager; - options: IOptionManager; - editor: Editor; + indexOf(geoObject: IGeoObject): number; + } + } - getOverlay(): Promise; + namespace layout { + namespace templateBased { + class Base implements ILayout { + constructor(data: object); - getOverlaySync(): IOverlay | null; + events: IEventManager; - getParent(): null | IControlParent; + destroy(): void; - setParent(parent: IControlParent): this; + getData(): object; - getMap(): Map; + getParentElement(): HTMLElement; - getHumanJamsTime(): string; + getShape(): IShape | null; - getHumanLength(): string; + isEmpty(): boolean; - getHumanTime(): string; + setData(data: object): void; - getJamsTime(): number; + setParentElement(parent: HTMLElement | null): this; - getLength(): number; + build(): void; - getPaths(): GeoObjectCollection; + clear(): void; - getTime(): number; + onSublayoutSizeChange(sublayoutInfo: object, nodeSizeByContent: object): void; - getViaPoints(): GeoObjectCollection; + rebuild(): void; + } + } + } - getWayPoints(): GeoObjectCollection; - } - } + namespace map { + namespace action { + class Manager implements IEventEmitter { + constructor(map: Map); - class Balloon extends Popup implements IBaloon { - constructor(map: Map, options?: IBalloonOptions); + events: IEventManager; - getData(): object; + breakTick(): void; - close(force?: boolean): Promise; + execute(action: IMapAction): void; - getParent(): Balloon | null; + getCurrentState(): object; - setParent(parent: Balloon): this; + getMap(): Map; - autoPan(): Promise; + setCorrection(userFunction: () => void): void; - freeze(): IFreezable; + stop(): void; + } + } - isFrozen(): boolean; + namespace behavior { //tslint:disable-line no-shadowed-variable + class Manager implements ICustomizable, IEventEmitter, IParentOnMap { + constructor(map: Map, behaviors?: string[][] | string[], options?: object); - unfreeze(): IFreezable; + options: IOptionManager; + events: IEventManager; - add(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; + getMap(): Map; - group(): IEventGroup; + disable(behaviors: string[][] | string[] | string): this; - remove(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; + enable(behaviors: string[][] | string[] | string): this; - fire(type: string, eventobject: object | IEvent): this; - } + get(behaviorName: string): IBehavior; - interface IBalloonOptions { - autoPan?: boolean; - autoPanCheckZoomRange?: boolean; - autoPanDuration?: number; - autoPanMargin?: number[][] | number[] | number; - autoPanUseMapMargin?: boolean; - closeButton?: boolean; - contentLayout?: IClassConstructor | string; - layout?: IClassConstructor | string; - maxHeight?: number; - maxWidth?: number; - minHeight?: number; - minWidth?: number; - offset?: number[]; + isEnabled(behaviorName: string): boolean; + } + } + + namespace layer { + class Manager implements ILayer, IMapObjectCollection { + constructor(map: Map, options?: { + trafficImageZIndex?: number; + trafficInfoZIndex?: number; + trafficJamZIndex?: number; + }); + + events: IEventManager; + options: IOptionManager; + + getParent(): null | IControlParent; + + setParent(parent: IControlParent): this; + + add(object: object): this; + + getIterator(): IIterator; + + remove(object: object): this; + + getMap(): Map; + } + } + + namespace margin { + class Accessor { + constructor(screenArea: object); + + getArea(): object; + + remove(): this; + + setArea(screenArea: object): this; + } + + class Manager { + constructor(map: Map); + + addArea(screenArea: object): Accessor; + + destroy(): this; + + getMargin(): number[]; + + getOffset(): number[]; + + setDefaultMargin(margin: number[][] | number[] | number): void; + } + } + + namespace pane { + class Manager { + constructor(map: Map); + + append(key: string, pane: IPane): void; + + destroy(): void; + + get(key: string): IPane | null; + + getLower(): string; + + getUpper(): string; + + insertBefore(key: string, pane: IPane, referenceKey: string): void; + + remove(pane: IPane): void; + } + } + + class Balloon implements IBalloonManager/*, IBalloonSharingManager*/ { //tslint:disable-line no-shadowed-variable + constructor(map: Map); + + events: IEventManager; + + autoPan(): Promise; + + close(force?: boolean): Promise; + + destroy(): void; + + getData(): object | null; + + getOptions(): IOptionManager | null; + + getOverlay(): Promise; + + getOverlaySync(): IOverlay | null; + + getPosition(): number[] | null; + + isOpen(): boolean; + + open(position?: number[], data?: object | string | HTMLElement, options?: object): Promise; + + setData(data: object | string | HTMLElement): Promise; + + setOptions(options: object): Promise; + + setPosition(position: number[]): Promise; + } + + class Container implements IDomEventEmitter { + constructor(parentElement: string | HTMLElement); + + events: IEventManager; + + enterFullscreen(): void; + + exitFullscreen(): void; + + fitToViewport(preservePixelPosition?: boolean): void; + + getElement(): HTMLElement; + + getOffset(): number[]; + + getParentElement(): HTMLElement; + + getSize(): number[]; + + isFullscreen(): boolean; + } + + class Converter { + constructor(map: Map); + + globalToPage(globalPixelPoint: number[]): number[]; + + pageToGlobal(pagePixelPoint: number[]): number[]; + } + + class Copyrights { + constructor(map: Map); + + add(customCopyrights: string | HTMLElement | Array): ICopyrightsAccessor; + + addProvider(provider: ICopyrightsProvider): this; + + get(point?: number[], zoom?: number): Promise>; + + getPromoLink(): string; + + removeProvider(provider: ICopyrightsProvider): this; + } + + class GeoObjects implements IGeoObjectCollection { + constructor(map: Map, options?: object); + + options: IOptionManager; + events: IEventManager; + + add(child: IGeoObject, index?: number): this; + + each(callback: (object: IGeoObject) => void, context: object): void; + + get(index: number): IGeoObject; + + getBounds(): number[][] | null; + + getIterator(): IIterator; + + getLength(): number; + + getPixelBounds(): number[][] | null; + + indexOf(object: IGeoObject): number; + + remove(child: IGeoObject): this; + + removeAll(): this; + + set(index: number, child: IGeoObject): this; + + splice(index: number, length: number): this; + + getMap(): Map; + } + + class Hint implements IHintManager/*, IHintSharingManager*/ { + constructor(map: Map); + + events: IEventManager; + + close(force?: boolean): Promise; + + destroy(): void; + + getData(): object | null; + + getOptions(): IOptionManager | null; + + getOverlay(): Promise; + + getOverlaySync(): IOverlay | null; + + getPosition(): number[] | null; + + isOpen(): boolean; + + open(position?: number[], data?: object | string | HTMLElement, options?: object): Promise; + + setData(data: object | string | HTMLElement): Promise; + + setOptions(options: object): Promise; + + setPosition(position: number[]): Promise; + } + + class ZoomRange implements IEventEmitter { + constructor(map: Map, constraints: number[]); + + events: IEventManager; + + get(coords?: number[]): Promise; + + getCurrent(): number[]; + } + } + + namespace multiRouter { + namespace driving { + class Path implements IGeoObject { + geometry: IGeometry | null; + properties: data.Manager; + state: IDataManager; + model: PathModel; + events: IEventManager; + options: IOptionManager; + + getOverlay(): Promise; + + getOverlaySync(): IOverlay | null; + + getParent(): object | null; + + setParent(parent: object): this; + + getMap(): Map; + + getSegments(): GeoObjectCollection; + } + + class PathModel implements IEventEmitter { + events: IEventManager; + properties: data.Manager; + route: RouteModel; + + destroy(): void; + + getSegments(): SegmentModel[]; + + getType(): string; + + update(pathJson: object): void; + } + + class Route implements IGeoObject { + geometry: IGeometry | null; + properties: IDataManager; + state: IDataManager; + events: IEventManager; + options: IOptionManager; + + getOverlay(): Promise; + + getOverlaySync(): IOverlay | null; + + getParent(): object | null; + + setParent(parent: object): this; + + getMap(): Map; + + getPaths(): GeoObjectCollection; + } + + class RouteModel implements IEventEmitter { + events: IEventManager; + multiRoute: MultiRouteModel; + properties: data.Manager; + + destroy(): void; + + getPaths(): PathModel[]; + + update(routeJson: object): void; + + getType(): string; + } + + class Segment implements IGeoObject { + geometry: IGeometry | null; + properties: data.Manager; + state: IDataManager; + events: IEventManager; + options: IOptionManager; + + getOverlay(): Promise; + + getOverlaySync(): IOverlay | null; + + getParent(): object | null; + + setParent(parent: object): this; + + getMap(): Map; + } + + class SegmentModel implements IEventEmitter { + events: IEventManager; + geometry: geometry.base.LineString; + path: PathModel; + + destroy(): void; + + getType(): string; + + getViaPoints(): ViaPointModel[]; + + update(segmentJson: object): void; + } + } + + namespace masstransit { + class Path implements IGeoObject { + geometry: IGeometry | null; + properties: data.Manager; + state: IDataManager; + events: IEventManager; + options: IOptionManager; + model: PathModel; + + getOverlay(): Promise; + + getOverlaySync(): IOverlay | null; + + getParent(): object | null; + + setParent(parent: object): this; + + getMap(): Map; + + getSegmentMarkers(): GeoObjectCollection; + + getSegments(): GeoObjectCollection; + } + + class PathModel implements IEventEmitter { + events: IEventManager; + properties: data.Manager; + route: RouteModel; + + destroy(): void; + + getSegments(): Array; + + getType(): string; + + update(pathJson: object): void; + } + + class Route implements IGeoObject { + geometry: IGeometry | null; + properties: data.Manager; + model: RouteModel; + state: IDataManager; + events: IEventManager; + options: IOptionManager; + + getOverlay(): Promise; + + getOverlaySync(): IOverlay | null; + + getParent(): object | null; + + setParent(parent: object): this; + + getMap(): Map; + + getPaths(): GeoObjectCollection; + } + + class RouteModel implements IEventEmitter { + events: IEventManager; + multiRoute: MultiRouteModel; + properties: data.Manager; + + destroy(): void; + + getPaths(): PathModel[]; + + getType(): string; + + update(routeJson: object): void; + } + + class StopModel implements IEventEmitter { + events: IEventManager; + geometry: geometry.base.Point; + properties: data.Manager; + segment: TransportSegmentModel; + + update(stopJson: object): void; + } + + class TransferSegment implements IGeoObject { + geometry: IGeometry | null; + properties: data.Manager; + state: IDataManager; + events: IEventManager; + options: IOptionManager; + model: TransferSegmentModel; + + getOverlay(): Promise; + + getOverlaySync(): IOverlay | null; + + getParent(): object | null; + + setParent(parent: object): this; + + getMap(): Map; + } + + class TransferSegmentModel implements IEventEmitter { + events: IEventManager; + geometry: geometry.base.LineString; + path: PathModel; + properties: data.Manager; + + destroy(segmentJson: object): void; + + getType(): string; + } + + class TransportSegment implements IGeoObject { + geometry: IGeometry | null; + properties: data.Manager; + state: IDataManager; + events: IEventManager; + options: IOptionManager; + model: TransportSegmentModel; + + getOverlay(): Promise; + + getOverlaySync(): IOverlay | null; + + getParent(): object | null; + + setParent(parent: object): this; + + getMap(): Map; + } + + class TransportSegmentModel implements IEventEmitter { + events: IEventManager; + geometry: geometry.base.LineString; + path: PathModel; + properties: data.Manager; + + destroy(): void; + + getStops(): StopModel[]; + + getType(): string; + + update(segmentJson: object): void; + } + + class WalkSegment implements IGeoObject { + geometry: IGeometry | null; + properties: data.Manager; + state: IDataManager; + events: IEventManager; + options: IOptionManager; + model: WalkSegmentModel; + + getOverlay(): Promise; + + getOverlaySync(): IOverlay | null; + + getParent(): object | null; + + setParent(parent: object): this; + + getMap(): Map; + } + + class WalkSegmentModel implements IEventEmitter { + events: IEventManager; + geometry: geometry.base.LineString; + path: PathModel; + properties: data.Manager; + + destroy(): void; + + getType(): string; + } + } + + class EditorAddon implements ICustomizable, IEventEmitter { + options: IOptionManager; + events: IEventManager; + state: data.Manager; + + isActive(): boolean; + + start(state: object): void; + + stop(): void; + } + + class MultiRoute implements IGeoObject { + constructor(model: MultiRouteModel | IMultiRouteModelJson, options?: { + activeRouteAutoSelection?: boolean; + boundsAutoApply?: boolean; + dragUpdateInterval?: string | number; + preventDragUpdate?: boolean; + useMapMargin?: boolean; + zoomMargin?: number[][] | number[] | number; + [index: string]: any; + }); + + editor: EditorAddon; + model: MultiRouteModel; + geometry: IGeometry | null; + properties: IDataManager; + state: IDataManager; + events: IEventManager; + options: IOptionManager; + + getOverlay(): Promise; + + getOverlaySync(): IOverlay | null; + + getParent(): object | null; + + setParent(parent: object): this; + + getMap(): Map; + + getActiveRoute(): driving.Route | masstransit.Route | null; + + getBounds(): number[][] | null; + + getPixelBounds(): number[][] | null; + + getRoutes(): GeoObjectCollection; + + getViaPoints(): GeoObjectCollection; + + getWayPoints(): GeoObjectCollection; + + setActiveRoute(route: driving.Route | masstransit.Route | null): void; + } + + class MultiRouteModel implements IEventEmitter { + constructor(referencePoints: IMultiRouteReferencePoint[], params?: IMultiRouteParams); + + events: IEventManager; + properties: data.Manager; + + destroy(): void; + + getAllPoints(): Array; + + getJson(): object; + + getParams(): IMultiRouteParams; + + getPoints(): Array; + + getReferencePointIndexes(): object; + + getReferencePoints(): IMultiRouteReferencePoint[]; + + getRoutes(): driving.RouteModel[] | masstransit.RouteModel[]; + + getViaPoints(): ViaPointModel[]; + + getWayPoints(): WayPointModel[]; + + setParams(params: IMultiRouteParams, extend?: boolean, clearRequests?: boolean): void; + + setReferencePoints(referencePoints: IMultiRouteReferencePoint[], viaIndexes?: number[], clearRequests?: boolean): void; + } + + class ViaPoint implements IGeoObject { + geometry: IGeometry | null; + properties: data.Manager; + state: IDataManager; + events: IEventManager; + options: IOptionManager; + + getOverlay(): Promise; + + getOverlaySync(): IOverlay | null; + + getParent(): object | null; + + setParent(parent: object): this; + + getMap(): Map; + } + + class ViaPointModel implements IEventEmitter { + events: IEventManager; + geometry: geometry.base.Point; + multiRoute: MultiRouteModel; + properties: data.Manager; + + destroy(): void; + + getReferencePoint(): object; + + getReferencePointIndex(): number; + + setReferencePoint(referencePoint: object): void; + + update(viaPointJson: object): void; + } + + class WayPoint implements IGeoObject { + geometry: IGeometry | null; + properties: data.Manager; + state: IDataManager; + events: IEventManager; + options: IOptionManager; + model: WayPointModel; + + getOverlay(): Promise; + + getOverlaySync(): IOverlay | null; + + getParent(): object | null; + + setParent(parent: object): this; + + getMap(): Map; + } + + class WayPointModel implements IEventEmitter { + events: IEventManager; + geometry: geometry.base.Point; + multiRoute: MultiRouteModel; + properties: data.Manager; + + destroy(): void; + + getReferencePoint(): object; + + getReferencePointIndex(): number; + + setReferencePoint(referencePoint: object): void; + + update(wayPointJson: object): void; + } + } + + namespace option { + class Manager implements IOptionManager { + constructor(options?: object, parent?: IOptionManager, name?: string); + + events: IEventManager; + + get(key: string, defaultValue: object): object; + + getAll(): object; + + getName(): string; + + getNative(key: string): object; + + resolve(key: string, name?: string): object; + + set(key: object | string, value?: object): this; + + unset(keys: string[][] | string[] | string): this; + + unsetAll(): this; + + setName(name: string): void; + + getParent(): null | IOptionManager; + + setParent(parent: IOptionManager): this; + + freeze(): IFreezable; + + isFrozen(): boolean; + + unfreeze(): IFreezable; + + add(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; + + group(): IEventGroup; + + remove(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; + + fire(type: string, eventobject: object | IEvent): this; + } + } + + namespace panorama { + class Manager implements IEventEmitter { + events: IEventManager; + + closePlayer(): void; + + disableLookup(): void; + + enableLookup(): void; + + getPlayer(): Player; + + isLookupEnabled(): boolean; + + openPlayer(panorama: IPanorama[] | number): Promise; + } + + class Player implements IEventEmitter { + constructor(element: HTMLElement | string, panorama: IPanorama, options?: { + autoFitToViewport?: "none" | "ifNull" | "always"; + controls?: string[]; + direction?: number[] | string; + hotkeysEnabled?: boolean; + scrollZoomBehavior?: boolean; + span?: number[] | string; + suppressMapOpenBlock?: boolean; + }) + + events: IEventManager; + + destroy(): void; + + fitToViewport(): void; + + getDirection(): number[]; + + getPanorama(): IPanorama; + + getSpan(): number[]; + + lookAt(point: number[]): this; + + moveTo(point: number[], options?: { + direction?: number[] | string; + layer?: "yandex#panorama" | "yandex#airPanorama"; + span?: number[] | string; + }): Promise; + + setDirection(direction: number[] | string): this; + + setPanorama(panorama: IPanorama): this; + + setSpan(span: number[] | string): this; + } + } + + namespace router { + class Editor implements ICustomizable, IEventEmitter { + options: IOptionManager; + events: IEventManager; + + start(options?: { + addViaPoints?: boolean; + addWayPoints?: boolean; + editViaPoints?: boolean; + editWayPoints?: boolean; + removeViaPoints?: boolean; + removeWayPoints?: boolean; + }): void; + + stop(): void; + } + + abstract class Route implements IGeoObject { + geometry: IGeometry | null; + properties: IDataManager; + state: IDataManager; + events: IEventManager; + options: IOptionManager; + editor: Editor; + + getOverlay(): Promise; + + getOverlaySync(): IOverlay | null; + + getParent(): null | IControlParent; + + setParent(parent: IControlParent): this; + + getMap(): Map; + + getHumanJamsTime(): string; + + getHumanLength(): string; + + getHumanTime(): string; + + getJamsTime(): number; + + getLength(): number; + + getPaths(): GeoObjectCollection; + + getTime(): number; + + getViaPoints(): GeoObjectCollection; + + getWayPoints(): GeoObjectCollection; + } + } + + class Balloon extends Popup implements IBaloon { + constructor(map: Map, options?: IBalloonOptions); + + getData(): object; + + close(force?: boolean): Promise; + + getParent(): Balloon | null; + + setParent(parent: Balloon): this; + + autoPan(): Promise; + + freeze(): IFreezable; + + isFrozen(): boolean; + + unfreeze(): IFreezable; + + add(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; + + group(): IEventGroup; + + remove(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this; + + fire(type: string, eventobject: object | IEvent): this; + } + + interface IBalloonOptions { + autoPan?: boolean; + autoPanCheckZoomRange?: boolean; + autoPanDuration?: number; + autoPanMargin?: number[][] | number[] | number; + autoPanUseMapMargin?: boolean; + closeButton?: boolean; + contentLayout?: IClassConstructor | string; + layout?: IClassConstructor | string; + maxHeight?: number; + maxWidth?: number; + minHeight?: number; + minWidth?: number; + offset?: number[]; + pane?: string; + panelContentLayout?: IClassConstructor | string; + panelMaxHeightRatio?: number; + panelMaxMapArea?: number; + shadow?: boolean; + shadowLayout?: IClassConstructor | string; + shadowOffset?: number[]; + } + + class Circle implements GeoObject { + constructor(geometry: ICircleGeometry[][][][] | number[][] | object, properties?: object | IDataManager, options?: ICircleOptions) + + balloon: geoObject.Balloon; + editor: IGeometryEditor; + hint: geoObject.Hint; + events: event.Manager; + options: option.Manager; + properties: data.Manager; + state: data.Manager; + + geometry: IGeometry | null; + indices: ArrayBuffer; + vertices: ArrayBuffer; + + getOverlay(): Promise; + + getOverlaySync(): IOverlay | null; + + getParent(): null | IControlParent; + + setParent(parent: IControlParent): this; + + getMap(): Map; + } + + interface ICircleOptions { + circleOverlay?: string | ((geometry: IPixelCircleGeometry, data: object, options: object) => Promise); + cursor?: string; + draggable?: boolean; + fill?: boolean; + fillColor?: string; + fillImageHref?: string; + fillMethod?: "stretch" | "tile"; + fillOpacity?: number; + hasBalloon?: boolean; + hasHint?: boolean; + hideIconOnBalloonOpen?: boolean; + interactiveZIndex?: boolean; + interactivityModel?: InteractivityModelKey; + opacity?: number; + openBalloonOnClick?: boolean; + openEmptyBalloon?: boolean; + openEmptyHint?: boolean; + openHintOnHover?: boolean; + outline?: boolean; + pane?: string; + strokeColor?: string[][] | string[] | string; + strokeOpacity?: number[][] | number[] | number; + strokeStyle?: string[][][] | object[][] | string[] | object[] | string | object; + strokeWidth?: number[][] | number[] | number; + syncOverlayInit?: boolean; + useMapMarginInDragging?: boolean; + visible?: boolean; + zIndex?: number; + zIndexActive?: number; + zIndexDrag?: number; + zIndexHover?: number; + } + + class Clusterer implements IChildOnMap, ICustomizable, IEventEmitter, IParentOnMap { + constructor(options?: IClustererOptions); + + events: IEventManager; + options: IOptionManager; + balloon: clusterer.Balloon; + // balloonopen: + hint: clusterer.Hint; + + getParent(): null | IControlParent; + + setParent(parent: IControlParent): this; + + // balloonclose: + + getMap(): Map; + } + + interface IClustererOptions { + gridSize?: number; + groupByCoordinates?: boolean; + hasBalloon?: boolean; + hasHint?: boolean; + margin?: number[][] | number[] | number; + maxZoom?: number[] | number; + minClusterSize?: number; + preset?: PresetKey; + showInAlphabeticalOrder?: boolean; + useMapMargin?: boolean; + viewportMargin?: number[][] | number[] | number; + zoomMargin?: number[][] | number[] | number; + } + + class ClusterPlacemark implements IGeoObject, collection.Item { + constructor(geometry: number[] | object | IPointGeometry, properties: IClusterPlacemarkProperties, options?: IClusterPlacemarkOptions); + + geometry: IGeometry | null; + properties: IDataManager; + events: IEventManager; + options: IOptionManager; + state: data.Manager; + + getOverlay(): Promise; + + getOverlaySync(): IOverlay | null; + + getParent(): null | IControlParent; + + setParent(parent: IControlParent): this; + + getMap(): Map; + + onAddToMap(map: Map): void; + + onRemoveFromMap(oldMap: Map): void; + + getBounds(): number[][] | null; + + getGeoObjects(): IGeoObject[]; + } + + interface IClusterPlacemarkProperties extends IDataManager { + geoObjects: IGeoObject[]; + } + + interface IClusterPlacemarkOptions { + balloonContentLayout?: "cluster#balloonTwoColumns" | "cluster#balloonCarousel" | "cluster#balloonAccordion" | string | IClassConstructor; + balloonContentLayoutHeight?: number; + balloonContentLayoutWidth?: number; + balloonItemContentLayout?: ILayout | string; + balloonPanelContentLayout?: string | IClassConstructor; + cursor?: string; + disableClickZoom?: boolean; + hideIconOnBalloonOpen?: boolean; + iconColor?: string; + iconContentLayout?: string | IClassConstructor; + iconLayout?: string | IClassConstructor; + icons?: Array<{ + href: string; + size: number[]; + ooffset: number[]; + shape?: IShape | IGeometryJson; + }>; + iconShape?: IGeometryJson; + interactivityModel?: InteractivityModelKey; + numbers?: number[]; + openBalloonOnClick?: boolean; + openEmptyHint?: boolean; + openHintOnHover?: boolean; + zIndexHover?: number; + } + + class Collection implements ICollection, collection.Item { + constructor(options?: object); + + events: IEventManager; + options: IOptionManager; + + add(object: object): this; + + getIterator(): IIterator; + + remove(object: object): this; + + getParent(): null | IControlParent; + + setParent(parent: IControlParent): this; + + getMap(): Map; + + onAddToMap(map: Map): void; + + onRemoveFromMap(oldMap: Map): void; + + filter(filterFunction: (object: object) => boolean): object[]; + + get(index: number): object; + + getAll(): object[]; + + getLength(): number; + + indexOf(childToFind: object): number; + + removeAll(): this; + } + + class Event implements IEvent { + constructor(originalEvent: object, sourceEvent: IEvent); + + allowMapEvent(): void; + + callMethod(name: string): void; + + get(name: string): object; + + getSourceEvent(): IEvent | null; + + isDefaultPrevented(): boolean; + + isImmediatePropagationStopped(): boolean; + + isMapEventAllowed(): boolean; + + isPropagationStopped(): boolean; + + preventDefault(): boolean; + + stopImmediatePropagation(): boolean; + + stopPropagation(): boolean; + } + + class GeoObject implements IGeoObject { + constructor(feature?: IGeoObjectFeature, options?: IGeoObjectOptions); + + geometry: IGeometry | null; + balloon: geoObject.Balloon; + editor: IGeometryEditor; + hint: geoObject.Hint; + events: event.Manager; + options: option.Manager; + properties: data.Manager; + state: data.Manager; + + getOverlay(): Promise; + + getOverlaySync(): IOverlay | null; + + getParent(): null | IControlParent; + + setParent(parent: IControlParent): this; + + getMap(): Map; + } + + interface IGeoObjectFeature { + geometry?: IGeometry | IGeometryJson; + properties?: IDataManager | object; + } + + interface IGeoObjectOptions extends ICircleOptions { + iconCaptionMaxWidth?: number; + iconColor?: string; + iconContentLayout?: string | IClassConstructor; + iconContentOffset?: number[]; + iconContentPadding?: number[]; + iconContentSize?: number[]; + iconImageClipRect?: number[][]; + iconImageHref?: string; + iconImageOffset?: number[]; + iconImageShape?: IShape | null; + iconImageSize?: number[]; + iconLayout?: string | IClassConstructor; + iconMaxHeight?: number; + iconMaxWidth?: number; + iconOffset?: number[]; + iconShadow?: boolean; + iconShadowImageClipRect?: number[][]; + iconShadowImageHref?: string; + iconShadowImageOffset?: number[]; + iconShadowImageSize?: number[]; + iconShadowLayout?: string | IClassConstructor; + iconShadowOffset?: number[]; + lineStringOverlay?: OverlayKey; + pointOverlay?: OverlayKey; + polygonOverlay?: OverlayKey; + preset?: string; + rectangleOverlay?: OverlayKey; + setMapCursorInDragging?: boolean; + } + + class GeoObjectCollection implements IGeoObject, IGeoObjectCollection { + constructor(feature?: { + children?: IGeoObject[]; + geometry?: IGeometry | object; + properties?: IDataManager | object; + }, options?: object); + + geometry: IGeometry | null; + properties: IDataManager; + state: IDataManager; + events: IEventManager; + options: IOptionManager; + + getOverlay(): Promise; + + getOverlaySync(): IOverlay | null; + + getParent(): null | IControlParent; + + setParent(parent: IControlParent): this; + + getMap(): Map; + + add(child: IGeoObject, index?: number): this; + + each(callback: (object: IGeoObject) => void, context: object): void; + + get(index: number): IGeoObject; + + getBounds(): number[][] | null; + + getIterator(): IIterator; + + getLength(): number; + + getPixelBounds(): number[][] | null; + + indexOf(object: IGeoObject): number; + + remove(child: IGeoObject): this; + + removeAll(): this; + + set(index: number, child: IGeoObject): this; + + splice(index: number, length: number): this; + + toArray(): IGeoObject[]; + } + + class Layer implements ILayer, IParentOnMap, IPositioningContext { + constructor(tileUrlTemplate: string | ((tileNumber: number[], tileZoom: number) => string)); + + events: IEventManager; + options: IOptionManager; + + fromClientPixels(clientPixelPoint: number[]): number[]; + + getZoom(): number; + + toClientPixels(globalPixelPoint: number[]): number[]; + + getParent(): null | IControlParent; + + setParent(parent: IControlParent): this; + + getMap(): Map; + } + + class Map implements IDomEventEmitter { + constructor(parentElement: HTMLElement | string, state: IMapState, options?: IMapOptions) + + action: map.action.Manager; + balloon: map.Balloon; + behaviors: map.behavior.Manager; + container: map.Container; + controls: control.Manager; + converter: map.Converter; + copyrights: map.Copyrights; + cursors: util.cursor.Manager; + events: event.Manager; + geoObjects: map.GeoObjects; + hint: map.Hint; + layers: map.layer.Manager; + margin: map.margin.Manager; + options: option.Manager; + panes: map.pane.Manager; + zoomRange: map.ZoomRange; + + destroy(): void; + + getBounds(options?: IMapMarginOptions): number[][]; + + getCenter(options?: IMapMarginOptions): number[]; + + getGlobalPixelCenter(options?: IMapMarginOptions): number[]; + + getPanoramaManager(): Promise; + + getType(): string | MapType; + + getZoom(): number; + + panTo(center: number[] | object[], options?: IMapPanOptions): Promise; + + setBounds(bounds: number[][], options?: IMapBoundsOptions): Promise; + + setCenter(center: number[], zoom?: number, options?: IMapPositionOptions): Promise; + + setGlobalPixelCenter(globalPixelCenter: number[], zoom?: number, options?: IMapPositionOptions): Promise; + + setType(type: string | MapType, options?: IMapCheckZoomRangeOptions): Promise; + + setZoom(zoom: number, options?: IMapZoomOptions): Promise; + } + + interface IMapMarginOptions { + useMapMargin?: boolean; + } + + interface IMapCheckZoomRangeOptions { + checkZoomRange?: boolean; + } + + interface IMapZoomOptions extends IMapMarginOptions, IMapCheckZoomRangeOptions { + duration?: number; + } + + interface IMapPositionOptions extends IMapZoomOptions { + timingFunction?: string; + } + + interface IMapBoundsOptions extends IMapPositionOptions { + preciseZoom?: boolean; + zoomMargin?: number[][] | number[]; + } + + interface IMapPanOptions extends IMapPositionOptions { + delay?: number; + flying?: boolean; + safe?: boolean; + } + + class MapType { + constructor(name: string, layers: Array | string>) + } + + interface IMapState { + behaviors?: string[]; + bounds?: number[][]; + center?: number[]; + controls?: string[]; + margin?: number[][] | number[]; + type?: "yandex#map" | "yandex#satellite" | "yandex#hybrid"; + zoom?: number; + } + + interface IMapOptions { + autoFitToViewport?: "none" | "ifNull" | "always"; + avoidFractionalZoom?: boolean; + exitFullscreenByEsc?: boolean; + fullscreenZIndex?: number; + mapAutoFocus?: boolean; + maxAnimationZoomDifference?: number; + maxZoom?: number; + minZoom?: number; + nativeFullscreen?: boolean; + projection?: IProjection; + restrictMapArea?: boolean; + suppressMapOpenBlock?: boolean; + suppressObsoleteBrowserNotifier?: boolean; + yandexMapAutoSwitch?: boolean; + yandexMapDisablePoiInteractivity?: boolean; + } + + class Placemark extends GeoObject { + constructor(geometry: number[] | object | IPointGeometry, properties: object | IDataManager, options?: IPlacemarkOptions) + } + + interface IPlacemarkOptions { + cursor?: string; + draggable?: boolean; + hasBalloon?: boolean; + hasHint?: boolean; + hideIconOnBalloonOpen?: boolean; + iconOffset?: number[]; + iconShape?: IGeometryJson | null; + interactiveZIndex?: boolean; + interactivityModel?: string; + openBalloonOnClick?: boolean; + openEmptyBalloon?: boolean; + openEmptyHint?: boolean; + openHintOnHover?: boolean; pane?: string; - panelContentLayout?: IClassConstructor | string; - panelMaxHeightRatio?: number; - panelMaxMapArea?: number; - shadow?: boolean; - shadowLayout?: IClassConstructor | string; - shadowOffset?: number[]; + pointOverlay?: string; + syncOverlayInit?: boolean; + useMapMarginInDragging?: boolean; + visible?: boolean; + zIndex?: number; + zIndexActive?: number; + zIndexDrag?: number; + zIndexHover?: number; + } + + class Polygon extends GeoObject { + constructor(geometry: number[][][] | object| IPolygonGeometry, properties?: object | IDataManager, options?: IPolygonOptions) } - class Circle implements GeoObject { - constructor(geometry: ICircleGeometry[][][][] | number[][] | object, properties?: object | IDataManager, options?: ICircleOptions) - - balloon: geoObject.Balloon; - editor: IGeometryEditor; - hint: geoObject.Hint; - events: event.Manager; - options: option.Manager; - properties: data.Manager; - state: data.Manager; - - geometry: IGeometry | null; - indices: ArrayBuffer; - vertices: ArrayBuffer; - - getOverlay(): Promise; - - getOverlaySync(): IOverlay | null; - - getParent(): null | IControlParent; - - setParent(parent: IControlParent): this; - - getMap(): Map; - } - - interface ICircleOptions { - circleOverlay?: string | ((geometry: IPixelCircleGeometry, data: object, options: object) => Promise); + interface IPolygonOptions { cursor?: string; draggable?: boolean; fill?: boolean; fillColor?: string; fillImageHref?: string; - fillMethod?: "stretch" | "tile"; + fillMethod?: 'stretch' | 'tile'; fillOpacity?: number; hasBalloon?: boolean; hasHint?: boolean; - hideIconOnBalloonOpen?: boolean; interactiveZIndex?: boolean; - interactivityModel?: InteractivityModelKey; + interactivityModel?: string; opacity?: number; openBalloonOnClick?: boolean; openEmptyBalloon?: boolean; @@ -1936,10 +2627,11 @@ declare namespace ymaps { openHintOnHover?: boolean; outline?: boolean; pane?: string; - strokeColor?: string[][] | string[] | string; - strokeOpacity?: number[][] | number[] | number; - strokeStyle?: string[][][] | object[][] | string[] | object[] | string | object; - strokeWidth?: number[][] | number[] | number; + polygonOverlay?: string; + strokeColor?: string | string[]; + strokeOpacity?: number | number[]; + strokeStyle?: string | string[] | object | object[]; + strokeWidth?: number | number[]; syncOverlayInit?: boolean; useMapMarginInDragging?: boolean; visible?: boolean; @@ -1949,770 +2641,447 @@ declare namespace ymaps { zIndexHover?: number; } - class Clusterer implements IChildOnMap, ICustomizable, IEventEmitter, IParentOnMap { - constructor(options?: IClustererOptions); - - events: IEventManager; - options: IOptionManager; - balloon: clusterer.Balloon; - // balloonopen: - hint: clusterer.Hint; - - getParent(): null | IControlParent; - - setParent(parent: IControlParent): this; - - // balloonclose: - - getMap(): Map; + class Polyline extends GeoObject { + constructor(geometry: number[][]| object | ILineStringGeometry, properties?: object | IDataManager, options?: IPolylineOptions) } - interface IClustererOptions { - gridSize?: number; - groupByCoordinates?: boolean; + interface IPolylineOptions { + cursor?: string; + draggable?: boolean; hasBalloon?: boolean; hasHint?: boolean; - margin?: number[][] | number[] | number; - maxZoom?: number[] | number; - minClusterSize?: number; - preset?: PresetKey; - showInAlphabeticalOrder?: boolean; - useMapMargin?: boolean; - viewportMargin?: number[][] | number[] | number; - zoomMargin?: number[][] | number[] | number; - } - - class ClusterPlacemark implements IGeoObject, collection.Item { - constructor(geometry: number[] | object | IPointGeometry, properties: IClusterPlacemarkProperties, options?: IClusterPlacemarkOptions); - - geometry: IGeometry | null; - properties: IDataManager; - events: IEventManager; - options: IOptionManager; - state: data.Manager; - - getOverlay(): Promise; - - getOverlaySync(): IOverlay | null; - - getParent(): null | IControlParent; - - setParent(parent: IControlParent): this; - - getMap(): Map; - - onAddToMap(map: Map): void; - - onRemoveFromMap(oldMap: Map): void; - - getBounds(): number[][] | null; - - getGeoObjects(): IGeoObject[]; - } - - interface IClusterPlacemarkProperties extends IDataManager { - geoObjects: IGeoObject[]; - } - - interface IClusterPlacemarkOptions { - balloonContentLayout?: "cluster#balloonTwoColumns" | "cluster#balloonCarousel" | "cluster#balloonAccordion" | string | IClassConstructor; - balloonContentLayoutHeight?: number; - balloonContentLayoutWidth?: number; - balloonItemContentLayout?: ILayout | string; - balloonPanelContentLayout?: string | IClassConstructor; - cursor?: string; - disableClickZoom?: boolean; - hideIconOnBalloonOpen?: boolean; - iconColor?: string; - iconContentLayout?: string | IClassConstructor; - iconLayout?: string | IClassConstructor; - icons?: Array<{ - href: string; - size: number[]; - ooffset: number[]; - shape?: IShape | IGeometryJson; - }>; - iconShape?: IGeometryJson; - interactivityModel?: InteractivityModelKey; - numbers?: number[]; + interactiveZIndex?: boolean; + interactivityModel?: string; + lineStringOverlay?: () => object | string; + opacity?: number; openBalloonOnClick?: boolean; + openEmptyBalloon?: boolean; openEmptyHint?: boolean; openHintOnHover?: boolean; + pane?: string; + strokeColor?: string | string[]; + strokeOpacity?: number | number[]; + strokeStyle?: string | string[] | object | object[]; + strokeWidth?: number | number[]; + syncOverlayInit?: boolean; + useMapMarginInDragging?: boolean; + visible?: boolean; + zIndex?: number; + zIndexActive?: number; + zIndexDrag?: number; zIndexHover?: number; } - class Collection implements ICollection, collection.Item { - constructor(options?: object); + class Popup implements IPopup { + constructor(map: Map, options?: IPopupOptions); - events: IEventManager; - options: IOptionManager; + options: IOptionManager; + events: IEventManager; - add(object: object): this; + close(force?: boolean): Promise; - getIterator(): IIterator; + getData(): object; - remove(object: object): this; + getOverlay(): Promise; - getParent(): null | IControlParent; + getOverlaySync(): IOverlay; - setParent(parent: IControlParent): this; + getPosition(): number[]; - getMap(): Map; + isOpen(): boolean; - onAddToMap(map: Map): void; + open(position: number[], data: object | string | HTMLElement): Promise; - onRemoveFromMap(oldMap: Map): void; + setData(data: object | string | HTMLElement): Promise; - filter(filterFunction: (object: object) => boolean): object[]; + setPosition(position: number[]): Promise; + } - get(index: number): object; + interface IPopupOptions { + closeTimeout?: number; + interactivityModel?: InteractivityModelKey; + openTimeout?: number; + pane?: IPane | string; + projection?: IProjection; + zIndex?: number; + } - getAll(): object[]; + function ready(successCallback?: () => any | IReadyobject, errorCallback?: () => any, context?: object): Promise; - getLength(): number; + interface IReadyobject { + require?: string[]; + context?: object; - indexOf(childToFind: object): number; + successCallback?(): void; - removeAll(): this; + errorCallback?(): void; + } + + namespace templateLayoutFactory { + function createClass(template: string, overrides?: object, staticMethods?: object): IClassConstructor; + } + + namespace util { + namespace cursor { + class Accessor { + constructor(key: string); + + getKey(): string; + + remove(): void; + + setKey(): void; + } + + class Manager { + constructor(element: HTMLElement); + + push(key: string): Accessor; + } + } + + class Storage { + add(key: string, object: object): this; + + get(key: string | object): object | string; + + remove(key: string): object; + } + } + + namespace vow { + class Deferred { + promise(): Promise; + + reject(reason: object): void; + + resolve(value: object): void; + } + + class Promise { + constructor(resolver?: () => void); + + done(onFulfilled?: () => void, onRejected?: () => void, onProgress?: () => void, ctx?: object): void; + + spread(onFulfilled?: () => void, onRejected?: () => void, ctx?: object): Promise; + + then(onFulfilled?: () => void, onRejected?: () => void, onProgress?: () => void, ctx?: object): Promise; + + valueOf(): object; + } } - class Event implements IEvent { - constructor(originalEvent: object, sourceEvent: IEvent); + /*Interfaces*/ - allowMapEvent(): void; + interface IBaloon extends IPopup, ICustomizable, IChild, IFreezable { + autoPan(): Promise; + } - callMethod(name: string): void; + interface IBalloonManager extends IPopupManager { + autoPan(): Promise; + } - get(name: string): object; + interface IBaseGeometry extends IEventEmitter { + getBounds(): number[][] | null; - getSourceEvent(): IEvent | null; + getType(): string; + } - isDefaultPrevented(): boolean; + interface IBaseLineStringGeometry extends IBaseGeometry, ILineStringGeometryAccess {//tslint:disable-line no-empty-interface no-empty-interfaces + } - isImmediatePropagationStopped(): boolean; + interface IBasePointGeometry extends IBaseGeometry, IPointGeometryAccess {//tslint:disable-line no-empty-interface no-empty-interfaces + } - isMapEventAllowed(): boolean; + interface IBehavior extends IChildOnMap, ICustomizable { + disable(): void; - isPropagationStopped(): boolean; + enable(): void; - preventDefault(): boolean; + isEnabled(): boolean; + } - stopImmediatePropagation(): boolean; + interface IChild extends IEventEmitter { + getParent(): object | null; - stopPropagation(): boolean; - } + setParent(parent: object | null): this; + } - class GeoObject implements IGeoObject { - constructor(feature?: IGeoObjectFeature, options?: IGeoObjectOptions); + interface IChildOnMap extends IChild { //tslint:disable-line no-empty-interface no-empty-interfaces + } - geometry: IGeometry | null; - balloon: geoObject.Balloon; - editor: IGeometryEditor; - hint: geoObject.Hint; - events: event.Manager; - options: option.Manager; - properties: data.Manager; - state: data.Manager; + interface ICircleGeometry extends ICircleGeometryAccess, IGeometry { //tslint:disable-line no-empty-interface no-empty-interfaces + } - getOverlay(): Promise; + interface ICircleGeometryAccess extends IFreezable { + contains(position: number[]): boolean; - getOverlaySync(): IOverlay | null; + getClosest(anchorPosition: number[]): object; - getParent(): null | IControlParent; + getCoordinates(): number[] | null; - setParent(parent: IControlParent): this; + getRadius(): number; - getMap(): Map; - } + setCoordinates(coordinates: number[] | null): this; - interface IGeoObjectFeature { - geometry?: IGeometry | IGeometryJson | object; - properties?: IDataManager | object; - } + setRadius(radius: number): this; + } - interface IGeoObjectOptions extends ICircleOptions { - iconCaptionMaxWidth?: number; - iconColor?: string; - iconContentLayout?: string | IClassConstructor; - iconContentOffset?: number[]; - iconContentPadding?: number[]; - iconContentSize?: number[]; - iconImageClipRect?: number[][]; - iconImageHref?: string; - iconImageOffset?: number[]; - iconImageShape?: IShape | null; - iconImageSize?: number[]; - iconLayout?: string | IClassConstructor; - iconMaxHeight?: number; - iconMaxWidth?: number; - iconOffset?: number[]; - iconShadow?: boolean; - iconShadowImageClipRect?: number[][]; - iconShadowImageHref?: string; - iconShadowImageOffset?: number[]; - iconShadowImageSize?: number[]; - iconShadowLayout?: string | IClassConstructor; - iconShadowOffset?: number[]; - lineStringOverlay?: OverlayKey; - pointOverlay?: OverlayKey; - polygonOverlay?: OverlayKey; - preset?: string; - rectangleOverlay?: OverlayKey; - setMapCursorInDragging?: boolean; - } + interface ICollection extends IEventEmitter { + add(object: object): this; - class GeoObjectCollection implements IGeoObject, IGeoObjectCollection { - constructor(feature?: { - children?: IGeoObject[]; - geometry?: IGeometry | object; - properties?: IDataManager | object; - }, options?: object); + getIterator(): IIterator; - geometry: IGeometry | null; - properties: IDataManager; + remove(object: object): this; + } + + interface IControl extends IChildOnMap { //tslint:disable-line no-empty-interface no-empty-interfaces + // new (options?: object); + } + + interface IControlParent extends IParentOnMap { + getChildElement(child: IControl): Promise; + } + + interface ICoordSystem { + getDistance(point1: number[], point2: number[]): number; + + solveDirectProblem(startPoint: number[], direction: number[], distance: number): object; + + solveInverseProblem(startPoint: number[], endPoint: number[], reverseDirection?: boolean): object; + } + + interface ICopyrightsAccessor extends ICopyrightsProvider { //tslint:disable-line no-empty-interface no-empty-interfaces + } + + interface ICopyrightsProvider extends IEventEmitter { + getCopyrights(coords: number[], zoom: number): Promise>; + + remove(): void; + + setCopyrights(copyrights: string | HTMLElement | Array): void; + } + + interface ICustomizable extends IEventEmitter { + options: IOptionManager; + } + + interface IDataManager extends IEventEmitter { + get(path: string, defaultValue: object): object; + } + + interface IDomEventEmitter extends IEventEmitter { //tslint:disable-line no-empty-interface no-empty-interfaces + } + + interface IEvent { + allowMapEvent(): void; + + callMethod(name: string): void; + + get(name: string): object; + + getSourceEvent(): IEvent | null; + + isDefaultPrevented(): boolean; + + isImmediatePropagationStopped(): boolean; + + isMapEventAllowed(): boolean; + + isPropagationStopped(): boolean; + + preventDefault(): boolean; + + stopImmediatePropagation(): boolean; + + stopPropagation(): boolean; + } + + interface IEventController { + onStartListening?(events: IEventManager, type: string): void; + + onStopListening?(events: IEventManager, type: string): void; + } + + interface IEventEmitter { + events: IEventManager; + } + + interface IEventGroup { + add(types: string[][] | string[] | string, callback: (event: object | IEvent) => void, context?: object, priority?: number): this; + + remove(types: string[][] | string[] | string, callback: (event: object | IEvent) => void, context?: object, priority?: number): this; + + removeAll(): this; + } + + interface IEventManager extends IEventTrigger { + add(types: string[][] | string[] | string, callback: (event: object | IEvent) => void, context?: object, priority?: number): this; + + getParent(): object | null; + + group(): IEventGroup; + + //remove(types: string[][] | string[] | string, callback: (event: object | IEvent) => void, context?: object, priority?: number): this; + + setParent(parent: object | null): this; + } + + interface IEventTrigger { + fire(type: string, eventobject: object | IEvent): this; + } + + interface IEventWorkflowController extends IEventController { + onAfterEventFiring?(events: IEventManager, type: string, event?: IEvent): void; + + onBeforeEventFiring?(events: IEventManager, type: string, event?: IEvent): void; + } + + interface IExpandableControlLayout extends ILayout { //tslint:disable-line no-empty-interface no-empty-interfaces + } + + interface IFreezable extends IEventManager { + freeze(): IFreezable; + + isFrozen(): boolean; + + unfreeze(): IFreezable; + } + + interface IGeocodeProvider { + geocode(request: string, options?: { boundedBy?: number[][], results?: number, skip?: number, strictBounds?: boolean }): Promise; + + suggest(request: string, options?: { boundedBy?: number[][], results?: number, strictBounds?: boolean }): Promise; + } + + interface IGeometry extends IBaseGeometry, ICustomizable { + getMap(): Map | null; + + getPixelGeometry(options?: object): IPixelGeometry; + + setMap(map: Map): void; + } + + interface IGeometryEditor extends ICustomizable, IEventEmitter { + geometry: IGeometry; state: IDataManager; - events: IEventManager; - options: IOptionManager; - getOverlay(): Promise; + startEditing(): void; - getOverlaySync(): IOverlay | null; + stopEditing(): void; + } - getParent(): null | IControlParent; + interface IGeometryEditorChildModel extends IGeometryEditorModel { + editor: IGeometryEditor; + geometry: IBaseGeometry; - setParent(parent: IControlParent): this; + getParent(): IGeometryEditorModel; - getMap(): Map; - - add(child: IGeoObject, index?: number): this; - - each(callback: (object: IGeoObject) => void, context: object): void; - - get(index: number): IGeoObject; - - getBounds(): number[][] | null; - - getIterator(): IIterator; - - getLength(): number; - - getPixelBounds(): number[][] | null; - - indexOf(object: IGeoObject): number; - - remove(child: IGeoObject): this; - - removeAll(): this; - - set(index: number, child: IGeoObject): this; - - splice(index: number, length: number): this; - - toArray(): IGeoObject[]; + setPixels(pixels: number[]): void; } - class Layer implements ILayer, IParentOnMap, IPositioningContext { - constructor(tileUrlTemplate: string | ((tileNumber: number[], tileZoom: number) => string)); - - events: IEventManager; - options: IOptionManager; - - fromClientPixels(clientPixelPoint: number[]): number[]; - - getZoom(): number; - - toClientPixels(globalPixelPoint: number[]): number[]; - - getParent(): null | IControlParent; - - setParent(parent: IControlParent): this; - - getMap(): Map; - } - - class Map implements IDomEventEmitter { - constructor(parentElement: HTMLElement | string, state: IMapState, options?: IMapOptions) - - action: map.action.Manager; - balloon: map.Balloon; - behaviors: map.behavior.Manager; - container: map.Container; - controls: control.Manager; - converter: map.Converter; - copyrights: map.Copyrights; - cursors: util.cursor.Manager; - events: event.Manager; - geoObjects: map.GeoObjects; - hint: map.Hint; - layers: map.layer.Manager; - margin: map.margin.Manager; - options: option.Manager; - panes: map.pane.Manager; - zoomRange: map.ZoomRange; - + interface IGeometryEditorModel extends IEventEmitter { destroy(): void; - getBounds(options?: IMapMarginOptions): number[][]; - - getCenter(options?: IMapMarginOptions): number[]; - - getGlobalPixelCenter(options?: IMapMarginOptions): number[]; - - getPanoramaManager(): Promise; - - getType(): string | MapType; - - getZoom(): number; - - panTo(center: number[] | object[], options?: IMapPanOptions): Promise; - - setBounds(bounds: number[][], options?: IMapBoundsOptions): Promise; - - setCenter(center: number[], zoom?: number, options?: IMapPositionOptions): Promise; - - setGlobalPixelCenter(globalPixelCenter: number[], zoom?: number, options?: IMapPositionOptions): Promise; - - setType(type: string | MapType, options?: IMapCheckZoomRangeOptions): Promise; - - setZoom(zoom: number, options?: IMapZoomOptions): Promise; + getPixels(): number[]; } - interface IMapMarginOptions { - useMapMargin?: boolean; + interface IGeometryEditorRootModel extends IGeometryEditorModel { //tslint:disable-line no-empty-interface no-empty-interfaces } - interface IMapCheckZoomRangeOptions { - checkZoomRange?: boolean; - } - - interface IMapZoomOptions extends IMapMarginOptions, IMapCheckZoomRangeOptions { - duration?: number; - } - - interface IMapPositionOptions extends IMapZoomOptions { - timingFunction?: string; - } - - interface IMapBoundsOptions extends IMapPositionOptions { - preciseZoom?: boolean; - zoomMargin?: number[][] | number[]; - } - - interface IMapPanOptions extends IMapPositionOptions { - delay?: number; - flying?: boolean; - safe?: boolean; - } + interface IGeometryJson { + type: string; + } - class MapType { - constructor(name: string, layers: Array | string>) - } + interface IGeoObject extends IChildOnMap, ICustomizable, IDomEventEmitter, IParentOnMap { + geometry: IGeometry | null; + properties: IDataManager; + state: IDataManager; - interface IMapState { - behaviors?: string[]; - bounds?: number[][]; - center?: number[]; - controls?: string[]; - margin?: number[][] | number[]; - type?: "yandex#map" | "yandex#satellite" | "yandex#hybrid"; - zoom?: number; - } + getOverlay(): Promise; - interface IMapOptions { - autoFitToViewport?: "none" | "ifNull" | "always"; - avoidFractionalZoom?: boolean; - exitFullscreenByEsc?: boolean; - fullscreenZIndex?: number; - mapAutoFocus?: boolean; - maxAnimationZoomDifference?: number; - maxZoom?: number; - minZoom?: number; - nativeFullscreen?: boolean; - projection?: IProjection; - restrictMapArea?: boolean; - suppressMapOpenBlock?: boolean; - suppressObsoleteBrowserNotifier?: boolean; - yandexMapAutoSwitch?: boolean; - yandexMapDisablePoiInteractivity?: boolean; - } + getOverlaySync(): IOverlay | null; + } - class Placemark extends GeoObject { - constructor(geometry: number[] | object | IPointGeometry, properties: object | IDataManager, options?: IPlacemarkOptions) - } + interface IGeoObjectCollection extends ICustomizable, IEventEmitter, IParentOnMap { + add(child: IGeoObject, index?: number): this; - interface IPlacemarkOptions { - cursor?: string; - draggable?: boolean; + each(callback: (object: IGeoObject) => void, context: object): void; - [index: string]: any; - } + get(index: number): IGeoObject; - class Popup implements IPopup { - constructor(map: Map, options?: IPopupOptions); + getBounds(): number[][] | null; - options: IOptionManager; - events: IEventManager; + getIterator(): IIterator; - close(force?: boolean): Promise; + getLength(): number; - getData(): object; + getPixelBounds(): number[][] | null; - getOverlay(): Promise; + indexOf(object: IGeoObject): number; - getOverlaySync(): IOverlay; + remove(child: IGeoObject): this; - getPosition(): number[]; + removeAll(): this; - isOpen(): boolean; + set(index: number, child: IGeoObject): this; - open(position: number[], data: object | string | HTMLElement): Promise; + splice(index: number, length: number): this; + } - setData(data: object | string | HTMLElement): Promise; + interface IGeoObjectSequence extends ICustomizable, IEventEmitter, IParentOnMap { + each(callback: (geoObject: IGeoObject) => void, context?: object): void; - setPosition(position: number[]): Promise; - } + get(index: number): IGeoObject; - interface IPopupOptions { - closeTimeout?: number; - interactivityModel?: InteractivityModelKey; - openTimeout?: number; - pane?: IPane | string; - projection?: IProjection; - zIndex?: number; - } + getBounds(): number[][] | null; - function ready(successCallback?: () => any | IReadyobject, errorCallback?: () => any, context?: object): Promise; + getIterator(): IIterator; - interface IReadyobject { - require?: string[]; - context?: object; + getLength(): number; - successCallback?(): void; + getPixelBounds(): number[][] | null; - errorCallback?(): void; - } + indexOf(geoObject: IGeoObject): number; + } - namespace templateLayoutFactory { - function createClass(template: string, overrides?: object, staticMethods?: object): IClassConstructor; - } + interface IHintManager extends IPopupManager { //tslint:disable-line no-empty-interface no-empty-interfaces + } - namespace util { - namespace cursor { - class Accessor { - constructor(key: string); + interface IIterator { + getNext(): object | null; + } - getKey(): string; + interface ILayer extends IChildOnMap, ICustomizable, IEventEmitter { + getBrightness?(): number; - remove(): void; + getCopyrights?(coords: number[], zoom: number): Promise>; - setKey(): void; - } + getZoomRange?(point: number[]): Promise; + } - class Manager { - constructor(element: HTMLElement); + interface ILayout extends IDomEventEmitter { + // new (data: object); + destroy(): void; - push(key: string): Accessor; - } - } + getData(): object; - class Storage { - add(key: string, object: object): this; + getParentElement(): HTMLElement; - get(key: string | object): object | string; + getShape(): IShape | null; - remove(key: string): object; - } - } + isEmpty(): boolean; - /*Interfaces*/ + setData(data: object): void; - interface IBaloon extends IPopup, ICustomizable, IChild, IFreezable { - autoPan(): Promise; - } + setParentElement(parent: HTMLElement | null): void; + } - interface IBalloonManager extends IPopupManager { - autoPan(): Promise; - } + interface ILinearRingGeometryAccess extends IFreezable { + contain(position: number): boolean; - interface IBaseGeometry extends IEventEmitter { - getBounds(): number[][] | null; - - getType(): string; - } - - interface IBaseLineStringGeometry extends IBaseGeometry, ILineStringGeometryAccess {//tslint:disable-line no-empty-interface no-empty-interfaces - } - - interface IBasePointGeometry extends IBaseGeometry, IPointGeometryAccess {//tslint:disable-line no-empty-interface no-empty-interfaces - } - - interface IBehavior extends IChildOnMap, ICustomizable { - disable(): void; - - enable(): void; - - isEnabled(): boolean; - } - - interface IChild extends IEventEmitter { - getParent(): object | null; - - setParent(parent: object | null): this; - } - - interface IChildOnMap extends IChild { //tslint:disable-line no-empty-interface no-empty-interfaces - } - - interface ICircleGeometry extends ICircleGeometryAccess, IGeometry { //tslint:disable-line no-empty-interface no-empty-interfaces - } - - interface ICircleGeometryAccess extends IFreezable { - contains(position: number[]): boolean; - - getClosest(anchorPosition: number[]): object; - - getCoordinates(): number[] | null; - - getRadius(): number; - - setCoordinates(coordinates: number[] | null): this; - - setRadius(radius: number): this; - } - - interface ICollection extends IEventEmitter { - add(object: object): this; - - getIterator(): IIterator; - - remove(object: object): this; - } - - interface IControl extends IChildOnMap { //tslint:disable-line no-empty-interface no-empty-interfaces - // new (options?: object); - } - - interface IControlParent extends IParentOnMap { - getChildElement(child: IControl): Promise; - } - - interface ICoordSystem { - getDistance(point1: number[], point2: number[]): number; - - solveDirectProblem(startPoint: number[], direction: number[], distance: number): object; - - solveInverseProblem(startPoint: number[], endPoint: number[], reverseDirection?: boolean): object; - } - - interface ICopyrightsAccessor extends ICopyrightsProvider { //tslint:disable-line no-empty-interface no-empty-interfaces - } - - interface ICopyrightsProvider extends IEventEmitter { - getCopyrights(coords: number[], zoom: number): Promise>; - - remove(): void; - - setCopyrights(copyrights: string | HTMLElement | Array): void; - } - - interface ICustomizable extends IEventEmitter { - options: IOptionManager; - } - - interface IDataManager extends IEventEmitter { - get(path: string, defaultValue: object): object; - } - - interface IDomEventEmitter extends IEventEmitter { //tslint:disable-line no-empty-interface no-empty-interfaces - } - - interface IEvent { - allowMapEvent(): void; - - callMethod(name: string): void; - - get(name: string): object; - - getSourceEvent(): IEvent | null; - - isDefaultPrevented(): boolean; - - isImmediatePropagationStopped(): boolean; - - isMapEventAllowed(): boolean; - - isPropagationStopped(): boolean; - - preventDefault(): boolean; - - stopImmediatePropagation(): boolean; - - stopPropagation(): boolean; - } - - interface IEventController { - onStartListening?(events: IEventManager, type: string): void; - - onStopListening?(events: IEventManager, type: string): void; - } - - interface IEventEmitter { - events: IEventManager; - } - - interface IEventGroup { - add(types: string[][] | string[] | string, callback: (event: object | IEvent) => void, context?: object, priority?: number): this; - - remove(types: string[][] | string[] | string, callback: (event: object | IEvent) => void, context?: object, priority?: number): this; - - removeAll(): this; - } - - interface IEventManager extends IEventTrigger { - add(types: string[][] | string[] | string, callback: (event: object | IEvent) => void, context?: object, priority?: number): this; - - getParent(): object | null; - - group(): IEventGroup; - - //remove(types: string[][] | string[] | string, callback: (event: object | IEvent) => void, context?: object, priority?: number): this; - - setParent(parent: object | null): this; - } - - interface IEventTrigger { - fire(type: string, eventobject: object | IEvent): this; - } - - interface IEventWorkflowController extends IEventController { - onAfterEventFiring?(events: IEventManager, type: string, event?: IEvent): void; - - onBeforeEventFiring?(events: IEventManager, type: string, event?: IEvent): void; - } - - interface IExpandableControlLayout extends ILayout { //tslint:disable-line no-empty-interface no-empty-interfaces - } - - interface IFreezable extends IEventManager { freeze(): IFreezable; - isFrozen(): boolean; - - unfreeze(): IFreezable; - } - - interface IGeocodeProvider { - geocode(request: string, options?: { boundedBy?: number[][], results?: number, skip?: number, strictBounds?: boolean }): Promise; - - suggest(request: string, options?: { boundedBy?: number[][], results?: number, strictBounds?: boolean }): Promise; - } - - interface IGeometry extends IBaseGeometry, ICustomizable { - getMap(): Map | null; - - getPixelGeometry(options?: object): IPixelGeometry; - - setMap(map: Map): void; - } - - interface IGeometryEditor extends ICustomizable, IEventEmitter { - startEditing(): void; - - stopEditing(): void; - } - - interface IGeometryJson { - type: string; - } - - interface IGeoObject extends IChildOnMap, ICustomizable, IDomEventEmitter, IParentOnMap { - geometry: IGeometry | null; - properties: IDataManager; - state: IDataManager; - - getOverlay(): Promise; - - getOverlaySync(): IOverlay | null; - } - - interface IGeoObjectCollection extends ICustomizable, IEventEmitter, IParentOnMap { - add(child: IGeoObject, index?: number): this; - - each(callback: (object: IGeoObject) => void, context: object): void; - - get(index: number): IGeoObject; - - getBounds(): number[][] | null; - - getIterator(): IIterator; - - getLength(): number; - - getPixelBounds(): number[][] | null; - - indexOf(object: IGeoObject): number; - - remove(child: IGeoObject): this; - - removeAll(): this; - - set(index: number, child: IGeoObject): this; - - splice(index: number, length: number): this; - } - - interface IGeoObjectSequence extends ICustomizable, IEventEmitter, IParentOnMap { - each(callback: (geoObject: IGeoObject) => void, context?: object): void; - - get(index: number): IGeoObject; - - getBounds(): number[][] | null; - - getIterator(): IIterator; - - getLength(): number; - - getPixelBounds(): number[][] | null; - - indexOf(geoObject: IGeoObject): number; - } - - interface IHintManager extends IPopupManager { //tslint:disable-line no-empty-interface no-empty-interfaces - } - - interface IIterator { - getNext(): object | null; - } - - interface ILayer extends IChildOnMap, ICustomizable, IEventEmitter { - getBrightness?(): number; - - getCopyrights?(coords: number[], zoom: number): Promise>; - - getZoomRange?(point: number[]): Promise; - } - - interface ILayout extends IDomEventEmitter { - // new (data: object); - destroy(): void; - - getData(): object; - - getParentElement(): HTMLElement; - - getShape(): IShape | null; - - isEmpty(): boolean; - - setData(data: object): void; - - setParentElement(parent: HTMLElement | null): void; - } - - interface ILineStringGeometry extends IGeometry, ILineStringGeometryAccess { //tslint:disable-line no-empty-interface no-empty-interfaces - } - - interface ILineStringGeometryAccess extends IFreezable { get(index: number): number[]; getChildGeometry(index: number): IPointGeometryAccess; @@ -2721,337 +3090,391 @@ declare namespace ymaps { getCoordinates(): number[][]; + getFillRule(): string; + getLength(): number; - insert(index: number, coordinates: number[][]): ILineStringGeometryAccess; + insert(index: number, coordinates: number[]): ILinearRingGeometryAccess; + + isFrozen(): boolean; remove(index: number): number[]; - set(index: number, coordinates: number[]): ILineStringGeometryAccess; + set(index: number, coordinates: number[]): ILinearRingGeometryAccess; - setCoordinates(coordinates: number[]): ILineStringGeometryAccess; + setCoordinates(coordinates: number[][]): ILinearRingGeometryAccess; - splice(index: number, length: number): number[][]; + setFillRule(fillRule: string): ILinearRingGeometryAccess; + + splice(index: number, number: number): number[][]; + + unfreeze(): IFreezable; } - interface IMapAction extends IEventEmitter { - begin(mapActionManager: map.action.Manager): void; + interface ILineStringGeometry extends IGeometry, ILineStringGeometryAccess { //tslint:disable-line no-empty-interface no-empty-interfaces + } - end(): void; + interface ILineStringGeometryAccess extends IFreezable { + get(index: number): number[]; + + getChildGeometry(index: number): IPointGeometryAccess; + + getClosest(anchorPosition: number[]): object; + + getCoordinates(): number[][]; + + getLength(): number; + + insert(index: number, coordinates: number[][]): ILineStringGeometryAccess; + + remove(index: number): number[]; + + set(index: number, coordinates: number[]): ILineStringGeometryAccess; + + setCoordinates(coordinates: number[]): ILineStringGeometryAccess; + + splice(index: number, length: number): number[][]; + } + + interface IMapAction extends IEventEmitter { + begin(mapActionManager: map.action.Manager): void; + + end(): void; + } + + interface IMapObjectCollection extends ICollection, ICustomizable, IParentOnMap { //tslint:disable-line no-empty-interface no-empty-interfaces + } + + interface IMultiRouteModelJson { + params: IMultiRouteParams; + referencePoints: IMultiRouteReferencePoint[]; + } + + interface IMultiRouteParams { + avoidTrafficJams?: boolean; + boundedBy?: number[][] | null; + requestSendInterval?: string | number; + results?: number; + reverseGeocoding?: boolean; + routingMode?: "auto" | "masstransit" | "pedestrian"; + searchCoordOrder?: string; + strictBounds?: boolean; + viaIndexes?: number[]; + } + + type IMultiRouteReferencePoint = string | number[] | geometry.Point; + + interface IOptionManager extends IChild, IEventEmitter, IFreezable { + get(key: string, defaultValue: object): object; + + getAll(): object; + + getName(): string; + + getNative(key: string): object; + + resolve(key: string, name?: string): object; + + setName(name: string): void; + } + + interface IOverlay extends ICustomizable, IDomEventEmitter { + getData(): object; + + getGeometry(): IPixelGeometry; + + getMap(): Map | null; + + getShape(): IShape | null; + + isEmpty(): boolean; + + setData(data: object): void; + + setGeometry(geometry: IPixelGeometry): void; + + setMap(map: Map | null): void; + } + + interface IPane extends IEventEmitter { + destroy(): void; + + getElement(): HTMLElement; + + getMap(): Map; + + getOverflow(): "visible" | "hidden"; + + getZIndex(): number; + } + + interface IPanorama { + getAngularBBox(): number[]; + + getConnectionArrows(): IPanoramaConnectionArrow[]; + + getConnectionMarkers(): IPanoramaConnectionMarker[]; + + getCoordSystem(): ICoordSystem; + + getDefaultDirection(): number[]; + + getDefaultSpan(): number[]; + + getGraph(): IPanoramaGraph | null; + + getMarkers(): IPanoramaMarker[]; + + getName(): string; + + getPosition(): number[]; + + getTileLevels(): IPanoramaTileLevel[]; + + getTileSize(): number[]; + } + + interface IPanoramaConnection { + getConnectedPanorama(): Promise; + } + + interface IPanoramaConnectionArrow extends IPanoramaConnection { + properties: data.Manager; + + getDirection(): number[]; + + getPanorama(): IPanorama; + } + + interface IPanoramaConnectionMarker extends IPanoramaConnection, IPanoramaMarker { //tslint:disable-line no-empty-interface no-empty-interfaces + } + + interface IPanoramaGraph { + getEdges(): IPanoramaGraphEdge[]; + + getNodes(): IPanoramaGraphEdge[]; + + getPanorama(): IPanorama; + } + + interface IPanoramaGraphEdge { + getEndNodes(): IPanoramaGraphNode[]; + } + + interface IPanoramaGraphNode { + getConnectedPanorama(): Promise; + } + + interface IPanoramaMarker { + properties: data.Manager; + + getIconSet(): Promise; + + getPanorama(): IPanorama; + + getPosition(): number[]; + } + + interface IPanoramaMarkerIcon { + image: HTMLCanvasElement | HTMLImageElement; + offset: number[]; + } + + interface IPanoramaMarkerIconSet { + default: IPanoramaMarkerIcon | null; + expanded: IPanoramaMarkerIcon | null; + expandedHovered: IPanoramaMarkerIcon | null; + hovered: IPanoramaMarkerIcon | null; + } + + interface IPanoramaTileLevel { + getImageSize(): number[]; + + getTileUrl(x: number, y: number): string; + } + + interface IParentOnMap { + getMap(): Map; + } + + interface IPixelCircleGeometry extends IPixelGeometry { + getCoordinates(): number[]; + + getRadius(): number; + } + + interface IPixelLineStringGeometry extends IPixelGeometry { + getClosest(anchorPosition: number[]): object; + + getCoordinates(): number[][]; + + getLength(): number; + } + + interface IPixelGeometry extends IBaseGeometry { + equals(geometry: IPixelGeometry): boolean; + + getMetaData(): object; + + scale(factor: number): IPixelGeometry; + + shift(offset: number[]): IPixelGeometry; + } + + interface IPointGeometry extends IGeometry, IPointGeometryAccess { //tslint:disable-line no-empty-interface no-empty-interfaces + } + + interface IPointGeometryAccess { + getCoordinates(): number[] | null; + + setCoordinates(coordinates: number[] | null): this; + } + + interface IPolygonGeometry extends IGeometry, IPolygonGeometryAccess { //tslint:disable-line no-empty-interface no-empty-interfaces } - interface IMapObjectCollection extends ICollection, ICustomizable, IParentOnMap { //tslint:disable-line no-empty-interface no-empty-interfaces - } - - interface IMultiRouteModelJson { - params: IMultiRouteParams; - referencePoints: IMultiRouteReferencePoint[]; - } - - interface IMultiRouteParams { - avoidTrafficJams?: boolean; - boundedBy?: number[][] | null; - requestSendInterval?: string | number; - results?: number; - reverseGeocoding?: boolean; - routingMode?: "auto" | "masstransit" | "pedestrian"; - searchCoordOrder?: string; - strictBounds?: boolean; - viaIndexes?: number[]; - } - - type IMultiRouteReferencePoint = string | number[] | geometry.Point; - - interface IOptionManager extends IChild, IEventEmitter, IFreezable { - get(key: string, defaultValue: object): object; - - getAll(): object; - - getName(): string; - - getNative(key: string): object; - - resolve(key: string, name?: string): object; - - setName(name: string): void; - } - - interface IOverlay extends ICustomizable, IDomEventEmitter { - getData(): object; - - getGeometry(): IPixelGeometry; - - getMap(): Map | null; - - getShape(): IShape | null; - - isEmpty(): boolean; - - setData(data: object): void; - - setGeometry(geometry: IPixelGeometry): void; - - setMap(map: Map | null): void; - } - - interface IPane extends IEventEmitter { - destroy(): void; - - getElement(): HTMLElement; - - getMap(): Map; - - getOverflow(): "visible" | "hidden"; - - getZIndex(): number; - } - - interface IPanorama { - getAngularBBox(): number[]; - - getConnectionArrows(): IPanoramaConnectionArrow[]; - - getConnectionMarkers(): IPanoramaConnectionMarker[]; - - getCoordSystem(): ICoordSystem; - - getDefaultDirection(): number[]; - - getDefaultSpan(): number[]; - - getGraph(): IPanoramaGraph | null; - - getMarkers(): IPanoramaMarker[]; - - getName(): string; - - getPosition(): number[]; - - getTileLevels(): IPanoramaTileLevel[]; - - getTileSize(): number[]; - } - - interface IPanoramaConnection { - getConnectedPanorama(): Promise; - } - - interface IPanoramaConnectionArrow extends IPanoramaConnection { - properties: data.Manager; - - getDirection(): number[]; - - getPanorama(): IPanorama; - } - - interface IPanoramaConnectionMarker extends IPanoramaConnection, IPanoramaMarker { //tslint:disable-line no-empty-interface no-empty-interfaces - } - - interface IPanoramaGraph { - getEdges(): IPanoramaGraphEdge[]; - - getNodes(): IPanoramaGraphEdge[]; - - getPanorama(): IPanorama; - } - - interface IPanoramaGraphEdge { - getEndNodes(): IPanoramaGraphNode[]; - } - - interface IPanoramaGraphNode { - getConnectedPanorama(): Promise; - } - - interface IPanoramaMarker { - properties: data.Manager; - - getIconSet(): Promise; - - getPanorama(): IPanorama; - - getPosition(): number[]; - } - - interface IPanoramaMarkerIcon { - image: HTMLCanvasElement | HTMLImageElement; - offset: number[]; - } - - interface IPanoramaMarkerIconSet { - default: IPanoramaMarkerIcon | null; - expanded: IPanoramaMarkerIcon | null; - expandedHovered: IPanoramaMarkerIcon | null; - hovered: IPanoramaMarkerIcon | null; - } - - interface IPanoramaTileLevel { - getImageSize(): number[]; - - getTileUrl(x: number, y: number): string; - } - - interface IParentOnMap { - getMap(): Map; - } - - interface IPixelCircleGeometry extends IPixelGeometry { - getCoordinates(): number[]; - - getRadius(): number; - } - - interface IPixelLineStringGeometry extends IPixelGeometry { - getClosest(anchorPosition: number[]): object; - - getCoordinates(): number[][]; - - getLength(): number; - } - - interface IPixelGeometry extends IBaseGeometry { - equals(geometry: IPixelGeometry): boolean; - - getMetaData(): object; - - scale(factor: number): IPixelGeometry; - - shift(offset: number[]): IPixelGeometry; - } - - interface IPointGeometry extends IGeometry, IPointGeometryAccess { //tslint:disable-line no-empty-interface no-empty-interfaces - } - - interface IPointGeometryAccess { - getCoordinates(): number[] | null; - - setCoordinates(coordinates: number[] | null): this; - } - - interface IPopup extends ICustomizable, IEventEmitter { - close(force?: boolean): Promise; - - getData(): object; - - getOverlay(): Promise; - - getOverlaySync(): IOverlay; - - getPosition(): number[]; - - isOpen(): boolean; - - open(position: number[], data: object | string | HTMLElement): Promise; - - setData(data: object | string | HTMLElement): Promise; - - setPosition(position: number[]): Promise; - } - - interface IPopupManager extends IEventEmitter { - close(force?: boolean): Promise; - - destroy(): void; - - getData(): object | null; - - getOptions(): IOptionManager | null; - - getOverlay(): Promise; - - getOverlaySync(): IOverlay | null; - - getPosition(): number[] | null; - - isOpen(): boolean; - - open(position?: number[], data?: object | string | HTMLElement, options?: object): Promise; - - setData(data: object | string | HTMLElement): Promise; - - setOptions(options: object): Promise; - - setPosition(position: number[]): Promise; - } - - interface IPositioningContext { - fromClientPixels(clientPixelPoint: number[]): number[]; - - getZoom(): number; - - toClientPixels(globalPixelPoint: number[]): number[]; - } - - interface IProjection { - fromGlobalPixels(globalPixelPoint: number[], zoom: number): number[]; - - getCoordSystem(): ICoordSystem; - - isCycled(): boolean[]; - - toGlobalPixels(coordPoint: number[], zoom: number): number[]; - } - - interface IRoutePanel { - options: IOptionManager; - state: IDataManager; - - getRoute(): multiRouter.MultiRoute; - - switchPoints(): void; - } - - interface ISearchControlLayout extends IExpandableControlLayout { //tslint:disable-line no-empty-interface no-empty-interfaces - } - - interface ISelectableControl extends IControl { - deselect(): void; - - disable(): void; - - enable(): void; - - isEnabled(): boolean; - - isSelected(): boolean; - - select(): void; - } - - interface ISelectableControlLayout extends ILayout { //tslint:disable-line no-empty-interface no-empty-interfaces - } - - interface IShape { + interface IPolygonGeometryAccess extends IFreezable { contains(position: number[]): boolean; - equals(shape: IShape): boolean; + get(index: number): number[][]; - getBounds(): number[][] | null; + getChildGeometry(index: number): ILinearRingGeometryAccess; - getGeometry(): IPixelGeometry; + getClosest(anchorPosition: number[]): object; - getType(): string; + getCoordinates(): number[][][]; - scale(factor: number): IShape; + getFillRule(): string; - shift(offset: number[]): IShape; + getLength(): number; + + insert(index: number, path: number[][]): IPolygonGeometryAccess; + + remove(index: number): ILinearRingGeometryAccess; + + set(index: number, path: number[][]): IPolygonGeometryAccess; + + setCoordinates(coordinates: number[][][]): IPolygonGeometryAccess; + + setFillRule(fillRule: string): IPolygonGeometryAccess; + + splice(index: number, number: number): ILinearRingGeometryAccess[]; } - class Monitor { - constructor(dataManager: IDataManager | IOptionManager); - add(name: string[] | string, changeCallback: (event: (object | IEvent)) => void, context?: any, params?: any): Monitor; - forceChange(): Monitor; - get(name: string): any; - remove(name: string): Monitor; - removeAll(): Monitor; - } + interface IPopup extends ICustomizable, IEventEmitter { + close(force?: boolean): Promise; - class Polyline extends GeoObject { - constructor(geometry: number[][] | object | ILineStringGeometry, properties: object | IDataManager, options?: IPolylineOptions); - } + getData(): object; - interface IPolylineOptions { - cursor?: string; - [index: string]: any; - } + getOverlay(): Promise; + + getOverlaySync(): IOverlay; + + getPosition(): number[]; + + isOpen(): boolean; + + open(position: number[], data: object | string | HTMLElement): Promise; + + setData(data: object | string | HTMLElement): Promise; + + setPosition(position: number[]): Promise; + } + + interface IPopupManager extends IEventEmitter { + close(force?: boolean): Promise; + + destroy(): void; + + getData(): object | null; + + getOptions(): IOptionManager | null; + + getOverlay(): Promise; + + getOverlaySync(): IOverlay | null; + + getPosition(): number[] | null; + + isOpen(): boolean; + + open(position?: number[], data?: object | string | HTMLElement, options?: object): Promise; + + setData(data: object | string | HTMLElement): Promise; + + setOptions(options: object): Promise; + + setPosition(position: number[]): Promise; + } + + interface IPositioningContext { + fromClientPixels(clientPixelPoint: number[]): number[]; + + getZoom(): number; + + toClientPixels(globalPixelPoint: number[]): number[]; + } + + interface IProjection { + fromGlobalPixels(globalPixelPoint: number[], zoom: number): number[]; + + getCoordSystem(): ICoordSystem; + + isCycled(): boolean[]; + + toGlobalPixels(coordPoint: number[], zoom: number): number[]; + } + + interface IRoutePanel { + options: IOptionManager; + state: IDataManager; + + getRoute(): multiRouter.MultiRoute; + + switchPoints(): void; + } + + interface ISearchControlLayout extends IExpandableControlLayout { //tslint:disable-line no-empty-interface no-empty-interfaces + } + + interface ISelectableControl extends IControl { + deselect(): void; + + disable(): void; + + enable(): void; + + isEnabled(): boolean; + + isSelected(): boolean; + + select(): void; + } + + interface ISelectableControlLayout extends ILayout { //tslint:disable-line no-empty-interface no-empty-interfaces + } + + interface IShape { + contains(position: number[]): boolean; + + equals(shape: IShape): boolean; + + getBounds(): number[][] | null; + + getGeometry(): IPixelGeometry; + + getType(): string; + + scale(factor: number): IShape; + + shift(offset: number[]): IShape; + } + class Monitor { + constructor(dataManager: IDataManager | IOptionManager); + add(name: string[] | string, changeCallback: (event: (object | IEvent)) => void, context?: any, params?: any): Monitor; + forceChange(): Monitor; + get(name: string): any; + remove(name: string): Monitor; + removeAll(): Monitor; + } } From 1d69ae66948c781aa5cabd1e4aad0360dde16161 Mon Sep 17 00:00:00 2001 From: Pascal Sthamer Date: Tue, 11 Dec 2018 17:50:07 +0100 Subject: [PATCH 525/608] dockerode definition update --- types/dockerode/index.d.ts | 261 +++++++++++++++++++++++++++---------- 1 file changed, 194 insertions(+), 67 deletions(-) diff --git a/types/dockerode/index.d.ts b/types/dockerode/index.d.ts index 5c1c1bfae6..e467441634 100644 --- a/types/dockerode/index.d.ts +++ b/types/dockerode/index.d.ts @@ -6,6 +6,8 @@ // Ray Fang // Marius Meisenzahl // Rob Moran +// Cameron Diver +// Pascal Sthamer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -14,8 +16,16 @@ import * as stream from 'stream'; import * as events from 'events'; +// The modem parameter is an instance of docker-modem, which is missing type declarations. +// https://github.com/apocas/docker-modem + declare namespace Dockerode { - interface Container { + class Container { + constructor(modem: any, id: string); + + modem: any; + id: string; + inspect(options: {}, callback: Callback): void; inspect(callback: Callback): void; inspect(options?: {}): Promise; @@ -103,14 +113,16 @@ declare namespace Dockerode { stats(callback: Callback): void; stats(options?: {}): Promise; - attach(options: {}, callback: Callback): void; - attach(options: {}): Promise; - - modem: any; - id?: string; + attach(options: {}, callback: Callback): void; + attach(options: {}): Promise; } - interface Image { + class Image { + constructor(modem: any, name: string); + + modem: any; + id: string; + inspect(callback: Callback): void; inspect(): Promise; @@ -131,24 +143,28 @@ declare namespace Dockerode { remove(options: {}, callback: Callback): void; remove(callback: Callback): void; remove(options?: {}): Promise; - - modem: any; - id?: string; } - interface Volume { + class Volume { + constructor(modem: any, name: string); + + modem: any; + name: string; + inspect(callback: Callback): void; inspect(): Promise; remove(options: {}, callback: Callback): void; remove(callback: Callback): void; remove(options?: {}): Promise; - - modem: any; - name?: string; } - interface Service { + class Service { + constructor(modem: any, id: string); + + modem: any; + id: string; + inspect(callback: Callback): void; inspect(): Promise; @@ -158,20 +174,24 @@ declare namespace Dockerode { update(options: {}, callback: Callback): void; update(options: {}): Promise; - - modem: any; - id?: string; } - interface Task { + class Task { + constructor(modem: any, id: string); + + modem: any; + id: string; + inspect(callback: Callback): void; inspect(): Promise; - - modem: any; - id?: string; } - interface Node { + class Node { + constructor(modem: any, id: string); + + modem: any; + id: string; + inspect(callback: Callback): void; inspect(): Promise; @@ -182,12 +202,11 @@ declare namespace Dockerode { remove(options: {}, callback: Callback): void; remove(callback: Callback): void; remove(options?: {}): Promise; - - modem: any; - id?: string; } - interface Plugin { + class Plugin { + constructor(modem: any, name: string, remote?: any); + modem: any; name: string; remote: any; @@ -226,7 +245,12 @@ declare namespace Dockerode { upgrade(auth: any, options?: {}): Promise; } - interface Secret { + class Secret { + constructor(modem: any, id: string); + + modem: any; + id: string; + inspect(callback: Callback): void; inspect(): Promise; @@ -237,12 +261,14 @@ declare namespace Dockerode { remove(options: {}, callback: Callback): void; remove(callback: Callback): void; remove(options?: {}): Promise; - - modem: any; - id?: string; } - interface Network { + class Network { + constructor(modem: any, id: string); + + modem: any; + id: string; + inspect(callback: Callback): void; inspect(): Promise; @@ -257,12 +283,14 @@ declare namespace Dockerode { disconnect(options: {}, callback: Callback): void; disconnect(callback: Callback): void; disconnect(options?: {}): Promise; - - modem: any; - id?: string; } - interface Exec { + class Exec { + constructor(modem: any, id: string); + + modem: any; + id: string; + inspect(callback: Callback): void; inspect(): Promise; @@ -271,9 +299,6 @@ declare namespace Dockerode { resize(options: {}, callback: Callback): void; resize(options: {}): Promise; - - modem: any; - id?: string; } interface ImageInfo { @@ -328,6 +353,20 @@ declare namespace Dockerode { MacAddress: string; } + // not complete definition of network inspection + // info which is returned by list / inspect + interface NetworkInspectInfo { + Id: string; + Name: string; + Driver: string; + Created: string; + Scope: string; + EnableIPv6: boolean; + Internal: boolean; + Attachable: boolean; + Ingress: boolean; + } + interface ContainerInspectInfo { Id: string; Created: string; @@ -434,13 +473,13 @@ declare namespace Dockerode { } }; Node?: { - ID: string; - IP: string; - Addr: string; - Name: string; - Cpus: number; - Memory: number; - Labels: any; + ID: string; + IP: string; + Addr: string; + Name: string; + Cpus: number; + Memory: number; + Labels: any; } }; } @@ -573,6 +612,77 @@ declare namespace Dockerode { }; } + interface AuthConfig { + username: string; + password: string; + serveraddress: string; + email?: string; + } + + interface PortBinding { + HostIp?: string; + HostPort?: string; + } + + interface PortMap { + [key: string]: PortBinding[]; + } + + interface RestartPolicy { + Name: string; + MaximumRetryCount?: number; + } + + type LoggingDriverType = + | "json-file" + | "syslog" + | "journald" + | "gelf" + | "fluentd" + | "awslogs" + | "splunk" + | "etwlogs" + | "none"; + + interface LogConfig { + Type: LoggingDriverType; + Config?: { [key: string]: string }; + } + + interface DeviceMapping { + PathOnHost: string; + PathInContainer: string; + CgroupPermissions: string; + } + + /* tslint:disable:interface-name */ + interface IPAMConfig { + IPv4Address?: string; + IPv6Address?: string; + LinkLocalIPs?: string[]; + } + /* tslint:enable:interface-name */ + + interface EndpointSettings { + IPAMConfig?: IPAMConfig; + Links?: string[]; + Aliases?: string[]; + NetworkID?: string; + EndpointID?: string; + Gateway?: string; + IPAddress?: string; + IPPrefixLen?: number; + IPv6Gateway?: string; + GlobalIPv6Address?: string; + GlobalIPV6PrefixLen?: number; + MacAddress?: string; + DriverOpts?: { [key: string]: string }; + } + + interface EndpointsConfig { + [key: string]: EndpointSettings; + } + interface ContainerCreateOptions { name?: string; Hostname?: string; @@ -620,7 +730,7 @@ declare namespace Dockerode { OomScoreAdj?: number; PidMode?: string; PidsLimit?: number; - PortBindings?: { [portAndProtocol: string]: Array<{ [index: string]: string }> }; + PortBindings?: PortMap; PublishAllPorts?: boolean; Privileged?: boolean; ReadonlyRootfs?: boolean; @@ -632,31 +742,19 @@ declare namespace Dockerode { CapAdd?: string[]; CapDrop?: string[]; GroupAdd?: string[]; - RestartPolicy?: { [index: string]: number | string }; + RestartPolicy?: RestartPolicy; NetworkMode?: string; - Devices?: any[]; + Devices?: DeviceMapping[]; Sysctls?: { [index: string]: string }; Ulimits?: Array<{}>; - LogConfig?: { [index: string]: string | {} }; + LogConfig?: LogConfig; SecurityOpt?: { [index: string]: any }; CgroupParent?: string; VolumeDriver?: string; ShmSize?: number; }; NetworkingConfig?: { - EndpointsConfig?: { - [index: string]: any; - isolated_nw?: { - [index: string]: any; - IPAMConfig?: { - IPv4Address?: string; - IPv6Adress?: string; - LinkLocalIPs?: string[]; - } - Links?: string[]; - Aliases?: string[]; - } - } + EndpointsConfig?: EndpointsConfig; }; } @@ -820,8 +918,37 @@ declare namespace Dockerode { } interface ImageBuildContext { - context: string; - src: string[]; + context: string; + src: string[]; + } + + interface DockerVersion { + ApiVersion: string; + Arch: string; + BuildTime: Date; + Components: Array<{ + Details: { + ApiVersion: string; + Arch: string; + BuilTime: Date; + Experimental: string; + GitCommit: string; + GoVersion: string; + KernelVersion: string; + Os: string; + }; + Name: string; + Version: string; + }>; + GitCommit: string; + GoVersion: string; + KernelVersion: string; + MinAPIVersion: string; + Os: string; + Platform: { + Name: string; + }; + Version: string; } } @@ -949,8 +1076,8 @@ declare class Dockerode { df(callback: Callback): void; df(): Promise; - version(callback: Callback): void; - version(): Promise; + version(callback: Callback): void; + version(): Promise; ping(callback: Callback): void; ping(): Promise; From 1caac6ef59540d7974c43da08cc99328e8176eb0 Mon Sep 17 00:00:00 2001 From: Leonard Thieu Date: Tue, 11 Dec 2018 12:26:21 -0500 Subject: [PATCH 526/608] [jquery] Fix ArrayLike handling for call signature. --- types/jquery/JQueryStatic.d.ts | 17 +++++++++++------ types/jquery/jquery-tests.ts | 3 +++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/types/jquery/JQueryStatic.d.ts b/types/jquery/JQueryStatic.d.ts index 20d3a9e8c5..4ba7653e69 100644 --- a/types/jquery/JQueryStatic.d.ts +++ b/types/jquery/JQueryStatic.d.ts @@ -148,21 +148,26 @@ $( "div", xml.responseXML ); $( document.body ).css( "background", "black" ); ``` */ - // Using a unified signature is not possible due to a TypeScript 2.4 bug (DefinitelyTyped#27810) - (element: T): JQuery; + // NOTE: `HTMLSelectElement` is both an Element and an Array-Like Object but jQuery treats it as an Element. + (element: HTMLSelectElement): JQuery; /** * Return a collection of matched elements either found in the DOM based on passed argument(s) or created by passing an HTML string. - * @param elementArray An array containing a set of DOM elements to wrap in a jQuery object. + * @param element_elementArray _@param_ `element_elementArray` + *
    + * * `element` — A DOM element to wrap in a jQuery object.
    + * * `elementArray` — An array containing a set of DOM elements to wrap in a jQuery object. * @see \`{@link https://api.jquery.com/jQuery/ }\` * @since 1.0 + * @example ​ ````Set the background color of the page to black. +```javascript +$( document.body ).css( "background", "black" ); +``` * @example ​ ````Hide all the input elements within a form. ```javascript $( myForm.elements ).hide(); ``` */ - // Using a unified signature is not possible due to a TypeScript 2.4 bug (DefinitelyTyped#27810) - // tslint:disable-next-line:unified-signatures - (elementArray: T[]): JQuery; + (element_elementArray: T | ArrayLike): JQuery; /** * Return a collection of matched elements either found in the DOM based on passed argument(s) or created by passing an HTML string. * @param selection An existing jQuery object to clone. diff --git a/types/jquery/jquery-tests.ts b/types/jquery/jquery-tests.ts index b1f63f3ecf..02edd9d9df 100644 --- a/types/jquery/jquery-tests.ts +++ b/types/jquery/jquery-tests.ts @@ -160,6 +160,9 @@ function JQueryStatic() { // $ExpectType JQuery $([new HTMLSelectElement()]); + // $ExpectType JQuery + $(document.querySelectorAll('p')); + // https://github.com/DefinitelyTyped/DefinitelyTyped/issues/19597#issuecomment-378218432 function issue_19597_378218432() { const myDiv = $(document.createElement('div')); From 8ef8a681c189f424c30ea3a0061b2d2449e4d7e3 Mon Sep 17 00:00:00 2001 From: Grzegorz Rozdzialik Date: Tue, 11 Dec 2018 18:30:02 +0100 Subject: [PATCH 527/608] [react-table] allow using refs after applying HOCs The return type of HOCs did not match the reality. The return type was `ComponentType` which allowed StatelessComponent (which does not allow refs by default) to be returned, whereas in reality it was always the class component (`ComponentClass`) that was returned from a HOC. --- types/react-table/lib/hoc/selectTable.d.ts | 6 +++--- types/react-table/lib/hoc/treeTable.d.ts | 6 +++--- types/react-table/test/select-table-tests.tsx | 1 + types/react-table/test/tree-table-tests.tsx | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/types/react-table/lib/hoc/selectTable.d.ts b/types/react-table/lib/hoc/selectTable.d.ts index fd6d9bf42c..d1fc5d8392 100644 --- a/types/react-table/lib/hoc/selectTable.d.ts +++ b/types/react-table/lib/hoc/selectTable.d.ts @@ -1,4 +1,4 @@ -import { ComponentType } from 'react'; +import { ComponentType, ComponentClass } from 'react'; import { TableProps } from '../../index'; @@ -49,8 +49,8 @@ export interface SelectTableHOCOptions { } declare function selectTableHOC>( - Component: ComponentType, + WrappedComponent: ComponentType, options?: SelectTableHOCOptions -): ComponentType; +): ComponentClass; export default selectTableHOC; diff --git a/types/react-table/lib/hoc/treeTable.d.ts b/types/react-table/lib/hoc/treeTable.d.ts index 35d1522119..e696ceda02 100644 --- a/types/react-table/lib/hoc/treeTable.d.ts +++ b/types/react-table/lib/hoc/treeTable.d.ts @@ -1,9 +1,9 @@ -import { ComponentType } from 'react'; +import { ComponentType, ComponentClass } from 'react'; import { TableProps } from '../../index'; declare function treeTableHOC>( - Component: ComponentType -): ComponentType; + WrappedComponent: ComponentType +): ComponentClass; export default treeTableHOC; diff --git a/types/react-table/test/select-table-tests.tsx b/types/react-table/test/select-table-tests.tsx index a4ed4d4f25..fe4ee5c694 100644 --- a/types/react-table/test/select-table-tests.tsx +++ b/types/react-table/test/select-table-tests.tsx @@ -52,6 +52,7 @@ ReactDOM.render( {...selectTableAdditionalProps} data={data} columns={columns} + ref={React.createRef()} />, document.getElementById('root') ); diff --git a/types/react-table/test/tree-table-tests.tsx b/types/react-table/test/tree-table-tests.tsx index a099124c61..6bb9461f78 100644 --- a/types/react-table/test/tree-table-tests.tsx +++ b/types/react-table/test/tree-table-tests.tsx @@ -4,7 +4,7 @@ import * as ReactDOM from 'react-dom'; import ReactTable, { Column } from 'react-table'; import treeTableHOC from 'react-table/lib/hoc/treeTable'; -const SelectTable = treeTableHOC(ReactTable); +const TreeTable = treeTableHOC(ReactTable); const data = [{ id: 1, name: 'Foo' }, { id: 2, name: 'Bar' }]; @@ -14,6 +14,6 @@ const columns: Column[] = [ ]; ReactDOM.render( - , + , document.getElementById('root') ); From e1b2162dce95f3e655cf918b7a9befaebe8fcb78 Mon Sep 17 00:00:00 2001 From: CameronDiver Date: Tue, 11 Dec 2018 18:53:50 +0100 Subject: [PATCH 528/608] Fix typo Co-Authored-By: P4sca1 --- types/dockerode/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/dockerode/index.d.ts b/types/dockerode/index.d.ts index 64656edbb8..3ced325cb2 100644 --- a/types/dockerode/index.d.ts +++ b/types/dockerode/index.d.ts @@ -930,7 +930,7 @@ declare namespace Dockerode { Details: { ApiVersion: string; Arch: string; - BuilTime: Date; + BuildTime: Date; Experimental: string; GitCommit: string; GoVersion: string; From 01401844ac7c7824ced00aeb73ea4372d20f4542 Mon Sep 17 00:00:00 2001 From: Pascal Sthamer Date: Tue, 11 Dec 2018 18:57:07 +0100 Subject: [PATCH 529/608] Remove duplicate DockerVersion interface --- types/dockerode/index.d.ts | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/types/dockerode/index.d.ts b/types/dockerode/index.d.ts index 3ced325cb2..d823c46fe4 100644 --- a/types/dockerode/index.d.ts +++ b/types/dockerode/index.d.ts @@ -950,35 +950,6 @@ declare namespace Dockerode { }; Version: string; } - - interface DockerVersion { - ApiVersion: string; - Arch: string; - BuildTime: Date; - Components: Array<{ - Details: { - ApiVersion: string; - Arch: string; - BuilTime: Date; - Experimental: string; - GitCommit: string; - GoVersion: string; - KernelVersion: string; - Os: string; - }; - Name: string; - Version: string; - }>; - GitCommit: string; - GoVersion: string; - KernelVersion: string; - MinAPIVersion: string; - Os: string; - Platform: { - Name: string; - }; - Version: string; - } } type Callback = (error?: any, result?: T) => void; From 291ba3002e9c7c6c0fe8ebf6da7aa9735e765b95 Mon Sep 17 00:00:00 2001 From: Jesse Trinity <42591254+jessetrinity@users.noreply.github.com> Date: Tue, 11 Dec 2018 11:08:16 -0800 Subject: [PATCH 530/608] Clarifying tslint.json content instructions The language and examples surrounding linting of new packages is ambiguous. This makes the language and examples more explicit in an attempt to direct contributors to remove linting rules from tslint.json before opening PRs. --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index eba170c493..a9be0471a1 100644 --- a/README.md +++ b/README.md @@ -169,8 +169,14 @@ If a package was never on DefinitelyTyped, it does not need to be added to `notN #### Lint -To lint a package, just add a `tslint.json` to that package containing `{ "extends": "dtslint/dt.json" }`. All new packages must be linted. -If a `tslint.json` turns rules off, this is because that hasn't been fixed yet. For example: +All new packages must be linted. To lint a package, add a `tslint.json` to that package containing +```js +{ + "extends": "dtslint/dt.json" +} +``` + +This should be the only content in a finished project's `tslint.json` file. If a `tslint.json` turns rules off, this is because that hasn't been fixed yet. For example: ```js { From 21ab9421ab77846d826752f7ff14abdab458960a Mon Sep 17 00:00:00 2001 From: Maninder Singh Date: Wed, 12 Dec 2018 01:55:59 +0530 Subject: [PATCH 531/608] Add 'movingOut' param to Dom walker's guard method --- types/ckeditor/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/ckeditor/index.d.ts b/types/ckeditor/index.d.ts index 69c23d6a99..2889b30574 100644 --- a/types/ckeditor/index.d.ts +++ b/types/ckeditor/index.d.ts @@ -498,7 +498,7 @@ declare namespace CKEDITOR { class walker { evaluator: (node: node) => boolean; - guard: (node: node) => boolean; + guard: (node: node, movingOut?: boolean) => boolean; static validEmptyBlockContainers: { [key: string]: any }; From 5ba0e0c16318ceb33b49e43e8b73c2aea1c48bce Mon Sep 17 00:00:00 2001 From: Jan Aagaard Date: Wed, 21 Nov 2018 22:00:44 +0100 Subject: [PATCH 532/608] Remove unused imports --- types/expo/expo-tests.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/types/expo/expo-tests.tsx b/types/expo/expo-tests.tsx index 75dee784de..4b4fddccfe 100644 --- a/types/expo/expo-tests.tsx +++ b/types/expo/expo-tests.tsx @@ -13,7 +13,6 @@ import { Audio, AppLoading, BarCodeScanner, - BlurViewProps, BlurView, Brightness, Camera, @@ -34,7 +33,6 @@ import { PublisherBanner, registerRootComponent, ScreenOrientation, - SQLite, Calendar, MailComposer, Location, From 6206d4560fa5539cf825ecd1e5ac9adaf6b04d5f Mon Sep 17 00:00:00 2001 From: Jan Aagaard Date: Wed, 21 Nov 2018 22:01:03 +0100 Subject: [PATCH 533/608] Sort imports --- types/expo/expo-tests.tsx | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/types/expo/expo-tests.tsx b/types/expo/expo-tests.tsx index 4b4fddccfe..8778ae655b 100644 --- a/types/expo/expo-tests.tsx +++ b/types/expo/expo-tests.tsx @@ -8,38 +8,38 @@ import { AdMobInterstitial, AdMobRewarded, Amplitude, - Asset, - AuthSession, - Audio, AppLoading, + Asset, + Audio, + AuthSession, BarCodeScanner, BlurView, Brightness, + Calendar, Camera, CameraObject, + Constants, DocumentPicker, Facebook, FacebookAds, - FileSystem, - ImagePicker, - ImageManipulator, FaceDetector, - Linking, - Svg, + FileSystem, + Haptic, + ImageManipulator, + ImagePicker, IntentLauncherAndroid, KeepAwake, LinearGradient, + Linking, + Location, + MailComposer, + MediaLibrary, Permissions, PublisherBanner, registerRootComponent, ScreenOrientation, - Calendar, - MailComposer, - Location, - Updates, - MediaLibrary, - Haptic, - Constants + Svg, + Updates } from 'expo'; const reverseGeocode: Promise = Location.reverseGeocodeAsync({ From 48efd3e255a524019cddd8df625ac1ffec98e33b Mon Sep 17 00:00:00 2001 From: Jan Aagaard Date: Wed, 21 Nov 2018 21:58:18 +0100 Subject: [PATCH 534/608] Add type definitions for MapView --- types/expo/expo-tests.tsx | 16 ++ types/expo/index.d.ts | 2 + types/expo/mapview.d.ts | 421 ++++++++++++++++++++++++++++++++++++++ types/expo/tsconfig.json | 1 + 4 files changed, 440 insertions(+) create mode 100644 types/expo/mapview.d.ts diff --git a/types/expo/expo-tests.tsx b/types/expo/expo-tests.tsx index 8778ae655b..f79b044de2 100644 --- a/types/expo/expo-tests.tsx +++ b/types/expo/expo-tests.tsx @@ -33,6 +33,7 @@ import { Linking, Location, MailComposer, + MapView, MediaLibrary, Permissions, PublisherBanner, @@ -835,6 +836,20 @@ async () => { result.status === 'saved'; }; +// #region MapView +() => ( + +); +// #endegion + async () => { const updateEventListener: Updates.UpdateEventListener = ({ type, manifest, message }) => { switch (type) { @@ -914,6 +929,7 @@ async () => { return true; } }; + // #region MediaLibrary async () => { const mlAsset: MediaLibrary.Asset = await MediaLibrary.createAssetAsync('localUri'); diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index 9e48e391d8..818af22880 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -16,6 +16,8 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 +export { MapView } from './mapview'; + import { EventSubscription } from 'fbemitter'; import { Component, ComponentClass, Ref, ComponentType } from 'react'; import { diff --git a/types/expo/mapview.d.ts b/types/expo/mapview.d.ts new file mode 100644 index 0000000000..1885badf3a --- /dev/null +++ b/types/expo/mapview.d.ts @@ -0,0 +1,421 @@ +// Based on https://github.com/react-community/react-native-maps/blob/master/index.d.ts. + +import * as React from 'react'; +import { + Animated, + ImageRequireSource, + ImageURISource, + NativeSyntheticEvent, + ViewProperties +} from 'react-native'; + +export interface Region { + latitude: number; + longitude: number; + latitudeDelta: number; + longitudeDelta: number; +} + +export interface LatLng { + latitude: number; + longitude: number; +} + +export interface Point { + x: number; + y: number; +} + +// helper interface +export interface MapEvent extends NativeSyntheticEvent { } + +export type LineCapType = 'butt' | 'round' | 'square'; +export type LineJoinType = 'miter' | 'round' | 'bevel'; + +// ======================================================================= +// AnimatedRegion +// ======================================================================= + +export interface AnimatedRegionTimingConfig extends Animated.AnimationConfig, Partial { + easing?: (value: number) => number; + duration?: number; + delay?: number; +} + +export interface AnimatedRegionSpringConfig extends Animated.AnimationConfig, Partial { + overshootClamping?: boolean; + restDisplacementThreshold?: number; + restSpeedThreshold?: number; + velocity?: number | Point; + bounciness?: number; + speed?: number; + tension?: number; + friction?: number; + stiffness?: number; + mass?: number; + damping?: number; +} + +export class AnimatedRegion extends Animated.AnimatedWithChildren { + latitude: Animated.Value; + longitude: Animated.Value; + latitudeDelta: Animated.Value; + longitudeDelta: Animated.Value; + + constructor(region?: Region); + + setValue(value: Region): void; + setOffset(offset: Region): void; + flattenOffset(): void; + stopAnimation(callback?: (region: Region) => void): void; + addListener(callback: (region: Region) => void): string; + removeListener(id: string): void; + spring(config: AnimatedRegionSpringConfig): Animated.CompositeAnimation; + timing(config: AnimatedRegionTimingConfig): Animated.CompositeAnimation; +} + +// ======================================================================= +// MapView (default export) +// ======================================================================= + +/** + * takeSnapshot options + */ +export interface SnapshotOptions { + /** optional, when omitted the view-width is used */ + width?: number; + /** optional, when omitted the view-height is used */ + height?: number; + /** __iOS only__, optional region to render */ + region?: Region; + /** image formats, defaults to 'png' */ + format?: 'png' | 'jpg'; + /** image quality: 0..1 (only relevant for jpg, default: 1) */ + quality?: number; + /** result types, defaults to 'file' */ + result?: 'file' | 'base64'; +} + +/** + * onUserLocationChange parameters + */ +export interface EventUserLocation extends NativeSyntheticEvent<{}> { + nativeEvent: { + coordinate: { + latitude: number, + longitude: number, + altitude: number, + timestamp: number, + accuracy: number, + speed: number, + isFromMockProvider: boolean, + }, + }; +} + +/** + * Map style elements. + * @see https://developers.google.com/maps/documentation/ios-sdk/styling#use_a_string_resource + * @see https://developers.google.com/maps/documentation/android-api/styling + */ +export interface MapStyleElement { + featureType?: string; + elementType?: string; + stylers: object[]; +} + +export interface EdgePadding { + top: number; + right: number; + bottom: number; + left: number; +} + +export interface EdgeInsets { + top: number; + right: number; + bottom: number; + left: number; +} + +export interface KmlMarker { + id: string; + title: string; + description: string; + coordinate: LatLng; + position: Point; +} + +/** + * onKmlReady parameter + */ +export interface KmlMapEvent extends NativeSyntheticEvent<{ markers: KmlMarker[] }> { +} + +export type MapTypes = 'standard' | 'satellite' | 'hybrid' | 'terrain' | 'none' | 'mutedStandard'; + +export interface MapViewProps extends ViewProperties { + provider?: 'google' | null; + customMapStyle?: MapStyleElement[]; + customMapStyleString?: string; + showsUserLocation?: boolean; + userLocationAnnotationTitle?: string; + showsMyLocationButton?: boolean; + followsUserLocation?: boolean; + showsPointsOfInterest?: boolean; + showsCompass?: boolean; + zoomEnabled?: boolean; + zoomControlEnabled?: boolean; + rotateEnabled?: boolean; + cacheEnabled?: boolean; + loadingEnabled?: boolean; + loadingBackgroundColor?: string; + loadingIndicatorColor?: string; + scrollEnabled?: boolean; + pitchEnabled?: boolean; + toolbarEnabled?: boolean; + moveOnMarkerPress?: boolean; + showsScale?: boolean; + showsBuildings?: boolean; + showsTraffic?: boolean; + showsIndoors?: boolean; + showsIndoorLevelPicker?: boolean; + mapType?: MapTypes; + region?: Region; + initialRegion?: Region; + liteMode?: boolean; + mapPadding?: EdgePadding; + maxDelta?: number; + minDelta?: number; + legalLabelInsets?: EdgeInsets; + + onMapReady?: () => void; + onKmlReady?: (values: KmlMapEvent) => void; + onRegionChange?: (region: Region) => void; + onRegionChangeComplete?: (region: Region) => void; + onPress?: (event: MapEvent) => void; + onLongPress?: (event: MapEvent) => void; + onUserLocationChange?: (event: EventUserLocation) => void; + onPanDrag?: (event: MapEvent) => void; + onPoiClick?: (event: MapEvent<{ placeId: string, name: string }>) => void; + onMarkerPress?: (event: MapEvent<{ action: 'marker-press', id: string }>) => void; + onMarkerSelect?: (event: MapEvent<{ action: 'marker-select', id: string }>) => void; + onMarkerDeselect?: (event: MapEvent<{ action: 'marker-deselect', id: string }>) => void; + onCalloutPress?: (event: MapEvent<{ action: 'callout-press' }>) => void; + onMarkerDragStart?: (event: MapEvent) => void; + onMarkerDrag?: (event: MapEvent) => void; + onMarkerDragEnd?: (event: MapEvent) => void; + + minZoomLevel?: number; + maxZoomLevel?: number; + kmlSrc?: string; +} + +export class MapView extends React.Component { + animateToNavigation(location: LatLng, bearing: number, angle: number, duration?: number): void; + animateToRegion(region: Region, duration?: number): void; + animateToCoordinate(latLng: LatLng, duration?: number): void; + animateToBearing(bearing: number, duration?: number): void; + animateToViewingAngle(angle: number, duration?: number): void; + fitToElements(animated: boolean): void; + fitToSuppliedMarkers(markers: string[], options?: { edgePadding?: EdgePadding, animated?: boolean }): void; + fitToCoordinates(coordinates?: LatLng[], options?: { edgePadding?: EdgePadding, animated?: boolean }): void; + setMapBoundaries(northEast: LatLng, southWest: LatLng): void; + takeSnapshot(options?: SnapshotOptions): Promise; +} + +export class MapViewAnimated extends MapView { +} + +// ======================================================================= +// Marker +// ======================================================================= + +export interface MarkerProps extends ViewProperties { + identifier?: string; + reuseIdentifier?: string; + title?: string; + description?: string; + image?: ImageURISource | ImageRequireSource; + opacity?: number; + pinColor?: string; + coordinate: LatLng | AnimatedRegion; + centerOffset?: Point; + calloutOffset?: Point; + anchor?: Point; + calloutAnchor?: Point; + flat?: boolean; + draggable?: boolean; + tracksViewChanges?: boolean; + tracksInfoWindowChanges?: boolean; + stopPropagation?: boolean; + onPress?: (event: MapEvent<{ action: 'marker-press', id: string }>) => void; + onSelect?: (event: MapEvent<{ action: 'marker-select', id: string }>) => void; + onDeselect?: (event: MapEvent<{ action: 'marker-deselect', id: string }>) => void; + onCalloutPress?: (event: MapEvent<{ action: 'callout-press' }>) => void; + onDragStart?: (event: MapEvent) => void; + onDrag?: (event: MapEvent) => void; + onDragEnd?: (event: MapEvent) => void; + + rotation?: number; + zIndex?: number; +} + +export class Marker extends React.Component { + /** + * Shows the callout for this marker + */ + showCallout(): void; + /** + * Hides the callout for this marker + */ + hideCallout(): void; + /** + * Animates marker movement. + * __Android only__ + */ + animateMarkerToCoordinate(coordinate: LatLng, duration?: number): void; +} + +export class MarkerAnimated extends Marker { +} + +// ======================================================================= +// Callout +// ======================================================================= + +export interface MapCalloutProps extends ViewProperties { + tooltip?: boolean; + onPress?: (event: MapEvent<{ action: 'callout-press' }>) => void; +} + +export class Callout extends React.Component { +} + +// ======================================================================= +// Polyline +// ======================================================================= + +export interface MapPolylineProps extends ViewProperties { + coordinates: LatLng[]; + onPress?: (event: MapEvent) => void; + tappable?: boolean; + fillColor?: string; + strokeWidth?: number; + strokeColor?: string; + strokeColors?: string[]; + zIndex?: number; + lineCap?: LineCapType; + lineJoin?: LineJoinType; + miterLimit?: number; + geodesic?: boolean; + lineDashPhase?: number; + lineDashPattern?: number[]; +} + +export class Polyline extends React.Component { +} + +// ======================================================================= +// Polygon +// ======================================================================= + +export interface MapPolygonProps extends ViewProperties { + coordinates: LatLng[]; + holes?: LatLng[][]; + onPress?: (event: MapEvent) => void; + tappable?: boolean; + strokeWidth?: number; + strokeColor?: string; + fillColor?: string; + zIndex?: number; + lineCap?: LineCapType; + lineJoin?: LineJoinType; + miterLimit?: number; + geodesic?: boolean; + lineDashPhase?: number; + lineDashPattern?: number[]; +} + +export class Polygon extends React.Component { +} + +// ======================================================================= +// Circle +// ======================================================================= + +export interface MapCircleProps extends ViewProperties { + center: LatLng; + radius: number; + onPress?: (event: MapEvent) => void; + strokeWidth?: number; + strokeColor?: string; + fillColor?: string; + zIndex?: number; + lineCap?: LineCapType; + lineJoin?: LineJoinType; + miterLimit?: number; + lineDashPhase?: number; + lineDashPattern?: number[]; +} + +export class Circle extends React.Component { +} + +// ======================================================================= +// UrlTile & LocalTile +// ======================================================================= + +export interface MapUrlTileProps extends ViewProperties { + urlTemplate: string; + maximumZ?: number; + zIndex?: number; +} + +export class UrlTile extends React.Component { +} + +export interface MapLocalTileProps extends ViewProperties { + pathTemplate: string; + tileSize?: number; + zIndex?: number; +} + +export class LocalTile extends React.Component { +} + +// ======================================================================= +// Overlay +// ======================================================================= + +export type Coordinate = [number, number]; + +export interface MapOverlayProps extends ViewProperties { + image?: ImageURISource | ImageRequireSource; + bounds: [Coordinate, Coordinate]; +} + +export class Overlay extends React.Component { +} + +export class OverlayAnimated extends Overlay { +} + +// ======================================================================= +// Constants +// ======================================================================= + +export const MAP_TYPES: { + STANDARD: MapTypes, + SATELLITE: MapTypes, + HYBRID: MapTypes, + TERRAIN: MapTypes, + NONE: MapTypes, + MUTEDSTANDARD: MapTypes, +}; + +export const PROVIDER_DEFAULT: null; +export const PROVIDER_GOOGLE: 'google'; diff --git a/types/expo/tsconfig.json b/types/expo/tsconfig.json index e00f046e0e..f05d1c29ef 100644 --- a/types/expo/tsconfig.json +++ b/types/expo/tsconfig.json @@ -17,6 +17,7 @@ }, "files": [ "index.d.ts", + "mapview.d.ts", "expo-tests.tsx" ] } From ad5c5277191d56a9a8526405b8855a4521fb6313 Mon Sep 17 00:00:00 2001 From: Jan Aagaard Date: Thu, 29 Nov 2018 22:18:20 +0100 Subject: [PATCH 535/608] Rename mapview.d.ts to MapView.d.ts --- types/expo/{mapview.d.ts => MapView.d.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename types/expo/{mapview.d.ts => MapView.d.ts} (100%) diff --git a/types/expo/mapview.d.ts b/types/expo/MapView.d.ts similarity index 100% rename from types/expo/mapview.d.ts rename to types/expo/MapView.d.ts From c8601916c7ec97a8a0bcedc63524c57582256b74 Mon Sep 17 00:00:00 2001 From: Jan Aagaard Date: Thu, 29 Nov 2018 22:19:00 +0100 Subject: [PATCH 536/608] mapview => MapView --- types/expo/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index 818af22880..bd69fc0cfe 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -16,7 +16,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 -export { MapView } from './mapview'; +export { MapView } from './MapView'; import { EventSubscription } from 'fbemitter'; import { Component, ComponentClass, Ref, ComponentType } from 'react'; From d329f5f969978996f7ac8e1eb23c876213f9b481 Mon Sep 17 00:00:00 2001 From: Jan Aagaard Date: Thu, 29 Nov 2018 22:19:26 +0100 Subject: [PATCH 537/608] mapview.d.ts => MapView.d.ts --- types/expo/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/expo/tsconfig.json b/types/expo/tsconfig.json index f05d1c29ef..67acb42d2e 100644 --- a/types/expo/tsconfig.json +++ b/types/expo/tsconfig.json @@ -17,7 +17,7 @@ }, "files": [ "index.d.ts", - "mapview.d.ts", + "MapView.d.ts", "expo-tests.tsx" ] } From 1b01b4ccbfe5445ff32cecfbde6934035529a183 Mon Sep 17 00:00:00 2001 From: Jan Aagaard Date: Sat, 1 Dec 2018 14:12:37 +0100 Subject: [PATCH 538/608] Add tests --- types/expo/expo-tests.tsx | 102 +++++++++++++++++++++++++++++++++++--- 1 file changed, 96 insertions(+), 6 deletions(-) diff --git a/types/expo/expo-tests.tsx b/types/expo/expo-tests.tsx index f79b044de2..6df9d0be66 100644 --- a/types/expo/expo-tests.tsx +++ b/types/expo/expo-tests.tsx @@ -43,6 +43,16 @@ import { Updates } from 'expo'; +import { + EdgeInsets, + EdgePadding, + EventUserLocation, + KmlMapEvent, + MapEvent, + MapStyleElement, + Region +} from './MapView'; + const reverseGeocode: Promise = Location.reverseGeocodeAsync({ latitude: 0, longitude: 0 @@ -837,15 +847,95 @@ async () => { }; // #region MapView +const initialRegion: Region = { + latitude: 0, + longitude: 0, + latitudeDelta: 0, + longitudeDelta: 0, +}; + +const edgePadding: EdgePadding = { + top: 0, + right: 0, + bottom: 0, + left: 0, +}; + +const edgeInsets: EdgeInsets = { + top: 0, + right: 0, + bottom: 0, + left: 0, +}; + +const mapStyleElements: MapStyleElement[] = [{ + featureType: 'featureType', + elementType: 'elementType', + stylers: [{}, {}], +}]; + +const mapEventCallback = (event: MapEvent) => console.log(event); +const regionCallback = (region: Region) => console.log(region); +const kmlCallback = (kml: KmlMapEvent) => console.log(kml); +const userLocationCallback = (event: EventUserLocation) => console.log(event); + () => ( ({})} + onKmlReady={kmlCallback} + onRegionChange={regionCallback} + onRegionChangeComplete={regionCallback} + onPress={mapEventCallback} + onLongPress={mapEventCallback} + onUserLocationChange={userLocationCallback} + onPanDrag={mapEventCallback} + onPoiClick={(event: MapEvent<{ placeId: string, name: string }>) => console.log(event)} + onMarkerPress={(event: MapEvent<{ action: 'marker-press', id: string }>) => console.log(event)} + onMarkerSelect={(event: MapEvent<{ action: 'marker-select', id: string }>) => console.log(event)} + onMarkerDeselect={(event: MapEvent<{ action: 'marker-deselect', id: string }>) => console.log(event)} + onCalloutPress={(event: MapEvent<{ action: 'callout-press' }>) => console.log(event)} + onMarkerDragStart={mapEventCallback} + onMarkerDrag={mapEventCallback} + onMarkerDragEnd={mapEventCallback} + + minZoomLevel={0} + maxZoomLevel={0} + kmlSrc="src" style={{ flex: 1 }} - initialRegion={{ - latitude: 55.6838499, - latitudeDelta: 0.1, - longitude: 12.5630238, - longitudeDelta: 0.1 - }} /> ); // #endegion From d7cbc4c0056b6f3a3bba859df1def04da302ff1d Mon Sep 17 00:00:00 2001 From: Jan Aagaard Date: Sun, 2 Dec 2018 15:06:42 +0100 Subject: [PATCH 539/608] Use react-native-maps directly --- types/expo/MapView.d.ts | 421 -------------------------------------- types/expo/expo-tests.tsx | 7 +- types/expo/index.d.ts | 2 +- types/expo/package.json | 6 + 4 files changed, 10 insertions(+), 426 deletions(-) delete mode 100644 types/expo/MapView.d.ts create mode 100644 types/expo/package.json diff --git a/types/expo/MapView.d.ts b/types/expo/MapView.d.ts deleted file mode 100644 index 1885badf3a..0000000000 --- a/types/expo/MapView.d.ts +++ /dev/null @@ -1,421 +0,0 @@ -// Based on https://github.com/react-community/react-native-maps/blob/master/index.d.ts. - -import * as React from 'react'; -import { - Animated, - ImageRequireSource, - ImageURISource, - NativeSyntheticEvent, - ViewProperties -} from 'react-native'; - -export interface Region { - latitude: number; - longitude: number; - latitudeDelta: number; - longitudeDelta: number; -} - -export interface LatLng { - latitude: number; - longitude: number; -} - -export interface Point { - x: number; - y: number; -} - -// helper interface -export interface MapEvent extends NativeSyntheticEvent { } - -export type LineCapType = 'butt' | 'round' | 'square'; -export type LineJoinType = 'miter' | 'round' | 'bevel'; - -// ======================================================================= -// AnimatedRegion -// ======================================================================= - -export interface AnimatedRegionTimingConfig extends Animated.AnimationConfig, Partial { - easing?: (value: number) => number; - duration?: number; - delay?: number; -} - -export interface AnimatedRegionSpringConfig extends Animated.AnimationConfig, Partial { - overshootClamping?: boolean; - restDisplacementThreshold?: number; - restSpeedThreshold?: number; - velocity?: number | Point; - bounciness?: number; - speed?: number; - tension?: number; - friction?: number; - stiffness?: number; - mass?: number; - damping?: number; -} - -export class AnimatedRegion extends Animated.AnimatedWithChildren { - latitude: Animated.Value; - longitude: Animated.Value; - latitudeDelta: Animated.Value; - longitudeDelta: Animated.Value; - - constructor(region?: Region); - - setValue(value: Region): void; - setOffset(offset: Region): void; - flattenOffset(): void; - stopAnimation(callback?: (region: Region) => void): void; - addListener(callback: (region: Region) => void): string; - removeListener(id: string): void; - spring(config: AnimatedRegionSpringConfig): Animated.CompositeAnimation; - timing(config: AnimatedRegionTimingConfig): Animated.CompositeAnimation; -} - -// ======================================================================= -// MapView (default export) -// ======================================================================= - -/** - * takeSnapshot options - */ -export interface SnapshotOptions { - /** optional, when omitted the view-width is used */ - width?: number; - /** optional, when omitted the view-height is used */ - height?: number; - /** __iOS only__, optional region to render */ - region?: Region; - /** image formats, defaults to 'png' */ - format?: 'png' | 'jpg'; - /** image quality: 0..1 (only relevant for jpg, default: 1) */ - quality?: number; - /** result types, defaults to 'file' */ - result?: 'file' | 'base64'; -} - -/** - * onUserLocationChange parameters - */ -export interface EventUserLocation extends NativeSyntheticEvent<{}> { - nativeEvent: { - coordinate: { - latitude: number, - longitude: number, - altitude: number, - timestamp: number, - accuracy: number, - speed: number, - isFromMockProvider: boolean, - }, - }; -} - -/** - * Map style elements. - * @see https://developers.google.com/maps/documentation/ios-sdk/styling#use_a_string_resource - * @see https://developers.google.com/maps/documentation/android-api/styling - */ -export interface MapStyleElement { - featureType?: string; - elementType?: string; - stylers: object[]; -} - -export interface EdgePadding { - top: number; - right: number; - bottom: number; - left: number; -} - -export interface EdgeInsets { - top: number; - right: number; - bottom: number; - left: number; -} - -export interface KmlMarker { - id: string; - title: string; - description: string; - coordinate: LatLng; - position: Point; -} - -/** - * onKmlReady parameter - */ -export interface KmlMapEvent extends NativeSyntheticEvent<{ markers: KmlMarker[] }> { -} - -export type MapTypes = 'standard' | 'satellite' | 'hybrid' | 'terrain' | 'none' | 'mutedStandard'; - -export interface MapViewProps extends ViewProperties { - provider?: 'google' | null; - customMapStyle?: MapStyleElement[]; - customMapStyleString?: string; - showsUserLocation?: boolean; - userLocationAnnotationTitle?: string; - showsMyLocationButton?: boolean; - followsUserLocation?: boolean; - showsPointsOfInterest?: boolean; - showsCompass?: boolean; - zoomEnabled?: boolean; - zoomControlEnabled?: boolean; - rotateEnabled?: boolean; - cacheEnabled?: boolean; - loadingEnabled?: boolean; - loadingBackgroundColor?: string; - loadingIndicatorColor?: string; - scrollEnabled?: boolean; - pitchEnabled?: boolean; - toolbarEnabled?: boolean; - moveOnMarkerPress?: boolean; - showsScale?: boolean; - showsBuildings?: boolean; - showsTraffic?: boolean; - showsIndoors?: boolean; - showsIndoorLevelPicker?: boolean; - mapType?: MapTypes; - region?: Region; - initialRegion?: Region; - liteMode?: boolean; - mapPadding?: EdgePadding; - maxDelta?: number; - minDelta?: number; - legalLabelInsets?: EdgeInsets; - - onMapReady?: () => void; - onKmlReady?: (values: KmlMapEvent) => void; - onRegionChange?: (region: Region) => void; - onRegionChangeComplete?: (region: Region) => void; - onPress?: (event: MapEvent) => void; - onLongPress?: (event: MapEvent) => void; - onUserLocationChange?: (event: EventUserLocation) => void; - onPanDrag?: (event: MapEvent) => void; - onPoiClick?: (event: MapEvent<{ placeId: string, name: string }>) => void; - onMarkerPress?: (event: MapEvent<{ action: 'marker-press', id: string }>) => void; - onMarkerSelect?: (event: MapEvent<{ action: 'marker-select', id: string }>) => void; - onMarkerDeselect?: (event: MapEvent<{ action: 'marker-deselect', id: string }>) => void; - onCalloutPress?: (event: MapEvent<{ action: 'callout-press' }>) => void; - onMarkerDragStart?: (event: MapEvent) => void; - onMarkerDrag?: (event: MapEvent) => void; - onMarkerDragEnd?: (event: MapEvent) => void; - - minZoomLevel?: number; - maxZoomLevel?: number; - kmlSrc?: string; -} - -export class MapView extends React.Component { - animateToNavigation(location: LatLng, bearing: number, angle: number, duration?: number): void; - animateToRegion(region: Region, duration?: number): void; - animateToCoordinate(latLng: LatLng, duration?: number): void; - animateToBearing(bearing: number, duration?: number): void; - animateToViewingAngle(angle: number, duration?: number): void; - fitToElements(animated: boolean): void; - fitToSuppliedMarkers(markers: string[], options?: { edgePadding?: EdgePadding, animated?: boolean }): void; - fitToCoordinates(coordinates?: LatLng[], options?: { edgePadding?: EdgePadding, animated?: boolean }): void; - setMapBoundaries(northEast: LatLng, southWest: LatLng): void; - takeSnapshot(options?: SnapshotOptions): Promise; -} - -export class MapViewAnimated extends MapView { -} - -// ======================================================================= -// Marker -// ======================================================================= - -export interface MarkerProps extends ViewProperties { - identifier?: string; - reuseIdentifier?: string; - title?: string; - description?: string; - image?: ImageURISource | ImageRequireSource; - opacity?: number; - pinColor?: string; - coordinate: LatLng | AnimatedRegion; - centerOffset?: Point; - calloutOffset?: Point; - anchor?: Point; - calloutAnchor?: Point; - flat?: boolean; - draggable?: boolean; - tracksViewChanges?: boolean; - tracksInfoWindowChanges?: boolean; - stopPropagation?: boolean; - onPress?: (event: MapEvent<{ action: 'marker-press', id: string }>) => void; - onSelect?: (event: MapEvent<{ action: 'marker-select', id: string }>) => void; - onDeselect?: (event: MapEvent<{ action: 'marker-deselect', id: string }>) => void; - onCalloutPress?: (event: MapEvent<{ action: 'callout-press' }>) => void; - onDragStart?: (event: MapEvent) => void; - onDrag?: (event: MapEvent) => void; - onDragEnd?: (event: MapEvent) => void; - - rotation?: number; - zIndex?: number; -} - -export class Marker extends React.Component { - /** - * Shows the callout for this marker - */ - showCallout(): void; - /** - * Hides the callout for this marker - */ - hideCallout(): void; - /** - * Animates marker movement. - * __Android only__ - */ - animateMarkerToCoordinate(coordinate: LatLng, duration?: number): void; -} - -export class MarkerAnimated extends Marker { -} - -// ======================================================================= -// Callout -// ======================================================================= - -export interface MapCalloutProps extends ViewProperties { - tooltip?: boolean; - onPress?: (event: MapEvent<{ action: 'callout-press' }>) => void; -} - -export class Callout extends React.Component { -} - -// ======================================================================= -// Polyline -// ======================================================================= - -export interface MapPolylineProps extends ViewProperties { - coordinates: LatLng[]; - onPress?: (event: MapEvent) => void; - tappable?: boolean; - fillColor?: string; - strokeWidth?: number; - strokeColor?: string; - strokeColors?: string[]; - zIndex?: number; - lineCap?: LineCapType; - lineJoin?: LineJoinType; - miterLimit?: number; - geodesic?: boolean; - lineDashPhase?: number; - lineDashPattern?: number[]; -} - -export class Polyline extends React.Component { -} - -// ======================================================================= -// Polygon -// ======================================================================= - -export interface MapPolygonProps extends ViewProperties { - coordinates: LatLng[]; - holes?: LatLng[][]; - onPress?: (event: MapEvent) => void; - tappable?: boolean; - strokeWidth?: number; - strokeColor?: string; - fillColor?: string; - zIndex?: number; - lineCap?: LineCapType; - lineJoin?: LineJoinType; - miterLimit?: number; - geodesic?: boolean; - lineDashPhase?: number; - lineDashPattern?: number[]; -} - -export class Polygon extends React.Component { -} - -// ======================================================================= -// Circle -// ======================================================================= - -export interface MapCircleProps extends ViewProperties { - center: LatLng; - radius: number; - onPress?: (event: MapEvent) => void; - strokeWidth?: number; - strokeColor?: string; - fillColor?: string; - zIndex?: number; - lineCap?: LineCapType; - lineJoin?: LineJoinType; - miterLimit?: number; - lineDashPhase?: number; - lineDashPattern?: number[]; -} - -export class Circle extends React.Component { -} - -// ======================================================================= -// UrlTile & LocalTile -// ======================================================================= - -export interface MapUrlTileProps extends ViewProperties { - urlTemplate: string; - maximumZ?: number; - zIndex?: number; -} - -export class UrlTile extends React.Component { -} - -export interface MapLocalTileProps extends ViewProperties { - pathTemplate: string; - tileSize?: number; - zIndex?: number; -} - -export class LocalTile extends React.Component { -} - -// ======================================================================= -// Overlay -// ======================================================================= - -export type Coordinate = [number, number]; - -export interface MapOverlayProps extends ViewProperties { - image?: ImageURISource | ImageRequireSource; - bounds: [Coordinate, Coordinate]; -} - -export class Overlay extends React.Component { -} - -export class OverlayAnimated extends Overlay { -} - -// ======================================================================= -// Constants -// ======================================================================= - -export const MAP_TYPES: { - STANDARD: MapTypes, - SATELLITE: MapTypes, - HYBRID: MapTypes, - TERRAIN: MapTypes, - NONE: MapTypes, - MUTEDSTANDARD: MapTypes, -}; - -export const PROVIDER_DEFAULT: null; -export const PROVIDER_GOOGLE: 'google'; diff --git a/types/expo/expo-tests.tsx b/types/expo/expo-tests.tsx index 6df9d0be66..a3789873a9 100644 --- a/types/expo/expo-tests.tsx +++ b/types/expo/expo-tests.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { Text } from 'react-native'; +import { Text, AccessibilityInfo } from 'react-native'; import { Accelerometer, @@ -33,7 +33,6 @@ import { Linking, Location, MailComposer, - MapView, MediaLibrary, Permissions, PublisherBanner, @@ -43,7 +42,7 @@ import { Updates } from 'expo'; -import { +import MapView, { EdgeInsets, EdgePadding, EventUserLocation, @@ -51,7 +50,7 @@ import { MapEvent, MapStyleElement, Region -} from './MapView'; +} from 'react-native-maps'; const reverseGeocode: Promise = Location.reverseGeocodeAsync({ latitude: 0, diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index bd69fc0cfe..30a36743f4 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -16,7 +16,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 -export { MapView } from './MapView'; +export { default } from 'react-native-maps'; import { EventSubscription } from 'fbemitter'; import { Component, ComponentClass, Ref, ComponentType } from 'react'; diff --git a/types/expo/package.json b/types/expo/package.json new file mode 100644 index 0000000000..4abdc24638 --- /dev/null +++ b/types/expo/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "react-native-maps": "*" + } +} From 1429a24de98eebe770e066a0cd19f4dbb84bd328 Mon Sep 17 00:00:00 2001 From: Jan Aagaard Date: Mon, 3 Dec 2018 08:46:09 +0100 Subject: [PATCH 540/608] Import react-native-maps through expo --- types/expo/expo-tests.tsx | 18 ++++++++---------- types/expo/index.d.ts | 3 ++- types/expo/tsconfig.json | 1 - 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/types/expo/expo-tests.tsx b/types/expo/expo-tests.tsx index a3789873a9..aa69df28ad 100644 --- a/types/expo/expo-tests.tsx +++ b/types/expo/expo-tests.tsx @@ -20,6 +20,9 @@ import { CameraObject, Constants, DocumentPicker, + EdgeInsets, + EdgePadding, + EventUserLocation, Facebook, FacebookAds, FaceDetector, @@ -29,29 +32,24 @@ import { ImagePicker, IntentLauncherAndroid, KeepAwake, + KmlMapEvent, LinearGradient, Linking, Location, MailComposer, + MapEvent, + MapStyleElement, + MapView, MediaLibrary, Permissions, PublisherBanner, + Region, registerRootComponent, ScreenOrientation, Svg, Updates } from 'expo'; -import MapView, { - EdgeInsets, - EdgePadding, - EventUserLocation, - KmlMapEvent, - MapEvent, - MapStyleElement, - Region -} from 'react-native-maps'; - const reverseGeocode: Promise = Location.reverseGeocodeAsync({ latitude: 0, longitude: 0 diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index 30a36743f4..55dc4ffd06 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -16,7 +16,8 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 -export { default } from 'react-native-maps'; +export * from 'react-native-maps'; +export { default as MapView } from 'react-native-maps'; import { EventSubscription } from 'fbemitter'; import { Component, ComponentClass, Ref, ComponentType } from 'react'; diff --git a/types/expo/tsconfig.json b/types/expo/tsconfig.json index 67acb42d2e..e00f046e0e 100644 --- a/types/expo/tsconfig.json +++ b/types/expo/tsconfig.json @@ -17,7 +17,6 @@ }, "files": [ "index.d.ts", - "MapView.d.ts", "expo-tests.tsx" ] } From f4d137c459d2c7ff2532cec76d5814b9cea7158d Mon Sep 17 00:00:00 2001 From: David Brett Date: Tue, 11 Dec 2018 16:51:05 -0500 Subject: [PATCH 541/608] PR Feedback - linting and missing export --- types/multi-progress/index.d.ts | 6 +- types/multi-progress/multi-progress-tests.ts | 6 +- types/multi-progress/tsconfig.json | 2 +- types/multi-progress/tslint.json | 77 +------------------- 4 files changed, 8 insertions(+), 83 deletions(-) diff --git a/types/multi-progress/index.d.ts b/types/multi-progress/index.d.ts index e1ae12a4e0..ebedcf9597 100644 --- a/types/multi-progress/index.d.ts +++ b/types/multi-progress/index.d.ts @@ -1,14 +1,14 @@ -// Type definitions for multi-progress v2.0.0 +// Type definitions for multi-progress 2.0 // Project: https://github.com/pitaj/multi-progress // Definitions by: David Brett // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// -import ProgressBar, { ProgressBarOptions } from '../progress' +import ProgressBar, { ProgressBarOptions } from '../progress'; import { Stream } from 'stream'; -declare class MultiProgress { +export default class MultiProgress { /** * Create a new @see MultiProgress with the given stream, or stderr by default * @param stream A stream to write the progress bars to diff --git a/types/multi-progress/multi-progress-tests.ts b/types/multi-progress/multi-progress-tests.ts index 3397a48428..9dde27c16b 100644 --- a/types/multi-progress/multi-progress-tests.ts +++ b/types/multi-progress/multi-progress-tests.ts @@ -3,14 +3,14 @@ */ // require the library -var MultiProgress = require("multi-progress"); +import MultiProgress from 'multi-progress'; // spawn an instance with the optional stream to write to // use of `new` is optional -var multi = new MultiProgress(process.stderr); +const multi = new MultiProgress(process.stderr); // create a progress bar -var bar = multi.newBar(' downloading [:bar] :percent :etas', { +const bar = multi.newBar(' downloading [:bar] :percent :etas', { complete: '=', incomplete: ' ', width: 30, diff --git a/types/multi-progress/tsconfig.json b/types/multi-progress/tsconfig.json index 72100a32f7..3f0dc36371 100644 --- a/types/multi-progress/tsconfig.json +++ b/types/multi-progress/tsconfig.json @@ -6,7 +6,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ diff --git a/types/multi-progress/tslint.json b/types/multi-progress/tslint.json index a41bf5d19a..1a60b8a5dd 100644 --- a/types/multi-progress/tslint.json +++ b/types/multi-progress/tslint.json @@ -1,79 +1,4 @@ { "extends": "dtslint/dt.json", - "rules": { - "adjacent-overload-signatures": false, - "array-type": false, - "arrow-return-shorthand": false, - "ban-types": false, - "callable-types": false, - "comment-format": false, - "dt-header": false, - "eofline": false, - "export-just-namespace": false, - "import-spacing": false, - "interface-name": false, - "interface-over-type-literal": false, - "jsdoc-format": false, - "max-line-length": false, - "member-access": false, - "new-parens": false, - "no-any-union": false, - "no-boolean-literal-compare": false, - "no-conditional-assignment": false, - "no-consecutive-blank-lines": false, - "no-construct": false, - "no-declare-current-package": false, - "no-duplicate-imports": false, - "no-duplicate-variable": false, - "no-empty-interface": false, - "no-for-in-array": false, - "no-inferrable-types": false, - "no-internal-module": false, - "no-irregular-whitespace": false, - "no-mergeable-namespace": false, - "no-misused-new": false, - "no-namespace": false, - "no-object-literal-type-assertion": false, - "no-padding": false, - "no-redundant-jsdoc": false, - "no-redundant-jsdoc-2": false, - "no-redundant-undefined": false, - "no-reference-import": false, - "no-relative-import-in-test": false, - "no-self-import": false, - "no-single-declare-module": false, - "no-string-throw": false, - "no-unnecessary-callback-wrapper": false, - "no-unnecessary-class": false, - "no-unnecessary-generics": false, - "no-unnecessary-qualifier": false, - "no-unnecessary-type-assertion": false, - "no-useless-files": false, - "no-var-keyword": false, - "no-var-requires": false, - "no-void-expression": false, - "no-trailing-whitespace": false, - "object-literal-key-quotes": false, - "object-literal-shorthand": false, - "one-line": false, - "one-variable-per-declaration": false, - "only-arrow-functions": false, - "prefer-conditional-expression": false, - "prefer-const": false, - "prefer-declare-function": false, - "prefer-for-of": false, - "prefer-method-signature": false, - "prefer-template": false, - "radix": false, - "semicolon": false, - "space-before-function-paren": false, - "space-within-parens": false, - "strict-export-declare-modifiers": false, - "trim-file": false, - "triple-equals": false, - "typedef-whitespace": false, - "unified-signatures": false, - "void-return": false, - "whitespace": false - } + "rules": { } } From d5d8a4429bc0b1d0895e8f1dd2b915e9c1860ea8 Mon Sep 17 00:00:00 2001 From: jb1361 Date: Tue, 11 Dec 2018 17:25:33 -0500 Subject: [PATCH 542/608] Update styles interface --- types/react-burger-menu/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/react-burger-menu/index.d.ts b/types/react-burger-menu/index.d.ts index 85d49494c2..544dd84aec 100644 --- a/types/react-burger-menu/index.d.ts +++ b/types/react-burger-menu/index.d.ts @@ -16,6 +16,7 @@ export interface Styles { bmCross: Partial; bmCrossButton: Partial; bmItemList: Partial; + bmMenuWrap: Partial; bmMenu: Partial; bmMorphShape: Partial; bmOverlay: Partial; From c128ba5cdb9c98c2d0ceed4f7ba3a65d9fe78de9 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Wed, 12 Dec 2018 01:02:54 +0100 Subject: [PATCH 543/608] move old version to v1 sub-dir --- types/conf/{ => v1}/conf-tests.ts | 10 +++++----- types/conf/{ => v1}/index.d.ts | 0 types/conf/{ => v1}/tsconfig.json | 11 ++++++++--- types/conf/{ => v1}/tslint.json | 0 4 files changed, 13 insertions(+), 8 deletions(-) rename types/conf/{ => v1}/conf-tests.ts (88%) rename types/conf/{ => v1}/index.d.ts (100%) rename types/conf/{ => v1}/tsconfig.json (76%) rename types/conf/{ => v1}/tslint.json (100%) diff --git a/types/conf/conf-tests.ts b/types/conf/v1/conf-tests.ts similarity index 88% rename from types/conf/conf-tests.ts rename to types/conf/v1/conf-tests.ts index 1da0e4de2d..4ee492da8d 100644 --- a/types/conf/conf-tests.ts +++ b/types/conf/v1/conf-tests.ts @@ -4,18 +4,18 @@ const conf = new Conf(); new Conf({ defaults: { foo: 'bar', - unicorn: 'rainbow' + unicorn: 'rainbow', }, configName: '', projectName: 'foo', - cwd: '' + cwd: '', }); // $ExpectError new Conf({ defaults: { foo: 'bar', - unicorn: ['rainbow'] - } + unicorn: ['rainbow'], + }, }); conf.set('foo', 'bar'); conf.set('hello', 1); @@ -31,7 +31,7 @@ conf.clear(); conf.store = { foo: 'bar', - unicorn: 'rainbow' + unicorn: 'rainbow', }; conf.path; // $ExpectType string diff --git a/types/conf/index.d.ts b/types/conf/v1/index.d.ts similarity index 100% rename from types/conf/index.d.ts rename to types/conf/v1/index.d.ts diff --git a/types/conf/tsconfig.json b/types/conf/v1/tsconfig.json similarity index 76% rename from types/conf/tsconfig.json rename to types/conf/v1/tsconfig.json index 84d6bf7657..86b3a62f41 100644 --- a/types/conf/tsconfig.json +++ b/types/conf/v1/tsconfig.json @@ -9,10 +9,15 @@ "noImplicitThis": true, "strictNullChecks": true, "strictFunctionTypes": true, - "baseUrl": "../", + "baseUrl": "../../", "typeRoots": [ - "../" + "../../" ], + "paths": { + "conf": [ + "conf/v1" + ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true @@ -21,4 +26,4 @@ "index.d.ts", "conf-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/conf/tslint.json b/types/conf/v1/tslint.json similarity index 100% rename from types/conf/tslint.json rename to types/conf/v1/tslint.json From bd464573d7946e481a041858165b1e7a2c19a1b8 Mon Sep 17 00:00:00 2001 From: Joshua O'Brien Date: Wed, 12 Dec 2018 11:24:32 +1100 Subject: [PATCH 544/608] fix(gapi.people): replace deprecated RequestMask with PersonFields --- types/gapi.people/gapi.people-tests.ts | 1 + types/gapi.people/index.d.ts | 11 ++++------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/types/gapi.people/gapi.people-tests.ts b/types/gapi.people/gapi.people-tests.ts index 65b6339765..349f956b39 100644 --- a/types/gapi.people/gapi.people-tests.ts +++ b/types/gapi.people/gapi.people-tests.ts @@ -64,6 +64,7 @@ var request = gapi.client.people.people.connections.list({ 'resourceName': 'people/me', 'pageSize': 10, + 'personFields': 'names' }); request.execute(function(resp) { diff --git a/types/gapi.people/index.d.ts b/types/gapi.people/index.d.ts index 851eab2c0b..d39dc0b875 100644 --- a/types/gapi.people/index.d.ts +++ b/types/gapi.people/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for Google People API 1.0 // Project: https://developers.google.com/people/ // Definitions by: Tanguy Krotoff +// Joshua O'Brien // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -13,7 +14,7 @@ declare namespace gapi.client.people { resourceName: string; // Query parameters - requestMask?: RequestMask; + personFields: string; } function get(parameters: GetParameters): HttpRequest; @@ -21,7 +22,7 @@ declare namespace gapi.client.people { interface GetBatchGetParameters { // Query parameters resourcesName?: string; - requestMask?: RequestMask; + personFields: string; } function getBatchGet(parameters: GetBatchGetParameters): HttpRequest; @@ -49,7 +50,7 @@ declare namespace gapi.client.people { pageSize?: number; sortOrder?: SortOrder; syncToken?: string; - requestMask?: RequestMask; + personFields: string; } interface Response { @@ -60,10 +61,6 @@ declare namespace gapi.client.people { } } - interface RequestMask { - includeField: string; - } - type SourceType = 'SOURCE_TYPE_UNSPECIFIED' | 'ACCOUNT' | 'PROFILE' | 'DOMAIN_PROFILE' | 'CONTACT'; interface Source { From 723d94dec7dd1da86593fb1000bc6eb558f54c8c Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Wed, 12 Dec 2018 01:26:37 +0100 Subject: [PATCH 545/608] Update types for conf to v2.1 --- types/conf/conf-tests.ts | 54 ++++++++++++++++++++++++++++++++++++++++ types/conf/index.d.ts | 37 +++++++++++++++++++++++++++ types/conf/tsconfig.json | 24 ++++++++++++++++++ types/conf/tslint.json | 1 + types/conf/v1/index.d.ts | 30 +++++++++++----------- 5 files changed, 131 insertions(+), 15 deletions(-) create mode 100644 types/conf/conf-tests.ts create mode 100644 types/conf/index.d.ts create mode 100644 types/conf/tsconfig.json create mode 100644 types/conf/tslint.json diff --git a/types/conf/conf-tests.ts b/types/conf/conf-tests.ts new file mode 100644 index 0000000000..ce67cd4799 --- /dev/null +++ b/types/conf/conf-tests.ts @@ -0,0 +1,54 @@ +import Conf = require('conf'); + +const conf = new Conf(); +new Conf({ + defaults: { + foo: 'bar', + unicorn: 'rainbow', + }, +}); +new Conf({ configName: '' }); +new Conf({ projectName: 'foo' }); +new Conf({ cwd: '' }); +new Conf({ encryptionKey: '' }); +new Conf({ encryptionKey: new Buffer('') }); +new Conf({ encryptionKey: new Uint8Array([1]) }); +new Conf({ encryptionKey: new DataView(new ArrayBuffer(2)) }); +new Conf({ fileExtension: '.foo' }); + +// $ExpectError +new Conf({ + defaults: { + foo: 'bar', + unicorn: ['rainbow'], + }, +}); +conf.set('foo', 'bar'); +conf.set('hello', 1); +conf.set('unicorn', false); +conf.set('null', null); // $ExpectError + +conf.get('foo'); // $ExpectType string | number | boolean +conf.get('foo', 'bar'); // $ExpectType string | number | boolean +conf.get('foo', null); // $ExpectError +conf.delete('foo'); +conf.has('foo'); // $ExpectType boolean +conf.clear(); +conf.onDidChange('foo', (oldVal, newVal) => { + // $ExpectType string | number | boolean | undefined + oldVal; + // $ExpectType string | number | boolean | undefined + newVal; +}); + +conf.size; // $ExpectType number +conf.store = { + foo: 'bar', + unicorn: 'rainbow', +}; +conf.path; // $ExpectType string + +for (const [key, value] of conf) { + key; // $ExpectType string + value; // $ExpectType string | number | boolean +} diff --git a/types/conf/index.d.ts b/types/conf/index.d.ts new file mode 100644 index 0000000000..57d7285a3e --- /dev/null +++ b/types/conf/index.d.ts @@ -0,0 +1,37 @@ +// Type definitions for conf 2.1 +// Project: https://github.com/sindresorhus/conf +// Definitions by: Sam Verschueren +// BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/// + +declare class Conf implements Iterable<[string, T]> { + store: { [key: string]: T }; + readonly path: string; + readonly size: number; + + constructor(options?: Conf.Options); + get(key: string, defaultValue?: T): T; + set(key: string, val: T): void; + set(object: { [key: string]: T }): void; + has(key: string): boolean; + delete(key: string): void; + clear(): void; + onDidChange(key: string, callback: (oldVal: T | undefined, newVal: T | undefined) => void): void; + [Symbol.iterator](): Iterator<[string, T]>; +} + +declare namespace Conf { + interface Options { + defaults?: { [key: string]: T }; + configName?: string; + projectName?: string; + cwd?: string; + encryptionKey?: string | Buffer | NodeJS.TypedArray | DataView; + fileExtension?: string; + } +} + +export = Conf; diff --git a/types/conf/tsconfig.json b/types/conf/tsconfig.json new file mode 100644 index 0000000000..479fa6b41f --- /dev/null +++ b/types/conf/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "target": "es6", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "conf-tests.ts" + ] +} diff --git a/types/conf/tslint.json b/types/conf/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/conf/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/conf/v1/index.d.ts b/types/conf/v1/index.d.ts index e58dc3ede7..f08cff1584 100644 --- a/types/conf/v1/index.d.ts +++ b/types/conf/v1/index.d.ts @@ -6,26 +6,26 @@ // TypeScript Version: 2.3 interface Options { - defaults?: {[key: string]: T}; - configName?: string; - projectName?: string; - cwd?: string; + defaults?: { [key: string]: T }; + configName?: string; + projectName?: string; + cwd?: string; } declare class Conf implements Iterable<[string, T]> { - store: {[key: string]: T}; + store: { [key: string]: T }; readonly path: string; - readonly size: number; + readonly size: number; - constructor(options?: Options); - get(key: string, defaultValue?: T): T; - set(key: string, val: T): void; - set(object: {[key: string]: T}): void; - has(key: string): boolean; - delete(key: string): void; - clear(): void; - onDidChange(key: string, callback: (oldVal: any, newVal: any) => void): void; - [Symbol.iterator](): Iterator<[string, T]>; + constructor(options?: Options); + get(key: string, defaultValue?: T): T; + set(key: string, val: T): void; + set(object: { [key: string]: T }): void; + has(key: string): boolean; + delete(key: string): void; + clear(): void; + onDidChange(key: string, callback: (oldVal: any, newVal: any) => void): void; + [Symbol.iterator](): Iterator<[string, T]>; } export = Conf; From dd92d2da9b7184766f41a8b6c07bb93e58d8c1d8 Mon Sep 17 00:00:00 2001 From: Joshua O'Brien Date: Wed, 12 Dec 2018 11:54:59 +1100 Subject: [PATCH 546/608] Refactor gapi and gapi.auth2 tests to account for changes in gapi.people definitions --- types/gapi.auth2/gapi.auth2-tests.ts | 3 ++- types/gapi/gapi-tests.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/types/gapi.auth2/gapi.auth2-tests.ts b/types/gapi.auth2/gapi.auth2-tests.ts index 1fc03f7f4f..229a18f5fc 100644 --- a/types/gapi.auth2/gapi.auth2-tests.ts +++ b/types/gapi.auth2/gapi.auth2-tests.ts @@ -144,7 +144,8 @@ function handleSignoutClick(event: MouseEvent) { // Load the API and make an API call. Display the results on the screen. function makeApiCall() { gapi.client.people.people.get({ - resourceName: 'people/me' + resourceName: 'people/me', + personFields: 'names' }).then((resp) => { const p = document.createElement('p'); const name = resp.result.names[0].givenName; diff --git a/types/gapi/gapi-tests.ts b/types/gapi/gapi-tests.ts index 7c5308aaf9..0de37fdccb 100644 --- a/types/gapi/gapi-tests.ts +++ b/types/gapi/gapi-tests.ts @@ -20,7 +20,8 @@ https://developers.google.com/api-client-library/javascript/reference/referenced }).then(function() { // 3. Initialize and make the API request. return gapi.client.people.people.get({ - resourceName: 'people/me' + resourceName: 'people/me', + personFields: 'name' }); }).then(function(response) { console.log(response.result); From 5bcb6eca220081d0cd6f81b29232956f969db8de Mon Sep 17 00:00:00 2001 From: Bradley Ayers Date: Wed, 12 Dec 2018 15:56:05 +1100 Subject: [PATCH 547/608] fix(react-router): match is only null for function child (#31278) * fix(react-router): match is only null for function child * fix(react-router): explicitly export interface (strict-export-declare-modifiers) --- types/react-router/index.d.ts | 13 +++++++++++-- types/react-router/test/Children.tsx | 6 ++++++ .../Ambiguous.tsx | 2 +- .../Animation.tsx | 6 +++--- .../examples-from-react-router-website/Basic.tsx | 4 ++-- .../ModalGallery.tsx | 8 -------- .../examples-from-react-router-website/Params.tsx | 2 +- .../Recursive.tsx | 4 ---- 8 files changed, 24 insertions(+), 21 deletions(-) diff --git a/types/react-router/index.d.ts b/types/react-router/index.d.ts index fff900d458..eee1b15972 100644 --- a/types/react-router/index.d.ts +++ b/types/react-router/index.d.ts @@ -68,15 +68,24 @@ export interface StaticContext { export interface RouteComponentProps { history: H.History; location: H.Location; - match: match | null; + match: match; staticContext?: C; } +export interface RouteChildrenProps< + Params extends { [K in keyof Params]?: string } = {}, + S = H.LocationState +> { + history: H.History; + location: H.Location; + match: match | null; +} + export interface RouteProps { location?: H.Location; component?: React.ComponentType> | React.ComponentType; render?: ((props: RouteComponentProps) => React.ReactNode); - children?: ((props: RouteComponentProps) => React.ReactNode) | React.ReactNode; + children?: ((props: RouteChildrenProps) => React.ReactNode) | React.ReactNode; path?: string | string[]; exact?: boolean; sensitive?: boolean; diff --git a/types/react-router/test/Children.tsx b/types/react-router/test/Children.tsx index c3dea4f482..7f33629f3c 100644 --- a/types/react-router/test/Children.tsx +++ b/types/react-router/test/Children.tsx @@ -20,3 +20,9 @@ function RouteWithElementJsxChildren() { {
    Hello!
    } ; } + +function RouteWithFunctionChildrenUsingNullableMatch() { + return + {({ match }) => match !== null ?
    Matched path: {match.path}
    :
    No match!
    } +
    ; +} diff --git a/types/react-router/test/examples-from-react-router-website/Ambiguous.tsx b/types/react-router/test/examples-from-react-router-website/Ambiguous.tsx index 3f2dbc2223..6e6598fd71 100644 --- a/types/react-router/test/examples-from-react-router-website/Ambiguous.tsx +++ b/types/react-router/test/examples-from-react-router-website/Ambiguous.tsx @@ -41,7 +41,7 @@ const AmbiguousExample = () => ( const About = () =>

    About

    ; const Company = () =>

    Company

    ; -const User: React.SFC> = ({ match }) => match && ( +const User: React.SFC> = ({ match }) => (

    User: {match.params.user}

    diff --git a/types/react-router/test/examples-from-react-router-website/Animation.tsx b/types/react-router/test/examples-from-react-router-website/Animation.tsx index 306ad14ea4..8133528179 100644 --- a/types/react-router/test/examples-from-react-router-website/Animation.tsx +++ b/types/react-router/test/examples-from-react-router-website/Animation.tsx @@ -72,12 +72,12 @@ interface HSLParams { l: string; } -const HSL: React.SFC> = ({ match }) => match && ( +const HSL: React.SFC> = ({ match: { params } }) => (
    hsl({match.params.h}, {match.params.s}%, {match.params.l}%)
    + background: `hsl(${params.h}, ${params.s}%, ${params.l}%)` + }}>hsl({params.h}, {params.s}%, {params.l}%) ); const styles: any = {}; diff --git a/types/react-router/test/examples-from-react-router-website/Basic.tsx b/types/react-router/test/examples-from-react-router-website/Basic.tsx index 05e2101f85..ba6a5eabe5 100644 --- a/types/react-router/test/examples-from-react-router-website/Basic.tsx +++ b/types/react-router/test/examples-from-react-router-website/Basic.tsx @@ -36,7 +36,7 @@ const About = () => ( ); -const Topics: React.SFC = ({ match }) => match === null ? null : ( +const Topics: React.SFC = ({ match }) => (

    Topics

      @@ -64,7 +64,7 @@ const Topics: React.SFC = ({ match }) => match === null ? n
    ); -const Topic: React.SFC> = ({ match }) => match && ( +const Topic: React.SFC> = ({ match }) => (

    {match.params.topicId}

    diff --git a/types/react-router/test/examples-from-react-router-website/ModalGallery.tsx b/types/react-router/test/examples-from-react-router-website/ModalGallery.tsx index be9bd1c322..c51d63ac0f 100644 --- a/types/react-router/test/examples-from-react-router-website/ModalGallery.tsx +++ b/types/react-router/test/examples-from-react-router-website/ModalGallery.tsx @@ -114,10 +114,6 @@ const Gallery = () => ( ); const ImageView: React.SFC> = ({ match }) => { - if (!match) { - return null; - } - const image = IMAGES[parseInt(match.params.id, 10)]; if (!image) { return
    Image not found
    ; @@ -132,10 +128,6 @@ const ImageView: React.SFC> = ({ match }) => }; const Modal: React.SFC> = ({ match, history }) => { - if (!match) { - return null; - } - const image = IMAGES[parseInt(match.params.id, 10)]; if (!image) { return null; diff --git a/types/react-router/test/examples-from-react-router-website/Params.tsx b/types/react-router/test/examples-from-react-router-website/Params.tsx index 801a889d79..a6d0bded7f 100644 --- a/types/react-router/test/examples-from-react-router-website/Params.tsx +++ b/types/react-router/test/examples-from-react-router-website/Params.tsx @@ -22,7 +22,7 @@ const ParamsExample = () => ( ); -const Child: React.SFC> = ({ match }) => match && ( +const Child: React.SFC> = ({ match }) => (

    ID: {match.params.id}

    diff --git a/types/react-router/test/examples-from-react-router-website/Recursive.tsx b/types/react-router/test/examples-from-react-router-website/Recursive.tsx index 9489d2fb25..534fe52931 100644 --- a/types/react-router/test/examples-from-react-router-website/Recursive.tsx +++ b/types/react-router/test/examples-from-react-router-website/Recursive.tsx @@ -39,10 +39,6 @@ interface InitialPersonProps { type PersonProps = RouteComponentProps<{ id: string }>; const Person: React.SFC = ({ match }) => { - if (!match) { - return null; - } - const person = find(match.params.id); return ( From c2367fab52cf48fafa9daa915f0714a81d3c122f Mon Sep 17 00:00:00 2001 From: Ferdy Budhidharma Date: Tue, 11 Dec 2018 22:57:32 -0600 Subject: [PATCH 548/608] [react] allow weaker prop declarations for nullish properties (#31280) * feat(react): allow weaker prop declarations for nullish properties * fix tests --- types/prop-types/index.d.ts | 16 ++++++++------ types/prop-types/prop-types-tests.ts | 31 ++++++++++------------------ types/react/index.d.ts | 16 ++++++++++---- types/react/test/tsx.tsx | 25 ++++++++++++++++++++++ 4 files changed, 58 insertions(+), 30 deletions(-) diff --git a/types/prop-types/index.d.ts b/types/prop-types/index.d.ts index b6918d9d44..5f95d354dd 100644 --- a/types/prop-types/index.d.ts +++ b/types/prop-types/index.d.ts @@ -5,11 +5,15 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 +export type ReactComponentLike = + | string + | ((props: any, context?: any) => any) + | (new (props: any, context?: any) => any); + export interface ReactElementLike { - type: string | ((...args: any[]) => ReactElementLike); + type: ReactComponentLike; props: any; key: string | number | null; - children?: ReactNodeLike; } export interface ReactNodeArray extends Array {} @@ -28,9 +32,9 @@ export const nominalTypeHack: unique symbol; export type IsOptional = undefined | null extends T ? true : undefined extends T ? true : null extends T ? true : false; -export type RequiredKeys = { [K in keyof V]: V[K] extends Validator ? IsOptional extends true ? never : K : never }[keyof V]; +export type RequiredKeys = { [K in keyof V]-?: Exclude extends Validator ? IsOptional extends true ? never : K : never }[keyof V]; export type OptionalKeys = Exclude>; -export type InferPropsInner = { [K in keyof V]: InferType; }; +export type InferPropsInner = { [K in keyof V]-?: InferType; }; export interface Validator { (props: object, propName: string, componentName: string, location: string, propFullName: string): Error | null; @@ -45,8 +49,8 @@ export type ValidationMap = { [K in keyof T]?: Validator }; export type InferType = V extends Validator ? T : any; export type InferProps = - & (RequiredKeys extends undefined ? {} : InferPropsInner>>) - & (OptionalKeys extends undefined ? {} : Partial>>>); + & InferPropsInner>> + & Partial>>>; export const any: Requireable; export const array: Requireable; diff --git a/types/prop-types/prop-types-tests.ts b/types/prop-types/prop-types-tests.ts index a9bde3af00..baf210fdeb 100644 --- a/types/prop-types/prop-types-tests.ts +++ b/types/prop-types/prop-types-tests.ts @@ -129,35 +129,26 @@ type ExtractedPartialProps = PropTypes.InferProps; type ExtractedPropsWithoutAnnotation = PropTypes.InferProps; type ExtractedPropsFromOuterPropsWithoutAnnotation = PropTypes.InferProps['props']; -// $ExpectType: true +// $ExpectType true type ExtractPropsMatch = ExtractedProps extends ExtractedPropsWithoutAnnotation ? true : false; -// $ExpectType: true +// $ExpectType true type ExtractPropsMatch2 = ExtractedPropsWithoutAnnotation extends ExtractedProps ? true : false; -// $ExpectType: true +// $ExpectType true type ExtractPropsMatch3 = ExtractedProps extends Props ? true : false; -// $ExpectType: true +// $ExpectType true type ExtractPropsMatch4 = Props extends ExtractedPropsWithoutAnnotation ? true : false; -// $ExpectType: true +// $ExpectType true type ExtractFromOuterPropsMatch = ExtractedPropsFromOuterProps extends ExtractedPropsFromOuterPropsWithoutAnnotation ? true : false; -// $ExpectType: true +// $ExpectType true type ExtractFromOuterPropsMatch2 = ExtractedPropsFromOuterPropsWithoutAnnotation extends ExtractedPropsFromOuterProps ? true : false; -// $ExpectType: true +// $ExpectType true type ExtractFromOuterPropsMatch3 = ExtractedPropsFromOuterProps extends Props ? true : false; -// $ExpectType: true +// $ExpectType true type ExtractFromOuterPropsMatch4 = Props extends ExtractedPropsFromOuterPropsWithoutAnnotation ? true : false; -// $ExpectType: false +// $ExpectType false type ExtractPropsMismatch = ExtractedPartialProps extends Props ? true : false; -// $ExpectType: {} -type UnmatchedPropKeys = Pick>; -// $ExpectType: {} -type UnmatchedPropKeys2 = Pick>; - PropTypes.checkPropTypes({ xs: PropTypes.array }, { xs: [] }, 'location', 'componentName'); // This would be the type that JSX sees @@ -189,7 +180,7 @@ const componentDefaultProps = { type DefaultizedProps = Defaultize, typeof componentDefaultProps>; type UndefaultizedProps = Undefaultize, typeof componentDefaultProps>; -// $ExpectType: true +// $ExpectType true type DefaultizedPropsTest = { fi?: (...args: any[]) => any; foo?: string | null; @@ -197,7 +188,7 @@ type DefaultizedPropsTest = { baz?: boolean | null; bat?: ReactNode; } extends DefaultizedProps ? true : false; -// $ExpectType: true +// $ExpectType true type UndefaultizedPropsTest = { fi: (...args: any[]) => any; foo?: string | null; diff --git a/types/react/index.d.ts b/types/react/index.d.ts index 4f6e7c174b..b9a460095a 100644 --- a/types/react/index.d.ts +++ b/types/react/index.d.ts @@ -298,7 +298,7 @@ declare namespace React { } interface ProviderExoticComponent

    extends ExoticComponent

    { - propTypes?: ValidationMap

    ; + propTypes?: WeakValidationMap

    ; } type ContextType> = C extends Context ? T : never; @@ -461,7 +461,7 @@ declare namespace React { interface FunctionComponent

    { (props: P & { children?: ReactNode }, context?: any): ReactElement | null; - propTypes?: ValidationMap

    ; + propTypes?: WeakValidationMap

    ; contextTypes?: ValidationMap; defaultProps?: Partial

    ; displayName?: string; @@ -469,7 +469,7 @@ declare namespace React { interface RefForwardingComponent { (props: P & { children?: ReactNode }, ref: Ref | null): ReactElement | null; - propTypes?: ValidationMap

    ; + propTypes?: WeakValidationMap

    ; contextTypes?: ValidationMap; defaultProps?: Partial

    ; displayName?: string; @@ -477,7 +477,7 @@ declare namespace React { interface ComponentClass

    extends StaticLifecycle { new (props: P, context?: any): Component; - propTypes?: ValidationMap

    ; + propTypes?: WeakValidationMap

    ; contextType?: Context; contextTypes?: ValidationMap; childContextTypes?: ValidationMap; @@ -2558,6 +2558,14 @@ declare namespace React { type ValidationMap = PropTypes.ValidationMap; + type WeakValidationMap = { + [K in keyof T]?: null extends T[K] + ? Validator + : undefined extends T[K] + ? Validator + : Validator + }; + interface ReactPropTypes { any: typeof PropTypes.any; array: typeof PropTypes.array; diff --git a/types/react/test/tsx.tsx b/types/react/test/tsx.tsx index 60fcb6dccc..9309799de7 100644 --- a/types/react/test/tsx.tsx +++ b/types/react/test/tsx.tsx @@ -345,3 +345,28 @@ declare global { } const CustomElement2: React.ReactType = 'my-declared-element'; + +interface TestPropTypesProps { + foo: string; +} +interface TestPropTypesProps1 { + foo?: string; +} +interface TestPropTypesProps2 { + foo: string | null; +} +interface TestPropTypesProps3 { + foo?: string | null; +} +const testPropTypes = { + foo: PropTypes.string +}; +type DeclaredPropTypes

    = Required['propTypes'], undefined>>; +// $ExpectType false +type propTypesTest = typeof testPropTypes extends DeclaredPropTypes ? true : false; +// $ExpectType true +type propTypesTest1 = typeof testPropTypes extends DeclaredPropTypes ? true : false; +// $ExpectType true +type propTypesTest2 = typeof testPropTypes extends DeclaredPropTypes ? true : false; +// $ExpectType true +type propTypesTest3 = typeof testPropTypes extends DeclaredPropTypes ? true : false; From 4b54a710074b94bbce5df1359781fc853b50293c Mon Sep 17 00:00:00 2001 From: Maninder Singh Date: Wed, 12 Dec 2018 11:21:14 +0530 Subject: [PATCH 549/608] Add UT to test updated DOM walker's guard property --- types/ckeditor/ckeditor-tests.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/ckeditor/ckeditor-tests.ts b/types/ckeditor/ckeditor-tests.ts index 6a0b50a4d8..31c658b801 100644 --- a/types/ckeditor/ckeditor-tests.ts +++ b/types/ckeditor/ckeditor-tests.ts @@ -369,6 +369,7 @@ function test_dom_walker() { node = walker.lastForward(); node = walker.next(); node = walker.previous(); + isSomething = walker.guard(node, true); walker.reset(); isSomething = CKEDITOR.dom.walker.blockBoundary({ div: 1 })(node); From e355f9a29f395b74f9a0dad004ada8dec064744a Mon Sep 17 00:00:00 2001 From: Maninder Singh Date: Wed, 12 Dec 2018 11:39:59 +0530 Subject: [PATCH 550/608] Fix lint error for CKEditor --- types/ckeditor/ckeditor-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/ckeditor/ckeditor-tests.ts b/types/ckeditor/ckeditor-tests.ts index 31c658b801..7e224ab683 100644 --- a/types/ckeditor/ckeditor-tests.ts +++ b/types/ckeditor/ckeditor-tests.ts @@ -486,7 +486,7 @@ function test_dialog() { { id: 'tab-basic', label: 'Basic Settings', - elements: [] + elements: [] as any [] }, { id: 'tab-adv', From 99660a8fe88955123b5f9de299d0cd9667854f57 Mon Sep 17 00:00:00 2001 From: Forzoom MBP Date: Wed, 12 Dec 2018 15:08:21 +0800 Subject: [PATCH 551/608] fix: add cancel/fail callback in ChooseWXPayConfig --- types/wx-js-sdk-dt/index.d.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/types/wx-js-sdk-dt/index.d.ts b/types/wx-js-sdk-dt/index.d.ts index cefc43887f..f47b3d815a 100644 --- a/types/wx-js-sdk-dt/index.d.ts +++ b/types/wx-js-sdk-dt/index.d.ts @@ -162,7 +162,7 @@ declare namespace wx { /** * 获取“分享到QQ空间”按钮点击状态及自定义分享内容接口 */ - function onMenuShareQzone(config: MenuShareWeibo): void; + function onMenuShareQZone(config: MenuShareWeibo): void; interface ChooseImageConfig { /** @@ -617,6 +617,14 @@ declare namespace wx { * 支付成功后的回调函数 */ success(res: any): void; + /** + * 支付取消后的回调函数 + */ + cancel(res: any): void; + /** + * 支付失败后的回调函数 + */ + fail(res: any): void; } /** From 01a9879e3802bf48f3ae476abc6016cfab7cd29c Mon Sep 17 00:00:00 2001 From: Forzoom MBP Date: Wed, 12 Dec 2018 15:22:15 +0800 Subject: [PATCH 552/608] fix: set optional. edit test. --- types/wx-js-sdk-dt/index.d.ts | 4 ++-- types/wx-js-sdk-dt/wx-js-sdk-dt-tests.ts | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/types/wx-js-sdk-dt/index.d.ts b/types/wx-js-sdk-dt/index.d.ts index f47b3d815a..3f09527450 100644 --- a/types/wx-js-sdk-dt/index.d.ts +++ b/types/wx-js-sdk-dt/index.d.ts @@ -620,11 +620,11 @@ declare namespace wx { /** * 支付取消后的回调函数 */ - cancel(res: any): void; + cancel?(res: any): void; /** * 支付失败后的回调函数 */ - fail(res: any): void; + fail?(res: any): void; } /** diff --git a/types/wx-js-sdk-dt/wx-js-sdk-dt-tests.ts b/types/wx-js-sdk-dt/wx-js-sdk-dt-tests.ts index deeb753b29..212c9a79c1 100644 --- a/types/wx-js-sdk-dt/wx-js-sdk-dt-tests.ts +++ b/types/wx-js-sdk-dt/wx-js-sdk-dt-tests.ts @@ -61,7 +61,9 @@ wx.chooseWXPay({ nonceStr: '', package: '', paySign: '', - success: (res) => {} + success: (res) => {}, + cancel: (res) => {}, + fail: (res) => {} }); wx.getLocation({ From 354829f2f744b1d8968ac0ca715190e399aef0b8 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sat, 8 Dec 2018 12:39:23 +0100 Subject: [PATCH 553/608] Add types for experimental worker_threads module --- types/node/index.d.ts | 125 +++++++++++++++++++++++++++++++++++++++ types/node/node-tests.ts | 51 ++++++++++++++++ 2 files changed, 176 insertions(+) diff --git a/types/node/index.d.ts b/types/node/index.d.ts index b9edae0587..9b93fe213a 100644 --- a/types/node/index.d.ts +++ b/types/node/index.d.ts @@ -1618,6 +1618,131 @@ declare module "cluster" { function eventNames(): string[]; } +declare module "worker_threads" { + import { EventEmitter } from "events"; + import { Readable, Writable } from "stream"; + + const isMainThread: boolean; + const parentPort: null | MessagePort; + const threadId: number; + const workerData: any; + + class MessageChannel { + readonly port1: MessagePort; + readonly port2: MessagePort; + } + + class MessagePort extends EventEmitter { + close(): void; + postMessage(value: any, transferList?: Array): void; + ref(): void; + unref(): void; + start(): void; + + addListener(event: "close", listener: () => void): this; + addListener(event: "message", listener: (value: any) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "close"): boolean; + emit(event: "message", value: any): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "close", listener: () => void): this; + on(event: "message", listener: (value: any) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "close", listener: () => void): this; + once(event: "message", listener: (value: any) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "close", listener: () => void): this; + prependListener(event: "message", listener: (value: any) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "message", listener: (value: any) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + + removeListener(event: "close", listener: () => void): this; + removeListener(event: "message", listener: (value: any) => void): this; + removeListener(event: string | symbol, listener: (...args: any[]) => void): this; + + off(event: "close", listener: () => void): this; + off(event: "message", listener: (value: any) => void): this; + off(event: string | symbol, listener: (...args: any[]) => void): this; + } + + interface WorkerOptions { + eval?: boolean; + workerData?: any; + stdin?: boolean; + stdout?: boolean; + stderr?: boolean; + } + + class Worker extends EventEmitter { + readonly stdin: Writable | null; + readonly stdout: Readable; + readonly stderr: Readable; + readonly threadId: number; + + constructor(filename: string, options?: WorkerOptions); + + postMessage(value: any, transferList?: Array): void; + ref(): void; + unref(): void; + terminate(callback?: (err: any, exitCode: number) => void): void; + + addListener(event: "error", listener: (err: any) => void): this; + addListener(event: "exit", listener: (exitCode: number) => void): this; + addListener(event: "message", listener: (value: any) => void): this; + addListener(event: "online", listener: () => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "error", err: any): boolean; + emit(event: "exit", exitCode: number): boolean; + emit(event: "message", value: any): boolean; + emit(event: "online"): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "error", listener: (err: any) => void): this; + on(event: "exit", listener: (exitCode: number) => void): this; + on(event: "message", listener: (value: any) => void): this; + on(event: "online", listener: () => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "error", listener: (err: any) => void): this; + once(event: "exit", listener: (exitCode: number) => void): this; + once(event: "message", listener: (value: any) => void): this; + once(event: "online", listener: () => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "error", listener: (err: any) => void): this; + prependListener(event: "exit", listener: (exitCode: number) => void): this; + prependListener(event: "message", listener: (value: any) => void): this; + prependListener(event: "online", listener: () => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "error", listener: (err: any) => void): this; + prependOnceListener(event: "exit", listener: (exitCode: number) => void): this; + prependOnceListener(event: "message", listener: (value: any) => void): this; + prependOnceListener(event: "online", listener: () => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + + removeListener(event: "error", listener: (err: any) => void): this; + removeListener(event: "exit", listener: (exitCode: number) => void): this; + removeListener(event: "message", listener: (value: any) => void): this; + removeListener(event: "online", listener: () => void): this; + removeListener(event: string | symbol, listener: (...args: any[]) => void): this; + + off(event: "error", listener: (err: any) => void): this; + off(event: "exit", listener: (exitCode: number) => void): this; + off(event: "message", listener: (value: any) => void): this; + off(event: "online", listener: () => void): this; + off(event: string | symbol, listener: (...args: any[]) => void): this; + } +} + declare module "zlib" { import * as stream from "stream"; diff --git a/types/node/node-tests.ts b/types/node/node-tests.ts index c0f80728fc..a638f0fee8 100644 --- a/types/node/node-tests.ts +++ b/types/node/node-tests.ts @@ -17,6 +17,7 @@ import * as path from "path"; import * as readline from "readline"; import * as childProcess from "child_process"; import * as cluster from "cluster"; +import * as workerThreads from "worker_threads"; import * as os from "os"; import * as vm from "vm"; import * as console2 from "console"; @@ -2932,6 +2933,56 @@ async function asyncStreamPipelineFinished() { } } +////////////////////////////////////////////////////////////////////// +/// worker_threads tests: https://nodejs.org/api/worker_threads.html /// +////////////////////////////////////////////////////////////////////// + +{ + { + if (workerThreads.isMainThread) { + module.exports = async function parseJSAsync(script: string) { + return new Promise((resolve, reject) => { + const worker = new workerThreads.Worker(__filename, { + workerData: script + }); + worker.on('message', resolve); + worker.on('error', reject); + worker.on('exit', (code) => { + if (code !== 0) + reject(new Error(`Worker stopped with exit code ${code}`)); + }); + }); + }; + } else { + const script = workerThreads.workerData; + workerThreads.parentPort.postMessage(script); + } + } + + { + const { port1, port2 } = new workerThreads.MessageChannel(); + port1.on('message', (message) => console.log('received', message)); + port2.postMessage({ foo: 'bar' }); + } + + { + if (workerThreads.isMainThread) { + const worker = new workerThreads.Worker(__filename); + const subChannel = new workerThreads.MessageChannel(); + worker.postMessage({ hereIsYourPort: subChannel.port1 }, [subChannel.port1]); + subChannel.port2.on('message', (value) => { + console.log('received:', value); + }); + } else { + workerThreads.parentPort.once('message', (value) => { + assert(value.hereIsYourPort instanceof MessagePort); + value.hereIsYourPort.postMessage('the worker is sending this'); + value.hereIsYourPort.close(); + }); + } + } +} + //////////////////////////////////////////////////// /// os tests : https://nodejs.org/api/os.html //////////////////////////////////////////////////// From cca60bd5447b1d86d3c296c995c766de7c2ea3d5 Mon Sep 17 00:00:00 2001 From: UrielCh Date: Wed, 12 Dec 2018 10:46:22 +0200 Subject: [PATCH 554/608] Add Document as JQuery.contents() output encapsulated type. (#31296) $('iframe').contents() is a JQuery; --- types/jquery/JQuery.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/jquery/JQuery.d.ts b/types/jquery/JQuery.d.ts index 123fad3b34..78602a2d8b 100644 --- a/types/jquery/JQuery.d.ts +++ b/types/jquery/JQuery.d.ts @@ -2090,7 +2090,7 @@ $( "#frameDemo" ).contents().find( "a" ).css( "background-color", "#BADA55" ); ``` */ - contents(): JQuery; + contents(): JQuery; /** * Bind an event handler to the "contextmenu" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. From 00262b050a466fead06c973b08395b981ac48581 Mon Sep 17 00:00:00 2001 From: Tomas Hubelbauer Date: Wed, 12 Dec 2018 10:08:00 +0100 Subject: [PATCH 555/608] Add movementX and movementY to MouseEvent React now polyfills `movementX` and `movementY`, see facebook/react#6723. --- types/react/index.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/types/react/index.d.ts b/types/react/index.d.ts index b9a460095a..c40df0db5b 100644 --- a/types/react/index.d.ts +++ b/types/react/index.d.ts @@ -1013,6 +1013,8 @@ declare namespace React { */ getModifierState(key: string): boolean; metaKey: boolean; + movementX: number; + movementY: number; nativeEvent: NativeMouseEvent; pageX: number; pageY: number; From 40a1445181572d0f354ce4e81eecf767a94618af Mon Sep 17 00:00:00 2001 From: Andrea Jemmett Date: Wed, 12 Dec 2018 10:33:46 +0100 Subject: [PATCH 556/608] updated universal-router to 7.0.0 --- types/universal-router/index.d.ts | 5 +++-- types/universal-router/universal-router-tests.ts | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/types/universal-router/index.d.ts b/types/universal-router/index.d.ts index eb698fc8bf..8dd2357f03 100644 --- a/types/universal-router/index.d.ts +++ b/types/universal-router/index.d.ts @@ -1,8 +1,9 @@ -// Type definitions for universal-router 6.0 +// Type definitions for universal-router 7.0 // Project: https://github.com/kriasoft/universal-router // Definitions by: Jack Moore // Tomek Łaziuk // Lodin +// acidghost // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -101,7 +102,7 @@ export interface Options { context?: C; baseUrl?: string; resolveRoute?: (context: ActionContext & C, params: Params) => any; - errorHandler?: (error: Error & { context: C, code: number }) => any; + errorHandler?: (error: Error & { status: number }, context: C) => any; } /** diff --git a/types/universal-router/universal-router-tests.ts b/types/universal-router/universal-router-tests.ts index 02c79fb062..40b5ac32c1 100644 --- a/types/universal-router/universal-router-tests.ts +++ b/types/universal-router/universal-router-tests.ts @@ -12,10 +12,10 @@ new UniversalRouter( user: 'name', }, baseUrl: '/base', - errorHandler: (error) => { + errorHandler: (error, context) => { console.error(error); - console.dir(error.context); - return error.code === 404 + console.dir(context); + return error.status === 404 ? '

    Page Not Found

    ' : '

    Oops! Something went wrong

    '; }, From c73305cc54f9ad601b68cd9289f127671de01cd8 Mon Sep 17 00:00:00 2001 From: Pascal Sthamer Date: Wed, 12 Dec 2018 12:42:20 +0100 Subject: [PATCH 557/608] Include container.stats types --- types/dockerode/index.d.ts | 83 +++++++++++++++++++++++++++++++++++++- 1 file changed, 81 insertions(+), 2 deletions(-) diff --git a/types/dockerode/index.d.ts b/types/dockerode/index.d.ts index d823c46fe4..6a988ba5c2 100644 --- a/types/dockerode/index.d.ts +++ b/types/dockerode/index.d.ts @@ -470,7 +470,7 @@ declare namespace Dockerode { GlobalIPv6Address: string; GlobalIPv6PrefixLen: number; MacAddress: string; - } + }; }; Node?: { ID: string; @@ -480,10 +480,89 @@ declare namespace Dockerode { Cpus: number; Memory: number; Labels: any; - } + }; }; } + + interface NetworkStats { + [name: string]: { + rx_bytes: number; + rx_dropped: number; + rx_errors: number; + rx_packets: number; + tx_bytes: number; + tx_dropped: number; + tx_errors: number; + tx_packets: number; + }; + } + interface CPUStats { + cpu_usage: { + percpu_usage: Array; + usage_in_usermode: number; + total_usage: number; + usage_in_kernelmode: number; + }; + system_cpu_usage: number; + online_cpus: number; + throttling_data: { + periods: number; + throttled_periods: number; + throttled_time: number; + }; + } + + interface MemoryStats { + stats: { + total_pgmajfault: number; + cache: number; + mapped_file: number; + total_inactive_file: number; + pgpgout: number; + rss: number; + total_mapped_file: number; + writeback: number; + unevictable: number; + pgpgin: number; + total_unevictable: number; + pgmajfault: number; + total_rss: number; + total_rss_huge: number; + total_writeback: number; + total_inactive_anon: number; + rss_huge: number; + hierarchical_memory_limit: number; + total_pgfault: number; + total_active_file: number; + active_anon: number; + total_active_anon: number; + total_pgpgout: number; + total_cache: number; + inactive_anon: number; + active_file: number; + pgfault: number; + inactive_file: number; + total_pgpgin: number; + }; + max_usage: number; + usage: number; + failcnt: number; + limit: number; + } + + interface ContainerStats { + read: string; + pid_stats: { + current: number; + }; + networks: NetworkStats; + memory_stats: MemoryStats; + blkio_stats: {}; + cpu_stats: CPUStats; + precpu_stats: CPUStats; + } + interface HostConfig { AutoRemove: boolean; Binds: string[]; From cea66cd28fc108a0328b8c9b407007c6ac9aa2f8 Mon Sep 17 00:00:00 2001 From: Pascal Sthamer Date: Wed, 12 Dec 2018 12:44:19 +0100 Subject: [PATCH 558/608] Forgot to update return types --- types/dockerode/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/dockerode/index.d.ts b/types/dockerode/index.d.ts index 6a988ba5c2..1dd099f1c3 100644 --- a/types/dockerode/index.d.ts +++ b/types/dockerode/index.d.ts @@ -109,9 +109,9 @@ declare namespace Dockerode { logs(callback: Callback): void; logs(options?: ContainerLogsOptions): Promise; - stats(options: {}, callback: Callback): void; - stats(callback: Callback): void; - stats(options?: {}): Promise; + stats(options: {}, callback: Callback): void; + stats(callback: Callback): void; + stats(options?: {}): Promise; attach(options: {}, callback: Callback): void; attach(options: {}): Promise; From ba36ee16316092fa2e83c2ec70b658c37a19db1e Mon Sep 17 00:00:00 2001 From: Pascal Sthamer Date: Wed, 12 Dec 2018 12:53:43 +0100 Subject: [PATCH 559/608] Fix tslint error --- types/dockerode/index.d.ts | 152 ++++++++++++++++++------------------- 1 file changed, 76 insertions(+), 76 deletions(-) diff --git a/types/dockerode/index.d.ts b/types/dockerode/index.d.ts index 1dd099f1c3..694cc295b4 100644 --- a/types/dockerode/index.d.ts +++ b/types/dockerode/index.d.ts @@ -483,86 +483,86 @@ declare namespace Dockerode { }; }; } - + interface NetworkStats { - [name: string]: { - rx_bytes: number; - rx_dropped: number; - rx_errors: number; - rx_packets: number; - tx_bytes: number; - tx_dropped: number; - tx_errors: number; - tx_packets: number; - }; - } + [name: string]: { + rx_bytes: number; + rx_dropped: number; + rx_errors: number; + rx_packets: number; + tx_bytes: number; + tx_dropped: number; + tx_errors: number; + tx_packets: number; + }; + } - interface CPUStats { - cpu_usage: { - percpu_usage: Array; - usage_in_usermode: number; - total_usage: number; - usage_in_kernelmode: number; - }; - system_cpu_usage: number; - online_cpus: number; - throttling_data: { - periods: number; - throttled_periods: number; - throttled_time: number; - }; - } + interface CPUStats { + cpu_usage: { + percpu_usage: number[]; + usage_in_usermode: number; + total_usage: number; + usage_in_kernelmode: number; + }; + system_cpu_usage: number; + online_cpus: number; + throttling_data: { + periods: number; + throttled_periods: number; + throttled_time: number; + }; + } - interface MemoryStats { - stats: { - total_pgmajfault: number; - cache: number; - mapped_file: number; - total_inactive_file: number; - pgpgout: number; - rss: number; - total_mapped_file: number; - writeback: number; - unevictable: number; - pgpgin: number; - total_unevictable: number; - pgmajfault: number; - total_rss: number; - total_rss_huge: number; - total_writeback: number; - total_inactive_anon: number; - rss_huge: number; - hierarchical_memory_limit: number; - total_pgfault: number; - total_active_file: number; - active_anon: number; - total_active_anon: number; - total_pgpgout: number; - total_cache: number; - inactive_anon: number; - active_file: number; - pgfault: number; - inactive_file: number; - total_pgpgin: number; - }; - max_usage: number; - usage: number; - failcnt: number; - limit: number; - } + interface MemoryStats { + stats: { + total_pgmajfault: number; + cache: number; + mapped_file: number; + total_inactive_file: number; + pgpgout: number; + rss: number; + total_mapped_file: number; + writeback: number; + unevictable: number; + pgpgin: number; + total_unevictable: number; + pgmajfault: number; + total_rss: number; + total_rss_huge: number; + total_writeback: number; + total_inactive_anon: number; + rss_huge: number; + hierarchical_memory_limit: number; + total_pgfault: number; + total_active_file: number; + active_anon: number; + total_active_anon: number; + total_pgpgout: number; + total_cache: number; + inactive_anon: number; + active_file: number; + pgfault: number; + inactive_file: number; + total_pgpgin: number; + }; + max_usage: number; + usage: number; + failcnt: number; + limit: number; + } + + interface ContainerStats { + read: string; + pid_stats: { + current: number; + }; + networks: NetworkStats; + memory_stats: MemoryStats; + blkio_stats: {}; + cpu_stats: CPUStats; + precpu_stats: CPUStats; + } - interface ContainerStats { - read: string; - pid_stats: { - current: number; - }; - networks: NetworkStats; - memory_stats: MemoryStats; - blkio_stats: {}; - cpu_stats: CPUStats; - precpu_stats: CPUStats; - } - interface HostConfig { AutoRemove: boolean; Binds: string[]; From e7be2c68faaa2e54aba9c7d795b12a6fdfd20491 Mon Sep 17 00:00:00 2001 From: Harald Korneliussen Date: Wed, 12 Dec 2018 12:59:51 +0100 Subject: [PATCH 560/608] When filterAll is set, filterMethod must be a function that takes and returns any[] --- types/react-table/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-table/index.d.ts b/types/react-table/index.d.ts index 1afb6eb0fd..42d09c4338 100644 --- a/types/react-table/index.d.ts +++ b/types/react-table/index.d.ts @@ -23,7 +23,7 @@ export type ComponentPropsGetterC = (finalState: any, rowInfo?: undefined, colum export type ComponentPropsGetterRC = (finalState: any, rowInfo?: RowInfo, column?: Column, instance?: any) => object | undefined; export type DefaultFilterFunction = (filter: Filter, row: any, column: any) => boolean; -export type FilterFunction = (filter: Filter, rows: any[], column: any) => boolean; +export type FilterFunction = (filter: Filter, rows: any[], column: any) => any[]; export type SubComponentFunction = (rowInfo: RowInfo) => React.ReactNode; export type PageChangeFunction = (page: number) => void; export type PageSizeChangeFunction = (newPageSize: number, newPage: number) => void; From 58ef6155a84a1bba50fc5ff9e68e7d363c05c8ef Mon Sep 17 00:00:00 2001 From: Sebastian Greaves Date: Wed, 12 Dec 2018 12:03:51 +0000 Subject: [PATCH 561/608] Update changes missed with the 0.42.0 fix --- types/slate-react/index.d.ts | 13 ++--- types/slate/index.d.ts | 101 +++-------------------------------- 2 files changed, 10 insertions(+), 104 deletions(-) diff --git a/types/slate-react/index.d.ts b/types/slate-react/index.d.ts index 540316befc..30e54f2a02 100644 --- a/types/slate-react/index.d.ts +++ b/types/slate-react/index.d.ts @@ -6,7 +6,7 @@ // Patrick Sachs // Brandon Shelton // Irwan Fario Subastian -// Sebastian Greaves +// Hanna Greaves // Francesco Agnoletto // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -18,8 +18,7 @@ import { Block, Inline, Operations, - Schema, - Stack, + SchemaProperties, Value, Operation, MarkProperties, @@ -112,7 +111,7 @@ export interface BasicEditorProps { plugins?: Plugin[]; readOnly?: boolean; role?: string; - schema?: Schema; + schema?: SchemaProperties; spellCheck?: boolean; style?: React.CSSProperties; tabIndex?: number; @@ -121,15 +120,11 @@ export interface BasicEditorProps { export type EditorProps = BasicEditorProps & Plugin; export interface EditorState { - schema: Schema; value: Value; - stack: Stack; } export class Editor extends React.Component implements Controller { controller: CoreEditor; - schema: Schema; - stack: Stack; readonly plugins: Plugin[]; readonly operations: Immutable.List; @@ -137,7 +132,7 @@ export class Editor extends React.Component implements readonly value: Value; // Instance methods - resolveController(plugins: Plugin[], schema: Schema, commands: any[], queries: any[]): void; + resolveController(plugins: Plugin[], schema: SchemaProperties, commands: any[], queries: any[]): void; // Controller addMark: CoreEditor['addMark']; diff --git a/types/slate/index.d.ts b/types/slate/index.d.ts index 9ee697cb43..6eb42ec623 100644 --- a/types/slate/index.d.ts +++ b/types/slate/index.d.ts @@ -53,39 +53,10 @@ export interface SchemaProperties { inlines?: RulesByNodeType; } -export class Schema extends Immutable.Record({}) { - stack: Stack; - rules: Rules[]; - - static create(properties: SchemaProperties | Schema): Schema; - static fromJSON(object: SchemaProperties): Schema; - static fromJS(object: SchemaProperties): Schema; - static isSchema(maybeSchema: any): maybeSchema is Schema; - - validateNode(node: Node): Error | void; - testNode(node: Node): boolean; - assertNode(node: Node): boolean; - getNodeRules(node: Node): any[]; - isVoid(node: Node): boolean; - isAtomic(mark: Mark): boolean; - normalizeNode(node: Node): () => void; - testRules(object: any, rules: object | any[]): boolean; - validateRules( - object: any, - rule: object | any[], - rules: any[] | null, - options?: object - ): Error | void; - - toJSON(): SchemaProperties; - toJS(): SchemaProperties; -} - export interface ValueProperties { document?: Document; selection?: Selection; history?: History; - schema?: Schema; data?: Data; decorations?: Immutable.List | null; } @@ -94,7 +65,6 @@ export interface ValueJSON { document?: DocumentJSON; selection?: Selection; history?: History; - schema?: Schema; data?: Data; decorations?: Immutable.List | null; object?: "value"; @@ -106,7 +76,6 @@ export class Value extends Immutable.Record({}) { document: Document; selection: Selection; history: History; - schema: Schema; data: Data; object: "value"; decorations: Immutable.List; @@ -350,9 +319,6 @@ export class Text extends Immutable.Record({}) { ): Text; splitText(offset: number): Text[]; mergeText(text: Text): Text; - normalize(schema: Schema): () => void | null; - validate(schema: Schema): Error | null; - getFirstInvalidNode(schema: Schema): Text | null; setLeaves(leaves: Immutable.List): Text; } @@ -446,13 +412,13 @@ declare class BaseNode< getChild(path: Path): Node | null; getClosestBlock(path: Path): Block | null; getClosestInline(path: Path): Inline | null; - getClosestVoid(path: Path, schema: Schema): Node | null; + getClosestVoid(path: Path): Node | null; + getClosestVoid(key: string): Node | null; getClosest(path: Path, iterator: (node: Node) => boolean): Node | null; getCommonAncestor(a: Path, b: Path): Node; - getDecorations(stack: Stack): Immutable.List; + getDecorations(editor: Editor): Immutable.List; getDepth(path: Path, startAt?: number): number; getDescendant(path: Path): Node | null; - getFirstInvalidNode(schema: Schema): Node | null; getFirstText(): Text | null; getFragmentAtRange(range: Range): Document; getFurthest(path: Path, iterator: (node: Node) => boolean): Node | null; @@ -514,7 +480,7 @@ declare class BaseNode< hasInlineChildren(): boolean; hasDescendant(path: Path): boolean; hasNode(path: Path): boolean; - hasVoidParent(path: Path, schema: Schema): boolean; + hasVoidParent(path: Path, editor: Editor): boolean; insertNode(path: Path, node: Node): Node; insertText( path: Path, @@ -528,7 +494,7 @@ declare class BaseNode< mapDescendants(iterator: () => void): Node; mergeNode(path: Path): Node; moveNode(path: Path, newPath: Path, newIndex?: number): Node; - normalize(schema: Schema): () => void | void; + normalize(editor: Editor): () => void | void; refinedNOde(path: Path, key: string): Node | null; refindPath(path: Path, key: string): Immutable.List | null; regenerateKey(): Node; @@ -548,7 +514,7 @@ declare class BaseNode< properties: MarkProperties ): Node; splitNode(path: Path, position: number, properties: NodeProperties): Node; - validate(schema: Schema): Error | void; + validate(editor: Editor): Error | void; } export interface MarkProperties { @@ -914,61 +880,6 @@ export interface Operations { invert: (operation: Operation) => Operation; } -export interface StackProperties { - plugins?: any[]; -} - -export interface StackJSON { - object: "stack"; - plugins: any[]; -} - -export class Stack extends Immutable.Record({}) { - object: "stack"; - plugins: any[]; - - static create(attrs: StackProperties): Stack; - static isStack(maybeStack: any): maybeStack is Stack; - - static fromJSON(properties: StackJSON): Stack; - static fromJS(properties: StackJSON): Stack; - toJSON(options: any): object; -} - -export interface HistoryProperties { - undos?: Operation[]; - redos?: Operation[]; -} - -export interface HistoryJSON { - object: "history"; - undos: any[]; - redos: any[]; -} - -export interface HistoryOptions { - merge?: boolean; - skip?: boolean; -} - -export class History extends Immutable.Record({}) { - redos: Stack; - undos: Stack; - object: "history"; - - static create(attrs: History | HistoryProperties): History; - static createOperationsList( - oeprations?: Immutable.List | Operation[] - ): Immutable.List; - static fromJSON(object: HistoryJSON): History; - static fromJS(object: HistoryJSON): History; - static isHistory(maybeHistory: any): maybeHistory is History; - - save(operation: Operation, options?: HistoryOptions): History; - toJSON(): HistoryJSON; - toJS(): HistoryJSON; -} - export type ErrorCode = | "child_object_invalid" | "child_required" From eb2b63eda667b56b054ac6da2a3eed5e4c840cdb Mon Sep 17 00:00:00 2001 From: Sebastian Greaves Date: Wed, 12 Dec 2018 12:15:06 +0000 Subject: [PATCH 562/608] remove missed history fields --- types/slate/index.d.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/types/slate/index.d.ts b/types/slate/index.d.ts index 6eb42ec623..59e14bcf23 100644 --- a/types/slate/index.d.ts +++ b/types/slate/index.d.ts @@ -56,7 +56,6 @@ export interface SchemaProperties { export interface ValueProperties { document?: Document; selection?: Selection; - history?: History; data?: Data; decorations?: Immutable.List | null; } @@ -64,7 +63,6 @@ export interface ValueProperties { export interface ValueJSON { document?: DocumentJSON; selection?: Selection; - history?: History; data?: Data; decorations?: Immutable.List | null; object?: "value"; @@ -75,7 +73,6 @@ export type Path = Immutable.List | string; export class Value extends Immutable.Record({}) { document: Document; selection: Selection; - history: History; data: Data; object: "value"; decorations: Immutable.List; From ca4eeb2e4aabf70e6925b7654781e5ae5c99931f Mon Sep 17 00:00:00 2001 From: Sebastian Greaves Date: Wed, 12 Dec 2018 12:20:37 +0000 Subject: [PATCH 563/608] combine overloads --- types/slate/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/slate/index.d.ts b/types/slate/index.d.ts index 59e14bcf23..569e2f5835 100644 --- a/types/slate/index.d.ts +++ b/types/slate/index.d.ts @@ -409,7 +409,7 @@ declare class BaseNode< getChild(path: Path): Node | null; getClosestBlock(path: Path): Block | null; getClosestInline(path: Path): Inline | null; - getClosestVoid(path: Path): Node | null; + getClosestVoid(key: string | Path): Node | null; getClosestVoid(key: string): Node | null; getClosest(path: Path, iterator: (node: Node) => boolean): Node | null; getCommonAncestor(a: Path, b: Path): Node; From 8cb6ca37aa6743c91ee2fc99a179e87449cc2876 Mon Sep 17 00:00:00 2001 From: Sebastian Greaves Date: Wed, 12 Dec 2018 12:28:17 +0000 Subject: [PATCH 564/608] delete redundant method --- types/slate/index.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/types/slate/index.d.ts b/types/slate/index.d.ts index 569e2f5835..2538bea6f9 100644 --- a/types/slate/index.d.ts +++ b/types/slate/index.d.ts @@ -410,7 +410,6 @@ declare class BaseNode< getClosestBlock(path: Path): Block | null; getClosestInline(path: Path): Inline | null; getClosestVoid(key: string | Path): Node | null; - getClosestVoid(key: string): Node | null; getClosest(path: Path, iterator: (node: Node) => boolean): Node | null; getCommonAncestor(a: Path, b: Path): Node; getDecorations(editor: Editor): Immutable.List; From 60eb70b81ed4c17ba657d272738884ec2ccbd668 Mon Sep 17 00:00:00 2001 From: Nokky Goren <30292793+ApeNox@users.noreply.github.com> Date: Wed, 12 Dec 2018 14:51:41 +0200 Subject: [PATCH 565/608] rename Options to searchOptions in props This should have been added before, but has been left out --- types/react-places-autocomplete/index.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/types/react-places-autocomplete/index.d.ts b/types/react-places-autocomplete/index.d.ts index 6a6a85c19e..1309211c13 100644 --- a/types/react-places-autocomplete/index.d.ts +++ b/types/react-places-autocomplete/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/kenny-hibino/react-places-autocomplete/ // Definitions by: Guilherme Hübner // Andrew Makarov +// Nokky Goren // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 // @@ -38,7 +39,7 @@ export interface PropTypes { autocompleteItem?: React.CSSProperties; autocompleteItemActive?: React.CSSProperties; }; - options?: { + searchOptions?: { bounds?: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral; componentRestrictions?: google.maps.GeocoderComponentRestrictions; location?: google.maps.LatLng | google.maps.LatLngLiteral; From 84efa71066822fca8efa9155ab1d7a41b637bdc0 Mon Sep 17 00:00:00 2001 From: Pascal Sthamer Date: Wed, 12 Dec 2018 14:05:43 +0100 Subject: [PATCH 566/608] Mount config for creating a container --- types/dockerode/index.d.ts | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/types/dockerode/index.d.ts b/types/dockerode/index.d.ts index 694cc295b4..cd06bc7ebb 100644 --- a/types/dockerode/index.d.ts +++ b/types/dockerode/index.d.ts @@ -762,6 +762,38 @@ declare namespace Dockerode { [key: string]: EndpointSettings; } + type MountType = + | "bind" + | "volume" + | "tmpfs"; + + type MountConsistency = + | "default" + | "consistent" + | "cached" + | "delegated"; + + type MountPropagation = + | "private" + | "rprivate" + | "shared" + | "rshared" + | "slave" + | "rslave"; + + interface MountSettings { + Target: string; + Source: string; + Type: MountType; + ReadOnly ?: boolean; + Consistency ?: MountConsistency; + BindOptions ?: { + Propagation: MountPropagation; + }; + } + + type MountConfig = MountSettings[]; + interface ContainerCreateOptions { name?: string; Hostname?: string; @@ -818,6 +850,7 @@ declare namespace Dockerode { DnsSearch?: string[]; ExtraHosts?: any; VolumesFrom?: string[]; + Mounts?: MountConfig; CapAdd?: string[]; CapDrop?: string[]; GroupAdd?: string[]; From f8077c82027918706a453dbb6b1b89b9729dc309 Mon Sep 17 00:00:00 2001 From: Nokky Goren <30292793+ApeNox@users.noreply.github.com> Date: Wed, 12 Dec 2018 15:20:49 +0200 Subject: [PATCH 567/608] update contributor name --- types/react-places-autocomplete/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-places-autocomplete/index.d.ts b/types/react-places-autocomplete/index.d.ts index 1309211c13..e24e479be8 100644 --- a/types/react-places-autocomplete/index.d.ts +++ b/types/react-places-autocomplete/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/kenny-hibino/react-places-autocomplete/ // Definitions by: Guilherme Hübner // Andrew Makarov -// Nokky Goren +// Nokky Goren // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 // From 2fe3bfacc98c62deae1f32e8fe0559e78bd34cf6 Mon Sep 17 00:00:00 2001 From: Jiayu Liu Date: Wed, 12 Dec 2018 22:00:22 +0800 Subject: [PATCH 568/608] update and add scene value type --- types/weixin-app/index.d.ts | 179 ++++++++++++++++++++++++++++++++---- 1 file changed, 161 insertions(+), 18 deletions(-) diff --git a/types/weixin-app/index.d.ts b/types/weixin-app/index.d.ts index 408e434441..b40fedfd46 100644 --- a/types/weixin-app/index.d.ts +++ b/types/weixin-app/index.d.ts @@ -3501,20 +3501,20 @@ declare namespace wx { */ interface InputEvent extends BuiltInEvent< - "input", - { - value: string; - cursor: number; - } - > {} + "input", + { + value: string; + cursor: number; + } + > {} interface FormEvent extends BuiltInEvent< - "form", - { - value: { [name: string]: string | boolean | number }; - } - > {} + "form", + { + value: { [name: string]: string | boolean | number }; + } + > {} interface ScrollEvent extends BuiltInEvent<"scroll", {}> {} @@ -3528,12 +3528,12 @@ declare namespace wx { interface TouchEvent extends BuiltInEvent< - T, - { - x: number; - y: number; - } - > { + T, + { + x: number; + y: number; + } + > { touches: Touch[]; changedTouches: Touch[]; } @@ -4096,6 +4096,79 @@ declare namespace wx { } // #endregion // #region App里的onLaunch、onShow回调参数 + + type SceneValues = + | 1001 + | 1005 + | 1006 + | 1007 + | 1008 + | 1011 + | 1012 + | 1013 + | 1014 + | 1017 + | 1019 + | 1020 + | 1022 + | 1023 + | 1024 + | 1025 + | 1026 + | 1027 + | 1028 + | 1029 + | 1030 + | 1031 + | 1032 + | 1034 + | 1035 + | 1036 + | 1037 + | 1038 + | 1039 + | 1042 + | 1043 + | 1044 + | 1045 + | 1046 + | 1047 + | 1048 + | 1049 + | 1052 + | 1053 + | 1054 + | 1056 + | 1057 + | 1058 + | 1059 + | 1064 + | 1067 + | 1068 + | 1069 + | 1071 + | 1072 + | 1073 + | 1074 + | 1077 + | 1078 + | 1079 + | 1081 + | 1082 + | 1084 + | 1089 + | 1090 + | 1091 + | 1092 + | 1095 + | 1096 + | 1097 + | 1099 + | 1102 + | 1103 + | 1104 + | number; + interface LaunchOptions { /** * 打开小程序的路径 @@ -4107,8 +4180,78 @@ declare namespace wx { query: object; /** * 打开小程序的[场景值](https://mp.weixin.qq.com/debug/wxadoc/dev/framework/app-service/scene.html) + * + * - 1001: 发现栏小程序主入口,「最近使用」列表(基础库2.2.4版本起包含「我的小程序」列表) + * - 1005: 顶部搜索框的搜索结果页 + * - 1006: 发现栏小程序主入口搜索框的搜索结果页 + * - 1007: 单人聊天会话中的小程序消息卡片 + * - 1008: 群聊会话中的小程序消息卡片 + * - 1011: 扫描二维码 + * - 1012: 长按图片识别二维码 + * - 1013: 手机相册选取二维码 + * - 1014: 小程序模板消息 + * - 1017: 前往体验版的入口页 + * - 1019: 微信钱包 + * - 1020: 公众号 profile 页相关小程序列表 + * - 1022: 聊天顶部置顶小程序入口 + * - 1023: 安卓系统桌面图标 + * - 1024: 小程序 profile 页 + * - 1025: 扫描一维码 + * - 1026: 附近小程序列表 + * - 1027: 顶部搜索框搜索结果页「使用过的小程序」列表 + * - 1028: 我的卡包 + * - 1029: 卡券详情页 + * - 1030: 自动化测试下打开小程序 + * - 1031: 长按图片识别一维码 + * - 1032: 手机相册选取一维码 + * - 1034: 微信支付完成页 + * - 1035: 公众号自定义菜单 + * - 1036: App 分享消息卡片 + * - 1037: 小程序打开小程序 + * - 1038: 从另一个小程序返回 + * - 1039: 摇电视 + * - 1042: 添加好友搜索框的搜索结果页 + * - 1043: 公众号模板消息 + * - 1044: 带 shareTicket 的小程序消息卡片 [详情]((转发#获取更多转发信息)) + * - 1045: 朋友圈广告 + * - 1046: 朋友圈广告详情页 + * - 1047: 扫描小程序码 + * - 1048: 长按图片识别小程序码 + * - 1049: 手机相册选取小程序码 + * - 1052: 卡券的适用门店列表 + * - 1053: 搜一搜的结果页 + * - 1054: 顶部搜索框小程序快捷入口 + * - 1056: 音乐播放器菜单 + * - 1057: 钱包中的银行卡详情页 + * - 1058: 公众号文章 + * - 1059: 体验版小程序绑定邀请页 + * - 1064: 微信连Wi-Fi状态栏 + * - 1067: 公众号文章广告 + * - 1068: 附近小程序列表广告 + * - 1069: 移动应用 + * - 1071: 钱包中的银行卡列表页 + * - 1072: 二维码收款页面 + * - 1073: 客服消息列表下发的小程序消息卡片 + * - 1074: 公众号会话下发的小程序消息卡片 + * - 1077: 摇周边 + * - 1078: 连Wi-Fi成功页 + * - 1079: 微信游戏中心 + * - 1081: 客服消息下发的文字链 + * - 1082: 公众号会话下发的文字链 + * - 1084: 朋友圈广告原生页 + * - 1089: 微信聊天主界面下拉,「最近使用」栏(基础库2.2.4版本起包含「我的小程序」栏) + * - 1090: 长按小程序右上角菜单唤出最近使用历史 + * - 1091: 公众号文章商品卡片 + * - 1092: 城市服务入口 + * - 1095: 小程序广告组件 + * - 1096: 聊天记录 + * - 1097: 微信支付签约页 + * - 1099: 页面内嵌插件 + * - 1102: 公众号 profile 页服务预览 + * - 1103: 发现栏小程序主入口,「我的小程序」列表(基础库2.2.4版本起废弃) + * - 1104: 微信聊天主界面下拉,「我的小程序」栏(基础库2.2.4版本起废弃) */ - scene: number; + scene: SceneValues; /** * shareTicket,详见 获取更多[转发信息](https://mp.weixin.qq.com/debug/wxadoc/dev/api/share.html#获取更多转发信息) */ From 6b45c74db0148c612b716bd8fe24a33ce372072a Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Wed, 12 Dec 2018 16:03:11 +0100 Subject: [PATCH 569/608] Update types for proj4 --- types/proj4/index.d.ts | 69 ++++++++++++++++++++++++++++++++------ types/proj4/proj4-tests.ts | 50 ++++++++++++++++++++------- types/proj4/tsconfig.json | 4 +-- 3 files changed, 98 insertions(+), 25 deletions(-) diff --git a/types/proj4/index.d.ts b/types/proj4/index.d.ts index afba494556..d7d4cf1ae5 100644 --- a/types/proj4/index.d.ts +++ b/types/proj4/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for proj4 2.3 +// Type definitions for proj4 2.5 // Project: https://github.com/proj4js/proj4js // Definitions by: Denis Carriere +// BendingBender // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace proj4 { @@ -21,9 +22,9 @@ declare namespace proj4 { ep2: number; } - interface Static { - forward(coordinates: TemplateCoordinates): number[]; - inverse(coordinates: TemplateCoordinates): number[]; + interface Converter { + forward(coordinates: T): T; + inverse(coordinates: T): T; } interface InterfaceProjection { @@ -38,6 +39,39 @@ declare namespace proj4 { inverse(coordinates: TemplateCoordinates): number[]; } + interface ProjectionDefinition { + title: string; + projName?: string; + ellps?: string; + datum?: string; + datumName?: string; + rf?: number; + lat0?: number; + lat1?: number; + lat2?: number; + lat_ts?: number; + long0?: number; + long1?: number; + long2?: number; + alpha?: number; + longc?: number; + x0?: number; + y0?: number; + k0?: number; + a?: number; + b?: number; + R_A?: true; + zone?: number; + utmSouth?: true; + datum_params?: string | number[]; + to_meter?: number; + units?: string; + from_greenwich?: number; + datumCode?: string; + natGrids?: string; + axis?: string; + } + const defaultDatum: string; function Proj(srsCode: any, callback?: any): InterfaceProjection; @@ -45,23 +79,38 @@ declare namespace proj4 { const WGS84: any; /** - * Depecrated v3 + * @deprecated v3 */ function Point(x: number, y: number, z?: number): InterfaceCoordinates; function Point(coordinates: TemplateCoordinates | string): InterfaceCoordinates; function toPoint(array: number[]): InterfaceCoordinates; - function defs(name: string, projection?: string): any; - function defs(name: string[][]): any; + function defs(name: string, projection: string | ProjectionDefinition): void; + function defs(name: string[][]): undefined[]; + function defs(name: string): ProjectionDefinition; - function transform(source: InterfaceProjection, dest: InterfaceProjection, point: TemplateCoordinates): any; + function transform( + source: InterfaceProjection, + dest: InterfaceProjection, + point: TemplateCoordinates + ): any; function mgrs(coordinates: number[], accuracy: number): string; const version: string; } -declare function proj4(fromProjection: string, toProjection?: string, coordinates?: proj4.TemplateCoordinates): proj4.Static; -declare function proj4(fromProjection: string, coordinates: proj4.TemplateCoordinates): number[]; +declare function proj4(fromProjection: string, toProjection?: string): proj4.Converter; +declare function proj4( + toProjection: string, + coordinates: T +): T; +declare function proj4( + fromProjection: string, + toProjection: string, + coordinates: T +): T; + export = proj4; +export as namespace proj4; diff --git a/types/proj4/proj4-tests.ts b/types/proj4/proj4-tests.ts index 3d1ab1ab9b..7df09014db 100644 --- a/types/proj4/proj4-tests.ts +++ b/types/proj4/proj4-tests.ts @@ -3,31 +3,55 @@ import proj4 = require('proj4'); /////////////////////////////////////////// // Tests data initialisation /////////////////////////////////////////// -const name = 'WGS84'; const epsg = { 4269: '+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees', 4326: '+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees', }; -const point1 = [-71, 41]; -const point2 = {x: 2, y: 5}; -const mgrs = "24XWT783908"; +const firstProjection = epsg[4269]; +const secondProjection = epsg[4326]; + +const pointArr = [-71, 41]; +const pointObj = { x: 2, y: 5 }; /////////////////////////////////////////// // Tests Measurement /////////////////////////////////////////// -proj4(epsg['4269'], epsg['4326'], point1); -proj4(epsg['4269'], point1); -proj4(epsg['4269'], epsg['4326']).forward(point2); -proj4(epsg['4269'], epsg['4326']).inverse(point2); +proj4(firstProjection, secondProjection, pointArr); +proj4(firstProjection, pointArr); + +// $ExpectType number[] +proj4(firstProjection, secondProjection, pointArr); +// $ExpectType { x: number; y: number; } +proj4(firstProjection, secondProjection, pointObj); + +// $ExpectType number[] +proj4(firstProjection, pointArr); +// $ExpectType { x: number; y: number; } +proj4(firstProjection, pointObj); + +// $ExpectType Converter +proj4(firstProjection, secondProjection); +// $ExpectType Converter +proj4(firstProjection); + +// $ExpectType number[] +proj4(firstProjection, secondProjection).forward(pointArr); +// $ExpectType { x: number; y: number; } +proj4(firstProjection, secondProjection).forward(pointObj); +// $ExpectType number[] +proj4(firstProjection, secondProjection).inverse(pointArr); +// $ExpectType { x: number; y: number; } +proj4(firstProjection, secondProjection).inverse(pointObj); /////////////////////////////////// // Named Projections /////////////////////////////////// -proj4.defs('WGS84', epsg['4326']); -proj4.defs([ - ['EPSG:4326', epsg['4326']], - ['EPSG:4269', epsg['4269']] -]); + +// $ExpectType ProjectionDefinition +proj4.defs('WGS84'); +proj4.defs('WGS84', secondProjection); +// $ExpectType undefined[] +proj4.defs([['EPSG:4326', secondProjection], ['EPSG:4269', firstProjection]]); proj4.defs('urn:x-ogc:def:crs:EPSG:4326', proj4.defs('EPSG:4326')); /////////////////////////////////// diff --git a/types/proj4/tsconfig.json b/types/proj4/tsconfig.json index a55659d52c..02713475d5 100644 --- a/types/proj4/tsconfig.json +++ b/types/proj4/tsconfig.json @@ -6,7 +6,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ @@ -20,4 +20,4 @@ "index.d.ts", "proj4-tests.ts" ] -} \ No newline at end of file +} From 378af1c8192309ec52250daa448fe65071f00070 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Wed, 12 Dec 2018 17:35:15 +0100 Subject: [PATCH 570/608] Move old version to sub-dir --- types/subsume/{ => v1}/index.d.ts | 0 types/subsume/{ => v1}/subsume-tests.ts | 0 types/subsume/{ => v1}/tsconfig.json | 11 ++++++++--- types/subsume/{ => v1}/tslint.json | 0 4 files changed, 8 insertions(+), 3 deletions(-) rename types/subsume/{ => v1}/index.d.ts (100%) rename types/subsume/{ => v1}/subsume-tests.ts (100%) rename types/subsume/{ => v1}/tsconfig.json (74%) rename types/subsume/{ => v1}/tslint.json (100%) diff --git a/types/subsume/index.d.ts b/types/subsume/v1/index.d.ts similarity index 100% rename from types/subsume/index.d.ts rename to types/subsume/v1/index.d.ts diff --git a/types/subsume/subsume-tests.ts b/types/subsume/v1/subsume-tests.ts similarity index 100% rename from types/subsume/subsume-tests.ts rename to types/subsume/v1/subsume-tests.ts diff --git a/types/subsume/tsconfig.json b/types/subsume/v1/tsconfig.json similarity index 74% rename from types/subsume/tsconfig.json rename to types/subsume/v1/tsconfig.json index b29ec71ee8..0e0565e161 100644 --- a/types/subsume/tsconfig.json +++ b/types/subsume/v1/tsconfig.json @@ -8,10 +8,15 @@ "noImplicitThis": true, "strictNullChecks": true, "strictFunctionTypes": true, - "baseUrl": "../", + "baseUrl": "../../", "typeRoots": [ - "../" + "../../" ], + "paths": { + "subsume": [ + "subsume/v1" + ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true @@ -20,4 +25,4 @@ "index.d.ts", "subsume-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/subsume/tslint.json b/types/subsume/v1/tslint.json similarity index 100% rename from types/subsume/tslint.json rename to types/subsume/v1/tslint.json From 0756b69da9a1a1562d1bc5ffd9dbc1e19718c53d Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Wed, 12 Dec 2018 18:36:46 +0100 Subject: [PATCH 571/608] Add types for subsume v2 --- types/subsume/index.d.ts | 32 ++++++++++++++++++++++++++++++++ types/subsume/subsume-tests.ts | 30 ++++++++++++++++++++++++++++++ types/subsume/tsconfig.json | 23 +++++++++++++++++++++++ types/subsume/tslint.json | 1 + 4 files changed, 86 insertions(+) create mode 100644 types/subsume/index.d.ts create mode 100644 types/subsume/subsume-tests.ts create mode 100644 types/subsume/tsconfig.json create mode 100644 types/subsume/tslint.json diff --git a/types/subsume/index.d.ts b/types/subsume/index.d.ts new file mode 100644 index 0000000000..e42c97cd4f --- /dev/null +++ b/types/subsume/index.d.ts @@ -0,0 +1,32 @@ +// Type definitions for subsume 2.0 +// Project: https://github.com/sindresorhus/subsume#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = Subsume; + +declare class Subsume { + static parse(text: string, id: string): Subsume.ParseResult; + static parseAll(text: string, ids?: string[]): Subsume.ParseResults; + + id: string; + prefix: string; + postfix: string; + regex: RegExp; + + constructor(id?: string); + compose(text: string): string; + parse(text: string): Subsume.ParseResult; +} + +declare namespace Subsume { + interface ParseResult { + data?: string; + rest: string; + } + + interface ParseResults { + data: Map; + rest: string; + } +} diff --git a/types/subsume/subsume-tests.ts b/types/subsume/subsume-tests.ts new file mode 100644 index 0000000000..56234d275b --- /dev/null +++ b/types/subsume/subsume-tests.ts @@ -0,0 +1,30 @@ +import Subsume = require('subsume'); + +const subsume = new Subsume(); +new Subsume('foo'); + +subsume.id; // $ExpectType string +subsume.prefix; // $ExpectType string +subsume.postfix; // $ExpectType string +subsume.regex; // $ExpectType RegExp + +const text = subsume.compose('🦄'); +text; // $ExpectType string + +const output = `some${text} random text`; + +const res = subsume.parse(output); +res; // $ExpectType ParseResult +res.data; // $ExpectType string | undefined +res.rest; // $ExpectType string + +const input = + 'some@@[7febcd0b3806fbc48c01d7cea4ed1219]@@🦄##[7febcd0b3806fbc48c01d7cea4ed1219]## random text'; +Subsume.parse(input, '7febcd0b3806fbc48c01d7cea4ed1219'); // $ExpectType ParseResult + +const input2 = + 'some@@[7febcd0b3806fbc48c01d7cea4ed1219]@@🦄##[7febcd0b3806fbc48c01d7cea4ed1219]## ' + + 'random@@[7febcd0b3806fbc48c01d7cea4ed1218]@@🦄##[7febcd0b3806fbc48c01d7cea4ed1218]## ' + + 'text@@[7febcd0b3806fbc48c01d7cea4ed1217]@@🦄##[7febcd0b3806fbc48c01d7cea4ed1217]##'; +Subsume.parseAll(input2); // $ExpectType ParseResults +Subsume.parseAll(input2, ['7febcd0b3806fbc48c01d7cea4ed1219']); // $ExpectType ParseResults diff --git a/types/subsume/tsconfig.json b/types/subsume/tsconfig.json new file mode 100644 index 0000000000..7eefbf76e9 --- /dev/null +++ b/types/subsume/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "subsume-tests.ts" + ] +} diff --git a/types/subsume/tslint.json b/types/subsume/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/subsume/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 42c73c11a8736b746759089c0e2a2a3865296e9f Mon Sep 17 00:00:00 2001 From: Elizabeth Samuel Date: Wed, 12 Dec 2018 10:53:27 -0800 Subject: [PATCH 572/608] office-js: Update InternetHeaders object to specify that only message item applies --- types/office-js/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index 3e7f64375f..c6ee263561 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -9421,7 +9421,7 @@ declare namespace Office { } /** - * The InternetHeaders object represents properties that are preserved after the item leaves Exchange and converted to a MIME message. + * The InternetHeaders object represents properties that are preserved after the message item leaves Exchange and is converted to a MIME message. * These properties are stored as x-headers in the MIME message. * * InternetHeaders are stored as key/value pairs on a per-item basis. From 56b611f6873fc63c02ee6b2f7a1bec58537bce1f Mon Sep 17 00:00:00 2001 From: James Garbutt <43081j@users.noreply.github.com> Date: Tue, 27 Nov 2018 10:38:18 +0000 Subject: [PATCH 573/608] sinon: allow matchers as args --- types/sinon/index.d.ts | 52 +++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/types/sinon/index.d.ts b/types/sinon/index.d.ts index b5c3952e7a..d0748e9ac4 100644 --- a/types/sinon/index.d.ts +++ b/types/sinon/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Sinon 5.0 +// Type definitions for Sinon 7.0 // Project: http://sinonjs.org/ // Definitions by: William Sears // Jonathan Little @@ -18,12 +18,12 @@ interface Event {} // tslint:disable-line no-empty-interface interface Document {} // tslint:disable-line no-empty-interface declare namespace Sinon { - interface SinonSpyCallApi { + interface SinonSpyCallApi { // Properties /** * Array of received arguments. */ - args: TArgs; + args: TArgs[]; // Methods /** @@ -38,11 +38,11 @@ declare namespace Sinon { * so a call that received the provided arguments (in the same spots) and possibly others as well will return true. * @param args */ - calledWith(...args: TArgs): boolean; + calledWith(...args: Array): boolean; /** * Returns true if spy was called at least once with the provided arguments and no others. */ - calledWithExactly(...args: TArgs): boolean; + calledWithExactly(...args: Array): boolean; /** * Returns true if spy/stub was called the new operator. * Beware that this is inferred based on the value of the this object and the spy function’s prototype, @@ -53,31 +53,31 @@ declare namespace Sinon { * Returns true if spy was called at exactly once with the provided arguments. * @param args */ - calledOnceWith(...args: TArgs): boolean; - calledOnceWithExactly(...args: TArgs): boolean; + calledOnceWith(...args: Array): boolean; + calledOnceWithExactly(...args: Array): boolean; /** * Returns true if spy was called with matching arguments (and possibly others). * This behaves the same as spy.calledWith(sinon.match(arg1), sinon.match(arg2), ...). * @param args */ - calledWithMatch(...args: TArgs): boolean; + calledWithMatch(...args: TArgs[]): boolean; /** * Returns true if call did not receive provided arguments. * @param args */ - notCalledWith(...args: TArgs): boolean; + notCalledWith(...args: Array): boolean; /** * Returns true if call did not receive matching arguments. * This behaves the same as spyCall.notCalledWith(sinon.match(arg1), sinon.match(arg2), ...). * @param args */ - notCalledWithMatch(...args: TArgs): boolean; + notCalledWithMatch(...args: TArgs[]): boolean; /** * Returns true if spy returned the provided value at least once. * Uses deep comparison for objects and arrays. Use spy.returned(sinon.match.same(obj)) for strict comparison (see matchers). * @param value */ - returned(value: TReturnValue): boolean; + returned(value: TReturnValue|SinonMatcher): boolean; /** * Returns true if spy threw an exception at least once. */ @@ -118,7 +118,7 @@ declare namespace Sinon { yieldToOn(property: string, obj: any, ...args: any[]): void; } - interface SinonSpyCall + interface SinonSpyCall extends SinonSpyCallApi { /** * The call’s this value. @@ -154,7 +154,7 @@ declare namespace Sinon { calledAfter(call: SinonSpyCall): boolean; } - interface SinonSpy + interface SinonSpy extends Pick< SinonSpyCallApi, Exclude, 'args'> @@ -207,7 +207,7 @@ declare namespace Sinon { /** * Array of arguments received, spy.args[0] is an array of arguments received in the first call. */ - args: TArgs[]; + args: TArgs[][]; /** * Array of exception objects thrown, spy.exceptions[0] is the exception thrown by the first call. * If the call did not throw an error, the value at the call’s location in .exceptions will be undefined. @@ -246,7 +246,7 @@ declare namespace Sinon { * This is useful to be more expressive in your assertions, where you can access the spy with the same call. * @param args Expected args */ - withArgs(...args: TArgs): SinonSpy; + withArgs(...args: Array): SinonSpy; /** * Returns true if the spy was always called with @param obj as this. * @param obj @@ -255,29 +255,29 @@ declare namespace Sinon { /** * Returns true if spy was always called with the provided arguments (and possibly others). */ - alwaysCalledWith(...args: TArgs): boolean; + alwaysCalledWith(...args: Array): boolean; /** * Returns true if spy was always called with the exact provided arguments. * @param args */ - alwaysCalledWithExactly(...args: TArgs): boolean; + alwaysCalledWithExactly(...args: Array): boolean; /** * Returns true if spy was always called with matching arguments (and possibly others). * This behaves the same as spy.alwaysCalledWith(sinon.match(arg1), sinon.match(arg2), ...). * @param args */ - alwaysCalledWithMatch(...args: TArgs): boolean; + alwaysCalledWithMatch(...args: TArgs[]): boolean; /** * Returns true if the spy/stub was never called with the provided arguments. * @param args */ - neverCalledWith(...args: TArgs): boolean; + neverCalledWith(...args: Array): boolean; /** * Returns true if the spy/stub was never called with matching arguments. * This behaves the same as spy.neverCalledWith(sinon.match(arg1), sinon.match(arg2), ...). * @param args */ - neverCalledWithMatch(...args: TArgs): boolean; + neverCalledWithMatch(...args: TArgs[]): boolean; /** * Returns true if spy always threw an exception. */ @@ -300,7 +300,7 @@ declare namespace Sinon { * If the stub was never called with a function argument, yield throws an error. * Returns an Array with all callbacks return values in the order they were called, if no error is thrown. */ - invokeCallback(...args: TArgs): void; + invokeCallback(...args: TArgs[]): void; /** * Set the displayName of the spy or stub. * @param name @@ -356,13 +356,13 @@ declare namespace Sinon { * The returned spy is the function object which replaced the original method. spy === object.method. */ (obj: T, method: K): T[K] extends ( - ...args: infer TArgs + ...args: Array ) => infer TReturnValue ? SinonSpy : SinonSpy; } - interface SinonStub + interface SinonStub extends SinonSpy { /** * Resets the stub’s behaviour to the default behaviour @@ -524,7 +524,7 @@ declare namespace Sinon { * Makes the stub call the provided @param func when invoked. * @param func */ - callsFake(func: (...args: TArgs) => TReturnValue): SinonStub; + callsFake(func: (...args: TArgs[]) => TReturnValue): SinonStub; /** * Replaces a new getter for this stub. */ @@ -631,7 +631,7 @@ declare namespace Sinon { * It is also useful to create a stub that can act differently in response to different arguments. * @param args */ - withArgs(...args: TArgs): SinonStub; + withArgs(...args: Array): SinonStub; } interface SinonStubStatic { @@ -652,7 +652,7 @@ declare namespace Sinon { * The original function can be restored by calling object.method.restore(); (or stub.restore();). */ (obj: T, method: K): T[K] extends ( - ...args: infer TArgs + ...args: Array ) => infer TReturnValue ? SinonStub : SinonStub; From 91e0fb86382bf9a3af6b7fd640643dc7f44314d0 Mon Sep 17 00:00:00 2001 From: James Garbutt <43081j@users.noreply.github.com> Date: Tue, 27 Nov 2018 11:51:01 +0000 Subject: [PATCH 574/608] sinon: add typed args tests --- types/sinon/sinon-tests.ts | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/types/sinon/sinon-tests.ts b/types/sinon/sinon-tests.ts index d5ae4b0eb2..31dfa64e22 100644 --- a/types/sinon/sinon-tests.ts +++ b/types/sinon/sinon-tests.ts @@ -288,6 +288,41 @@ function testAssert() { sinon.assert.expose(obj, { includeFail: true }); } +function testTypedSpy() { + const cls = class { + foo(a: number, b: string): number { + return 3; + } + } + + const instance = new cls(); + const spy = sinon.spy(instance, 'foo'); + + spy.calledWith(5, 'x'); + spy.calledWith(sinon.match(5), 'x'); + spy.calledWithExactly(5, 'x'); + spy.calledWithExactly(5, sinon.match('x')); + spy.calledOnceWith(5, 'x'); + spy.calledOnceWith(sinon.match(5), 'x'); + spy.notCalledWith(5, 'x'); + spy.notCalledWith(sinon.match(5), 'x'); + spy.returned(5); + spy.returned(sinon.match(5)); + + spy.withArgs(sinon.match(5), 'x').calledWith(5, 'x'); + spy.alwaysCalledWith(sinon.match(5), 'x'); + spy.alwaysCalledWith(5, 'x'); + spy.alwaysCalledWithExactly(sinon.match(5), 'x'); + spy.alwaysCalledWithExactly(5, 'x'); + spy.neverCalledWith(sinon.match(5), 'x'); + spy.neverCalledWith(5, 'x'); + + const stub = sinon.stub(instance, 'foo'); + + stub.withArgs(5, 'x').returns(3); + stub.withArgs(sinon.match(5), 'x').returns(5); +} + function testSpy() { const fn = () => { }; const obj = class { From b4715b48d6a64a288f4ca6d0d2efcbffb36dd1cf Mon Sep 17 00:00:00 2001 From: James Garbutt <43081j@users.noreply.github.com> Date: Tue, 27 Nov 2018 11:58:30 +0000 Subject: [PATCH 575/608] sinon: resolve version issues --- types/karma-chai-sinon/index.d.ts | 2 +- types/mochaccino/index.d.ts | 2 +- types/should-sinon/index.d.ts | 2 +- types/sinon-as-promised/index.d.ts | 2 +- types/sinon-chai/index.d.ts | 2 +- types/sinon-chai/v2/index.d.ts | 2 +- types/sinon-chrome/index.d.ts | 2 +- types/sinon-express-mock/index.d.ts | 2 +- types/sinon-mongoose/index.d.ts | 2 +- types/sinon-stub-promise/index.d.ts | 2 +- types/sinon-test/index.d.ts | 2 +- types/sinon/index.d.ts | 293 ++--- types/sinon/package.json | 7 + types/sinon/sinon-tests.ts | 2 +- types/sinon/ts3.1/index.d.ts | 1747 +++++++++++++++++++++++++++ types/sinon/ts3.1/sinon-tests.ts | 488 ++++++++ types/sinon/ts3.1/tsconfig.json | 25 + 17 files changed, 2377 insertions(+), 207 deletions(-) create mode 100644 types/sinon/package.json create mode 100644 types/sinon/ts3.1/index.d.ts create mode 100644 types/sinon/ts3.1/sinon-tests.ts create mode 100644 types/sinon/ts3.1/tsconfig.json diff --git a/types/karma-chai-sinon/index.d.ts b/types/karma-chai-sinon/index.d.ts index 0b14373a99..9a14f659e2 100644 --- a/types/karma-chai-sinon/index.d.ts +++ b/types/karma-chai-sinon/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/tubalmartin/karma-chai-sinon // Definitions by: Václav Ostrožlík // Definitions: https://github.com/borisyankov/DefinitelyTyped -// TypeScript Version: 3.0 +// TypeScript Version: 2.8 /// import Sinon = require('sinon'); diff --git a/types/mochaccino/index.d.ts b/types/mochaccino/index.d.ts index 4dbc62b7d9..3d5d9570a8 100644 --- a/types/mochaccino/index.d.ts +++ b/types/mochaccino/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/pawelgalazka/mochaccino#readme // Definitions by: Thomas-P // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3.0 +// TypeScript Version: 2.8 import * as Sinon from 'sinon'; export interface Expect { not: Expect; diff --git a/types/should-sinon/index.d.ts b/types/should-sinon/index.d.ts index 79b04d5092..6544a55253 100644 --- a/types/should-sinon/index.d.ts +++ b/types/should-sinon/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/shouldjs/sinon // Definitions by: AryloYeung // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3.0 +// TypeScript Version: 2.8 import * as s from 'sinon'; import should = require('should'); diff --git a/types/sinon-as-promised/index.d.ts b/types/sinon-as-promised/index.d.ts index 5e2e06ed83..5187168d61 100644 --- a/types/sinon-as-promised/index.d.ts +++ b/types/sinon-as-promised/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/bendrucker/sinon-as-promised // Definitions by: igrayson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3.0 +// TypeScript Version: 2.8 import * as s from "sinon"; diff --git a/types/sinon-chai/index.d.ts b/types/sinon-chai/index.d.ts index 6a0901eb8c..ad7c8cb857 100644 --- a/types/sinon-chai/index.d.ts +++ b/types/sinon-chai/index.d.ts @@ -4,7 +4,7 @@ // Jed Mao // Eyal Lapid // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3.0 +// TypeScript Version: 2.8 /// /// diff --git a/types/sinon-chai/v2/index.d.ts b/types/sinon-chai/v2/index.d.ts index 8a03ea671c..cff6d0b3a2 100644 --- a/types/sinon-chai/v2/index.d.ts +++ b/types/sinon-chai/v2/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/domenic/sinon-chai // Definitions by: Kazi Manzur Rashid , Jed Mao // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3.0 +// TypeScript Version: 2.8 /// /// diff --git a/types/sinon-chrome/index.d.ts b/types/sinon-chrome/index.d.ts index eec9604dec..c25273d757 100644 --- a/types/sinon-chrome/index.d.ts +++ b/types/sinon-chrome/index.d.ts @@ -4,7 +4,7 @@ // CRIMX // kobanyan // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3.0 +// TypeScript Version: 2.8 /// /// diff --git a/types/sinon-express-mock/index.d.ts b/types/sinon-express-mock/index.d.ts index 84454048cd..f3974fc005 100644 --- a/types/sinon-express-mock/index.d.ts +++ b/types/sinon-express-mock/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Jared Chapiewsky // Tomek Łaziuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3.0 +// TypeScript Version: 2.8 import { SinonStub, diff --git a/types/sinon-mongoose/index.d.ts b/types/sinon-mongoose/index.d.ts index f725965349..86109b4917 100644 --- a/types/sinon-mongoose/index.d.ts +++ b/types/sinon-mongoose/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/underscopeio/sinon-mongoose // Definitions by: stevehipwell // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3.0 +// TypeScript Version: 2.8 import * as s from "sinon"; diff --git a/types/sinon-stub-promise/index.d.ts b/types/sinon-stub-promise/index.d.ts index 298eed87c0..d817113cf7 100644 --- a/types/sinon-stub-promise/index.d.ts +++ b/types/sinon-stub-promise/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Thiago Temple // Tim Stackhouse // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3.0 +// TypeScript Version: 2.8 /// diff --git a/types/sinon-test/index.d.ts b/types/sinon-test/index.d.ts index 63318554ae..902064a7cb 100644 --- a/types/sinon-test/index.d.ts +++ b/types/sinon-test/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/sinonjs/sinon-test // Definitions by: Francis Saul // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3.0 +// TypeScript Version: 2.8 import * as Sinon from 'sinon'; diff --git a/types/sinon/index.d.ts b/types/sinon/index.d.ts index d0748e9ac4..bc265d6718 100644 --- a/types/sinon/index.d.ts +++ b/types/sinon/index.d.ts @@ -9,21 +9,21 @@ // Greg Jednaszewski // John Wood // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3.0 +// TypeScript Version: 2.8 // sinon uses DOM dependencies which are absent in browser-less environment like node.js // to avoid compiler errors this monkey patch is used // see more details in https://github.com/DefinitelyTyped/DefinitelyTyped/issues/11351 -interface Event {} // tslint:disable-line no-empty-interface -interface Document {} // tslint:disable-line no-empty-interface +interface Event { } // tslint:disable-line no-empty-interface +interface Document { } // tslint:disable-line no-empty-interface declare namespace Sinon { - interface SinonSpyCallApi { + interface SinonSpyCallApi { // Properties /** * Array of received arguments. */ - args: TArgs[]; + args: any[]; // Methods /** @@ -38,11 +38,11 @@ declare namespace Sinon { * so a call that received the provided arguments (in the same spots) and possibly others as well will return true. * @param args */ - calledWith(...args: Array): boolean; + calledWith(...args: any[]): boolean; /** * Returns true if spy was called at least once with the provided arguments and no others. */ - calledWithExactly(...args: Array): boolean; + calledWithExactly(...args: any[]): boolean; /** * Returns true if spy/stub was called the new operator. * Beware that this is inferred based on the value of the this object and the spy function’s prototype, @@ -53,31 +53,31 @@ declare namespace Sinon { * Returns true if spy was called at exactly once with the provided arguments. * @param args */ - calledOnceWith(...args: Array): boolean; - calledOnceWithExactly(...args: Array): boolean; + calledOnceWith(...args: any[]): boolean; + calledOnceWithExactly(...args: any[]): boolean; /** * Returns true if spy was called with matching arguments (and possibly others). * This behaves the same as spy.calledWith(sinon.match(arg1), sinon.match(arg2), ...). * @param args */ - calledWithMatch(...args: TArgs[]): boolean; + calledWithMatch(...args: any[]): boolean; /** * Returns true if call did not receive provided arguments. * @param args */ - notCalledWith(...args: Array): boolean; + notCalledWith(...args: any[]): boolean; /** * Returns true if call did not receive matching arguments. * This behaves the same as spyCall.notCalledWith(sinon.match(arg1), sinon.match(arg2), ...). * @param args */ - notCalledWithMatch(...args: TArgs[]): boolean; + notCalledWithMatch(...args: any[]): boolean; /** * Returns true if spy returned the provided value at least once. * Uses deep comparison for objects and arrays. Use spy.returned(sinon.match.same(obj)) for strict comparison (see matchers). * @param value */ - returned(value: TReturnValue|SinonMatcher): boolean; + returned(value: any): boolean; /** * Returns true if spy threw an exception at least once. */ @@ -118,8 +118,7 @@ declare namespace Sinon { yieldToOn(property: string, obj: any, ...args: any[]): void; } - interface SinonSpyCall - extends SinonSpyCallApi { + interface SinonSpyCall extends SinonSpyCallApi { /** * The call’s this value. */ @@ -131,7 +130,7 @@ declare namespace Sinon { /** * Return value. */ - returnValue: TReturnValue; + returnValue: any; /** * This property is a convenience for a call’s callback. * When the last argument in a call is a Function, then callback will reference that. Otherwise it will be undefined. @@ -154,11 +153,7 @@ declare namespace Sinon { calledAfter(call: SinonSpyCall): boolean; } - interface SinonSpy - extends Pick< - SinonSpyCallApi, - Exclude, 'args'> - > { + interface SinonSpy extends SinonSpyCallApi { // Properties /** * The number of recorded calls. @@ -187,19 +182,19 @@ declare namespace Sinon { /** * The first call */ - firstCall: SinonSpyCall; + firstCall: SinonSpyCall; /** * The second call */ - secondCall: SinonSpyCall; + secondCall: SinonSpyCall; /** * The third call */ - thirdCall: SinonSpyCall; + thirdCall: SinonSpyCall; /** * The last call */ - lastCall: SinonSpyCall; + lastCall: SinonSpyCall; /** * Array of this objects, spy.thisValues[0] is the this object for the first call. */ @@ -207,7 +202,7 @@ declare namespace Sinon { /** * Array of arguments received, spy.args[0] is an array of arguments received in the first call. */ - args: TArgs[][]; + args: any[][]; /** * Array of exception objects thrown, spy.exceptions[0] is the exception thrown by the first call. * If the call did not throw an error, the value at the call’s location in .exceptions will be undefined. @@ -217,7 +212,7 @@ declare namespace Sinon { * Array of return values, spy.returnValues[0] is the return value of the first call. * If the call did not explicitly return a value, the value at the call’s location in .returnValues will be undefined. */ - returnValues: TReturnValue[]; + returnValues: any[]; // Methods (...args: any[]): any; @@ -246,7 +241,7 @@ declare namespace Sinon { * This is useful to be more expressive in your assertions, where you can access the spy with the same call. * @param args Expected args */ - withArgs(...args: Array): SinonSpy; + withArgs(...args: any[]): SinonSpy; /** * Returns true if the spy was always called with @param obj as this. * @param obj @@ -255,29 +250,29 @@ declare namespace Sinon { /** * Returns true if spy was always called with the provided arguments (and possibly others). */ - alwaysCalledWith(...args: Array): boolean; + alwaysCalledWith(...args: any[]): boolean; /** * Returns true if spy was always called with the exact provided arguments. * @param args */ - alwaysCalledWithExactly(...args: Array): boolean; + alwaysCalledWithExactly(...args: any[]): boolean; /** * Returns true if spy was always called with matching arguments (and possibly others). * This behaves the same as spy.alwaysCalledWith(sinon.match(arg1), sinon.match(arg2), ...). * @param args */ - alwaysCalledWithMatch(...args: TArgs[]): boolean; + alwaysCalledWithMatch(...args: any[]): boolean; /** * Returns true if the spy/stub was never called with the provided arguments. * @param args */ - neverCalledWith(...args: Array): boolean; + neverCalledWith(...args: any[]): boolean; /** * Returns true if the spy/stub was never called with matching arguments. * This behaves the same as spy.neverCalledWith(sinon.match(arg1), sinon.match(arg2), ...). * @param args */ - neverCalledWithMatch(...args: TArgs[]): boolean; + neverCalledWithMatch(...args: any[]): boolean; /** * Returns true if spy always threw an exception. */ @@ -300,22 +295,22 @@ declare namespace Sinon { * If the stub was never called with a function argument, yield throws an error. * Returns an Array with all callbacks return values in the order they were called, if no error is thrown. */ - invokeCallback(...args: TArgs[]): void; + invokeCallback(...args: any[]): void; /** * Set the displayName of the spy or stub. * @param name */ - named(name: string): SinonSpy; + named(name: string): SinonSpy; /** * Returns the nth call. * Accessing individual calls helps with more detailed behavior verification when the spy is called more than once. * @param n */ - getCall(n: number): SinonSpyCall; + getCall(n: number): SinonSpyCall; /** * Returns an Array of all calls recorded by the spy. */ - getCalls(): Array>; + getCalls(): SinonSpyCall[]; /** * Resets the state of a spy. */ @@ -355,15 +350,10 @@ declare namespace Sinon { * The original method can be restored by calling object.method.restore(). * The returned spy is the function object which replaced the original method. spy === object.method. */ - (obj: T, method: K): T[K] extends ( - ...args: Array - ) => infer TReturnValue - ? SinonSpy - : SinonSpy; + (obj: T, method: keyof T): SinonSpy; } - interface SinonStub - extends SinonSpy { + interface SinonStub extends SinonSpy { /** * Resets the stub’s behaviour to the default behaviour * You can reset behaviour of all stubs using sinon.resetBehavior() @@ -381,13 +371,13 @@ declare namespace Sinon { * Causes the stub to return promises using a specific Promise library instead of the global one when using stub.rejects or stub.resolves. * Returns the stub to allow chaining. */ - usingPromise(promiseLibrary: any): SinonStub; + usingPromise(promiseLibrary: any): SinonStub; /** * Makes the stub return the provided @param obj value. * @param obj */ - returns(obj: TReturnValue): SinonStub; + returns(obj: any): SinonStub; /** * Causes the stub to return the argument at the provided @param index. * stub.returnsArg(0); causes the stub to return the first argument. @@ -395,12 +385,12 @@ declare namespace Sinon { * starting from sinon@6.1.2, a TypeError will be thrown. * @param index */ - returnsArg(index: number): SinonStub; + returnsArg(index: number): SinonStub; /** * Causes the stub to return its this value. * Useful for stubbing jQuery-style fluent APIs. */ - returnsThis(): SinonStub; + returnsThis(): SinonStub; /** * Causes the stub to return a Promise which resolves to the provided value. * When constructing the Promise, sinon uses the Promise.resolve method. @@ -408,26 +398,26 @@ declare namespace Sinon { * The Promise library can be overwritten using the usingPromise method. * Since sinon@2.0.0 */ - resolves(value?: any): SinonStub; + resolves(value?: any): SinonStub; /** * Causes the stub to return a Promise which resolves to the argument at the provided index. * stub.resolvesArg(0); causes the stub to return a Promise which resolves to the first argument. * If the argument at the provided index is not available, a TypeError will be thrown. */ - resolvesArg(index: number): SinonStub; + resolvesArg(index: number): SinonStub; /** * Causes the stub to return a Promise which resolves to its this value. */ - resolvesThis(): SinonStub; + resolvesThis(): SinonStub; /** * Causes the stub to throw an exception (Error). * @param type */ - throws(type?: string): SinonStub; + throws(type?: string): SinonStub; /** * Causes the stub to throw the provided exception object. */ - throws(obj: any): SinonStub; + throws(obj: any): SinonStub; /** * Causes the stub to throw the argument at the provided index. * stub.throwsArg(0); causes the stub to throw the first argument as the exception. @@ -435,9 +425,9 @@ declare namespace Sinon { * Since sinon@2.3.0 * @param index */ - throwsArg(index: number): SinonStub; - throwsException(type?: string): SinonStub; - throwsException(obj: any): SinonStub; + throwsArg(index: number): SinonStub; + throwsException(type?: string): SinonStub; + throwsException(obj: any): SinonStub; /** * Causes the stub to return a Promise which rejects with an exception (Error). * When constructing the Promise, sinon uses the Promise.reject method. @@ -445,57 +435,53 @@ declare namespace Sinon { * The Promise library can be overwritten using the usingPromise method. * Since sinon@2.0.0 */ - rejects(): SinonStub; + rejects(): SinonStub; /** * Causes the stub to return a Promise which rejects with an exception of the provided type. * Since sinon@2.0.0 */ - rejects(errorType: string): SinonStub; + rejects(errorType: string): SinonStub; /** * Causes the stub to return a Promise which rejects with the provided exception object. * Since sinon@2.0.0 */ - rejects(value: any): SinonStub; + rejects(value: any): SinonStub; /** * Causes the stub to call the argument at the provided index as a callback function. * stub.callsArg(0); causes the stub to call the first argument as a callback. * If the argument at the provided index is not available or is not a function, a TypeError will be thrown. */ - callsArg(index: number): SinonStub; + callsArg(index: number): SinonStub; /** * Causes the original method wrapped into the stub to be called when none of the conditional stubs are matched. */ - callThrough(): SinonStub; + callThrough(): SinonStub; /** * Like stub.callsArg(index); but with an additional parameter to pass the this context. * @param index * @param context */ - callsArgOn(index: number, context: any): SinonStub; + callsArgOn(index: number, context: any): SinonStub; /** * Like callsArg, but with arguments to pass to the callback. * @param index * @param args */ - callsArgWith(index: number, ...args: any[]): SinonStub; + callsArgWith(index: number, ...args: any[]): SinonStub; /** * Like above but with an additional parameter to pass the this context. * @param index * @param context * @param args */ - callsArgOnWith( - index: number, - context: any, - ...args: any[] - ): SinonStub; + callsArgOnWith(index: number, context: any, ...args: any[]): SinonStub; /** * Same as their corresponding non-Async counterparts, but with callback being deferred at called after all instructions in the current call stack are processed. * In Node environment the callback is deferred with process.nextTick. * In a browser the callback is deferred with setTimeout(callback, 0). * @param index */ - callsArgAsync(index: number): SinonStub; + callsArgAsync(index: number): SinonStub; /** * Same as their corresponding non-Async counterparts, but with callback being deferred at called after all instructions in the current call stack are processed. * In Node environment the callback is deferred with process.nextTick. @@ -503,99 +489,91 @@ declare namespace Sinon { * @param index * @param context */ - callsArgOnAsync(index: number, context: any): SinonStub; + callsArgOnAsync(index: number, context: any): SinonStub; /** * Same as their corresponding non-Async counterparts, but with callback being deferred at called after all instructions in the current call stack are processed. * In Node environment the callback is deferred with process.nextTick. * In a browser the callback is deferred with setTimeout(callback, 0). */ - callsArgWithAsync(index: number, ...args: any[]): SinonStub; + callsArgWithAsync(index: number, ...args: any[]): SinonStub; /** * Same as their corresponding non-Async counterparts, but with callback being deferred at called after all instructions in the current call stack are processed. * In Node environment the callback is deferred with process.nextTick. * In a browser the callback is deferred with setTimeout(callback, 0). */ - callsArgOnWithAsync( - index: number, - context: any, - ...args: any[] - ): SinonStub; + callsArgOnWithAsync(index: number, context: any, ...args: any[]): SinonStub; /** * Makes the stub call the provided @param func when invoked. * @param func */ - callsFake(func: (...args: TArgs[]) => TReturnValue): SinonStub; + callsFake(func: (...args: any[]) => any): SinonStub; /** * Replaces a new getter for this stub. */ - get(func: () => any): SinonStub; + get(func: () => any): SinonStub; /** * Defines a new setter for this stub. * @param func */ - set(func: (v: any) => void): SinonStub; + set(func: (v: any) => void): SinonStub; /** * Defines the behavior of the stub on the @param n call. Useful for testing sequential interactions. * There are methods onFirstCall, onSecondCall,onThirdCall to make stub definitions read more naturally. * onCall can be combined with all of the behavior defining methods in this section. In particular, it can be used together with withArgs. * @param n */ - onCall(n: number): SinonStub; + onCall(n: number): SinonStub; /** * Alias for stub.onCall(0); */ - onFirstCall(): SinonStub; + onFirstCall(): SinonStub; /** * Alias for stub.onCall(1); */ - onSecondCall(): SinonStub; + onSecondCall(): SinonStub; /** * Alias for stub.onCall(2); */ - onThirdCall(): SinonStub; + onThirdCall(): SinonStub; /** * Defines a new value for this stub. * @param val */ - value(val: any): SinonStub; + value(val: any): SinonStub; /** * Set the displayName of the spy or stub. * @param name */ - named(name: string): SinonStub; + named(name: string): SinonStub; /** * Similar to callsArg. * Causes the stub to call the first callback it receives with the provided arguments (if any). * If a method accepts more than one callback, you need to use callsArg to have the stub invoke other callbacks than the first one. */ - yields(...args: any[]): SinonStub; + yields(...args: any[]): SinonStub; /** * Like above but with an additional parameter to pass the this context. */ - yieldsOn(context: any, ...args: any[]): SinonStub; - yieldsRight(...args: any[]): SinonStub; + yieldsOn(context: any, ...args: any[]): SinonStub; + yieldsRight(...args: any[]): SinonStub; /** * Causes the spy to invoke a callback passed as a property of an object to the spy. * Like yields, yieldsTo grabs the first matching argument, finds the callback and calls it with the (optional) arguments. * @param property * @param args */ - yieldsTo(property: string, ...args: any[]): SinonStub; + yieldsTo(property: string, ...args: any[]): SinonStub; /** * Like above but with an additional parameter to pass the this context. */ - yieldsToOn( - property: string, - context: any, - ...args: any[] - ): SinonStub; + yieldsToOn(property: string, context: any, ...args: any[]): SinonStub; /** * Same as their corresponding non-Async counterparts, but with callback being deferred at called after all instructions in the current call stack are processed. * In Node environment the callback is deferred with process.nextTick. * In a browser the callback is deferred with setTimeout(callback, 0). * @param args */ - yieldsAsync(...args: any[]): SinonStub; + yieldsAsync(...args: any[]): SinonStub; /** * Same as their corresponding non-Async counterparts, but with callback being deferred at called after all instructions in the current call stack are processed. * In Node environment the callback is deferred with process.nextTick. @@ -603,7 +581,7 @@ declare namespace Sinon { * @param context * @param args */ - yieldsOnAsync(context: any, ...args: any[]): SinonStub; + yieldsOnAsync(context: any, ...args: any[]): SinonStub; /** * Same as their corresponding non-Async counterparts, but with callback being deferred at called after all instructions in the current call stack are processed. * In Node environment the callback is deferred with process.nextTick. @@ -611,7 +589,7 @@ declare namespace Sinon { * @param property * @param args */ - yieldsToAsync(property: string, ...args: any[]): SinonStub; + yieldsToAsync(property: string, ...args: any[]): SinonStub; /** * Same as their corresponding non-Async counterparts, but with callback being deferred at called after all instructions in the current call stack are processed. * In Node environment the callback is deferred with process.nextTick. @@ -620,18 +598,14 @@ declare namespace Sinon { * @param context * @param args */ - yieldsToOnAsync( - property: string, - context: any, - ...args: any[] - ): SinonStub; + yieldsToOnAsync(property: string, context: any, ...args: any[]): SinonStub; /** * Stubs the method only for the provided arguments. * This is useful to be more expressive in your assertions, where you can access the spy with the same call. * It is also useful to create a stub that can act differently in response to different arguments. * @param args */ - withArgs(...args: Array): SinonStub; + withArgs(...args: any[]): SinonStub; } interface SinonStubStatic { @@ -651,11 +625,7 @@ declare namespace Sinon { * An exception is thrown if the property is not already a function. * The original function can be restored by calling object.method.restore(); (or stub.restore();). */ - (obj: T, method: K): T[K] extends ( - ...args: Array - ) => infer TReturnValue - ? SinonStub - : SinonStub; + (obj: T, method: keyof T): SinonStub; } interface SinonExpectation extends SinonStub { @@ -757,22 +727,11 @@ declare namespace Sinon { interface SinonFakeTimers { now: number; - setTimeout( - callback: (...args: any[]) => void, - timeout: number, - ...args: any[] - ): SinonTimerId; + setTimeout(callback: (...args: any[]) => void, timeout: number, ...args: any[]): SinonTimerId; clearTimeout(id: SinonTimerId): void; - setInterval( - callback: (...args: any[]) => void, - timeout: number, - ...args: any[] - ): SinonTimerId; + setInterval(callback: (...args: any[]) => void, timeout: number, ...args: any[]): SinonTimerId; clearInterval(id: SinonTimerId): void; - setImmediate( - callback: (...args: any[]) => void, - ...args: any[] - ): SinonTimerId; + setImmediate(callback: (...args: any[]) => void, ...args: any[]): SinonTimerId; clearImmediate(id: SinonTimerId): void; requestAnimationFrame(callback: (...args: any[]) => void): number; cancelAnimationFrame(id: number): void; @@ -806,30 +765,9 @@ declare namespace Sinon { Date(year: number, month: number): Date; Date(year: number, month: number, day: number): Date; Date(year: number, month: number, day: number, hour: number): Date; - Date( - year: number, - month: number, - day: number, - hour: number, - minute: number - ): Date; - Date( - year: number, - month: number, - day: number, - hour: number, - minute: number, - second: number - ): Date; - Date( - year: number, - month: number, - day: number, - hour: number, - minute: number, - second: number, - ms: number - ): Date; + Date(year: number, month: number, day: number, hour: number, minute: number): Date; + Date(year: number, month: number, day: number, hour: number, minute: number, second: number): Date; + Date(year: number, month: number, day: number, hour: number, minute: number, second: number, ms: number): Date; /** * Restore the faked methods. @@ -950,7 +888,7 @@ declare namespace Sinon { } interface SinonFakeXMLHttpRequestStatic { - new (): SinonFakeXMLHttpRequest; + new(): SinonFakeXMLHttpRequest; /** * Default false. * When set to true, Sinon will check added filters if certain requests should be “unfaked” @@ -962,15 +900,7 @@ declare namespace Sinon { * If the filter returns true, the request will not be faked. * @param filter */ - addFilter( - filter: ( - method: string, - url: string, - async: boolean, - username: string, - password: string - ) => boolean - ): void; + addFilter(filter: (method: string, url: string, async: boolean, username: string, password: string) => boolean): void; /** * By assigning a function to the onCreate property of the returned object from useFakeXMLHttpRequest() * you can subscribe to newly created FakeXMLHttpRequest objects. See below for the fake xhr object API. @@ -1036,10 +966,7 @@ declare namespace Sinon { /** * Responds to all requests to given URL, e.g. /posts/1. */ - respondWith( - url: string, - fn: (xhr: SinonFakeXMLHttpRequest) => void - ): void; + respondWith(url: string, fn: (xhr: SinonFakeXMLHttpRequest) => void): void; /** * Responds to all method requests to the given URL with the given response. * method is an HTTP verb. @@ -1054,11 +981,7 @@ declare namespace Sinon { * Responds to all method requests to the given URL with the given response. * method is an HTTP verb. */ - respondWith( - method: string, - url: string, - fn: (xhr: SinonFakeXMLHttpRequest) => void - ): void; + respondWith(method: string, url: string, fn: (xhr: SinonFakeXMLHttpRequest) => void): void; /** * URL may be a regular expression, e.g. /\\/post\\//\\d+ * If the response is a Function, it will be passed any capture groups from the regular expression along with the XMLHttpRequest object: @@ -1073,10 +996,7 @@ declare namespace Sinon { * URL may be a regular expression, e.g. /\\/post\\//\\d+ * If the response is a Function, it will be passed any capture groups from the regular expression along with the XMLHttpRequest object: */ - respondWith( - url: RegExp, - fn: (xhr: SinonFakeXMLHttpRequest) => void - ): void; + respondWith(url: RegExp, fn: (xhr: SinonFakeXMLHttpRequest) => void): void; /** * Responds to all method requests to URLs matching the regular expression. */ @@ -1088,11 +1008,7 @@ declare namespace Sinon { /** * Responds to all method requests to URLs matching the regular expression. */ - respondWith( - method: string, - url: RegExp, - fn: (xhr: SinonFakeXMLHttpRequest) => void - ): void; + respondWith(method: string, url: RegExp, fn: (xhr: SinonFakeXMLHttpRequest) => void): void; /** * Causes all queued asynchronous requests to receive a response. * If none of the responses added through respondWith match, the default response is [404, {}, ""]. @@ -1221,10 +1137,7 @@ declare namespace Sinon { * @param spyOrSpyCall * @param args */ - calledWithExactly( - spyOrSpyCall: SinonSpy | SinonSpyCall, - ...args: any[] - ): void; + calledWithExactly(spyOrSpyCall: SinonSpy | SinonSpyCall, ...args: any[]): void; /** * Passes if spy was always called with the provided arguments and no others. */ @@ -1234,10 +1147,7 @@ declare namespace Sinon { * This behaves the same way as sinon.assert.calledWith(spy, sinon.match(arg1), sinon.match(arg2), ...). * It’s possible to assert on a dedicated spy call: sinon.assert.calledWithMatch(spy.secondCall, arg1, arg2, ...);. */ - calledWithMatch( - spyOrSpyCall: SinonSpy | SinonSpyCall, - ...args: any[] - ): void; + calledWithMatch(spyOrSpyCall: SinonSpy | SinonSpyCall, ...args: any[]): void; /** * Passes if spy was always called with matching arguments. * This behaves the same way as sinon.assert.alwaysCalledWith(spy, sinon.match(arg1), sinon.match(arg2), ...). @@ -1529,7 +1439,7 @@ declare namespace Sinon { * @template TType Object type being stubbed. */ type SinonStubbedInstance = { - [P in keyof TType]: SinonStubbedMember + [P in keyof TType]: SinonStubbedMember; }; /** @@ -1619,9 +1529,7 @@ declare namespace Sinon { * You would have to call either clock.next(), clock.tick(), clock.runAll() or clock.runToLast() (see example below). Please refer to the lolex documentation for more information. * @param config */ - useFakeTimers( - config?: number | Date | Partial - ): SinonFakeTimers; + useFakeTimers(config?: number | Date | Partial): SinonFakeTimers; /** * Causes Sinon to replace the native XMLHttpRequest object in browsers that support it with a custom implementation which does not send actual requests. * In browsers that support ActiveXObject, this constructor is replaced, and fake objects are returned for XMLHTTP progIds. @@ -1675,8 +1583,7 @@ declare namespace Sinon { replace( obj: T, prop: TKey, - replacement: T[TKey] - ): T[TKey]; + replacement: T[TKey]): T[TKey]; /** * Replaces getter for property on object with replacement argument. Attempts to replace an already replaced getter cause an exception. * replacement must be a Function, and can be instances of spies, stubs and fakes. @@ -1687,8 +1594,7 @@ declare namespace Sinon { replaceGetter( obj: T, prop: TKey, - replacement: () => T[TKey] - ): () => T[TKey]; + replacement: () => T[TKey]): () => T[TKey]; /** * Replaces setter for property on object with replacement argument. Attempts to replace an already replaced setter cause an exception. * replacement must be a Function, and can be instances of spies, stubs and fakes. @@ -1699,8 +1605,7 @@ declare namespace Sinon { replaceSetter( obj: T, prop: TKey, - replacement: (val: T[TKey]) => void - ): (val: T[TKey]) => void; + replacement: (val: T[TKey]) => void): (val: T[TKey]) => void; /** * Creates a new object with the given functions as the prototype and stubs all implemented functions. @@ -1710,9 +1615,7 @@ declare namespace Sinon { * @returns A stubbed version of the constructor. * @remarks The given constructor function is not invoked. See also the stub API. */ - createStubInstance( - constructor: StubbableType - ): SinonStubbedInstance; + createStubInstance(constructor: StubbableType): SinonStubbedInstance; } interface SinonApi { diff --git a/types/sinon/package.json b/types/sinon/package.json new file mode 100644 index 0000000000..bb80441dc0 --- /dev/null +++ b/types/sinon/package.json @@ -0,0 +1,7 @@ +{ + "private": true, + "types": "index", + "typesVersions": { + ">=3.1.0-0": { "*": ["ts3.1/*"] } + } +} diff --git a/types/sinon/sinon-tests.ts b/types/sinon/sinon-tests.ts index 31dfa64e22..b892f22980 100644 --- a/types/sinon/sinon-tests.ts +++ b/types/sinon/sinon-tests.ts @@ -293,7 +293,7 @@ function testTypedSpy() { foo(a: number, b: string): number { return 3; } - } + }; const instance = new cls(); const spy = sinon.spy(instance, 'foo'); diff --git a/types/sinon/ts3.1/index.d.ts b/types/sinon/ts3.1/index.d.ts new file mode 100644 index 0000000000..bc91a3285a --- /dev/null +++ b/types/sinon/ts3.1/index.d.ts @@ -0,0 +1,1747 @@ +// sinon uses DOM dependencies which are absent in browser-less environment like node.js +// to avoid compiler errors this monkey patch is used +// see more details in https://github.com/DefinitelyTyped/DefinitelyTyped/issues/11351 +interface Event {} // tslint:disable-line no-empty-interface +interface Document {} // tslint:disable-line no-empty-interface + +declare namespace Sinon { + type MatchArguments = { + [K in keyof T]: SinonMatcher | T[K]; + }; + + interface SinonSpyCallApi { + // Properties + /** + * Array of received arguments. + */ + args: TArgs; + + // Methods + /** + * Returns true if the spy was called at least once with @param obj as this. + * calledOn also accepts a matcher spyCall.calledOn(sinon.match(fn)) (see matchers). + * @param obj + */ + calledOn(obj: any): boolean; + /** + * Returns true if spy was called at least once with the provided arguments. + * Can be used for partial matching, Sinon only checks the provided arguments against actual arguments, + * so a call that received the provided arguments (in the same spots) and possibly others as well will return true. + * @param args + */ + calledWith(...args: MatchArguments): boolean; + /** + * Returns true if spy was called at least once with the provided arguments and no others. + */ + calledWithExactly(...args: MatchArguments): boolean; + /** + * Returns true if spy/stub was called the new operator. + * Beware that this is inferred based on the value of the this object and the spy function’s prototype, + * so it may give false positives if you actively return the right kind of object. + */ + calledWithNew(): boolean; + /** + * Returns true if spy was called at exactly once with the provided arguments. + * @param args + */ + calledOnceWith(...args: MatchArguments): boolean; + calledOnceWithExactly(...args: MatchArguments): boolean; + /** + * Returns true if spy was called with matching arguments (and possibly others). + * This behaves the same as spy.calledWith(sinon.match(arg1), sinon.match(arg2), ...). + * @param args + */ + calledWithMatch(...args: TArgs): boolean; + /** + * Returns true if call did not receive provided arguments. + * @param args + */ + notCalledWith(...args: MatchArguments): boolean; + /** + * Returns true if call did not receive matching arguments. + * This behaves the same as spyCall.notCalledWith(sinon.match(arg1), sinon.match(arg2), ...). + * @param args + */ + notCalledWithMatch(...args: TArgs): boolean; + /** + * Returns true if spy returned the provided value at least once. + * Uses deep comparison for objects and arrays. Use spy.returned(sinon.match.same(obj)) for strict comparison (see matchers). + * @param value + */ + returned(value: TReturnValue|SinonMatcher): boolean; + /** + * Returns true if spy threw an exception at least once. + */ + threw(): boolean; + /** + * Returns true if spy threw an exception of the provided type at least once. + */ + threw(type: string): boolean; + /** + * Returns true if spy threw the provided exception object at least once. + */ + threw(obj: any): boolean; + /** + * Like yield, but with an explicit argument number specifying which callback to call. + * Useful if a function is called with more than one callback, and simply calling the first callback is not desired. + * @param pos + */ + callArg(pos: number): void; + callArgOn(pos: number, obj: any, ...args: any[]): void; + /** + * Like callArg, but with arguments. + */ + callArgWith(pos: number, ...args: any[]): void; + callArgOnWith(pos: number, obj: any, ...args: any[]): void; + /** + * Invoke callbacks passed to the stub with the given arguments. + * If the stub was never called with a function argument, yield throws an error. + * Returns an Array with all callbacks return values in the order they were called, if no error is thrown. + * Also aliased as invokeCallback. + */ + yield(...args: any[]): void; + yieldOn(obj: any, ...args: any[]): void; + /** + * Invokes callbacks passed as a property of an object to the stub. + * Like yield, yieldTo grabs the first matching argument, finds the callback and calls it with the (optional) arguments. + */ + yieldTo(property: string, ...args: any[]): void; + yieldToOn(property: string, obj: any, ...args: any[]): void; + } + + interface SinonSpyCall + extends SinonSpyCallApi { + /** + * The call’s this value. + */ + thisValue: any; + /** + * Exception thrown, if any. + */ + exception: any; + /** + * Return value. + */ + returnValue: TReturnValue; + /** + * This property is a convenience for a call’s callback. + * When the last argument in a call is a Function, then callback will reference that. Otherwise it will be undefined. + */ + callback: Function | undefined; + /** + * This property is a convenience for the last argument of the call. + */ + lastArg: any; + + /** + * Returns true if the spy call occurred before another spy call. + * @param call + */ + calledBefore(call: SinonSpyCall): boolean; + /** + * Returns true if the spy call occurred after another spy call. + * @param call + */ + calledAfter(call: SinonSpyCall): boolean; + } + + interface SinonSpy + extends Pick< + SinonSpyCallApi, + Exclude, 'args'> + > { + // Properties + /** + * The number of recorded calls. + */ + callCount: number; + /** + * true if the spy was called at least once + */ + called: boolean; + /** + * true if the spy was not called + */ + notCalled: boolean; + /** + * true if spy was called exactly once + */ + calledOnce: boolean; + /** + * true if the spy was called exactly twice + */ + calledTwice: boolean; + /** + * true if the spy was called exactly thrice + */ + calledThrice: boolean; + /** + * The first call + */ + firstCall: SinonSpyCall; + /** + * The second call + */ + secondCall: SinonSpyCall; + /** + * The third call + */ + thirdCall: SinonSpyCall; + /** + * The last call + */ + lastCall: SinonSpyCall; + /** + * Array of this objects, spy.thisValues[0] is the this object for the first call. + */ + thisValues: any[]; + /** + * Array of arguments received, spy.args[0] is an array of arguments received in the first call. + */ + args: TArgs[]; + /** + * Array of exception objects thrown, spy.exceptions[0] is the exception thrown by the first call. + * If the call did not throw an error, the value at the call’s location in .exceptions will be undefined. + */ + exceptions: any[]; + /** + * Array of return values, spy.returnValues[0] is the return value of the first call. + * If the call did not explicitly return a value, the value at the call’s location in .returnValues will be undefined. + */ + returnValues: TReturnValue[]; + + // Methods + (...args: any[]): any; + /** + * Returns true if the spy was called before @param anotherSpy + * @param anotherSpy + */ + calledBefore(anotherSpy: SinonSpy): boolean; + /** + * Returns true if the spy was called after @param anotherSpy + * @param anotherSpy + */ + calledAfter(anotherSpy: SinonSpy): boolean; + /** + * Returns true if spy was called before @param anotherSpy, and no spy calls occurred between spy and @param anotherSpy. + * @param anotherSpy + */ + calledImmediatelyBefore(anotherSpy: SinonSpy): boolean; + /** + * Returns true if spy was called after @param anotherSpy, and no spy calls occurred between @param anotherSpy and spy. + * @param anotherSpy + */ + calledImmediatelyAfter(anotherSpy: SinonSpy): boolean; + /** + * Creates a spy that only records calls when the received arguments match those passed to withArgs. + * This is useful to be more expressive in your assertions, where you can access the spy with the same call. + * @param args Expected args + */ + withArgs(...args: MatchArguments): SinonSpy; + /** + * Returns true if the spy was always called with @param obj as this. + * @param obj + */ + alwaysCalledOn(obj: any): boolean; + /** + * Returns true if spy was always called with the provided arguments (and possibly others). + */ + alwaysCalledWith(...args: MatchArguments): boolean; + /** + * Returns true if spy was always called with the exact provided arguments. + * @param args + */ + alwaysCalledWithExactly(...args: MatchArguments): boolean; + /** + * Returns true if spy was always called with matching arguments (and possibly others). + * This behaves the same as spy.alwaysCalledWith(sinon.match(arg1), sinon.match(arg2), ...). + * @param args + */ + alwaysCalledWithMatch(...args: TArgs): boolean; + /** + * Returns true if the spy/stub was never called with the provided arguments. + * @param args + */ + neverCalledWith(...args: MatchArguments): boolean; + /** + * Returns true if the spy/stub was never called with matching arguments. + * This behaves the same as spy.neverCalledWith(sinon.match(arg1), sinon.match(arg2), ...). + * @param args + */ + neverCalledWithMatch(...args: TArgs): boolean; + /** + * Returns true if spy always threw an exception. + */ + alwaysThrew(): boolean; + /** + * Returns true if spy always threw an exception of the provided type. + */ + alwaysThrew(type: string): boolean; + /** + * Returns true if spy always threw the provided exception object. + */ + alwaysThrew(obj: any): boolean; + /** + * Returns true if spy always returned the provided value. + * @param obj + */ + alwaysReturned(obj: any): boolean; + /** + * Invoke callbacks passed to the stub with the given arguments. + * If the stub was never called with a function argument, yield throws an error. + * Returns an Array with all callbacks return values in the order they were called, if no error is thrown. + */ + invokeCallback(...args: TArgs): void; + /** + * Set the displayName of the spy or stub. + * @param name + */ + named(name: string): SinonSpy; + /** + * Returns the nth call. + * Accessing individual calls helps with more detailed behavior verification when the spy is called more than once. + * @param n + */ + getCall(n: number): SinonSpyCall; + /** + * Returns an Array of all calls recorded by the spy. + */ + getCalls(): Array>; + /** + * Resets the state of a spy. + */ + resetHistory(): void; + /** + * Returns the passed format string with the following replacements performed: + * * %n - the name of the spy "spy" by default) + * * %c - the number of times the spy was called, in words ("once", "twice", etc.) + * * %C - a list of string representations of the calls to the spy, with each call prefixed by a newline and four spaces + * * %t - a comma-delimited list of this values the spy was called on + * * %n - the formatted value of the nth argument passed to printf + * * %* - a comma-delimited list of the (non-format string) arguments passed to printf + * * %D - a multi-line list of the arguments received by all calls to the spy + * @param format + * @param args + */ + printf(format: string, ...args: any[]): string; + /** + * Replaces the spy with the original method. Only available if the spy replaced an existing method. + */ + restore(): void; + } + + interface SinonSpyStatic { + /** + * Creates an anonymous function that records arguments, this value, exceptions and return values for all calls. + */ + (): SinonSpy; + /** + * Spies on the provided function + */ + (func: Function): SinonSpy; + /** + * Creates a spy for object.method and replaces the original method with the spy. + * An exception is thrown if the property is not already a function. + * The spy acts exactly like the original method in all cases. + * The original method can be restored by calling object.method.restore(). + * The returned spy is the function object which replaced the original method. spy === object.method. + */ + (obj: T, method: K): T[K] extends ( + ...args: infer TArgs + ) => infer TReturnValue + ? SinonSpy + : SinonSpy; + } + + interface SinonStub + extends SinonSpy { + /** + * Resets the stub’s behaviour to the default behaviour + * You can reset behaviour of all stubs using sinon.resetBehavior() + */ + resetBehavior(): void; + /** + * Resets both behaviour and history of the stub. + * This is equivalent to calling both stub.resetBehavior() and stub.resetHistory() + * Updated in sinon@2.0.0 + * Since sinon@5.0.0 + * As a convenience, you can apply stub.reset() to all stubs using sinon.reset() + */ + reset(): void; + /** + * Causes the stub to return promises using a specific Promise library instead of the global one when using stub.rejects or stub.resolves. + * Returns the stub to allow chaining. + */ + usingPromise(promiseLibrary: any): SinonStub; + + /** + * Makes the stub return the provided @param obj value. + * @param obj + */ + returns(obj: TReturnValue): SinonStub; + /** + * Causes the stub to return the argument at the provided @param index. + * stub.returnsArg(0); causes the stub to return the first argument. + * If the argument at the provided index is not available, prior to sinon@6.1.2, an undefined value will be returned; + * starting from sinon@6.1.2, a TypeError will be thrown. + * @param index + */ + returnsArg(index: number): SinonStub; + /** + * Causes the stub to return its this value. + * Useful for stubbing jQuery-style fluent APIs. + */ + returnsThis(): SinonStub; + /** + * Causes the stub to return a Promise which resolves to the provided value. + * When constructing the Promise, sinon uses the Promise.resolve method. + * You are responsible for providing a polyfill in environments which do not provide Promise. + * The Promise library can be overwritten using the usingPromise method. + * Since sinon@2.0.0 + */ + resolves(value?: any): SinonStub; + /** + * Causes the stub to return a Promise which resolves to the argument at the provided index. + * stub.resolvesArg(0); causes the stub to return a Promise which resolves to the first argument. + * If the argument at the provided index is not available, a TypeError will be thrown. + */ + resolvesArg(index: number): SinonStub; + /** + * Causes the stub to return a Promise which resolves to its this value. + */ + resolvesThis(): SinonStub; + /** + * Causes the stub to throw an exception (Error). + * @param type + */ + throws(type?: string): SinonStub; + /** + * Causes the stub to throw the provided exception object. + */ + throws(obj: any): SinonStub; + /** + * Causes the stub to throw the argument at the provided index. + * stub.throwsArg(0); causes the stub to throw the first argument as the exception. + * If the argument at the provided index is not available, a TypeError will be thrown. + * Since sinon@2.3.0 + * @param index + */ + throwsArg(index: number): SinonStub; + throwsException(type?: string): SinonStub; + throwsException(obj: any): SinonStub; + /** + * Causes the stub to return a Promise which rejects with an exception (Error). + * When constructing the Promise, sinon uses the Promise.reject method. + * You are responsible for providing a polyfill in environments which do not provide Promise. + * The Promise library can be overwritten using the usingPromise method. + * Since sinon@2.0.0 + */ + rejects(): SinonStub; + /** + * Causes the stub to return a Promise which rejects with an exception of the provided type. + * Since sinon@2.0.0 + */ + rejects(errorType: string): SinonStub; + /** + * Causes the stub to return a Promise which rejects with the provided exception object. + * Since sinon@2.0.0 + */ + rejects(value: any): SinonStub; + /** + * Causes the stub to call the argument at the provided index as a callback function. + * stub.callsArg(0); causes the stub to call the first argument as a callback. + * If the argument at the provided index is not available or is not a function, a TypeError will be thrown. + */ + callsArg(index: number): SinonStub; + /** + * Causes the original method wrapped into the stub to be called when none of the conditional stubs are matched. + */ + callThrough(): SinonStub; + /** + * Like stub.callsArg(index); but with an additional parameter to pass the this context. + * @param index + * @param context + */ + callsArgOn(index: number, context: any): SinonStub; + /** + * Like callsArg, but with arguments to pass to the callback. + * @param index + * @param args + */ + callsArgWith(index: number, ...args: any[]): SinonStub; + /** + * Like above but with an additional parameter to pass the this context. + * @param index + * @param context + * @param args + */ + callsArgOnWith( + index: number, + context: any, + ...args: any[] + ): SinonStub; + /** + * Same as their corresponding non-Async counterparts, but with callback being deferred at called after all instructions in the current call stack are processed. + * In Node environment the callback is deferred with process.nextTick. + * In a browser the callback is deferred with setTimeout(callback, 0). + * @param index + */ + callsArgAsync(index: number): SinonStub; + /** + * Same as their corresponding non-Async counterparts, but with callback being deferred at called after all instructions in the current call stack are processed. + * In Node environment the callback is deferred with process.nextTick. + * In a browser the callback is deferred with setTimeout(callback, 0). + * @param index + * @param context + */ + callsArgOnAsync(index: number, context: any): SinonStub; + /** + * Same as their corresponding non-Async counterparts, but with callback being deferred at called after all instructions in the current call stack are processed. + * In Node environment the callback is deferred with process.nextTick. + * In a browser the callback is deferred with setTimeout(callback, 0). + */ + callsArgWithAsync(index: number, ...args: any[]): SinonStub; + /** + * Same as their corresponding non-Async counterparts, but with callback being deferred at called after all instructions in the current call stack are processed. + * In Node environment the callback is deferred with process.nextTick. + * In a browser the callback is deferred with setTimeout(callback, 0). + */ + callsArgOnWithAsync( + index: number, + context: any, + ...args: any[] + ): SinonStub; + /** + * Makes the stub call the provided @param func when invoked. + * @param func + */ + callsFake(func: (...args: TArgs) => TReturnValue): SinonStub; + /** + * Replaces a new getter for this stub. + */ + get(func: () => any): SinonStub; + /** + * Defines a new setter for this stub. + * @param func + */ + set(func: (v: any) => void): SinonStub; + /** + * Defines the behavior of the stub on the @param n call. Useful for testing sequential interactions. + * There are methods onFirstCall, onSecondCall,onThirdCall to make stub definitions read more naturally. + * onCall can be combined with all of the behavior defining methods in this section. In particular, it can be used together with withArgs. + * @param n + */ + onCall(n: number): SinonStub; + /** + * Alias for stub.onCall(0); + */ + onFirstCall(): SinonStub; + /** + * Alias for stub.onCall(1); + */ + onSecondCall(): SinonStub; + /** + * Alias for stub.onCall(2); + */ + onThirdCall(): SinonStub; + /** + * Defines a new value for this stub. + * @param val + */ + value(val: any): SinonStub; + /** + * Set the displayName of the spy or stub. + * @param name + */ + named(name: string): SinonStub; + /** + * Similar to callsArg. + * Causes the stub to call the first callback it receives with the provided arguments (if any). + * If a method accepts more than one callback, you need to use callsArg to have the stub invoke other callbacks than the first one. + */ + yields(...args: any[]): SinonStub; + /** + * Like above but with an additional parameter to pass the this context. + */ + yieldsOn(context: any, ...args: any[]): SinonStub; + yieldsRight(...args: any[]): SinonStub; + /** + * Causes the spy to invoke a callback passed as a property of an object to the spy. + * Like yields, yieldsTo grabs the first matching argument, finds the callback and calls it with the (optional) arguments. + * @param property + * @param args + */ + yieldsTo(property: string, ...args: any[]): SinonStub; + /** + * Like above but with an additional parameter to pass the this context. + */ + yieldsToOn( + property: string, + context: any, + ...args: any[] + ): SinonStub; + /** + * Same as their corresponding non-Async counterparts, but with callback being deferred at called after all instructions in the current call stack are processed. + * In Node environment the callback is deferred with process.nextTick. + * In a browser the callback is deferred with setTimeout(callback, 0). + * @param args + */ + yieldsAsync(...args: any[]): SinonStub; + /** + * Same as their corresponding non-Async counterparts, but with callback being deferred at called after all instructions in the current call stack are processed. + * In Node environment the callback is deferred with process.nextTick. + * In a browser the callback is deferred with setTimeout(callback, 0). + * @param context + * @param args + */ + yieldsOnAsync(context: any, ...args: any[]): SinonStub; + /** + * Same as their corresponding non-Async counterparts, but with callback being deferred at called after all instructions in the current call stack are processed. + * In Node environment the callback is deferred with process.nextTick. + * In a browser the callback is deferred with setTimeout(callback, 0). + * @param property + * @param args + */ + yieldsToAsync(property: string, ...args: any[]): SinonStub; + /** + * Same as their corresponding non-Async counterparts, but with callback being deferred at called after all instructions in the current call stack are processed. + * In Node environment the callback is deferred with process.nextTick. + * In a browser the callback is deferred with setTimeout(callback, 0). + * @param property + * @param context + * @param args + */ + yieldsToOnAsync( + property: string, + context: any, + ...args: any[] + ): SinonStub; + /** + * Stubs the method only for the provided arguments. + * This is useful to be more expressive in your assertions, where you can access the spy with the same call. + * It is also useful to create a stub that can act differently in response to different arguments. + * @param args + */ + withArgs(...args: MatchArguments): SinonStub; + } + + interface SinonStubStatic { + /** + * Creates an anonymous stub function + */ + (): SinonStub; + /** + * Stubs all the object’s methods. + * Note that it’s usually better practice to stub individual methods, particularly on objects that you don’t understand or control all the methods for (e.g. library dependencies). + * Stubbing individual methods tests intent more precisely and is less susceptible to unexpected behavior as the object’s code evolves. + * If you want to create a stub object of MyConstructor, but don’t want the constructor to be invoked, use this utility function. + */ + (obj: T): SinonStubbedInstance; + /** + * Replaces obj.method with a stub function. + * An exception is thrown if the property is not already a function. + * The original function can be restored by calling object.method.restore(); (or stub.restore();). + */ + (obj: T, method: K): T[K] extends ( + ...args: infer TArgs + ) => infer TReturnValue + ? SinonStub + : SinonStub; + } + + interface SinonExpectation extends SinonStub { + /** + * Specify the minimum amount of calls expected. + */ + atLeast(n: number): SinonExpectation; + /** + * Specify the maximum amount of calls expected. + * @param n + */ + atMost(n: number): SinonExpectation; + /** + * Expect the method to never be called. + */ + never(): SinonExpectation; + /** + * Expect the method to be called exactly once. + */ + once(): SinonExpectation; + /** + * Expect the method to be called exactly twice. + */ + twice(): SinonExpectation; + /** + * Expect the method to be called exactly thrice. + */ + thrice(): SinonExpectation; + /** + * Expect the method to be called exactly @param n times. + */ + exactly(n: number): SinonExpectation; + /** + * Expect the method to be called with the provided arguments and possibly others. + * An expectation instance only holds onto a single set of arguments specified with withArgs. + * Subsequent calls will overwrite the previously-specified set of arguments (even if they are different), + * so it is generally not intended that this method be invoked more than once per test case. + * @param args + */ + withArgs(...args: any[]): SinonExpectation; + /** + * Expect the method to be called with the provided arguments and no others. + * An expectation instance only holds onto a single set of arguments specified with withExactArgs. + * Subsequent calls will overwrite the previously-specified set of arguments (even if they are different), + * so it is generally not intended that this method be invoked more than once per test case. + * @param args + */ + withExactArgs(...args: any[]): SinonExpectation; + on(obj: any): SinonExpectation; + /** + * Verifies all expectations on the mock. + * If any expectation is not satisfied, an exception is thrown. + * Also restores the mocked methods. + */ + verify(): SinonExpectation; + /** + * Restores all mocked methods. + */ + restore(): void; + } + + interface SinonExpectationStatic { + /** + * Creates an expectation without a mock object, basically an anonymous mock function. + * Method name is optional and is used in exception messages to make them more readable. + * @param methodName + */ + create(methodName?: string): SinonExpectation; + } + + interface SinonMock { + /** + * Overrides obj.method with a mock function and returns it. + */ + expects(method: string): SinonExpectation; + /** + * Restores all mocked methods. + */ + restore(): void; + /** + * Verifies all expectations on the mock. + * If any expectation is not satisfied, an exception is thrown. + * Also restores the mocked methods. + */ + verify(): void; + } + + interface SinonMockStatic { + (): SinonExpectation; + /** + * Creates a mock for the provided object. + * Does not change the object, but returns a mock object to set expectations on the object’s methods. + */ + (obj: any): SinonMock; + } + + type SinonTimerId = number | { id: number }; + + interface SinonFakeTimers { + now: number; + + setTimeout( + callback: (...args: any[]) => void, + timeout: number, + ...args: any[] + ): SinonTimerId; + clearTimeout(id: SinonTimerId): void; + setInterval( + callback: (...args: any[]) => void, + timeout: number, + ...args: any[] + ): SinonTimerId; + clearInterval(id: SinonTimerId): void; + setImmediate( + callback: (...args: any[]) => void, + ...args: any[] + ): SinonTimerId; + clearImmediate(id: SinonTimerId): void; + requestAnimationFrame(callback: (...args: any[]) => void): number; + cancelAnimationFrame(id: number): void; + nextTick(callback: () => void): void; + + /** + * Tick the clock ahead time milliseconds. + * Causes all timers scheduled within the affected time range to be called. + * time may be the number of milliseconds to advance the clock by or a human-readable string. + * Valid string formats are “08” for eight seconds, “01:00” for one minute and “02:34:10” for two hours, 34 minutes and ten seconds. + * time may be negative, which causes the clock to change but won’t fire any callbacks. + * @param ms + */ + tick(ms: number | string): void; + /** + * Advances the clock to the the moment of the first scheduled timer, firing it. + */ + next(): void; + /** + * This runs all pending timers until there are none remaining. If new timers are added while it is executing they will be run as well. + * This makes it easier to run asynchronous tests to completion without worrying about the number of timers they use, or the delays in those timers. + */ + runAll(): void; + runToLast(): void; + reset(): void; + runMicrotasks(): void; + runToFrame(): void; + + Date(): Date; + Date(year: number): Date; + Date(year: number, month: number): Date; + Date(year: number, month: number, day: number): Date; + Date(year: number, month: number, day: number, hour: number): Date; + Date( + year: number, + month: number, + day: number, + hour: number, + minute: number + ): Date; + Date( + year: number, + month: number, + day: number, + hour: number, + minute: number, + second: number + ): Date; + Date( + year: number, + month: number, + day: number, + hour: number, + minute: number, + second: number, + ms: number + ): Date; + + /** + * Restore the faked methods. + * Call in e.g. tearDown. + */ + restore(): void; + uninstall(): void; + + /** + * Simulate the user changing the system clock while your program is running. It changes the 'now' timestamp + * without affecting timers, intervals or immediates. + * @param now The new 'now' in unix milliseconds + */ + setSystemTime(now: number): void; + /** + * Simulate the user changing the system clock while your program is running. It changes the 'now' timestamp + * without affecting timers, intervals or immediates. + * @param now The new 'now' as a JavaScript Date + */ + setSystemTime(date: Date): void; + } + + interface SinonFakeTimersConfig { + now: number | Date; + toFake: string[]; + shouldAdvanceTime: boolean; + } + + interface SinonFakeUploadProgress { + eventListeners: { + progress: any[]; + load: any[]; + abort: any[]; + error: any[]; + }; + + addEventListener(event: string, listener: (e: Event) => any): void; + removeEventListener(event: string, listener: (e: Event) => any): void; + dispatchEvent(event: Event): void; + } + + interface SinonFakeXMLHttpRequest { + // Properties + /** + * The URL set on the request object. + */ + url: string; + /** + * The request method as a string. + */ + method: string; + /** + * An object of all request headers, i.e.: + */ + requestHeaders: any; + /** + * The request body + */ + requestBody: string; + /** + * The request’s status code. + * undefined if the request has not been handled (see respond below) + */ + status: number; + /** + * Only populated if the respond method is called (see below). + */ + statusText: string; + /** + * Whether or not the request is asynchronous. + */ + async: boolean; + /** + * Username, if any. + */ + username: string; + /** + * Password, if any. + */ + password: string; + withCredentials: boolean; + upload: SinonFakeUploadProgress; + /** + * When using respond, this property is populated with a parsed document if response headers indicate as much (see the spec) + */ + responseXML: Document; + /** + * The value of the given response header, if the request has been responded to (see respond). + * @param header + */ + getResponseHeader(header: string): string; + /** + * All response headers as an object. + */ + getAllResponseHeaders(): any; + + // Methods + /** + * Sets response headers (e.g. { "Content-Type": "text/html", ... }, updates the readyState property and fires onreadystatechange. + * @param headers + */ + setResponseHeaders(headers: any): void; + /** + * Sets the respond body, updates the readyState property and fires onreadystatechange. + * Additionally, populates responseXML with a parsed document if response headers indicate as much. + */ + setResponseBody(body: string): void; + /** + * Calls the above three methods. + */ + respond(status: number, headers: any, body: string): void; + autoRespond(ms: number): void; + /** + * Simulates a network error on the request. The onerror handler will be called and the status will be 0. + */ + error(): void; + onerror(): void; + } + + interface SinonFakeXMLHttpRequestStatic { + new (): SinonFakeXMLHttpRequest; + /** + * Default false. + * When set to true, Sinon will check added filters if certain requests should be “unfaked” + */ + useFilters: boolean; + /** + * Add a filter that will decide whether or not to fake a request. + * The filter will be called when xhr.open is called, with the exact same arguments (method, url, async, username, password). + * If the filter returns true, the request will not be faked. + * @param filter + */ + addFilter( + filter: ( + method: string, + url: string, + async: boolean, + username: string, + password: string + ) => boolean + ): void; + /** + * By assigning a function to the onCreate property of the returned object from useFakeXMLHttpRequest() + * you can subscribe to newly created FakeXMLHttpRequest objects. See below for the fake xhr object API. + * Using this observer means you can still reach objects created by e.g. jQuery.ajax (or other abstractions/frameworks). + * @param xhr + */ + onCreate(xhr: SinonFakeXMLHttpRequest): void; + /** + * Restore original function(s). + */ + restore(): void; + } + + interface SinonFakeServer extends SinonFakeServerOptions { + // Properties + /** + * Used internally to determine the HTTP method used with the provided request. + * By default this method simply returns request.method. + * When server.fakeHTTPMethods is true, the method will return the value of the _method parameter if the method is “POST”. + * This method can be overridden to provide custom behavior. + * @param request + */ + getHTTPMethod(request: SinonFakeXMLHttpRequest): string; + /** + * You can inspect the server.requests to verify request ordering, find unmatched requests or check that no requests has been done. + * server.requests is an array of all the FakeXMLHttpRequest objects that have been created. + */ + requests: SinonFakeXMLHttpRequest[]; + + // Methods + /** + * Causes the server to respond to any request not matched by another response with the provided data. The default catch-all response is [404, {}, ""]. + * A String representing the response body + * An Array with status, headers and response body, e.g. [200, { "Content-Type": "text/html", "Content-Length": 2 }, "OK"] + * A Function. + * Default status is 200 and default headers are none. + * When the response is a Function, it will be passed the request object. You must manually call respond on it to complete the request. + * @param body A String representing the response body + */ + respondWith(body: string): void; + /** + * Causes the server to respond to any request not matched by another response with the provided data. The default catch-all response is [404, {}, ""]. + * Default status is 200 and default headers are none. + * When the response is a Function, it will be passed the request object. You must manually call respond on it to complete the request. + * @param response An Array with status, headers and response body, e.g. [200, { "Content-Type": "text/html", "Content-Length": 2 }, "OK"] + */ + respondWith(response: any[]): void; + /** + * Causes the server to respond to any request not matched by another response with the provided data. The default catch-all response is [404, {}, ""]. + * Default status is 200 and default headers are none. + * When the response is a Function, it will be passed the request object. You must manually call respond on it to complete the request. + * @param fn A Function. + */ + respondWith(fn: (xhr: SinonFakeXMLHttpRequest) => void): void; + /** + * Responds to all requests to given URL, e.g. /posts/1. + */ + respondWith(url: string, body: string): void; + /** + * Responds to all requests to given URL, e.g. /posts/1. + */ + respondWith(url: string, response: any[]): void; + /** + * Responds to all requests to given URL, e.g. /posts/1. + */ + respondWith( + url: string, + fn: (xhr: SinonFakeXMLHttpRequest) => void + ): void; + /** + * Responds to all method requests to the given URL with the given response. + * method is an HTTP verb. + */ + respondWith(method: string, url: string, body: string): void; + /** + * Responds to all method requests to the given URL with the given response. + * method is an HTTP verb. + */ + respondWith(method: string, url: string, response: any[]): void; + /** + * Responds to all method requests to the given URL with the given response. + * method is an HTTP verb. + */ + respondWith( + method: string, + url: string, + fn: (xhr: SinonFakeXMLHttpRequest) => void + ): void; + /** + * URL may be a regular expression, e.g. /\\/post\\//\\d+ + * If the response is a Function, it will be passed any capture groups from the regular expression along with the XMLHttpRequest object: + */ + respondWith(url: RegExp, body: string): void; + /** + * URL may be a regular expression, e.g. /\\/post\\//\\d+ + * If the response is a Function, it will be passed any capture groups from the regular expression along with the XMLHttpRequest object: + */ + respondWith(url: RegExp, response: any[]): void; + /** + * URL may be a regular expression, e.g. /\\/post\\//\\d+ + * If the response is a Function, it will be passed any capture groups from the regular expression along with the XMLHttpRequest object: + */ + respondWith( + url: RegExp, + fn: (xhr: SinonFakeXMLHttpRequest) => void + ): void; + /** + * Responds to all method requests to URLs matching the regular expression. + */ + respondWith(method: string, url: RegExp, body: string): void; + /** + * Responds to all method requests to URLs matching the regular expression. + */ + respondWith(method: string, url: RegExp, response: any[]): void; + /** + * Responds to all method requests to URLs matching the regular expression. + */ + respondWith( + method: string, + url: RegExp, + fn: (xhr: SinonFakeXMLHttpRequest) => void + ): void; + /** + * Causes all queued asynchronous requests to receive a response. + * If none of the responses added through respondWith match, the default response is [404, {}, ""]. + * Synchronous requests are responded to immediately, so make sure to call respondWith upfront. + * If called with arguments, respondWith will be called with those arguments before responding to requests. + */ + respond(): void; + restore(): void; + } + + interface SinonFakeServerOptions { + /** + * When set to true, causes the server to automatically respond to incoming requests after a timeout. + * The default timeout is 10ms but you can control it through the autoRespondAfter property. + * Note that this feature is intended to help during mockup development, and is not suitable for use in tests. + */ + autoRespond: boolean; + /** + * When autoRespond is true, respond to requests after this number of milliseconds. Default is 10. + */ + autoRespondAfter: number; + /** + * If set to true, server will find _method parameter in POST body and recognize that as the actual method. + * Supports a pattern common to Ruby on Rails applications. For custom HTTP method faking, override server.getHTTPMethod(request). + */ + fakeHTTPMethods: boolean; + /** + * If set, the server will respond to every request immediately and synchronously. + * This is ideal for faking the server from within a test without having to call server.respond() after each request made in that test. + * As this is synchronous and immediate, this is not suitable for simulating actual network latency in tests or mockups. + * To simulate network latency with automatic responses, see server.autoRespond and server.autoRespondAfter. + */ + respondImmediately: boolean; + } + + interface SinonFakeServerStatic { + create(options?: Partial): SinonFakeServer; + } + + interface SinonExposeOptions { + prefix: string; + includeFail: boolean; + } + + interface SinonAssert { + // Properties + /** + * Defaults to AssertError. + */ + failException: string; + /** + * Every assertion fails by calling this method. + * By default it throws an error of type sinon.assert.failException. + * If the test framework looks for assertion errors by checking for a specific exception, you can simply override the kind of exception thrown. + * If that does not fit with your testing framework of choice, override the fail method to do the right thing. + */ + fail(message?: string): void; // Overridable + /** + * Called every time assertion passes. + * Default implementation does nothing. + */ + pass(assertion: any): void; // Overridable + + // Methods + /** + * Passes if spy was never called + * @param spy + */ + notCalled(spy: SinonSpy): void; + /** + * Passes if spy was called at least once. + */ + called(spy: SinonSpy): void; + /** + * Passes if spy was called once and only once. + */ + calledOnce(spy: SinonSpy): void; + /** + * Passes if spy was called exactly twice. + */ + calledTwice(spy: SinonSpy): void; + /** + * Passes if spy was called exactly three times. + */ + calledThrice(spy: SinonSpy): void; + /** + * Passes if spy was called exactly num times. + */ + callCount(spy: SinonSpy, count: number): void; + /** + * Passes if provided spies were called in the specified order. + * @param spies + */ + callOrder(...spies: SinonSpy[]): void; + /** + * Passes if spy was ever called with obj as its this value. + * It’s possible to assert on a dedicated spy call: sinon.assert.calledOn(spy.firstCall, arg1, arg2, ...);. + */ + calledOn(spyOrSpyCall: SinonSpy | SinonSpyCall, obj: any): void; + /** + * Passes if spy was always called with obj as its this value. + */ + alwaysCalledOn(spy: SinonSpy, obj: any): void; + /** + * Passes if spy was called with the provided arguments. + * It’s possible to assert on a dedicated spy call: sinon.assert.calledWith(spy.firstCall, arg1, arg2, ...);. + * @param spyOrSpyCall + * @param args + */ + calledWith(spyOrSpyCall: SinonSpy | SinonSpyCall, ...args: any[]): void; + /** + * Passes if spy was always called with the provided arguments. + * @param spy + * @param args + */ + alwaysCalledWith(spy: SinonSpy, ...args: any[]): void; + /** + * Passes if spy was never called with the provided arguments. + * @param spy + * @param args + */ + neverCalledWith(spy: SinonSpy, ...args: any[]): void; + /** + * Passes if spy was called with the provided arguments and no others. + * It’s possible to assert on a dedicated spy call: sinon.assert.calledWithExactly(spy.getCall(1), arg1, arg2, ...);. + * @param spyOrSpyCall + * @param args + */ + calledWithExactly( + spyOrSpyCall: SinonSpy | SinonSpyCall, + ...args: any[] + ): void; + /** + * Passes if spy was always called with the provided arguments and no others. + */ + alwaysCalledWithExactly(spy: SinonSpy, ...args: any[]): void; + /** + * Passes if spy was called with matching arguments. + * This behaves the same way as sinon.assert.calledWith(spy, sinon.match(arg1), sinon.match(arg2), ...). + * It’s possible to assert on a dedicated spy call: sinon.assert.calledWithMatch(spy.secondCall, arg1, arg2, ...);. + */ + calledWithMatch( + spyOrSpyCall: SinonSpy | SinonSpyCall, + ...args: any[] + ): void; + /** + * Passes if spy was always called with matching arguments. + * This behaves the same way as sinon.assert.alwaysCalledWith(spy, sinon.match(arg1), sinon.match(arg2), ...). + */ + alwaysCalledWithMatch(spy: SinonSpy, ...args: any[]): void; + /** + * Passes if spy was never called with matching arguments. + * This behaves the same way as sinon.assert.neverCalledWith(spy, sinon.match(arg1), sinon.match(arg2), ...). + * @param spy + * @param args + */ + neverCalledWithMatch(spy: SinonSpy, ...args: any[]): void; + /** + * Passes if spy was called with the new operator. + * It’s possible to assert on a dedicated spy call: sinon.assert.calledWithNew(spy.secondCall, arg1, arg2, ...);. + * @param spyOrSpyCall + */ + calledWithNew(spyOrSpyCall: SinonSpy | SinonSpyCall): void; + /** + * Passes if spy threw any exception. + */ + threw(spyOrSpyCall: SinonSpy | SinonSpyCall): void; + /** + * Passes if spy threw the given exception. + * The exception is an actual object. + * It’s possible to assert on a dedicated spy call: sinon.assert.threw(spy.thirdCall, exception);. + */ + threw(spyOrSpyCall: SinonSpy | SinonSpyCall, exception: string): void; + /** + * Passes if spy threw the given exception. + * The exception is a String denoting its type. + * It’s possible to assert on a dedicated spy call: sinon.assert.threw(spy.thirdCall, exception);. + */ + threw(spyOrSpyCall: SinonSpy | SinonSpyCall, exception: any): void; + /** + * Like threw, only required for all calls to the spy. + */ + alwaysThrew(spy: SinonSpy): void; + /** + * Like threw, only required for all calls to the spy. + */ + alwaysThrew(spy: SinonSpy, exception: string): void; + /** + * Like threw, only required for all calls to the spy. + */ + alwaysThrew(spy: SinonSpy, exception: any): void; + /** + * Uses sinon.match to test if the arguments can be considered a match. + */ + match(actual: any, expected: any): void; + /** + * Exposes assertions into another object, to better integrate with the test framework. + * For instance, JsTestDriver uses global assertions, and to make Sinon.JS assertions appear alongside them, you can do. + * @example sinon.assert.expose(this); + * This will give you assertCalled(spy),assertCallOrder(spy1, spy2, ...) and so on. + * The method accepts an optional options object with two options. + */ + expose(obj: any, options?: Partial): void; + } + + interface SinonMatcher { + /** + * All matchers implement and and or. This allows to logically combine mutliple matchers. + * The result is a new matchers that requires both (and) or one of the matchers (or) to return true. + * @example var stringOrNumber = sinon.match.string.or(sinon.match.number); + * var bookWithPages = sinon.match.instanceOf(Book).and(sinon.match.has("pages")); + */ + and(expr: SinonMatcher): SinonMatcher; + /** + * All matchers implement and and or. This allows to logically combine mutliple matchers. + * The result is a new matchers that requires both (and) or one of the matchers (or) to return true. + * @example var stringOrNumber = sinon.match.string.or(sinon.match.number); + * var bookWithPages = sinon.match.instanceOf(Book).and(sinon.match.has("pages")); + */ + or(expr: SinonMatcher): SinonMatcher; + test(val: any): boolean; + } + + interface SinonArrayMatcher extends SinonMatcher { + /** + * Requires an Array to be deep equal another one. + */ + deepEquals(expected: any[]): SinonMatcher; + /** + * Requires an Array to start with the same values as another one. + */ + startsWith(expected: any[]): SinonMatcher; + /** + * Requires an Array to end with the same values as another one. + */ + endsWith(expected: any[]): SinonMatcher; + /** + * Requires an Array to contain each one of the values the given array has. + */ + contains(expected: any[]): SinonMatcher; + } + + interface SimplifiedSet { + has(el: any): boolean; + } + + interface SimplifiedMap extends SimplifiedSet { + get(key: any): any; + } + + interface SinonMapMatcher extends SinonMatcher { + /** + * Requires a Map to be deep equal another one. + */ + deepEquals(expected: SimplifiedMap): SinonMatcher; + /** + * Requires a Map to contain each one of the items the given map has. + */ + contains(expected: SimplifiedMap): SinonMatcher; + } + + interface SinonSetMatcher extends SinonMatcher { + /** + * Requires a Set to be deep equal another one. + */ + deepEquals(expected: SimplifiedSet): SinonMatcher; + /** + * Requires a Set to contain each one of the items the given set has. + */ + contains(expected: SimplifiedSet): SinonMatcher; + } + + interface SinonMatch { + /** + * Requires the value to be == to the given number. + */ + (value: number): SinonMatcher; + /** + * Requires the value to be a string and have the expectation as a substring. + */ + (value: string): SinonMatcher; + /** + * Requires the value to be a string and match the given regular expression. + */ + (expr: RegExp): SinonMatcher; + /** + * See custom matchers. + */ + (callback: (value: any) => boolean, message?: string): SinonMatcher; + /** + * Requires the value to be not null or undefined and have at least the same properties as expectation. + * This supports nested matchers. + */ + (obj: object): SinonMatcher; + /** + * Matches anything. + */ + any: SinonMatcher; + /** + * Requires the value to be defined. + */ + defined: SinonMatcher; + /** + * Requires the value to be truthy. + */ + truthy: SinonMatcher; + /** + * Requires the value to be falsy. + */ + falsy: SinonMatcher; + /** + * Requires the value to be a Boolean + */ + bool: SinonMatcher; + /** + * Requires the value to be a Number. + */ + number: SinonMatcher; + /** + * Requires the value to be a String. + */ + string: SinonMatcher; + /** + * Requires the value to be an Object. + */ + object: SinonMatcher; + /** + * Requires the value to be a Function. + */ + func: SinonMatcher; + /** + * Requires the value to be a Map. + */ + map: SinonMapMatcher; + /** + * Requires the value to be a Set. + */ + set: SinonSetMatcher; + /** + * Requires the value to be an Array. + */ + array: SinonArrayMatcher; + /** + * Requires the value to be a regular expression. + */ + regexp: SinonMatcher; + /** + * Requires the value to be a Date object. + */ + date: SinonMatcher; + /** + * Requires the value to be a Symbol. + */ + symbol: SinonMatcher; + /** + * Requires the value to strictly equal ref. + */ + same(obj: any): SinonMatcher; + /** + * Requires the value to be of the given type, where type can be one of "undefined", "null", "boolean", "number", "string", "object", "function", "array", "regexp", "date" or "symbol". + */ + typeOf(type: string): SinonMatcher; + /** + * Requires the value to be an instance of the given type. + */ + instanceOf(type: any): SinonMatcher; + /** + * Requires the value to define the given property. + * The property might be inherited via the prototype chain. + * If the optional expectation is given, the value of the property is deeply compared with the expectation. + * The expectation can be another matcher. + * @param property + * @param expect + */ + has(property: string, expect?: any): SinonMatcher; + /** + * Same as sinon.match.has but the property must be defined by the value itself. Inherited properties are ignored. + * @param property + * @param expect + */ + hasOwn(property: string, expect?: any): SinonMatcher; + /** + * Requires the value to define the given propertyPath. Dot (prop.prop) and bracket (prop[0]) notations are supported as in Lodash.get. + * The propertyPath might be inherited via the prototype chain. + * If the optional expectation is given, the value at the propertyPath is deeply compared with the expectation. + * The expectation can be another matcher. + */ + hasNested(path: string, expect?: any): SinonMatcher; + /** + * Requires every element of an Array, Set or Map, or alternatively every value of an Object to match the given matcher. + */ + every(matcher: SinonMatcher): SinonMatcher; + /** + * Requires any element of an Array, Set or Map, or alternatively any value of an Object to match the given matcher. + */ + some(matcher: SinonMatcher): SinonMatcher; + } + + interface SinonSandboxConfig { + /** + * The sandbox’s methods can be injected into another object for convenience. + * The injectInto configuration option can name an object to add properties to. + */ + injectInto: object | null; + /** + * What properties to inject. + * Note that simply naming “server” here is not sufficient to have a server property show up in the target object, + * you also have to set useFakeServer to true. + */ + properties: string[]; + /** + * If set to true, the sandbox will have a clock property. + * You can optionally pass in a configuration object that follows the specification for fake timers, such as { toFake: ["setTimeout", "setInterval"] }. + */ + useFakeTimers: boolean | Partial; + /** + * If true, server and requests properties are added to the sandbox. Can also be an object to use for fake server. + * The default one is sinon.fakeServer, but if you’re using jQuery 1.3.x or some other library that does not set the XHR’s onreadystatechange handler, + * you might want to do: + */ + useFakeServer: boolean | SinonFakeServer; + } + + /** + * Stubbed type of an object with members replaced by stubs. + * + * @template TType Type being stubbed. + */ + type StubbableType = Function & { prototype: TType }; + + /** + * An instance of a stubbed object type with functions replaced by stubs. + * + * @template TType Object type being stubbed. + */ + type SinonStubbedInstance = { + [P in keyof TType]: SinonStubbedMember + }; + + /** + * Replaces a type with a Sinon stub if it's a function. + */ + type SinonStubbedMember = T extends Function ? SinonStub : T; + + interface SinonFake { + /** + * Creates a basic fake, with no behavior + */ + (): SinonSpy; + /** + * Wraps an existing Function to record all interactions, while leaving it up to the func to provide the behavior. + * This is useful when complex behavior not covered by the sinon.fake.* methods is required or when wrapping an existing function or method. + */ + (fn: Function): SinonSpy; + /** + * Creates a fake that returns the val argument + * @param val Returned value + */ + returns(val: any): SinonSpy; + /** + * Creates a fake that throws an Error with the provided value as the message property. + * If an Error is passed as the val argument, then that will be the thrown value. If any other value is passed, then that will be used for the message property of the thrown Error. + * @param val Returned value or throw value if an Error + */ + throws(val: Error | string): SinonSpy; + /** + * Creates a fake that returns a resolved Promise for the passed value. + * @param val Resolved promise + */ + resolves(val: any): SinonSpy; + /** + * Creates a fake that returns a rejected Promise for the passed value. + * If an Error is passed as the value argument, then that will be the value of the promise. + * If any other value is passed, then that will be used for the message property of the Error returned by the promise. + * @param val Rejected promise + */ + rejects(val: any): SinonSpy; + /** + * fake expects the last argument to be a callback and will invoke it with the given arguments. + */ + yields(...args: any[]): SinonSpy; + /** + * fake expects the last argument to be a callback and will invoke it asynchronously with the given arguments. + */ + yieldsAsync(...args: any[]): SinonSpy; + } + + interface SinonSandbox { + /** + * A convenience reference for sinon.assert + * Since sinon@2.0.0 + */ + assert: SinonAssert; + clock: SinonFakeTimers; + requests: SinonFakeXMLHttpRequest[]; + server: SinonFakeServer; + /** + * Works exactly like sinon.spy + */ + spy: SinonSpyStatic; + /** + * Works exactly like sinon.stub. + */ + stub: SinonStubStatic; + /** + * Works exactly like sinon.mock + */ + mock: SinonMockStatic; + + /** + * * No param : Causes Sinon to replace the global setTimeout, clearTimeout, setInterval, clearInterval, setImmediate, clearImmediate, process.hrtime, performance.now(when available) + * and Date with a custom implementation which is bound to the returned clock object. + * Starts the clock at the UNIX epoch (timestamp of 0). + * * Now : As above, but rather than starting the clock with a timestamp of 0, start at the provided timestamp now. + * Since sinon@2.0.0 + * You can also pass in a Date object, and its getTime() will be used for the starting timestamp. + * * Config : As above, but allows further configuration options, some of which are: + * * config.now - Number/Date - installs lolex with the specified unix epoch (default: 0) + * * config.toFake - String[ ] - an array with explicit function names to fake. + * By default lolex will automatically fake all methods except process.nextTick. You could, however, still fake nextTick by providing it explicitly + * * config.shouldAdvanceTime - Boolean - tells lolex to increment mocked time automatically based on the real system time shift (default: false) + * * Please visit the lolex.install documentation for the full feature set. + * * Important note: when faking nextTick, normal calls to process.nextTick() would not execute automatically as they would during normal event-loop phases. + * You would have to call either clock.next(), clock.tick(), clock.runAll() or clock.runToLast() (see example below). Please refer to the lolex documentation for more information. + * @param config + */ + useFakeTimers( + config?: number | Date | Partial + ): SinonFakeTimers; + /** + * Causes Sinon to replace the native XMLHttpRequest object in browsers that support it with a custom implementation which does not send actual requests. + * In browsers that support ActiveXObject, this constructor is replaced, and fake objects are returned for XMLHTTP progIds. + * Other progIds, such as XMLDOM are left untouched. + * The native XMLHttpRequest object will be available at sinon.xhr.XMLHttpRequest + */ + useFakeXMLHttpRequest(): SinonFakeXMLHttpRequestStatic; + /** + * Fakes XHR and binds a server object to the sandbox such that it too is restored when calling sandbox.restore(). + * Access requests through sandbox.requests and server through sandbox.server + */ + useFakeServer(): SinonFakeServer; + /** + * Restores all fakes created through sandbox. + */ + restore(): void; + /** + * Resets the internal state of all fakes created through sandbox. + */ + reset(): void; + /** + * Resets the history of all stubs created through the sandbox. + * Since sinon@2.0.0 + */ + resetHistory(): void; + /** + * Resets the behaviour of all stubs created through the sandbox. + * Since sinon@2.0.0 + */ + resetBehavior(): void; + /** + * Causes all stubs created from the sandbox to return promises using a specific Promise library instead of the global one when using stub.rejects or stub.resolves. + * Returns the stub to allow chaining. + * Since sinon@2.0.0 + */ + usingPromise(promiseLibrary: any): SinonSandbox; + /** + * Verifies all mocks created through the sandbox. + */ + verify(): void; + /** + * Verifies all mocks and restores all fakes created through the sandbox. + */ + verifyAndRestore(): void; + + /** + * Replaces property on object with replacement argument. Attempts to replace an already replaced value cause an exception. + * replacement can be any value, including spies, stubs and fakes. + * This method only works on non-accessor properties, for replacing accessors, use sandbox.replaceGetter() and sandbox.replaceSetter(). + */ + replace( + obj: T, + prop: TKey, + replacement: T[TKey] + ): T[TKey]; + /** + * Replaces getter for property on object with replacement argument. Attempts to replace an already replaced getter cause an exception. + * replacement must be a Function, and can be instances of spies, stubs and fakes. + * @param obj + * @param prop + * @param replacement + */ + replaceGetter( + obj: T, + prop: TKey, + replacement: () => T[TKey] + ): () => T[TKey]; + /** + * Replaces setter for property on object with replacement argument. Attempts to replace an already replaced setter cause an exception. + * replacement must be a Function, and can be instances of spies, stubs and fakes. + * @param obj + * @param prop + * @param replacement + */ + replaceSetter( + obj: T, + prop: TKey, + replacement: (val: T[TKey]) => void + ): (val: T[TKey]) => void; + + /** + * Creates a new object with the given functions as the prototype and stubs all implemented functions. + * + * @template TType Type being stubbed. + * @param constructor Object or class to stub. + * @returns A stubbed version of the constructor. + * @remarks The given constructor function is not invoked. See also the stub API. + */ + createStubInstance( + constructor: StubbableType + ): SinonStubbedInstance; + } + + interface SinonApi { + fake: SinonFake; + match: SinonMatch; + spyCall(...args: any[]): SinonSpyCall; + expectation: SinonExpectationStatic; + + clock: { + create(now: number | Date): SinonFakeTimers; + }; + + FakeXMLHttpRequest: SinonFakeXMLHttpRequestStatic; + + fakeServer: SinonFakeServerStatic; + fakeServerWithClock: SinonFakeServerStatic; + + /** + * Creates a new sandbox object with spies, stubs, and mocks. + * @param config + */ + createSandbox(config?: Partial): SinonSandbox; + defaultConfig: Partial; + } + + interface LegacySandbox { + sandbox: { + /** + * @deprecated Since 5.0, use `sinon.createSandbox` instead + */ + create(config?: Partial): SinonSandbox; + }; + } + + type SinonStatic = SinonSandbox & LegacySandbox & SinonApi; +} + +declare const Sinon: Sinon.SinonStatic; + +export = Sinon; +export as namespace sinon; diff --git a/types/sinon/ts3.1/sinon-tests.ts b/types/sinon/ts3.1/sinon-tests.ts new file mode 100644 index 0000000000..b892f22980 --- /dev/null +++ b/types/sinon/ts3.1/sinon-tests.ts @@ -0,0 +1,488 @@ +import sinon = require("sinon"); + +function testSandbox() { + const obj = {}; + + sinon.createSandbox({ + injectInto: obj, + properties: ['spy', 'stub'], + useFakeTimers: true, + useFakeServer: true + }); + sinon.createSandbox({ + injectInto: null + }); + sinon.createSandbox({ + useFakeTimers: { + now: 1000, + shouldAdvanceTime: false + }, + useFakeServer: sinon.fakeServer.create() + }); + sinon.createSandbox(sinon.defaultConfig); + sinon.sandbox.create(); + sinon.sandbox.create(sinon.defaultConfig); + + const sb = sinon.createSandbox(); + + sb.assert.pass('foo'); + sb.clock.tick(1000); + sb.spy(); + sb.stub(); + sb.mock(obj); + + sb.useFakeTimers(); + sb.useFakeTimers(1000); + sb.useFakeTimers(new Date()); + sb.useFakeTimers({ + now: 1000 + }); + + const xhr = sb.useFakeXMLHttpRequest(); + xhr.useFilters = true; + xhr.restore(); + + const server = sb.useFakeServer(); + server.respondWith('foo'); + + sb.restore(); + sb.reset(); + sb.resetHistory(); + sb.resetBehavior(); + sb.usingPromise(Promise); + sb.verify(); + sb.verifyAndRestore(); + + const replaceMe = { + prop: 5, + method() { return 6; }, + get getter() { return 7; }, + get setter() { return true; }, + set setter(val) { } + }; + + sb.replace(replaceMe, 'prop', 10); + sb.replace(replaceMe, 'method', sb.spy()); + sb.replaceGetter(replaceMe, 'getter', () => 14); + sb.replaceSetter(replaceMe, 'setter', (v) => { }); + + const cls = class { + foo() { } + bar: number; + }; + const PrivateFoo = class { + private constructor() { } + foo() { } + bar: number; + static create() { + return new PrivateFoo(); + } + }; + + const stubInstance = sb.createStubInstance(cls); + const privateFooStubbedInstance = sb.createStubInstance(PrivateFoo); + stubInstance.foo.calledWith('foo'); + privateFooStubbedInstance.foo.calledWith('foo'); + const clsFoo: sinon.SinonStub = stubInstance.foo; + const privateFooFoo: sinon.SinonStub = privateFooStubbedInstance.foo; + const clsBar: number = stubInstance.bar; + const privateFooBar: number = privateFooStubbedInstance.bar; +} + +function testFakeServer() { + let s = sinon.fakeServer.create(); + s = sinon.fakeServerWithClock.create(); + + sinon.fakeServer.create({ + autoRespond: true, + autoRespondAfter: 3, + fakeHTTPMethods: true, + respondImmediately: false + }); + + sinon.fakeServer.create({ + autoRespond: true, + autoRespondAfter: 3 + }); +} + +function testXHR() { + const xhr = new sinon.FakeXMLHttpRequest(); + const headers = xhr.getAllResponseHeaders(); + const header = xhr.getResponseHeader('foo'); + + xhr.setResponseHeaders({ 'Content-Type': 'text/html' }); + xhr.setResponseBody('foo'); + xhr.respond(200, { 'Content-Type': 'foo' }, 'bar'); + xhr.error(); + + sinon.FakeXMLHttpRequest.useFilters = true; + sinon.FakeXMLHttpRequest.addFilter((method, url, async, user, pass) => true); + sinon.FakeXMLHttpRequest.onCreate = (xhr) => { }; + sinon.FakeXMLHttpRequest.restore(); +} + +function testClock() { + let clock = sinon.clock.create(1000); + clock = sinon.clock.create(new Date()); + + let now = 0; + now = clock.now; + + const fn = () => { }; + + clock.setTimeout(fn, 0); + clock.setTimeout(fn, 0, 'a', 'b'); + clock.setInterval(fn, 0); + clock.setInterval(fn, 0, 'a', 'b'); + clock.setImmediate(fn); + clock.setImmediate(fn, 'a', 'b'); + clock.requestAnimationFrame(fn); + + let timer = clock.setTimeout(fn, 0); + clock.clearTimeout(timer); + timer = clock.setInterval(fn, 0); + clock.clearInterval(timer); + timer = clock.setImmediate(fn); + clock.clearImmediate(timer); + + const animTimer = clock.requestAnimationFrame(fn); + clock.cancelAnimationFrame(animTimer); + + clock.nextTick(fn); + clock.tick(1); + clock.tick('00:10'); + clock.next(); + clock.runAll(); + clock.runToLast(); + clock.reset(); + clock.runMicrotasks(); + clock.runToFrame(); + clock.restore(); + clock.uninstall(); + clock.setSystemTime(1000); + clock.setSystemTime(new Date()); +} + +function testExpectation() { + const obj = {}; + + let ex = sinon.expectation.create(); + ex = sinon.expectation.create('some name'); + + ex.atLeast(5).atMost(10); + ex.never(); + ex.once(); + ex.twice(); + ex.thrice(); + ex.exactly(5); + ex.withArgs('a', 'b'); + ex.withExactArgs('a', 'b'); + ex.on(obj); + ex.verify(); + ex.restore(); +} + +function testMatch() { + const obj = {}; + const fn = () => { }; + + sinon.match(5).test(5); + sinon.match('str').test('foo'); + sinon.match(/foo/).test('foo'); + sinon.match({ a: 5, b: 6 }).test({}); + sinon.match((v) => true).test('foo'); + sinon.match((v) => true, 'some message').test('foo'); + sinon.match.any.test('foo'); + sinon.match.defined.test('foo'); + sinon.match.truthy.test('foo'); + sinon.match.falsy.test('foo'); + sinon.match.bool.test('foo'); + sinon.match.number.test('foo'); + sinon.match.string.test('foo'); + sinon.match.object.test('foo'); + sinon.match.func.test(fn); + sinon.match.map.test(new Map([['a', 1], ['b', 2]])); + sinon.match.set.test(new Set([1, 2, 3])); + sinon.match.array.test([1, 2, 3]); + sinon.match.regexp.test('foo'); + sinon.match.date.test('foo'); + sinon.match.symbol.test('foo'); + sinon.match.same(obj); + sinon.match.typeOf('string').test('foo'); + sinon.match.instanceOf(fn).test('foo'); + sinon.match.has('prop').test(obj); + sinon.match.has('prop', 123).test(obj); + sinon.match.hasOwn('prop').test(obj); + sinon.match.hasOwn('prop', 123).test(obj); + sinon.match.hasNested('prop.foo.bar').test(obj); + sinon.match.hasNested('prop.foo.bar', 123).test(obj); + sinon.match.every(sinon.match.number).test([1, 2, 'three']); + sinon.match.some(sinon.match.number).test([1, 2, 'three']); + sinon.match.array.deepEquals([{ a: 'b' }]).test([]); + sinon.match.array.startsWith([{ a: 'b' }]).test([]); + sinon.match.array.deepEquals([{ a: 'b' }]).test([]); + sinon.match.array.contains([{ a: 'b' }]).test([]); + sinon.match.map.deepEquals(new Map([['a', true], ['b', false]])).test(new Map()); + sinon.match.map.contains(new Map([['a', true]])).test(new Map()); +} + +function testFake() { + const fn = () => { }; + let fake = sinon.fake(); + + fake = sinon.fake(() => true); + fake = sinon.fake.returns(5); + fake = sinon.fake.throws('foo'); + fake = sinon.fake.throws(new Error('foo')); + fake = sinon.fake.resolves('foo'); + fake = sinon.fake.rejects('foo'); + fake = sinon.fake.yields(1, 2, fn); + fake = sinon.fake.yieldsAsync(1, 2, fn); + + fake.calledWith('foo'); +} + +function testAssert() { + const spy = sinon.spy(); + const spyTwo = sinon.spy(); + const obj = {}; + + sinon.assert.fail(); + sinon.assert.fail('foo'); + sinon.assert.pass('foo'); + sinon.assert.notCalled(spy); + sinon.assert.called(spy); + sinon.assert.calledOnce(spy); + sinon.assert.calledTwice(spy); + sinon.assert.calledThrice(spy); + sinon.assert.callCount(spy, 3); + sinon.assert.callOrder(spy, spyTwo); + sinon.assert.calledOn(spy, obj); + sinon.assert.calledOn(spy.firstCall, obj); + sinon.assert.alwaysCalledOn(spy, obj); + sinon.assert.alwaysCalledWith(spy, 'a', 'b', 'c'); + sinon.assert.neverCalledWith(spy, 'a', 'b', 'c'); + sinon.assert.calledWithExactly(spy, 'a', 'b', 'c'); + sinon.assert.alwaysCalledWithExactly(spy, 'a', 'b', 'c'); + sinon.assert.calledWithMatch(spy, 'a', 'b', 'c'); + sinon.assert.calledWithMatch(spy.firstCall, 'a', 'b', 'c'); + sinon.assert.alwaysCalledWithMatch(spy, 'a', 'b', 'c'); + sinon.assert.neverCalledWithMatch(spy, 'a', 'b', 'c'); + sinon.assert.calledWithNew(spy); + sinon.assert.calledWithNew(spy.firstCall); + sinon.assert.threw(spy); + sinon.assert.threw(spy.firstCall); + sinon.assert.threw(spy, 'foo error'); + sinon.assert.threw(spy.firstCall, 'foo error'); + sinon.assert.threw(spy, new Error('foo')); + sinon.assert.threw(spy.firstCall, new Error('foo')); + sinon.assert.alwaysThrew(spy); + sinon.assert.alwaysThrew(spy, 'foo error'); + sinon.assert.alwaysThrew(spy, new Error('foo')); + sinon.assert.match('a', 'b'); + sinon.assert.match(1, 1 + 1); + sinon.assert.match({ a: 1 }, { b: 2, c: 'abc' }); + sinon.assert.expose(obj); + sinon.assert.expose(obj, { prefix: 'blah' }); + sinon.assert.expose(obj, { includeFail: true }); +} + +function testTypedSpy() { + const cls = class { + foo(a: number, b: string): number { + return 3; + } + }; + + const instance = new cls(); + const spy = sinon.spy(instance, 'foo'); + + spy.calledWith(5, 'x'); + spy.calledWith(sinon.match(5), 'x'); + spy.calledWithExactly(5, 'x'); + spy.calledWithExactly(5, sinon.match('x')); + spy.calledOnceWith(5, 'x'); + spy.calledOnceWith(sinon.match(5), 'x'); + spy.notCalledWith(5, 'x'); + spy.notCalledWith(sinon.match(5), 'x'); + spy.returned(5); + spy.returned(sinon.match(5)); + + spy.withArgs(sinon.match(5), 'x').calledWith(5, 'x'); + spy.alwaysCalledWith(sinon.match(5), 'x'); + spy.alwaysCalledWith(5, 'x'); + spy.alwaysCalledWithExactly(sinon.match(5), 'x'); + spy.alwaysCalledWithExactly(5, 'x'); + spy.neverCalledWith(sinon.match(5), 'x'); + spy.neverCalledWith(5, 'x'); + + const stub = sinon.stub(instance, 'foo'); + + stub.withArgs(5, 'x').returns(3); + stub.withArgs(sinon.match(5), 'x').returns(5); +} + +function testSpy() { + const fn = () => { }; + const obj = class { + foo() { } + }; + const instance = new obj(); + + let spy = sinon.spy(); + const spyTwo = sinon.spy().named('spyTwo'); + + spy = sinon.spy(fn); + spy = sinon.spy(instance, 'foo'); + + let count = 0; + count = spy.callCount; + + let called = false; + called = spy.called; + called = spy.notCalled; + called = spy.calledOnce; + called = spy.calledTwice; + called = spy.calledThrice; + + let arr: any[] = []; + arr = spy.thisValues; + arr = spy.args; + arr = spy.exceptions; + arr = spy.returnValues; + + spy('a', 'b'); + spy(1, 2); + spy(true); + + spy.calledBefore(spyTwo); + spy.calledAfter(spyTwo); + spy.calledImmediatelyBefore(spyTwo); + spy.calledImmediatelyAfter(spyTwo); + spy.calledWithNew(); + spy.withArgs('a', 1).calledBefore(spyTwo); + spy.alwaysCalledOn(instance); + spy.alwaysCalledWith('a', 1); + spy.alwaysCalledWith('a'); + spy.alwaysCalledWithExactly('a', 1); + spy.alwaysCalledWithMatch('foo'); + spy.neverCalledWith('b', 2); + spy.neverCalledWith('b'); + spy.neverCalledWithMatch('foo', 'bar'); + spy.alwaysThrew(); + spy.alwaysThrew('foo'); + spy.alwaysThrew(new Error('foo')); + spy.alwaysReturned('foo'); + spy.invokeCallback('a', 'b'); + spy.calledOn(instance); + spy.calledWith('a', 2); + spy.calledWithExactly('a', 2); + spy.calledOnceWith('a', 2); + spy.calledOnceWithExactly('a', 2); + spy.calledWithMatch('bar', 2); + spy.notCalledWith('a', 2); + spy.notCalledWithMatch('a', 2); + spy.returned(true); + spy.returned('foo'); + spy.returned(2); + spy.threw(); + spy.threw('foo'); + spy.threw(new Error('foo')); + spy.callArg(1); + spy.callArgOn(1, instance); + spy.callArgOn(1, instance, 'a', 2); + spy.callArgWith(1, 'a', 2); + spy.callArgOnWith(1, instance, 'a', 2); + spy.yield('a', 2); + spy.yieldOn(instance, 'a', 2); + spy.yieldTo('prop', 'a', 2); + spy.yieldToOn('prop', instance, 'a', 2); + + let call = spy.firstCall; + call = spy.secondCall; + call = spy.thirdCall; + call = spy.lastCall; + call = spy.getCall(1); + call = spy.getCalls()[0]; + + call.calledBefore(call); + call.calledAfter(call); + call.calledWithNew(); + + spy.resetHistory(); + spy.restore(); +} + +function testStub() { + const obj = class { + foo() { } + }; + const instance = new obj(); + + let stub = sinon.stub(); + stub = sinon.stub(instance, 'foo').named('namedStub'); + + const spy: sinon.SinonSpy = stub; + + sinon.stub(instance); + + stub.reset(); + stub.resetBehavior(); + stub.usingPromise(Promise); + + stub.returns(true); + stub.returns(5); + stub.returns('foo'); + stub.returnsArg(1); + stub.returnsThis(); + stub.resolves(); + stub.resolves('foo'); + stub.resolvesArg(1); + stub.resolvesThis(); + stub.throws(); + stub.throws('err'); + stub.throws(new Error('err')); + stub.throwsArg(1); + stub.throwsException('err'); + stub.throwsException(new Error('err')); + stub.rejects(); + stub.rejects('TypeError'); + stub.rejects(1234); + stub.callsArg(1); + stub.callThrough(); + stub.callsArgOn(1, instance); + stub.callsArgWith(1, 'a', 2); + stub.callsArgAsync(1); + stub.callsArgOnAsync(1, instance); + stub.callsArgWithAsync(1, 'a', 2); + stub.callsArgOnWithAsync(1, instance, 'a', 2); + stub.callsFake((s1, s2, s3) => { }); + stub.callsFake(() => { }); + stub.get(() => true); + stub.set((v) => { }); + stub.onCall(1).returns(true); + stub.onFirstCall().resolves('foo'); + stub.onSecondCall().resolves('foo'); + stub.onThirdCall().resolves('foo'); + stub.value('foo'); + stub.yields('a', 2); + stub.yieldsOn(instance, 'a', 2); + stub.yieldsRight('a', 2); + stub.yieldsTo('foo', 'a', 2); + stub.yieldsToOn('foo', instance, 'a', 2); + stub.yieldsAsync('a', 2); + stub.yieldsOnAsync(instance, 'a', 2); + stub.yieldsToAsync('foo', 'a', 2); + stub.yieldsToOnAsync('foo', instance, 'a', 2); + stub.withArgs('a', 2).returns(true); +} + +function testMock() { + const obj = {}; + const mock = sinon.mock(obj); + + mock.expects('method').atLeast(2).atMost(5); + mock.restore(); + mock.verify(); +} diff --git a/types/sinon/ts3.1/tsconfig.json b/types/sinon/ts3.1/tsconfig.json new file mode 100644 index 0000000000..7468efa8bf --- /dev/null +++ b/types/sinon/ts3.1/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../../", + "typeRoots": [ + "../../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "sinon-tests.ts" + ] +} From b6ed9ced6374a38e41b83cacf60bf3d7a5dddadd Mon Sep 17 00:00:00 2001 From: Kelvin Jin Date: Mon, 10 Dec 2018 14:54:12 -0800 Subject: [PATCH 576/608] [node] add trace_events type definitions --- types/node/index.d.ts | 62 ++++++++++++++++++++++++++++++++++++++++ types/node/node-tests.ts | 14 +++++++++ 2 files changed, 76 insertions(+) diff --git a/types/node/index.d.ts b/types/node/index.d.ts index b9edae0587..547a30b84a 100644 --- a/types/node/index.d.ts +++ b/types/node/index.d.ts @@ -9008,3 +9008,65 @@ declare module "perf_hooks" { const performance: Performance; } + +declare module "trace_events" { + /** + * The `Tracing` object is used to enable or disable tracing for sets of + * categories. Instances are created using the + * `trace_events.createTracing()` method. + * + * When created, the `Tracing` object is disabled. Calling the + * `tracing.enable()` method adds the categories to the set of enabled trace + * event categories. Calling `tracing.disable()` will remove the categories + * from the set of enabled trace event categories. + */ + export interface Tracing { + /** + * A comma-separated list of the trace event categories covered by this + * `Tracing` object. + */ + readonly categories: string; + + /** + * Disables this `Tracing` object. + * + * Only trace event categories _not_ covered by other enabled `Tracing` + * objects and _not_ specified by the `--trace-event-categories` flag + * will be disabled. + */ + disable(): void; + + /** + * Enables this `Tracing` object for the set of categories covered by + * the `Tracing` object. + */ + enable(): void; + + /** + * `true` only if the `Tracing` object has been enabled. + */ + readonly enabled: boolean; + } + + interface CreateTracingOptions { + /** + * An array of trace category names. Values included in the array are + * coerced to a string when possible. An error will be thrown if the + * value cannot be coerced. + */ + categories: string[]; + } + + /** + * Creates and returns a Tracing object for the given set of categories. + */ + export function createTracing(options: CreateTracingOptions): Tracing; + + /** + * Returns a comma-separated list of all currently-enabled trace event + * categories. The current set of enabled trace event categories is + * determined by the union of all currently-enabled `Tracing` objects and + * any categories enabled using the `--trace-event-categories` flag. + */ + export function getEnabledCategories(): string; +} diff --git a/types/node/node-tests.ts b/types/node/node-tests.ts index c0f80728fc..7bb69e87e4 100644 --- a/types/node/node-tests.ts +++ b/types/node/node-tests.ts @@ -30,6 +30,7 @@ import * as async_hooks from "async_hooks"; import * as http2 from "http2"; import * as inspector from "inspector"; import * as perf_hooks from "perf_hooks"; +import * as trace_events from "trace_events"; import Module = require("module"); // Specifically test buffer module regression. @@ -4676,6 +4677,19 @@ import * as constants from 'constants'; } } +/////////////////////////////////////////////////////////// +/// Trace Events Tests /// +/////////////////////////////////////////////////////////// + +{ + const enabledCategories: string = trace_events.getEnabledCategories(); + const tracing: trace_events.Tracing = trace_events.createTracing({ categories: ['node', 'v8'] }); + const categories: string = tracing.categories; + const enabled: boolean = tracing.enabled; + tracing.enable(); + tracing.disable(); +} + //////////////////////////////////////////////////// /// module tests : http://nodejs.org/api/modules.html //////////////////////////////////////////////////// From 7c55f186436f825e312850ca67d7d951e9aa974d Mon Sep 17 00:00:00 2001 From: 43081j <43081j@users.noreply.github.com> Date: Wed, 12 Dec 2018 19:05:28 +0000 Subject: [PATCH 577/608] sinon: add tslint config --- types/sinon/ts3.1/tslint.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 types/sinon/ts3.1/tslint.json diff --git a/types/sinon/ts3.1/tslint.json b/types/sinon/ts3.1/tslint.json new file mode 100644 index 0000000000..1b62a88e52 --- /dev/null +++ b/types/sinon/ts3.1/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "ban-types": false, + "unified-signatures": false + } +} From 07c69445a01353b59dad3ca75077c31f78436ae0 Mon Sep 17 00:00:00 2001 From: Mathieu Masy Date: Wed, 12 Dec 2018 14:25:26 -0500 Subject: [PATCH 578/608] recompose: Fix fromRenderProps() with statefull render prop component --- types/recompose/index.d.ts | 6 +++--- types/recompose/recompose-tests.tsx | 22 +++++++++++++++++----- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/types/recompose/index.d.ts b/types/recompose/index.d.ts index e44ca48706..b32abb37bf 100644 --- a/types/recompose/index.d.ts +++ b/types/recompose/index.d.ts @@ -273,10 +273,10 @@ declare module 'recompose' { // fromRenderProps: https://github.com/acdlite/recompose/blob/master/docs/API.md#fromrenderprops export function fromRenderProps( - RenderPropsComponent: StatelessComponent, - propsMapper: (props: TRenderProps) => Partial, + RenderPropsComponent: Component, + propsMapper: (props: TRenderProps) => TInner, renderPropName?: string - ): ComponentEnhancer; + ): ComponentEnhancer; // Static property helpers: https://github.com/acdlite/recompose/blob/master/docs/API.md#static-property-helpers diff --git a/types/recompose/recompose-tests.tsx b/types/recompose/recompose-tests.tsx index a0ba38a87a..53cf796fd6 100644 --- a/types/recompose/recompose-tests.tsx +++ b/types/recompose/recompose-tests.tsx @@ -521,18 +521,30 @@ function testFromRenderProps() { interface InnerProps { renderValue: string; - outterValue: number; } interface OutterProps { outterValue: number; } - const RenderPropComponent: React.StatelessComponent<{ - render: (renderProps: RenderProps) => React.ReactElement; - }> = ({ render }) => render({ value: 'test' }); + interface ComponentProps { + renderValue: string; + outterValue: number; + } - const component: React.StatelessComponent = ({ renderValue }) =>
    {renderValue}
    ; + interface RenderComponentProps { + render: (renderProps: RenderProps) => React.ReactElement; + } + + class RenderPropComponent extends React.Component { + render () { + return this.props.render({ value: 'test' }); + } + } + + const component: React.StatelessComponent = ({ outterValue, renderValue }) => ( +
    {outterValue}{renderValue}
    + ); const Enhanced = fromRenderProps( RenderPropComponent, From dade8fa6f710f802fd100c27ca7a480f1df8a52c Mon Sep 17 00:00:00 2001 From: Asif Rahman Date: Wed, 12 Dec 2018 14:59:56 -0500 Subject: [PATCH 579/608] Swiper 4.4 typings update - Added missing swiper options - Added missing methods --- types/swiper/index.d.ts | 64 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 62 insertions(+), 2 deletions(-) diff --git a/types/swiper/index.d.ts b/types/swiper/index.d.ts index 9e77516978..74b8d928b9 100644 --- a/types/swiper/index.d.ts +++ b/types/swiper/index.d.ts @@ -1,10 +1,11 @@ -// Type definitions for Swiper 4.2 +// Type definitions for Swiper 4.4 // Project: https://github.com/nolimits4web/Swiper // Definitions by: Sebastián Galiano // Luca Trazzi // Eugene Matseruk // Luiz M. // Justin Abene +// Asif Rahman // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.9 @@ -221,6 +222,7 @@ export interface SwiperOptions { slidesOffsetBefore?: number; slidesOffsetAfter?: number; normalizeSlideIndex?: boolean; + centerInsufficientSlides?: boolean; // Grab Cursor grabCursor?: boolean; @@ -238,6 +240,8 @@ export interface SwiperOptions { followFinger?: boolean; allowTouchMove?: boolean; threshold?: number; + touchStartPreventDefault?: boolean; + touchStartForcePreventDefault?: boolean; touchMoveStopPropagation?: boolean; iOSEdgeSwipeDetection?: boolean; iOSEdgeSwipeThreshold?: number; @@ -249,11 +253,12 @@ export interface SwiperOptions { resistanceRatio?: number; // Swiping / No swiping + preventInteractionOnTransition?: boolean; allowSlidePrev?: boolean; allowSlideNext?: boolean; noSwiping?: boolean; noSwipingClass?: string; - // noSwipingSelector?: string; + noSwipingSelector?: string; swipeHandler?: SelectableElement; // Clicks @@ -289,6 +294,7 @@ export interface SwiperOptions { breakpoints?: { [index: number]: SwiperOptions; }; + breakpointsInverse?: boolean; // Observer observer?: boolean; @@ -1073,6 +1079,44 @@ export default class Swiper { */ slideTo(index: number, speed?: number, runCallbacks?: boolean): void; + /** + * Does the same as .slideTo but for the case when used with enabled loop. So this + * method will slide to slides with realIndex matching to passed index + * + * @param index Index number of slide. + * @param speed Transition duration (in ms). + * @param runCallbacks Set it to false (by default it is true) and transition will + * not produce transition events. + */ + slideToLoop(index: number, speed?: number, runCallbacks?: boolean): void; + + /** + * Reset swiper position to currently active slide for the duration equal to 'speed' + * parameter. + * + * @param speed Transition duration (in ms). + * @param runCallbacks Set it to false (by default it is true) and transition will + * not produce transition events. + */ + slideReset(speed?: number, runCallbacks?: boolean): void; + + /** + * Reset swiper position to closest slide/snap point for the duration equal to 'speed' parameter. + * + * @param speed Transition duration (in ms). + * @param runCallbacks Set it to false (by default it is true) and transition will + * not produce transition events. + */ + slideToClosest(speed?: number, runCallbacks?: boolean): void; + + /** + * Force swiper to update its height (when autoHeight enabled) for the duration equal to + * 'speed' parameter + * + * @param speed Transition duration (in ms). + */ + updateAutoHeight(speed?: number): void; + /** * You should call it after you add/remove slides * manually, or after you hide/show it, or do any @@ -1162,6 +1206,17 @@ export default class Swiper { */ prependSlide(slides: HTMLElement | string | string[]): void; + /** + * Add new slides to the required index. slides could be HTMLElement or HTML string with new slide or array with such slides, for example: + * + * @example addSlide(1, '
    Slide 10"
    ') + * @example addSlide(1, [ + * '
    Slide 10"
    ', + * '
    Slide 11"
    ' + * ]); + */ + addSlide(index: number, slides: HTMLElement | string | string[]): void; + /** * Remove selected slides. slideIndex could be a number with slide index to remove or array with indexes. * @@ -1171,6 +1226,11 @@ export default class Swiper { */ removeSlide(slideIndex: number | number[]): void; + /** + * Remove all slides + */ + removeAllSlides(): any; + /** * Set custom css3 transform's translate value for swiper wrapper */ From 969421fd0e73a46a1ce7fadfbfe5a91632f968f9 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Wed, 12 Dec 2018 12:58:11 -0800 Subject: [PATCH 580/608] Fix multi-progress reference to progress --- types/multi-progress/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/multi-progress/index.d.ts b/types/multi-progress/index.d.ts index ebedcf9597..db15a15b1b 100644 --- a/types/multi-progress/index.d.ts +++ b/types/multi-progress/index.d.ts @@ -5,7 +5,7 @@ /// -import ProgressBar, { ProgressBarOptions } from '../progress'; +import ProgressBar, { ProgressBarOptions } from 'progress'; import { Stream } from 'stream'; export default class MultiProgress { From fee22b212b1c2f31ad2556ab780750cc22d3773e Mon Sep 17 00:00:00 2001 From: Mike North Date: Wed, 12 Dec 2018 13:08:54 -0800 Subject: [PATCH 581/608] fix: add @ember/object notifyPropertyChange --- types/ember/index.d.ts | 1 + types/ember/test/object.ts | 7 +++++++ types/ember__object/index.d.ts | 2 ++ types/ember__object/test/object.ts | 8 +++++++- 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/types/ember/index.d.ts b/types/ember/index.d.ts index fdb89d3823..4e2b45cd55 100755 --- a/types/ember/index.d.ts +++ b/types/ember/index.d.ts @@ -478,6 +478,7 @@ export namespace Ember { const addObserver: typeof EmberObjectObserversNs.addObserver; const removeObserver: typeof EmberObjectObserversNs.removeObserver; const get: typeof EmberObjectNs.get; + const notifyPropertyChange: typeof EmberObjectNs.notifyPropertyChange; const getWithDefault: typeof EmberObjectNs.getWithDefault; const getProperties: typeof EmberObjectNs.getProperties; const setProperties: typeof EmberObjectNs.setProperties; diff --git a/types/ember/test/object.ts b/types/ember/test/object.ts index 060bf8ca81..853ed46d46 100755 --- a/types/ember/test/object.ts +++ b/types/ember/test/object.ts @@ -65,4 +65,11 @@ export class Foo2 extends Ember.Object { name }); } + + bar() { + Ember.notifyPropertyChange(this, 'name'); + Ember.notifyPropertyChange(this); // $ExpectError + Ember.notifyPropertyChange('name'); // $ExpectError + Ember.notifyPropertyChange(this, 'name', 'bar'); // $ExpectError + } } diff --git a/types/ember__object/index.d.ts b/types/ember__object/index.d.ts index f915bdc82a..06e417999d 100644 --- a/types/ember__object/index.d.ts +++ b/types/ember__object/index.d.ts @@ -385,6 +385,8 @@ export function defineProperty( meta?: any ): void; +export function notifyPropertyChange(obj: object, keyName: string): void; + declare module '@ember/utils/-private/types' { interface TypeLookup { class: typeof EmberObject; diff --git a/types/ember__object/test/object.ts b/types/ember__object/test/object.ts index b47aa22ffb..391ac183a9 100644 --- a/types/ember__object/test/object.ts +++ b/types/ember__object/test/object.ts @@ -1,4 +1,4 @@ -import EmberObject, { computed } from "@ember/object"; +import EmberObject, { computed, notifyPropertyChange } from "@ember/object"; const LifetimeHooks = EmberObject.extend({ resource: null as {} | null, @@ -47,6 +47,12 @@ class Foo extends EmberObject { b: 11 }); } + bar() { + notifyPropertyChange(this, 'name'); + notifyPropertyChange(this); // $ExpectError + notifyPropertyChange('name'); // $ExpectError + notifyPropertyChange(this, 'name', 'bar'); // $ExpectError + } } // TODO: enable after TS 3.0 https://github.com/typed-ember/ember-cli-typescript/issues/291 From a01d23b10cb43cdc051b70c35758294a5a651a43 Mon Sep 17 00:00:00 2001 From: mAAdhaTTah Date: Tue, 4 Dec 2018 11:27:07 -0500 Subject: [PATCH 582/608] Add barWidth & barRatio props to VictoryBarProps --- types/victory/index.d.ts | 91 +++++++++++++++++++-------------- types/victory/tslint.json | 1 - types/victory/victory-tests.tsx | 2 + 3 files changed, 55 insertions(+), 39 deletions(-) diff --git a/types/victory/index.d.ts b/types/victory/index.d.ts index 5670547317..d002a3d695 100644 --- a/types/victory/index.d.ts +++ b/types/victory/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Victory 0.9.3 +// Type definitions for Victory 31.0 // Project: https://github.com/FormidableLabs/victory // Definitions by: Alexey Svetliakov // snerks @@ -269,16 +269,16 @@ declare module "victory" { */ cursorLabel?: (point: CursorData) => void; /** - * The cursorLabelComponent prop takes a component instance which will be - * used to render a label for the cursor. The new element created from the passed + * The cursorLabelComponent prop takes a component instance which will be + * used to render a label for the cursor. The new element created from the passed * cursorLabelComponent will be supplied with the following props: x, y, * active, text. If cursorLabelComponent is omitted, a new VictoryLabel will be created with the props described above. * @default cursorLabelComponent={} */ cursorLabelComponent?: React.ReactElement; /** - * The cursorLabelOffset prop determines the pixel offset of the cursor label - * from the cursor point. This prop should be an Object with x and y properties, or a + * The cursorLabelOffset prop determines the pixel offset of the cursor label + * from the cursor point. This prop should be an Object with x and y properties, or a * number to be used for both dimensions. * @default "{ x: 5, y: -10 }" */ @@ -315,45 +315,45 @@ declare module "victory" { */ allowDrag?: boolean; /** - * The optional allowResize prop accepts a boolean that enables resizing the + * The optional allowResize prop accepts a boolean that enables resizing the * highlighted brush area. Dragging will still be enabled when the allowResize * prop is set to false, but the dimensions of the brush area will be fixed. * @default true */ allowResize?: boolean; /** - * The brushComponent prop specifies the component to be rendered for the - * highlighted area. This component will be supplied with the following props: x, y, + * The brushComponent prop specifies the component to be rendered for the + * highlighted area. This component will be supplied with the following props: x, y, * width, height, and style. When this prop is not specified, a will be rendered. * @default brushComponent={} */ brushComponent?: React.ReactElement; /** - * When the brushDimension prop is set, brushing will only be specific to the to - * the given dimension (either "x" or "y"), and the entire domain of the other + * When the brushDimension prop is set, brushing will only be specific to the to + * the given dimension (either "x" or "y"), and the entire domain of the other * dimension will be highlighted. When this prop is not specified, highlighting will * occur along both dimensions. * @example brushDimension="x" */ brushDimension?: 'x' | 'y'; /** - * The optional brushDomain prop describes the highlighted state. This prop is an - * object that specifies separate arrays for x and y. Each array is a tuple that - * describes the minimum and maximum values to render. If this prop is not provided - * initially, the chart will render with the entire domain highlighted. When this prop + * The optional brushDomain prop describes the highlighted state. This prop is an + * object that specifies separate arrays for x and y. Each array is a tuple that + * describes the minimum and maximum values to render. If this prop is not provided + * initially, the chart will render with the entire domain highlighted. When this prop * changes, the chart will render with a new highlighted domain. * @example brushDomain={{ x: [50, 100], y: [0, 100] }} */ brushDomain?: DomainPropType; /** - * The brushStyle adds custom styles to the brushComponent. This prop + * The brushStyle adds custom styles to the brushComponent. This prop * should be given as an object of SVG style attributes. * @default "brushStyle={{ stroke: "transparent", fill: "black", fillOpacity: 0.1 }}" */ brushStyle?: React.CSSProperties; /** - * The defaultBrushArea prop specifies how the container will behave when a - * region outside the active brush is clicked without selecting a new area. When the + * The defaultBrushArea prop specifies how the container will behave when a + * region outside the active brush is clicked without selecting a new area. When the * prop is set to "all", the entire domain will be selected. When the prop is set to "none", * no new region will be selected, and any existing active brush will be cleared. When * the prop is set to "disable" the new selected region will default to the current active brush. @@ -364,8 +364,8 @@ declare module "victory" { */ disable?: boolean; /** - * The handleComponent prop specifies the component to be rendered for each - * handle for the highlighted area. This component will be supplied with the following + * The handleComponent prop specifies the component to be rendered for each + * handle for the highlighted area. This component will be supplied with the following * props: x, y, width, height, cursor, and style. When this prop is not * specified, a will be rendered. * @default handleComponent={} @@ -373,7 +373,7 @@ declare module "victory" { handleComponent?: React.ReactElement; /** * The handleStyle adds custom styles to the handleComponents. This prop should be given as an object of SVG style attributes. - * + * * Handles refer to the region on each highlighted area where the area may be * expanded. Only handles relevant to the given dimension will be rendered. For * example, when brushDimension="x" only "left" and "right" handles will be @@ -382,8 +382,8 @@ declare module "victory" { */ handleStyle?: React.CSSProperties; /** - * The optional onBrushDomainChange prop accepts an function to be called on - * each update to the highlighted domain. The function accepts the parameters of + * The optional onBrushDomainChange prop accepts an function to be called on + * each update to the highlighted domain. The function accepts the parameters of * domain (the updated domain), and props (the props used by VictoryBrushContainer). * @example onBrushDomainChange={(domain, props) => handleDomainChange(domain, props)} */ @@ -394,7 +394,7 @@ declare module "victory" { export interface VictoryZoomContainerProps extends VictoryContainerProps { /** - * The optional allowPan prop accepts a boolean that enables the panning + * The optional allowPan prop accepts a boolean that enables the panning * functionality. Zooming will still be enabled when the allowPan prop is set to false. * @default true */ @@ -406,7 +406,7 @@ declare module "victory" { */ allowZoom?: boolean; /** - * VictoryZoomContainer works by clipping data outside of a given domain. + * VictoryZoomContainer works by clipping data outside of a given domain. * VictoryZoomContainer uses VictoryClipContainer by default. * This prop should not be replaced with a custom component, but you may want to set * props on VictoryClipContainer, such as clipPadding. @@ -414,30 +414,30 @@ declare module "victory" { */ clipContainerComponent?: React.ReactElement; /** - * When the zoomDimension prop is set, panning and zooming will be restricted to - * the given dimension (either x or y), and the domain of the other dimension will + * When the zoomDimension prop is set, panning and zooming will be restricted to + * the given dimension (either x or y), and the domain of the other dimension will * remain static. When this prop is not specified, both x and y dimensions will pan and zoom. * @example zoomDimension="x" */ zoomDimension?: 'x' | 'y'; /** - * The zoomDomain prop describes the zoomed state. This prop is an object that - * specifies separate arrays for x and y. Each array is a tuple that describes the - * minimum and maximum values to render. If this prop is not provided initially, the - * chart will render without an initial zoom, displaying the entire dataset. Updates to + * The zoomDomain prop describes the zoomed state. This prop is an object that + * specifies separate arrays for x and y. Each array is a tuple that describes the + * minimum and maximum values to render. If this prop is not provided initially, the + * chart will render without an initial zoom, displaying the entire dataset. Updates to * zoomDomain will trigger a re-render of the chart with the new domain. * @example zoomDomain={{x: [0, 100]}} */ zoomDomain?: DomainPropType; /** - * The brushStyle adds custom styles to the brushComponent. This prop + * The brushStyle adds custom styles to the brushComponent. This prop * should be given as an object of SVG style attributes. * @default "brushStyle={{ stroke: 'transparent', fill: 'black', fillOpacity: 0.1 }}" */ brushStyle?: React.CSSProperties; /** - * The defaultBrushArea prop specifies how the container will behave when a - * region outside the active brush is clicked without selecting a new area. When the + * The defaultBrushArea prop specifies how the container will behave when a + * region outside the active brush is clicked without selecting a new area. When the * prop is set to "all", the entire domain will be selected. When the prop is set to "none", * no new region will be selected, and any existing active brush will be cleared. When * the prop is set to "disable" the new selected region will default to the current active brush. @@ -452,10 +452,10 @@ declare module "victory" { */ downsample?: number | boolean; /** - * The minimumZoom prop sets a minimum domain extent for the zoomed chart. + * The minimumZoom prop sets a minimum domain extent for the zoomed chart. * When the difference between the maximum and minimum of a zoomed domain is equal to the minimumZoom * in either dimension, the component will stop responding to events that would normally trigger zooming in. - * Zooming out and panning will still be enabled. When this prop is not specified, the default minimum + * Zooming out and panning will still be enabled. When this prop is not specified, the default minimum * zoom will cover 1 / 1000th of the original domain. This prop should be given as an object * with numeric values for x and y. * @example minimumZoom={{x: 1, y: 0.01}} @@ -650,10 +650,10 @@ declare module "victory" { */ y?: number; } - - + + /** - * VictoryTooltip renders a tooltip component with a set of default events. When VictoryTooltip is used as a label component for any Victory component that renders data, it will attach events to rendered data components that will activate the tooltip when hovered. + * VictoryTooltip renders a tooltip component with a set of default events. When VictoryTooltip is used as a label component for any Victory component that renders data, it will attach events to rendered data components that will activate the tooltip when hovered. * VictoryTooltip renders text as well as a configurable Flyout container. */ export class VictoryTooltip extends React.Component< @@ -1317,6 +1317,21 @@ declare module "victory" { * @example {data: {fill: "red", width: 8}, labels: {fontSize: 12}} */ style?: VictoryStyleInterface; + /** + * The barRatio prop specifies an approximate ratio between bar widths and spaces between bars. + * When width is not specified via the barWidth prop or in bar styles, the barRatio prop will + * be used to calculate a default width for each bar given the total number of bars in the data series + * and the overall width of the chart. + */ + barRatio?: number; + /** + * The barWidth prop is used to specify the width of each bar. This prop may be given as + * a number of pixels or as a function that returns a number. When this prop is given as + * a function, it will be evaluated with the arguments datum, and active. When this value + * is not given, a default value will be calculated based on the overall dimensions of + * the chart, and the number of bars. + */ + barWidth?: NumberOrCallback; } /** diff --git a/types/victory/tslint.json b/types/victory/tslint.json index a41bf5d19a..a0357daa61 100644 --- a/types/victory/tslint.json +++ b/types/victory/tslint.json @@ -7,7 +7,6 @@ "ban-types": false, "callable-types": false, "comment-format": false, - "dt-header": false, "eofline": false, "export-just-namespace": false, "import-spacing": false, diff --git a/types/victory/victory-tests.tsx b/types/victory/victory-tests.tsx index 3b882c7583..d7ddd7c33b 100644 --- a/types/victory/victory-tests.tsx +++ b/types/victory/victory-tests.tsx @@ -253,6 +253,8 @@ test = ( {x: 4, y: 2}, {x: 5, y: 1} ]} + barWidth={20} + barRatio={100} /> ); From 972070c4d022818bbed93f8be8e7104121b94ca6 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Wed, 12 Dec 2018 23:08:20 +0100 Subject: [PATCH 583/608] Move old types to sub-dir --- types/internal-ip/{ => v2}/index.d.ts | 0 types/internal-ip/{ => v2}/internal-ip-tests.ts | 0 types/internal-ip/{ => v2}/tsconfig.json | 11 ++++++++--- types/internal-ip/{ => v2}/tslint.json | 0 4 files changed, 8 insertions(+), 3 deletions(-) rename types/internal-ip/{ => v2}/index.d.ts (100%) rename types/internal-ip/{ => v2}/internal-ip-tests.ts (100%) rename types/internal-ip/{ => v2}/tsconfig.json (73%) rename types/internal-ip/{ => v2}/tslint.json (100%) diff --git a/types/internal-ip/index.d.ts b/types/internal-ip/v2/index.d.ts similarity index 100% rename from types/internal-ip/index.d.ts rename to types/internal-ip/v2/index.d.ts diff --git a/types/internal-ip/internal-ip-tests.ts b/types/internal-ip/v2/internal-ip-tests.ts similarity index 100% rename from types/internal-ip/internal-ip-tests.ts rename to types/internal-ip/v2/internal-ip-tests.ts diff --git a/types/internal-ip/tsconfig.json b/types/internal-ip/v2/tsconfig.json similarity index 73% rename from types/internal-ip/tsconfig.json rename to types/internal-ip/v2/tsconfig.json index 746718e07c..bae5b7feb8 100644 --- a/types/internal-ip/tsconfig.json +++ b/types/internal-ip/v2/tsconfig.json @@ -8,10 +8,15 @@ "noImplicitThis": true, "strictNullChecks": true, "strictFunctionTypes": true, - "baseUrl": "../", + "baseUrl": "../../", "typeRoots": [ - "../" + "../../" ], + "paths": { + "internal-ip": [ + "internal-ip/v2" + ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true @@ -20,4 +25,4 @@ "index.d.ts", "internal-ip-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/internal-ip/tslint.json b/types/internal-ip/v2/tslint.json similarity index 100% rename from types/internal-ip/tslint.json rename to types/internal-ip/v2/tslint.json From 068878f003c62bab4cffa6766529ddf9fdc4c5b9 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Wed, 12 Dec 2018 23:42:56 +0100 Subject: [PATCH 584/608] Update types for internal-ip to v3 --- types/internal-ip/index.d.ts | 12 ++++++++++++ types/internal-ip/internal-ip-tests.ts | 15 +++++++++++++++ types/internal-ip/tsconfig.json | 23 +++++++++++++++++++++++ types/internal-ip/tslint.json | 1 + 4 files changed, 51 insertions(+) create mode 100644 types/internal-ip/index.d.ts create mode 100644 types/internal-ip/internal-ip-tests.ts create mode 100644 types/internal-ip/tsconfig.json create mode 100644 types/internal-ip/tslint.json diff --git a/types/internal-ip/index.d.ts b/types/internal-ip/index.d.ts new file mode 100644 index 0000000000..1bed7e9059 --- /dev/null +++ b/types/internal-ip/index.d.ts @@ -0,0 +1,12 @@ +// Type definitions for internal-ip 3.0 +// Project: https://github.com/sindresorhus/internal-ip#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export const v6: IPGetterFn; +export const v4: IPGetterFn; + +export interface IPGetterFn { // tslint:disable-line:interface-name + (): Promise; + sync(): string | null; +} diff --git a/types/internal-ip/internal-ip-tests.ts b/types/internal-ip/internal-ip-tests.ts new file mode 100644 index 0000000000..1b383de2f3 --- /dev/null +++ b/types/internal-ip/internal-ip-tests.ts @@ -0,0 +1,15 @@ +import * as internalIp from 'internal-ip'; + +internalIp.v6().then(ip => { + // $ExpectType string | null + ip; +}); +// $ExpectType string | null +internalIp.v6.sync(); + +internalIp.v4().then(ip => { + // $ExpectType string | null + ip; +}); +// $ExpectType string | null +internalIp.v4.sync(); diff --git a/types/internal-ip/tsconfig.json b/types/internal-ip/tsconfig.json new file mode 100644 index 0000000000..99d54932e0 --- /dev/null +++ b/types/internal-ip/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "internal-ip-tests.ts" + ] +} diff --git a/types/internal-ip/tslint.json b/types/internal-ip/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/internal-ip/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From b2e8151b0d3d656edb90f45f48984a3235ea5158 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Thu, 13 Dec 2018 00:19:35 +0100 Subject: [PATCH 585/608] Update types for public-ip to v2.4 --- types/public-ip/index.d.ts | 10 +++++++--- types/public-ip/public-ip-tests.ts | 15 ++++++++------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/types/public-ip/index.d.ts b/types/public-ip/index.d.ts index 463a1a2d18..58fb81aa93 100644 --- a/types/public-ip/index.d.ts +++ b/types/public-ip/index.d.ts @@ -1,12 +1,16 @@ -// Type definitions for public-ip 2.3 +// Type definitions for public-ip 2.4 // Project: https://github.com/sindresorhus/public-ip#readme // Definitions by: BendingBender // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -export function v4(options?: Options): Promise; -export function v6(options?: Options): Promise; +export function v4(options?: Options): CancelablePromise; +export function v6(options?: Options): CancelablePromise; export interface Options { https?: boolean; timeout?: number; } + +export type CancelablePromise = Promise & { + cancel(): void; +}; diff --git a/types/public-ip/public-ip-tests.ts b/types/public-ip/public-ip-tests.ts index e7e0540bbe..6e5983bc99 100644 --- a/types/public-ip/public-ip-tests.ts +++ b/types/public-ip/public-ip-tests.ts @@ -1,16 +1,17 @@ import * as publicIp from 'public-ip'; -let str: string; publicIp.v4().then(ip => { - str = ip; + ip; // $ExpectType string }); -publicIp.v4({https: false, timeout: 10}).then(ip => { - str = ip; +publicIp.v4({ https: false, timeout: 10 }).then(ip => { + ip; // $ExpectType string }); +publicIp.v4().cancel(); publicIp.v6().then(ip => { - str = ip; + ip; // $ExpectType string }); -publicIp.v6({https: false, timeout: 10}).then(ip => { - str = ip; +publicIp.v6({ https: false, timeout: 10 }).then(ip => { + ip; // $ExpectType string }); +publicIp.v6().cancel(); From c25e765ce7eebf4096e5068a4506b0893f1766af Mon Sep 17 00:00:00 2001 From: Kim Brandl Date: Wed, 12 Dec 2018 16:29:50 -0800 Subject: [PATCH 586/608] Fix: HTTPS Checking. --- types/office-js/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index 3e7f64375f..9fc04a1748 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -15225,7 +15225,7 @@ declare namespace Office { * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read * * Item IDs retrieved via EWS or via the itemId property use a different format than the format used by REST APIs (such as the - * {@link https://docs.microsoft.com/previous-versions/office/office-365-api/api/version-2.0/mail-rest-operations | Outlook Mail API} or the {@link http://graph.microsoft.io/ | Microsoft Graph}. + * {@link https://docs.microsoft.com/previous-versions/office/office-365-api/api/version-2.0/mail-rest-operations | Outlook Mail API} or the {@link https://graph.microsoft.io/ | Microsoft Graph}. * The convertToRestId method converts an EWS-formatted ID into the proper format for REST. * * @param itemId An item ID formatted for Exchange Web Services (EWS) From e24f349f8135beafd1d9a0226debcd8f17733b5a Mon Sep 17 00:00:00 2001 From: perry Date: Wed, 12 Dec 2018 17:38:44 -0800 Subject: [PATCH 587/608] Add new supported plugins from 0.7 --- types/dd-trace/index.d.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/types/dd-trace/index.d.ts b/types/dd-trace/index.d.ts index 311fa7675e..68c047203f 100644 --- a/types/dd-trace/index.d.ts +++ b/types/dd-trace/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for dd-trace-js 0.6 +// Type definitions for dd-trace-js 0.7 // Project: https://github.com/DataDog/dd-trace-js // Definitions by: Colin Bradley // Eloy Durán @@ -185,6 +185,7 @@ declare class Scope { type Plugin = | "amqp10" | "amqplib" + | "bluebird" | "elasticsearch" | "express" | "graphql" @@ -197,8 +198,10 @@ type Plugin = | "mysql" | "mysql2" | "pg" + | "q" | "redis" - | "restify"; + | "restify" + | "when"; interface BasePluginOptions { /** From f80c5fbfea909c964f22663cb329b8e0701354c4 Mon Sep 17 00:00:00 2001 From: perry Date: Wed, 12 Dec 2018 17:39:03 -0800 Subject: [PATCH 588/608] Add missing option: enabled --- types/dd-trace/dd-trace-tests.ts | 1 + types/dd-trace/index.d.ts | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/types/dd-trace/dd-trace-tests.ts b/types/dd-trace/dd-trace-tests.ts index 9d6936875a..f98a0853cf 100644 --- a/types/dd-trace/dd-trace-tests.ts +++ b/types/dd-trace/dd-trace-tests.ts @@ -2,6 +2,7 @@ import * as tracer from "dd-trace"; import SpanContext = require("dd-trace/src/opentracing/span_context"); tracer.init({ + enabled: true, service: "MyLovelyService", hostname: "localhost", port: 8126, diff --git a/types/dd-trace/index.d.ts b/types/dd-trace/index.d.ts index 68c047203f..43bfd7183f 100644 --- a/types/dd-trace/index.d.ts +++ b/types/dd-trace/index.d.ts @@ -54,6 +54,12 @@ declare class TraceProxy extends Tracer { } interface TracerOptions { + /** + * Whether to enable the tracer. + * @default true + */ + enabled?: boolean; + /** * Enable debug logging in the tracer. * @default false From e99f4768f1307d00788c334a74054de36407ccb6 Mon Sep 17 00:00:00 2001 From: Syncfusion-JavaScript Date: Thu, 13 Dec 2018 12:36:23 +0530 Subject: [PATCH 589/608] Error Fixed --- types/ej.web.all/ej.web.all-tests.ts | 6848 +++++++++++++------------- types/ej.web.all/index.d.ts | 5 - 2 files changed, 3423 insertions(+), 3430 deletions(-) diff --git a/types/ej.web.all/ej.web.all-tests.ts b/types/ej.web.all/ej.web.all-tests.ts index d72a1af614..39ac49ab73 100644 --- a/types/ej.web.all/ej.web.all-tests.ts +++ b/types/ej.web.all/ej.web.all-tests.ts @@ -1,3425 +1,3423 @@ - - - -module AccordionComponent { - $(function () { - var sample = new ej.Accordion($("#basicAccordion"), { - width: "100%", - allowKeyboardNavigation: true, - collapseSpeed: 500, - collapsible: true, - enableAnimation: true, - enableMultipleOpen: true, - events: "click", - expandSpeed: 500, - headerSize: "40px", - htmlAttributes: { title: "Demo" }, - selectedItemIndex: 1, - showCloseButton: true, - showRoundedCorner: true - }); - }); -} - - - -module AutocompleteComponent{ - var carList = [ - "Audi S6", "Austin-Healey", "Alfa Romeo", "Aston Martin", - "BMW 7", "Bentley Mulsanne", "Bugatti Veyron", - "Chevrolet Camaro", "Cadillac", - "Duesenberg J", "Dodge Sprinter", - "Elantra", "Excavator", - "Ford Boss 302", "Ferrari 360", "Ford Thunderbird", - "GAZ Siber", - "Honda S2000", "Hyundai Santro", - "Isuzu Swift", "Infiniti Skyline", - "Jaguar XJS", - "Kia Sedona EX", "Koenigsegg Agera", - "Lotus Esprit", "Lamborghini Diablo", - "Mercedes-Benz", "Mercury Coupe", "Maruti Alto 800", - "Nissan Qashqai", - "Oldsmobile S98", "Opel Superboss", - "Porsche 356", "Pontiac Sunbird", - "Scion SRS/SC/SD", "Saab Sportcombi", "Subaru Sambar", "Suzuki Swift", - "Triumph Spitfire", "Toyota 2000GT", - "Volvo P1800", "Volkswagen Shirako" - ]; - $(function () { - var autocompleteInstance =new ej.Autocomplete($("#selectCar"), { - width: "100%", - watermarkText: "Select a car", - dataSource: carList, - enableAutoFill: true, - showPopupButton: true, - multiSelectMode: "delimiter" - }); - }); -} - - - - -module Barcodecomponent { - $(function () { - var barcodesample = new ej.datavisualization.Barcode($("#Barcode"), { - text:"http://www.syncfusion.com" - }); - }); -} - - - - - -module Bulletgraphcomponent { - $(function () { - var bulletsample = new ej.datavisualization.BulletGraph($("#BulletGraph"), { - isResponsive: true, - load: function () { - var sender = $("#BulletGraph").data("ejBulletGraph"); - var bulletTheme = (window).themeStyle + (window).themeColor + (window).themeVarient; - if (bulletTheme) { - switch (bulletTheme) { - case "flatdark": - case "flatazuredark": - case "flatlimedark": - case "flatsaffrondark": - case "gradientdark": - case "gradientazuredark": - case "gradientlimedark": - case "gradientsaffrondark": - case "flathigh-contrast-01dark": - case "flathigh-contrast-02dark": - bulletTheme = "flatdark"; - break; - case "flatoffice-365light": - case "flatmateriallight": - bulletTheme = "material"; - break; - default: - bulletTheme = "flatlight"; - break; - } - sender.model.theme = bulletTheme; - } - - }, - tooltipSettings: { visible: true }, - quantitativeScaleSettings: { - featureMeasures: [{ - value: 8, comparativeMeasureValue:6.7 - }] - }, - qualitativeRanges: [{ - rangeEnd: 4.3, rangeStroke:"#ebebeb", - }, - { - rangeEnd: 7.3, rangeStroke:"#d8d8d8" - }, - { - rangeEnd: 10, rangeStroke: "#7f7f7f" - } - ], - captionSettings: { - textPosition: 'right', text: 'Revenue YTD', - subTitle: { - text: "$ in Thousands", textPosition:"right" - } - } - }); - }); -} - - - - - -module ButtonComponent { - $(function () { - var basicButton = new ej.Button($("#buttonnormal"), { - size: "large", - showRoundedCorner: true, - contentType: "textandimage", - prefixIcon: "e-icon e-save", - text: "Save" - }); - var toggleButton = new ej.ToggleButton($("#TextOnly"), { - showRoundedCorner: true, - size: "large", - contentType: "textandimage", - defaultPrefixIcon: "e-icon e-save", - activePrefixIcon: "e-icon e-delete", - defaultText: "Save", - activeText: "Delete" - }); - var splitbuttonnormal = new ej.SplitButton($("#splitbuttonnormal"), { - showRoundedCorner: true, - size: "large", - prefixIcon: "e-icon e-file-empty", - targetID: "menu1", - contentType: "textandimage", - text: "File" - }); - var groupButton = new ej.GroupButton($("#groupButton"), { - showRoundedCorner: true, - size: "large" - }); - var check1 = new ej.CheckBox($("#check1"), { - size: "medium", enableTriState: true - }); - var check2 = new ej.CheckBox($("#check2"), { - size: "medium", enableTriState: true - }); - var radio1 = new ej.RadioButton($("#radio1"), { - size: "medium" - }); - var radio2 = new ej.RadioButton($("#radio2"), { - size: "medium", checked: true - }); - }); -} - - - - -module ChartComponent { - $(function () { - var chartsample = new ej.datavisualization.Chart($("#Chart"), { - primaryXAxis: { - range: { min: 2005, max: 2011, interval: 1 }, - title: { text: "Year" }, - valueType: "category" - }, - primaryYAxis: { - range: { min: 25, max: 50, interval: 5 }, - labelFormat: "{value}%", - title: { text: "Efficiency" }, - }, - commonSeriesOptions: - { - type: 'line', enableAnimation: true, - tooltip:{ visible :true, template:'Tooltip'}, - marker: - { - shape: 'circle', - size: - { - height: 10, width: 10 - }, - visible: true - }, - border : {width: 2} - }, - series: - [ - { - points: [{ x: 2005, y: 28 }, { x: 2006, y: 25 }, { x: 2007, y: 26 }, { x: 2008, y: 27 }, - { x: 2009, y: 32 }, { x: 2010, y: 35 }, { x: 2011, y: 30 }], - name: 'India' - }, - { - points: [{ x: 2005, y: 31 }, { x: 2006, y: 28 }, { x: 2007, y: 30 }, { x: 2008, y: 36 }, - { x: 2009, y: 36 }, { x: 2010, y: 39 }, { x: 2011, y: 37 }], - name: 'Germany' - }, - { - points: [{ x: 2005, y: 36 }, { x: 2006, y: 32 }, { x: 2007, y: 34 }, { x: 2008, y: 41 }, - { x: 2009, y: 42 }, { x: 2010, y: 42 }, { x: 2011, y: 43 }], - name: 'England' - }, - { - points: [{ x: 2005, y: 39 }, { x: 2006, y: 36 }, { x: 2007, y: 40 }, { x: 2008, y: 44 }, - { x: 2009, y: 45 }, { x: 2010, y: 48 }, { x: 2011, y: 46 }], - name: 'France' - } - ], - isResponsive: true, - load: function () { - var sender = $("#Chart").data("ejChart"); - if (!!window.orientation && sender) { //to modify chart properties for mobile view - var model = sender.model, - seriesLength = model.series.length; - model.legend.visible = false; - model.size.height = null; - model.size.width = null; - for (var i = 0; i < seriesLength; i++) { - if (!model.series[i].marker) - model.series[i].marker = {}; - if (!model.series[i].marker.size) - model.series[i].marker.size = {}; - model.series[i].marker.size.width = 6; - model.series[i].marker.size.height = 6; - } - model.primaryXAxis.labelIntersectAction = "rotate45"; - if (model.primaryXAxis.title) - model.primaryXAxis.title.text = ""; - if (model.primaryYAxis.title) - model.primaryYAxis.title.text = ""; - model.primaryXAxis.edgeLabelPlacement = "hide"; - model.primaryYAxis.labelIntersectAction = "rotate45"; - model.primaryYAxis.edgeLabelPlacement = "hide"; - } - var theme = (window).themeStyle + (window).themeColor + (window).themeVarient; - if (theme) { - switch (theme) { - case "flatdark": - case "flatazuredark": - case "flatlimedark": - case "flatsaffrondark": - theme = "flatdark"; - break; - case "gradientlight": - case "gradientazurelight": - case "gradientlimelight": - case "gradientsaffronlight": - theme = "gradientlight"; - break; - case "gradientdark": - case "gradientazuredark": - case "gradientlimedark": - case "gradientsaffrondark": - theme = "gradientdark"; - break; - case "flatbootstraplight": - theme = "bootstrap"; - break; - case "flathigh-contrast-01dark": - case "flathigh-contrast-02dark": - theme = "high-contrast-01"; - break; - case "flatmateriallight": - case "flatoffice-365light": - theme = "material"; - break; - - default: - theme = "flatlight"; - break; - } - sender.model.theme = theme; - } - }, - title: { text: 'Efficiency of oil-fired power production' }, - size: { height: "600" }, - legend: { visible: true}, - }); - }); -} - - - - -module circulargaugecomponent { - $(function () { - var circularsample = new ej.datavisualization.CircularGauge($("#CircularGauge"), { - enableAnimation: false, - isResponsive: true, - backgroundColor: "transparent", width: 500, - scales: [{ - showRanges: true, - startAngle: 122, sweepAngle: 296, radius: 130, showScaleBar: true, size: 1, maximum: 120, majorIntervalValue: 20, minorIntervalValue: 10, - border: { - width: 0.5, - }, - pointers: [{ - value: 60, - showBackNeedle: true, - backNeedleLength: 20, - length: 95, - width: 7 - }], - ticks: [{ - type: "major", - distanceFromScale: 2, - height: 16, - width: 1, color: "#8c8c8c" - }, { type: "minor", height: 8, width: 1, distanceFromScale: 2, color: "#8c8c8c" }], - labels: [{ - color: "#8c8c8c" - }], - ranges: [{ - distanceFromScale: -30, - startValue: 0, - endValue: 70 - }, { - distanceFromScale: -30, - startValue: 70, - endValue: 110, - backgroundColor: "#fc0606", - border: { color: "#fc0606" } - }, - { - distanceFromScale: -30, - startValue: 110, - endValue: 120, - backgroundColor: "#f5b43f", - border: { color: "#f5b43f" } - }] - }] - }); - }); -} - - - -module ColorPickerComponent { - $(function () { - var colorSample = new ej.ColorPicker($("#colorpick"), { - value: "#278787" - }); - }); -} - - - - -module ComboBoxComponent{ - var BikeList = [ - { empid: "bk1", text: "Apache RTR" }, { empid: "bk2", text: "CBR 150-R" }, { empid: "bk3", text: "CBZ Xtreme" }, - { empid: "bk4", text: "Discover" }, { empid: "bk5", text: "Dazzler" }, { empid: "bk6", text: "Flame" }, - { empid: "bk7", text: "Fazzer" }, { empid: "bk8", text: "FZ-S" }, { empid: "bk9", text: "Pulsar" }, - { empid: "bk10", text: "Shine" }, { empid: "bk11", text: "R15" }, { empid: "bk12", text: "Unicorn" } - ]; - $(function () { - var comboboxInstance =new ej.ComboBox($("#selectCar"), { - width: "100%", - placeholder: "Select a Bike", - fields: { text: "text", value: "empid" }, - dataSource: BikeList, - autofill: true - }); - }); -} - - - -module DatePickerComponent { - $(function () { - var dateSample = new ej.DatePicker($("#datepick"), { - width: "100%" - }); - }); -} - - - - -module DateTimePickerComponent { - $(function () { - var datetimeSample = new ej.DateRangePicker($("#daterangepick"), { - width: "100%" - }); - }); -} - - - -module DateTimePickerComponent { - $(function () { - var datetimeSample = new ej.DateTimePicker($("#datetimepick"), { - width: "100%" - }); - }); -} - - - -$(function () { - var diagram = new ej.datavisualization.Diagram($("#diagram"), { - width: "1000px", - height: "600px", - pageSettings: { - //Sets page size - pageHeight: 500, - pageWidth: 500, - //Customizes the appearance of page - pageBorderWidth: 4, - pageBackgroundColor: "white", - pageBorderColor: "lightgray", - pageMargin: 25, - showPageBreak: true, - multiplePage: true, - pageOrientation: ej.datavisualization.Diagram.PageOrientations.Portrait - }, - scrollSettings: { - horizontalOffset: 0, - verticalOffset: 0 - }, - snapSettings: { - snapConstraints: ej.datavisualization.Diagram.SnapConstraints.ShowLines - }, - nodes: [ - createNode({ name: "NewIdea", width: 150, height: 60, offsetX: 300, offsetY: 60, labels: [createLabel({ "text": "New idea identified" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Terminator }), - createNode({ name: "Meeting", width: 150, height: 60, offsetX: 300, offsetY: 155, labels: [createLabel({ "text": "Meeting with board" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Process }), - createNode({ - name: "BoardDecision", width: 150, height: 110, offsetX: 300, offsetY: 280, labels: [createLabel({ text: "Board decides \nwhether \nto proceed", wrapText: "true", "margin": { left: 20, top: 0, right: 20, bottom: 0 } })], - type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Decision - }), - createNode({ name: "Project", width: 150, height: 100, offsetX: 300, offsetY: 430, labels: [createLabel({ "text": "Find Project \nmanager" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Decision }), - createNode({ - name: "End", width: 150, height: 60, offsetX: 300, offsetY: 555, labels: [createLabel({ "text": "Implement and Deliver" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Process }), - createNode({ name: "Decision", width: 250, height: 60, offsetX: 550, offsetY: 60, labels: [createLabel({ "text": "Decision Process for new software ideas" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Card, fillColor: "#858585", borderColor: "#858585" }), - createNode({ name: "Reject", width: 150, height: 60, offsetX: 550, offsetY: 285, labels: [createLabel({ "text": "Reject and write report" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Process }), - createNode({ name: "Resources", width: 150, height: 60, offsetX: 550, offsetY: 430, labels: [createLabel({ "text": "Hire new resources" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Process }) - ], - connectors: [ - createConnector({ name: "connector1", sourceNode: "NewIdea", targetNode: "Meeting" }), - createConnector({ name: "connector2", sourceNode: "Meeting", targetNode: "BoardDecision" }), - createConnector({ name: "connector3", sourceNode: "BoardDecision", targetNode: "Project", labels: [createLabel({ "text": "Yes" })] }), - createConnector({ name: "connector4", sourceNode: "Project", targetNode: "End", labels: [createLabel({ "text": "Yes" })] }), - createConnector({ name: "connector5", sourceNode: "BoardDecision", targetNode: "Reject", labels: [createLabel({ "text": "No" })] }), - createConnector({ name: "connector6", sourceNode: "Project", targetNode: "Resources", labels: [createLabel({ "text": "No" })] }) - ] - }); -}); - -function createNode(option: ej.datavisualization.Diagram.Node) { - if (!option.fillColor) { - option.borderColor = "#1BA0E2"; - option.fillColor = "#1BA0E2"; - } - option.labels[0].fontColor = "white"; - return option; -} - -function createConnector(option: ej.datavisualization.Diagram.Connector) { - option.targetDecorator = { shape: ej.datavisualization.Diagram.DecoratorShapes.Arrow, borderColor: "#606060", width: 10, height: 10 }; - option.lineColor = "#606060"; - if (option.labels && option.labels.length > 0) { - option.labels[0].fillColor = "white"; - } - return option; -} - -function createLabel(options : any) { - return options; -} - - - -module DialogComponent { - $(function () { - var dialogInstance = new ej.Dialog($("#basicDialog"), { - width: 550, - minWidth: 310, - minHeight: 215, - target:".control", - close:()=>{ - $("#btnOpen").show();} - }); - var btnInstance = new ej.Button($("#btnOpen"), { - size: "medium", - click: ()=>{ - $("#btnOpen").hide(); - $("#basicDialog").ejDialog("open");}, - type: "button", - height: 30, - width: 150 - }); - }); -} - - - - -module digitalgaugecomponent { - $(function () { - var digitalgaugesample = new ej.datavisualization.DigitalGauge($("#DigitalGauge"), { - width: 525, - height: 305, - isResponsive: true, - items: [{ - segmentSettings: { - width: 1, - spacing: 0, - color: "#8c8c8c" - }, - characterSettings: { - opacity: 0.8, - }, - value: "Syncfusion", - position: { x: 52, y: 52 } - }] - }); - }); -} - - - - - - -module DropDownListComponent { - var BikeList = [ - { empid: "bk1", text: "Apache RTR" }, { empid: "bk2", text: "CBR 150-R" }, { empid: "bk3", text: "CBZ Xtreme" }, - { empid: "bk4", text: "Discover" }, { empid: "bk5", text: "Dazzler" }, { empid: "bk6", text: "Flame" }, - { empid: "bk7", text: "Fazzer" }, { empid: "bk8", text: "FZ-S" }, { empid: "bk9", text: "Pulsar" }, - { empid: "bk10", text: "Shine" }, { empid: "bk11", text: "R15" }, { empid: "bk12", text: "Unicorn" } - ]; - $(function () { - var sample = new ej.DropDownList($("#bikeList"),{ - dataSource: BikeList, - width: "100%", - watermarkText: "Select a bike", - fields: { id: "empid", text: "text", value: "text" }, - enableFilterSearch: true, - caseSensitiveSearch: true, - enableIncrementalSearch: true, - enablePopupResize: true, - delimiterChar: ";", - multiSelectMode: ej.MultiSelectMode.Delimiter, - maxPopupHeight: "300px", - minPopupHeight: "150px", - maxPopupWidth: "500px", - minPopupWidth: "350px", - showCheckbox: true, - showRoundedCorner: true - }); - }); -} - - - - - -module ExplorerComponent { - $(function () { - var file = new ej.FileExplorer($("#fileExplorer"), { - path: (window).baseurl + "Content/FileBrowser/", - width: "100%", - minWidth: "150px", - layout: "tile", - isResponsive: true, - ajaxAction: (window).baseurl + "api/FileExplorer/FileOperations" - }); - }); -} - - - - -module GanttComponent { - $(function () { - var ganttInstance = new ej.Gantt($("#GanttContainer"), { - dataSource: (window).projectData, - allowColumnResize: true, - allowSorting: true, - allowSelection: true, - enableContextMenu: true, - taskIdMapping: "taskID", - allowDragAndDrop: true, - taskNameMapping: "taskName", - startDateMapping: "startDate", - showColumnChooser: true, - showColumnOptions: true, - progressMapping: "progress", - durationMapping: "duration", - endDateMapping: "endDate", - childMapping: "subtasks", - scheduleStartDate: "02/01/2017", - scheduleEndDate: "04/09/2017", - //Resources mapping - resourceInfoMapping: "resourceId", - resourceNameMapping: "resourceName", - resourceIdMapping: "resourceId", - resources: (window).projectResources, - predecessorMapping: "predecessor", - showResourceNames: true, - toolbarSettings: { - showToolbar: true, - toolbarItems: ["add","edit","delete","update","cancel","indent","outdent","expandAll","collapseAll","search"] - }, - editSettings: { - allowEditing: true, - allowAdding: true, - allowDeleting: true, - allowIndent: true, - editMode: "cellEditing" - }, - sizeSettings: { - width: "100%", - height: "100%" - }, - dragTooltip: { showTooltip: true }, - showGridCellTooltip: true, - treeColumnIndex: 1, - isResponsive: true, - }); -}); -} - - - -module GridComponent { - $(function () { - var gridInstance = new ej.Grid($("#Grid"), { - dataSource: (window).gridData, - allowGrouping: true, - allowSorting: true, - allowMultiSorting: true, - enableAltRow: true, - allowPaging: true, - allowReordering: true, - allowResizing: true, - allowFiltering: true, - allowScrolling: true, - enableRowHover: true, - selectionType: "multiple", - selectionSettings: { enableToggle: true, selectionMode: ["row", "cell", "column"] }, - allowKeyboardNavigation: true, - editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true, allowEditOnDblClick: true, showDeleteConfirmDialog: true }, - toolbarSettings: { showToolbar: true, toolbarItems: ["add", "edit", "delete", "update", "cancel", "search"] }, - columns: [ - { field: "OrderID", headerText: "Order ID", isPrimaryKey: true, width: 75, textAlign: ej.TextAlign.Right }, - { field: "CustomerID", headerText: "Customer ID", editType: ej.Grid.EditingType.String, width: 80 }, - { field: "EmployeeID", headerText: "Employee ID", width: 75, editType: ej.Grid.EditingType.Dropdown, textAlign: ej.TextAlign.Right, priority: 4 }, - { field: "Freight", width: 75, format: "{0:C}", editType: ej.Grid.EditingType.Numeric, textAlign: ej.TextAlign.Right, priority: 3 }, - { field: "OrderDate", headerText: "Order Date", width: 80, format: "{0:MM/dd/yyyy}", textAlign: ej.TextAlign.Right, priority: 2 }, - { field: "ShipCity", headerText: "Ship City", editType: ej.Grid.EditingType.Dropdown, width: 110, priority: 2 } - ], - isResponsive: true, - minWidth: 700, - showSummary: true, - summaryRows: [{ title: "Sum", summaryColumns: [{ summaryType: ej.Grid.SummaryType.Sum, displayColumn: "Freight", dataMember: "Freight", format: "{0:C2}" }] }] - }); - }); -} - - - -var columns = ["Vegie-spread", "Tofuaa", "Alice Mutton", "Konbu", "Fløtemysost"] -var itemSource: any[] = []; -for (var i = 0; i < columns.length; i++) { - for (var j = 0; j < 6; j++) { - var value = Math.floor((Math.random() * 100) + 1); - itemSource.push({ ProductName: columns[i], Year: "Y" + (2011 + j), Value: value }) - } -} - -$(function () { - var heatmap = new ej.datavisualization.HeatMap($("#heatmap"), { - colorMappingCollection: [ - { value: 0, color: "#8ec8f8", label: { text: "0" } }, - { value: 100, color: "#0d47a1", label: { text: "100" } } - ], - isResponsive: true, - itemsSource: itemSource, - width: "100%", - itemsMapping: { - column: { propertyName: "ProductName", displayName: "Product Name" }, - row: { propertyName: "Year", displayName: "Year" }, - value: { propertyName: "Value" }, - columnMapping: [ - { "propertyName": columns[0], "displayName": columns[0] }, - { "propertyName": columns[1], "displayName": columns[1] }, - { "propertyName": columns[2], "displayName": columns[2] }, - { "propertyName": columns[3], "displayName": columns[3] }, - { "propertyName": columns[4], "displayName": columns[4] }, - { "propertyName": columns[5], "displayName": columns[5] } - ], - headerMapping: { propertyName: "Year", displayName: "Year", columnStyle: { width: 105, textAlign: "right" } }, - }, - legendCollection: ["heatmap_legend"] - }); - var heatmaplegend = new ej.datavisualization.HeatMapLegend($("#heatmap_legend"), { - colorMappingCollection: [ - { value: 0, color: "#8ec8f8", label: { text: "0" } }, - { value: 100, color: "#0d47a1", label: { text: "100" } } - ], - height: "50px", - width: "75%", - isResponsive: true - }); -}); - - - - -module KanbanComponent { - $(function () { - var sample = new ej.Kanban($("#Kanban"), { - dataSource: new ej.DataManager((window).kanbanData).executeLocal(new ej.Query().take(20)), - columns: [ - { headerText: "Backlog", key: "Open" }, - { headerText: "In Progress", key: "InProgress" }, - { headerText: "Testing", key: "Testing" }, - { headerText: "Done", key: "Close" } - ], - keyField: "Status", - allowTitle: true, - fields: { - content: "Summary", - primaryKey: "Id", - imageUrl: "ImgUrl" - }, - allowSelection: false - }); - }); -} - - -module lineargaugecomponent { - $(function () { - var linearsample = new ej.datavisualization.LinearGauge($("#LinearGauge"), { - labelColor: "#8c8c8c", width: 500, - isResponsive: true, enableAnimation: false, - scales: [{ - width: 4, border: { color: "transparent", width: 0 }, showBarPointers: false, showRanges: true, length: 310, - position: { x: 52, y: 50 }, markerPointers: [{ - value: 50, length: 10, width: 10, backgroundColor: "#4D4D4D", border: { color: "#4D4D4D" } - }], - labels: [{ font: { size: "11px", fontFamily: "Segoe UI", fontStyle: "bold" }, distanceFromScale: { x: -13 } }], - ticks: [{ type: "majorinterval", width: 1, color: "#8c8c8c" }], - ranges: [{ - endValue: 60, - startValue: 0, - backgroundColor: "#F6B53F", - border: { color: "#F6B53F" }, startWidth: 4, endWidth: 4 - }, { - endValue: 100, - startValue: 60, - backgroundColor: "#E94649", - border: { color: "#E94649" }, startWidth: 4, endWidth: 4 - }] - }] - }); - }); -} - - - -module ListBoxComponent { - $(function () { - var listboxInstance = new ej.ListBox($("#selectcar"), { - showCheckbox: true - }); - }); -} - - - -module ListviewComponent { - $(function () { - var listviewInstance = new ej.ListView($("#defaultlistview"), { - enableCheckMark: true, - width: 400 - }); - }); -} - - -var world_map= - { - "type": "FeatureCollection", - "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, - "features": [ - { "type": "Feature", "properties": { "admin": "Afghanistan", "name": "Afghanistan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[61.21081709172573, 35.650072333309218], [62.230651483005879, 35.270663967422287], [62.984662306576588, 35.404040839167614], [63.193538445900337, 35.857165635718907], [63.982895949158696, 36.007957465146596], [64.546479119733888, 36.31207326918426], [64.746105177677393, 37.111817735333297], [65.588947788357828, 37.305216783185628], [65.745630731066811, 37.661164048812061], [66.217384881459324, 37.393790188133913], [66.518606805288655, 37.362784328758785], [67.075782098259609, 37.35614390720928], [67.829999627559502, 37.144994004864678], [68.135562371701369, 37.023115139304302], [68.859445835245921, 37.344335842430588], [69.196272820924364, 37.15114350030742], [69.518785434857946, 37.608996690413413], [70.116578403610319, 37.588222764632086], [70.270574171840124, 37.73516469985401], [70.376304152309274, 38.138395901027515], [70.806820509732873, 38.486281643216408], [71.348131137990251, 38.258905341132156], [71.239403924448155, 37.953265082341879], [71.541917759084768, 37.905774441065631], [71.448693475230229, 37.065644843080513], [71.84463829945058, 36.738171291646914], [72.193040805962383, 36.94828766534566], [72.636889682917271, 37.047558091778349], [73.260055779924983, 37.495256862938994], [73.948695916646486, 37.421566270490786], [74.980002475895404, 37.419990139305888], [75.158027785140902, 37.13303091078911], [74.575892775372964, 37.02084137628345], [74.067551710917812, 36.836175645488446], [72.920024855444453, 36.720007025696312], [71.846291945283909, 36.509942328429851], [71.262348260385735, 36.074387518857797], [71.498767938121077, 35.650563259415996], [71.613076206350698, 35.153203436822857], [71.115018751921625, 34.733125718722228], [71.156773309213449, 34.348911444632144], [70.881803012988385, 33.988855902638512], [69.93054324735958, 34.020120144175102], [70.323594191371583, 33.358532619758385], [69.687147251264847, 33.105498969041228], [69.262522007122541, 32.501944078088293], [69.317764113242546, 31.901412258424436], [68.926676873657655, 31.620189113892064], [68.556932000609308, 31.713310044882011], [67.792689243444769, 31.582930406209623], [67.683393589147457, 31.303154201781414], [66.938891229118454, 31.304911200479346], [66.38145755398601, 30.738899237586448], [66.346472609324408, 29.88794342703617], [65.046862013616092, 29.472180691031902], [64.350418735618504, 29.560030625928089], [64.148002150331237, 29.340819200145965], [63.550260858011164, 29.468330796826162], [62.549856805272775, 29.318572496044304], [60.874248488208778, 29.829238999952604], [61.78122155136343, 30.735850328081231], [61.699314406180811, 31.379506130492661], [60.941944614511115, 31.548074652628745], [60.863654819588952, 32.182919623334421], [60.536077915290761, 32.981268825811561], [60.963700392505991, 33.528832302376252], [60.528429803311575, 33.676446031217999], [60.80319339380744, 34.404101874319856], [61.21081709172573, 35.650072333309218]]] } }, - { "type": "Feature", "properties": { "admin": "Angola", "name": "Angola", "continent": "Africa" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[16.326528354567042, -5.877470391466217], [16.573179965896141, -6.622644545115092], [16.860190870845226, -7.222297865429978], [17.089995965247166, -7.545688978712474], [17.472970004962288, -8.068551120641656], [18.134221632569048, -7.987677504104865], [18.464175652752683, -7.847014255406475], [19.016751743249664, -7.988245944860138], [19.166613396896079, -7.738183688999724], [19.417502475673214, -7.155428562044277], [20.037723016040214, -7.116361179231658], [20.091621534920616, -6.943090101756949], [20.60182295093832, -6.939317722199688], [20.514748162526526, -7.299605808138663], [21.728110792739752, -7.290872491081315], [21.74645592620336, -7.920084730667113], [21.949130893652033, -8.305900974158304], [21.80180138518795, -8.908706556842985], [21.875181919042397, -9.523707777548564], [22.208753289486417, -9.894796237836529], [22.155268182064326, -11.084801120653777], [22.402798292742428, -10.99307545333569], [22.837345411884762, -11.017621758674334], [23.456790805767461, -10.867863457892481], [23.912215203555743, -10.926826267137541], [24.017893507592614, -11.237298272347115], [23.904153680118235, -11.722281589406332], [24.079905226342895, -12.191296888887305], [23.930922072045373, -12.565847670138821], [24.0161365088947, -12.91104623784855], [21.933886346125941, -12.898437188369353], [21.887842644953871, -16.080310153876891], [22.562478468524283, -16.898451429921831], [23.215048455506086, -17.523116143465952], [21.377176141045592, -17.930636488519706], [18.956186964603628, -17.789094740472233], [18.263309360434217, -17.309950860262003], [14.209706658595049, -17.353100681225708], [14.058501417709035, -17.423380629142653], [13.462362094789963, -16.971211846588741], [12.814081251688405, -16.941342868724075], [12.21546146001938, -17.111668389558059], [11.734198846085146, -17.301889336824498], [11.640096062881609, -16.673142185129205], [11.778537224991563, -15.793816013250687], [12.123580763404444, -14.878316338767927], [12.175618930722264, -14.449143568583889], [12.500095249083014, -13.547699883684398], [12.738478631245439, -13.137905775609934], [13.312913852601834, -12.483630466362511], [13.633721144269824, -12.038644707897189], [13.738727654686924, -11.297863050993142], [13.686379428775293, -10.73107594161584], [13.38732791510216, -10.373578383020726], [13.120987583069873, -9.766897067914112], [12.875369500386567, -9.166933689005488], [12.929061313537797, -8.959091078327573], [13.23643273280987, -8.56262948978434], [12.933040398824314, -7.596538588087752], [12.728298374083916, -6.927122084178803], [12.227347039446441, -6.294447523629372], [12.322431674863562, -6.100092461779651], [12.735171339578695, -5.965682061388476], [13.024869419006988, -5.984388929878106], [13.375597364971892, -5.864241224799555], [16.326528354567042, -5.877470391466217]]], [[[12.436688266660919, -5.684303887559223], [12.182336866920277, -5.789930515163801], [11.914963006242115, -5.037986748884733], [12.318607618873923, -4.606230157086158], [12.620759718484548, -4.438023369976121], [12.995517205465202, -4.781103203961918], [12.631611769265842, -4.991271254092935], [12.468004184629759, -5.248361504744991], [12.436688266660919, -5.684303887559223]]]] } }, - { "type": "Feature", "properties": { "admin": "Albania", "name": "Albania", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[20.590247430104906, 41.855404161133592], [20.463175083099195, 41.515089016275333], [20.605181919037356, 41.086226304685219], [21.020040317476397, 40.842726955725873], [20.99998986174722, 40.580003973953964], [20.67499677906363, 40.43499990494302], [20.61500044117275, 40.110006822259365], [20.150015903410516, 39.624997666983965], [19.980000441170144, 39.694993394523401], [19.9600016618732, 39.915005805006039], [19.40608198413673, 40.250773423822459], [19.319058872157139, 40.727230129553554], [19.403549838954287, 41.409565741535445], [19.540027296637099, 41.71998607031275], [19.371768833094958, 41.87754751237064], [19.304486118250786, 42.195745144207812], [19.738051385179627, 42.688247382165564], [19.801613396898681, 42.500093492190835], [20.0707, 42.58863], [20.28375451018189, 42.320259507815074], [20.52295, 42.21787], [20.590247430104906, 41.855404161133592]]] } }, - { "type": "Feature", "properties": { "admin": "United Arab Emirates", "name": "United Arab Emirates", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[51.579518670463258, 24.245497137951102], [51.757440626844172, 24.294072984305462], [51.794389275932865, 24.019826158132499], [52.577080519425593, 24.177439276622703], [53.404006788960139, 24.151316840099167], [54.008000929587574, 24.121757920828212], [54.693023716048614, 24.797892360935084], [55.439024692614126, 25.439145209244934], [56.070820753814544, 26.055464178973978], [56.261041701080948, 25.714606431576762], [56.396847365143991, 24.924732163995483], [55.886232537667993, 24.92083059335744], [55.804118686756212, 24.269604193615258], [55.981213820220454, 24.130542914317822], [55.528631626208231, 23.933604030853498], [55.525841098864461, 23.524869289640929], [55.234489373602869, 23.110992743415316], [55.208341098863187, 22.708329982997039], [55.006803012924898, 22.496947536707129], [52.000733270074321, 23.001154486578937], [51.617707553926969, 24.014219265228824], [51.579518670463258, 24.245497137951102]]] } }, - { "type": "Feature", "properties": { "admin": "Argentina", "name": "Argentina", "continent": "South America" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-65.5, -55.2], [-66.45, -55.25], [-66.95992, -54.89681], [-67.56244, -54.87001], [-68.63335, -54.8695], [-68.634010227583147, -52.636370458874453], [-68.25, -53.1], [-67.75, -53.85], [-66.45, -54.45], [-65.05, -54.7], [-65.5, -55.2]]], [[[-64.964892137294569, -22.075861504812348], [-64.377021043542257, -22.79809132252354], [-63.986838141522462, -21.993644301035953], [-62.84646847192154, -22.034985446869452], [-62.685057135657885, -22.249029229422401], [-60.846564704009928, -23.880712579038299], [-60.028966030503973, -24.032796319273238], [-58.807128465394939, -24.771459242453268], [-57.777217169817952, -25.162339776309032], [-57.633660040911124, -25.603656508081666], [-58.618173590719707, -27.123718763947117], [-57.609759690976134, -27.395898532828419], [-56.486701626192989, -27.548499037386243], [-55.695845506398186, -27.387837009390815], [-54.788794928595038, -26.621785577096087], [-54.625290696823541, -25.739255466415479], [-54.130049607954412, -25.547639255477243], [-53.628348965048716, -26.12486500417743], [-53.648735317587885, -26.923472588816104], [-54.490725267135517, -27.474756768505767], [-55.162286342984586, -27.881915378533414], [-56.290899624239088, -28.852760512000849], [-57.62513342958291, -30.21629485445424], [-57.874937303281897, -31.016556084926158], [-58.14244035504074, -32.044503676076182], [-58.132647671121404, -33.040566908502008], [-58.349611172098818, -33.263188978815428], [-58.427074144104367, -33.909454441057541], [-58.495442064026541, -34.4314897600701], [-57.225829637263629, -35.288026625307886], [-57.362358771378737, -35.977390232081497], [-56.737487352105447, -36.413125909166574], [-56.788285285048339, -36.901571547189327], [-57.749156867083421, -38.183870538079901], [-59.231857062401865, -38.720220228837199], [-61.2374452378656, -38.92842457454114], [-62.335956997310134, -38.827707208004362], [-62.125763108962914, -39.424104913084868], [-62.33053097191943, -40.172586358400316], [-62.145994432205228, -40.676896661136723], [-62.74580278181697, -41.028761488612083], [-63.770494757732514, -41.166789239263657], [-64.732089809819698, -40.802677097335128], [-65.118035244391578, -41.064314874028874], [-64.97856055363583, -42.058000990569312], [-64.303407965742466, -42.359016208669495], [-63.755947842042339, -42.043686618824495], [-63.458059048095883, -42.563138116222355], [-64.378803880456289, -42.873558444999638], [-65.181803961839691, -43.495380954767782], [-65.328823411710133, -44.501366062193689], [-65.565268927661592, -45.03678557716978], [-66.509965786389344, -45.039627780945843], [-67.293793911392427, -45.551896254255183], [-67.580546434180079, -46.301772963242527], [-66.597066413017259, -47.033924655953804], [-65.641026577401433, -47.23613453551188], [-65.98508826360073, -48.133289076531128], [-67.166178961847649, -48.697337334996931], [-67.816087612566449, -49.869668877970412], [-68.728745083273154, -50.26421843851886], [-69.138539191347789, -50.732510267947788], [-68.815561489523517, -51.771104011594097], [-68.149994879820397, -52.349983406127699], [-68.571545376241332, -52.299443855346247], [-69.498362189396076, -52.142760912637236], [-71.914803839796321, -52.009022305865912], [-72.329403856074023, -51.425956312872394], [-72.309973517532342, -50.677009779666342], [-72.975746832964617, -50.741450290734299], [-73.328050910114456, -50.378785088909865], [-73.415435757120022, -49.318436374712952], [-72.648247443314929, -48.878618259476774], [-72.331160854771937, -48.244238376661819], [-72.44735531278026, -47.738532810253517], [-71.917258470330196, -46.884838148791786], [-71.552009446891233, -45.560732924177117], [-71.659315558545316, -44.973688653341434], [-71.222778896759721, -44.784242852559409], [-71.329800788036195, -44.407521661151677], [-71.793622606071935, -44.207172133156099], [-71.464056159130493, -43.787611179378324], [-71.915423956983901, -43.408564548517404], [-72.148898078078517, -42.254888197601375], [-71.746803758415453, -42.051386407235988], [-71.915734015577542, -40.832339369470716], [-71.680761277946445, -39.808164157878061], [-71.413516608349042, -38.916022230791107], [-70.814664272734703, -38.552995293940732], [-71.118625047475419, -37.576827487947192], [-71.121880662709771, -36.65812387466233], [-70.364769253201658, -36.005088799789931], [-70.388049485949082, -35.169687595359441], [-69.817309129501453, -34.193571465798279], [-69.814776984319209, -33.273886000299839], [-70.074399380153622, -33.09120981214803], [-70.535068935819439, -31.365010267870279], [-69.919008348251921, -30.336339206668306], [-70.013550381129861, -29.367922865518544], [-69.656130337183143, -28.459141127233686], [-69.001234910748266, -27.521213881136127], [-68.295541551370391, -26.899339694935787], [-68.594799770772667, -26.50690886811126], [-68.386001146097342, -26.185016371365229], [-68.417652960876111, -24.518554782816874], [-67.328442959244128, -24.025303236590908], [-66.985233934177629, -22.986348565362825], [-67.106673550063604, -22.735924574476392], [-66.273339402924833, -21.832310479420677], [-64.964892137294569, -22.075861504812348]]]] } }, - { "type": "Feature", "properties": { "admin": "Armenia", "name": "Armenia", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[43.582745802592726, 41.09214325618256], [44.972480096218071, 41.248128567055588], [45.179495883979335, 40.985353908851401], [45.560351189970433, 40.812289537105919], [45.359174839058156, 40.561503811193447], [45.891907179555076, 40.218475653639992], [45.610012241402913, 39.899993801425175], [46.034534132680662, 39.628020738273058], [46.483498976432443, 39.464154771475528], [46.505719842317966, 38.770605373686287], [46.143623081248812, 38.74120148371221], [45.735379266143006, 39.319719143219736], [45.739978468616975, 39.473999131827114], [45.298144972521456, 39.471751207022422], [45.00198733905674, 39.740003567049548], [44.793989699081934, 39.713002631177041], [44.400008579288695, 40.005000311842267], [43.656436395040934, 40.253563951166178], [43.752657911968399, 40.740200914058754], [43.582745802592726, 41.09214325618256]]] } }, - { "type": "Feature", "properties": { "admin": "French Southern and Antarctic Lands", "name": "Fr. S. Antarctic Lands", "continent": "Seven seas (open ocean)" }, "geometry": { "type": "Polygon", "coordinates": [[[68.935, -48.625], [69.58, -48.94], [70.525, -49.065], [70.56, -49.255], [70.28, -49.71], [68.745, -49.775], [68.72, -49.2425], [68.8675, -48.83], [68.935, -48.625]]] } }, - { "type": "Feature", "properties": { "admin": "Australia", "name": "Australia", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[145.397978143494782, -40.792548516605883], [146.364120721623692, -41.137695407883335], [146.908583612250823, -41.000546156580668], [147.689259474884125, -40.808258152022681], [148.289067824495987, -40.875437514002122], [148.359864536735785, -42.062445163746439], [148.017301467073082, -42.40702361426861], [147.914051955353784, -43.211522312188485], [147.564564243763982, -42.937688897473855], [146.87034305235494, -43.634597263362082], [146.663327264593647, -43.580853773778543], [146.048377720320389, -43.54974456153888], [145.431929559510536, -42.693776137056268], [145.295090366801674, -42.03360971452755], [144.7180713238306, -41.162551771815707], [144.743754510679622, -40.703975111657705], [145.397978143494782, -40.792548516605883]]], [[[143.561811151299935, -13.763655694232209], [143.922099237238882, -14.548310642152], [144.563713820574804, -14.171176039285879], [144.894908075133515, -14.594457696188622], [145.374723748963419, -14.984976495018284], [145.271991001567244, -15.428205254785691], [145.48525963763575, -16.285672295804769], [145.637033319276952, -16.784918308176611], [145.888904250267672, -16.906926364817647], [146.160308872664473, -17.76165455492524], [146.063673944278662, -18.280072523677315], [146.387478469019584, -18.958274021075905], [147.471081577747896, -19.480722751546676], [148.177601760042478, -19.955939222902767], [148.848413527623222, -20.391209812097252], [148.717465448195583, -20.633468926681513], [149.289420200802056, -21.260510756111096], [149.678337030230637, -22.342511895438388], [150.07738244038859, -22.122783705333315], [150.482939081015161, -22.556142266533012], [150.727265252891158, -22.402404880464655], [150.899554478152254, -23.462236830338679], [151.609175246384211, -24.076256198830755], [152.07353966695905, -24.45788665130619], [152.855197381805908, -25.267501316023008], [153.136162144176751, -26.071173191026187], [153.161948683890358, -26.641319268502439], [153.09290897034856, -27.260299574494503], [153.569469028944184, -28.110066827102099], [153.512108189100218, -28.995077406532751], [153.339095493787056, -29.458201592732443], [153.069241164358857, -30.350240166954809], [153.089601678681788, -30.923641859665445], [152.891577590139377, -31.640445651985949], [152.450002476205327, -32.550002536755237], [151.709117466436766, -33.041342054986337], [151.343971795862387, -33.816023451473846], [151.010555454715103, -34.310360202777879], [150.714139439089024, -35.173459974916803], [150.328219842733233, -35.671879164371923], [150.075212030232251, -36.420205580390508], [149.946124302367139, -37.109052422841224], [149.997283970336127, -37.425260512035123], [149.423882277625523, -37.772681166333463], [148.304622430615893, -37.809061374666875], [147.38173302631526, -38.219217217767543], [146.922122837511324, -38.606532077795116], [146.317921991154776, -39.035756524411433], [145.489652134380549, -38.593767999019043], [144.876976353128157, -38.41744801203911], [145.032212355732952, -37.896187839510972], [144.485682407814011, -38.085323581699257], [143.609973586196077, -38.809465427405321], [142.745426873952965, -38.538267510737519], [142.17832970598198, -38.380034275059835], [141.606581659104677, -38.308514092767872], [140.638578729413211, -38.019332777662541], [139.992158237874321, -37.402936293285094], [139.806588169514043, -36.643602797188272], [139.574147577065219, -36.138362318670666], [139.082808058834075, -35.732754001611774], [138.120747918856296, -35.612296237939397], [138.449461704664998, -35.127261244447887], [138.207564325106659, -34.384722588845925], [137.719170363516128, -35.07682504653102], [136.829405552314711, -35.260534763328614], [137.352371047108477, -34.707338555644093], [137.503886346588331, -34.130267836240769], [137.890116001537649, -33.640478610978327], [137.810327590079112, -32.900007012668105], [136.996837192940347, -33.752771498348629], [136.372069126531642, -34.094766127256186], [135.98904341038434, -34.89011809666048], [135.208212518454104, -34.478670342752601], [135.239218377829161, -33.947953383114971], [134.613416782774607, -33.222778008763136], [134.085903761939107, -32.848072198214759], [134.273902622617015, -32.617233575166949], [132.990776808809812, -32.011224053680188], [132.288080682504869, -31.982646986622761], [131.326330601120901, -31.495803318001041], [129.535793898639668, -31.590422865527476], [128.240937534702198, -31.948488864877849], [127.102867466338282, -32.282266941051041], [126.148713820501129, -32.2159660784206], [125.088623488465586, -32.728751316052829], [124.22164798390493, -32.959486586236061], [124.028946567888511, -33.483847344701708], [123.65966678273071, -33.890179131812722], [122.811036411633609, -33.914467054989835], [122.18306440642283, -34.003402194964217], [121.299190708502579, -33.821036065406126], [120.580268182458113, -33.930176690406618], [119.893695103028222, -33.976065362281808], [119.298899367348781, -34.50936614353396], [119.007340936357977, -34.464149265278529], [118.505717808100769, -34.746819349915093], [118.024971958489516, -35.064732761374707], [117.295507440257438, -35.025458672832862], [116.62510908413492, -35.025096937806829], [115.564346958479689, -34.386427911111547], [115.026808709779516, -34.196517022438918], [115.048616164206763, -33.623425388322026], [115.545123325667078, -33.487257989232951], [115.714673700016661, -33.259571628554944], [115.679378696761376, -32.900368747694124], [115.801645135563959, -32.205062351207026], [115.689610630355105, -31.612437025683782], [115.160909051576937, -30.601594333622455], [114.99704308477942, -30.030724786094162], [115.040037876446249, -29.461095472940794], [114.64197431850198, -28.810230808224706], [114.61649783738217, -28.516398614213042], [114.173579136208446, -28.118076674107321], [114.048883905088132, -27.33476531342712], [113.477497593236876, -26.543134047147898], [113.338953078262477, -26.116545098578477], [113.77835778204026, -26.549025160429174], [113.440962355606587, -25.621278171493152], [113.936901076311642, -25.911234633082877], [114.232852004047288, -26.298446140245868], [114.216160516417006, -25.786281019801105], [113.721255324357685, -24.998938897402123], [113.625343866024025, -24.683971042583146], [113.393523390762667, -24.384764499613262], [113.502043898575607, -23.80635019297025], [113.706992629045146, -23.56021534596406], [113.843418410295669, -23.059987481378734], [113.736551548316072, -22.475475355725372], [114.149756300921865, -21.755881036061009], [114.225307244932651, -22.51748829517863], [114.64776207891866, -21.829519952076904], [115.460167270979298, -21.495173435148541], [115.94737267462699, -21.068687839443708], [116.711615431791529, -20.701681817306817], [117.166316359527684, -20.623598728113802], [117.441545037914238, -20.746898695562162], [118.229558953932951, -20.374208265873232], [118.836085239742701, -20.263310642174822], [118.987807244951753, -20.044202569257319], [119.252493931150624, -19.952941989829835], [119.805225050944543, -19.976506442954978], [120.856220330896633, -19.683707777589188], [121.399856398607199, -19.239755547769729], [121.655137974129062, -18.70531788500713], [122.241665480641757, -18.197648614171765], [122.286623976735655, -17.798603204013911], [122.312772251475408, -17.254967136303446], [123.012574497571904, -16.405199883695854], [123.433789097183009, -17.268558037996225], [123.859344517106592, -17.069035332917249], [123.503242222183232, -16.596506036040363], [123.817073195491915, -16.11131601325199], [124.258286574399847, -16.32794361741956], [124.379726190285794, -15.567059828353973], [124.926152785340022, -15.07510019293532], [125.167275018413875, -14.680395603090004], [125.670086704613823, -14.510070082256018], [125.685796340030493, -14.230655612853834], [126.125149367376096, -14.347340996968949], [126.142822707219864, -14.095986830301211], [126.582589146023736, -13.95279143642041], [127.065867140817332, -13.817967624570922], [127.804633416861932, -14.276906019755042], [128.359689976108939, -14.869169610252253], [128.985543247595899, -14.875990899314738], [129.621473423379598, -14.969783623924553], [129.409600050982988, -14.420669854391031], [129.888640578328591, -13.618703301653481], [130.339465773642928, -13.357375583553473], [130.183506300985982, -13.107520033422301], [130.617795037966971, -12.536392103732464], [131.223494500859999, -12.183648776908113], [131.73509118054946, -12.302452894747159], [132.575298293183096, -12.114040622611013], [132.557211541881031, -11.603012383676683], [131.824698114143644, -11.273781833545097], [132.357223748911395, -11.128519382372641], [133.019560581596409, -11.376411228076844], [133.550845981989028, -11.786515394745134], [134.393068475481982, -12.042365411022173], [134.678632440327021, -11.9411829565947], [135.298491245667975, -12.248606052299051], [135.882693312727611, -11.962266940969796], [136.258380975489445, -12.049341729381606], [136.492475213771627, -11.857208754120389], [136.951620314684988, -12.351958916882735], [136.685124953355739, -12.887223402562054], [136.305406528875096, -13.291229750219895], [135.961758254134111, -13.324509372615889], [136.077616815332533, -13.72427825282578], [135.783836297753226, -14.223989353088211], [135.4286641786112, -14.715432224183896], [135.500184360903177, -14.997740573794427], [136.295174595281367, -15.550264987859121], [137.065360142159477, -15.870762220933353], [137.580470819244795, -16.215082289294084], [138.303217401278971, -16.807604261952658], [138.58516401586337, -16.806622409739173], [139.108542922115475, -17.062679131745366], [139.260574985918197, -17.371600843986183], [140.215245396078274, -17.710804945550063], [140.875463495039241, -17.36906869880394], [141.071110467696258, -16.832047214426719], [141.274095493738798, -16.388870131091604], [141.398222284103781, -15.840531508042584], [141.702183058844611, -15.044921156476928], [141.563380161708665, -14.561333103089506], [141.635520461188094, -14.270394789286284], [141.519868605718955, -13.698078301653805], [141.650920038011009, -12.944687595270562], [141.842691278246207, -12.741547539931187], [141.68699018775078, -12.407614434461134], [141.928629185147543, -11.877465915578778], [142.118488397387978, -11.328042087451619], [142.14370649634634, -11.04273650476814], [142.51526004452495, -10.668185723516642], [142.797310011974048, -11.157354831591515], [142.866763136974271, -11.784706719614929], [143.11594689348567, -11.90562957117791], [143.158631626558758, -12.325655612846187], [143.522123651299864, -12.834358412327429], [143.597157830987669, -13.400422051652594], [143.561811151299935, -13.763655694232209]]]] } }, - { "type": "Feature", "properties": { "admin": "Austria", "name": "Austria", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[16.979666782304033, 48.123497015976298], [16.903754103267257, 47.714865627628321], [16.340584344150411, 47.712901923201215], [16.534267612380372, 47.496170966169103], [16.202298211337361, 46.852385972676949], [16.011663852612653, 46.683610744811688], [15.137091912504982, 46.658702704447016], [14.632471551174827, 46.431817328469535], [13.806475457421524, 46.509306138691201], [12.376485223040813, 46.767559109069843], [12.153088006243051, 47.115393174826437], [11.164827915093268, 46.941579494812721], [11.048555942436533, 46.751358547546324], [10.442701450246627, 46.893546250997424], [9.932448357796657, 46.920728054382948], [9.479969516649019, 47.102809963563367], [9.632931756232974, 47.347601223329974], [9.594226108446346, 47.525058091820256], [9.896068149463188, 47.58019684507569], [10.402083774465209, 47.302487697939156], [10.544504021861625, 47.566399237653762], [11.426414015354736, 47.523766181012967], [12.141357456112784, 47.703083401065761], [12.620759718484491, 47.672387600284395], [12.932626987365945, 47.467645575543983], [13.025851271220487, 47.637583523135824], [12.884102817443901, 48.289145819687903], [13.243357374736998, 48.41611481382904], [13.595945672264433, 48.877171942737135], [14.33889773932472, 48.555305284207193], [14.901447381254055, 48.964401760445817], [15.253415561593979, 49.039074205107575], [16.029647251050218, 48.733899034207916], [16.49928266771877, 48.785808010445095], [16.960288120194573, 48.596982326850593], [16.879982944412998, 48.470013332709463], [16.979666782304033, 48.123497015976298]]] } }, - { "type": "Feature", "properties": { "admin": "Azerbaijan", "name": "Azerbaijan", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[45.001987339056789, 39.740003567049591], [45.298144972521435, 39.471751207022422], [45.739978468616997, 39.473999131827149], [45.735379266143092, 39.319719143219785], [46.143623081248812, 38.74120148371221], [45.457721795438729, 38.874139105783108], [44.952688022650264, 39.33576467544642], [44.79398969908199, 39.713002631177027], [45.001987339056789, 39.740003567049591]]], [[[47.373315464066216, 41.219732367511249], [47.81566572448471, 41.151416124021338], [47.987283156126033, 41.405819200194223], [48.584352654826283, 41.808869533854669], [49.110263706260653, 41.282286688800518], [49.618914829309588, 40.572924302729966], [50.084829542853093, 40.526157131505776], [50.392821079312704, 40.256561184239096], [49.569202101444795, 40.176100979160701], [49.395259230350419, 39.39948171646224], [49.2232283872507, 39.04921885838791], [48.856532423707584, 38.815486355131775], [48.883249139202533, 38.320245266262638], [48.634375441284831, 38.270377509100925], [48.010744256386502, 38.794014797514528], [48.355529412637928, 39.288764960276886], [48.060095249225256, 39.582235419262439], [47.685079380083117, 39.508363959301185], [46.505719842317966, 38.770605373686251], [46.483498976432443, 39.464154771475528], [46.034534132680697, 39.628020738273044], [45.610012241402913, 39.899993801425175], [45.891907179555133, 40.21847565363997], [45.359174839058156, 40.561503811193482], [45.560351189970469, 40.812289537105947], [45.179495883979392, 40.98535390885143], [44.972480096218156, 41.248128567055623], [45.217426385281634, 41.411451931314041], [45.962600538930438, 41.123872585609789], [46.501637404166978, 41.064444688474104], [46.637908156120567, 41.181672675128219], [46.145431756378983, 41.72280243587263], [46.404950799348818, 41.860675157227341], [46.686070591016652, 41.827137152669899], [47.373315464066216, 41.219732367511249]]]] } }, - { "type": "Feature", "properties": { "admin": "Burundi", "name": "Burundi", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[29.339997592900342, -4.499983412294092], [29.276383904749046, -3.293907159034063], [29.02492638521678, -2.839257907730157], [29.632176141078585, -2.917857761246096], [29.938359002407935, -2.348486830254238], [30.469696079232978, -2.413857517103458], [30.527677036264457, -2.807631931167534], [30.743012729624692, -3.034284763199686], [30.752262811004943, -3.359329522315569], [30.505559523243559, -3.568567396665364], [30.116332635221166, -4.090137627787242], [29.753512404099919, -4.45238941815328], [29.339997592900342, -4.499983412294092]]] } }, - { "type": "Feature", "properties": { "admin": "Belgium", "name": "Belgium", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[3.314971144228536, 51.345780951536071], [4.047071160507527, 51.267258612668556], [4.973991326526913, 51.475023708698124], [5.60697594567, 51.037298488969768], [6.156658155958779, 50.803721015010574], [6.043073357781109, 50.128051662794221], [5.782417433300905, 50.090327867221205], [5.674051954784828, 49.52948354755749], [4.799221632515809, 49.985373033236371], [4.286022983425084, 49.90749664977254], [3.588184441755685, 50.378992418003563], [3.123251580425801, 50.780363267614561], [2.658422071960274, 50.796848049515731], [2.513573032246142, 51.148506171261815], [3.314971144228536, 51.345780951536071]]] } }, - { "type": "Feature", "properties": { "admin": "Benin", "name": "Benin", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[2.691701694356254, 6.258817246928628], [1.865240512712318, 6.14215770102973], [1.618950636409238, 6.832038072126236], [1.664477573258381, 9.128590399609378], [1.46304284018467, 9.334624335157086], [1.425060662450136, 9.825395412632998], [1.077795037448737, 10.175606594275022], [0.772335646171484, 10.470808213742357], [0.899563022474069, 10.997339382364258], [1.243469679376488, 11.11051076908346], [1.447178175471066, 11.547719224488857], [1.93598554851988, 11.641150214072551], [2.154473504249921, 11.940150051313337], [2.49016360841793, 12.233052069543671], [2.84864301922667, 12.235635891158266], [3.611180454125558, 11.660167141155966], [3.572216424177469, 11.327939357951516], [3.797112257511713, 10.734745591673104], [3.600070021182801, 10.332186184119406], [3.705438266625918, 10.063210354040207], [3.220351596702101, 9.4441525333997], [2.912308383810255, 9.13760793704432], [2.723792758809509, 8.506845404489708], [2.74906253420022, 7.870734361192886], [2.691701694356254, 6.258817246928628]]] } }, - { "type": "Feature", "properties": { "admin": "Burkina Faso", "name": "Burkina Faso", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-2.827496303712706, 9.642460842319775], [-3.511898972986272, 9.900326239456216], [-3.980449184576684, 9.862344061721698], [-4.330246954760383, 9.610834865757139], [-4.779883592131966, 9.821984768101741], [-4.954653286143098, 10.152713934769732], [-5.404341599946973, 10.370736802609144], [-5.470564947929004, 10.951269842976044], [-5.197842576508648, 11.375145778850136], [-5.220941941743119, 11.713858954307224], [-4.427166103523802, 12.542645575404292], [-4.280405035814879, 13.228443508349738], [-4.006390753587225, 13.472485459848112], [-3.52280270019986, 13.337661647998612], [-3.103706834312759, 13.54126679122859], [-2.967694464520576, 13.798150336151506], [-2.191824510090384, 14.246417548067352], [-2.001035122068771, 14.559008287000887], [-1.066363491205663, 14.973815009007764], [-0.515854458000348, 15.116157741755725], [-0.26625729003058, 14.924308986872147], [0.374892205414682, 14.928908189346128], [0.295646396495101, 14.444234930880651], [0.429927605805517, 13.988733018443922], [0.993045688490071, 13.335749620003821], [1.024103224297477, 12.851825669806573], [2.177107781593775, 12.625017808477532], [2.154473504249921, 11.940150051313337], [1.93598554851988, 11.641150214072551], [1.447178175471066, 11.547719224488857], [1.243469679376488, 11.11051076908346], [0.899563022474069, 10.997339382364258], [0.023802524423701, 11.018681748900802], [-0.438701544588582, 11.09834096927872], [-0.761575893548183, 10.936929633015053], [-1.203357713211431, 11.009819240762736], [-2.94040930827046, 10.962690334512557], [-2.963896246747111, 10.395334784380081], [-2.827496303712706, 9.642460842319775]]] } }, - { "type": "Feature", "properties": { "admin": "Bangladesh", "name": "Bangladesh", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[92.672720981825549, 22.041238918541247], [92.652257114637976, 21.324047552978481], [92.30323449093865, 21.475485337809815], [92.368553501355606, 20.670883287025344], [92.082886183646124, 21.192195135985767], [92.025215285208361, 21.701569729086764], [91.834890985077408, 22.182935695885561], [91.417087029997646, 22.765019029221218], [90.496006300827247, 22.805016587815125], [90.586956821660948, 22.392793687422863], [90.272970819055544, 21.836367702720107], [89.847467075564268, 22.039146023033421], [89.70204959509492, 21.857115790285299], [89.41886274613546, 21.966178900637296], [89.031961297566198, 22.055708319582973], [88.876311883503064, 22.879146429937826], [88.529769728553759, 23.631141872649163], [88.699940220090895, 24.233714911388557], [88.084422235062405, 24.501657212821918], [88.30637251175601, 24.866079413344199], [88.931553989623069, 25.238692328384769], [88.209789259802477, 25.768065700782707], [88.56304935094974, 26.446525580342716], [89.355094028687276, 26.014407253518065], [89.832480910199592, 25.965082098895476], [89.920692580121838, 25.269749864192171], [90.872210727912105, 25.13260061288954], [91.799595981822065, 25.14743174895731], [92.376201613334786, 24.976692816664961], [91.915092807994398, 24.130413723237108], [91.467729933643668, 24.072639471934789], [91.158963250699713, 23.503526923104381], [91.706475050832083, 22.985263983649183], [91.869927606171302, 23.62434642180278], [92.146034783906799, 23.62749868417259], [92.672720981825549, 22.041238918541247]]] } }, - { "type": "Feature", "properties": { "admin": "Bulgaria", "name": "Bulgaria", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[22.657149692482985, 44.234923000661276], [22.94483239105184, 43.823785305347123], [23.332302280376322, 43.897010809904707], [24.100679152124169, 43.741051337247846], [25.569271681426923, 43.688444729174712], [26.065158725699739, 43.943493760751259], [27.242399529740904, 44.175986029632398], [27.970107049275068, 43.812468166675202], [28.55808149589199, 43.707461656258118], [28.039095086384712, 43.293171698574177], [27.673897739378042, 42.577892361006214], [27.996720411905383, 42.007358710287775], [27.135739373490473, 42.141484890301335], [26.117041863720793, 41.826904608724554], [26.106138136507205, 41.328898830727766], [25.197201368925441, 41.234485988930523], [24.492644891058031, 41.583896185872028], [23.692073601992345, 41.309080918943842], [22.952377150166445, 41.337993882811141], [22.881373732197424, 41.999297186850242], [22.380525750424585, 42.320259507815081], [22.545011834409614, 42.461362006188025], [22.436594679461273, 42.580321153323929], [22.604801466571324, 42.898518785161137], [22.986018507588479, 43.211161200526959], [22.500156691180276, 43.642814439460977], [22.410446404721593, 44.008063462899948], [22.657149692482985, 44.234923000661276]]] } }, - { "type": "Feature", "properties": { "admin": "The Bahamas", "name": "Bahamas", "continent": "North America" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-77.53466, 23.75975], [-77.78, 23.71], [-78.03405, 24.28615], [-78.40848, 24.57564], [-78.19087, 25.2103], [-77.89, 25.17], [-77.54, 24.34], [-77.53466, 23.75975]]], [[[-77.82, 26.58], [-78.91, 26.42], [-78.98, 26.79], [-78.51, 26.87], [-77.85, 26.84], [-77.82, 26.58]]], [[[-77.0, 26.59], [-77.17255, 25.87918], [-77.35641, 26.00735], [-77.34, 26.53], [-77.78802, 26.92516], [-77.79, 27.04], [-77.0, 26.59]]]] } }, - { "type": "Feature", "properties": { "admin": "Bosnia and Herzegovina", "name": "Bosnia and Herz.", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[19.005486281010118, 44.860233669609144], [19.36803, 44.863], [19.11761, 44.42307], [19.59976, 44.03847], [19.454, 43.568100000000115], [19.21852, 43.52384], [19.03165, 43.43253], [18.70648, 43.20011], [18.56, 42.65], [17.674921502358981, 43.028562527023603], [17.297373488034449, 43.446340643887353], [16.916156447017325, 43.667722479825663], [16.456442905348862, 44.041239732431265], [16.239660271884528, 44.351143296885695], [15.750026075918978, 44.81871165626255], [15.959367303133373, 45.233776760430935], [16.318156772535868, 45.004126695325901], [16.534939406000202, 45.211607570977705], [17.00214603035101, 45.233776760430935], [17.861783481526398, 45.067740383477137], [18.553214145591646, 45.08158966733145], [19.005486281010118, 44.860233669609144]]] } }, - { "type": "Feature", "properties": { "admin": "Belarus", "name": "Belarus", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[23.484127638449841, 53.912497667041123], [24.45068362803703, 53.905702216194747], [25.536353794056989, 54.282423407602515], [25.768432651479792, 54.846962592175082], [26.588279249790386, 55.167175604871659], [26.494331495883749, 55.61510691997762], [27.102459751094525, 55.783313707087672], [28.17670942557799, 56.169129950578807], [29.2295133806603, 55.918344224666356], [29.371571893030669, 55.67009064393617], [29.896294386522353, 55.789463202530406], [30.87390913262, 55.550976467503396], [30.971835971813132, 55.081547756564028], [30.75753380709871, 54.811770941784303], [31.384472283663733, 54.157056382862422], [31.791424187962232, 53.974638576872117], [31.731272820774503, 53.794029446012011], [32.405598585751157, 53.618045355842028], [32.693643019346034, 53.351420803432106], [32.304519484188226, 53.132726141972903], [31.497643670382924, 53.167426866256889], [31.30520063652801, 53.073995876673195], [31.540018344862254, 52.742052313846344], [31.78599816257158, 52.10167796488544], [30.927549269338975, 52.042353420614383], [30.619454380014837, 51.822806098022362], [30.55511722181145, 51.319503485715643], [30.157363722460889, 51.416138414101454], [29.254938185347921, 51.368234361366881], [28.992835320763522, 51.602044379271462], [28.617612745892242, 51.427713934934836], [28.241615024536564, 51.572227077839059], [27.454066196408426, 51.59230337178446], [26.337958611768549, 51.832288723347915], [25.327787713327005, 51.910656032918538], [24.553106316839511, 51.888461005249177], [24.005077752384206, 51.617443956094448], [23.52707075368437, 51.578454087930233], [23.508002150168689, 52.023646552124717], [23.19949384938618, 52.486977444053664], [23.799198846133375, 52.691099351606553], [23.804934930117774, 53.08973135030606], [23.527535841574995, 53.47012156840654], [23.484127638449841, 53.912497667041123]]] } }, - { "type": "Feature", "properties": { "admin": "Belize", "name": "Belize", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-89.143080410503302, 17.808318996649316], [-89.150909389995519, 17.955467637600414], [-89.029857347351808, 18.001511338772485], [-88.848343878926585, 17.883198147040229], [-88.490122850279334, 18.486830552641603], [-88.300031094093669, 18.499982204659897], [-88.296336229184803, 18.353272813383263], [-88.106812913754368, 18.348673610909284], [-88.123478563168476, 18.076674709541003], [-88.285354987322776, 17.644142971258031], [-88.197866787452625, 17.489475409408453], [-88.302640753924422, 17.13169363043566], [-88.239517991879893, 17.036066392479551], [-88.355428229510551, 16.530774237529624], [-88.551824510435821, 16.265467434143144], [-88.732433641295927, 16.233634751851351], [-88.930612759135244, 15.887273464415072], [-89.229121670269265, 15.886937567605166], [-89.15080603713092, 17.015576687075832], [-89.143080410503302, 17.808318996649316]]] } }, - { "type": "Feature", "properties": { "admin": "Bolivia", "name": "Bolivia", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-62.84646847192154, -22.034985446869442], [-63.986838141522462, -21.993644301035946], [-64.377021043542243, -22.798091322523533], [-64.964892137294598, -22.07586150481232], [-66.273339402924833, -21.832310479420713], [-67.10667355006359, -22.735924574476414], [-67.82817989772272, -22.872918796482171], [-68.219913092711266, -21.494346612231858], [-68.757167121033731, -20.372657972904459], [-68.442225104430904, -19.405068454671426], [-68.966818406841853, -18.9816834449041], [-69.100246955019472, -18.260125420812674], [-69.590423753524036, -17.580011895419329], [-68.959635382753291, -16.500697930571267], [-69.389764166934697, -15.66012908291165], [-69.160346645774936, -15.323973890853015], [-69.339534674747, -14.953195489158828], [-68.94888668483658, -14.45363941819328], [-68.929223802349526, -13.602683607643007], [-68.880079515239956, -12.89972909917665], [-68.665079718689611, -12.561300144097171], [-69.52967810736493, -10.951734307502193], [-68.786157599549469, -11.036380303596276], [-68.27125362819325, -11.014521172736817], [-68.048192308205373, -10.712059014532484], [-67.173801235610725, -10.30681243249961], [-66.646908331962791, -9.931331475466861], [-65.33843522811641, -9.76198780684639], [-65.444837002205375, -10.51145110437543], [-65.321898769783004, -10.895872084194675], [-65.402281460213018, -11.566270440317151], [-64.31635291203159, -12.461978041232191], [-63.196498786050562, -12.627032565972433], [-62.803060268796372, -13.000653171442682], [-62.127080857986371, -13.19878061284972], [-61.713204311760769, -13.489202162330049], [-61.084121263255646, -13.479383640194595], [-60.503304002511122, -13.775954685117656], [-60.459198167550014, -14.354007256734551], [-60.264326341377355, -14.645979099183638], [-60.251148851142922, -15.077218926659318], [-60.542965664295131, -15.093910414289592], [-60.158389655179022, -16.258283786690082], [-58.241219855366673, -16.299573256091289], [-58.388058437724027, -16.877109063385273], [-58.280804002502244, -17.271710300366014], [-57.734558274960989, -17.552468357007765], [-57.498371141170971, -18.174187513911289], [-57.676008877174297, -18.961839694904025], [-57.949997321185819, -19.400004164306814], [-57.853801642474494, -19.969995212486186], [-58.166392381408038, -20.176700941653674], [-58.183471442280492, -19.868399346600359], [-59.11504248720609, -19.356906019775398], [-60.043564622626477, -19.342746677327419], [-61.786326463453761, -19.633736667562957], [-62.265961269770784, -20.513734633061272], [-62.291179368729203, -21.051634616787389], [-62.685057135657871, -22.24902922942238], [-62.84646847192154, -22.034985446869442]]] } }, - { "type": "Feature", "properties": { "admin": "Brazil", "name": "Brazil", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-57.625133429582945, -30.216294854454258], [-56.290899624239067, -28.852760512000884], [-55.162286342984558, -27.881915378533456], [-54.49072526713551, -27.474756768505785], [-53.648735317587885, -26.923472588816086], [-53.628348965048737, -26.124865004177465], [-54.130049607954376, -25.547639255477247], [-54.625290696823562, -25.739255466415507], [-54.428946092330577, -25.162184747012162], [-54.293476325077435, -24.570799655863958], [-54.292959560754511, -24.021014092710722], [-54.652834235235119, -23.839578138933955], [-55.027901780809543, -24.001273695575225], [-55.400747239795407, -23.956935316668797], [-55.517639329639621, -23.57199757252663], [-55.61068274598113, -22.655619398694839], [-55.797958136606894, -22.356929620047815], [-56.473317430229379, -22.086300144135279], [-56.881509568902885, -22.282153822521476], [-57.937155727761287, -22.090175876557169], [-57.870673997617786, -20.732687676681948], [-58.166392381408038, -20.176700941653674], [-57.853801642474494, -19.969995212486186], [-57.949997321185819, -19.400004164306814], [-57.676008877174297, -18.961839694904025], [-57.498371141170971, -18.174187513911289], [-57.734558274960989, -17.552468357007765], [-58.280804002502244, -17.271710300366014], [-58.388058437724027, -16.877109063385273], [-58.241219855366673, -16.299573256091289], [-60.158389655179022, -16.258283786690082], [-60.542965664295131, -15.093910414289592], [-60.251148851142922, -15.077218926659318], [-60.264326341377355, -14.645979099183638], [-60.459198167550014, -14.354007256734551], [-60.503304002511122, -13.775954685117656], [-61.084121263255646, -13.479383640194595], [-61.713204311760769, -13.489202162330049], [-62.127080857986371, -13.19878061284972], [-62.803060268796372, -13.000653171442682], [-63.196498786050562, -12.627032565972433], [-64.31635291203159, -12.461978041232191], [-65.402281460213018, -11.566270440317151], [-65.321898769783004, -10.895872084194675], [-65.444837002205375, -10.51145110437543], [-65.33843522811641, -9.76198780684639], [-66.646908331962791, -9.931331475466861], [-67.173801235610725, -10.30681243249961], [-68.048192308205373, -10.712059014532484], [-68.27125362819325, -11.014521172736817], [-68.786157599549469, -11.036380303596276], [-69.52967810736493, -10.951734307502193], [-70.093752204046879, -11.123971856331011], [-70.548685675728393, -11.009146823778462], [-70.481893886991159, -9.490118096558842], [-71.302412278921523, -10.079436130415372], [-72.184890713169821, -10.05359791426943], [-72.563033006465631, -9.520193780152715], [-73.226713426390148, -9.462212823121233], [-73.015382656532537, -9.03283334720806], [-73.571059332967053, -8.424446709835832], [-73.987235480429646, -7.523829847853063], [-73.723401455363486, -7.340998630404412], [-73.724486660441627, -6.918595472850638], [-73.120027431923575, -6.629930922068238], [-73.219711269814596, -6.089188734566076], [-72.964507208941185, -5.741251315944892], [-72.891927659787243, -5.274561455916979], [-71.748405727816532, -4.59398284263301], [-70.928843349883564, -4.401591485210367], [-70.79476884630229, -4.251264743673302], [-69.893635219996611, -4.298186944194326], [-69.444101935489599, -1.556287123219817], [-69.420485805932216, -1.122618503426409], [-69.577065395776586, -0.549991957200163], [-70.02065589057004, -0.185156345219539], [-70.015565761989293, 0.541414292804205], [-69.452396002872447, 0.706158758950693], [-69.252434048119042, 0.602650865070075], [-69.218637661400166, 0.985676581217433], [-69.804596727157701, 1.089081122233466], [-69.816973232691609, 1.714805202639624], [-67.868565029558823, 1.692455145673392], [-67.537810024674684, 2.037162787276329], [-67.25999752467358, 1.719998684084956], [-67.065048183852483, 1.130112209473225], [-66.876325853122566, 1.253360500489336], [-66.325765143484944, 0.724452215982012], [-65.548267381437554, 0.78925446207603], [-65.354713304288353, 1.0952822941085], [-64.611011928959854, 1.328730576987041], [-64.199305792890499, 1.49285492594602], [-64.083085496666072, 1.91636912679408], [-63.368788011311644, 2.200899562993129], [-63.422867397705105, 2.411067613124174], [-64.269999152265783, 2.497005520025566], [-64.408827887617903, 3.126786200366623], [-64.368494432214092, 3.797210394705246], [-64.816064012294007, 4.056445217297422], [-64.628659430587533, 4.14848094320925], [-63.888342861574145, 4.020530096854571], [-63.093197597899092, 3.770571193858784], [-62.804533047116692, 4.006965033377951], [-62.085429653559125, 4.162123521334308], [-60.966893276601517, 4.536467596856638], [-60.601179165271922, 4.918098049332129], [-60.733574184803707, 5.2002772078619], [-60.213683437731319, 5.2444863956876], [-59.980958624904865, 5.014061184098138], [-60.111002366767373, 4.574966538914082], [-59.767405768458701, 4.423502915866606], [-59.538039923731219, 3.958802598481937], [-59.815413174057852, 3.606498521332085], [-59.974524909084543, 2.755232652188055], [-59.718545701726732, 2.249630438644359], [-59.646043667221242, 1.786893825686789], [-59.030861579002639, 1.317697658692722], [-58.540012986878288, 1.26808828369252], [-58.429477098205957, 1.46394196207872], [-58.113449876525003, 1.507195135907025], [-57.660971035377358, 1.682584947105638], [-57.33582292339689, 1.948537705895759], [-56.782704230360814, 1.863710842288653], [-56.53938574891454, 1.89952260986692], [-55.995698004771739, 1.817667141116601], [-55.905600145070871, 2.021995754398659], [-56.073341844290283, 2.220794989425499], [-55.973322109589361, 2.510363877773016], [-55.569755011605984, 2.42150625244713], [-55.097587449755125, 2.523748073736612], [-54.524754197799709, 2.311848863123785], [-54.088062506717243, 2.105556545414629], [-53.778520677288903, 2.376702785650081], [-53.554839240113537, 2.33489655192595], [-53.4184651352953, 2.05338918701598], [-52.939657151894949, 2.124857692875636], [-52.556424730018414, 2.504705308437053], [-52.249337531123942, 3.241094468596244], [-51.657797410678882, 4.156232408053028], [-51.317146369010842, 4.203490505383953], [-51.069771287629649, 3.65039765056403], [-50.508875291533641, 1.901563828942456], [-49.974075893745045, 1.736483465986069], [-49.947100796088705, 1.046189683431223], [-50.699251268096901, 0.222984117021681], [-50.388210822132123, -0.078444512536819], [-48.620566779156313, -0.235489190271821], [-48.584496629416577, -1.237805271005001], [-47.824956427590621, -0.5816179337628], [-46.566583624851219, -0.941027520352776], [-44.9057030909904, -1.551739597178134], [-44.417619187993658, -2.137750339367975], [-44.581588507655773, -2.691308282078523], [-43.418791266440188, -2.383110039889793], [-41.47265682632824, -2.912018324397116], [-39.97866533055403, -2.87305429444904], [-38.50038347019656, -3.700652357603394], [-37.223252122535193, -4.820945733258915], [-36.45293738457638, -5.109403578312153], [-35.597795783010454, -5.149504489770648], [-35.235388963347553, -5.464937432480245], [-34.896029832486825, -6.738193047719709], [-34.729993455533027, -7.343220716992965], [-35.128212042774216, -8.996401462442284], [-35.636966518687707, -9.649281508017811], [-37.046518724096991, -11.040721123908799], [-37.683611619607355, -12.17119475672582], [-38.423876512188436, -13.038118584854285], [-38.673887091616507, -13.057652276260615], [-38.953275722802537, -13.79336964280002], [-38.882298143049645, -15.667053724838764], [-39.161092495264306, -17.208406670808468], [-39.267339240056394, -17.867746270420479], [-39.583521491034219, -18.262295830968934], [-39.76082333022763, -19.599113457927402], [-40.774740770010332, -20.90451181405242], [-40.944756232250597, -21.937316989837807], [-41.75416419123821, -22.370675551037454], [-41.988284267736546, -22.970070489190888], [-43.074703742024738, -22.967693373305462], [-44.647811855637798, -23.351959323827838], [-45.35213578955991, -23.796841729428579], [-46.472093268405523, -24.088968601174539], [-47.648972337420645, -24.885199069927715], [-48.495458136577689, -25.877024834905647], [-48.641004808127725, -26.623697605090928], [-48.474735887228647, -27.175911960561887], [-48.661520351747612, -28.186134535435713], [-48.888457404157393, -28.674115085567877], [-49.587329474472668, -29.224469089476333], [-50.696874152211478, -30.984465020472953], [-51.576226162306149, -31.777698256153204], [-52.256081305538032, -32.245369968394662], [-52.71209998229768, -33.196578057591175], [-53.373661668498229, -33.768377780900757], [-53.650543992718084, -33.202004082981823], [-53.209588995971529, -32.727666110974717], [-53.787951626182185, -32.047242526987617], [-54.572451544805105, -31.494511407193745], [-55.601510179249331, -30.853878676071385], [-55.97324459494093, -30.883075860316296], [-56.976025763564721, -30.109686374636119], [-57.625133429582945, -30.216294854454258]]] } }, - { "type": "Feature", "properties": { "admin": "Brunei", "name": "Brunei", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[114.204016554828343, 4.525873928236805], [114.599961379048707, 4.900011298029965], [115.450710483869798, 5.447729803891532], [115.405700311343566, 4.955227565933837], [115.347460972150643, 4.316636053887009], [114.869557326315373, 4.348313706881924], [114.659595981913498, 4.007636826997753], [114.204016554828343, 4.525873928236805]]] } }, - { "type": "Feature", "properties": { "admin": "Bhutan", "name": "Bhutan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[91.69665652869665, 27.771741848251661], [92.10371178585973, 27.4526140406332], [92.033483514375078, 26.838310451763554], [91.217512648486405, 26.808648179628019], [90.37327477413406, 26.875724188742872], [89.744527622438838, 26.71940298105995], [88.835642531289366, 27.098966376243755], [88.814248488320544, 27.299315904239361], [89.475810174521101, 28.04275889740639], [90.015828891971154, 28.296438503527209], [90.730513950567769, 28.064953925075748], [91.258853794319904, 28.040614325466287], [91.69665652869665, 27.771741848251661]]] } }, - { "type": "Feature", "properties": { "admin": "Botswana", "name": "Botswana", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[25.649163445750155, -18.536025892818987], [25.850391473094724, -18.714412937090533], [26.164790887158478, -19.293085625894935], [27.296504754350501, -20.391519870690995], [27.724747348753247, -20.499058526290387], [27.727227817503252, -20.851801853114711], [28.02137007010861, -21.485975030200578], [28.794656202924209, -21.639454034107445], [29.432188348109033, -22.091312758067584], [28.017235955525244, -22.827753594659072], [27.119409620886238, -23.574323011979772], [26.78640669119741, -24.240690606383478], [26.485753208123292, -24.616326592713097], [25.941652052522151, -24.696373386333214], [25.765848829865206, -25.174845472923671], [25.664666375437712, -25.486816094669706], [25.025170525825782, -25.719670098576891], [24.211266717228792, -25.670215752873567], [23.733569777122703, -25.39012948985161], [23.312096795350179, -25.268689873965712], [22.824271274514896, -25.500458672794768], [22.579531691180584, -25.979447523708142], [22.105968865657864, -26.28025603607913], [21.60589603036939, -26.726533705351748], [20.889609002371731, -26.828542982695907], [20.666470167735437, -26.477453301704916], [20.758609246511831, -25.868136488551446], [20.165725538827186, -24.917961928000768], [19.895767856534427, -24.767790215760588], [19.895457797940672, -21.849156996347865], [20.881134067475866, -21.814327080983144], [20.910641310314531, -18.252218926672018], [21.655040317478971, -18.219146010005222], [23.196858351339298, -17.869038181227783], [23.579005568137713, -18.281261081620055], [24.217364536239209, -17.889347019118485], [24.520705193792534, -17.887124932529932], [25.084443393664564, -17.661815687737366], [25.264225701608005, -17.736539808831413], [25.649163445750155, -18.536025892818987]]] } }, - { "type": "Feature", "properties": { "admin": "Central African Republic", "name": "Central African Rep.", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[15.279460483469107, 7.421924546737968], [16.106231723706767, 7.497087917506504], [16.290561557691884, 7.754307359239304], [16.456184523187343, 7.734773667832966], [16.705988396886251, 7.508327541529978], [17.964929640380884, 7.890914008002865], [18.389554884523218, 8.281303615751822], [18.911021762780504, 8.630894680206351], [18.81200971850927, 8.982914536978596], [19.094008009526018, 9.074846910025837], [20.059685499764267, 9.01270600019485], [21.00086836109616, 9.475985215691507], [21.723821648859452, 10.567055568885973], [22.231129184668784, 10.971888739460507], [22.864165480244218, 11.142395127807543], [22.977543572692603, 10.714462591998538], [23.554304233502187, 10.089255275915306], [23.557249790142826, 9.681218166538683], [23.394779087017181, 9.26506785729222], [23.459012892355979, 8.954285793488891], [23.805813429466745, 8.666318874542425], [24.567369012152078, 8.229187933785466], [25.114932488716786, 7.825104071479172], [25.12413089366472, 7.500085150579436], [25.796647983511171, 6.979315904158069], [26.21341840994511, 6.546603298362071], [26.465909458123232, 5.94671743410187], [27.213409051225163, 5.550953477394557], [27.374226108517483, 5.233944403500059], [27.044065382604703, 5.127852688004835], [26.402760857862535, 5.150874538590869], [25.650455356557465, 5.256087754737123], [25.278798455514302, 5.170408229997191], [25.128833449003274, 4.927244777847789], [24.805028924262409, 4.897246608902349], [24.41053104014625, 5.108784084489129], [23.297213982850135, 4.609693101414221], [22.841479526468103, 4.710126247573483], [22.704123569436284, 4.633050848810156], [22.405123732195531, 4.02916006104732], [21.659122755630019, 4.224341945813719], [20.927591180106273, 4.322785549329736], [20.290679152108932, 4.691677761245287], [19.467783644293146, 5.031527818212779], [18.932312452884755, 4.709506130385973], [18.542982211997778, 4.201785183118317], [18.453065219809925, 3.504385891123348], [17.809900343505259, 3.560196437998569], [17.133042433346297, 3.728196519379451], [16.537058139724135, 3.198254706226278], [16.01285241055535, 2.267639675298084], [15.907380812247649, 2.557389431158612], [15.862732374747479, 3.013537298998982], [15.405395948964379, 3.335300604664339], [15.036219516671249, 3.851367295747123], [14.950953403389658, 4.21038930909492], [14.478372430080466, 4.732605495620446], [14.558935988023501, 5.03059764243153], [14.459407179429345, 5.451760565610299], [14.536560092841111, 6.22695872642069], [14.776545444404572, 6.408498033062044], [15.279460483469107, 7.421924546737968]]] } }, - { "type": "Feature", "properties": { "admin": "Canada", "name": "Canada", "continent": "North America" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-63.6645, 46.55001], [-62.9393, 46.41587], [-62.01208, 46.44314], [-62.50391, 46.03339], [-62.87433, 45.96818], [-64.1428, 46.39265], [-64.39261, 46.72747], [-64.01486, 47.03601], [-63.6645, 46.55001]]], [[[-61.806305, 49.10506], [-62.29318, 49.08717], [-63.58926, 49.40069], [-64.51912, 49.87304], [-64.17322, 49.95718], [-62.85829, 49.70641], [-61.835585, 49.28855], [-61.806305, 49.10506]]], [[[-123.510001587551116, 48.51001089130343], [-124.012890788399474, 48.370846259141402], [-125.655012777338342, 48.825004584338494], [-125.954994466792726, 49.179995835967638], [-126.850004435871853, 49.530000311880421], [-127.029993449544392, 49.814995835970073], [-128.059336304366212, 49.994959011426594], [-128.444584107102145, 50.53913768167611], [-128.358413656255408, 50.770648098343678], [-127.308581096029883, 50.552573554071948], [-126.695000977212302, 50.40090322529538], [-125.755006673823161, 50.295018215529367], [-125.415001587558791, 49.950000515332604], [-124.920768189119315, 49.47527497008339], [-123.92250870832099, 49.062483628935794], [-123.510001587551116, 48.51001089130343]]], [[[-56.134035814017111, 50.687009792679298], [-56.795881720595261, 49.812308661490945], [-56.143105027884289, 50.15011749938283], [-55.471492275602934, 49.935815334668447], [-55.822401089080913, 49.587128607779093], [-54.93514258484565, 49.313010972686833], [-54.473775397343772, 49.556691189159167], [-53.47654944519131, 49.24913890237405], [-53.786013759971233, 48.516780503933617], [-53.086133999226249, 48.687803656603528], [-52.95864824076223, 48.157164211614472], [-52.648098720904173, 47.53554840757549], [-53.069158291218336, 46.655498765644936], [-53.521456264853029, 46.618291734394823], [-54.178935512902527, 46.807065741556997], [-53.961868659060471, 47.625207017601909], [-54.240482143762122, 47.752279364607617], [-55.400773078011483, 46.88499380145312], [-55.997480841685835, 46.919720363953289], [-55.291219041552765, 47.389562486350982], [-56.250798712780508, 47.632545070987383], [-57.325229254777085, 47.572807115257987], [-59.26601518414676, 47.603347886742498], [-59.41949418805369, 47.89945384377485], [-58.796586473207398, 48.251525376979473], [-59.23162451845652, 48.523188381537793], [-58.391804979065213, 49.125580552764163], [-57.358689744686025, 50.718274034215845], [-56.738650071831998, 51.287438259478527], [-55.87097693543528, 51.632094224649187], [-55.406974249886602, 51.588272610065722], [-55.600218268442077, 51.317074693397913], [-56.134035814017111, 50.687009792679298]]], [[[-133.180004041711669, 54.169975490935308], [-132.710007884431292, 54.040009315423518], [-131.749989584003259, 54.120004380909208], [-132.049480347350965, 52.984621487024519], [-131.179042521826574, 52.18043284769827], [-131.577829549822894, 52.182370713909236], [-132.180428426778519, 52.639707139692391], [-132.549992432313843, 53.100014960332132], [-133.054611178755493, 53.411468817755363], [-133.239664482792676, 53.851080227262386], [-133.180004041711669, 54.169975490935308]]], [[[-79.26582, 62.158675], [-79.65752, 61.63308], [-80.09956, 61.7181], [-80.36215, 62.01649], [-80.315395, 62.085565], [-79.92939, 62.3856], [-79.52002, 62.36371], [-79.26582, 62.158675]]], [[[-81.89825, 62.7108], [-83.06857, 62.15922], [-83.77462, 62.18231], [-83.99367, 62.4528], [-83.25048, 62.91409], [-81.87699, 62.90458], [-81.89825, 62.7108]]], [[[-85.161307949549851, 65.657284654392797], [-84.975763719405933, 65.217518215588981], [-84.464012010419495, 65.371772365980163], [-83.88262630891974, 65.109617824963536], [-82.78757687043877, 64.766693020274673], [-81.642013719392509, 64.455135809986942], [-81.553440314444245, 63.979609280037131], [-80.817361212878851, 64.057485663500998], [-80.103451300766594, 63.725981350348597], [-80.991019863595653, 63.41124603947496], [-82.547178107416997, 63.651722317145229], [-83.108797573565042, 64.101875718839707], [-84.100416632813847, 63.569711819098004], [-85.523404710618991, 63.052379055424076], [-85.866768764982339, 63.637252916103542], [-87.221983201836721, 63.541238104905212], [-86.352759772471259, 64.035833238370699], [-86.224886440765133, 64.822916978608262], [-85.883847825854858, 65.738778388117041], [-85.161307949549851, 65.657284654392797]]], [[[-75.86588, 67.14886], [-76.98687, 67.09873], [-77.2364, 67.58809], [-76.81166, 68.14856], [-75.89521, 68.28721], [-75.1145, 68.01036], [-75.10333, 67.58202], [-75.21597, 67.44425], [-75.86588, 67.14886]]], [[[-95.647681203800488, 69.107690358321761], [-96.269521203800579, 68.757040358321731], [-97.61740120380054, 69.060030358321782], [-98.431801203800504, 68.950700358321768], [-99.797401203800504, 69.400030358321786], [-98.917401203800523, 69.710030358321788], [-98.218261203800466, 70.143540358321744], [-97.157401203800532, 69.860030358321794], [-96.557401203800524, 69.680030358321758], [-96.257401203800498, 69.490030358321761], [-95.647681203800488, 69.107690358321761]]], [[[-90.5471, 69.49766], [-90.55151, 68.47499], [-89.21515, 69.25873], [-88.01966, 68.61508], [-88.31749, 67.87338], [-87.35017, 67.19872], [-86.30607, 67.92146], [-85.57664, 68.78456], [-85.52197, 69.88211], [-84.10081, 69.80539], [-82.62258, 69.65826], [-81.28043, 69.16202], [-81.2202, 68.66567], [-81.96436, 68.13253], [-81.25928, 67.59716], [-81.38653, 67.11078], [-83.34456, 66.41154], [-84.73542, 66.2573], [-85.76943, 66.55833], [-86.0676, 66.05625], [-87.03143, 65.21297], [-87.32324, 64.77563], [-88.48296, 64.09897], [-89.91444, 64.03273], [-90.70398, 63.61017], [-90.77004, 62.96021], [-91.93342, 62.83508], [-93.15698, 62.02469], [-94.24153, 60.89865], [-94.62931, 60.11021], [-94.6846, 58.94882], [-93.21502, 58.78212], [-92.76462, 57.84571], [-92.297029999999893, 57.08709], [-90.89769, 57.28468], [-89.03953, 56.85172], [-88.03978, 56.47162], [-87.32421, 55.99914], [-86.07121, 55.72383], [-85.01181, 55.3026], [-83.36055, 55.24489], [-82.27285, 55.14832], [-82.4362, 54.28227], [-82.12502, 53.27703], [-81.40075, 52.15788], [-79.91289, 51.20842], [-79.14301, 51.53393], [-78.60191, 52.56208], [-79.12421, 54.14145], [-79.82958, 54.66772], [-78.22874, 55.13645], [-77.0956, 55.83741], [-76.54137, 56.53423], [-76.62319, 57.20263], [-77.30226, 58.05209], [-78.51688, 58.80458], [-77.33676, 59.85261], [-77.77272, 60.75788], [-78.10687, 62.31964], [-77.41067, 62.55053], [-75.69621, 62.2784], [-74.6682, 62.18111], [-73.83988, 62.4438], [-72.90853, 62.10507], [-71.67708, 61.52535], [-71.37369, 61.13717], [-69.59042, 61.06141], [-69.62033, 60.22125], [-69.2879, 58.95736], [-68.37455, 58.80106], [-67.64976, 58.21206], [-66.20178, 58.76731], [-65.24517, 59.87071], [-64.58352, 60.33558], [-63.80475, 59.4426], [-62.50236, 58.16708], [-61.39655, 56.96745], [-61.79866, 56.33945], [-60.46853, 55.77548], [-59.56962, 55.20407], [-57.97508, 54.94549], [-57.3332, 54.6265], [-56.93689, 53.78032], [-56.15811, 53.64749], [-55.75632, 53.27036], [-55.68338, 52.14664], [-56.40916, 51.7707], [-57.12691, 51.41972], [-58.77482, 51.0643], [-60.03309, 50.24277], [-61.72366, 50.08046], [-63.86251, 50.29099], [-65.36331, 50.2982], [-66.39905, 50.22897], [-67.23631, 49.51156], [-68.51114, 49.06836], [-69.95362, 47.74488], [-71.10458, 46.82171], [-70.25522, 46.98606], [-68.65, 48.3], [-66.55243, 49.1331], [-65.05626, 49.23278], [-64.17099, 48.74248], [-65.11545, 48.07085], [-64.79854, 46.99297], [-64.47219, 46.23849], [-63.17329, 45.73902], [-61.52072, 45.88377], [-60.51815, 47.00793], [-60.4486, 46.28264], [-59.80287, 45.9204], [-61.03988, 45.26525], [-63.25471, 44.67014], [-64.24656, 44.26553], [-65.36406, 43.54523], [-66.1234, 43.61867], [-66.16173, 44.46512], [-64.42549, 45.29204], [-66.02605, 45.25931], [-67.13741, 45.13753], [-67.79134, 45.70281], [-67.79046, 47.06636], [-68.23444, 47.35486], [-68.905, 47.185], [-69.237216, 47.447781], [-69.99997, 46.69307], [-70.305, 45.915], [-70.66, 45.46], [-71.08482, 45.30524], [-71.405, 45.255], [-71.50506, 45.0082], [-73.34783, 45.00738], [-74.867, 45.00048], [-75.31821, 44.81645], [-76.375, 44.09631], [-76.5, 44.018458893758712], [-76.820034145805565, 43.628784288093748], [-77.737885097957687, 43.62905558936329], [-78.720279914042365, 43.625089423184868], [-79.171673550111862, 43.466339423184216], [-79.01, 43.27], [-78.92, 42.965], [-78.939362148743683, 42.863611355148031], [-80.247447679347928, 42.366199856122584], [-81.277746548167144, 42.209025987306845], [-82.439277716791608, 41.675105088867149], [-82.690089280920162, 41.675105088867149], [-83.029810146806909, 41.832795722005834], [-83.141999681312555, 41.975681057292825], [-83.12, 42.08], [-82.9, 42.43], [-82.43, 42.98], [-82.137642381503881, 43.571087551439909], [-82.337763125431053, 44.44], [-82.550924648758169, 45.347516587905368], [-83.592850714843067, 45.816893622412373], [-83.469550747394621, 45.994686387712584], [-83.616130947590563, 46.116926988299056], [-83.890765347005726, 46.116926988299056], [-84.091851264161463, 46.27541860613816], [-84.14211951367335, 46.512225857115723], [-84.3367, 46.40877], [-84.6049, 46.4396], [-84.543748745445853, 46.538684190449132], [-84.779238247399888, 46.637101955749038], [-84.876079881514855, 46.900083319682366], [-85.652363247403414, 47.220218817730498], [-86.461990831228249, 47.553338019392037], [-87.439792623300207, 47.94], [-88.378114183286698, 48.302917588893727], [-89.272917446636654, 48.019808254582657], [-89.6, 48.01], [-90.83, 48.27], [-91.64, 48.14], [-92.61, 48.45], [-93.63087, 48.60926], [-94.32914, 48.67074], [-94.64, 48.84], [-94.81758, 49.38905], [-95.15609, 49.38425], [-95.159069509172014, 49.0], [-97.228720000004799, 49.0007], [-100.65, 49.0], [-104.04826, 48.99986], [-107.05, 49.0], [-110.05, 49.0], [-113.0, 49.0], [-116.04818, 49.0], [-117.03121, 49.0], [-120.0, 49.0], [-122.84, 49.0], [-122.97421, 49.002537777777789], [-124.91024, 49.98456], [-125.62461, 50.41656], [-127.43561, 50.83061], [-127.99276, 51.71583], [-127.85032, 52.32961], [-129.12979, 52.75538], [-129.30523, 53.56159], [-130.51497, 54.28757], [-130.53611, 54.80278], [-129.98, 55.285], [-130.00778, 55.91583], [-131.70781, 56.55212], [-132.73042, 57.69289], [-133.35556, 58.41028], [-134.27111, 58.86111], [-134.945, 59.27056], [-135.47583, 59.78778], [-136.47972, 59.46389], [-137.4525, 58.905], [-138.34089, 59.56211], [-139.039, 60.0], [-140.013, 60.27682], [-140.99778, 60.30639], [-140.9925, 66.00003], [-140.986, 69.712], [-139.12052, 69.47102], [-137.54636, 68.99002], [-136.50358, 68.89804], [-135.62576, 69.31512], [-134.41464, 69.62743], [-132.92925, 69.50534], [-131.43136, 69.94451], [-129.79471, 70.19369], [-129.10773, 69.77927], [-128.36156, 70.01286], [-128.13817, 70.48384], [-127.44712, 70.37721], [-125.75632, 69.48058], [-124.42483, 70.1584], [-124.28968, 69.39969], [-123.06108, 69.56372], [-122.6835, 69.85553], [-121.47226, 69.79778], [-119.94288, 69.37786], [-117.60268, 69.01128], [-116.22643, 68.84151], [-115.2469, 68.90591], [-113.89794, 68.3989], [-115.30489, 67.90261], [-113.49727, 67.68815], [-110.798, 67.80612], [-109.94619, 67.98104], [-108.8802, 67.38144], [-107.79239, 67.88736], [-108.81299, 68.31164], [-108.16721, 68.65392], [-106.95, 68.7], [-106.15, 68.8], [-105.34282, 68.56122], [-104.33791, 68.018], [-103.22115, 68.09775], [-101.45433, 67.64689], [-99.90195, 67.80566], [-98.4432, 67.78165], [-98.5586, 68.40394], [-97.66948, 68.57864], [-96.11991, 68.23939], [-96.12588, 67.29338], [-95.48943, 68.0907], [-94.685, 68.06383], [-94.23282, 69.06903], [-95.30408, 69.68571], [-96.47131, 70.08976], [-96.39115, 71.19482], [-95.2088, 71.92053], [-93.88997, 71.76015], [-92.87818, 71.31869], [-91.51964, 70.19129], [-92.40692, 69.69997], [-90.5471, 69.49766]]], [[[-114.167169999999871, 73.12145], [-114.66634, 72.65277], [-112.441019999999867, 72.9554], [-111.05039, 72.4504], [-109.920349999999857, 72.96113], [-109.00654, 72.63335], [-108.188349999999886, 71.65089], [-107.68599, 72.06548], [-108.39639, 73.08953], [-107.51645, 73.23598], [-106.522589999999866, 73.07601], [-105.402459999999877, 72.67259], [-104.77484, 71.6984], [-104.464759999999814, 70.99297], [-102.78537, 70.49776], [-100.980779999999868, 70.02432], [-101.089289999999892, 69.58447000000011], [-102.731159999999875, 69.50402], [-102.09329, 69.11962], [-102.43024, 68.75282], [-104.24, 68.91], [-105.96, 69.180000000000135], [-107.12254, 69.11922], [-108.999999999999872, 68.78], [-111.534148875200117, 68.630059156817921], [-113.3132, 68.53554], [-113.854959999999807, 69.007440000000102], [-115.22, 69.28], [-116.10794, 69.16821], [-117.34, 69.960000000000107], [-116.674729999999869, 70.06655], [-115.13112, 70.2373], [-113.72141, 70.19237], [-112.4161, 70.36638], [-114.35, 70.6], [-116.48684, 70.52045], [-117.9048, 70.540560000000127], [-118.43238, 70.9092], [-116.11311, 71.30918], [-117.65568, 71.2952], [-119.40199, 71.55859], [-118.56267, 72.30785], [-117.866419999999877, 72.70594], [-115.18909, 73.314590000000109], [-114.167169999999871, 73.12145]]], [[[-104.5, 73.42], [-105.38, 72.76], [-106.94, 73.46], [-106.6, 73.6], [-105.26, 73.64], [-104.5, 73.42]]], [[[-76.34, 73.102684989953005], [-76.251403808593736, 72.826385498046861], [-77.314437866210895, 72.85554504394527], [-78.391670227050795, 72.876655578613253], [-79.486251831054645, 72.742202758789062], [-79.775833129882827, 72.80290222167973], [-80.876098632812514, 73.333183288574205], [-80.833885192871051, 73.693183898925767], [-80.353057861328111, 73.75971984863277], [-78.064437866210923, 73.651931762695327], [-76.34, 73.102684989953005]]], [[[-86.562178514334107, 73.157447007938444], [-85.774371304044521, 72.534125881633798], [-84.850112474288224, 73.34027822538711], [-82.315590176100969, 73.750950832810574], [-80.600087653307611, 72.716543687624181], [-80.748941616524391, 72.061906643350753], [-78.770638597310764, 72.352173163534147], [-77.824623989559569, 72.749616604291035], [-75.605844692675717, 72.243678493937381], [-74.228616095664975, 71.767144273557889], [-74.099140794557698, 71.330840155717638], [-72.242225714797641, 71.556924546994495], [-71.200015428335192, 70.920012518997211], [-68.78605424668487, 70.525023708774242], [-67.914970465756923, 70.121947536897594], [-66.969033372654152, 69.18608734809186], [-68.805122850200533, 68.720198472764409], [-66.449866095633851, 68.067163397892003], [-64.862314419195215, 67.847538560651614], [-63.424934454996745, 66.928473212340649], [-61.851981370680569, 66.862120673277829], [-62.163176845942296, 66.160251369889593], [-63.91844438338417, 64.998668524832837], [-65.148860236253611, 65.426032619886669], [-66.72121904159853, 66.388041083432185], [-68.015016038673949, 66.262725735124391], [-68.141287400979152, 65.689789130304362], [-67.089646165623392, 65.108455105236985], [-65.732080451099748, 64.64840566675862], [-65.320167609301265, 64.382737128346051], [-64.669406297449669, 63.392926744227474], [-65.013803880458894, 62.674185085695974], [-66.275044725190455, 62.945098781986069], [-68.783186204692711, 63.745670071051805], [-67.369680752213029, 62.883965562584869], [-66.328297288667201, 62.28007477482204], [-66.165568203380147, 61.930897121825879], [-68.877366502544632, 62.330149237712803], [-71.023437059193824, 62.910708116295829], [-72.23537858751898, 63.397836005295154], [-71.886278449171286, 63.679989325608837], [-73.37830624051837, 64.193963121183813], [-74.834418911422588, 64.679075629323776], [-74.818502570276706, 64.389093329517962], [-77.709979824520019, 64.229542344816778], [-78.55594885935416, 64.572906399180127], [-77.897281053361908, 65.309192206474776], [-76.018274298797181, 65.326968899183143], [-73.95979529488271, 65.454764716240888], [-74.293883429649625, 65.81177134872938], [-73.94491248238262, 66.310578111426722], [-72.65116716173938, 67.284575507263853], [-72.926059943316076, 67.726925767682374], [-73.311617804645721, 68.069437160912898], [-74.8433072577768, 68.554627183701271], [-76.869100918266739, 68.894735622830254], [-76.228649054657339, 69.147769273547411], [-77.28736996123709, 69.769540106883269], [-78.168633999326588, 69.826487535268896], [-78.95724219431672, 70.166880194775402], [-79.492455003563649, 69.871807766388898], [-81.305470954091732, 69.743185126414332], [-84.944706183598456, 69.966634019644388], [-87.060003424817864, 70.260001125765356], [-88.681713223001495, 70.410741278760796], [-89.513419562523012, 70.762037665480975], [-88.467721116880753, 71.218185533321318], [-89.888151211287465, 71.222552191849942], [-90.205160285181989, 72.235074367960792], [-89.43657670770493, 73.129464219852352], [-88.408241543312784, 73.537888902471209], [-85.826151089200906, 73.803815823045213], [-86.562178514334107, 73.157447007938444]]], [[[-100.35642, 73.84389], [-99.16387, 73.63339], [-97.38, 73.76], [-97.12, 73.47], [-98.05359, 72.99052], [-96.54, 72.56], [-96.72, 71.66], [-98.35966, 71.27285], [-99.32286, 71.35639], [-100.01482, 71.73827], [-102.5, 72.51], [-102.48, 72.83], [-100.43836, 72.70588], [-101.54, 73.36], [-100.35642, 73.84389]]], [[[-93.196295539100205, 72.771992499473342], [-94.26904659704725, 72.024596259235949], [-95.409855516322637, 72.061880805134578], [-96.033745083382428, 72.940276801231789], [-96.01826799191096, 73.437429918095788], [-95.495793423224001, 73.862416897264154], [-94.503657599652328, 74.134906724739196], [-92.420012173211745, 74.100025132942179], [-90.509792853542578, 73.85673248971203], [-92.003965216829869, 72.966244208458477], [-93.196295539100205, 72.771992499473342]]], [[[-120.46, 71.383601793087578], [-123.09219, 70.90164], [-123.62, 71.34], [-125.92894873747332, 71.868688463011395], [-125.499999999999872, 72.292260811795003], [-124.80729, 73.02256], [-123.94, 73.680000000000135], [-124.917749999999899, 74.292750000000112], [-121.53788, 74.44893], [-120.10978, 74.24135], [-117.55564, 74.18577], [-116.58442, 73.89607], [-115.51081, 73.47519], [-116.767939999999882, 73.22292], [-119.22, 72.52], [-120.46, 71.82], [-120.46, 71.383601793087578]]], [[[-93.612755906940464, 74.979997260224437], [-94.156908738973812, 74.59234650338685], [-95.60868058956558, 74.666863918751758], [-96.820932176484561, 74.927623196096576], [-96.288587409229791, 75.377828274223333], [-94.850819871789113, 75.647217515760886], [-93.977746548217908, 75.296489569795952], [-93.612755906940464, 74.979997260224437]]], [[[-98.5, 76.72], [-97.735585, 76.25656], [-97.704415, 75.74344], [-98.16, 75.0], [-99.80874, 74.89744], [-100.88366, 75.05736], [-100.86292, 75.64075], [-102.50209, 75.5638], [-102.56552, 76.3366], [-101.48973, 76.30537], [-99.98349, 76.64634], [-98.57699, 76.58859], [-98.5, 76.72]]], [[[-108.21141, 76.20168], [-107.81943, 75.84552], [-106.92893, 76.01282], [-105.881, 75.9694], [-105.70498, 75.47951], [-106.31347, 75.00527], [-109.7, 74.85], [-112.22307, 74.41696], [-113.74381, 74.39427], [-113.87135, 74.72029], [-111.79421, 75.1625], [-116.31221, 75.04343], [-117.7104, 75.2222], [-116.34602, 76.19903], [-115.40487, 76.47887], [-112.59056, 76.14134], [-110.81422, 75.54919], [-109.0671, 75.47321], [-110.49726, 76.42982], [-109.5811, 76.79417], [-108.54859, 76.67832], [-108.21141, 76.20168]]], [[[-94.684085862999439, 77.097878323058367], [-93.573921068073105, 76.776295884906062], [-91.605023159536586, 76.778517971494594], [-90.741845872749209, 76.449597479956807], [-90.969661424507976, 76.074013170059445], [-89.822237921899244, 75.847773749485626], [-89.187082892599776, 75.610165513807615], [-87.838276333349611, 75.566188869927217], [-86.379192267588664, 75.482421373182163], [-84.789625210290595, 75.699204006646497], [-82.753444586910049, 75.784315090631225], [-81.12853084992436, 75.713983466282016], [-80.05751095245914, 75.336848863415867], [-79.833932868148324, 74.923127346487192], [-80.457770758775823, 74.657303778777774], [-81.948842536125511, 74.442459011524321], [-83.2288936022114, 74.564027818490928], [-86.097452358733292, 74.410032050261137], [-88.150350307960196, 74.392307033984977], [-89.764722052758358, 74.515555325001117], [-92.422440965529418, 74.837757880340973], [-92.768285488642789, 75.38681997344213], [-92.889905972041717, 75.882655341282629], [-93.893824022175977, 76.319243679500516], [-95.962457445035795, 76.44138092722244], [-97.121378953829463, 76.751077785947587], [-96.745122850312342, 77.161388658345132], [-94.684085862999439, 77.097878323058367]]], [[[-116.198586595507322, 77.645286770326194], [-116.335813361458349, 76.876961575010554], [-117.106050584768766, 76.530031846819114], [-118.040412157038119, 76.481171780087081], [-119.899317586885687, 76.053213406061971], [-121.499995077126471, 75.900018622532784], [-122.85492448615895, 76.116542873835684], [-122.854925293603188, 76.116542873835684], [-121.157535360328239, 76.864507554828336], [-119.103938971821023, 77.512219957174608], [-117.570130784965954, 77.498318996888102], [-116.198586595507322, 77.645286770326194]]], [[[-93.840003017943971, 77.51999726023449], [-94.295608283245244, 77.491342678528682], [-96.169654100310055, 77.55511139597688], [-96.436304490936109, 77.83462921824362], [-94.422577277386353, 77.820004787904978], [-93.720656297565867, 77.634331366680314], [-93.840003017943971, 77.51999726023449]]], [[[-110.186938035912945, 77.697014879050286], [-112.051191169058455, 77.409228827616843], [-113.534278937619035, 77.732206529441143], [-112.724586758253835, 78.051050116681935], [-111.264443325630822, 78.152956041161545], [-109.854451870547067, 77.996324774884812], [-110.186938035912945, 77.697014879050286]]], [[[-109.663145718202557, 78.601972561345676], [-110.88131425661885, 78.406919867659994], [-112.542091437615142, 78.407901719873493], [-112.525890876091566, 78.550554511215225], [-111.500010342233367, 78.849993598130538], [-110.96366065147599, 78.804440823065207], [-109.663145718202557, 78.601972561345676]]], [[[-95.830294969449312, 78.056941229963243], [-97.309842902397975, 77.85059723582178], [-98.124289313533964, 78.082856960757567], [-98.55286780474664, 78.458105373845086], [-98.631984422585504, 78.871930243638374], [-97.337231411512604, 78.831984361476756], [-96.754398769908761, 78.765812689926989], [-95.559277920294562, 78.41831452098026], [-95.830294969449312, 78.056941229963243]]], [[[-100.060191820052111, 78.324754340315891], [-99.670939093813601, 77.907544664207393], [-101.303940192452984, 78.018984890444798], [-102.949808722733025, 78.343228664860206], [-105.176132778731514, 78.38033234324574], [-104.210429450277147, 78.677420152491777], [-105.419580451258511, 78.918335679836431], [-105.492289191493128, 79.301593939929177], [-103.529282396237917, 79.16534902619162], [-100.8251580472688, 78.80046173777869], [-100.060191820052111, 78.324754340315891]]], [[[-87.02, 79.66], [-85.81435, 79.3369], [-87.18756, 79.0393], [-89.03535, 78.28723], [-90.80436, 78.21533], [-92.87669, 78.34333], [-93.95116, 78.75099], [-93.93574, 79.11373], [-93.14524, 79.3801], [-94.974, 79.37248], [-96.07614, 79.70502], [-96.70972, 80.15777], [-96.01644, 80.60233], [-95.32345, 80.90729], [-94.29843, 80.97727], [-94.73542, 81.20646], [-92.40984, 81.25739], [-91.13289, 80.72345], [-89.45, 80.509322033898258], [-87.81, 80.32], [-87.02, 79.66]]], [[[-68.5, 83.106321516765732], [-65.82735, 83.02801], [-63.68, 82.9], [-61.85, 82.6286], [-61.89388, 82.36165], [-64.334, 81.92775], [-66.75342, 81.72527], [-67.65755, 81.50141], [-65.48031, 81.50657], [-67.84, 80.9], [-69.4697, 80.61683], [-71.18, 79.8], [-73.2428, 79.63415], [-73.88, 79.430162204802073], [-76.90773, 79.32309], [-75.52924, 79.19766], [-76.22046, 79.01907], [-75.39345, 78.52581], [-76.34354, 78.18296], [-77.88851, 77.89991], [-78.36269, 77.50859], [-79.75951, 77.20968], [-79.61965, 76.98336], [-77.91089, 77.022045], [-77.88911, 76.777955], [-80.56125, 76.17812], [-83.17439, 76.45403], [-86.11184, 76.29901], [-87.6, 76.42], [-89.49068, 76.47239], [-89.6161, 76.95213], [-87.76739, 77.17833], [-88.26, 77.9], [-87.65, 77.970222222222205], [-84.97634, 77.53873], [-86.34, 78.18], [-87.96192, 78.37181], [-87.15198, 78.75867], [-85.37868, 78.9969], [-85.09495, 79.34543], [-86.50734, 79.73624], [-86.93179, 80.25145], [-84.19844, 80.20836], [-83.408695652173819, 80.1], [-81.84823, 80.46442], [-84.1, 80.58], [-87.59895, 80.51627], [-89.36663, 80.85569], [-90.2, 81.26], [-91.36786, 81.5531], [-91.58702, 81.89429], [-90.1, 82.085], [-88.93227, 82.11751], [-86.97024, 82.27961], [-85.5, 82.652273458057024], [-84.260005, 82.6], [-83.18, 82.32], [-82.42, 82.86], [-81.1, 83.02], [-79.30664, 83.13056], [-76.25, 83.172058823529369], [-75.71878, 83.06404], [-72.83153, 83.23324], [-70.665765, 83.169780758382828], [-68.5, 83.106321516765732]]]] } }, - { "type": "Feature", "properties": { "admin": "Switzerland", "name": "Switzerland", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[9.594226108446346, 47.525058091820256], [9.632931756232974, 47.347601223329974], [9.479969516649019, 47.102809963563367], [9.932448357796657, 46.920728054382948], [10.442701450246627, 46.893546250997424], [10.36337812667861, 46.483571275409851], [9.922836541390378, 46.314899400409182], [9.182881707403054, 46.440214748716976], [8.966305779667804, 46.036931871111186], [8.489952426801322, 46.005150865251672], [8.316629672894377, 46.163642483090847], [7.755992058959832, 45.824490057959302], [7.273850945676655, 45.776947740250769], [6.843592970414504, 45.991146552100595], [6.500099724970424, 46.429672756529428], [6.022609490593537, 46.272989813820466], [6.037388950229, 46.725778713561859], [6.768713820023605, 47.287708238303686], [6.736571079138058, 47.541801255882838], [7.192202182655505, 47.449765529971003], [7.466759067422228, 47.620581976911794], [8.31730146651415, 47.613579820336255], [8.522611932009765, 47.830827541691285], [9.594226108446346, 47.525058091820256]]] } }, - { "type": "Feature", "properties": { "admin": "Chile", "name": "Chile", "continent": "South America" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-68.634010227583147, -52.636370458874353], [-68.633349999999879, -54.8695], [-67.56244, -54.87001], [-66.95992, -54.89681], [-67.291029999999878, -55.30124], [-68.148629999999841, -55.61183], [-68.639990810811796, -55.580017999086877], [-69.2321, -55.49906], [-69.95809, -55.19843], [-71.00568, -55.05383], [-72.2639, -54.49514], [-73.2852, -53.957519999999874], [-74.66253, -52.83749], [-73.8381, -53.04743], [-72.43418, -53.7154], [-71.10773, -54.07433], [-70.591779999999787, -53.61583], [-70.26748, -52.93123], [-69.345649999999878, -52.5183], [-68.634010227583147, -52.636370458874353]]], [[[-68.219913092711224, -21.49434661223183], [-67.828179897722634, -22.872918796482178], [-67.106673550063604, -22.735924574476392], [-66.985233934177629, -22.986348565362825], [-67.328442959244128, -24.025303236590908], [-68.417652960876111, -24.518554782816874], [-68.386001146097342, -26.185016371365229], [-68.594799770772667, -26.50690886811126], [-68.295541551370391, -26.899339694935787], [-69.001234910748266, -27.521213881136127], [-69.656130337183143, -28.459141127233686], [-70.013550381129861, -29.367922865518544], [-69.919008348251921, -30.336339206668306], [-70.535068935819439, -31.365010267870279], [-70.074399380153622, -33.09120981214803], [-69.814776984319209, -33.273886000299839], [-69.817309129501453, -34.193571465798279], [-70.388049485949082, -35.169687595359441], [-70.364769253201658, -36.005088799789931], [-71.121880662709771, -36.65812387466233], [-71.118625047475419, -37.576827487947192], [-70.814664272734703, -38.552995293940732], [-71.413516608349042, -38.916022230791107], [-71.680761277946445, -39.808164157878061], [-71.915734015577542, -40.832339369470716], [-71.746803758415453, -42.051386407235988], [-72.148898078078517, -42.254888197601375], [-71.915423956983901, -43.408564548517404], [-71.464056159130493, -43.787611179378324], [-71.793622606071935, -44.207172133156099], [-71.329800788036195, -44.407521661151677], [-71.222778896759721, -44.784242852559409], [-71.659315558545316, -44.973688653341434], [-71.552009446891233, -45.560732924177117], [-71.917258470330196, -46.884838148791786], [-72.44735531278026, -47.738532810253517], [-72.331160854771937, -48.244238376661819], [-72.648247443314929, -48.878618259476774], [-73.415435757120022, -49.318436374712952], [-73.328050910114456, -50.378785088909865], [-72.975746832964617, -50.741450290734299], [-72.309973517532342, -50.677009779666342], [-72.329403856074023, -51.425956312872394], [-71.914803839796321, -52.009022305865912], [-69.498362189396076, -52.142760912637236], [-68.571545376241332, -52.299443855346247], [-69.461284349226617, -52.291950772663924], [-69.94277950710611, -52.537930590373243], [-70.8451016913545, -52.899200528525711], [-71.006332160105217, -53.833252042201345], [-71.429794684520928, -53.856454760300373], [-72.557942877884855, -53.531410001184447], [-73.702756720662862, -52.835069268607249], [-73.702756720662862, -52.835070076051487], [-74.946763475225154, -52.262753588419017], [-75.260026007778507, -51.62935475037321], [-74.976632453089806, -51.043395684615675], [-75.47975419788348, -50.378371677451547], [-75.608015102831942, -48.673772881871784], [-75.182769741502128, -47.711919447623153], [-74.126580980104677, -46.939253431995084], [-75.644395311165439, -46.647643324572016], [-74.69215369332305, -45.76397633238097], [-74.351709357384252, -44.10304412208788], [-73.240356004515192, -44.454960625995611], [-72.717803921179765, -42.383355808278985], [-73.388899909138232, -42.117532240569567], [-73.701335618774834, -43.365776462579738], [-74.33194312203257, -43.224958184584395], [-74.017957119427152, -41.794812920906828], [-73.677099372029943, -39.942212823243111], [-73.217592536090663, -39.258688653318508], [-73.505559455037044, -38.282882582351064], [-73.588060879191076, -37.156284681956016], [-73.166717088499283, -37.123780206044351], [-72.553136969681717, -35.508840020491022], [-71.861732143832555, -33.909092706031522], [-71.438450486929895, -32.418899428030819], [-71.668720669222424, -30.920644626592516], [-71.370082567007714, -30.095682061484997], [-71.48989437527645, -28.861442152625909], [-70.905123867461569, -27.640379734001193], [-70.724953986275963, -25.705924167587209], [-70.403965827095035, -23.628996677344542], [-70.091245897080668, -21.393319187101223], [-70.164419725205974, -19.756468194256183], [-70.372572394477714, -18.347975355708879], [-69.858443569605797, -18.092693780187027], [-69.590423753523979, -17.580011895419286], [-69.100246955019401, -18.260125420812653], [-68.966818406841824, -18.981683444904089], [-68.442225104430918, -19.405068454671419], [-68.757167121033703, -20.37265797290447], [-68.219913092711224, -21.49434661223183]]]] } }, - { "type": "Feature", "properties": { "admin": "China", "name": "China", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[110.339187860151526, 18.678395087147603], [109.475209588663702, 18.19770091396861], [108.655207961056135, 18.507681993071397], [108.626217482540426, 19.367887885001974], [109.119055617308007, 19.821038519769385], [110.211598748822837, 20.101253973872073], [110.786550734502228, 20.077534491450077], [111.01005130416462, 19.695929877190732], [110.570646600386794, 19.255879218009305], [110.339187860151526, 18.678395087147603]]], [[[127.657407261262378, 49.760270494172929], [129.397817824420429, 49.440600084015429], [130.58229332898236, 48.729687404976112], [130.987281528853828, 47.790132351261391], [132.506671991099495, 47.788969631534876], [133.373595819228001, 48.183441677434914], [135.026311476786702, 48.478229885443902], [134.500813836810607, 47.578439846377833], [134.112362095272601, 47.212467352886719], [133.76964399631288, 46.116926988299056], [133.097126906466428, 45.14406647397216], [131.883454217659562, 45.32116160743643], [131.025212030156069, 44.967953192721573], [131.288555129115537, 44.111519680348252], [131.144687941614848, 42.929989732426932], [130.633866408409801, 42.903014634770543], [130.640015903852429, 42.39500946712527], [129.994267205933227, 42.985386867843793], [129.596668735879462, 42.424981797854592], [128.05221520397231, 41.994284572917984], [128.208433058790717, 41.466771552082534], [127.343782993683021, 41.503151760415953], [126.869083286649854, 41.816569322266155], [126.18204511932943, 41.107336127276362], [125.079941847840587, 40.569823716792449], [124.265624627785314, 39.928493353834135], [122.86757042856101, 39.637787583976255], [122.131387974130917, 39.170451768544623], [121.054554478032856, 38.89747101496291], [121.585994907722466, 39.360853583324136], [121.376757033372641, 39.750261338859524], [122.168595005381007, 40.422442531896046], [121.640358514493528, 40.946389878903304], [120.768628778161954, 40.593388169917596], [119.639602085449056, 39.898055935214209], [119.023463983233015, 39.252333075511096], [118.042748651197897, 39.204273993479674], [117.532702264477052, 38.73763580988409], [118.05969852098967, 38.061475531561051], [118.878149855628351, 37.897325344385898], [118.911636183753501, 37.448463853498723], [119.702802362142037, 37.156388658185072], [120.823457472823648, 37.870427761377968], [121.711258579597938, 37.481123358707165], [122.357937453298462, 37.454484157860684], [122.519994744965814, 36.930614325501828], [121.104163853033029, 36.651329047180432], [120.63700890511457, 36.111439520811125], [119.66456180224607, 35.609790554337728], [119.151208123858567, 34.909859117160458], [120.227524855633717, 34.360331936168613], [120.620369093916565, 33.37672272392512], [121.229014113450219, 32.460318711877186], [121.908145786630044, 31.692174384074683], [121.891919386890336, 30.949351508095098], [121.264257440273298, 30.676267401648712], [121.503519321784722, 30.14291494396425], [122.092113885589086, 29.832520453403156], [121.93842817595305, 29.018022365834803], [121.684438511238469, 28.225512600206677], [121.125661248866436, 28.135673122667178], [120.395473260582307, 27.053206895449385], [119.585496860839555, 25.740780544532605], [118.656871372554519, 24.547390855400234], [117.281606479970833, 23.624501451099714], [115.890735304835118, 22.782873236578094], [114.763827345846209, 22.668074042241663], [114.152546828265656, 22.223760077396204], [113.806779819800752, 22.548339748621423], [113.241077915501592, 22.051367499270462], [111.843592157032447, 21.550493679281512], [110.78546552942413, 21.39714386645533], [110.444039341271662, 20.34103261970639], [109.88986128137357, 20.282457383703441], [109.627655063924635, 21.008227037026725], [109.864488153118316, 21.395050970947516], [108.522812941524421, 21.715212307211821], [108.050180291782979, 21.552379869060101], [107.043420037872636, 21.8118989120299], [106.567273390735352, 22.21820486092474], [106.725403273548466, 22.794267889898375], [105.811247186305209, 22.976892401617899], [105.329209425886631, 23.352063300056976], [104.476858351664475, 22.819150092046918], [103.504514601660503, 22.703756618739217], [102.706992222100155, 22.708795070887696], [102.170435825613552, 22.464753119389336], [101.652017856861576, 22.318198757409554], [101.803119744882906, 21.174366766845051], [101.27002566936001, 21.201651923095167], [101.180005324307558, 21.436572984294052], [101.150032993578236, 21.849984442629015], [100.416537713627349, 21.558839423096654], [99.983489211021549, 21.742936713136451], [99.240898878987196, 22.118314317304559], [99.53199222208741, 22.949038804612591], [98.898749220782804, 23.142722072842581], [98.66026248575578, 24.063286037690002], [97.604719679762027, 23.897404690033049], [97.724609002679131, 25.083637193293036], [98.671838006589212, 25.91870250091349], [98.712093947344556, 26.743535874940243], [98.682690057370507, 27.508812160750658], [98.246230910233351, 27.747221381129172], [97.91198774616943, 28.335945136014367], [97.327113885490007, 28.261582749946339], [96.248833449287829, 28.411030992134467], [96.586590610747521, 28.830979519154361], [96.117678664131006, 29.452802028922513], [95.404802280664626, 29.031716620392157], [94.565990431702929, 29.27743805593996], [93.413347609432662, 28.640629380807233], [92.503118931043616, 27.896876329046442], [91.696656528696693, 27.771741848251615], [91.258853794319876, 28.040614325466343], [90.730513950567797, 28.064953925075738], [90.015828891971182, 28.296438503527177], [89.475810174521158, 28.042758897406365], [88.814248488320573, 27.299315904239389], [88.730325962278528, 28.086864732367552], [88.120440708369941, 27.876541652939572], [86.954517043000635, 27.974261786403524], [85.823319940131526, 28.203575954698742], [85.011638218123053, 28.642773952747369], [84.23457970575015, 28.839893703724691], [83.89899295444674, 29.320226141877633], [83.337115106137176, 29.463731594352193], [82.327512648450877, 30.115268052688204], [81.525804477874786, 30.422716986608659], [81.111256138029276, 30.183480943313402], [79.721366815107118, 30.882714748654728], [78.738894484374001, 31.515906073527045], [78.458446486326025, 32.61816437431272], [79.176128777995544, 32.483779812137747], [79.208891636068543, 32.994394639613738], [78.811086460285722, 33.506198025032397], [78.912268914713209, 34.321936346975768], [77.83745079947461, 35.494009507787794], [76.192848341785705, 35.89840342868785], [75.896897414050173, 36.666806138651872], [75.158027785140987, 37.133030910789152], [74.980002475895404, 37.419990139305888], [74.829985792952144, 37.990007025701445], [74.864815708316783, 38.378846340481587], [74.25751427602269, 38.606506862943476], [73.928852166646394, 38.505815334622717], [73.675379266254836, 39.431236884105566], [73.960013055318427, 39.660008449861714], [73.822243686828315, 39.893973497063136], [74.776862420556043, 40.366425279291619], [75.467827996730719, 40.56207225194867], [76.526368035797432, 40.427946071935132], [76.90448449087711, 41.066485907549648], [78.187196893226044, 41.185315863604799], [78.543660923175253, 41.582242540038713], [80.119430373051401, 42.12394074153822], [80.259990268885318, 42.34999929459908], [80.180150180994374, 42.920067857426844], [80.866206496101213, 43.180362046881008], [79.966106398441426, 44.917516994804622], [81.947070753918084, 45.317027492853143], [82.458925815769035, 45.539649563166499], [83.180483839860543, 47.330031236350735], [85.164290399113213, 47.000955715516099], [85.720483839870667, 47.452969468773077], [85.76823286330837, 48.455750637396896], [86.59877648310335, 48.549181626980605], [87.359970330762692, 49.214980780629148], [87.751264276076668, 49.297197984405464], [88.013832228551678, 48.599462795600594], [88.854297723346747, 48.069081732773007], [90.280825636763893, 47.693549099307901], [90.970809360724957, 46.88814606382293], [90.585768263718307, 45.719716091487491], [90.945539585334316, 45.286073309910243], [92.133890822318222, 45.115075995456429], [93.480733677141316, 44.97547211362], [94.688928664125356, 44.352331854828456], [95.306875441471504, 44.241330878265458], [95.762454868556688, 43.319449164394619], [96.349395786527808, 42.725635280928643], [97.451757440177971, 42.74888967546007], [99.515817498779995, 42.524691473961688], [100.845865513108279, 42.663804429691417], [101.833040399179936, 42.51487295182627], [103.312278273534787, 41.907468166667613], [104.522281935649005, 41.90834666601662], [104.964993931093431, 41.597409572916334], [106.129315627061658, 42.134327704428891], [107.744772576937976, 42.481515814781908], [109.243595819131428, 42.519446316084149], [110.412103306115299, 42.871233628911014], [111.129682244920218, 43.406834011400171], [111.82958784388137, 43.743118394539486], [111.667737257943202, 44.073175767587706], [111.348376906379428, 44.457441718110047], [111.87330610560025, 45.102079372735112], [112.436062453258842, 45.01164561622425], [113.463906691544196, 44.808893134127111], [114.46033165899604, 45.339816799493875], [115.985096470200133, 45.727235012386004], [116.717868280098855, 46.38820241961524], [117.421701287914246, 46.67273285581421], [118.874325799638711, 46.805412095723646], [119.663269891438745, 46.692679958678944], [119.772823927897562, 47.048058783550132], [118.866574334794947, 47.747060044946195], [118.064142694166719, 48.06673045510373], [117.295507440257438, 47.697709052107385], [116.308952671373234, 47.853410142602812], [115.742837355615734, 47.726544501326273], [115.485282017073018, 48.135382595403442], [116.191802199367601, 49.134598090199056], [116.67880089728618, 49.888531399121398], [117.879244419426371, 49.510983384796944], [119.288460728025839, 50.142882798862033], [119.279365675942358, 50.582907619827282], [120.182049595216924, 51.64356639261802], [120.738191359541972, 51.964115302124547], [120.725789015791975, 52.516226304730814], [120.177088657716865, 52.753886216841195], [121.003084751470226, 53.251401068731226], [122.245747918792858, 53.431725979213681], [123.571506789240843, 53.458804429734627], [125.068211297710434, 53.161044826868832], [125.946348911646169, 52.792798570356936], [126.564399041856959, 51.784255479532689], [126.939156528837657, 51.353894151405896], [127.287455682484904, 50.739797268265434], [127.657407261262378, 49.760270494172929]]]] } }, - { "type": "Feature", "properties": { "admin": "Ivory Coast", "name": "Côte d'Ivoire", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-2.856125047202397, 4.994475816259508], [-3.311084357100071, 4.984295559098014], [-4.008819545904941, 5.179813340674314], [-4.64991736491791, 5.168263658057084], [-5.834496222344525, 4.993700669775135], [-6.528769090185845, 4.705087795425015], [-7.518941209330434, 4.338288479017307], [-7.712159389669749, 4.364565944837721], [-7.63536821128403, 5.188159084489455], [-7.53971513511176, 5.313345241716517], [-7.570152553731686, 5.707352199725903], [-7.993692592795879, 6.126189683451541], [-8.311347622094017, 6.193033148621081], [-8.602880214868618, 6.467564195171659], [-8.385451626000572, 6.911800645368742], [-8.485445522485348, 7.395207831243068], [-8.439298468448696, 7.686042792181736], [-8.280703497744936, 7.687179673692156], [-8.221792364932197, 8.123328762235571], [-8.299048631208562, 8.316443589710302], [-8.203498907900878, 8.455453192575446], [-7.832100389019186, 8.575704250518625], [-8.079113735374348, 9.376223863152033], [-8.309616461612249, 9.789531968622439], [-8.22933712404682, 10.129020290563897], [-8.029943610048617, 10.206534939001711], [-7.89958980959237, 10.297382106970824], [-7.622759161804808, 10.147236232946792], [-6.850506557635057, 10.138993841996237], [-6.666460944027547, 10.430810655148447], [-6.493965013037267, 10.411302801958268], [-6.205222947606429, 10.524060777219132], [-6.050452032892266, 10.096360785355442], [-5.816926235365286, 10.222554633012191], [-5.404341599946973, 10.370736802609144], [-4.954653286143098, 10.152713934769732], [-4.779883592131966, 9.821984768101741], [-4.330246954760383, 9.610834865757139], [-3.980449184576684, 9.862344061721698], [-3.511898972986272, 9.900326239456216], [-2.827496303712706, 9.642460842319775], [-2.56218950032624, 8.219627793811481], [-2.983584967450326, 7.379704901555511], [-3.244370083011261, 6.2504715031135], [-2.810701463217839, 5.389051215024109], [-2.856125047202397, 4.994475816259508]]] } }, - { "type": "Feature", "properties": { "admin": "Cameroon", "name": "Cameroon", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[13.07582238124675, 2.267097072759014], [12.951333855855605, 2.321615708826939], [12.359380323952218, 2.19281220133945], [11.751665480199787, 2.326757513839993], [11.276449008843711, 2.261050930180871], [9.649158155972627, 2.283866075037735], [9.795195753629455, 3.073404445809117], [9.404366896205998, 3.734526882335202], [8.948115675501068, 3.904128933117135], [8.744923943729416, 4.352215277519959], [8.488815545290889, 4.495617377129917], [8.500287713259693, 4.771982937026847], [8.757532993208626, 5.47966583904791], [9.233162876023043, 6.444490668153334], [9.522705926154398, 6.453482367372116], [10.118276808318255, 7.038769639509879], [10.497375115611417, 7.055357774275562], [11.058787876030349, 6.644426784690593], [11.745774366918509, 6.981382961449753], [11.839308709366801, 7.397042344589434], [12.063946160539556, 7.799808457872301], [12.218872104550597, 8.305824082874322], [12.753671502339214, 8.717762762888993], [12.955467970438971, 9.417771714714702], [13.1675997249971, 9.64062632897341], [13.308676385153914, 10.160362046748926], [13.572949659894558, 10.798565985553564], [14.415378859116682, 11.572368882692071], [14.468192172918974, 11.90475169519341], [14.57717776862253, 12.085360826053501], [14.181336297266792, 12.483656927943112], [14.213530714584634, 12.802035427293344], [14.495787387762842, 12.859396267137326], [14.893385857816522, 12.219047756392582], [14.960151808337598, 11.555574042197222], [14.923564894274955, 10.891325181517471], [15.467872755605269, 9.982336737503429], [14.909353875394713, 9.99212942142273], [14.627200555081057, 9.920919297724536], [14.171466098699025, 10.021378282099928], [13.954218377344002, 9.549494940626685], [14.544466586981766, 8.965861314322266], [14.979995558337688, 8.796104234243471], [15.120865512765331, 8.382150173369423], [15.436091749745765, 7.692812404811971], [15.279460483469107, 7.421924546737968], [14.776545444404572, 6.408498033062044], [14.536560092841111, 6.22695872642069], [14.459407179429345, 5.451760565610299], [14.558935988023501, 5.03059764243153], [14.478372430080466, 4.732605495620446], [14.950953403389658, 4.21038930909492], [15.036219516671249, 3.851367295747123], [15.405395948964379, 3.335300604664339], [15.862732374747479, 3.013537298998982], [15.907380812247649, 2.557389431158612], [16.01285241055535, 2.267639675298084], [15.940918816805061, 1.727672634280295], [15.14634199388524, 1.964014797367184], [14.337812534246577, 2.22787466064949], [13.07582238124675, 2.267097072759014]]] } }, - { "type": "Feature", "properties": { "admin": "Democratic Republic of the Congo", "name": "Dem. Rep. Congo", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[30.833859897593801, 3.50916596111034], [30.773346795380036, 2.339883327642127], [31.174149204235807, 2.204465236821263], [30.852670118948048, 1.849396470543809], [30.468507521290292, 1.58380544677972], [30.086153598762703, 1.062312730306288], [29.875778842902488, 0.597379868976304], [29.819503208136634, -0.205310153813372], [29.587837762172164, -0.58740569417948], [29.579466180140876, -1.341313164885626], [29.29188683443661, -1.620055840667987], [29.254834832483336, -2.215109958508911], [29.117478875451546, -2.292211195488384], [29.02492638521678, -2.839257907730157], [29.276383904749046, -3.293907159034063], [29.339997592900342, -4.499983412294092], [29.519986606572925, -5.419978936386313], [29.41999271008816, -5.939998874539432], [29.620032179490003, -6.520015150583424], [30.199996779101692, -7.079980970898161], [30.740015496551781, -8.340007419470913], [30.34608605319081, -8.238256524288216], [29.002912225060467, -8.40703175215347], [28.734866570762495, -8.526559340044576], [28.449871046672818, -9.164918308146083], [28.673681674928922, -9.605924981324931], [28.496069777141763, -10.789883721564044], [28.372253045370421, -11.793646742401389], [28.642417433392346, -11.971568698782312], [29.341547885869087, -12.36074391037241], [29.616001417771223, -12.178894545137307], [29.699613885219485, -13.257226657771827], [28.934285922976834, -13.248958428605132], [28.52356163912102, -12.698604424696679], [28.15510867687998, -12.272480564017894], [27.38879886242378, -12.132747491100663], [27.164419793412456, -11.608748467661071], [26.55308759939961, -11.924439792532125], [25.752309604604726, -11.784965101776356], [25.418118116973197, -11.330935967659958], [24.783169793402948, -11.238693536018962], [24.314516228947948, -11.262826429899269], [24.257155389103982, -10.951992689663655], [23.912215203555714, -10.926826267137512], [23.456790805767433, -10.867863457892481], [22.837345411884733, -11.017621758674329], [22.402798292742371, -10.99307545333569], [22.155268182064304, -11.084801120653768], [22.208753289486388, -9.894796237836507], [21.87518191904234, -9.523707777548564], [21.801801385187897, -8.908706556842978], [21.949130893652036, -8.305900974158275], [21.746455926203303, -7.920084730667147], [21.728110792739695, -7.2908724910813], [20.514748162526498, -7.299605808138629], [20.601822950938292, -6.93931772219968], [20.091621534920645, -6.943090101756993], [20.037723016040214, -7.116361179231644], [19.417502475673157, -7.155428562044297], [19.166613396896107, -7.738183688999753], [19.016751743249664, -7.988245944860132], [18.464175652752683, -7.847014255406442], [18.134221632569048, -7.98767750410492], [17.472970004962232, -8.068551120641699], [17.089995965247166, -7.545688978712525], [16.860190870845198, -7.222297865429984], [16.573179965896141, -6.622644545115087], [16.326528354567042, -5.877470391466267], [13.375597364971892, -5.864241224799548], [13.02486941900696, -5.984388929878157], [12.735171339578695, -5.965682061388497], [12.322431674863507, -6.100092461779658], [12.182336866920249, -5.789930515163837], [12.436688266660866, -5.684303887559245], [12.468004184629734, -5.248361504745003], [12.631611769265788, -4.991271254092935], [12.995517205465173, -4.781103203961883], [13.258240187237044, -4.882957452009165], [13.600234816144676, -4.500138441590969], [14.144956088933295, -4.510008640158715], [14.209034864975219, -4.793092136253597], [14.582603794013179, -4.970238946150139], [15.170991652088441, -4.3435071753143], [15.753540073314749, -3.855164890156096], [16.006289503654298, -3.535132744972528], [15.972803175529149, -2.712392266453612], [16.407091912510051, -1.740927015798682], [16.86530683764212, -1.225816338713287], [17.523716261472853, -0.743830254726987], [17.638644646889983, -0.424831638189246], [17.663552687254676, -0.058083998213817], [17.826540154703245, 0.288923244626105], [17.774191928791563, 0.855658677571085], [17.89883548347958, 1.741831976728278], [18.09427575040743, 2.365721543788055], [18.39379235197114, 2.90044342692822], [18.453065219809925, 3.504385891123348], [18.542982211997778, 4.201785183118317], [18.932312452884755, 4.709506130385973], [19.467783644293146, 5.031527818212779], [20.290679152108932, 4.691677761245287], [20.927591180106273, 4.322785549329736], [21.659122755630019, 4.224341945813719], [22.405123732195531, 4.02916006104732], [22.704123569436284, 4.633050848810156], [22.841479526468103, 4.710126247573483], [23.297213982850135, 4.609693101414221], [24.41053104014625, 5.108784084489129], [24.805028924262409, 4.897246608902349], [25.128833449003274, 4.927244777847789], [25.278798455514302, 5.170408229997191], [25.650455356557465, 5.256087754737123], [26.402760857862535, 5.150874538590869], [27.044065382604703, 5.127852688004835], [27.374226108517483, 5.233944403500059], [27.979977247842807, 4.408413397637373], [28.428993768026906, 4.287154649264493], [28.696677687298795, 4.455077215996936], [29.159078403446497, 4.38926727947323], [29.715995314256013, 4.600804755060024], [29.953500197069467, 4.173699042167683], [30.833859897593801, 3.50916596111034]]] } }, - { "type": "Feature", "properties": { "admin": "Republic of Congo", "name": "Congo", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[12.995517205465173, -4.781103203961883], [12.620759718484491, -4.438023369976135], [12.318607618873923, -4.606230157086187], [11.914963006242086, -5.037986748884789], [11.093772820691923, -3.978826592630546], [11.855121697648114, -3.42687061932105], [11.478038771214299, -2.765618991714241], [11.820963575903189, -2.514161472181982], [12.495702752338159, -2.391688327650242], [12.575284458067639, -1.948511244315134], [13.109618767965626, -2.428740329603513], [13.992407260807706, -2.470804945489099], [14.299210239324564, -1.998275648612213], [14.425455763413593, -1.333406670744971], [14.316418491277741, -0.552627455247048], [13.843320753645653, 0.038757635901149], [14.276265903386953, 1.196929836426619], [14.026668735417214, 1.395677395021153], [13.282631463278816, 1.31418366129688], [13.003113641012074, 1.830896307783319], [13.07582238124675, 2.267097072759014], [14.337812534246577, 2.22787466064949], [15.14634199388524, 1.964014797367184], [15.940918816805061, 1.727672634280295], [16.01285241055535, 2.267639675298084], [16.537058139724135, 3.198254706226278], [17.133042433346297, 3.728196519379451], [17.809900343505259, 3.560196437998569], [18.453065219809925, 3.504385891123348], [18.39379235197114, 2.90044342692822], [18.09427575040743, 2.365721543788055], [17.89883548347958, 1.741831976728278], [17.774191928791563, 0.855658677571085], [17.826540154703245, 0.288923244626105], [17.663552687254676, -0.058083998213817], [17.638644646889983, -0.424831638189246], [17.523716261472853, -0.743830254726987], [16.86530683764212, -1.225816338713287], [16.407091912510051, -1.740927015798682], [15.972803175529149, -2.712392266453612], [16.006289503654298, -3.535132744972528], [15.753540073314749, -3.855164890156096], [15.170991652088441, -4.3435071753143], [14.582603794013179, -4.970238946150139], [14.209034864975219, -4.793092136253597], [14.144956088933295, -4.510008640158715], [13.600234816144676, -4.500138441590969], [13.258240187237044, -4.882957452009165], [12.995517205465173, -4.781103203961883]]] } }, - { "type": "Feature", "properties": { "admin": "Colombia", "name": "Colombia", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-75.373223232713841, -0.15203175212045], [-75.801465827116587, 0.084801337073202], [-76.292314419240938, 0.416047268064119], [-76.576379767549383, 0.256935533037435], [-77.424984300430367, 0.395686753741117], [-77.668612840470416, 0.825893052570961], [-77.855061408179509, 0.809925034992773], [-78.855258755188686, 1.380923773601822], [-78.990935228171026, 1.691369940595251], [-78.617831387023699, 1.766404120283056], [-78.662118089497838, 2.267355454920476], [-78.427610439757302, 2.629555568854215], [-77.931542527971473, 2.696605739752925], [-77.510431281224996, 3.325016994638246], [-77.127689785455246, 3.849636135265356], [-77.496271938776999, 4.087606105969427], [-77.307601284479375, 4.667984117039452], [-77.533220587865713, 5.582811997902496], [-77.318815070286718, 5.845354112161359], [-77.476660732722266, 6.691116441266301], [-77.881571417945239, 7.223771267114783], [-77.75341386586139, 7.709839789252141], [-77.431107957656977, 7.638061224798733], [-77.242566494440069, 7.935278225125442], [-77.474722866511314, 8.524286200388216], [-77.353360765273848, 8.670504665558068], [-76.836673957003541, 8.638749497914715], [-76.086383836557843, 9.336820583529486], [-75.674600185840035, 9.443248195834597], [-75.664704149056149, 9.774003200718736], [-75.480425991503338, 10.618990383339305], [-74.906895107711975, 11.08304474532032], [-74.276752692344871, 11.102035834187586], [-74.197222663047683, 11.310472723836865], [-73.414763963500278, 11.227015285685479], [-72.62783525255962, 11.731971543825519], [-72.238194953078903, 11.955549628136325], [-71.754090135368628, 12.437303168177305], [-71.399822353791691, 12.376040757695289], [-71.137461107045866, 12.112981879113503], [-71.331583624950284, 11.776284084515805], [-71.973921678338272, 11.608671576377116], [-72.227575446242923, 11.108702093953237], [-72.614657762325194, 10.821975409381777], [-72.905286017534692, 10.45034434655477], [-73.027604132769554, 9.736770331252441], [-73.304951544880026, 9.151999823437604], [-72.788729824500379, 9.085027167187331], [-72.660494757768092, 8.62528778730268], [-72.439862230097944, 8.405275376820027], [-72.360900641555958, 8.002638454617893], [-72.479678921178831, 7.632506008327352], [-72.444487270788059, 7.42378489830048], [-72.19835242378187, 7.340430813013682], [-71.960175747348629, 6.991614895043538], [-70.674233567981503, 7.087784735538717], [-70.093312954372408, 6.960376491723109], [-69.389479946557103, 6.099860541198835], [-68.985318569602327, 6.206804917826856], [-68.265052456318216, 6.153268133972473], [-67.695087246355001, 6.267318020040645], [-67.34143958196556, 6.095468044454021], [-67.521531948502741, 5.556870428891968], [-67.744696621355203, 5.221128648291667], [-67.823012254493534, 4.503937282728898], [-67.621835903581271, 3.839481716319994], [-67.33756384954367, 3.542342230641721], [-67.303173183853417, 3.31845408773718], [-67.809938117123693, 2.820655015469569], [-67.447092047786299, 2.600280869960869], [-67.181294318293041, 2.250638129074062], [-66.876325853122566, 1.253360500489336], [-67.065048183852483, 1.130112209473225], [-67.25999752467358, 1.719998684084956], [-67.537810024674684, 2.037162787276329], [-67.868565029558823, 1.692455145673392], [-69.816973232691609, 1.714805202639624], [-69.804596727157701, 1.089081122233466], [-69.218637661400166, 0.985676581217433], [-69.252434048119042, 0.602650865070075], [-69.452396002872447, 0.706158758950693], [-70.015565761989293, 0.541414292804205], [-70.02065589057004, -0.185156345219539], [-69.577065395776586, -0.549991957200163], [-69.420485805932216, -1.122618503426409], [-69.444101935489599, -1.556287123219817], [-69.893635219996611, -4.298186944194326], [-70.394043952094975, -3.766591485207825], [-70.692682054309699, -3.742872002785858], [-70.047708502874841, -2.725156345229699], [-70.813475714791949, -2.256864515800742], [-71.413645799429773, -2.342802422702128], [-71.774760708285385, -2.169789727388937], [-72.325786505813639, -2.434218031426453], [-73.070392218707212, -2.308954359550952], [-73.659503546834586, -1.260491224781134], [-74.122395189089048, -1.002832533373848], [-74.441600511355958, -0.530820000819887], [-75.106624518520064, -0.05720549886486], [-75.373223232713841, -0.15203175212045]]] } }, - { "type": "Feature", "properties": { "admin": "Costa Rica", "name": "Costa Rica", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-82.965783047197348, 8.225027980985983], [-83.508437262694287, 8.446926581247281], [-83.711473965169063, 8.656836249216864], [-83.596313035806631, 8.830443223501417], [-83.632641567707822, 9.051385809765319], [-83.909885626953724, 9.290802720573579], [-84.303401658856345, 9.487354030795712], [-84.64764421256865, 9.615537421095707], [-84.713350796227743, 9.908051866083849], [-84.975660366541319, 10.086723130733004], [-84.911374884770211, 9.795991522658921], [-85.110923428065291, 9.557039699741308], [-85.339488288092255, 9.834542141148658], [-85.660786505866966, 9.93334747969072], [-85.797444831062819, 10.134885565629032], [-85.791708747078417, 10.439337266476612], [-85.65931372754666, 10.754330959511718], [-85.941725430021748, 10.895278428587799], [-85.712540452807289, 11.088444932494822], [-85.561851976244171, 11.217119248901593], [-84.903003302738924, 10.952303371621895], [-84.673069017256239, 11.082657172078139], [-84.355930752281026, 10.999225572142901], [-84.190178595704822, 10.793450018756671], [-83.895054490885926, 10.726839097532444], [-83.655611741861563, 10.938764146361418], [-83.402319708982944, 10.39543813724465], [-83.015676642575158, 9.992982082555553], [-82.546196255203469, 9.566134751824674], [-82.932890998043561, 9.476812038608172], [-82.927154914059145, 9.074330145702914], [-82.719183112300513, 8.925708726431493], [-82.868657192704759, 8.807266343618521], [-82.829770677405151, 8.626295477732368], [-82.9131764391242, 8.423517157419068], [-82.965783047197348, 8.225027980985983]]] } }, - { "type": "Feature", "properties": { "admin": "Cuba", "name": "Cuba", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-82.268151211257035, 23.188610744717703], [-81.404457160146819, 23.117271429938775], [-80.61876868358118, 23.105980129482994], [-79.679523688460222, 22.765303249598823], [-79.281485968732071, 22.399201565027049], [-78.347434455056472, 22.512166246017085], [-77.993295864560253, 22.277193508385928], [-77.146422492161037, 21.657851467367831], [-76.523824835908528, 21.20681956632437], [-76.194620123993175, 21.220565497314006], [-75.598222418912655, 21.01662445727413], [-75.671060350228032, 20.735091254147999], [-74.933896043584483, 20.693905137611381], [-74.178024868451246, 20.284627793859737], [-74.296648118777242, 20.050378526280678], [-74.961594611292924, 19.923435370355687], [-75.634680141894577, 19.873774318923193], [-76.323656175425981, 19.952890936762056], [-77.755480923153044, 19.855480861891873], [-77.085108405246729, 20.413353786698789], [-77.492654588516601, 20.673105373613886], [-78.137292243141573, 20.739948838783427], [-78.482826707661161, 21.028613389565848], [-78.719866502583997, 21.598113511638431], [-79.284999966127913, 21.559175319906497], [-80.217475348618635, 21.827324327069032], [-80.517534552721401, 22.037078965741756], [-81.820943366203167, 22.192056586185068], [-82.169991828118611, 22.387109279870746], [-81.79500179719264, 22.636964830001951], [-82.775897996740838, 22.688150336187057], [-83.494458787759328, 22.168517971276124], [-83.908800421875611, 22.154565334557329], [-84.052150845053248, 21.910575059491251], [-84.547030198896351, 21.801227728761639], [-84.974911058273079, 21.896028143801082], [-84.44706214062775, 22.204949856041903], [-84.23035702181177, 22.56575470630376], [-83.778239915690165, 22.78811839445569], [-83.267547573565736, 22.983041897060641], [-82.510436164057495, 23.078746649665181], [-82.268151211257035, 23.188610744717703]]] } }, - { "type": "Feature", "properties": { "admin": "Northern Cyprus", "name": "N. Cyprus", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[32.731780226377445, 35.14002594658843], [32.802473585752743, 35.145503648411363], [32.946960890440799, 35.38670339613369], [33.667227003724939, 35.373215847305509], [34.576473829900458, 35.671595567358786], [33.900804477684197, 35.245755927057608], [33.973616570783456, 35.058506374647997], [33.866439650210104, 35.093594672174177], [33.675391880027057, 35.017862860650446], [33.525685255677494, 35.038688462864066], [33.475817498515845, 35.000344550103499], [33.45592207208346, 35.101423651666401], [33.383833449036295, 35.162711900364563], [33.190977003723042, 35.173124701471373], [32.919572381326127, 35.087832749973636], [32.731780226377445, 35.14002594658843]]] } }, - { "type": "Feature", "properties": { "admin": "Cyprus", "name": "Cyprus", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[33.973616570783456, 35.058506374647997], [34.004880812320032, 34.978097846001852], [32.97982710137844, 34.571869411755436], [32.490296258277532, 34.701654771456468], [32.256667107885953, 35.103232326796622], [32.731780226377445, 35.14002594658843], [32.919572381326127, 35.087832749973636], [33.190977003723042, 35.173124701471373], [33.383833449036295, 35.162711900364563], [33.45592207208346, 35.101423651666401], [33.475817498515845, 35.000344550103499], [33.525685255677494, 35.038688462864066], [33.675391880027057, 35.017862860650446], [33.866439650210104, 35.093594672174177], [33.973616570783456, 35.058506374647997]]] } }, - { "type": "Feature", "properties": { "admin": "Czech Republic", "name": "Czech Rep.", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[16.960288120194573, 48.596982326850593], [16.49928266771877, 48.785808010445095], [16.029647251050218, 48.733899034207916], [15.253415561593979, 49.039074205107575], [14.901447381254055, 48.964401760445817], [14.33889773932472, 48.555305284207193], [13.595945672264433, 48.877171942737135], [13.031328973043427, 49.307068182973232], [12.52102420416119, 49.54741526956272], [12.415190870827441, 49.96912079528056], [12.240111118222556, 50.266337795607271], [12.96683678554319, 50.484076443069071], [13.338131951560282, 50.733234361364346], [14.05622765468817, 50.926917629594286], [14.307013380600633, 51.117267767941399], [14.570718214586062, 51.002339382524262], [15.016995883858666, 51.106674099321566], [15.490972120839725, 50.7847299261432], [16.238626743238566, 50.697732652379827], [16.176253289462263, 50.4226073268579], [16.719475945714429, 50.215746568393527], [16.868769158605655, 50.473973700556016], [17.554567091551117, 50.36214590107641], [17.649445021238986, 50.049038397819942], [18.392913852622168, 49.988628648470737], [18.85314415861361, 49.496229763377634], [18.554971144289478, 49.495015367218777], [18.399993523846174, 49.315000515330034], [18.170498488037961, 49.271514797556421], [18.104972771891848, 49.043983466175298], [17.913511590250462, 48.996492824899072], [17.886484816161808, 48.903475246773695], [17.545006951577101, 48.800019029325362], [17.101984897538895, 48.8169688991171], [16.960288120194573, 48.596982326850593]]] } }, - { "type": "Feature", "properties": { "admin": "Germany", "name": "Germany", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[9.92190636560923, 54.983104153048025], [9.939579705452898, 54.596641954153242], [10.950112338920517, 54.363607082733147], [10.939466993868447, 54.008693345752583], [11.95625247564328, 54.196485500701144], [12.518440382546711, 54.470370591847988], [13.647467075259495, 54.075510972705885], [14.119686313542555, 53.757029120491026], [14.353315463934164, 53.248171291713092], [14.074521111719431, 52.981262518925334], [14.437599725002197, 52.62485016540829], [14.685026482815713, 52.089947414755208], [14.607098422919645, 51.745188096719964], [15.016995883858781, 51.106674099321701], [14.570718214586119, 51.002339382524369], [14.307013380600662, 51.117267767941364], [14.05622765468831, 50.92691762959435], [13.338131951560397, 50.733234361364268], [12.966836785543249, 50.484076443069164], [12.240111118222668, 50.266337795607214], [12.41519087082747, 49.969120795280602], [12.521024204161332, 49.547415269562741], [13.031328973043513, 49.307068182973232], [13.595945672264575, 48.877171942737156], [13.243357374737112, 48.416114813829026], [12.884102817443873, 48.289145819687846], [13.025851271220514, 47.637583523135945], [12.93262698736606, 47.467645575543983], [12.620759718484519, 47.672387600284409], [12.141357456112869, 47.703083401065768], [11.426414015354847, 47.523766181013045], [10.544504021861597, 47.566399237653783], [10.402083774465321, 47.302487697939164], [9.896068149463188, 47.58019684507569], [9.594226108446376, 47.525058091820185], [8.522611932009793, 47.830827541691342], [8.317301466514092, 47.613579820336263], [7.466759067422286, 47.620581976911907], [7.59367638513106, 48.333019110703724], [8.099278598674855, 49.017783515003423], [6.658229607783709, 49.201958319691627], [6.186320428094176, 49.4638028021145], [6.242751092156992, 49.90222565367872], [6.043073357781109, 50.128051662794221], [6.156658155958779, 50.803721015010574], [5.988658074577812, 51.85161570902504], [6.589396599970825, 51.85202912048338], [6.842869500362381, 52.228440253297542], [7.092053256873895, 53.14404328064488], [6.905139601274128, 53.482162177130633], [7.100424838905268, 53.693932196662658], [7.936239454793961, 53.748295803433777], [8.121706170289483, 53.527792466844275], [8.800734490604667, 54.02078563090889], [8.572117954145368, 54.395646470754045], [8.526229282270206, 54.962743638725144], [9.282048780971136, 54.830865383516297], [9.92190636560923, 54.983104153048025]]] } }, - { "type": "Feature", "properties": { "admin": "Djibouti", "name": "Djibouti", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[43.081226027200152, 12.699638576707112], [43.317852410664663, 12.390148423711022], [43.286381463398911, 11.974928290245883], [42.715873650896519, 11.735640570518338], [43.145304803242126, 11.462039699748853], [42.776851841000948, 10.926878566934416], [42.55493000000012, 11.105110000000193], [42.314140000000116, 11.0342], [41.755570000000191, 11.05091], [41.739590000000177, 11.355110000000137], [41.661760000000122, 11.6312], [42.000000000000107, 12.100000000000133], [42.351560000000106, 12.54223000000013], [42.779642368344739, 12.455415757695672], [43.081226027200152, 12.699638576707112]]] } }, - { "type": "Feature", "properties": { "admin": "Denmark", "name": "Denmark", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[12.690006137755629, 55.60999095318077], [12.089991082414738, 54.800014553437919], [11.043543328504226, 55.36486379660424], [10.90391360845163, 55.779954738988735], [12.370904168353288, 56.111407375708822], [12.690006137755629, 55.60999095318077]]], [[[10.912181837618359, 56.4586213242779], [10.667803989309986, 56.081383368547208], [10.369992710011983, 56.190007229224719], [9.649984978889306, 55.469999498102041], [9.921906365609173, 54.983104153048046], [9.282048780971136, 54.830865383516155], [8.526229282270235, 54.962743638724973], [8.120310906617588, 55.517722683323612], [8.089976840862247, 56.540011705137587], [8.256581658571262, 56.809969387430286], [8.543437534223385, 57.110002753316891], [9.424469028367609, 57.172066148499468], [9.775558709358561, 57.447940782289649], [10.580005730846151, 57.730016587954843], [10.54610599126269, 57.21573273378614], [10.250000034230222, 56.890016181050456], [10.369992710011983, 56.60998159446082], [10.912181837618359, 56.4586213242779]]]] } }, - { "type": "Feature", "properties": { "admin": "Dominican Republic", "name": "Dominican Rep.", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-71.71236141629295, 19.714455878167353], [-71.587304450146604, 19.884910590082093], [-70.806706102161726, 19.880285549391981], [-70.214364997016119, 19.622885240146157], [-69.950815192327568, 19.647999986240002], [-69.769250047470067, 19.293267116772437], [-69.222125820579862, 19.313214219637096], [-69.254346076113819, 19.015196234609871], [-68.809411994080818, 18.979074408437846], [-68.317943284768958, 18.612197577381689], [-68.689315965434503, 18.205142320218609], [-69.164945848248905, 18.422648423735108], [-69.623987596297624, 18.380712998930246], [-69.952933926051529, 18.428306993071057], [-70.133232998317879, 18.245915025296892], [-70.517137213814195, 18.184290879788829], [-70.669298468697619, 18.42688589118303], [-70.999950120717173, 18.283328762276206], [-71.400209927033885, 17.598564357976596], [-71.657661912712001, 17.757572740138695], [-71.708304816358037, 18.044997056546091], [-71.687737596305865, 18.316660061104468], [-71.945112067335543, 18.616900132720257], [-71.701302659782485, 18.785416978424049], [-71.624873216422813, 19.169837958243303], [-71.71236141629295, 19.714455878167353]]] } }, - { "type": "Feature", "properties": { "admin": "Algeria", "name": "Algeria", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[11.99950564947161, 23.471668402596443], [8.572893100629782, 21.565660712159136], [5.677565952180684, 19.601206976799713], [4.267419467800038, 19.155265204336995], [3.158133172222704, 19.057364203360034], [3.146661004253899, 19.693578599521441], [2.683588494486428, 19.856230170160114], [2.060990838233919, 20.142233384679482], [1.823227573259032, 20.61080943448604], [-1.550054897457613, 22.792665920497377], [-4.92333736817423, 24.974574082940993], [-8.684399786809051, 27.395744126895998], [-8.66512447756419, 27.58947907155822], [-8.665589565454805, 27.656425889592349], [-8.674116176782972, 28.841288967396572], [-7.059227667661928, 29.579228420524522], [-6.060632290053772, 29.731699734001687], [-5.242129278982786, 30.000443020135581], [-4.859646165374469, 30.501187649043839], [-3.690441046554695, 30.896951605751152], [-3.647497931320145, 31.637294012980668], [-3.068980271812647, 31.724497992473207], [-2.616604783529567, 32.094346218386143], [-1.30789913573787, 32.262888902306095], [-1.124551153966308, 32.651521511357124], [-1.388049282222567, 32.864015000941301], [-1.733454555661467, 33.91971283623198], [-1.792985805661686, 34.527918606091198], [-2.169913702798624, 35.168396307916673], [-1.208602871089056, 35.71484874118709], [-0.127454392894606, 35.888662421200799], [0.503876580415209, 36.301272894835272], [1.466918572606545, 36.605647081034398], [3.161698846050824, 36.783904934225205], [4.815758090849129, 36.865036932923452], [5.320120070017792, 36.716518866516616], [6.261819695672611, 37.110655015606731], [7.330384962603969, 37.118380642234364], [7.737078484741003, 36.885707505840209], [8.420964389691674, 36.946427313783154], [8.217824334352313, 36.433176988260271], [8.376367628623766, 35.479876003555937], [8.140981479534302, 34.655145982393783], [7.524481642292242, 34.097376410451453], [7.612641635782181, 33.344114895148955], [8.430472853233367, 32.748337307255944], [8.439102817426116, 32.506284898400814], [9.055602654668148, 32.102691962201284], [9.482139926805273, 30.307556057246181], [9.805634392952411, 29.424638373323383], [9.859997999723443, 28.959989732371007], [9.683884718472765, 28.144173895779193], [9.756128370816779, 27.688258571884141], [9.629056023811073, 27.140953477480913], [9.716285841519747, 26.512206325785691], [9.319410841518161, 26.094324856057447], [9.910692579801774, 25.365454616796733], [9.948261346077969, 24.93695364023251], [10.30384687667836, 24.37931325937091], [10.771363559622925, 24.562532050061744], [11.560669386449002, 24.097909247325511], [11.99950564947161, 23.471668402596443]]] } }, - { "type": "Feature", "properties": { "admin": "Ecuador", "name": "Ecuador", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-80.302560594387188, -3.404856459164712], [-79.770293341780913, -2.65751189535964], [-79.986559210922394, -2.220794366061014], [-80.368783942369234, -2.685158786635788], [-80.967765469064332, -2.246942640800703], [-80.764806281238023, -1.965047702648532], [-80.933659023751702, -1.057454522306358], [-80.583370327461239, -0.906662692878683], [-80.39932471385373, -0.283703301600141], [-80.020898200180355, 0.360340074053468], [-80.090609707342097, 0.768428859862396], [-79.542762010399784, 0.982937730305963], [-78.855258755188686, 1.380923773601822], [-77.855061408179509, 0.809925034992773], [-77.668612840470416, 0.825893052570961], [-77.424984300430367, 0.395686753741117], [-76.576379767549383, 0.256935533037435], [-76.292314419240938, 0.416047268064119], [-75.801465827116587, 0.084801337073202], [-75.373223232713841, -0.15203175212045], [-75.233722703741932, -0.911416924649529], [-75.544995693652027, -1.56160979574588], [-76.635394253226707, -2.608677666843817], [-77.83790483265858, -3.003020521663103], [-78.450683966775628, -3.873096612161375], [-78.639897223612323, -4.547784112164072], [-79.205289069317715, -4.959128513207388], [-79.62497921417615, -4.454198093283494], [-80.028908047185581, -4.346090996928893], [-80.442241990872134, -4.425724379090673], [-80.46929460317692, -4.059286797708999], [-80.184014858709645, -3.821161797708043], [-80.302560594387188, -3.404856459164712]]] } }, - { "type": "Feature", "properties": { "admin": "Egypt", "name": "Egypt", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[34.9226, 29.50133], [34.64174, 29.09942], [34.42655, 28.34399], [34.15451, 27.8233], [33.92136, 27.6487], [33.58811, 27.97136], [33.13676, 28.41765], [32.42323, 29.85108], [32.32046, 29.76043], [32.73482, 28.70523], [33.34876, 27.69989], [34.10455, 26.14227], [34.47387, 25.59856], [34.79507, 25.03375], [35.69241, 23.92671], [35.49372, 23.75237], [35.52598, 23.10244], [36.69069, 22.20485], [36.86623, 22.0], [32.9, 22.0], [29.02, 22.0], [25.0, 22.0], [25.0, 25.682499996360992], [25.0, 29.238654529533452], [24.70007, 30.04419], [24.95762, 30.6616], [24.80287, 31.08929], [25.16482, 31.56915], [26.49533, 31.58568], [27.45762, 31.32126], [28.45048, 31.02577], [28.91353, 30.87005], [29.68342, 31.18686], [30.09503, 31.4734], [30.97693, 31.55586], [31.68796, 31.4296], [31.96041, 30.9336], [32.19247, 31.26034], [32.99392, 31.02407], [33.7734, 30.96746], [34.26544, 31.21936], [34.9226, 29.50133]]] } }, - { "type": "Feature", "properties": { "admin": "Eritrea", "name": "Eritrea", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[42.351560000000106, 12.54223000000013], [42.00975, 12.86582], [41.59856, 13.452090000000108], [41.15519371924983, 13.773319810435224], [40.8966, 14.118640000000138], [40.026218702969167, 14.519579169162281], [39.34061, 14.53155], [39.0994, 14.74064], [38.51295, 14.50547], [37.90607, 14.959430000000165], [37.59377, 14.2131], [36.42951, 14.42211], [36.323188917798113, 14.822480577041057], [36.753860304518575, 16.291874091044289], [36.852530000000108, 16.95655], [37.16747, 17.263140000000128], [37.904000000000103, 17.42754], [38.410089959473218, 17.998307399970312], [38.990622999839999, 16.84062612555169], [39.266110060388016, 15.922723496967246], [39.814293654140208, 15.435647284400314], [41.179274936697645, 14.491079616753209], [41.734951613132345, 13.921036892141554], [42.276830682144848, 13.34399201095442], [42.589576450375255, 13.000421250861901], [43.081226027200152, 12.699638576707112], [42.779642368344739, 12.455415757695672], [42.351560000000106, 12.54223000000013]]] } }, - { "type": "Feature", "properties": { "admin": "Spain", "name": "Spain", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[-9.034817674180244, 41.880570583659669], [-8.98443315269567, 42.592775173506261], [-9.392883673530644, 43.026624660812686], [-7.978189663108308, 43.748337714200979], [-6.754491746436754, 43.567909450853918], [-5.411886359061596, 43.574239813809669], [-4.347842779955783, 43.403449205085025], [-3.51753170410609, 43.455900783861296], [-1.901351284177764, 43.422802028978332], [-1.502770961910528, 43.034014390630425], [0.338046909190581, 42.579546006839543], [0.701590610363894, 42.795734361332599], [1.826793247087153, 42.343384711265678], [2.985998976258457, 42.473015041669854], [3.039484083680548, 41.892120266276891], [2.091841668312184, 41.226088568683082], [0.810524529635188, 41.014731960609332], [0.721331007499401, 40.678318386389229], [0.106691521819869, 40.123933620762003], [-0.278711310212941, 39.309978135732713], [0.111290724293838, 38.738514309233032], [-0.467123582349103, 38.292365831041138], [-0.683389451490598, 37.642353827457811], [-1.438382127274849, 37.443063666324214], [-2.146452602538119, 36.674144192037282], [-3.415780808923386, 36.658899644511173], [-4.368900926114718, 36.677839056946141], [-4.995219285492211, 36.32470815687963], [-5.377159796561457, 35.946850083961458], [-5.866432257500902, 36.02981659600605], [-6.236693894872174, 36.367677110330327], [-6.520190802425402, 36.942913316387312], [-7.45372555177809, 37.097787583966053], [-7.537105475281022, 37.428904323876232], [-7.166507941099863, 37.803894354802217], [-7.029281175148794, 38.075764065089757], [-7.374092169616317, 38.373058580064914], [-7.098036668313126, 39.03007274022378], [-7.498632371439724, 39.629571031241802], [-7.066591559263527, 39.711891587882768], [-7.026413133156593, 40.184524237624238], [-6.864019944679383, 40.330871893874821], [-6.851126674822551, 41.111082668617513], [-6.389087693700914, 41.381815497394641], [-6.668605515967655, 41.883386949219577], [-7.251308966490822, 41.91834605566504], [-7.422512986673794, 41.792074693359822], [-8.01317460776991, 41.790886135417118], [-8.26385698081779, 42.280468654950326], [-8.671945766626719, 42.134689439454952], [-9.034817674180244, 41.880570583659669]]] } }, - { "type": "Feature", "properties": { "admin": "Estonia", "name": "Estonia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[24.312862583114615, 57.793423570376966], [24.428927850042154, 58.383413397853275], [24.061198357853179, 58.257374579493394], [23.426560092876681, 58.612753404364618], [23.339795363058641, 59.187240302153363], [24.604214308376182, 59.465853786855007], [25.864189080516631, 59.611090399811324], [26.949135776484518, 59.445803331125767], [27.981114129353237, 59.47538808861286], [28.131699253051742, 59.300825100330904], [27.420166456824941, 58.724581203844224], [27.716685825315714, 57.791899115624354], [27.288184848751509, 57.474528306703817], [26.46353234223778, 57.476388658266316], [25.602809685984365, 57.847528794986559], [25.164593540149262, 57.970156968815175], [24.312862583114615, 57.793423570376966]]] } }, - { "type": "Feature", "properties": { "admin": "Ethiopia", "name": "Ethiopia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[37.90607, 14.959430000000165], [38.51295, 14.50547], [39.0994, 14.74064], [39.34061, 14.53155], [40.026250000000111, 14.51959], [40.8966, 14.118640000000138], [41.1552, 13.77333], [41.59856, 13.452090000000108], [42.00975, 12.86582], [42.351560000000106, 12.54223000000013], [42.000000000000107, 12.100000000000133], [41.661760000000122, 11.6312], [41.739590000000177, 11.355110000000137], [41.755570000000191, 11.05091], [42.314140000000116, 11.0342], [42.55493000000012, 11.105110000000193], [42.776851841000948, 10.926878566934416], [42.55876, 10.572580000000126], [42.92812, 10.021940000000139], [43.29699, 9.540480000000169], [43.67875, 9.183580000000116], [46.94834, 7.99688], [47.78942, 8.003], [44.9636, 5.001620000000115], [43.66087, 4.95755], [42.769670000000119, 4.252590000000223], [42.12861, 4.234130000000163], [41.855083092644108, 3.918911920483764], [41.171800000000125, 3.91909], [40.768480000000118, 4.257020000000124], [39.854940000000106, 3.83879000000013], [39.559384258765917, 3.422060000000215], [38.89251, 3.50074], [38.67114, 3.61607], [38.436970000000137, 3.58851], [38.120915000000132, 3.598605], [36.85509323800823, 4.447864127672857], [36.159078632855646, 4.447864127672857], [35.817447662353622, 4.776965663462021], [35.817447662353622, 5.338232082790852], [35.298007118233095, 5.506], [34.70702, 6.59422000000012], [34.25032, 6.82607], [34.075100000000184, 7.22595], [33.56829, 7.71334], [32.954180000000228, 7.7849700000001], [33.294800000000116, 8.35458], [33.82550000000014, 8.37916], [33.97498, 8.684560000000145], [33.96162, 9.58358], [34.25745, 10.63009], [34.73115000000012, 10.910170000000106], [34.831630000000125, 11.318960000000116], [35.26049, 12.08286], [35.863630000000164, 12.57828], [36.27022, 13.563330000000118], [36.42951, 14.42211], [37.59377, 14.2131], [37.90607, 14.959430000000165]]] } }, - { "type": "Feature", "properties": { "admin": "Finland", "name": "Finland", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[28.591929559043187, 69.064776923286644], [28.445943637818651, 68.36461294216403], [29.9774263852206, 67.698297024192641], [29.054588657352319, 66.944286200621917], [30.21765, 65.80598], [29.544429559046982, 64.948671576590471], [30.444684686003704, 64.204453436939076], [30.035872430142714, 63.552813625738544], [31.516092156711117, 62.867687486412869], [31.139991082490891, 62.357692776124395], [30.211107212044443, 61.780027777749673], [28.06999759289527, 60.503516547275829], [26.25517296723697, 60.423960679762487], [24.496623976344516, 60.057316392651636], [22.869694858499454, 59.846373196036211], [22.290763787533589, 60.391921291741525], [21.322244093519313, 60.720169989659503], [21.544866163832687, 61.705329494871783], [21.059211053153682, 62.607393296958726], [21.536029493910799, 63.189735012455863], [22.442744174903986, 63.817810370531276], [24.730511508897528, 64.902343655040823], [25.398067661243939, 65.111426500093728], [25.2940430030404, 65.53434642197044], [23.903378533633795, 66.006927395279604], [23.565879754335576, 66.396050930437411], [23.539473097434435, 67.936008612735236], [21.978534783626113, 68.616845608180682], [20.645592889089521, 69.106247260200846], [21.244936150810666, 69.370443020293067], [22.356237827247405, 68.841741441514898], [23.662049594830751, 68.891247463650529], [24.735679152126721, 68.649556789821446], [25.689212680776361, 69.092113755969024], [26.179622023226241, 69.825298977326113], [27.732292107867856, 70.164193020296239], [29.015572950971968, 69.766491197377974], [28.591929559043187, 69.064776923286644]]] } }, - { "type": "Feature", "properties": { "admin": "Fiji", "name": "Fiji", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[178.3736, -17.33992], [178.71806, -17.62846], [178.55271, -18.15059], [177.93266, -18.28799], [177.38146, -18.16432], [177.28504, -17.72465], [177.67087, -17.38114], [178.12557, -17.50481], [178.3736, -17.33992]]], [[[179.364142661964223, -16.801354076946847], [178.725059362997058, -17.012041674368017], [178.596838595117021, -16.63915], [179.096609362997128, -16.43398427754742], [179.413509362997075, -16.379054277547393], [180.000000000000114, -16.067132663642436], [180.000000000000114, -16.555216566639157], [179.364142661964223, -16.801354076946847]]], [[[-179.917369384765237, -16.501783135649358], [-180.0, -16.555216566639157], [-180.0, -16.067132663642436], [-179.793320109048551, -16.020882256741228], [-179.917369384765237, -16.501783135649358]]]] } }, - { "type": "Feature", "properties": { "admin": "Falkland Islands", "name": "Falkland Is.", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-61.2, -51.85], [-60.0, -51.25], [-59.15, -51.5], [-58.55, -51.1], [-57.75, -51.55], [-58.05, -51.9], [-59.4, -52.2], [-59.85, -51.85], [-60.7, -52.3], [-61.2, -51.85]]] } }, - { "type": "Feature", "properties": { "admin": "France", "name": "France", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-52.556424730018378, 2.504705308437053], [-52.939657151894963, 2.124857692875622], [-53.41846513529525, 2.053389187016037], [-53.554839240113481, 2.334896551925964], [-53.778520677288881, 2.376702785650053], [-54.088062506717264, 2.105556545414629], [-54.524754197799737, 2.311848863123785], [-54.271229620975781, 2.738747870286942], [-54.184284023644743, 3.194172268075234], [-54.011503872276812, 3.622569891774857], [-54.3995422023565, 4.212611395683481], [-54.478632981979203, 4.896755682795642], [-53.958044603070917, 5.756548163267808], [-53.618452928264837, 5.646529038918401], [-52.882141282754063, 5.409850979021598], [-51.823342861525916, 4.565768133966144], [-51.657797410678874, 4.156232408053028], [-52.249337531123977, 3.241094468596287], [-52.556424730018378, 2.504705308437053]]], [[[9.560016310269132, 42.152491970379558], [9.229752231491771, 41.380006822264441], [8.77572309737536, 41.583611965494427], [8.544212680707828, 42.256516628583078], [8.746009148807586, 42.628121853193946], [9.390000848028901, 43.009984849614725], [9.560016310269132, 42.152491970379558]]], [[[3.588184441755714, 50.378992418003563], [4.28602298342514, 49.90749664977254], [4.799221632515752, 49.985373033236314], [5.674051954784885, 49.529483547557433], [5.897759230176375, 49.442667141307155], [6.186320428094204, 49.463802802114444], [6.658229607783538, 49.201958319691549], [8.09927859867477, 49.017783515003366], [7.59367638513106, 48.333019110703724], [7.466759067422228, 47.620581976911851], [7.192202182655533, 47.449765529970982], [6.736571079138086, 47.541801255882874], [6.768713820023634, 47.287708238303672], [6.037388950228971, 46.725778713561894], [6.022609490593566, 46.272989813820502], [6.500099724970453, 46.429672756529428], [6.84359297041456, 45.991146552100659], [6.80235517744566, 45.708579820328673], [7.096652459347835, 45.333098863295859], [6.749955275101711, 45.028517971367584], [7.007562290076661, 44.254766750661382], [7.549596388386161, 44.127901109384808], [7.435184767291841, 43.693844916349164], [6.529245232783068, 43.12889232031835], [4.556962517931395, 43.399650987311581], [3.100410597352719, 43.075200507167118], [2.985998976258486, 42.473015041669882], [1.826793247087181, 42.343384711265649], [0.701590610363922, 42.795734361332642], [0.338046909190581, 42.57954600683955], [-1.502770961910471, 43.034014390630482], [-1.901351284177735, 43.422802028978332], [-1.384225226232956, 44.022610378590166], [-1.193797573237361, 46.014917710954862], [-2.225724249673788, 47.064362697938201], [-2.963276129559573, 47.570326646507958], [-4.491554938159481, 47.95495433205641], [-4.592349819344746, 48.68416046812694], [-3.295813971357745, 48.901692409859628], [-1.616510789384932, 48.644421291694577], [-1.933494025063254, 49.776341864615759], [-0.98946895995536, 49.347375800160869], [1.338761020522753, 50.127173163445256], [1.6390010921385, 50.9466063502975], [2.51357303224617, 51.14850617126185], [2.65842207196033, 50.796848049515646], [3.123251580425716, 50.780363267614504], [3.588184441755714, 50.378992418003563]]]] } }, - { "type": "Feature", "properties": { "admin": "Gabon", "name": "Gabon", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[11.093772820691923, -3.978826592630546], [10.066135288135738, -2.969482517105681], [9.405245395554969, -2.144313246269042], [8.797995639693168, -1.111301364754496], [8.830086704146423, -0.779073581550037], [9.048419630579586, -0.459351494960217], [9.291350538783687, 0.268666083167687], [9.492888624721981, 1.010119533691494], [9.83028405115564, 1.067893784993799], [11.285078973036461, 1.057661851400013], [11.276449008843711, 2.261050930180871], [11.751665480199787, 2.326757513839993], [12.359380323952218, 2.19281220133945], [12.951333855855605, 2.321615708826939], [13.07582238124675, 2.267097072759014], [13.003113641012074, 1.830896307783319], [13.282631463278816, 1.31418366129688], [14.026668735417214, 1.395677395021153], [14.276265903386953, 1.196929836426619], [13.843320753645653, 0.038757635901149], [14.316418491277741, -0.552627455247048], [14.425455763413593, -1.333406670744971], [14.299210239324564, -1.998275648612213], [13.992407260807706, -2.470804945489099], [13.109618767965626, -2.428740329603513], [12.575284458067639, -1.948511244315134], [12.495702752338159, -2.391688327650242], [11.820963575903189, -2.514161472181982], [11.478038771214299, -2.765618991714241], [11.855121697648114, -3.42687061932105], [11.093772820691923, -3.978826592630546]]] } }, - { "type": "Feature", "properties": { "admin": "United Kingdom", "name": "United Kingdom", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-5.661948614921896, 54.554603176483838], [-6.197884894220976, 53.867565009163329], [-6.953730231137994, 54.073702297575622], [-7.572167934591078, 54.059956366585979], [-7.366030646178785, 54.595840969452688], [-7.572167934591078, 55.131622219454883], [-6.733847011736144, 55.172860012423783], [-5.661948614921896, 54.554603176483838]]], [[[-3.00500484863528, 58.635000108466322], [-4.073828497728015, 57.55302480735525], [-3.055001796877661, 57.690019029360933], [-1.959280564776918, 57.684799709699512], [-2.219988165689301, 56.870017401753515], [-3.119003058271118, 55.97379303651546], [-2.085009324543023, 55.909998480851264], [-2.005675679673856, 55.804902850350217], [-1.11499101399221, 54.624986477265388], [-0.4304849918542, 54.464376125702145], [0.184981316742039, 53.325014146531018], [0.469976840831777, 52.929999498091959], [1.681530795914739, 52.739520168663987], [1.559987827164377, 52.099998480836], [1.050561557630914, 51.806760565795678], [1.4498653499503, 51.289427802121949], [0.550333693045502, 50.765738837275862], [-0.787517462558639, 50.774988918656206], [-2.489997524414377, 50.500018622431227], [-2.956273972984035, 50.696879991247002], [-3.617448085942327, 50.228355617872708], [-4.542507900399243, 50.341837063185658], [-5.245023159191134, 49.959999904981082], [-5.776566941745299, 50.159677639356815], [-4.309989793301837, 51.210001125689146], [-3.414850633142122, 51.426008612669236], [-3.422719467108322, 51.426848167406078], [-4.984367234710873, 51.593466091510962], [-5.267295701508885, 51.991400458374571], [-4.222346564134852, 52.30135569926135], [-4.770013393564112, 52.840004991255611], [-4.579999152026914, 53.495003770555165], [-3.093830673788658, 53.404547400669671], [-3.092079637047106, 53.404440822963544], [-2.945008510744343, 53.98499970154667], [-3.614700825433033, 54.60093677329256], [-3.63000545898933, 54.615012925833], [-4.844169073903003, 54.790971177786837], [-5.082526617849224, 55.061600653699358], [-4.719112107756643, 55.508472601943467], [-5.047980922862108, 55.783985500707516], [-5.586397670911139, 55.311146145236805], [-5.64499874513018, 56.275014960344791], [-6.149980841486352, 56.785009670633528], [-5.78682471355529, 57.818848375064633], [-5.009998745127574, 58.630013332750039], [-4.211494513353555, 58.550845038479153], [-3.00500484863528, 58.635000108466322]]]] } }, - { "type": "Feature", "properties": { "admin": "Georgia", "name": "Georgia", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[41.55408410011065, 41.535656236327561], [41.703170607272703, 41.962942816732912], [41.453470086438379, 42.645123399417926], [40.875469191253785, 43.013628038091277], [40.321394484220313, 43.128633938156831], [39.955008579270917, 43.434997666999216], [40.07696495947976, 43.553104153002309], [40.922184686045618, 43.38215851498078], [42.394394565608806, 43.220307929042619], [43.756016880067378, 42.74082815202248], [43.931199985536828, 42.554973863284758], [44.537622918481979, 42.71199270280362], [45.470279168485703, 42.502780666669963], [45.776410353382758, 42.09244395605635], [46.404950799348818, 41.860675157227298], [46.145431756379004, 41.722802435872573], [46.637908156120574, 41.181672675128219], [46.501637404166921, 41.064444688474104], [45.962600538930381, 41.123872585609767], [45.217426385281577, 41.411451931314041], [44.972480096218071, 41.248128567055588], [43.582745802592726, 41.09214325618256], [42.619548781104484, 41.583172715819934], [41.55408410011065, 41.535656236327561]]] } }, - { "type": "Feature", "properties": { "admin": "Ghana", "name": "Ghana", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[1.060121697604927, 5.928837388528875], [-0.507637905265938, 5.343472601742675], [-1.063624640294193, 5.000547797053811], [-1.964706590167594, 4.71046214438337], [-2.856125047202397, 4.994475816259508], [-2.810701463217839, 5.389051215024109], [-3.244370083011261, 6.2504715031135], [-2.983584967450326, 7.379704901555511], [-2.56218950032624, 8.219627793811481], [-2.827496303712706, 9.642460842319775], [-2.963896246747111, 10.395334784380081], [-2.94040930827046, 10.962690334512557], [-1.203357713211431, 11.009819240762736], [-0.761575893548183, 10.936929633015053], [-0.438701544588582, 11.09834096927872], [0.023802524423701, 11.018681748900802], [-0.049784715159944, 10.706917832883928], [0.367579990245389, 10.191212876827176], [0.365900506195885, 9.46500397382948], [0.461191847342121, 8.677222601756013], [0.712029249686878, 8.312464504423827], [0.490957472342245, 7.411744289576474], [0.570384148774849, 6.914358628767188], [0.836931186536333, 6.279978745952147], [1.060121697604927, 5.928837388528875]]] } }, - { "type": "Feature", "properties": { "admin": "Guinea", "name": "Guinea", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-8.439298468448696, 7.686042792181736], [-8.722123582382123, 7.711674302598509], [-8.926064622422002, 7.309037380396375], [-9.208786383490844, 7.313920803247952], [-9.403348151069748, 7.526905218938906], [-9.33727983238458, 7.928534450711351], [-9.755342169625832, 8.541055202666923], [-10.016566534861253, 8.42850393313523], [-10.230093553091276, 8.406205552601291], [-10.505477260774667, 8.348896389189603], [-10.494315151399629, 8.715540676300433], [-10.65477047366589, 8.977178452994194], [-10.622395188835037, 9.267910061068276], [-10.839151984083299, 9.688246161330367], [-11.117481248407328, 10.045872911006283], [-11.917277390988655, 10.046983954300556], [-12.150338100625003, 9.858571682164378], [-12.425928514037562, 9.835834051955953], [-12.596719122762206, 9.620188300001969], [-12.711957566773076, 9.342711696810765], [-13.246550258832512, 8.903048610871506], [-13.685153977909788, 9.494743760613458], [-14.074044969122278, 9.886166897008248], [-14.330075852912367, 10.015719712763966], [-14.579698859098254, 10.214467271358513], [-14.693231980843501, 10.65630076745404], [-14.83955379887794, 10.876571560098139], [-15.130311245168167, 11.040411688679525], [-14.685687221728896, 11.527823798056485], [-14.382191534878727, 11.509271958863691], [-14.121406419317776, 11.677117010947693], [-13.900799729863772, 11.678718980348744], [-13.743160773157411, 11.811269029177408], [-13.828271857142122, 12.142644151249041], [-13.718743658899511, 12.247185573775507], [-13.700476040084322, 12.586182969610192], [-13.217818162478235, 12.575873521367964], [-12.499050665730561, 12.332089952031053], [-12.278599005573438, 12.354440008997285], [-12.20356482588563, 12.465647691289401], [-11.658300950557928, 12.386582749882834], [-11.513942836950587, 12.442987575729415], [-11.456168585648269, 12.076834214725336], [-11.297573614944508, 12.077971096235768], [-11.036555955438256, 12.211244615116513], [-10.870829637078211, 12.177887478072106], [-10.593223842806278, 11.923975328005977], [-10.165213792348835, 11.844083563682743], [-9.890992804392011, 12.060478623904968], [-9.567911749703212, 12.194243068892472], [-9.327616339546008, 12.334286200403451], [-9.127473517279581, 12.308060411015331], [-8.905264858424529, 12.088358059126433], [-8.786099005559462, 11.812560939984705], [-8.376304897484911, 11.393645941610627], [-8.581305304386772, 11.136245632364801], [-8.620321010767126, 10.810890814655181], [-8.407310756860026, 10.90925690352276], [-8.282357143578279, 10.792597357623842], [-8.335377163109738, 10.494811916541932], [-8.029943610048617, 10.206534939001711], [-8.22933712404682, 10.129020290563897], [-8.309616461612249, 9.789531968622439], [-8.079113735374348, 9.376223863152033], [-7.832100389019186, 8.575704250518625], [-8.203498907900878, 8.455453192575446], [-8.299048631208562, 8.316443589710302], [-8.221792364932197, 8.123328762235571], [-8.280703497744936, 7.687179673692156], [-8.439298468448696, 7.686042792181736]]] } }, - { "type": "Feature", "properties": { "admin": "Gambia", "name": "Gambia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-16.84152462408127, 13.151393947802557], [-16.713728807023468, 13.594958604379853], [-15.624596320039936, 13.623587347869556], [-15.398770310924457, 13.860368760630916], [-15.081735398813816, 13.876491807505982], [-14.687030808968483, 13.63035696049978], [-14.376713833055785, 13.625680243377371], [-14.046992356817478, 13.794067898000446], [-13.844963344772404, 13.505041612191999], [-14.277701788784553, 13.28058502853224], [-14.712197231494626, 13.298206691943774], [-15.141163295949463, 13.509511623585235], [-15.511812506562931, 13.278569647672864], [-15.691000535534991, 13.270353094938455], [-15.931295945692208, 13.130284125211331], [-16.84152462408127, 13.151393947802557]]] } }, - { "type": "Feature", "properties": { "admin": "Guinea Bissau", "name": "Guinea-Bissau", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-15.130311245168167, 11.040411688679525], [-15.664180467175523, 11.458474025920792], [-16.085214199273562, 11.524594021038236], [-16.314786749730199, 11.806514797406548], [-16.308947312881227, 11.958701890506116], [-16.613838263403277, 12.170911159712698], [-16.67745195155457, 12.38485158940105], [-16.147716844130581, 12.547761542201185], [-15.816574266004251, 12.515567124883345], [-15.548476935274005, 12.628170070847343], [-13.700476040084322, 12.586182969610192], [-13.718743658899511, 12.247185573775507], [-13.828271857142122, 12.142644151249041], [-13.743160773157411, 11.811269029177408], [-13.900799729863772, 11.678718980348744], [-14.121406419317776, 11.677117010947693], [-14.382191534878727, 11.509271958863691], [-14.685687221728896, 11.527823798056485], [-15.130311245168167, 11.040411688679525]]] } }, - { "type": "Feature", "properties": { "admin": "Equatorial Guinea", "name": "Eq. Guinea", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[9.492888624721981, 1.010119533691494], [9.305613234096255, 1.160911363119183], [9.649158155972627, 2.283866075037735], [11.276449008843711, 2.261050930180871], [11.285078973036461, 1.057661851400013], [9.83028405115564, 1.067893784993799], [9.492888624721981, 1.010119533691494]]] } }, - { "type": "Feature", "properties": { "admin": "Greece", "name": "Greece", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[23.699980096133, 35.705004380835526], [24.246665073348673, 35.368022365860149], [25.025015496528873, 35.424995632461979], [25.769207797964182, 35.354018052709073], [25.745023227651579, 35.179997666966209], [26.290002882601719, 35.299990342747911], [26.164997592887651, 35.004995429009789], [24.724982130642299, 34.919987697889603], [24.735007358506941, 35.084990546197581], [23.514978468528106, 35.27999156345097], [23.699980096133, 35.705004380835526]]], [[[26.604195590936282, 41.562114569661098], [26.294602085075777, 40.936261298174244], [26.056942172965499, 40.824123440100827], [25.44767703624418, 40.852545477861455], [24.925848422960932, 40.947061672523226], [23.714811232200809, 40.687129218095116], [24.407998894964063, 40.124992987624083], [23.89996788910258, 39.962005520175573], [23.342999301860797, 39.960997829745786], [22.813987664488959, 40.476005153966547], [22.626298862404777, 40.256561184239175], [22.849747755634805, 39.659310818025759], [23.350027296652595, 39.190011298167256], [22.97309939951554, 38.97090322524965], [23.53001631032495, 38.51000112563846], [24.025024855248937, 38.219992987616443], [24.040011020613601, 37.655014553369419], [23.115002882589145, 37.920011298162215], [23.409971958111065, 37.409990749657389], [22.77497195810863, 37.305010077456551], [23.154225294698612, 36.422505804992042], [22.4900281104511, 36.410000108377446], [21.670026482843692, 36.84498647719419], [21.295010613701574, 37.644989325504689], [21.120034213961329, 38.31032339126272], [20.730032179454579, 38.769985256498778], [20.217712029712853, 39.340234686839629], [20.150015903410516, 39.624997666984022], [20.615000441172779, 40.110006822259422], [20.67499677906363, 40.434999904943048], [20.999989861747274, 40.580003973953964], [21.020040317476422, 40.842726955725873], [21.674160597426969, 40.931274522457976], [22.055377638444266, 41.149865831052686], [22.597308383889008, 41.130487168943198], [22.76177, 41.3048], [22.952377150166562, 41.337993882811212], [23.692073601992455, 41.309080918943849], [24.492644891058031, 41.583896185872035], [25.19720136892553, 41.234485988930651], [26.106138136507177, 41.328898830727823], [26.11704186372091, 41.826904608724725], [26.604195590936282, 41.562114569661098]]]] } }, - { "type": "Feature", "properties": { "admin": "Greenland", "name": "Greenland", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-46.76379, 82.62796], [-43.40644, 83.22516], [-39.89753, 83.18018], [-38.62214, 83.54905], [-35.08787, 83.64513], [-27.10046, 83.51966], [-20.84539, 82.72669], [-22.69182, 82.34165], [-26.51753, 82.29765], [-31.9, 82.2], [-31.39646, 82.02154], [-27.85666, 82.13178], [-24.84448, 81.78697], [-22.90328, 82.09317], [-22.07175, 81.73449], [-23.16961, 81.15271], [-20.62363, 81.52462], [-15.76818, 81.91245], [-12.77018, 81.71885], [-12.20855, 81.29154], [-16.28533, 80.58004], [-16.85, 80.35], [-20.04624, 80.17708], [-17.73035, 80.12912], [-18.9, 79.4], [-19.70499, 78.75128], [-19.67353, 77.63859], [-18.47285, 76.98565], [-20.03503, 76.94434], [-21.67944, 76.62795], [-19.83407, 76.09808], [-19.59896, 75.24838], [-20.66818, 75.15585], [-19.37281, 74.29561], [-21.59422, 74.22382], [-20.43454, 73.81713], [-20.76234, 73.46436], [-22.17221, 73.30955], [-23.56593, 73.30663], [-22.31311, 72.62928], [-22.29954, 72.18409], [-24.27834, 72.59788], [-24.79296, 72.3302], [-23.44296, 72.08016], [-22.13281, 71.46898], [-21.75356, 70.66369], [-23.53603, 70.471], [-24.30702, 70.85649], [-25.54341, 71.43094], [-25.20135, 70.75226], [-26.36276, 70.22646], [-23.72742, 70.18401], [-22.34902, 70.12946], [-25.02927, 69.2588], [-27.74737, 68.47046], [-30.67371, 68.12503], [-31.77665, 68.12078], [-32.81105, 67.73547], [-34.20196, 66.67974], [-36.35284, 65.9789], [-37.04378, 65.93768], [-38.37505, 65.69213], [-39.81222, 65.45848], [-40.66899, 64.83997], [-40.68281, 64.13902], [-41.1887, 63.48246], [-42.81938, 62.68233], [-42.41666, 61.90093], [-42.86619, 61.07404], [-43.3784, 60.09772], [-44.7875, 60.03676], [-46.26364, 60.85328], [-48.26294, 60.85843], [-49.23308, 61.40681], [-49.90039, 62.38336], [-51.63325, 63.62691], [-52.14014, 64.27842], [-52.27659, 65.1767], [-53.66166, 66.09957], [-53.30161, 66.8365], [-53.96911, 67.18899], [-52.9804, 68.35759], [-51.47536, 68.72958], [-51.08041, 69.14781], [-50.87122, 69.9291], [-52.013585, 69.574925], [-52.55792, 69.42616], [-53.45629, 69.283625], [-54.68336, 69.61003], [-54.75001, 70.28932], [-54.35884, 70.821315], [-53.431315, 70.835755], [-51.39014, 70.56978], [-53.10937, 71.20485], [-54.00422, 71.54719], [-55.0, 71.406536967272558], [-55.83468, 71.65444], [-54.71819, 72.58625], [-55.32634, 72.95861], [-56.12003, 73.64977], [-57.32363, 74.71026], [-58.59679, 75.09861], [-58.58516, 75.51727], [-61.26861, 76.10238], [-63.39165, 76.1752], [-66.06427, 76.13486], [-68.50438, 76.06141], [-69.66485, 76.37975], [-71.40257, 77.00857], [-68.77671, 77.32312], [-66.76397, 77.37595], [-71.04293, 77.63595], [-73.297, 78.04419], [-73.15938, 78.43271], [-69.37345, 78.91388], [-65.7107, 79.39436], [-65.3239, 79.75814], [-68.02298, 80.11721], [-67.15129, 80.51582], [-63.68925, 81.21396], [-62.23444, 81.3211], [-62.65116, 81.77042], [-60.28249, 82.03363], [-57.20744, 82.19074], [-54.13442, 82.19962], [-53.04328, 81.88833], [-50.39061, 82.43883], [-48.00386, 82.06481], [-46.59984, 81.985945], [-44.523, 81.6607], [-46.9007, 82.19979], [-46.76379, 82.62796]]] } }, - { "type": "Feature", "properties": { "admin": "Guatemala", "name": "Guatemala", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-90.095554572290951, 13.73533763270073], [-90.608624030300817, 13.909771429901948], [-91.232410244496037, 13.927832342987953], [-91.689746670279106, 14.126218166556452], [-92.227750006869812, 14.538828640190925], [-92.203229539747298, 14.830102850804066], [-92.087215949252041, 15.064584662328436], [-92.229248623406249, 15.251446641495857], [-91.747960171255912, 16.066564846251719], [-90.464472622422647, 16.069562079324651], [-90.438866950222021, 16.410109768128091], [-90.600846727240906, 16.470777899638758], [-90.711821865587694, 16.687483018454724], [-91.081670091500641, 16.918476670799404], [-91.453921271515128, 17.252177232324168], [-91.002269253284197, 17.254657701074176], [-91.001519945015943, 17.817594916245707], [-90.067933519230948, 17.819326076727474], [-89.143080410503302, 17.808318996649316], [-89.15080603713092, 17.015576687075832], [-89.229121670269265, 15.886937567605166], [-88.930612759135244, 15.887273464415072], [-88.604586147805833, 15.706380113177358], [-88.518364020526846, 15.855389105690971], [-88.22502275262201, 15.727722479713901], [-88.680679694355618, 15.346247056535301], [-89.15481096063354, 15.066419175674806], [-89.225220099631244, 14.874286200413618], [-89.145535041037149, 14.67801911056908], [-89.353325975282772, 14.424132798719112], [-89.587342698916544, 14.362586167859485], [-89.5342193265205, 14.244815578666302], [-89.7219339668207, 14.134228013561694], [-90.064677903996568, 13.881969509328924], [-90.095554572290951, 13.73533763270073]]] } }, - { "type": "Feature", "properties": { "admin": "Guyana", "name": "Guyana", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-59.758284878159181, 8.367034816924045], [-59.10168412945864, 7.99920197187049], [-58.482962205628041, 7.347691351750696], [-58.454876064677414, 6.832787380394463], [-58.078103196837361, 6.809093736188641], [-57.542218593970631, 6.321268215353355], [-57.147436489476874, 5.973149929219161], [-57.307245856339492, 5.073566595882225], [-57.914288906472123, 4.812626451024413], [-57.860209520078691, 4.576801052260449], [-58.044694383360664, 4.060863552258382], [-57.601568976457848, 3.334654649260684], [-57.281433478409703, 3.333491929534119], [-57.150097825739898, 2.768926906745406], [-56.53938574891454, 1.89952260986692], [-56.782704230360814, 1.863710842288653], [-57.33582292339689, 1.948537705895759], [-57.660971035377358, 1.682584947105638], [-58.113449876525003, 1.507195135907025], [-58.429477098205957, 1.46394196207872], [-58.540012986878288, 1.26808828369252], [-59.030861579002639, 1.317697658692722], [-59.646043667221242, 1.786893825686789], [-59.718545701726732, 2.249630438644359], [-59.974524909084543, 2.755232652188055], [-59.815413174057852, 3.606498521332085], [-59.538039923731219, 3.958802598481937], [-59.767405768458701, 4.423502915866606], [-60.111002366767373, 4.574966538914082], [-59.980958624904865, 5.014061184098138], [-60.213683437731319, 5.2444863956876], [-60.733574184803707, 5.2002772078619], [-61.410302903881941, 5.959068101419616], [-61.139415045807937, 6.234296779806142], [-61.159336310456467, 6.696077378766317], [-60.543999192940966, 6.856584377464881], [-60.295668097562377, 7.043911444522918], [-60.637972785063752, 7.414999904810853], [-60.550587938058186, 7.779602972846178], [-59.758284878159181, 8.367034816924045]]] } }, - { "type": "Feature", "properties": { "admin": "Honduras", "name": "Honduras", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-87.316654425795463, 12.984685777229], [-87.48940873894712, 13.29753489832393], [-87.793111131526501, 13.384480495655165], [-87.723502977229288, 13.785050360565602], [-87.859515347021599, 13.893312486217097], [-88.065342576840109, 13.964625962779788], [-88.503997972349609, 13.845485948130939], [-88.541230841815931, 13.98015473068352], [-88.843072882832743, 14.140506700085208], [-89.058511929057644, 14.340029405164213], [-89.353325975282786, 14.424132798719084], [-89.145535041037164, 14.678019110569149], [-89.22522009963123, 14.874286200413675], [-89.154810960633526, 15.066419175674863], [-88.680679694355575, 15.346247056535386], [-88.225022752621925, 15.727722479714027], [-88.121153123715359, 15.688655096901355], [-87.901812506852394, 15.864458319558194], [-87.615680101252309, 15.878798529519198], [-87.522920905288444, 15.797278957578779], [-87.367762417332116, 15.846940009011286], [-86.903191291028165, 15.756712958229565], [-86.440945604177372, 15.782835394753189], [-86.119233974944322, 15.893448798073958], [-86.00195431185783, 16.005405788634388], [-85.68331743034625, 15.953651841693949], [-85.444003872402547, 15.885749009662444], [-85.182443610357183, 15.909158433490628], [-84.98372188997881, 15.995923163308698], [-84.526979743167118, 15.857223619037423], [-84.36825558138257, 15.835157782448729], [-84.063054572266807, 15.648244126849132], [-83.773976610026111, 15.42407176356687], [-83.410381232420363, 15.27090281825377], [-83.147219000974104, 14.995829169164207], [-83.489988776366005, 15.01626719813566], [-83.628584967772866, 14.880073960830368], [-83.975721401693576, 14.749435939996483], [-84.228341640952394, 14.748764146376626], [-84.449335903648588, 14.62161428472251], [-84.64958207877963, 14.666805324761865], [-84.820036790694289, 14.819586696832628], [-84.924500698572302, 14.790492865452332], [-85.052787441736868, 14.551541042534719], [-85.148750576502877, 14.560196844943615], [-85.165364549484806, 14.354369615125048], [-85.514413011400265, 14.079011745657905], [-85.698665330736944, 13.960078436737998], [-85.801294725268505, 13.8360549992376], [-86.096263800790595, 14.03818736414723], [-86.312142096689826, 13.771356106008223], [-86.520708177419891, 13.778487453664464], [-86.755086636079596, 13.754845485890936], [-86.733821784191463, 13.263092556201398], [-86.880557013684353, 13.254204209847213], [-87.005769009127434, 13.025794379117254], [-87.316654425795463, 12.984685777229]]] } }, - { "type": "Feature", "properties": { "admin": "Croatia", "name": "Croatia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[18.829838087650039, 45.908877671891837], [19.072768995854172, 45.521511135432078], [19.390475701584588, 45.236515611342369], [19.005486281010118, 44.860233669609144], [18.553214145591646, 45.08158966733145], [17.861783481526398, 45.067740383477137], [17.00214603035101, 45.233776760430935], [16.534939406000202, 45.211607570977705], [16.318156772535868, 45.004126695325901], [15.959367303133373, 45.233776760430935], [15.750026075918978, 44.81871165626255], [16.239660271884528, 44.351143296885695], [16.456442905348862, 44.041239732431265], [16.916156447017325, 43.667722479825663], [17.297373488034449, 43.446340643887353], [17.674921502358981, 43.028562527023603], [18.56, 42.65], [18.450016310304814, 42.47999136002931], [17.509970330483323, 42.84999461523914], [16.930005730871638, 43.209998480800373], [16.015384555737679, 43.507215481127204], [15.174453973052094, 44.243191229827907], [15.376250441151793, 44.317915350922064], [14.920309279040504, 44.73848399512945], [14.901602410550874, 45.076060289076104], [14.258747592839992, 45.233776760430935], [13.952254672917032, 44.802123521496853], [13.65697553880119, 45.136935126315947], [13.679403110415816, 45.484149074884996], [13.715059848697248, 45.500323798192419], [14.411968214585496, 45.466165676447403], [14.595109490627916, 45.63494090431282], [14.935243767972961, 45.471695054702757], [15.327674594797424, 45.452316392593325], [15.323953891672428, 45.731782538427687], [15.671529575267638, 45.8341535507979], [15.768732944408608, 46.23810822202352], [16.564808383864939, 46.503750922219794], [16.882515089595412, 46.380631822284428], [17.630066359129554, 45.951769110694087], [18.456062452882858, 45.759481106136143], [18.829838087650039, 45.908877671891837]]] } }, - { "type": "Feature", "properties": { "admin": "Haiti", "name": "Haiti", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-73.189790615517595, 19.915683905511909], [-72.579672817663607, 19.871500555902351], [-71.71236141629295, 19.714455878167353], [-71.624873216422813, 19.169837958243303], [-71.701302659782485, 18.785416978424049], [-71.945112067335543, 18.616900132720257], [-71.687737596305865, 18.316660061104468], [-71.708304816358037, 18.044997056546091], [-72.372476162389333, 18.214960842354053], [-72.844411180294856, 18.145611070218362], [-73.454554816365018, 18.217906398994696], [-73.922433234335642, 18.030992743395], [-74.458033616824764, 18.342549953682703], [-74.369925299767118, 18.664907538319408], [-73.449542202432696, 18.526052964751141], [-72.694937099890623, 18.445799465401858], [-72.334881557896992, 18.66842153571525], [-72.791649542924873, 19.101625067618027], [-72.784104783810264, 19.483591416903405], [-73.41502234566174, 19.639550889560276], [-73.189790615517595, 19.915683905511909]]] } }, - { "type": "Feature", "properties": { "admin": "Hungary", "name": "Hungary", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[16.202298211337361, 46.852385972676949], [16.534267612380372, 47.496170966169103], [16.340584344150411, 47.712901923201215], [16.903754103267257, 47.714865627628321], [16.979666782304033, 48.123497015976298], [17.488472934649813, 47.867466132186209], [17.857132602620023, 47.758428860050365], [18.696512892336923, 47.88095368101439], [18.777024773847668, 48.081768296900627], [19.174364861739885, 48.111378892603859], [19.66136355965849, 48.266614895208647], [19.769470656013109, 48.2026911484636], [20.239054396249344, 48.327567247096916], [20.473562045989862, 48.562850043321809], [20.801293979584919, 48.62385407164237], [21.872236362401729, 48.319970811550007], [22.085608351334848, 48.422264309271782], [22.640819939878746, 48.150239569687351], [22.710531447040488, 47.882193915389394], [22.09976769378283, 47.672439276716695], [21.626514926853869, 46.994237779318148], [21.021952345471245, 46.316087958351886], [20.220192498462833, 46.127468980486547], [19.596044549241579, 46.171729844744533], [18.829838087649957, 45.908877671891915], [18.456062452882858, 45.759481106136121], [17.630066359129554, 45.95176911069418], [16.882515089595298, 46.380631822284428], [16.564808383864854, 46.503750922219822], [16.370504998447412, 46.841327216166498], [16.202298211337361, 46.852385972676949]]] } }, - { "type": "Feature", "properties": { "admin": "Indonesia", "name": "Indonesia", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[120.715608758630438, -10.239581394087862], [120.295014276206871, -10.258649997603525], [118.967808465654684, -9.55796925215803], [119.900309686361609, -9.361340427287514], [120.425755649905398, -9.665921319215796], [120.775501743656719, -9.969675388227456], [120.715608758630438, -10.239581394087862]]], [[[124.435950148619384, -10.14000090906144], [123.579981724136701, -10.359987481327961], [123.459989048354998, -10.239994805546171], [123.55000939340745, -9.900015557497978], [123.980008986508096, -9.290026950724693], [124.96868248911619, -8.892790215697046], [125.070019972840612, -9.089987481322835], [125.088520135601073, -9.393173109579321], [124.435950148619384, -10.14000090906144]]], [[[117.900018345207741, -8.095681247594923], [118.260616489740471, -8.362383314653327], [118.87845991422212, -8.280682875199828], [119.126506789223086, -8.705824883665072], [117.97040164598927, -8.906639499551257], [117.277730747549015, -9.040894870645557], [116.74014082241662, -9.032936700072637], [117.083737420725313, -8.457157891476539], [117.632024367342126, -8.44930307376819], [117.900018345207741, -8.095681247594923]]], [[[122.903537225436082, -8.094234307490735], [122.756982863456287, -8.649807631060638], [121.2544905945701, -8.933666273639941], [119.924390903809567, -8.810417982623873], [119.920928582846102, -8.44485890059107], [120.715091994307542, -8.236964613480863], [121.341668735846554, -8.53673959720602], [122.007364536630405, -8.46062021244016], [122.903537225436082, -8.094234307490735]]], [[[108.623478631628927, -6.777673841990675], [110.539227329553285, -6.877357679881682], [110.759575636845909, -6.465186455921751], [112.614811232556349, -6.946035658397589], [112.978768345188087, -7.594213148634578], [114.478935174621142, -7.776527601760277], [115.705526971501058, -8.370806573116864], [114.564511346496488, -8.75181690840483], [113.464733514460875, -8.348947442257424], [112.559672479301028, -8.376180922075163], [111.522061395312448, -8.302128594600957], [110.586149530074294, -8.122604668819021], [109.427667270955183, -7.740664157749761], [108.693655226681301, -7.641600437046219], [108.277763299596302, -7.766657403192579], [106.454102004016136, -7.354899590690947], [106.280624220812285, -6.924899997590201], [105.365486281355516, -6.851416110871169], [106.051645949327053, -5.895918877794499], [107.265008579540165, -5.954985039904058], [108.072091099074683, -6.345762220895237], [108.486846144649235, -6.421984958525768], [108.623478631628927, -6.777673841990675]]], [[[134.724624465066654, -6.214400730009286], [134.210133905168902, -6.895237725454704], [134.112775506730998, -6.142467136259014], [134.290335728085779, -5.783057549669038], [134.499625278867882, -5.445042006047898], [134.727001580952106, -5.737582289252158], [134.724624465066654, -6.214400730009286]]], [[[127.249215122588893, -3.459065036638889], [126.874922723498855, -3.790982761249579], [126.183802118027302, -3.607376397316556], [125.989033644719257, -3.177273451351325], [127.00065148326496, -3.12931772218441], [127.249215122588893, -3.459065036638889]]], [[[130.471344028851775, -3.09376433676762], [130.834836053592767, -3.858472181822761], [129.990546502808115, -3.446300957862817], [129.155248651242403, -3.362636813982248], [128.590683628453633, -3.428679294451256], [127.898891229362334, -3.393435967628192], [128.135879347852779, -2.843650404474914], [129.370997756060888, -2.802154229344551], [130.471344028851775, -3.09376433676762]]], [[[134.143367954647772, -1.151867364103594], [134.422627394753022, -2.769184665542383], [135.457602980694674, -3.367752780779113], [136.293314243718754, -2.30704233155609], [137.4407377463275, -1.703513278819372], [138.329727411044757, -1.70268645590265], [139.18492068904294, -2.051295668143637], [139.926684198160387, -2.409051608900284], [141.000210402591847, -2.600151055515624], [141.017056919519007, -5.85902190513802], [141.033851760013874, -9.117892754760417], [140.143415155192542, -8.297167657100955], [139.127766554928087, -8.096042982620942], [138.881476678624949, -8.380935153846094], [137.614473911692812, -8.41168263105976], [138.039099155835174, -7.597882175327354], [138.668621454014783, -7.320224704623072], [138.407913853102343, -6.232849216337483], [137.927839797110835, -5.393365573755998], [135.989250116113453, -4.546543877789047], [135.164597609599667, -4.462931410340771], [133.662880487197867, -3.538853448097526], [133.367704705946778, -4.024818617370314], [132.983955519747326, -4.112978610860281], [132.75694095268895, -3.746282647317129], [132.753788690319197, -3.311787204607071], [131.989804315316178, -2.820551039240455], [133.066844517143466, -2.460417982598443], [133.780030959203486, -2.479848321140209], [133.69621178602614, -2.214541517753687], [132.232373488494204, -2.212526136894325], [131.836221958544684, -1.617161960459597], [130.942839797082797, -1.432522067880796], [130.519558140180038, -0.937720228686075], [131.867537876513609, -0.695461114101818], [132.380116408416768, -0.369537855636977], [133.985548130428384, -0.780210463060442], [134.143367954647772, -1.151867364103594]]], [[[125.240500522971573, 1.419836127117605], [124.43703535369734, 0.427881171058971], [123.685504998876695, 0.235593166500877], [122.723083123872854, 0.431136786293337], [121.056724888189081, 0.381217352699451], [120.18308312386273, 0.23724681233422], [120.040869582195455, -0.519657891444851], [120.935905389490699, -1.408905938323372], [121.475820754076167, -0.955962009285116], [123.34056481332847, -0.615672702643081], [123.258399285984481, -1.076213067228337], [122.822715285331597, -0.930950616055881], [122.388529901215364, -1.516858005381124], [121.508273553555455, -1.904482924002422], [122.454572381684272, -3.186058444840881], [122.271896193532541, -3.529500013852696], [123.170962762546537, -4.683693129091707], [123.162332798353759, -5.34060393638596], [122.628515252778683, -5.634591159694494], [122.236394484548057, -5.282933037948281], [122.71956912647704, -4.46417164471579], [121.738233677254357, -4.851331475446499], [121.48946333220124, -4.574552504091215], [121.619171177253861, -4.188477878438674], [120.898181593917684, -3.602105401222828], [120.972388950688767, -2.627642917494909], [120.305452915529884, -2.931603692235725], [120.39004723519173, -4.097579034037223], [120.430716587405371, -5.528241062037778], [119.796543410319487, -5.67340016034565], [119.36690555224493, -5.379878024927804], [119.653606398600104, -4.459417412944958], [119.498835483885969, -3.49441171632651], [119.078344354326987, -3.487021986508764], [118.767768996252869, -2.801999200047688], [119.180973748858662, -2.147103773612798], [119.323393996255049, -1.35314706788047], [119.825998976725828, 0.154254462073496], [120.035701938966341, 0.566477362465804], [120.885779250167687, 1.309222723796835], [121.666816847826965, 1.013943589681076], [122.927566766451818, 0.875192368977465], [124.077522414242836, 0.917101955566139], [125.065989211121803, 1.643259182131558], [125.240500522971573, 1.419836127117605]]], [[[128.688248732620707, 1.132385972494106], [128.635952183141342, 0.258485826006179], [128.120169712436166, 0.356412665199286], [127.968034295768845, -0.252077325037533], [128.379998813999691, -0.780003757331286], [128.100015903842291, -0.899996433112974], [127.69647464407501, -0.266598402511505], [127.399490187693743, 1.011721503092573], [127.600511509309044, 1.81069082275718], [127.932377557487484, 2.174596258956555], [128.004156121940809, 1.628531398928331], [128.594559360875451, 1.540810655112864], [128.688248732620707, 1.132385972494106]]], [[[117.875627069166001, 1.827640692548911], [118.996747267738158, 0.902219143066048], [117.811858351717788, 0.784241848143722], [117.478338657706047, 0.102474676917026], [117.521643507966587, -0.803723239753211], [116.560048455879496, -1.487660821136231], [116.533796828275158, -2.483517347832901], [116.148083937648607, -4.012726332214014], [116.000857782049067, -3.657037448749008], [114.864803094544513, -4.106984144714416], [114.468651564595064, -3.49570362713382], [113.755671828264099, -3.439169610206519], [113.256994256647545, -3.118775729996854], [112.068126255340644, -3.478392022316071], [111.703290643359992, -2.994442233902631], [111.04824018762821, -3.049425957861188], [110.223846063275971, -2.934032484553483], [110.070935500124335, -1.592874037282414], [109.571947869914041, -1.314906507984489], [109.091873813922518, -0.459506524257051], [108.952657505328162, 0.415375474444346], [109.069136183714036, 1.341933905437642], [109.663260125773718, 2.006466986494984], [109.830226678508836, 1.338135687664191], [110.514060907027101, 0.773131415200993], [111.159137811326559, 0.976478176269509], [111.797548455860408, 0.904441229654651], [112.380251906383648, 1.410120957846757], [112.859809198052176, 1.497790025229946], [113.805849644019531, 1.217548732911041], [114.621355422017473, 1.430688177898886], [115.134037306785231, 2.821481838386219], [115.51907840379198, 3.169238389494395], [115.86551720587677, 4.306559149590156], [117.01521447150634, 4.306094061699468], [117.882034946770162, 4.137551377779487], [117.313232456533513, 3.234428208830578], [118.048329705885351, 2.287690131027361], [117.875627069166001, 1.827640692548911]]], [[[105.817655063909356, -5.852355645372411], [104.710384149191498, -5.873284600450644], [103.868213332130736, -5.037314955264974], [102.584260695406897, -4.220258884298203], [102.156173130300999, -3.614146009946765], [101.399113397225051, -2.799777113459171], [100.902502882900137, -2.05026213949786], [100.141980828860596, -0.650347588710957], [99.26373986206022, 0.183141587724663], [98.970011020913319, 1.042882391764536], [98.601351352943084, 1.823506577965616], [97.699597609449881, 2.453183905442116], [97.17694217324987, 3.30879059489861], [96.424016554757316, 3.86885976807791], [95.380876092513475, 4.970782172053673], [95.293026157617305, 5.479820868344816], [95.936862827541745, 5.439513251157108], [97.484882033277088, 5.24632090903401], [98.369169142655679, 4.268370266126366], [99.142558628335792, 3.590349636240915], [99.693997837322399, 3.174328518075156], [100.641433546961665, 2.099381211755798], [101.658012323007313, 2.083697414555189], [102.498271112073212, 1.398700466310217], [103.076840448013002, 0.561361395668854], [103.838396030698348, 0.104541734208666], [103.437645298274973, -0.711945896002845], [104.010788608824001, -1.059211521004229], [104.369991489684878, -1.084843031421016], [104.539490187602155, -1.782371514496716], [104.887892694113987, -2.340425306816655], [105.622111444116982, -2.42884368246807], [106.10859337771268, -3.06177662517895], [105.857445916774111, -4.305524997579723], [105.817655063909356, -5.852355645372411]]]] } }, - { "type": "Feature", "properties": { "admin": "India", "name": "India", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[77.837450799474553, 35.494009507787759], [78.912268914713209, 34.321936346975782], [78.811086460285722, 33.506198025032404], [79.208891636068572, 32.994394639613709], [79.176128777995501, 32.483779812137705], [78.458446486325997, 32.61816437431272], [78.738894484374001, 31.515906073527056], [79.721366815107089, 30.882714748654724], [81.11125613802929, 30.183480943313398], [80.476721225917373, 29.729865220655334], [80.088424513676259, 28.794470119740136], [81.057202589851997, 28.416095282499036], [81.999987420584958, 27.925479234319987], [83.304248895199535, 27.364505723575554], [84.675017938173767, 27.234901231387528], [85.25177859898335, 26.726198431906337], [86.024392938179147, 26.630984605408567], [87.22747195836628, 26.39789805755607], [88.060237664749806, 26.414615383402484], [88.174804315140904, 26.810405178325944], [88.043132765661198, 27.445818589786818], [88.120440708369841, 27.876541652939586], [88.730325962278528, 28.086864732367509], [88.814248488320544, 27.299315904239361], [88.835642531289366, 27.098966376243755], [89.744527622438838, 26.71940298105995], [90.37327477413406, 26.875724188742872], [91.217512648486405, 26.808648179628019], [92.033483514375078, 26.838310451763554], [92.10371178585973, 27.4526140406332], [91.69665652869665, 27.771741848251661], [92.503118931043616, 27.896876329046442], [93.413347609432662, 28.640629380807219], [94.565990431702929, 29.277438055939978], [95.404802280664612, 29.031716620392125], [96.117678664131006, 29.452802028922459], [96.586590610747479, 28.830979519154337], [96.248833449287758, 28.411030992134435], [97.327113885490007, 28.261582749946331], [97.402561476636123, 27.88253611908544], [97.051988559968066, 27.699058946233144], [97.133999058015277, 27.08377350514996], [96.419365675850941, 27.264589341739221], [95.124767694074933, 26.573572089132295], [95.155153436262566, 26.001307277932078], [94.603249139385355, 25.162495428970399], [94.552657912171611, 24.675238348890328], [94.106741977925054, 23.850740871673477], [93.325187615942767, 24.078556423432197], [93.286326938859247, 23.043658352138998], [93.060294224014598, 22.703110663335565], [93.166127557348361, 22.278459580977099], [92.672720981825549, 22.041238918541247], [92.146034783906799, 23.62749868417259], [91.869927606171302, 23.62434642180278], [91.706475050832083, 22.985263983649183], [91.158963250699713, 23.503526923104381], [91.467729933643668, 24.072639471934789], [91.915092807994398, 24.130413723237108], [92.376201613334786, 24.976692816664961], [91.799595981822065, 25.14743174895731], [90.872210727912105, 25.13260061288954], [89.920692580121838, 25.269749864192171], [89.832480910199592, 25.965082098895476], [89.355094028687276, 26.014407253518065], [88.56304935094974, 26.446525580342716], [88.209789259802477, 25.768065700782707], [88.931553989623069, 25.238692328384769], [88.30637251175601, 24.866079413344199], [88.084422235062405, 24.501657212821918], [88.699940220090895, 24.233714911388557], [88.529769728553759, 23.631141872649163], [88.876311883503064, 22.879146429937826], [89.031961297566198, 22.055708319582973], [88.888765903685396, 21.690588487224741], [88.208497348995209, 21.703171698487804], [86.975704380240259, 21.495561631755201], [87.033168572948853, 20.743307806882406], [86.499351027373777, 20.151638495356604], [85.060265740909671, 19.478578802971096], [83.941005893899998, 18.302009792549722], [83.189217156917834, 17.671221421778977], [82.192792189465905, 17.016636053937813], [82.191241896497175, 16.556664130107844], [81.692719354177456, 16.3102192245079], [80.791999139330116, 15.951972357644488], [80.324895867843864, 15.899184882058346], [80.025069207686428, 15.136414903214144], [80.23327355339039, 13.835770778859978], [80.286293572921849, 13.006260687710832], [79.862546828128487, 12.056215318240886], [79.85799930208681, 10.357275091997108], [79.340511509115984, 10.308854274939618], [78.885345493489169, 9.54613597252772], [79.189719679688281, 9.216543687370146], [78.27794070833049, 8.933046779816932], [77.94116539908434, 8.25295909263974], [77.539897902337927, 7.965534776232331], [76.592978957021657, 8.899276231314188], [76.130061476551063, 10.299630031775518], [75.746467319648488, 11.308250637248303], [75.396101108709573, 11.781245022015822], [74.864815708316812, 12.741935736537895], [74.616717156883524, 13.992582912649677], [74.443859490867197, 14.617221787977693], [73.534199253233368, 15.990652167214957], [73.119909295549419, 17.928570054592495], [72.820909458308634, 19.208233547436162], [72.824475132136783, 20.41950328214153], [72.630533481745388, 21.356009426351001], [71.175273471973938, 20.757441311114228], [70.470458611945091, 20.877330634031381], [69.164130080038817, 22.089298000572697], [69.644927606082391, 22.450774644454334], [69.349596795534325, 22.843179633062686], [68.176645135373377, 23.691965033456704], [68.842599318318761, 24.359133612560932], [71.0432401874682, 24.356523952730193], [70.844699334602822, 25.215102037043511], [70.282873162725579, 25.722228705339823], [70.168926629522005, 26.491871649678835], [69.514392938113119, 26.940965684511365], [70.61649620960192, 27.989196275335861], [71.777665643200308, 27.913180243434521], [72.823751662084689, 28.961591701772047], [73.450638462217412, 29.976413479119863], [74.421380242820263, 30.97981476493117], [74.405928989564998, 31.692639471965272], [75.258641798813187, 32.271105455040491], [74.451559279278698, 32.764899603805489], [74.104293654277328, 33.441473293586846], [73.749948358051952, 34.317698879527846], [74.240202671204955, 34.748887030571247], [75.757060988268321, 34.504922593721311], [76.871721632804011, 34.653544012992732], [77.837450799474553, 35.494009507787759]]] } }, - { "type": "Feature", "properties": { "admin": "Ireland", "name": "Ireland", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[-6.197884894220989, 53.86756500916335], [-6.032985398777609, 53.153164170944336], [-6.788856573910847, 52.260117906292322], [-8.561616583683557, 51.669301255899349], [-9.977085740590267, 51.820454820353071], [-9.16628251793078, 52.864628811242667], [-9.688524542672452, 53.881362616585285], [-8.327987433292007, 54.664518947968624], [-7.572167934591064, 55.131622219454854], [-7.366030646178785, 54.595840969452709], [-7.572167934591064, 54.059956366585986], [-6.953730231138065, 54.073702297575622], [-6.197884894220989, 53.86756500916335]]] } }, - { "type": "Feature", "properties": { "admin": "Iran", "name": "Iran", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[53.921597934795543, 37.198918361961255], [54.800303989486558, 37.392420762678178], [55.511578403551894, 37.964117133123153], [56.180374790273319, 37.935126654607423], [56.619366082592805, 38.121394354803478], [57.330433790928964, 38.029229437810933], [58.436154412678192, 37.522309475243794], [59.234761997316795, 37.412987982730336], [60.377637973883864, 36.52738312432836], [61.123070509694131, 36.491597194966239], [61.21081709172573, 35.650072333309218], [60.80319339380744, 34.404101874319856], [60.528429803311575, 33.676446031217999], [60.963700392505991, 33.528832302376252], [60.536077915290761, 32.981268825811561], [60.863654819588952, 32.182919623334421], [60.941944614511115, 31.548074652628745], [61.699314406180811, 31.379506130492661], [61.78122155136343, 30.735850328081231], [60.874248488208778, 29.829238999952604], [61.369308709564926, 29.303276272085917], [61.771868117118615, 28.699333807890792], [62.727830438085974, 28.259644883735383], [62.755425652929851, 27.378923448184985], [63.23389773952028, 27.217047024030702], [63.316631707619578, 26.756532497661659], [61.874187453056535, 26.239974880472097], [61.497362908784183, 25.078237006118492], [59.616134067630831, 25.380156561783775], [58.525761346272297, 25.609961656185725], [57.39725141788238, 25.739902045183634], [56.97076582217754, 26.966106268821356], [56.492138706290199, 27.14330475515019], [55.723710158110059, 26.964633490501036], [54.715089552637252, 26.480657863871507], [53.493096958231334, 26.812368882753042], [52.483597853409599, 27.580849107365488], [51.520762566947404, 27.865689602158291], [50.852948032439528, 28.814520575469377], [50.115008579311571, 30.14777252859971], [49.576850213423988, 29.9857152369324], [48.941333449098536, 30.31709035900403], [48.567971225789748, 29.926778265903515], [48.014568312376085, 30.452456773392594], [48.00469811380831, 30.985137437457237], [47.685286085812258, 30.984853217079621], [47.849203729042095, 31.709175930298663], [47.334661492711895, 32.469155381799105], [46.109361606639304, 33.017287299118998], [45.416690708199035, 33.967797756479577], [45.648459507028079, 34.748137722303007], [46.15178795755093, 35.093258775364284], [46.076340366404786, 35.67738332777548], [45.420618117053202, 35.977545884742817], [44.77267, 37.17045], [44.225755649600522, 37.971584377589345], [44.421402622257538, 38.281281236314534], [44.109225294782334, 39.428136298168091], [44.793989699081934, 39.713002631177041], [44.9526880226503, 39.335764675446363], [45.457721795438765, 38.874139105783051], [46.143623081248812, 38.74120148371221], [46.505719842317966, 38.770605373686287], [47.685079380083081, 39.508363959301207], [48.060095249225235, 39.582235419262453], [48.355529412637871, 39.2887649602769], [48.010744256386474, 38.794014797514514], [48.634375441284803, 38.27037750910096], [48.883249139202483, 38.32024526626261], [49.199612257693332, 37.582874253889877], [50.147771437384606, 37.37456655532133], [50.842354363819695, 36.872814235983384], [52.26402469260141, 36.700421657857696], [53.825789829326411, 36.965030829408228], [53.921597934795543, 37.198918361961255]]] } }, - { "type": "Feature", "properties": { "admin": "Iraq", "name": "Iraq", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[45.420618117053202, 35.977545884742817], [46.076340366404786, 35.67738332777548], [46.15178795755093, 35.093258775364284], [45.648459507028079, 34.748137722303007], [45.416690708199035, 33.967797756479577], [46.109361606639304, 33.017287299118998], [47.334661492711895, 32.469155381799105], [47.849203729042095, 31.709175930298663], [47.685286085812258, 30.984853217079621], [48.00469811380831, 30.985137437457237], [48.014568312376085, 30.452456773392594], [48.567971225789748, 29.926778265903515], [47.974519077349889, 29.975819200148493], [47.302622104690947, 30.059069932570711], [46.568713413281742, 29.099025173452283], [44.709498732284736, 29.178891099559376], [41.889980910007829, 31.190008653278362], [40.399994337736238, 31.889991766887931], [39.195468377444961, 32.16100881604266], [38.792340529136077, 33.378686428352218], [41.00615888851992, 34.419372260062111], [41.383965285005807, 35.628316555314349], [41.289707472505448, 36.358814602192261], [41.837064243340954, 36.605853786763568], [42.349591098811764, 37.22987254490409], [42.779125604021822, 37.385263576805741], [43.942258742047287, 37.256227525372942], [44.293451775902852, 37.001514390606289], [44.772699008977689, 37.170444647768427], [45.420618117053202, 35.977545884742817]]] } }, - { "type": "Feature", "properties": { "admin": "Iceland", "name": "Iceland", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[-14.508695441129232, 66.455892239031414], [-14.739637417041605, 65.808748277440287], [-13.609732224979807, 65.126671047619851], [-14.9098337467949, 64.36408193628867], [-17.794438035543418, 63.67874909123384], [-18.656245896874989, 63.496382961675806], [-19.972754685942757, 63.643634955491514], [-22.762971971110154, 63.960178941495371], [-21.778484259517676, 64.402115790455497], [-23.955043911219104, 64.891129869233481], [-22.184402635170354, 65.084968166760291], [-22.227423265053329, 65.378593655042721], [-24.326184047939332, 65.611189276788451], [-23.650514695723082, 66.262519029395207], [-22.134922451250883, 66.410468655046856], [-20.576283738679543, 65.732112128351417], [-19.056841600001587, 66.276600857194751], [-17.798623826559048, 65.993853257909763], [-16.167818976292121, 66.526792304135853], [-14.508695441129232, 66.455892239031414]]] } }, - { "type": "Feature", "properties": { "admin": "Israel", "name": "Israel", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[35.719918247222743, 32.709192409794859], [35.545665317534535, 32.393992011030569], [35.183930291491428, 32.532510687788935], [34.974640740709319, 31.866582343059715], [35.225891554512422, 31.754341132121759], [34.970506626125989, 31.616778469360803], [34.927408481594554, 31.35343537040141], [35.397560662586038, 31.489086005167572], [35.420918409981958, 31.100065822874349], [34.922602573391423, 29.501326198844517], [34.26543338393568, 31.219360866820146], [34.556371697738903, 31.548823960896989], [34.48810713068135, 31.605538845337314], [34.752587111151165, 32.07292633720116], [34.955417107896771, 32.827376410446369], [35.098457472480668, 33.080539252244257], [35.126052687324538, 33.090900376918775], [35.460709262846699, 33.089040025356276], [35.552796665190805, 33.264274807258012], [35.821100701650231, 33.277426459276292], [35.836396925608618, 32.868123277308506], [35.700797967274745, 32.716013698857374], [35.719918247222743, 32.709192409794859]]] } }, - { "type": "Feature", "properties": { "admin": "Italy", "name": "Italy", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[15.52037601081383, 38.231155096991465], [15.160242954171732, 37.444045518537813], [15.309897902089002, 37.134219468731793], [15.099988234119445, 36.61998729099539], [14.335228712632013, 36.996630967754747], [13.826732618879927, 37.104531358380186], [12.431003859108809, 37.612949937483812], [12.570943637755132, 38.126381130519682], [13.741156447004581, 38.03496552179535], [14.761249220446157, 38.143873602850498], [15.52037601081383, 38.231155096991465]]], [[[9.210011834356264, 41.209991360024212], [9.809975213264973, 40.500008856766094], [9.669518670295671, 39.177376410471787], [9.214817742559486, 39.240473334300127], [8.806935662479729, 38.906617743478471], [8.428302443077113, 39.171847032216611], [8.388253208050939, 40.378310858718798], [8.159998406617659, 40.950007229163774], [8.709990675500107, 40.899984442705225], [9.210011834356264, 41.209991360024212]]], [[[12.376485223040842, 46.767559109069872], [13.806475457421552, 46.50930613869118], [13.698109978905475, 46.016778062517368], [13.937630242578335, 45.59101593686465], [13.141606479554294, 45.736691799495411], [12.328581170306304, 45.38177806251484], [12.383874952858601, 44.885374253919075], [12.261453484759157, 44.600482082694008], [12.589237094786482, 44.091365871754462], [13.526905958722491, 43.587727362637899], [14.029820997787024, 42.761007798832473], [15.142569614327952, 41.955139675456891], [15.926191033601892, 41.961315009115729], [16.169897088290409, 41.740294908203417], [15.889345737377793, 41.541082261718195], [16.785001661860573, 41.179605617836579], [17.519168735431204, 40.877143459632229], [18.376687452882575, 40.355624904942651], [18.4802470231954, 40.168866278639818], [18.293385044028096, 39.810774441073235], [17.738380161213279, 40.277671006830289], [16.869595981522334, 40.442234605463838], [16.448743116937319, 39.795400702466473], [17.171489698971495, 39.424699815420716], [17.052840610429339, 38.902871202137291], [16.635088331781841, 38.843572496082395], [16.100960727613053, 37.985898749334176], [15.684086948314498, 37.908849188787023], [15.687962680736318, 38.214592800441849], [15.891981235424705, 38.750942491199218], [16.109332309644312, 38.964547024077682], [15.718813510814638, 39.544072374014938], [15.413612501698818, 40.048356838535163], [14.998495721098234, 40.172948716790913], [14.703268263414767, 40.604550279292617], [14.06067182786526, 40.786347968095434], [13.627985060285393, 41.188287258461649], [12.888081902730418, 41.253089504555604], [12.106682570044907, 41.7045348170574], [11.191906365614184, 42.355425319989671], [10.511947869517794, 42.93146251074721], [10.200028924204046, 43.920006822274608], [9.702488234097812, 44.036278794931313], [8.888946160526869, 44.366336167979533], [8.428560825238575, 44.23122813575241], [7.8507666357832, 43.767147935555236], [7.435184767291841, 43.693844916349164], [7.549596388386161, 44.127901109384808], [7.007562290076661, 44.254766750661382], [6.749955275101711, 45.028517971367584], [7.096652459347835, 45.333098863295859], [6.80235517744566, 45.708579820328673], [6.84359297041456, 45.991146552100659], [7.273850945676683, 45.776947740250748], [7.755992058959832, 45.824490057959267], [8.316629672894377, 46.16364248309084], [8.489952426801294, 46.005150865251736], [8.966305779667833, 46.03693187111115], [9.18288170740311, 46.440214748716976], [9.92283654139035, 46.314899400409182], [10.363378126678665, 46.48357127540983], [10.4427014502466, 46.893546250997431], [11.048555942436504, 46.751358547546396], [11.164827915093325, 46.941579494812729], [12.153088006243079, 47.115393174826423], [12.376485223040842, 46.767559109069872]]]] } }, - { "type": "Feature", "properties": { "admin": "Jamaica", "name": "Jamaica", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-77.569600796199197, 18.490525417550483], [-76.896618618462114, 18.400866807524078], [-76.365359056285527, 18.16070058844759], [-76.19965857614163, 17.886867173732963], [-76.902561408175671, 17.868237819891743], [-77.206341315403449, 17.701116237859818], [-77.766022915340599, 17.861597398342237], [-78.337719285785596, 18.225967922432226], [-78.217726610003865, 18.454532782459193], [-77.797364671525614, 18.524218451404774], [-77.569600796199197, 18.490525417550483]]] } }, - { "type": "Feature", "properties": { "admin": "Jordan", "name": "Jordan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[35.545665317534535, 32.393992011030569], [35.719918247222743, 32.709192409794859], [36.834062127435537, 32.312937526980768], [38.792340529136077, 33.378686428352218], [39.195468377444961, 32.16100881604266], [39.004885695152545, 32.010216986614971], [37.002165561681004, 31.508412990844736], [37.998848911294367, 30.508499864213128], [37.668119744626374, 30.338665269485894], [37.503581984209028, 30.003776150018396], [36.740527784987243, 29.865283311476183], [36.501214227043583, 29.505253607698702], [36.068940870922049, 29.19749461518445], [34.956037225084252, 29.356554673778835], [34.922602573391423, 29.501326198844517], [35.420918409981958, 31.100065822874349], [35.397560662586038, 31.489086005167572], [35.545251906076196, 31.782504787720832], [35.545665317534535, 32.393992011030569]]] } }, - { "type": "Feature", "properties": { "admin": "Japan", "name": "Japan", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[134.638428176003856, 34.149233710256418], [134.766379022358478, 33.806334743783673], [134.20341596897083, 33.201177883429622], [133.792950067276479, 33.521985175097583], [133.280268182508848, 33.289570420864941], [133.014858026257855, 32.704567369104772], [132.363114862192674, 32.989382025681373], [132.371176385630179, 33.463642483040068], [132.924372593314786, 34.060298570282036], [133.492968377822194, 33.944620876596694], [133.904106073136347, 34.364931138642611], [134.638428176003856, 34.149233710256418]]], [[[140.976387567305267, 37.142074286440156], [140.599769728762084, 36.343983466124534], [140.774074334882641, 35.842877102190229], [140.253279250245072, 35.138113918593653], [138.975527785396196, 34.667600002576101], [137.217598911691198, 34.606285915661843], [135.792983026268871, 33.46480520276662], [135.120982700745401, 33.849071153289053], [135.07943484918269, 34.596544908174813], [133.340316196831964, 34.375938218720755], [132.156770868051296, 33.904933376596503], [130.986144647343451, 33.885761420216276], [132.000036248910021, 33.149992377244608], [131.33279015515734, 31.450354519164836], [130.68631798718593, 31.029579169228235], [130.202419875204953, 31.418237616495411], [130.447676222862128, 32.319474595665717], [129.81469160371887, 32.610309556604385], [129.408463169472554, 33.296055813117583], [130.353935174684636, 33.604150702441693], [130.878450962447118, 34.232742824840031], [131.884229364143891, 34.749713853487911], [132.617672967662486, 35.433393052709413], [134.608300815977771, 35.731617743465812], [135.677537876528902, 35.527134100886819], [136.723830601142424, 37.304984239240376], [137.390611607004473, 36.827390651998819], [138.857602166906247, 37.827484646143454], [139.426404657142882, 38.215962225897634], [140.054790073812057, 39.438807481436378], [139.883379347899847, 40.563312486323682], [140.305782505453664, 41.195005194659551], [141.368973423426667, 41.378559882160282], [141.914263136970476, 39.991616115878678], [141.884600864834965, 39.18086456965149], [140.959489373945729, 38.174000962876583], [140.976387567305267, 37.142074286440156]]], [[[143.910161981379474, 44.174099839853724], [144.613426548439634, 43.960882880217511], [145.320825230083074, 44.384732977875437], [145.543137241802754, 43.262088324550596], [144.059661899999867, 42.988358262700551], [143.183849725517291, 41.995214748699183], [141.611490920172457, 42.678790595056071], [141.067286411706618, 41.58459381770799], [139.95510623592105, 41.56955597591103], [139.817543573159924, 42.563758856774392], [140.312087030193169, 43.333272610032644], [141.380548944259999, 43.388824774746489], [141.671952345953912, 44.772125352551477], [141.967644891527982, 45.551483466161343], [143.142870314709796, 44.510358384776957], [143.910161981379474, 44.174099839853724]]]] } }, - { "type": "Feature", "properties": { "admin": "Kazakhstan", "name": "Kazakhstan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[70.962314894499272, 42.26615428320553], [70.388964878220776, 42.081307684897517], [69.070027296835221, 41.384244289712335], [68.632482944620037, 40.668680731766855], [68.259895867795635, 40.662324530594894], [67.985855747351806, 41.135990708982199], [66.714047072216587, 41.168443508461557], [66.510648634715707, 41.987644151368549], [66.023391554635609, 41.994646307944031], [66.098012322865188, 42.997660020513074], [64.90082441595932, 43.728080552742647], [63.18578698105658, 43.650074978197999], [62.013300408786264, 43.504476630215649], [61.05831994003249, 44.405816962250576], [60.239971958258472, 44.784036770194739], [58.689989048095796, 45.500013739598721], [58.503127068928428, 45.58680430763296], [55.928917270741167, 44.995858466159163], [55.968191359283011, 41.30864166926937], [55.455251092353805, 41.259859117185826], [54.755345493392653, 42.04397146256661], [54.079417759014959, 42.324109402020831], [52.944293247291725, 42.116034247397572], [52.502459751196277, 41.783315538086462], [52.446339145727208, 42.027150783855561], [52.692112257707251, 42.443895372073364], [52.501426222550315, 42.792297878585188], [51.342427199108201, 43.132974758469338], [50.891291945200223, 44.031033637053774], [50.339129266161358, 44.284015611338468], [50.305642938036257, 44.609835516938908], [51.278503452363211, 44.514854234386448], [51.316899041556034, 45.245998236667894], [52.167389764215713, 45.408391425145098], [53.040876499245194, 45.259046535821753], [53.220865512917712, 46.23464590105992], [53.042736850807771, 46.853006089864486], [52.042022739475598, 46.804636949239232], [51.191945428274252, 47.048704738953909], [50.034083286342465, 46.608989976582208], [49.10116, 46.39933000000012], [48.593241001180495, 46.561034247415471], [48.694733514201729, 47.075628160177921], [48.057253045449258, 47.743752753279516], [47.315231154170242, 47.715847479841948], [46.466445753776256, 48.394152330104923], [47.043671502476506, 49.1520388860976], [46.751596307162728, 49.35600576435376], [47.549480421749301, 50.454698391311119], [48.577841424357523, 49.874759629915658], [48.702381626181008, 50.605128485712825], [50.766648390512145, 51.692762356159889], [52.328723585830957, 51.71865224873811], [54.53287845237621, 51.026239732459302], [55.716940545479801, 50.62171662047853], [56.777961053296551, 51.043551337277037], [58.363290643146733, 51.063653469438563], [59.642282342370599, 50.545442206415707], [59.932807244715484, 50.842194118851857], [61.337424350840919, 50.799070136104248], [61.588003371024158, 51.2726587998432], [59.967533807215531, 51.960420437215696], [60.927268507740258, 52.447548326215028], [60.739993117114572, 52.719986477257734], [61.699986199800584, 52.979996446334255], [60.978066440683151, 53.664993394579128], [61.436591424409052, 54.006264553434775], [65.178533563095911, 54.354227810272093], [65.66687584825398, 54.601266994843449], [68.169100376258811, 54.970391750704309], [69.068166945272864, 55.385250149143516], [70.865266554655122, 55.169733588270091], [71.180131056609397, 54.133285224008247], [72.224150018202167, 54.376655381886728], [73.508516066384388, 54.035616766976588], [73.425678745420427, 53.489810289109741], [74.384845005190044, 53.546861070360066], [76.891100294913414, 54.490524400441913], [76.525179477854735, 54.177003485727127], [77.800915561844221, 53.404414984747561], [80.035559523441663, 50.864750881547238], [80.568446893235475, 51.388336493528456], [81.945985548839914, 50.812195949906354], [83.383003778012366, 51.069182847693909], [83.935114780618832, 50.889245510453563], [84.416377394553052, 50.311399644565817], [85.115559523462011, 50.117302964877631], [85.541269972682457, 49.69285858824815], [86.829356723989619, 49.826674709668154], [87.359970330762664, 49.214980780629148], [86.598776483103379, 48.549181626980605], [85.768232863308285, 48.455750637396974], [85.72048383987071, 47.452969468773112], [85.164290399113355, 47.000955715516099], [83.180483839860443, 47.330031236350848], [82.458925815769106, 45.539649563166499], [81.947070753918112, 45.317027492853235], [79.966106398441397, 44.917516994804643], [80.866206496101356, 43.180362046881037], [80.180150180994289, 42.920067857426936], [80.259990268885332, 42.349999294599101], [79.643645460940135, 42.496682847659649], [79.142177361979776, 42.856092434249589], [77.658391961583206, 42.960685533208327], [76.000353631498555, 42.988022365890622], [75.636964959622091, 42.877899888676765], [74.212865838522575, 43.298339341803505], [73.645303582660901, 43.091271877609863], [73.489757521462337, 42.500894476891276], [71.844638299450637, 42.845395412765178], [71.186280552052253, 42.704292914392219], [70.962314894499272, 42.26615428320553]]] } }, - { "type": "Feature", "properties": { "admin": "Kenya", "name": "Kenya", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[40.993, -0.85829], [41.58513, -1.68325], [40.88477, -2.08255], [40.63785, -2.49979], [40.26304, -2.57309], [40.12119, -3.27768], [39.80006, -3.68116], [39.60489, -4.34653], [39.20222, -4.67677], [37.7669, -3.67712], [37.69869, -3.09699], [34.07262, -1.05982], [33.903711197104521, -0.95], [33.893568969666937, 0.109813537861896], [34.18, 0.515], [34.6721, 1.17694], [35.03599, 1.90584], [34.59607, 3.05374], [34.47913, 3.5556], [34.005, 4.249884947362047], [34.620196267853871, 4.847122742081987], [35.298007118232974, 5.506], [35.817447662353501, 5.338232082790795], [35.817447662353501, 4.776965663461889], [36.159078632855639, 4.447864127672768], [36.855093238008116, 4.447864127672768], [38.120915, 3.598605], [38.43697, 3.58851], [38.67114, 3.61607], [38.89251, 3.50074], [39.559384258765846, 3.42206], [39.85494, 3.83879], [40.76848, 4.25702], [41.1718, 3.91909], [41.855083092643966, 3.918911920483726], [40.98105, 2.78452], [40.993, -0.85829]]] } }, - { "type": "Feature", "properties": { "admin": "Kyrgyzstan", "name": "Kyrgyzstan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[70.96231489449913, 42.266154283205481], [71.186280552052111, 42.704292914392127], [71.84463829945058, 42.845395412765093], [73.489757521462337, 42.500894476891311], [73.645303582660901, 43.09127187760982], [74.212865838522546, 43.298339341803363], [75.636964959622006, 42.877899888676673], [76.000353631498442, 42.988022365890664], [77.658391961583206, 42.960685533208256], [79.142177361979762, 42.856092434249511], [79.643645460940107, 42.496682847659514], [80.259990268885289, 42.349999294599044], [80.119430373051358, 42.123940741538235], [78.543660923175295, 41.582242540038685], [78.187196893225959, 41.185315863604792], [76.904484490877067, 41.066485907549634], [76.526368035797432, 40.427946071935111], [75.467827996730691, 40.562072251948663], [74.776862420556043, 40.366425279291619], [73.822243686828287, 39.893973497063179], [73.960013055318413, 39.660008449861721], [73.67537926625478, 39.431236884105594], [71.784693637991992, 39.279463202464363], [70.549161818325601, 39.604197902986492], [69.464886915977516, 39.526683254548693], [69.559609816368507, 40.103211371412968], [70.648018833299957, 39.935753892571157], [71.014198032520156, 40.244365546218226], [71.774875115856545, 40.145844428053763], [73.055417108049156, 40.86603302668945], [71.870114780570447, 41.392900092121259], [71.157858514291576, 41.143587144529107], [70.420022414028196, 41.519998277343134], [71.259247674448218, 42.167710679689456], [70.96231489449913, 42.266154283205481]]] } }, - { "type": "Feature", "properties": { "admin": "Cambodia", "name": "Cambodia", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[103.497279901139677, 10.632555446815926], [103.090689731867229, 11.153660590047162], [102.58493248902667, 12.186594956913279], [102.348099399833004, 13.39424734135822], [102.988422072361601, 14.225721136934464], [104.281418084736586, 14.416743068901363], [105.218776890078871, 14.27321177821069], [106.04394616091551, 13.881091009979952], [106.496373325630856, 14.57058380783428], [107.382727492301058, 14.202440904186968], [107.614547967562402, 13.535530707244202], [107.491403029410861, 12.337205918827944], [105.810523716253101, 11.567614650921225], [106.249670037869436, 10.961811835163585], [105.199914992292321, 10.889309800658094], [104.334334751403446, 10.486543687375228], [103.497279901139677, 10.632555446815926]]] } }, - { "type": "Feature", "properties": { "admin": "South Korea", "name": "Korea", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[128.349716424676586, 38.612242946927843], [129.212919549680038, 37.432392483055942], [129.460449660358137, 36.784189154602821], [129.468304478066472, 35.632140611303939], [129.091376580929563, 35.08248423923142], [128.18585045787907, 34.890377102186385], [127.386519403188373, 34.475673733044111], [126.485747511908713, 34.390045884736473], [126.3739197124291, 34.934560451795939], [126.559231398627773, 35.684540513647896], [126.117397902532261, 36.725484727519252], [126.860143263863364, 36.893924058574612], [126.174758742376213, 37.749685777328033], [126.237338901881742, 37.840377916000271], [126.683719924018888, 37.804772854151174], [127.073308547067342, 38.256114813788393], [127.780035435090966, 38.304535630845884], [128.205745884311426, 38.370397243801882], [128.349716424676586, 38.612242946927843]]] } }, - { "type": "Feature", "properties": { "admin": "Kosovo", "name": "Kosovo", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[20.76216, 42.05186], [20.717310000000108, 41.84711], [20.59023, 41.85541], [20.52295, 42.21787], [20.28374, 42.32025], [20.0707, 42.58863], [20.25758, 42.81275], [20.49679, 42.88469], [20.63508, 43.21671], [20.81448, 43.27205], [20.95651, 43.13094], [21.143395, 43.068685000000123], [21.27421, 42.90959], [21.43866, 42.86255], [21.63302, 42.67717], [21.77505, 42.6827], [21.66292, 42.43922], [21.54332, 42.32025], [21.576635989402117, 42.245224397061847], [21.352700000000134, 42.2068], [20.76216, 42.05186]]] } }, - { "type": "Feature", "properties": { "admin": "Kuwait", "name": "Kuwait", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[47.974519077349889, 29.975819200148493], [48.183188510944483, 29.534476630159759], [48.09394331237641, 29.306299343374999], [48.416094191283939, 28.552004299426663], [47.708850538937376, 28.526062730416136], [47.459821811722819, 29.002519436147217], [46.568713413281742, 29.099025173452283], [47.302622104690947, 30.059069932570711], [47.974519077349889, 29.975819200148493]]] } }, - { "type": "Feature", "properties": { "admin": "Laos", "name": "Lao PDR", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[105.218776890078871, 14.27321177821069], [105.544338413517664, 14.723933620660414], [105.589038527450128, 15.570316066952856], [104.779320509868768, 16.441864935771445], [104.716947056092465, 17.428858954330078], [103.956476678485288, 18.240954087796872], [103.200192091893726, 18.309632066312769], [102.998705682387694, 17.961694647691598], [102.413004998791592, 17.932781683824281], [102.113591750092453, 18.109101670804161], [101.059547560635139, 17.512497259994486], [101.035931431077742, 18.408928330961611], [101.282014601651667, 19.462584947176762], [100.606293573003128, 19.508344427971217], [100.548881056726856, 20.109237982661124], [100.115987583417819, 20.41784963630818], [100.329101190189519, 20.786121731036229], [101.180005324307515, 21.436572984294024], [101.270025669359939, 21.201651923095177], [101.803119744882906, 21.174366766845065], [101.652017856861491, 22.318198757409544], [102.170435825613552, 22.464753119389297], [102.754896274834636, 21.675137233969462], [103.203861118586431, 20.766562201413745], [104.435000441508024, 20.758733221921528], [104.822573683697073, 19.886641750563879], [104.183387892678908, 19.624668077060214], [103.896532017026701, 19.265180975821799], [105.094598423281496, 18.666974595611073], [105.925762160264, 17.485315456608955], [106.55600792849566, 16.604283962464802], [107.312705926545576, 15.908538316303177], [107.564525181103875, 15.202173163305554], [107.382727492301058, 14.202440904186968], [106.496373325630856, 14.57058380783428], [106.04394616091551, 13.881091009979952], [105.218776890078871, 14.27321177821069]]] } }, - { "type": "Feature", "properties": { "admin": "Lebanon", "name": "Lebanon", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[35.821100701650231, 33.277426459276292], [35.552796665190805, 33.264274807258012], [35.460709262846699, 33.089040025356276], [35.126052687324538, 33.090900376918775], [35.48220665868012, 33.905450140919434], [35.979592319489392, 34.610058295219126], [35.998402540843628, 34.644914048799997], [36.448194207512095, 34.59393524834406], [36.611750115715886, 34.201788641897174], [36.066460402172048, 33.824912421192543], [35.821100701650231, 33.277426459276292]]] } }, - { "type": "Feature", "properties": { "admin": "Liberia", "name": "Liberia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-7.712159389669749, 4.364565944837721], [-7.974107224957249, 4.355755113131961], [-9.004793667018673, 4.832418524592199], [-9.913420376006682, 5.593560695819205], [-10.765383876986643, 6.140710760925556], [-11.438779466182053, 6.785916856305746], [-11.199801805048278, 7.105845648624735], [-11.14670427086838, 7.396706447779534], [-10.695594855176477, 7.939464016141085], [-10.230093553091276, 8.406205552601291], [-10.016566534861253, 8.42850393313523], [-9.755342169625832, 8.541055202666923], [-9.33727983238458, 7.928534450711351], [-9.403348151069748, 7.526905218938906], [-9.208786383490844, 7.313920803247952], [-8.926064622422002, 7.309037380396375], [-8.722123582382123, 7.711674302598509], [-8.439298468448696, 7.686042792181736], [-8.485445522485348, 7.395207831243068], [-8.385451626000572, 6.911800645368742], [-8.602880214868618, 6.467564195171659], [-8.311347622094017, 6.193033148621081], [-7.993692592795879, 6.126189683451541], [-7.570152553731686, 5.707352199725903], [-7.53971513511176, 5.313345241716517], [-7.63536821128403, 5.188159084489455], [-7.712159389669749, 4.364565944837721]]] } }, - { "type": "Feature", "properties": { "admin": "Libya", "name": "Libya", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[14.8513, 22.862950000000119], [14.143870883855239, 22.491288967371126], [13.581424594790459, 23.040506089769274], [11.999505649471697, 23.471668402596432], [11.560669386449032, 24.09790924732561], [10.771363559622952, 24.562532050061741], [10.303846876678445, 24.379313259370967], [9.948261346078024, 24.936953640232613], [9.910692579801774, 25.365454616796789], [9.319410841518218, 26.094324856057476], [9.716285841519662, 26.512206325785652], [9.629056023811073, 27.140953477481041], [9.756128370816779, 27.688258571884198], [9.68388471847288, 28.144173895779311], [9.859997999723472, 28.959989732371064], [9.805634392952353, 29.424638373323369], [9.482139926805415, 30.307556057246181], [9.970017124072966, 30.539324856075375], [10.056575148161697, 30.961831366493517], [9.950225050505194, 31.376069647745275], [10.636901482799484, 31.761420803345679], [10.944789666394511, 32.081814683555358], [11.43225345220378, 32.368903103152824], [11.488787469131008, 33.136995754523234], [12.66331, 32.79278], [13.08326, 32.87882], [13.91868, 32.71196], [15.24563, 32.26508], [15.71394, 31.37626], [16.61162, 31.18218], [18.02109, 30.76357], [19.08641, 30.26639], [19.57404, 30.52582], [20.05335, 30.98576], [19.82033, 31.751790000000135], [20.13397, 32.2382], [20.85452, 32.7068], [21.54298, 32.8432], [22.89576, 32.63858], [23.2368, 32.19149], [23.6091300000001, 32.18726], [23.9275, 32.01667], [24.92114, 31.89936], [25.16482, 31.56915], [24.80287, 31.08929], [24.95762, 30.6616], [24.70007, 30.04419], [25.00000000000011, 29.238654529533552], [25.00000000000011, 25.682499996360995], [25.00000000000011, 22.0], [25.00000000000011, 20.00304], [23.850000000000129, 20.0], [23.837660000000135, 19.580470000000101], [19.84926, 21.49509], [15.86085, 23.40972], [14.8513, 22.862950000000119]]] } }, - { "type": "Feature", "properties": { "admin": "Sri Lanka", "name": "Sri Lanka", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[81.787959018891371, 7.523055324733162], [81.637322218760573, 6.481775214051921], [81.218019647144317, 6.197141424988287], [80.348356968104397, 5.968369859232154], [79.872468703128519, 6.763463446474928], [79.6951668639351, 8.200843410673384], [80.147800734379629, 9.824077663609554], [80.838817986986541, 9.268426825391186], [81.304319289071756, 8.564206244333688], [81.787959018891371, 7.523055324733162]]] } }, - { "type": "Feature", "properties": { "admin": "Lesotho", "name": "Lesotho", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[28.978262566857236, -28.955596612261708], [29.325166456832587, -29.257386976846245], [29.018415154748016, -29.743765557577362], [28.848399692507734, -30.070050551068245], [28.291069370239903, -30.226216729454293], [28.107204624145421, -30.545732110314944], [27.749397006956478, -30.645105889612214], [26.999261915807629, -29.875953871379977], [27.532511020627471, -29.242710870075353], [28.07433841320778, -28.851468601193581], [28.541700066855491, -28.647501722937562], [28.978262566857236, -28.955596612261708]]] } }, - { "type": "Feature", "properties": { "admin": "Lithuania", "name": "Lithuania", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[22.731098667092649, 54.327536932993311], [22.651051873472536, 54.582740993866729], [22.757763706155256, 54.856574408581366], [22.31572350433057, 55.01529857036585], [21.26844892750346, 55.190481675835301], [21.05580040862241, 56.031076361711051], [22.201156853939491, 56.337801825579483], [23.878263787539957, 56.273671373105259], [24.860684441840753, 56.372528388079616], [25.000934279080887, 56.164530748104831], [25.533046502390327, 56.100296942766029], [26.494331495883749, 55.61510691997762], [26.588279249790386, 55.167175604871659], [25.768432651479792, 54.846962592175082], [25.536353794056989, 54.282423407602515], [24.45068362803703, 53.905702216194747], [23.484127638449841, 53.912497667041123], [23.243987257589506, 54.220566718149129], [22.731098667092649, 54.327536932993311]]] } }, - { "type": "Feature", "properties": { "admin": "Luxembourg", "name": "Luxembourg", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[6.043073357781109, 50.128051662794221], [6.242751092156992, 49.90222565367872], [6.186320428094176, 49.4638028021145], [5.897759230176403, 49.442667141307012], [5.674051954784828, 49.52948354755749], [5.782417433300905, 50.090327867221205], [6.043073357781109, 50.128051662794221]]] } }, - { "type": "Feature", "properties": { "admin": "Latvia", "name": "Latvia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[21.05580040862241, 56.031076361711051], [21.090423618257965, 56.783872789122924], [21.581866489353668, 57.411870632549913], [22.524341261492872, 57.753374335350756], [23.31845299652209, 57.006236477274854], [24.120729607853423, 57.025692654032753], [24.312862583114615, 57.793423570376966], [25.164593540149262, 57.970156968815175], [25.602809685984365, 57.847528794986559], [26.46353234223778, 57.476388658266316], [27.288184848751509, 57.474528306703817], [27.770015903440925, 57.244258124411218], [27.855282016722519, 56.759326483784278], [28.17670942557799, 56.169129950578807], [27.102459751094525, 55.783313707087672], [26.494331495883749, 55.61510691997762], [25.533046502390327, 56.100296942766029], [25.000934279080887, 56.164530748104831], [24.860684441840753, 56.372528388079616], [23.878263787539957, 56.273671373105259], [22.201156853939491, 56.337801825579483], [21.05580040862241, 56.031076361711051]]] } }, - { "type": "Feature", "properties": { "admin": "Morocco", "name": "Morocco", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-5.193863491222031, 35.755182196590845], [-4.591006232105143, 35.330711981745644], [-3.640056525070007, 35.39985504815197], [-2.604305792644111, 35.17909332940112], [-2.169913702798624, 35.168396307916694], [-1.792985805661658, 34.527918606091298], [-1.73345455566141, 33.919712836232115], [-1.388049282222596, 32.864015000941372], [-1.124551153966195, 32.651521511357195], [-1.30789913573787, 32.262888902306024], [-2.616604783529567, 32.094346218386157], [-3.068980271812648, 31.724497992473285], [-3.647497931320145, 31.637294012980814], [-3.690441046554666, 30.896951605751152], [-4.859646165374442, 30.501187649043874], [-5.242129278982786, 30.00044302013557], [-6.060632290053745, 29.731699734001801], [-7.059227667661899, 29.57922842052465], [-8.67411617678283, 28.841288967396643], [-8.665589565454836, 27.656425889592462], [-8.817809007940523, 27.656425889592462], [-8.817828334986642, 27.656425889592462], [-8.794883999049032, 27.120696316022553], [-9.413037482124507, 27.088476060488539], [-9.735343390328749, 26.860944729107409], [-10.189424200877452, 26.860944729107409], [-10.551262579785258, 26.990807603456879], [-11.392554897496948, 26.883423977154386], [-11.718219773800339, 26.104091701760801], [-12.030758836301654, 26.030866197203121], [-12.500962693725368, 24.770116278578136], [-13.891110398809044, 23.691009019459383], [-14.22116777185715, 22.310163072188338], [-14.630832688850942, 21.860939846274867], [-14.750954555713404, 21.500600083903802], [-17.002961798561071, 21.42073415779668], [-17.020428432675768, 21.422310288981631], [-16.973247849993182, 21.88574453377495], [-16.589136928767626, 22.158234361250091], [-16.26192175949566, 22.679339504481273], [-16.326413946995896, 23.017768459560894], [-15.982610642958059, 23.723358466074096], [-15.426003790742183, 24.359133612561035], [-15.089331834360729, 24.520260728446964], [-14.824645148161689, 25.103532619725307], [-14.800925665739666, 25.636264960222285], [-14.439939947964827, 26.254418443297645], [-13.773804897506462, 26.618892320252279], [-13.13994177901429, 27.640147813420491], [-13.121613369914709, 27.654147671719805], [-12.61883663578311, 28.038185533148656], [-11.688919236690761, 28.148643907172577], [-10.9009569971044, 28.832142238880913], [-10.39959225100864, 29.09858592377778], [-9.564811163765624, 29.933573716749855], [-9.814718390329174, 31.177735500609053], [-9.434793260119362, 32.038096421836478], [-9.300692918321827, 32.564679266890629], [-8.657476365585039, 33.24024526624239], [-7.654178432638217, 33.697064927702506], [-6.912544114601358, 34.11047638603744], [-6.24434200685141, 35.145865383437517], [-5.929994269219832, 35.759988104793983], [-5.193863491222031, 35.755182196590845]]] } }, - { "type": "Feature", "properties": { "admin": "Moldova", "name": "Moldova", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[26.619336785597788, 48.220726223333457], [26.857823520624798, 48.368210761094488], [27.52253746919515, 48.467119452501102], [28.259546746541837, 48.155562242213406], [28.670891147585163, 48.118148505234089], [29.122698195113024, 47.849095160506458], [29.050867954227321, 47.510226955752493], [29.415135125452732, 47.346645209332571], [29.559674106573105, 46.928582872091312], [29.908851759569295, 46.67436066343145], [29.838210076626289, 46.525325832701675], [30.024658644335364, 46.423936672545032], [29.759971958136383, 46.349987697935354], [29.170653924279879, 46.379262396828693], [29.072106967899288, 46.517677720722482], [28.862972446414055, 46.437889309263824], [28.933717482221621, 46.258830471372491], [28.659987420371575, 45.939986884131628], [28.48526940279276, 45.596907050145887], [28.233553501099035, 45.488283189468369], [28.054442986775392, 45.944586086605618], [28.160017937947707, 46.371562608417207], [28.128030226359037, 46.81047638608824], [27.551166212684841, 47.405117092470817], [27.233872918412736, 47.826770941756365], [26.924176059687561, 48.123264472030982], [26.619336785597788, 48.220726223333457]]] } }, - { "type": "Feature", "properties": { "admin": "Madagascar", "name": "Madagascar", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[49.543518914595737, -12.469832858940553], [49.80898074727908, -12.895284925999551], [50.05651085795715, -13.555761407121981], [50.217431268114055, -14.758788750876795], [50.476536899625515, -15.226512139550541], [50.377111443895942, -15.706069431219122], [50.200274692593169, -16.000263360256763], [49.860605503138665, -15.414252618066913], [49.672606642460849, -15.710203545802477], [49.863344354050142, -16.451036879138773], [49.774564243372694, -16.875042006093597], [49.49861209493411, -17.10603565843827], [49.435618523970298, -17.953064060134363], [49.04179243347393, -19.118781019774442], [48.548540887247995, -20.496888116134119], [47.930749139198653, -22.391501153251077], [47.547723423051295, -23.781958916928513], [47.095761346226588, -24.941629733990446], [46.282477654817079, -25.178462823184102], [45.409507684110444, -25.601434421493082], [44.833573846217547, -25.346101169538933], [44.039720493349755, -24.9883452287823], [43.763768344911156, -24.460677178649988], [43.697777540874441, -23.574116306250595], [43.345654331237611, -22.77690398528387], [43.254187046080986, -22.057413018484116], [43.433297560404633, -21.336475111580185], [43.893682895692919, -21.163307386970121], [43.89637007017209, -20.830459486578167], [44.374325392439644, -20.072366224856385], [44.464397413924374, -19.435454196859045], [44.23242190936616, -18.961994724200899], [44.042976108584149, -18.331387220943167], [43.963084344260899, -17.409944756746778], [44.312468702986273, -16.850495700754951], [44.446517368351387, -16.216219170804504], [44.944936557806521, -16.179373874580396], [45.502731967964976, -15.974373467678538], [45.872993605336255, -15.793454278224681], [46.312243279817203, -15.780018405828795], [46.882182651564271, -15.210182386946309], [47.70512983581235, -14.594302666891762], [48.005214878131241, -14.091232598530372], [47.869047479042152, -13.663868503476582], [48.29382775248137, -13.784067884987483], [48.845060255738773, -13.08917489995866], [48.863508742066976, -12.487867933810417], [49.194651320193302, -12.040556735891967], [49.543518914595737, -12.469832858940553]]] } }, - { "type": "Feature", "properties": { "admin": "Mexico", "name": "Mexico", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-97.140008307670684, 25.869997463478395], [-97.528072475966539, 24.992144069920297], [-97.702945522842214, 24.272343044526728], [-97.776041836319024, 22.932579860927653], [-97.872366706111094, 22.444211737553356], [-97.699043952204164, 21.898689480064256], [-97.388959520236739, 21.411018988525818], [-97.189333462293277, 20.635433254473124], [-96.525575527720306, 19.890930894444061], [-96.292127244841737, 19.32037140550954], [-95.90088497595994, 18.828024196848727], [-94.8390634834427, 18.562717393462204], [-94.425729539756205, 18.144370835843343], [-93.548651292682365, 18.423836981677933], [-92.786113857783477, 18.524838568592255], [-92.037348192090391, 18.704569200103432], [-91.407903408559235, 18.876083278880227], [-90.771869879910852, 19.284120388256778], [-90.533589850613026, 19.867418117751292], [-90.451475999701231, 20.707521877520428], [-90.278618333684889, 20.999855454995547], [-89.601321173851474, 21.261725775634485], [-88.543866339862845, 21.493675441976613], [-87.658416510757704, 21.458845526611977], [-87.051890224948053, 21.543543199138295], [-86.811982388032931, 21.331514797444747], [-86.845907965832595, 20.849864610268348], [-87.383291185235848, 20.255404771398727], [-87.621054450210721, 19.646553046135917], [-87.436750454441764, 19.472403469312265], [-87.586560431655911, 19.040130113190738], [-87.837191128271485, 18.259815985583426], [-88.090664028663156, 18.516647854074048], [-88.300031094093626, 18.499982204659997], [-88.490122850279278, 18.486830552641717], [-88.84834387892657, 17.883198147040329], [-89.029857347351737, 18.001511338772556], [-89.150909389995462, 17.955467637600403], [-89.143080410503316, 17.808318996649401], [-90.067933519230891, 17.819326076727517], [-91.001519945015943, 17.817594916245692], [-91.002269253284155, 17.254657701074272], [-91.453921271515114, 17.252177232324183], [-91.08167009150057, 16.918476670799517], [-90.711821865587623, 16.687483018454767], [-90.600846727240921, 16.470777899638787], [-90.438866950221993, 16.410109768128105], [-90.464472622422633, 16.069562079324722], [-91.747960171255926, 16.066564846251762], [-92.229248623406278, 15.251446641495871], [-92.087215949252013, 15.06458466232851], [-92.203229539747255, 14.830102850804108], [-92.227750006869812, 14.538828640190953], [-93.359463874061746, 15.61542959234367], [-93.875168830118511, 15.94016429286591], [-94.691656460330108, 16.20097524664288], [-95.250227016973014, 16.128318182840641], [-96.053382127653293, 15.752087917539592], [-96.557434048228274, 15.653515122942787], [-97.263592495496624, 15.917064927631312], [-98.013029954809596, 16.107311713113912], [-98.947675747456486, 16.566043402568763], [-99.697397427147024, 16.706164048728166], [-100.829498867581293, 17.171071071842047], [-101.666088629954444, 17.649026394109622], [-101.918528001700196, 17.916090196193974], [-102.478132086988907, 17.975750637275095], [-103.500989549558057, 18.292294623278845], [-103.917527432046811, 18.748571682200005], [-104.992009650475467, 19.316133938061679], [-105.493038499761411, 19.946767279535429], [-105.731396043707633, 20.434101874264108], [-105.397772996831321, 20.531718654863422], [-105.500660773524402, 20.816895046466122], [-105.27075232625792, 21.076284898355137], [-105.265817226974022, 21.422103583252348], [-105.603160976975374, 21.871145941652568], [-105.693413865973113, 22.269080308516148], [-106.028716396898943, 22.77375234627862], [-106.909980434988341, 23.767774359628895], [-107.91544877809136, 24.548915310152946], [-108.401904873470954, 25.172313951105931], [-109.260198737406625, 25.580609442644054], [-109.444089321717314, 25.824883938087673], [-109.291643846456267, 26.44293406829842], [-109.801457689231796, 26.676175645447923], [-110.391731737085692, 27.162114976504533], [-110.641018846461606, 27.859876003525521], [-111.178918830187826, 27.941240546169062], [-111.759606899851619, 28.467952582303944], [-112.228234626090369, 28.954408677683482], [-112.27182369672866, 29.266844387320074], [-112.80959448937395, 30.021113593052341], [-113.163810594518651, 30.786880804969424], [-113.148669399857141, 31.170965887978912], [-113.871881069781836, 31.56760834403519], [-114.205736660603506, 31.524045111613123], [-114.776451178835003, 31.79953217216114], [-114.936699795372121, 31.393484605427595], [-114.771231859173483, 30.91361725516526], [-114.673899298951739, 30.162681179315985], [-114.330974494262918, 29.750432440707407], [-113.588875088335413, 29.061611436473008], [-113.424053107540516, 28.826173610951223], [-113.271969367305502, 28.754782619739892], [-113.140039435664363, 28.411289374295954], [-112.962298346796473, 28.425190334582503], [-112.761587083774856, 27.78021678314752], [-112.457910529411635, 27.525813706974752], [-112.24495195193677, 27.171726792910754], [-111.616489020619184, 26.662817287700474], [-111.284674648872993, 25.732589830014426], [-110.987819383572386, 25.294606228124557], [-110.71000688357131, 24.826004340101854], [-110.655048997828871, 24.298594672131113], [-110.17285620811343, 24.265547593680417], [-109.771847093528521, 23.811182562754194], [-109.409104377055698, 23.364672349536242], [-109.433392300232896, 23.185587673428696], [-109.85421932660168, 22.818271592698061], [-110.031391974714424, 22.823077500901199], [-110.295070970483636, 23.430973212166684], [-110.949501309028022, 24.000964260345988], [-111.670568407012681, 24.484423122652508], [-112.182035895621468, 24.73841278736716], [-112.148988817170817, 25.470125230404044], [-112.300710822379671, 26.012004299416613], [-112.777296719191526, 26.321959540303162], [-113.464670783321907, 26.768185533143416], [-113.596729906043805, 26.639459540304465], [-113.848936733844241, 26.900063788352437], [-114.465746629680027, 27.142090358991361], [-115.055142178184965, 27.722726752222904], [-114.982252570437382, 27.798200181585109], [-114.570365566854917, 27.741485297144884], [-114.199328782999231, 28.115002549750553], [-114.162018398884612, 28.566111965442296], [-114.931842210736605, 29.279479275015483], [-115.518653937626965, 29.556361599235395], [-115.887365282029563, 30.180793768834171], [-116.2583503894529, 30.836464341753572], [-116.721526252084956, 31.635743720012037], [-117.127759999999839, 32.53534], [-115.99135, 32.612390000000111], [-114.72139, 32.72083], [-114.815, 32.52528], [-113.30498, 32.03914], [-111.02361, 31.33472], [-109.035, 31.341940000000129], [-108.24194, 31.34222], [-108.24, 31.754853718166366], [-106.507589999999851, 31.75452], [-106.1429, 31.39995], [-105.63159, 31.08383], [-105.03737, 30.64402], [-104.70575, 30.12173], [-104.456969999999885, 29.57196], [-103.94, 29.27], [-103.11, 28.97], [-102.48, 29.76], [-101.6624, 29.7793], [-100.9576, 29.380710000000125], [-100.45584, 28.696120000000118], [-100.11, 28.11000000000012], [-99.52, 27.54], [-99.3, 26.84], [-99.019999999999897, 26.37], [-98.24, 26.06], [-97.529999999999887, 25.84], [-97.140008307670684, 25.869997463478395]]] } }, - { "type": "Feature", "properties": { "admin": "Macedonia", "name": "Macedonia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[20.59023, 41.85541], [20.717310000000108, 41.84711], [20.76216, 42.05186], [21.352700000000134, 42.2068], [21.576635989402117, 42.245224397061847], [21.917080000000105, 42.30364], [22.380525750424674, 42.320259507815074], [22.881373732197339, 41.999297186850349], [22.952377150166505, 41.337993882811176], [22.76177, 41.3048], [22.597308383889008, 41.130487168943198], [22.055377638444266, 41.149865831052686], [21.674160597426969, 40.93127452245794], [21.020040317476397, 40.842726955725873], [20.60518, 41.08622], [20.46315, 41.51509], [20.59023, 41.85541]]] } }, - { "type": "Feature", "properties": { "admin": "Mali", "name": "Mali", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-12.170750291380299, 14.616834214735503], [-11.834207526079465, 14.799096991428936], [-11.666078253617853, 15.388208319556295], [-11.349095017939502, 15.411256008358475], [-10.650791388379414, 15.132745876521422], [-10.086846482778212, 15.330485744686269], [-9.700255092802703, 15.264107367407359], [-9.550238409859388, 15.486496893775435], [-5.537744309908446, 15.501689764869253], [-5.315277268891931, 16.201853745991837], [-5.488522508150438, 16.325102037007962], [-5.971128709324247, 20.640833441647626], [-6.453786586930334, 24.956590684503418], [-4.92333736817423, 24.974574082940993], [-1.550054897457613, 22.792665920497377], [1.823227573259032, 20.61080943448604], [2.060990838233919, 20.142233384679482], [2.683588494486428, 19.856230170160114], [3.146661004253899, 19.693578599521441], [3.158133172222704, 19.057364203360034], [4.267419467800038, 19.155265204336995], [4.270209995143801, 16.852227484601212], [3.723421665063482, 16.184283759012612], [3.638258904646476, 15.568119818580453], [2.749992709981483, 15.409524847876693], [1.385528191746857, 15.323561102759168], [1.01578331869851, 14.968182277887944], [0.374892205414682, 14.928908189346128], [-0.26625729003058, 14.924308986872147], [-0.515854458000348, 15.116157741755725], [-1.066363491205663, 14.973815009007764], [-2.001035122068771, 14.559008287000887], [-2.191824510090384, 14.246417548067352], [-2.967694464520576, 13.798150336151506], [-3.103706834312759, 13.54126679122859], [-3.52280270019986, 13.337661647998612], [-4.006390753587225, 13.472485459848112], [-4.280405035814879, 13.228443508349738], [-4.427166103523802, 12.542645575404292], [-5.220941941743119, 11.713858954307224], [-5.197842576508648, 11.375145778850136], [-5.470564947929004, 10.951269842976044], [-5.404341599946973, 10.370736802609144], [-5.816926235365286, 10.222554633012191], [-6.050452032892266, 10.096360785355442], [-6.205222947606429, 10.524060777219132], [-6.493965013037267, 10.411302801958268], [-6.666460944027547, 10.430810655148447], [-6.850506557635057, 10.138993841996237], [-7.622759161804808, 10.147236232946792], [-7.89958980959237, 10.297382106970824], [-8.029943610048617, 10.206534939001711], [-8.335377163109738, 10.494811916541932], [-8.282357143578279, 10.792597357623842], [-8.407310756860026, 10.90925690352276], [-8.620321010767126, 10.810890814655181], [-8.581305304386772, 11.136245632364801], [-8.376304897484911, 11.393645941610627], [-8.786099005559462, 11.812560939984705], [-8.905264858424529, 12.088358059126433], [-9.127473517279581, 12.308060411015331], [-9.327616339546008, 12.334286200403451], [-9.567911749703212, 12.194243068892472], [-9.890992804392011, 12.060478623904968], [-10.165213792348835, 11.844083563682743], [-10.593223842806278, 11.923975328005977], [-10.870829637078211, 12.177887478072106], [-11.036555955438256, 12.211244615116513], [-11.297573614944508, 12.077971096235768], [-11.456168585648269, 12.076834214725336], [-11.513942836950587, 12.442987575729415], [-11.467899135778522, 12.754518947800973], [-11.553397793005427, 13.141213690641063], [-11.927716030311613, 13.422075100147392], [-12.124887457721256, 13.994727484589784], [-12.170750291380299, 14.616834214735503]]] } }, - { "type": "Feature", "properties": { "admin": "Myanmar", "name": "Myanmar", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[99.543309360759281, 20.186597601802056], [98.959675734454848, 19.752980658440944], [98.253723992915582, 19.708203029860041], [97.797782830804394, 18.627080389881751], [97.375896437573516, 18.445437730375811], [97.859122755934848, 17.567946071843657], [98.493761020911322, 16.837835598207928], [98.90334842325673, 16.177824204976115], [98.537375929765687, 15.308497422746081], [98.192074009191373, 15.123702500870349], [98.430819126379859, 14.622027696180831], [99.097755161538728, 13.827502549693275], [99.212011753336071, 13.269293728076462], [99.196353794351637, 12.804748439988666], [99.587286004639694, 11.892762762901695], [99.038120558673953, 10.960545762572435], [98.553550653073017, 9.932959906448543], [98.457174106848697, 10.675266018105146], [98.764545526120756, 11.441291612183745], [98.428338657629823, 12.032986761925681], [98.509574009192661, 13.122377631070675], [98.103603957107666, 13.64045970301285], [97.777732375075161, 14.837285874892638], [97.597071567782749, 16.100567938699765], [97.164539829499773, 16.928734442609336], [96.505768670642965, 16.427240505432845], [95.369352248112378, 15.714389960182599], [94.808404575584092, 15.803454291237637], [94.188804152404515, 16.037936102762014], [94.533485955791321, 17.277240301985724], [94.324816522196741, 18.213513902249893], [93.540988397193615, 19.366492621330021], [93.663254835996199, 19.726961574781992], [93.078277622452163, 19.855144965081973], [92.368553501355606, 20.670883287025344], [92.30323449093865, 21.475485337809815], [92.652257114637976, 21.324047552978481], [92.672720981825549, 22.041238918541247], [93.166127557348361, 22.278459580977099], [93.060294224014598, 22.703110663335565], [93.286326938859247, 23.043658352138998], [93.325187615942767, 24.078556423432197], [94.106741977925054, 23.850740871673477], [94.552657912171611, 24.675238348890328], [94.603249139385355, 25.162495428970399], [95.155153436262566, 26.001307277932078], [95.124767694074933, 26.573572089132295], [96.419365675850941, 27.264589341739221], [97.133999058015277, 27.08377350514996], [97.051988559968066, 27.699058946233144], [97.402561476636123, 27.88253611908544], [97.327113885490007, 28.261582749946331], [97.91198774616943, 28.335945136014338], [98.24623091023328, 27.747221381129172], [98.682690057370451, 27.508812160750612], [98.712093947344499, 26.74353587494026], [98.671838006589127, 25.918702500913518], [97.724609002679117, 25.083637193292994], [97.604719679761956, 23.897404690033039], [98.660262485755737, 24.063286037689959], [98.898749220782747, 23.142722072842524], [99.531992222087382, 22.949038804612574], [99.240898878987224, 22.118314317304577], [99.983489211021464, 21.742936713136398], [100.416537713627349, 21.558839423096607], [101.150032993578222, 21.849984442629015], [101.180005324307515, 21.436572984294024], [100.329101190189519, 20.786121731036229], [100.115987583417819, 20.41784963630818], [99.543309360759281, 20.186597601802056]]] } }, - { "type": "Feature", "properties": { "admin": "Montenegro", "name": "Montenegro", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[19.801613396898681, 42.500093492190835], [19.738051385179627, 42.688247382165564], [19.30449, 42.19574], [19.371770000000136, 41.87755], [19.16246, 41.95502], [18.88214, 42.28151], [18.45, 42.48], [18.56, 42.65], [18.70648, 43.20011], [19.03165, 43.43253], [19.21852, 43.52384], [19.48389, 43.35229], [19.63, 43.213779970270522], [19.95857, 43.10604], [20.3398, 42.89852], [20.25758, 42.81275], [20.0707, 42.58863], [19.801613396898681, 42.500093492190835]]] } }, - { "type": "Feature", "properties": { "admin": "Mongolia", "name": "Mongolia", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[87.751264276076697, 49.297197984405479], [88.805566847695488, 49.470520738312409], [90.713667433640666, 50.331811835321076], [92.234711541719662, 50.802170722041716], [93.104219191462661, 50.495290228876414], [94.147566359435615, 50.480536607457083], [94.815949334698701, 50.013433335970838], [95.814027947983973, 49.977466539095708], [97.259727817781396, 49.726060695995727], [98.231761509191543, 50.422400621128737], [97.825739780674283, 51.010995184933165], [98.861490513100307, 52.047366034546684], [99.981732212323507, 51.634006252643978], [100.889480421962588, 51.516855780638316], [102.065222609467298, 51.25992055928311], [102.255908644624299, 50.510560614618669], [103.676545444760194, 50.089966132195109], [104.621552362081687, 50.275329494826067], [105.886591424586726, 50.406019192092209], [106.888804152455336, 50.274295966180219], [107.868175897250936, 49.793705145865808], [108.475167270951275, 49.282547715850725], [109.402449171996636, 49.292960516957535], [110.662010532678764, 49.130128078805861], [111.581230910286607, 49.377968248077678], [112.897739699354361, 49.543565375356984], [114.362456496235239, 50.248302720737399], [114.962109816550154, 50.140247300815112], [115.485695428531386, 49.805177313834591], [116.678800897286152, 49.888531399121376], [116.191802199367544, 49.134598090199091], [115.485282017073018, 48.135382595403428], [115.742837355615748, 47.726544501326273], [116.308952671373206, 47.853410142602826], [117.295507440257396, 47.69770905210742], [118.064142694166691, 48.066730455103674], [118.866574334794933, 47.747060044946153], [119.772823927897477, 47.048058783550125], [119.66326989143873, 46.692679958678909], [118.874325799638711, 46.805412095723646], [117.421701287914175, 46.672732855814253], [116.717868280098841, 46.388202419615205], [115.985096470200062, 45.727235012385989], [114.46033165899604, 45.339816799493811], [113.463906691544139, 44.808893134127111], [112.436062453258785, 45.011645616224278], [111.873306105600278, 45.102079372735055], [111.348376906379428, 44.457441718110083], [111.667737257943202, 44.073175767587706], [111.829587843881342, 43.743118394539515], [111.129682244920218, 43.406834011400136], [110.412103306115256, 42.871233628911014], [109.243595819131428, 42.519446316084093], [107.744772576937933, 42.481515814781865], [106.129315627061658, 42.134327704428898], [104.964993931093446, 41.597409572916334], [104.522281935648977, 41.908346666016541], [103.312278273534787, 41.907468166667591], [101.833040399179922, 42.51487295182627], [100.845865513108237, 42.663804429691439], [99.515817498780009, 42.524691473961717], [97.451757440177985, 42.748889675460013], [96.349395786527793, 42.725635280928678], [95.762454868556674, 43.319449164394598], [95.306875441471504, 44.241330878265458], [94.688928664125299, 44.352331854828414], [93.480733677141274, 44.975472113619951], [92.133890822318193, 45.115075995456444], [90.945539585334288, 45.286073309910265], [90.585768263718265, 45.719716091487513], [90.970809360724985, 46.888146063822923], [90.280825636763893, 47.693549099307923], [88.854297723346733, 48.06908173277295], [88.013832228551721, 48.599462795600601], [87.751264276076697, 49.297197984405479]]] } }, - { "type": "Feature", "properties": { "admin": "Mozambique", "name": "Mozambique", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[34.559989047999345, -11.520020033415923], [35.312397902169032, -11.439146416879145], [36.514081658684248, -11.720938002166733], [36.775150994622791, -11.594537448780804], [37.471284214026596, -11.568750909067157], [37.827644891111383, -11.268769219612834], [38.427556593587745, -11.285202325081654], [39.521029900883768, -10.896853936408224], [40.316588576017182, -10.317096042525696], [40.478387485523022, -10.765440769089992], [40.437253045418672, -11.761710707245014], [40.560811395028558, -12.639176527561023], [40.599620395679743, -14.201975192931858], [40.775475294768988, -14.691764418194239], [40.477250604012596, -15.406294447493968], [40.089263950365208, -16.100774021064456], [39.452558628097044, -16.720891208566936], [38.53835086442151, -17.101023044505954], [37.411132846838875, -17.586368096591233], [36.281279331209348, -18.659687595293445], [35.896496616364054, -18.842260430580634], [35.198399692533137, -19.552811374593887], [34.786383497870041, -19.784011732667732], [34.701892531072836, -20.497043145431007], [35.176127150215358, -21.254361260668407], [35.373427768705731, -21.840837090748874], [35.385848253705397, -22.14], [35.562545536369079, -22.09], [35.533934767404297, -23.070787855727751], [35.371774122872374, -23.535358982031692], [35.607470330555621, -23.706563002214676], [35.458745558419615, -24.122609958596545], [35.040734897610655, -24.478350518493798], [34.215824008935463, -24.816314385682652], [33.013210076639005, -25.357573337507731], [32.574632195777859, -25.727318210556088], [32.660363396950082, -26.148584486599443], [32.915955031065685, -26.215867201443459], [32.830120477028878, -26.74219166433619], [32.071665480281062, -26.733820082304902], [31.985779249811962, -26.29177988048022], [31.837777947728057, -25.843331801051342], [31.752408481581874, -25.484283949487406], [31.930588820124242, -24.369416599222532], [31.670397983534645, -23.658969008073861], [31.191409132621278, -22.251509698172395], [32.244988234188007, -21.116488539313689], [32.508693068173436, -20.395292250248303], [32.659743279762573, -20.30429005298231], [32.772707960752619, -19.715592136313294], [32.611994256324884, -19.419382826416268], [32.654885695127142, -18.672089939043492], [32.849860874164385, -17.979057305577175], [32.847638787575839, -16.713398125884613], [32.328238966610222, -16.392074069893749], [31.852040643040592, -16.319417006091374], [31.636498243951188, -16.071990248277881], [31.173063999157673, -15.860943698797868], [30.338954705534537, -15.880839125230242], [30.274255812305103, -15.507786960515208], [30.179481235481827, -14.796099134991525], [33.214024692525207, -13.97186003993615], [33.789700148256678, -14.451830743063068], [34.064825473778619, -14.359950046448118], [34.459633416488536, -14.613009535381421], [34.517666049952304, -15.013708591372609], [34.307291294092089, -15.478641452702592], [34.381291945134045, -16.183559665596039], [35.033810255683527, -16.801299737213089], [35.339062941231639, -16.107440280830108], [35.771904738108347, -15.896858819240721], [35.686845330555926, -14.611045830954328], [35.267956170398001, -13.887834161029563], [34.907151320136158, -13.565424899960565], [34.559989047999345, -13.579997653866872], [34.280006137841973, -12.280025323132504], [34.559989047999345, -11.520020033415923]]] } }, - { "type": "Feature", "properties": { "admin": "Mauritania", "name": "Mauritania", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-12.170750291380299, 14.616834214735503], [-12.830658331747513, 15.303691514542942], [-13.43573767745306, 16.039383042866188], [-14.099521450242175, 16.304302273010489], [-14.577347581428977, 16.598263658102805], [-15.135737270558813, 16.587282416240779], [-15.623666144258689, 16.369337063049809], [-16.120690070041928, 16.45566254319338], [-16.463098110407881, 16.135036119038457], [-16.549707810929061, 16.673892116761959], [-16.270551723688353, 17.166962795474866], [-16.146347418674846, 18.108481553616652], [-16.256883307347163, 19.096715806550304], [-16.377651129613266, 19.593817246981981], [-16.277838100641514, 20.092520656814695], [-16.536323614965465, 20.567866319251486], [-17.063423224342568, 20.99975210213082], [-16.845193650773989, 21.333323472574875], [-12.929101935263528, 21.327070624267559], [-13.118754441774708, 22.771220201096249], [-12.874221564169574, 23.284832261645171], [-11.93722449385332, 23.374594224536164], [-11.969418911171159, 25.933352769468261], [-8.687293667017398, 25.881056219988899], [-8.684399786809051, 27.395744126895998], [-4.92333736817423, 24.974574082940993], [-6.453786586930334, 24.956590684503418], [-5.971128709324247, 20.640833441647626], [-5.488522508150438, 16.325102037007962], [-5.315277268891931, 16.201853745991837], [-5.537744309908446, 15.501689764869253], [-9.550238409859388, 15.486496893775435], [-9.700255092802703, 15.264107367407359], [-10.086846482778212, 15.330485744686269], [-10.650791388379414, 15.132745876521422], [-11.349095017939502, 15.411256008358475], [-11.666078253617853, 15.388208319556295], [-11.834207526079465, 14.799096991428936], [-12.170750291380299, 14.616834214735503]]] } }, - { "type": "Feature", "properties": { "admin": "Malawi", "name": "Malawi", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[34.559989047999345, -11.520020033415923], [34.280006137841973, -12.280025323132504], [34.559989047999345, -13.579997653866872], [34.907151320136158, -13.565424899960565], [35.267956170398001, -13.887834161029563], [35.686845330555926, -14.611045830954328], [35.771904738108347, -15.896858819240721], [35.339062941231639, -16.107440280830108], [35.033810255683527, -16.801299737213089], [34.381291945134045, -16.183559665596039], [34.307291294092089, -15.478641452702592], [34.517666049952304, -15.013708591372609], [34.459633416488536, -14.613009535381421], [34.064825473778619, -14.359950046448118], [33.789700148256678, -14.451830743063068], [33.214024692525207, -13.97186003993615], [32.688165317523122, -13.712857761289273], [32.991764357237876, -12.783870537978272], [33.306422153463068, -12.435778090060214], [33.114289178201908, -11.607198174692311], [33.315310499817279, -10.796549981329695], [33.485687697083584, -10.525558770391111], [33.231387973775291, -9.676721693564799], [32.759375441221316, -9.230599053589058], [33.739729038230443, -9.417150974162722], [33.940837724096532, -9.693673841980292], [34.280006137841973, -10.159999688358402], [34.559989047999345, -11.520020033415923]]] } }, - { "type": "Feature", "properties": { "admin": "Malaysia", "name": "Malaysia", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[101.075515578213299, 6.204867051615891], [101.154218784593809, 5.691384182147713], [101.814281854258013, 5.810808417174228], [102.141186964936423, 6.221636053894655], [102.371147088635212, 6.12820506431096], [102.961705356866673, 5.524495144061077], [103.381214634212142, 4.855001125503746], [103.438575474056165, 4.181605536308381], [103.332122023534851, 3.72669790284297], [103.42942874554052, 3.382868760589019], [103.502447544368877, 2.791018581550204], [103.854674106870334, 2.515454006353763], [104.247931756611479, 1.631141058759055], [104.228811476663523, 1.293048000489534], [103.519707472754433, 1.226333726400682], [102.573615350354771, 1.967115383304744], [101.39063846232915, 2.760813706875623], [101.273539666755838, 3.27029165284118], [100.69543541870668, 3.939139715994869], [100.557407668055092, 4.767280381688279], [100.19670617065772, 5.312492580583678], [100.306260207116509, 6.040561835143875], [100.085756870527078, 6.46448944745029], [100.259596388756918, 6.64282481528957], [101.075515578213299, 6.204867051615891]]], [[[118.618320754064825, 4.47820241944754], [117.882034946770162, 4.137551377779487], [117.01521447150634, 4.306094061699468], [115.86551720587677, 4.306559149590156], [115.51907840379198, 3.169238389494395], [115.134037306785231, 2.821481838386219], [114.621355422017473, 1.430688177898886], [113.805849644019531, 1.217548732911041], [112.859809198052176, 1.497790025229946], [112.380251906383648, 1.410120957846757], [111.797548455860408, 0.904441229654651], [111.159137811326559, 0.976478176269509], [110.514060907027101, 0.773131415200993], [109.830226678508836, 1.338135687664191], [109.663260125773718, 2.006466986494984], [110.396135288537039, 1.663774725751395], [111.168852980597478, 1.850636704918784], [111.370081007942076, 2.697303371588872], [111.796928338672842, 2.885896511238073], [112.995614862115247, 3.102394924324869], [113.712935418758718, 3.893509426281127], [114.204016554828399, 4.525873928236819], [114.659595981913526, 4.00763682699781], [114.869557326315373, 4.348313706881952], [115.347460972150671, 4.316636053887009], [115.405700311343594, 4.955227565933824], [115.450710483869798, 5.447729803891561], [116.220741001450961, 6.143191229675621], [116.725102980619752, 6.924771429873998], [117.129626092600461, 6.928052883324566], [117.643393182446303, 6.422166449403305], [117.689075148592337, 5.98749013918018], [118.347691278152197, 5.708695786965462], [119.181903924639926, 5.407835598162249], [119.110693800941718, 5.016128241389864], [118.439727004064082, 4.966518866389619], [118.618320754064825, 4.47820241944754]]]] } }, - { "type": "Feature", "properties": { "admin": "Namibia", "name": "Namibia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[16.344976840895239, -28.576705010697697], [15.601818068105812, -27.821247247022797], [15.210472446359457, -27.09095590587404], [14.989710727608548, -26.117371921495153], [14.74321414557633, -25.392920017195376], [14.40814415859583, -23.85301401132984], [14.385716586981145, -22.656652927340687], [14.257714064194172, -22.111208184499951], [13.868642205468657, -21.699036960539974], [13.352497999737437, -20.872834161057497], [12.82684533046449, -19.673165785401661], [12.608564080463617, -19.045348809487695], [11.794918654028063, -18.069129327061912], [11.734198846085118, -17.30188933682447], [12.215461460019352, -17.11166838955808], [12.814081251688405, -16.941342868724067], [13.462362094789963, -16.971211846588769], [14.058501417709007, -17.42338062914266], [14.209706658595021, -17.353100681225715], [18.26330936043416, -17.309950860262003], [18.956186964603599, -17.789094740472255], [21.377176141045563, -17.930636488519688], [23.215048455506057, -17.52311614346598], [24.033861525170771, -17.29584319424632], [24.6823490740015, -17.35341073981947], [25.076950310982255, -17.578823337476617], [25.084443393664564, -17.661815687737366], [24.520705193792534, -17.887124932529932], [24.217364536239209, -17.889347019118485], [23.579005568137713, -18.281261081620055], [23.196858351339298, -17.869038181227783], [21.655040317478971, -18.219146010005222], [20.910641310314531, -18.252218926672018], [20.881134067475866, -21.814327080983144], [19.895457797940672, -21.849156996347865], [19.895767856534427, -24.767790215760588], [19.89473432788861, -28.461104831660769], [19.002127312911082, -28.972443129188857], [18.464899122804745, -29.045461928017271], [17.836151971109526, -28.856377862261311], [17.387497185951499, -28.783514092729774], [17.218928663815401, -28.355943291946804], [16.824017368240899, -28.082161553664466], [16.344976840895239, -28.576705010697697]]] } }, - { "type": "Feature", "properties": { "admin": "New Caledonia", "name": "New Caledonia", "continent": "Oceania" }, "geometry": { "type": "Polygon", "coordinates": [[[165.779989862326346, -21.080004978115621], [166.599991489933814, -21.700018812753523], [167.120011428086883, -22.159990736583488], [166.74003462144475, -22.399976088146943], [166.189732293968632, -22.129708347260447], [165.474375441752159, -21.679606621998229], [164.829815301775653, -21.149819838141948], [164.16799523341362, -20.444746595951624], [164.029605747735957, -20.105645847252347], [164.459967075862664, -20.120011895429492], [165.020036249041993, -20.459991143477726], [165.460009393575064, -20.800022067958253], [165.779989862326346, -21.080004978115621]]] } }, - { "type": "Feature", "properties": { "admin": "Niger", "name": "Niger", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[2.154473504249949, 11.940150051313422], [2.177107781593917, 12.625017808477534], [1.024103224297619, 12.851825669806598], [0.993045688490156, 13.335749620003865], [0.429927605805517, 13.988733018443893], [0.295646396495215, 14.444234930880663], [0.374892205414767, 14.928908189346144], [1.015783318698481, 14.968182277887989], [1.385528191746971, 15.323561102759237], [2.74999270998154, 15.409524847876751], [3.63825890464659, 15.56811981858044], [3.723421665063596, 16.184283759012654], [4.270209995143886, 16.852227484601311], [4.267419467800095, 19.155265204337123], [5.677565952180712, 19.601206976799794], [8.572893100629868, 21.565660712159225], [11.999505649471697, 23.471668402596432], [13.581424594790459, 23.040506089769274], [14.143870883855239, 22.491288967371126], [14.8513, 22.862950000000119], [15.096887648181847, 21.308518785074902], [15.471076694407314, 21.048457139565979], [15.487148064850143, 20.730414537025634], [15.90324669766431, 20.387618923417499], [15.68574059414777, 19.957180080642384], [15.300441114979716, 17.927949937405], [15.247731154041842, 16.627305813050778], [13.972201775781681, 15.684365953021139], [13.540393507550785, 14.36713369390122], [13.956698846094124, 13.996691189016925], [13.954476759505607, 13.353448798063765], [14.595781284247604, 13.330426947477859], [14.495787387762899, 12.859396267137353], [14.213530714584746, 12.80203542729333], [14.181336297266906, 12.483656927943169], [13.995352817448289, 12.4615652531383], [13.318701613018558, 13.55635630945795], [13.083987257548809, 13.596147162322492], [12.302071160540546, 13.037189032437535], [11.527803175511504, 13.328980007373556], [10.989593133191532, 13.387322699431191], [10.701031935273816, 13.246917832894038], [10.114814487354748, 13.277251898649464], [9.524928012743088, 12.85110219975456], [9.014933302454436, 12.826659247280414], [7.804671258178869, 13.343526923063731], [7.330746697630046, 13.098038031461213], [6.82044192874781, 13.115091254117598], [6.445426059605721, 13.492768459522718], [5.443058302440135, 13.865923977102225], [4.368343540066006, 13.747481594289408], [4.107945997747378, 13.531215725147941], [3.967282749048933, 12.956108710171574], [3.680633579125924, 12.552903347214167], [3.611180454125587, 11.660167141155965], [2.848643019226585, 12.235635891158207], [2.490163608418015, 12.233052069543588], [2.154473504249949, 11.940150051313422]]] } }, - { "type": "Feature", "properties": { "admin": "Nigeria", "name": "Nigeria", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[8.500287713259693, 4.771982937026847], [7.462108188515939, 4.41210826254624], [7.082596469764438, 4.464689032403228], [6.698072137080598, 4.240594183769516], [5.898172641634686, 4.262453314628984], [5.362804803090881, 4.887970689305957], [5.033574252959368, 5.611802476418233], [4.325607130560683, 6.270651149923466], [3.574180128604552, 6.258300482605717], [2.691701694356254, 6.258817246928628], [2.74906253420022, 7.870734361192886], [2.723792758809509, 8.506845404489708], [2.912308383810255, 9.13760793704432], [3.220351596702101, 9.4441525333997], [3.705438266625918, 10.063210354040207], [3.600070021182801, 10.332186184119406], [3.797112257511713, 10.734745591673104], [3.572216424177469, 11.327939357951516], [3.611180454125558, 11.660167141155966], [3.68063357912581, 12.552903347214222], [3.967282749048848, 12.956108710171572], [4.107945997747321, 13.531215725147829], [4.368343540066063, 13.747481594289324], [5.443058302440163, 13.865923977102295], [6.445426059605636, 13.492768459522676], [6.820441928747753, 13.115091254117514], [7.330746697630017, 13.098038031461199], [7.804671258178784, 13.343526923063745], [9.014933302454462, 12.826659247280427], [9.524928012742945, 12.851102199754477], [10.114814487354689, 13.277251898649409], [10.701031935273702, 13.246917832894081], [10.989593133191532, 13.387322699431108], [11.527803175511393, 13.328980007373584], [12.302071160540521, 13.037189032437521], [13.083987257548866, 13.596147162322563], [13.318701613018558, 13.556356309457824], [13.995352817448346, 12.461565253138343], [14.181336297266792, 12.483656927943112], [14.57717776862253, 12.085360826053501], [14.468192172918974, 11.90475169519341], [14.415378859116682, 11.572368882692071], [13.572949659894558, 10.798565985553564], [13.308676385153914, 10.160362046748926], [13.1675997249971, 9.64062632897341], [12.955467970438971, 9.417771714714702], [12.753671502339214, 8.717762762888993], [12.218872104550597, 8.305824082874322], [12.063946160539556, 7.799808457872301], [11.839308709366801, 7.397042344589434], [11.745774366918509, 6.981382961449753], [11.058787876030349, 6.644426784690593], [10.497375115611417, 7.055357774275562], [10.118276808318255, 7.038769639509879], [9.522705926154398, 6.453482367372116], [9.233162876023043, 6.444490668153334], [8.757532993208626, 5.47966583904791], [8.500287713259693, 4.771982937026847]]] } }, - { "type": "Feature", "properties": { "admin": "Nicaragua", "name": "Nicaragua", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-85.712540452807289, 11.088444932494822], [-86.058488328785245, 11.40343862552994], [-86.525849982432931, 11.806876532432593], [-86.7459915839963, 12.143961900272483], [-87.167516242201131, 12.458257961471656], [-87.668493415054698, 12.909909979702629], [-87.557466600275603, 13.064551703336061], [-87.392386237319201, 12.914018256069836], [-87.316654425795463, 12.984685777228972], [-87.005769009127562, 13.025794379117157], [-86.880557013684339, 13.254204209847241], [-86.733821784191576, 13.263092556201441], [-86.755086636079696, 13.754845485890909], [-86.520708177419877, 13.778487453664436], [-86.312142096689911, 13.771356106008167], [-86.096263800790581, 14.038187364147245], [-85.801294725268576, 13.836054999237586], [-85.698665330736901, 13.960078436738083], [-85.514413011400222, 14.079011745657834], [-85.165364549484792, 14.354369615125076], [-85.148750576502948, 14.560196844943615], [-85.052787441736925, 14.551541042534719], [-84.924500698572388, 14.790492865452348], [-84.820036790694346, 14.819586696832669], [-84.649582078779602, 14.66680532476175], [-84.449335903648588, 14.621614284722494], [-84.228341640952394, 14.748764146376654], [-83.975721401693576, 14.749435939996458], [-83.628584967772895, 14.880073960830298], [-83.489988776366104, 15.016267198135534], [-83.147219000974104, 14.995829169164109], [-83.233234422523907, 14.8998660343981], [-83.28416154654758, 14.676623846897197], [-83.182126430987267, 14.310703029838447], [-83.412499966144424, 13.970077826386554], [-83.519831916014667, 13.56769928634588], [-83.55220720084553, 13.127054348193084], [-83.498515387694255, 12.869292303921226], [-83.473323126951968, 12.419087225794424], [-83.626104499022887, 12.320850328007563], [-83.719613003255034, 11.893124497927724], [-83.650857510090702, 11.629032090700116], [-83.855470343750369, 11.373311265503785], [-83.808935716471538, 11.103043524617274], [-83.655611741861563, 10.938764146361418], [-83.895054490885926, 10.726839097532444], [-84.190178595704822, 10.793450018756671], [-84.355930752281026, 10.999225572142901], [-84.673069017256239, 11.082657172078139], [-84.903003302738924, 10.952303371621895], [-85.561851976244171, 11.217119248901593], [-85.712540452807289, 11.088444932494822]]] } }, - { "type": "Feature", "properties": { "admin": "Netherlands", "name": "Netherlands", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[6.074182570020922, 53.51040334737813], [6.905139601274128, 53.482162177130633], [7.092053256873895, 53.14404328064488], [6.842869500362381, 52.228440253297542], [6.589396599970825, 51.85202912048338], [5.988658074577812, 51.85161570902504], [6.156658155958779, 50.803721015010574], [5.60697594567, 51.037298488969768], [4.973991326526913, 51.475023708698124], [4.047071160507527, 51.267258612668556], [3.314971144228536, 51.345755113319903], [3.830288527043137, 51.620544542031936], [4.705997348661184, 53.091798407597757], [6.074182570020922, 53.51040334737813]]] } }, - { "type": "Feature", "properties": { "admin": "Norway", "name": "Norway", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[28.165547316202911, 71.185474351680497], [31.293418409965472, 70.453787746859902], [30.005435011522785, 70.186258856884876], [31.101078728975118, 69.558080145944857], [29.399580519332879, 69.156916002063056], [28.591929559043187, 69.064776923286686], [29.015572950971968, 69.76649119737796], [27.732292107867885, 70.164193020296281], [26.179622023226298, 69.825298977326142], [25.689212680776389, 69.092113755968995], [24.735679152126714, 68.649556789821432], [23.662049594830759, 68.891247463650515], [22.356237827247405, 68.841741441514941], [21.244936150810723, 69.370443020293109], [20.645592889089581, 69.106247260200846], [20.02526899585791, 69.065138658312705], [19.878559604581248, 68.407194322372604], [17.993868442464386, 68.567391262477329], [17.729181756265344, 68.01055186631622], [16.768878614985535, 68.013936672631374], [16.108712192456832, 67.302455552836889], [15.108411492583055, 66.193866889095418], [13.555689731509087, 64.787027696381458], [13.919905226302202, 64.445420640716108], [13.571916131248766, 64.049114081469654], [12.57993533697393, 64.066218980558332], [11.930569288794228, 63.128317572676977], [11.992064243221531, 61.800362453856557], [12.63114668137524, 61.293571682370079], [12.300365838274896, 60.117932847730046], [11.468271925511173, 59.432393296945989], [11.027368605196925, 58.856149400459394], [10.356556837616095, 59.469807033925363], [8.382000359743641, 58.313288479233265], [7.048748406613297, 58.078884182357271], [5.665835402050418, 58.588155422593658], [5.308234490590733, 59.663231919993805], [4.992078077829005, 61.97099803328426], [5.912900424837885, 62.614472968182682], [8.553411085655766, 63.454008287196459], [10.527709181366784, 64.486038316497471], [12.358346795306371, 65.879725857193151], [14.7611458675816, 67.810641587995121], [16.435927361728968, 68.563205471461671], [19.184028354578512, 69.817444159617807], [21.378416375420606, 70.255169379346043], [23.02374230316158, 70.202071845166259], [24.546543409938515, 71.030496731237221], [26.370049676221807, 70.986261705195361], [28.165547316202911, 71.185474351680497]]], [[[24.72412, 77.85385], [22.49032, 77.44493], [20.72601, 77.67704], [21.41611, 77.93504], [20.8119, 78.25463], [22.88426, 78.45494], [23.28134, 78.07954], [24.72412, 77.85385]]], [[[18.25183, 79.70175], [21.54383, 78.95611], [19.02737, 78.5626], [18.47172, 77.82669], [17.59441, 77.63796], [17.1182, 76.80941], [15.91315, 76.77045], [13.76259, 77.38035], [14.66956, 77.73565], [13.1706, 78.02493], [11.22231, 78.8693], [10.44453, 79.65239], [13.17077, 80.01046], [13.71852, 79.66039], [15.14282, 79.67431], [15.52255, 80.01608], [16.99085, 80.05086], [18.25183, 79.70175]]], [[[25.447625359811887, 80.407340399894494], [27.407505730913492, 80.056405748200447], [25.924650506298171, 79.517833970854539], [23.024465773213613, 79.40001170522909], [20.075188429451877, 79.566823228667232], [19.897266473070907, 79.842361965647498], [18.46226362475792, 79.859880276194403], [17.368015170977454, 80.318896186027004], [20.455992059010693, 80.598155626132225], [21.907944777115397, 80.357679348462071], [22.919252557067431, 80.657144273593488], [25.447625359811887, 80.407340399894494]]]] } }, - { "type": "Feature", "properties": { "admin": "Nepal", "name": "Nepal", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[88.120440708369841, 27.876541652939586], [88.043132765661198, 27.445818589786818], [88.174804315140904, 26.810405178325944], [88.060237664749806, 26.414615383402484], [87.22747195836628, 26.39789805755607], [86.024392938179147, 26.630984605408567], [85.25177859898335, 26.726198431906337], [84.675017938173767, 27.234901231387528], [83.304248895199535, 27.364505723575554], [81.999987420584958, 27.925479234319987], [81.057202589851997, 28.416095282499036], [80.088424513676259, 28.794470119740136], [80.476721225917373, 29.729865220655334], [81.11125613802929, 30.183480943313398], [81.525804477874729, 30.422716986608627], [82.327512648450863, 30.115268052688126], [83.337115106137176, 29.463731594352193], [83.898992954446712, 29.320226141877654], [84.234579705750136, 28.839893703724691], [85.011638218123025, 28.642773952747337], [85.823319940131498, 28.203575954698699], [86.954517043000592, 27.97426178640351], [88.120440708369841, 27.876541652939586]]] } }, - { "type": "Feature", "properties": { "admin": "New Zealand", "name": "New Zealand", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[173.020374790740703, -40.919052422856417], [173.247234328502003, -41.331998793300777], [173.958405389702875, -40.926700534835604], [174.2475867048081, -41.349155368821663], [174.248516880589449, -41.770008233406749], [173.876446568087886, -42.233184096038819], [173.222739699595621, -42.970038344088557], [172.711246372770717, -43.372287693048492], [173.080112746470206, -43.853343601253577], [172.308583612352464, -43.865694268571332], [171.452925246463622, -44.24251881284372], [171.185137974327233, -44.897104180684885], [170.616697219116588, -45.908928724959701], [169.83142215400926, -46.355774834987585], [169.332331170934253, -46.641235446967848], [168.411353794628525, -46.619944756863582], [167.763744745146823, -46.290197442409195], [166.676886021184202, -46.219917494492236], [166.509144321964669, -45.852704766626204], [167.046424188503238, -45.110941257508664], [168.303763462596862, -44.12397307716612], [168.949408807651508, -43.93581918719142], [169.667814569373149, -43.555325616226334], [170.524919875366152, -43.031688327812823], [171.125089960004004, -42.512753594737781], [171.569713983443194, -41.767424411792128], [171.948708937871885, -41.514416599291145], [172.097227004278722, -40.956104424809674], [172.798579543343948, -40.493962090823466], [173.020374790740703, -40.919052422856417]]], [[[174.612008905330526, -36.156397393540537], [175.336615838927173, -37.209097995758263], [175.3575964704375, -36.52619394302112], [175.808886753642469, -36.798942152657681], [175.958490025127475, -37.555381768546063], [176.763195428776555, -37.881253350578696], [177.438813104560495, -37.961248467766488], [178.010354445708657, -37.579824721020124], [178.517093540762801, -37.695373223624792], [178.274731073313802, -38.582812595373092], [177.970460239979332, -39.166342868812968], [177.206992629299123, -39.145775648760839], [176.939980503647007, -39.449736423501562], [177.032946405340113, -39.879942722331471], [176.8858236026052, -40.06597787858216], [176.508017206119348, -40.60480803808958], [176.012440220440283, -41.289624118821493], [175.239567499082966, -41.688307793953236], [175.067898391009408, -41.425894870775075], [174.650972935278418, -41.281820977545443], [175.227630243223615, -40.459235528323397], [174.900156691789959, -39.908933200847216], [173.824046665743992, -39.508854262043506], [173.852261997775315, -39.146602471677461], [174.57480187408035, -38.797683200842748], [174.743473749081033, -38.027807712558378], [174.69701663645057, -37.381128838857954], [174.292028436579187, -36.71109221776144], [174.319003534235549, -36.534823907213884], [173.840996535535766, -36.121980889634109], [173.05417117745958, -35.237125339500331], [172.636005487353714, -34.529106540669382], [173.007042271209457, -34.450661716450334], [173.551298456107475, -35.006183363587958], [174.329390497126241, -35.265495700828616], [174.612008905330526, -36.156397393540537]]]] } }, - { "type": "Feature", "properties": { "admin": "Oman", "name": "Oman", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[58.861141391846573, 21.114034532144299], [58.487985874266961, 20.428985907467101], [58.03431847517659, 20.481437486243347], [57.826372511634098, 20.24300242764863], [57.66576216007094, 19.736004950433109], [57.788700392493368, 19.067570298737646], [57.694390903560667, 18.944709580963799], [57.2342639504338, 18.947991034414255], [56.609650913321971, 18.574267076079476], [56.512189162019482, 18.087113348863934], [56.283520949128011, 17.876066799383945], [55.661491733630683, 17.884128322821535], [55.269939406155189, 17.632309068263194], [55.274900343655091, 17.228354397037659], [54.791002231674113, 16.950696926333357], [54.239252964093751, 17.04498057704998], [53.57050825380459, 16.707662665264674], [53.108572625547502, 16.651051133688977], [52.782184279192066, 17.349742336491229], [52.000009800022227, 19.000003363516068], [54.999981723862405, 19.999994004796118], [55.666659376859869, 22.000001125572307], [55.208341098863187, 22.708329982997007], [55.234489373602869, 23.110992743415348], [55.52584109886449, 23.524869289640911], [55.528631626208288, 23.933604030853498], [55.981213820220503, 24.130542914317854], [55.80411868675624, 24.269604193615287], [55.88623253766805, 24.920830593357486], [56.396847365143984, 24.924732163995508], [56.845140415276049, 24.241673081961487], [57.403452589757428, 23.878594468678834], [58.136947869708322, 23.747930609628835], [58.729211460205427, 23.565667832935414], [59.180501743410346, 22.992395331305456], [59.450097690677033, 22.660270900965592], [59.80806033716285, 22.533611965418199], [59.806148309168087, 22.31052480721419], [59.442191196536399, 21.71454051359208], [59.282407667889871, 21.433885809814875], [58.861141391846573, 21.114034532144299]]], [[[56.391421339753393, 25.895990708921254], [56.261041701080913, 25.714606431576748], [56.070820753814544, 26.055464178973946], [56.362017449779344, 26.395934353128947], [56.485679152253809, 26.309117946878665], [56.391421339753393, 25.895990708921254]]]] } }, - { "type": "Feature", "properties": { "admin": "Pakistan", "name": "Pakistan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[75.158027785140902, 37.13303091078911], [75.896897414050116, 36.666806138651829], [76.192848341785677, 35.898403428687821], [77.837450799474553, 35.494009507787759], [76.871721632804011, 34.653544012992732], [75.757060988268321, 34.504922593721311], [74.240202671204955, 34.748887030571247], [73.749948358051952, 34.317698879527846], [74.104293654277328, 33.441473293586846], [74.451559279278698, 32.764899603805489], [75.258641798813187, 32.271105455040491], [74.405928989564998, 31.692639471965272], [74.421380242820263, 30.97981476493117], [73.450638462217412, 29.976413479119863], [72.823751662084689, 28.961591701772047], [71.777665643200308, 27.913180243434521], [70.61649620960192, 27.989196275335861], [69.514392938113119, 26.940965684511365], [70.168926629522005, 26.491871649678835], [70.282873162725579, 25.722228705339823], [70.844699334602822, 25.215102037043511], [71.0432401874682, 24.356523952730193], [68.842599318318761, 24.359133612560932], [68.176645135373377, 23.691965033456704], [67.443666619745457, 23.944843654876983], [67.145441928989058, 24.663611151624639], [66.37282758979326, 25.425140896093847], [64.530407749291115, 25.237038682551425], [62.905700718034595, 25.218409328710202], [61.497362908784183, 25.078237006118492], [61.874187453056535, 26.239974880472097], [63.316631707619578, 26.756532497661659], [63.23389773952028, 27.217047024030702], [62.755425652929851, 27.378923448184985], [62.727830438085974, 28.259644883735383], [61.771868117118615, 28.699333807890792], [61.369308709564926, 29.303276272085917], [60.874248488208778, 29.829238999952604], [62.549856805272775, 29.318572496044304], [63.550260858011164, 29.468330796826162], [64.148002150331237, 29.340819200145965], [64.350418735618504, 29.560030625928089], [65.046862013616092, 29.472180691031902], [66.346472609324408, 29.88794342703617], [66.38145755398601, 30.738899237586448], [66.938891229118454, 31.304911200479346], [67.683393589147457, 31.303154201781414], [67.792689243444769, 31.582930406209623], [68.556932000609308, 31.713310044882011], [68.926676873657655, 31.620189113892064], [69.317764113242546, 31.901412258424436], [69.262522007122541, 32.501944078088293], [69.687147251264847, 33.105498969041228], [70.323594191371583, 33.358532619758385], [69.93054324735958, 34.020120144175102], [70.881803012988385, 33.988855902638512], [71.156773309213449, 34.348911444632144], [71.115018751921625, 34.733125718722228], [71.613076206350698, 35.153203436822857], [71.498767938121077, 35.650563259415996], [71.262348260385735, 36.074387518857797], [71.846291945283909, 36.509942328429851], [72.920024855444453, 36.720007025696312], [74.067551710917812, 36.836175645488446], [74.575892775372964, 37.02084137628345], [75.158027785140902, 37.13303091078911]]] } }, - { "type": "Feature", "properties": { "admin": "Panama", "name": "Panama", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-77.881571417945239, 7.223771267114783], [-78.214936082660103, 7.512254950384159], [-78.429160732726061, 8.052041123888925], [-78.182095709938608, 8.319182440621772], [-78.43546525746568, 8.387705389840788], [-78.622120530903928, 8.718124497915026], [-79.120307176413732, 8.996092027213022], [-79.557877366845176, 8.932374986197145], [-79.760578172510037, 8.584515082224398], [-80.164481167303322, 8.333315944853593], [-80.382659064439608, 8.29840851484043], [-80.480689256497286, 8.090307522001067], [-80.003689948227148, 7.54752411542337], [-80.276670701808982, 7.419754136581713], [-80.421158006497066, 7.271571966984763], [-80.886400926420791, 7.220541490096535], [-81.059542812814698, 7.817921047390596], [-81.189715745757937, 7.647905585150339], [-81.519514736644666, 7.706610012233908], [-81.721311204744453, 8.108962714058434], [-82.131441209628889, 8.175392767769635], [-82.390934414382542, 8.292362372262287], [-82.820081346350406, 8.290863755725821], [-82.850958014644803, 8.073822740099954], [-82.965783047197348, 8.225027980985983], [-82.9131764391242, 8.423517157419068], [-82.829770677405151, 8.626295477732368], [-82.868657192704759, 8.807266343618521], [-82.719183112300513, 8.925708726431493], [-82.927154914059145, 9.074330145702914], [-82.932890998043561, 9.476812038608172], [-82.546196255203469, 9.566134751824674], [-82.187122565423394, 9.207448635286779], [-82.207586432610952, 8.995575262890098], [-81.808566860669259, 8.95061676679617], [-81.714154018872023, 9.031955471223581], [-81.43928707551153, 8.786234035675715], [-80.947301601876745, 8.858503526235905], [-80.521901211250054, 9.11107208906243], [-79.914599778955974, 9.312765204297618], [-79.573302781884294, 9.611610012241526], [-79.021191779277913, 9.552931423374103], [-79.058450486960353, 9.454565334506523], [-78.500887620747164, 9.420458889193879], [-78.055927700497989, 9.247730414258296], [-77.729513515926399, 8.946844387238867], [-77.353360765273848, 8.670504665558068], [-77.474722866511314, 8.524286200388216], [-77.242566494440069, 7.935278225125442], [-77.431107957656977, 7.638061224798733], [-77.75341386586139, 7.709839789252141], [-77.881571417945239, 7.223771267114783]]] } }, - { "type": "Feature", "properties": { "admin": "Peru", "name": "Peru", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-69.590423753524036, -17.580011895419329], [-69.858443569605839, -18.092693780187009], [-70.3725723944777, -18.347975355708861], [-71.375250210236914, -17.77379851651385], [-71.462040778271117, -17.363487644116379], [-73.444529588500401, -16.359362888252992], [-75.23788265654143, -15.26568287522778], [-76.009205084929931, -14.649286390850317], [-76.423469204397733, -13.823186944232431], [-76.259241502574156, -13.535039157772939], [-77.10619238962181, -12.222716159720816], [-78.092152879534623, -10.377712497604062], [-79.036953091126918, -8.38656788496589], [-79.445920376284832, -7.930833428583859], [-79.760578172510037, -7.194340915560081], [-80.537481655586049, -6.541667575713715], [-81.249996304026411, -6.136834405139182], [-80.926346808582423, -5.690556735866563], [-81.410942552399433, -4.736764825055459], [-81.099669562489353, -4.036394138203696], [-80.302560594387188, -3.404856459164712], [-80.184014858709645, -3.821161797708043], [-80.46929460317692, -4.059286797708999], [-80.442241990872134, -4.425724379090673], [-80.028908047185581, -4.346090996928893], [-79.62497921417615, -4.454198093283494], [-79.205289069317715, -4.959128513207388], [-78.639897223612323, -4.547784112164072], [-78.450683966775628, -3.873096612161375], [-77.83790483265858, -3.003020521663103], [-76.635394253226707, -2.608677666843817], [-75.544995693652027, -1.56160979574588], [-75.233722703741932, -0.911416924649529], [-75.373223232713841, -0.15203175212045], [-75.106624518520064, -0.05720549886486], [-74.441600511355958, -0.530820000819887], [-74.122395189089048, -1.002832533373848], [-73.659503546834586, -1.260491224781134], [-73.070392218707212, -2.308954359550952], [-72.325786505813639, -2.434218031426453], [-71.774760708285385, -2.169789727388937], [-71.413645799429773, -2.342802422702128], [-70.813475714791949, -2.256864515800742], [-70.047708502874841, -2.725156345229699], [-70.692682054309699, -3.742872002785858], [-70.394043952094975, -3.766591485207825], [-69.893635219996611, -4.298186944194326], [-70.79476884630229, -4.251264743673302], [-70.928843349883564, -4.401591485210367], [-71.748405727816532, -4.59398284263301], [-72.891927659787243, -5.274561455916979], [-72.964507208941185, -5.741251315944892], [-73.219711269814596, -6.089188734566076], [-73.120027431923575, -6.629930922068238], [-73.724486660441627, -6.918595472850638], [-73.723401455363486, -7.340998630404412], [-73.987235480429646, -7.523829847853063], [-73.571059332967053, -8.424446709835832], [-73.015382656532537, -9.03283334720806], [-73.226713426390148, -9.462212823121233], [-72.563033006465631, -9.520193780152715], [-72.184890713169821, -10.05359791426943], [-71.302412278921523, -10.079436130415372], [-70.481893886991159, -9.490118096558842], [-70.548685675728393, -11.009146823778462], [-70.093752204046879, -11.123971856331011], [-69.52967810736493, -10.951734307502193], [-68.665079718689611, -12.561300144097171], [-68.880079515239956, -12.89972909917665], [-68.929223802349526, -13.602683607643007], [-68.94888668483658, -14.45363941819328], [-69.339534674747, -14.953195489158828], [-69.160346645774936, -15.323973890853015], [-69.389764166934697, -15.66012908291165], [-68.959635382753291, -16.500697930571267], [-69.590423753524036, -17.580011895419329]]] } }, - { "type": "Feature", "properties": { "admin": "Philippines", "name": "Philippines", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[126.376813592637447, 8.414706325713352], [126.478512811387873, 7.750354112168976], [126.537423944200611, 7.189380601424572], [126.19677290253253, 6.274294338400038], [125.831420526229081, 7.293715318221855], [125.363852166852283, 6.78648529706099], [125.683160841983707, 6.049656887227257], [125.396511672060626, 5.581003322772288], [124.219787632342332, 6.16135549562618], [123.938719517106918, 6.88513560630612], [124.243662144061318, 7.360610459823659], [123.610212437027542, 7.833527329942753], [123.29607140512519, 7.418875637232786], [122.825505812675388, 7.457374579290216], [122.085499302255769, 6.899424139834847], [121.919928013192603, 7.192119452336072], [122.312358840017112, 8.034962063016506], [122.94239790251963, 8.316236883981174], [123.487687616063511, 8.693009751821192], [123.841154412939815, 8.240324204944384], [124.6014697612502, 8.514157619659015], [124.764612257995623, 8.960409450715458], [125.471390822451539, 8.986996975129641], [125.412117954612754, 9.760334784377545], [126.222714471543156, 9.28607432701885], [126.306636997585073, 8.782487494334573], [126.376813592637447, 8.414706325713352]]], [[[123.982437778825798, 10.278778591345811], [123.62318322153277, 9.950090643753297], [123.309920688979332, 9.318268744336676], [122.995883009941636, 9.022188625520398], [122.380054966319463, 9.713360907424201], [122.586088901867072, 9.981044826696104], [122.837081333508706, 10.261156927934234], [122.947410516451896, 10.881868394408029], [123.498849725438447, 10.940624497923945], [123.337774285984722, 10.267383938025445], [124.077935825701218, 11.232725531453706], [123.982437778825798, 10.278778591345811]]], [[[118.504580926590336, 9.316382554558087], [117.174274530100675, 8.367499904814663], [117.664477166821371, 9.066888739452933], [118.386913690261736, 9.684499619989223], [118.98734215706105, 10.376292019080507], [119.511496209797528, 11.36966807702721], [119.689676548339889, 10.554291490109872], [119.029458449378978, 10.003653265823869], [118.504580926590336, 9.316382554558087]]], [[[121.883547804859106, 11.891755072471977], [122.483821242361458, 11.582187404827506], [123.120216506035959, 11.583660183147867], [123.100837843926442, 11.165933742716486], [122.637713657726692, 10.741308498574226], [122.002610304859559, 10.441016750526087], [121.967366978036523, 10.905691229694622], [122.038370396005519, 11.415840969280039], [121.883547804859106, 11.891755072471977]]], [[[125.502551711123488, 12.162694606978347], [125.783464797062152, 11.046121934447767], [125.01188398651226, 11.311454576050377], [125.032761265158115, 10.975816148314703], [125.277449172060244, 10.358722032101308], [124.801819289245714, 10.134678859899889], [124.760168084818474, 10.8379951033923], [124.459101190286049, 10.889929917845633], [124.302521600441722, 11.495370998577227], [124.891012811381572, 11.415582587118589], [124.877990350443952, 11.794189968304988], [124.266761509295705, 12.557760931849682], [125.22711632700782, 12.53572093347719], [125.502551711123488, 12.162694606978347]]], [[[121.527393833503481, 13.069590155484516], [121.262190382981544, 12.2055602075644], [120.833896112146533, 12.704496161342416], [120.323436313967477, 13.466413479053866], [121.18012820850214, 13.429697373910439], [121.527393833503481, 13.069590155484516]]], [[[121.321308221523566, 18.504064642811013], [121.937601353036371, 18.21855235439838], [122.246006300954264, 18.478949896717094], [122.336956821787965, 18.224882717354173], [122.174279412933174, 17.810282701076371], [122.51565392465335, 17.09350474697197], [122.252310825693883, 16.262444362854122], [121.662786086108255, 15.931017564350125], [121.505069614753367, 15.124813544164621], [121.728828566577249, 14.328376369682244], [122.258925409027313, 14.218202216035973], [122.701275669445636, 14.336541245984417], [123.950295037940236, 13.782130642141066], [123.855107049658599, 13.237771104378464], [124.181288690284873, 12.997527370653469], [124.077419061378222, 12.536676947474573], [123.298035109552245, 13.027525539598981], [122.928651971529902, 13.552919826710404], [122.671355015148663, 13.185836289925131], [122.034649692880521, 13.784481919810343], [121.126384718918587, 13.636687323455559], [120.628637323083296, 13.857655747935649], [120.679383579593832, 14.271015529838319], [120.99181928923052, 14.525392767795079], [120.693336216312687, 14.756670640517282], [120.564145135582976, 14.396279201713821], [120.070428501466367, 14.970869452367094], [119.920928582846102, 15.406346747290735], [119.883773228028247, 16.363704331929963], [120.286487664878791, 16.034628811095327], [120.39004723519173, 17.599081122299506], [120.7158671407919, 18.505227362537536], [121.321308221523566, 18.504064642811013]]]] } }, - { "type": "Feature", "properties": { "admin": "Papua New Guinea", "name": "Papua New Guinea", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[155.880025669578401, -6.819996840037758], [155.599991082988765, -6.919990736522491], [155.166994256815087, -6.535931491729299], [154.729191522438327, -5.900828138862208], [154.514114211239644, -5.139117526880012], [154.652503696917336, -5.042430922061839], [154.759990676084357, -5.339983819198493], [155.062917922179338, -5.566791680527486], [155.547746209941693, -6.200654799019658], [156.019965448224752, -6.540013929880386], [155.880025669578401, -6.819996840037758]]], [[[151.982795851854462, -5.478063246282344], [151.459106887008659, -5.560280450058739], [151.301390415653884, -5.840728448106701], [150.754447056276661, -6.083762709175387], [150.241196730753813, -6.317753594592984], [149.709963006793316, -6.316513360218051], [148.890064732050462, -6.026040134305432], [148.318936802360696, -5.74714242922613], [148.401825799756864, -5.437755629094722], [149.298411900020824, -5.583741550319216], [149.845561965127217, -5.505503431829339], [149.996250441690279, -5.026101169457674], [150.139755894164921, -5.001348158389788], [150.236907586873485, -5.53222014732428], [150.807467075808063, -5.455842380396886], [151.089672072553981, -5.113692722192368], [151.647880894170811, -4.757073662946168], [151.537861769821518, -4.167807305521889], [152.136791620084352, -4.148790378438519], [152.338743117480988, -4.31296640382976], [152.318692661751754, -4.867661228050748], [151.982795851854462, -5.478063246282344]]], [[[147.191873814074938, -7.388024183789978], [148.084635858349372, -8.044108168167609], [148.734105259393573, -9.104663588093755], [149.306835158484432, -9.071435642130067], [149.266630894161324, -9.514406019736027], [150.038728469034311, -9.684318129111698], [149.738798456012262, -9.872937106977002], [150.801627638959133, -10.29368661869742], [150.690574985963849, -10.582712904505865], [150.028393182575826, -10.652476088099929], [149.782310012001972, -10.393267103723941], [148.923137648717216, -10.28092253992136], [147.913018426707993, -10.130440769087469], [147.135443150012236, -9.492443536012017], [146.567880894150619, -8.942554619994153], [146.048481073184917, -8.067414239131308], [144.74416792213799, -7.630128269077473], [143.897087844009661, -7.915330498896279], [143.286375767184268, -8.245491224809056], [143.413913202080664, -8.983068942910945], [142.628431431244223, -9.326820570516501], [142.068258905200196, -9.159595635620034], [141.033851760013874, -9.117892754760417], [141.017056919519007, -5.85902190513802], [141.000210402591847, -2.600151055515624], [142.735246616791443, -3.289152927263216], [144.583970982033236, -3.861417738463401], [145.27317955950997, -4.373737888205027], [145.829786411725649, -4.876497897972683], [145.981921828392956, -5.465609226100012], [147.648073358347574, -6.083659356310803], [147.891107619416175, -6.614014580922315], [146.970905389594861, -6.721656589386255], [147.191873814074938, -7.388024183789978]]], [[[153.14003787659874, -4.499983412294113], [152.827292108368255, -4.766427097190998], [152.63867313050298, -4.176127211120927], [152.406025832324929, -3.789742526874561], [151.953236932583536, -3.462062269711821], [151.384279413050024, -3.035421644710111], [150.6620495953388, -2.741486097833956], [150.939965448204532, -2.500002129734028], [151.479984165654514, -2.779985039891386], [151.820015090135087, -2.999971612157907], [152.239989455371074, -3.24000864015366], [152.640016717742526, -3.659983005389647], [153.019993524384631, -3.980015150573293], [153.14003787659874, -4.499983412294113]]]] } }, - { "type": "Feature", "properties": { "admin": "Poland", "name": "Poland", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[15.016995883858666, 51.106674099321566], [14.607098422919531, 51.745188096719964], [14.685026482815685, 52.089947414755187], [14.437599725002197, 52.624850165408382], [14.074521111719488, 52.981262518925426], [14.353315463934136, 53.248171291712957], [14.119686313542584, 53.757029120491026], [14.802900424873455, 54.050706285205735], [16.363477003655728, 54.513158677785711], [17.622831658608671, 54.851535956432897], [18.620858595461637, 54.682605699270766], [18.696254510175461, 54.438718777069276], [19.6606400896064, 54.426083889373913], [20.89224450041862, 54.312524929412518], [22.731098667092649, 54.327536932993311], [23.243987257589506, 54.220566718149129], [23.484127638449841, 53.912497667041123], [23.527535841574995, 53.47012156840654], [23.804934930117774, 53.08973135030606], [23.799198846133375, 52.691099351606553], [23.19949384938618, 52.486977444053664], [23.508002150168689, 52.023646552124717], [23.52707075368437, 51.578454087930233], [24.029985792748899, 50.705406602575174], [23.922757195743259, 50.424881089878738], [23.426508416444388, 50.308505764357449], [22.518450148211596, 49.476773586619736], [22.776418898212619, 49.027395331409608], [22.558137648211751, 49.08573802346713], [21.607808058364206, 49.470107326854077], [20.887955356538406, 49.328772284535823], [20.415839471119849, 49.431453355499755], [19.825022820726865, 49.217125352569219], [19.320712517990469, 49.571574001659179], [18.909574822676316, 49.435845852244562], [18.85314415861361, 49.496229763377634], [18.392913852622168, 49.988628648470737], [17.649445021238986, 50.049038397819942], [17.554567091551117, 50.36214590107641], [16.868769158605655, 50.473973700556016], [16.719475945714429, 50.215746568393527], [16.176253289462263, 50.4226073268579], [16.238626743238566, 50.697732652379827], [15.490972120839725, 50.7847299261432], [15.016995883858666, 51.106674099321566]]] } }, - { "type": "Feature", "properties": { "admin": "Puerto Rico", "name": "Puerto Rico", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-66.2824344550082, 18.51476166429536], [-65.771302863209286, 18.426679185453875], [-65.591003790942935, 18.228034979723912], [-65.847163865813755, 17.975905666571855], [-66.599934455009475, 17.98182261806927], [-67.184162360285256, 17.946553453030074], [-67.24242753769434, 18.374460150622934], [-67.100679083917726, 18.520601101144347], [-66.2824344550082, 18.51476166429536]]] } }, - { "type": "Feature", "properties": { "admin": "North Korea", "name": "Dem. Rep. Korea", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[130.640015903852401, 42.39500946712527], [130.780007358931101, 42.220007229168843], [130.400030552288996, 42.280003567059701], [129.965948521037234, 41.941367906251052], [129.667362095254788, 41.601104437825221], [129.705189243692445, 40.882827867184318], [129.188114862179958, 40.661807766271984], [129.010399611528186, 40.485436102859801], [128.633368361526692, 40.189846910150301], [127.967414178581322, 40.025412502597547], [127.533435500194145, 39.756850083976694], [127.502119582225276, 39.323930772451526], [127.385434198110261, 39.213472398427648], [127.783342726757709, 39.050898342437414], [128.349716424676586, 38.612242946927843], [128.205745884311426, 38.370397243801882], [127.780035435090966, 38.304535630845884], [127.073308547067342, 38.256114813788393], [126.683719924018888, 37.804772854151174], [126.237338901881742, 37.840377916000271], [126.174758742376213, 37.749685777328033], [125.689103631697165, 37.940010077459014], [125.568439162295675, 37.752088731429616], [125.275330438336184, 37.66907054295271], [125.24008711151312, 37.857224432927424], [124.981033156433952, 37.948820909164773], [124.712160679219352, 38.108346055649783], [124.985994093933954, 38.548474229479673], [125.221948683778677, 38.665857245430665], [125.13285851450749, 38.848559271798578], [125.386589797060566, 39.387957872061158], [125.321115757346774, 39.551384589184202], [124.737482131042384, 39.660344346671614], [124.265624627785286, 39.928493353834149], [125.079941847840615, 40.569823716792442], [126.182045119329402, 41.107336127276362], [126.86908328664984, 41.816569322266176], [127.343782993682993, 41.50315176041596], [128.208433058790632, 41.466771552082477], [128.052215203972281, 41.994284572917934], [129.59666873587949, 42.424981797854542], [129.994267205933198, 42.985386867843779], [130.640015903852401, 42.39500946712527]]] } }, - { "type": "Feature", "properties": { "admin": "Portugal", "name": "Portugal", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[-9.034817674180244, 41.880570583659669], [-8.671945766626719, 42.134689439454952], [-8.26385698081779, 42.280468654950326], [-8.01317460776991, 41.790886135417118], [-7.422512986673794, 41.792074693359822], [-7.251308966490822, 41.91834605566504], [-6.668605515967655, 41.883386949219577], [-6.389087693700914, 41.381815497394641], [-6.851126674822551, 41.111082668617513], [-6.864019944679383, 40.330871893874821], [-7.026413133156593, 40.184524237624238], [-7.066591559263527, 39.711891587882768], [-7.498632371439724, 39.629571031241802], [-7.098036668313126, 39.03007274022378], [-7.374092169616317, 38.373058580064914], [-7.029281175148794, 38.075764065089757], [-7.166507941099863, 37.803894354802217], [-7.537105475281022, 37.428904323876232], [-7.45372555177809, 37.097787583966053], [-7.855613165711985, 36.838268540996253], [-8.382816127953687, 36.978880113262449], [-8.898856980820325, 36.868809312480771], [-8.746101446965552, 37.6513455266766], [-8.839997524439879, 38.266243394517609], [-9.287463751655221, 38.358485826158592], [-9.526570603869713, 38.737429104154906], [-9.44698889814023, 39.392066148428363], [-9.048305223008425, 39.755093085278766], [-8.977353481471679, 40.159306138665798], [-8.7686840478771, 40.76063894303018], [-8.790853237330309, 41.18433401139125], [-8.990789353867568, 41.543459377603625], [-9.034817674180244, 41.880570583659669]]] } }, - { "type": "Feature", "properties": { "admin": "Paraguay", "name": "Paraguay", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-62.685057135657871, -22.24902922942238], [-62.291179368729203, -21.051634616787389], [-62.265961269770784, -20.513734633061272], [-61.786326463453761, -19.633736667562957], [-60.043564622626477, -19.342746677327419], [-59.11504248720609, -19.356906019775398], [-58.183471442280492, -19.868399346600359], [-58.166392381408038, -20.176700941653674], [-57.870673997617786, -20.732687676681948], [-57.937155727761287, -22.090175876557169], [-56.881509568902885, -22.282153822521476], [-56.473317430229379, -22.086300144135279], [-55.797958136606894, -22.356929620047815], [-55.61068274598113, -22.655619398694839], [-55.517639329639621, -23.57199757252663], [-55.400747239795407, -23.956935316668797], [-55.027901780809543, -24.001273695575225], [-54.652834235235119, -23.839578138933955], [-54.292959560754511, -24.021014092710722], [-54.293476325077435, -24.570799655863958], [-54.428946092330577, -25.162184747012162], [-54.625290696823562, -25.739255466415507], [-54.788794928595038, -26.621785577096126], [-55.695845506398143, -27.387837009390857], [-56.486701626192989, -27.548499037386286], [-57.609759690976134, -27.395898532828383], [-58.618173590719735, -27.123718763947089], [-57.633660040911117, -25.603656508081638], [-57.777217169817924, -25.162339776309032], [-58.807128465394968, -24.771459242453307], [-60.028966030504016, -24.032796319273267], [-60.846564704009907, -23.880712579038288], [-62.685057135657871, -22.24902922942238]]] } }, - { "type": "Feature", "properties": { "admin": "Palestine", "name": "Palestine", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[35.545665317534535, 32.393992011030569], [35.545251906076196, 31.782504787720832], [35.397560662586038, 31.489086005167572], [34.927408481594554, 31.35343537040141], [34.970506626125989, 31.616778469360803], [35.225891554512422, 31.754341132121759], [34.974640740709319, 31.866582343059715], [35.183930291491428, 32.532510687788935], [35.545665317534535, 32.393992011030569]]] } }, - { "type": "Feature", "properties": { "admin": "Qatar", "name": "Qatar", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[50.810108270069563, 24.754742539971371], [50.743910760303677, 25.482424221289389], [51.01335167827348, 26.006991685484191], [51.286461622936045, 26.114582017515865], [51.589078810437243, 25.801112779233375], [51.606700473848804, 25.215670477798735], [51.389607781790623, 24.627385972588051], [51.112415398977006, 24.556330878186721], [50.810108270069563, 24.754742539971371]]] } }, - { "type": "Feature", "properties": { "admin": "Romania", "name": "Romania", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[22.710531447040488, 47.882193915389394], [23.142236362406798, 48.096341050806942], [23.760958286237404, 47.985598456405448], [24.402056105250374, 47.981877753280422], [24.866317172960571, 47.737525743188307], [25.207743361112986, 47.891056423527459], [25.945941196402394, 47.987148749374207], [26.197450392366925, 48.220881252630342], [26.619336785597788, 48.220726223333457], [26.924176059687561, 48.123264472030982], [27.233872918412736, 47.826770941756365], [27.551166212684841, 47.405117092470817], [28.128030226359037, 46.81047638608824], [28.160017937947707, 46.371562608417207], [28.054442986775392, 45.944586086605618], [28.233553501099035, 45.488283189468369], [28.679779493939371, 45.30403087013169], [29.149724969201646, 45.464925442072442], [29.603289015427425, 45.293308010431119], [29.62654340995876, 45.035390936862392], [29.141611769331831, 44.820210272799038], [28.837857700320196, 44.913873806328041], [28.55808149589199, 43.707461656258118], [27.970107049275068, 43.812468166675202], [27.242399529740904, 44.175986029632398], [26.065158725699739, 43.943493760751259], [25.569271681426923, 43.688444729174712], [24.100679152124169, 43.741051337247846], [23.332302280376322, 43.897010809904707], [22.94483239105184, 43.823785305347123], [22.657149692482985, 44.234923000661276], [22.474008416440594, 44.409227606781762], [22.705725538837349, 44.578002834647016], [22.459022251075933, 44.702517198254291], [22.145087924902807, 44.478422349620573], [21.562022739353605, 44.768947251965486], [21.483526238702233, 45.181170152357772], [20.874312778413351, 45.416375433934228], [20.76217492033998, 45.734573065771428], [20.220192498462833, 46.127468980486547], [21.021952345471245, 46.316087958351886], [21.626514926853869, 46.994237779318148], [22.09976769378283, 47.672439276716695], [22.710531447040488, 47.882193915389394]]] } }, - { "type": "Feature", "properties": { "admin": "Russia", "name": "Russia", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[143.648007440362846, 50.747600409541512], [144.65414757708561, 48.976390692737581], [143.173927850517174, 49.306551418650365], [142.558668247650076, 47.861575018904908], [143.533492466404027, 46.836728013692479], [143.505277134372591, 46.137907619809475], [142.747700636973889, 46.740764878926562], [142.092030064054484, 45.966755276058777], [141.906925083585008, 46.805928860046535], [142.018442824470867, 47.780132961612921], [141.904444614835029, 48.859188544299563], [142.135800002205656, 49.615163072297449], [142.179983351815281, 50.952342434281903], [141.594075962490024, 51.935434882202529], [141.682546014573632, 53.301966457728767], [142.606934035410745, 53.762145087287891], [142.209748976815376, 54.225475979216853], [142.654786411712934, 54.365880845753864], [142.914615513276544, 53.704577541714734], [143.260847609632037, 52.740760403039033], [143.235267775647628, 51.756660264688733], [143.648007440362846, 50.747600409541512]]], [[[22.731098667092649, 54.327536932993311], [20.892244500418652, 54.312524929412568], [19.6606400896064, 54.42608388937397], [19.88848147958134, 54.866160386771483], [21.268448927503492, 55.190481675835279], [22.315723504330599, 55.015298570365886], [22.757763706155281, 54.856574408581416], [22.651051873472564, 54.582740993866693], [22.731098667092649, 54.327536932993311]]], [[[180.000000000000114, 70.832199208546669], [178.903425, 70.78114], [178.7253, 71.0988], [180.000000000000114, 71.515714336428246], [180.000000000000114, 70.832199208546669]]], [[[143.60385, 73.21244], [142.08763, 73.20544], [140.038155, 73.31692], [139.86312, 73.36983], [140.81171, 73.76506], [142.06207, 73.85758], [143.48283, 73.47525], [143.60385, 73.21244]]], [[[150.73167, 75.08406], [149.575925, 74.68892], [147.977465, 74.778355], [146.11919, 75.17298], [146.358485, 75.49682], [148.22223, 75.345845], [150.73167, 75.08406]]], [[[145.086285, 75.562625], [144.3, 74.82], [140.61381, 74.84768], [138.95544, 74.61148], [136.97439, 75.26167], [137.51176, 75.94917], [138.831075, 76.13676], [141.471615, 76.09289], [145.086285, 75.562625]]], [[[57.535692579992386, 70.720463975702145], [56.944979282463933, 70.63274323188665], [53.677375115784187, 70.762657782668455], [53.412016635965372, 71.206661688920192], [51.601894565645708, 71.474759019650477], [51.455753615124209, 72.014881089965129], [52.478275180883564, 72.229441636840946], [52.444168735570841, 72.77473135038484], [54.427613559797649, 73.627547512497571], [53.508289829325136, 73.749813951300141], [55.902458937407644, 74.627486477345329], [55.631932814359701, 75.081412258597155], [57.868643833248839, 75.609390367323186], [61.170044386647497, 76.251883450008123], [64.498368361270209, 76.439055487769267], [66.210977003855092, 76.809782213031227], [68.157059767534818, 76.939696763812904], [68.852211134725124, 76.544811306454605], [68.180572544227644, 76.233641669409096], [64.637326287703004, 75.737754625136219], [61.583507521414752, 75.260884507946784], [58.477082147053366, 74.309056301562819], [56.986785516187993, 73.333043524866227], [55.41933597191094, 72.371267605265956], [55.622837762276291, 71.540594794390316], [57.535692579992386, 70.720463975702145]]], [[[106.970130000000111, 76.97419], [107.240000000000123, 76.48], [108.1538, 76.723350000000138], [111.077260000000138, 76.71], [113.33151, 76.22224], [114.13417, 75.84764], [113.88539, 75.327790000000121], [112.77918, 75.03186], [110.151250000000175, 74.47673], [109.4, 74.18], [110.64, 74.04], [112.11919, 73.787740000000113], [113.019540000000234, 73.976930000000138], [113.529580000000294, 73.33505], [113.96881, 73.59488], [115.56782, 73.75285], [118.776330000000215, 73.58772], [119.02, 73.12], [123.20066, 72.97122], [123.257770000000178, 73.73503], [125.380000000000166, 73.56], [126.97644, 73.56549], [128.59126, 73.03871], [129.05157, 72.39872], [128.46, 71.98], [129.715990000000204, 71.19304], [131.288580000000252, 70.786990000000102], [132.253500000000145, 71.8363], [133.857660000000294, 71.386420000000143], [135.56193, 71.655250000000123], [137.49755, 71.34763], [138.234090000000123, 71.62803], [139.86983, 71.487830000000116], [139.14791, 72.4161900000001], [140.46817, 72.849410000000134], [149.5, 72.2], [150.35118000000017, 71.60643], [152.96890000000019, 70.84222], [157.00688, 71.03141], [158.99779, 70.86672], [159.830310000000225, 70.45324], [159.70866, 69.72198], [160.94053000000028, 69.43728], [162.279070000000104, 69.64204], [164.05248, 69.66823], [165.940370000000172, 69.47199], [167.83567, 69.58269], [169.57763000000017, 68.6938], [170.816880000000253, 69.01363], [170.008200000000159, 69.65276], [170.453450000000259, 70.09703], [173.643910000000204, 69.81743], [175.72403000000017, 69.877250000000217], [178.6, 69.4], [180.000000000000114, 68.963636363636553], [180.000000000000114, 64.979708702198465], [179.99281, 64.97433], [178.707200000000199, 64.53493], [177.411280000000147, 64.60821], [178.313000000000187, 64.07593], [178.90825000000018, 63.251970000000128], [179.37034, 62.98262], [179.48636, 62.56894], [179.228250000000116, 62.304100000000133], [177.3643, 62.5219], [174.569290000000194, 61.76915], [173.68013, 61.65261], [172.15, 60.95], [170.6985, 60.33618], [170.330850000000282, 59.88177], [168.90046, 60.57355], [166.294980000000265, 59.7885500000002], [165.840000000000202, 60.16], [164.87674, 59.7316], [163.539290000000108, 59.86871], [163.217110000000218, 59.21101], [162.01733, 58.24328], [162.05297, 57.83912], [163.19191, 57.61503], [163.057940000000144, 56.159240000000111], [162.129580000000203, 56.12219], [161.70146, 55.285680000000148], [162.117490000000117, 54.85514], [160.368770000000325, 54.34433], [160.021730000000218, 53.20257], [158.530940000000157, 52.958680000000236], [158.23118, 51.94269], [156.789790000000266, 51.01105], [156.42000000000013, 51.7], [155.99182, 53.15895], [155.43366, 55.381030000000109], [155.914420000000291, 56.767920000000132], [156.75815, 57.3647], [156.81035, 57.83204], [158.364330000000166, 58.05575], [160.150640000000124, 59.314770000000109], [161.87204, 60.343000000000117], [163.66969, 61.1409], [164.473550000000103, 62.55061], [163.258420000000172, 62.46627], [162.65791, 61.6425], [160.12148, 60.54423], [159.30232, 61.77396], [156.72068, 61.43442], [154.218060000000293, 59.758180000000117], [155.04375, 59.14495], [152.81185, 58.88385], [151.265730000000246, 58.78089], [151.33815, 59.50396], [149.78371, 59.655730000000126], [148.54481, 59.16448], [145.48722, 59.33637], [142.197820000000121, 59.03998], [138.958480000000293, 57.08805], [135.12619, 54.72959], [136.70171, 54.603550000000112], [137.19342, 53.97732], [138.1647, 53.755010000000247], [138.80463, 54.25455], [139.90151, 54.189680000000166], [141.34531, 53.089570000000109], [141.37923, 52.23877], [140.59742000000017, 51.23967], [140.51308, 50.045530000000113], [140.061930000000189, 48.446710000000152], [138.554720000000202, 46.99965], [138.21971, 46.30795], [136.86232, 45.143500000000174], [135.515350000000183, 43.989], [134.869390000000237, 43.39821], [133.536870000000249, 42.81147], [132.90627, 42.79849], [132.278070000000241, 43.284560000000106], [130.935870000000136, 42.55274], [130.78, 42.220000000000191], [130.640000000000157, 42.395], [130.633866408409801, 42.903014634770543], [131.144687941614961, 42.929989732426932], [131.288555129115593, 44.111519680348252], [131.025190000000237, 44.96796], [131.883454217659562, 45.321161607436508], [133.097120000000189, 45.14409], [133.769643996313164, 46.116926988299149], [134.112350000000163, 47.212480000000127], [134.50081, 47.578450000000139], [135.026311476786759, 48.478229885443902], [133.373595819228001, 48.183441677434836], [132.506690000000106, 47.78896], [130.987260000000106, 47.79013], [130.582293328982644, 48.72968740497619], [129.397817824420486, 49.4406000840156], [127.657400000000351, 49.76027], [127.287455682484904, 50.739797268265434], [126.939156528837827, 51.353894151405896], [126.564399041856959, 51.784255479532689], [125.946348911646439, 52.792798570356936], [125.068211297710434, 53.161044826868924], [123.57147, 53.4588], [122.245747918793043, 53.431725979213681], [121.003084751470354, 53.251401068731226], [120.177088657716865, 52.753886216841195], [120.725789015791975, 52.516226304730893], [120.7382, 51.96411], [120.182080000000155, 51.64355], [119.27939, 50.58292], [119.288460728025839, 50.142882798861947], [117.87924441942647, 49.510983384797036], [116.67880089728618, 49.888531399121398], [115.485695428531415, 49.805177313834733], [114.962109816550353, 50.140247300815119], [114.362456496235325, 50.24830272073747], [112.897739699354361, 49.543565375356984], [111.581230910286649, 49.377968248077671], [110.662010532678835, 49.130128078805846], [109.402449171996707, 49.292960516957685], [108.475167270951275, 49.282547715850704], [107.868175897251092, 49.793705145865871], [106.888804152455293, 50.274295966180276], [105.886591424586868, 50.40601919209216], [104.62158, 50.275320000000157], [103.676545444760336, 50.08996613219513], [102.25589, 50.510560000000105], [102.06521, 51.25991], [100.889480421962631, 51.516855780638409], [99.981732212323564, 51.63400625264395], [98.861490513100492, 52.047366034546698], [97.82573978067451, 51.010995184933236], [98.231761509191699, 50.422400621128716], [97.259760000000199, 49.72605], [95.814020000000156, 49.977460000000114], [94.815949334698757, 50.01343333597088], [94.147566359435601, 50.480536607457161], [93.10421, 50.49529], [92.234711541719676, 50.802170722041737], [90.713667433640765, 50.331811835321098], [88.805566847695573, 49.470520738312459], [87.751264276076824, 49.297197984405543], [87.359970330762692, 49.214980780629148], [86.829356723989648, 49.826674709668133], [85.541269972682485, 49.69285858824815], [85.115559523462082, 50.117302964877631], [84.416377394553038, 50.311399644565817], [83.935114780618903, 50.889245510453563], [83.383003778012451, 51.069182847693881], [81.945985548839943, 50.812195949906325], [80.568446893235446, 51.388336493528435], [80.035559523441705, 50.864750881547209], [77.80091556184432, 53.404414984747532], [76.525179477854749, 54.177003485727127], [76.891100294913443, 54.490524400441913], [74.384820000000119, 53.546850000000113], [73.425678745420512, 53.489810289109741], [73.50851606638436, 54.035616766976588], [72.224150018202195, 54.376655381886778], [71.180131056609468, 54.133285224008247], [70.86526655465515, 55.169733588270091], [69.068166945272893, 55.385250149143488], [68.169100376258896, 54.970391750704366], [65.66687, 54.601250000000149], [65.178533563095939, 54.354227810272064], [61.436600000000126, 54.00625], [60.978066440683236, 53.664993394579128], [61.69998619980062, 52.979996446334255], [60.73999311711453, 52.719986477257734], [60.927268507740237, 52.447548326214999], [59.967533807215567, 51.96042043721566], [61.588003371024136, 51.272658799843171], [61.337424350840998, 50.799070136104248], [59.932807244715555, 50.842194118851822], [59.642282342370564, 50.545442206415707], [58.363320000000122, 51.06364], [56.77798, 51.04355], [55.71694, 50.621710000000142], [54.532878452376181, 51.026239732459359], [52.328723585831042, 51.718652248738088], [50.766648390512174, 51.692762356159861], [48.702381626181044, 50.605128485712825], [48.577841424357601, 49.87475962991563], [47.549480421749379, 50.454698391311119], [46.751596307162764, 49.356005764353725], [47.043671502476585, 49.152038886097571], [46.466445753776291, 48.394152330104923], [47.315240000000152, 47.71585], [48.05725, 47.74377], [48.694733514201872, 47.075628160177885], [48.59325000000014, 46.56104], [49.101160000000121, 46.39933], [48.645410000000105, 45.80629], [47.67591, 45.641490000000111], [46.68201, 44.6092], [47.59094, 43.660160000000118], [47.49252, 42.98658], [48.58437000000017, 41.80888], [47.987283156126033, 41.405819200194387], [47.815665724484653, 41.151416124021338], [47.373315464066387, 41.219732367511135], [46.686070591016708, 41.827137152669899], [46.404950799348924, 41.860675157227426], [45.7764, 42.092440000000224], [45.470279168485909, 42.502780666670041], [44.537622918482057, 42.711992702803677], [43.93121, 42.554960000000101], [43.755990000000182, 42.74083], [42.394400000000154, 43.2203], [40.922190000000128, 43.382150000000131], [40.076964959479838, 43.553104153002486], [39.95500857927108, 43.434997666999287], [38.68, 44.28], [37.539120000000104, 44.65721], [36.675460000000122, 45.24469], [37.40317, 45.40451], [38.23295, 46.24087], [37.67372, 46.63657], [39.14767, 47.044750000000128], [39.121200000000123, 47.26336], [38.22353803889947, 47.102189846375971], [38.2551123390298, 47.546400458356956], [38.77057, 47.825620000000228], [39.738277622238982, 47.898937079452068], [39.895620000000136, 48.23241], [39.67465, 48.783820000000127], [40.080789015469477, 49.307429917999364], [40.069040000000108, 49.60105], [38.594988234213552, 49.926461900423718], [38.010631137857068, 49.915661526074715], [37.393459506995228, 50.383953355503664], [36.626167840325387, 50.225590928745127], [35.35611616388811, 50.577197374059139], [35.37791, 50.77394], [35.02218305841793, 51.207572333371495], [34.224815708154402, 51.255993150428921], [34.141978387190612, 51.56641347920619], [34.391730584457228, 51.768881740925892], [33.75269982273587, 52.335074571331646], [32.715760532367163, 52.238465481162159], [32.412058139787767, 52.288694973349763], [32.15944000000021, 52.061250000000101], [31.78597, 52.10168], [31.540018344862254, 52.742052313846429], [31.305200636527978, 53.073995876673301], [31.49764, 53.167430000000124], [32.304519484188368, 53.132726141972839], [32.693643019346119, 53.351420803432141], [32.405598585751157, 53.618045355842], [31.731272820774585, 53.794029446012011], [31.791424187962399, 53.974638576872181], [31.384472283663818, 54.157056382862365], [30.757533807098774, 54.811770941784388], [30.971835971813245, 55.08154775656412], [30.873909132620064, 55.55097646750351], [29.896294386522435, 55.789463202530484], [29.371571893030783, 55.670090643936263], [29.229513380660389, 55.918344224666399], [28.176709425577933, 56.169129950578778], [27.855282016722519, 56.759326483784363], [27.770015903440985, 57.244258124411189], [27.288184848751648, 57.474528306703903], [27.716685825315771, 57.791899115624439], [27.420150000000202, 58.724570000000128], [28.131699253051856, 59.300825100330982], [27.98112, 59.47537], [29.1177, 60.028050000000107], [28.07, 60.503520000000137], [30.211107212044645, 61.780027777749673], [31.139991082491029, 62.357692776124431], [31.516092156711263, 62.867687486412898], [30.035872430142796, 63.552813625738551], [30.444684686003736, 64.204453436939062], [29.544429559047014, 64.948671576590542], [30.21765, 65.80598], [29.054588657352376, 66.944286200622017], [29.977426385220689, 67.69829702419274], [28.445943637818765, 68.364612942163987], [28.591929559043358, 69.064776923286686], [29.39955, 69.15692000000017], [31.101080000000103, 69.55811], [32.132720000000255, 69.905950000000232], [33.77547, 69.301420000000107], [36.51396, 69.06342], [40.292340000000159, 67.9324], [41.059870000000124, 67.457130000000106], [41.125950000000174, 66.79158000000011], [40.01583, 66.266180000000119], [38.38295, 65.99953], [33.918710000000168, 66.75961], [33.18444, 66.63253], [34.81477, 65.900150000000124], [34.87857425307876, 65.436212877048192], [34.943910000000152, 64.414370000000147], [36.23129, 64.10945], [37.012730000000111, 63.84983], [37.141970000000143, 64.33471], [36.539579035089801, 64.76446], [37.176040000000135, 65.143220000000113], [39.59345, 64.520790000000162], [40.4356, 64.76446], [39.762600000000148, 65.49682], [42.09309, 66.47623], [43.01604000000011, 66.41858], [43.94975000000013, 66.06908], [44.53226, 66.756340000000122], [43.69839, 67.35245], [44.187950000000136, 67.95051], [43.45282, 68.57079], [46.250000000000135, 68.25], [46.821340000000156, 67.68997], [45.55517, 67.56652], [45.56202, 67.010050000000192], [46.349150000000137, 66.66767], [47.894160000000248, 66.884550000000146], [48.13876, 67.52238], [50.227660000000142, 67.998670000000132], [53.717430000000164, 68.85738], [54.47171, 68.80815], [53.485820000000118, 68.20131], [54.72628, 68.09702], [55.442680000000124, 68.43866], [57.317020000000149, 68.46628], [58.802000000000206, 68.88082], [59.941420000000178, 68.27844], [61.077840000000165, 68.94069], [60.03, 69.52], [60.55, 69.85], [63.504000000000147, 69.54739], [64.888115, 69.234835000000132], [68.512160000000108, 68.09233000000016], [69.18068, 68.61563000000011], [68.16444, 69.14436], [68.13522, 69.35649], [66.930080000000103, 69.454610000000102], [67.25976, 69.92873], [66.724920000000125, 70.708890000000125], [66.69466, 71.028970000000228], [68.540060000000111, 71.934500000000227], [69.19636, 72.843360000000146], [69.94, 73.04000000000012], [72.58754, 72.77629], [72.79603, 72.22006], [71.84811, 71.40898], [72.47011, 71.09019], [72.79188, 70.39114], [72.564700000000201, 69.02085], [73.66787, 68.4079], [73.2387, 67.7404], [71.280000000000101, 66.320000000000149], [72.423010000000147, 66.172670000000167], [72.82077, 66.53267], [73.920990000000131, 66.789460000000119], [74.186510000000183, 67.28429], [75.052, 67.760470000000154], [74.469260000000148, 68.32899], [74.93584, 68.98918], [73.84236, 69.07146], [73.601870000000204, 69.62763], [74.3998, 70.63175], [73.1011, 71.447170000000241], [74.890820000000204, 72.12119], [74.65926, 72.83227], [75.158010000000175, 72.854970000000108], [75.68351, 72.300560000000118], [75.288980000000109, 71.33556], [76.35911, 71.152870000000135], [75.903130000000161, 71.87401], [77.5766500000001, 72.26717], [79.652020000000107, 72.32011], [81.5, 71.75], [80.61071, 72.582850000000107], [80.51109, 73.6482], [82.25, 73.85], [84.65526, 73.805910000000154], [86.822300000000226, 73.93688], [86.00956, 74.459670000000145], [87.166820000000143, 75.11643], [88.31571, 75.14393], [90.26, 75.64], [92.90058, 75.77333], [93.234210000000132, 76.0472], [95.860000000000127, 76.14], [96.67821, 75.91548], [98.922540000000197, 76.44689], [100.759670000000199, 76.43028], [101.03532, 76.86189], [101.990840000000105, 77.287540000000192], [104.3516, 77.69792], [106.066640000000135, 77.37389], [104.705000000000211, 77.1274], [106.970130000000111, 76.97419]]], [[[105.07547, 78.30689], [99.43814, 77.921], [101.2649, 79.23399], [102.08635, 79.34641], [102.837815, 79.28129], [105.37243, 78.71334], [105.07547, 78.30689]]], [[[51.136186557831266, 80.54728017854093], [49.793684523320692, 80.415427761548202], [48.894411248577526, 80.33956675894369], [48.75493655782175, 80.175468248200829], [47.586119012244147, 80.010181179515328], [46.502825962109647, 80.247246812654339], [47.072455275262897, 80.559424140129451], [44.846958042181107, 80.589809882317169], [46.799138624871226, 80.771917629713627], [48.31847741068465, 80.784009914869927], [48.52280602396668, 80.514568996900138], [49.097189568890897, 80.753985907708412], [50.039767693894603, 80.918885403151791], [51.522932977103679, 80.699725653801906], [51.136186557831266, 80.54728017854093]]], [[[99.93976, 78.88094], [97.75794, 78.7562], [94.97259, 79.044745], [93.31288, 79.4265], [92.5454, 80.14379], [91.18107, 80.34146], [93.77766, 81.0246], [95.940895, 81.2504], [97.88385, 80.746975], [100.186655, 79.780135], [99.93976, 78.88094]]]] } }, - { "type": "Feature", "properties": { "admin": "Rwanda", "name": "Rwanda", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[30.419104852019235, -1.134659112150416], [30.816134881317705, -1.698914076345388], [30.758308953583104, -2.287250257988368], [30.469696079232978, -2.413857517103458], [29.938359002407935, -2.348486830254238], [29.632176141078585, -2.917857761246096], [29.02492638521678, -2.839257907730157], [29.117478875451546, -2.292211195488384], [29.254834832483336, -2.215109958508911], [29.29188683443661, -1.620055840667987], [29.579466180140876, -1.341313164885626], [29.821518588996003, -1.443322442229785], [30.419104852019235, -1.134659112150416]]] } }, - { "type": "Feature", "properties": { "admin": "Western Sahara", "name": "W. Sahara", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-8.794883999049075, 27.120696316022503], [-8.81782833498667, 27.656425889592349], [-8.665589565454805, 27.656425889592349], [-8.66512447756419, 27.58947907155822], [-8.684399786809051, 27.395744126895998], [-8.687293667017398, 25.881056219988899], [-11.969418911171159, 25.933352769468261], [-11.93722449385332, 23.374594224536164], [-12.874221564169574, 23.284832261645171], [-13.118754441774708, 22.771220201096249], [-12.929101935263528, 21.327070624267559], [-16.845193650773989, 21.333323472574875], [-17.063423224342568, 20.99975210213082], [-17.020428432675736, 21.422310288981475], [-17.002961798561085, 21.420734157796574], [-14.750954555713532, 21.50060008390366], [-14.630832688851068, 21.860939846274899], [-14.221167771857251, 22.310163072188153], [-13.891110398809044, 23.691009019459297], [-12.500962693725368, 24.770116278578193], [-12.030758836301613, 26.030866197203036], [-11.718219773800353, 26.104091701760616], [-11.392554897496977, 26.883423977154358], [-10.551262579785272, 26.990807603456879], [-10.18942420087758, 26.860944729107398], [-9.735343390328877, 26.860944729107398], [-9.413037482124464, 27.088476060488514], [-8.794883999049075, 27.120696316022503]]] } }, - { "type": "Feature", "properties": { "admin": "Saudi Arabia", "name": "Saudi Arabia", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[42.779332309750963, 16.34789134364868], [42.64957278826607, 16.77463532151496], [42.347989129410706, 17.075805568911996], [42.270887892431219, 17.474721787989122], [41.754381951673949, 17.833046169500971], [41.221391229015573, 18.671599636301206], [40.939341261566533, 19.486485297111752], [40.247652215339819, 20.174634507726488], [39.801684604660934, 20.338862209550054], [39.139399448408277, 21.29190481209293], [39.023695916506782, 21.986875311770191], [39.066328973147577, 22.579655666590263], [38.492772251140075, 23.688451036060851], [38.023860304523616, 24.078685614512928], [37.483634881344379, 24.285494696545008], [37.154817742671177, 24.858482977797301], [37.209491408035994, 25.084541530858104], [36.931627231602583, 25.602959499610172], [36.639603712721218, 25.826227525327219], [36.249136590323808, 26.570135606384873], [35.640181512196385, 27.376520494083415], [35.130186801907875, 28.063351955674712], [34.632336053207972, 28.058546047471559], [34.787778761541936, 28.607427273059692], [34.832220493312938, 28.957483425404838], [34.956037225084252, 29.356554673778835], [36.068940870922049, 29.19749461518445], [36.501214227043583, 29.505253607698702], [36.740527784987243, 29.865283311476183], [37.503581984209028, 30.003776150018396], [37.668119744626374, 30.338665269485894], [37.998848911294367, 30.508499864213128], [37.002165561681004, 31.508412990844736], [39.004885695152545, 32.010216986614971], [39.195468377444961, 32.16100881604266], [40.399994337736238, 31.889991766887931], [41.889980910007829, 31.190008653278362], [44.709498732284736, 29.178891099559376], [46.568713413281742, 29.099025173452283], [47.459821811722819, 29.002519436147217], [47.708850538937376, 28.526062730416136], [48.416094191283939, 28.552004299426663], [48.807594842327163, 27.689627997339876], [49.299554477745815, 27.461218166609804], [49.470913527225647, 27.109999294538078], [50.152422316290874, 26.689663194275994], [50.212935418504671, 26.277026882425371], [50.113303257045928, 25.943972276304248], [50.23985883972874, 25.608049628190923], [50.527386509000728, 25.327808335872099], [50.660556675016885, 24.999895534764018], [50.810108270069563, 24.754742539971371], [51.112415398977006, 24.556330878186721], [51.389607781790623, 24.627385972588051], [51.579518670463258, 24.245497137951102], [51.617707553926969, 24.014219265228824], [52.000733270074321, 23.001154486578937], [55.006803012924898, 22.496947536707129], [55.208341098863187, 22.708329982997039], [55.666659376859812, 22.000001125572336], [54.999981723862355, 19.999994004796104], [52.000009800022227, 19.000003363516054], [49.116671583864857, 18.616667588774941], [48.183343540241324, 18.166669216377311], [47.466694777217626, 17.116681626854877], [47.000004917189749, 16.949999294497438], [46.749994337761642, 17.283338120996174], [46.366658563020529, 17.233315334537632], [45.399999220568752, 17.333335069238554], [45.216651238797184, 17.43332896572333], [44.062613152855072, 17.410358791569589], [43.791518589051904, 17.319976711491105], [43.380794305196098, 17.579986680567668], [43.115797560403351, 17.088440456607369], [43.218375278502734, 16.666889960186406], [42.779332309750963, 16.34789134364868]]] } }, - { "type": "Feature", "properties": { "admin": "Sudan", "name": "Sudan", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[33.963392794971178, 9.464285229420623], [33.824963480907506, 9.48406084571536], [33.842130853028145, 9.981914637215992], [33.721959248183097, 10.325262079630191], [33.206938084561777, 10.720111638406591], [33.086766479716729, 11.441141267476493], [33.206938084561777, 12.179338268667093], [32.743419037302537, 12.24800775714999], [32.674749548819641, 12.024831919580716], [32.073891524594778, 11.973329803218517], [32.314234734284746, 11.681484477166519], [32.400071594888338, 11.080626452941486], [31.850715687025509, 10.531270545078822], [31.352861895524875, 9.810240916008693], [30.837840731903377, 9.707236683284519], [29.996639497988546, 10.290927335388684], [29.618957311332842, 10.084918869940223], [29.515953078608607, 9.793073543888053], [29.000931914987166, 9.604232450560287], [28.966597170745779, 9.398223985111654], [27.970889587744345, 9.398223985111654], [27.833550610778783, 9.604232450560287], [27.112520981708876, 9.638567194801622], [26.752006167173811, 9.466893473594492], [26.477328213242508, 9.552730334198086], [25.96230704962101, 10.136420986302422], [25.790633328413943, 10.411098940233726], [25.069603699343979, 10.27375996326799], [24.79492574541268, 9.810240916008693], [24.537415163602017, 8.917537565731719], [24.194067721187643, 8.728696472403895], [23.886979580860665, 8.619729712933063], [23.805813429466745, 8.666318874542522], [23.459012892355979, 8.954285793489019], [23.394779087017291, 9.26506785729225], [23.557249790142915, 9.681218166538766], [23.554304233502187, 10.089255275915319], [22.977543572692749, 10.714462591998538], [22.864165480244246, 11.142395127807616], [22.87622, 11.384610000000119], [22.50869, 11.67936], [22.49762, 12.26024], [22.28801, 12.64605], [21.93681, 12.588180000000133], [22.03759, 12.95546], [22.29658, 13.37232], [22.18329, 13.78648], [22.51202, 14.09318], [22.30351, 14.32682], [22.567950000000106, 14.944290000000134], [23.02459, 15.68072], [23.886890000000101, 15.61084], [23.837660000000135, 19.580470000000101], [23.850000000000129, 20.0], [25.00000000000011, 20.00304], [25.00000000000011, 22.0], [29.02, 22.0], [32.9, 22.0], [36.86623, 22.0], [37.18872, 21.01885], [36.96941, 20.837440000000125], [37.114700000000134, 19.80796], [37.48179, 18.61409], [37.86276, 18.36786], [38.410089959473218, 17.998307399970312], [37.904000000000103, 17.42754], [37.16747, 17.263140000000128], [36.852530000000108, 16.95655], [36.75389, 16.29186], [36.32322, 14.82249], [36.42951, 14.42211], [36.27022, 13.563330000000118], [35.86363, 12.57828], [35.26049, 12.08286], [34.831630000000125, 11.318960000000116], [34.73115000000012, 10.910170000000106], [34.25745, 10.63009], [33.96162, 9.58358], [33.963392794971178, 9.464285229420623]]] } }, - { "type": "Feature", "properties": { "admin": "South Sudan", "name": "S. Sudan", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[33.963392794971178, 9.464285229420623], [33.97498, 8.68456], [33.82550000000014, 8.37916], [33.294800000000116, 8.35458], [32.95418, 7.7849700000001], [33.56829, 7.71334], [34.0751, 7.22595], [34.25032, 6.82607], [34.70702, 6.59422000000012], [35.298007118233095, 5.506], [34.620196267853935, 4.847122742082034], [34.005, 4.249884947362147], [33.39, 3.79], [32.68642, 3.79232], [31.881450000000136, 3.55827], [31.24556, 3.7819], [30.83385, 3.50917], [29.95349, 4.1737], [29.715995314256013, 4.600804755060152], [29.159078403446635, 4.389267279473244], [28.696677687298795, 4.455077215996993], [28.428993768026992, 4.287154649264607], [27.979977247842946, 4.408413397637388], [27.374226108517625, 5.233944403500173], [27.213409051225248, 5.550953477394613], [26.465909458123289, 5.946717434101855], [26.213418409945113, 6.546603298362127], [25.796647983511257, 6.979315904158169], [25.124130893664805, 7.500085150579422], [25.114932488716867, 7.825104071479244], [24.567369012152191, 8.229187933785452], [23.886979580860665, 8.619729712933063], [24.194067721187643, 8.728696472403895], [24.537415163602017, 8.917537565731719], [24.79492574541268, 9.810240916008693], [25.069603699343979, 10.27375996326799], [25.790633328413943, 10.411098940233726], [25.96230704962101, 10.136420986302422], [26.477328213242508, 9.552730334198086], [26.752006167173811, 9.466893473594492], [27.112520981708876, 9.638567194801622], [27.833550610778783, 9.604232450560287], [27.970889587744345, 9.398223985111654], [28.966597170745779, 9.398223985111654], [29.000931914987166, 9.604232450560287], [29.515953078608607, 9.793073543888053], [29.618957311332842, 10.084918869940223], [29.996639497988546, 10.290927335388684], [30.837840731903377, 9.707236683284519], [31.352861895524875, 9.810240916008693], [31.850715687025509, 10.531270545078822], [32.400071594888338, 11.080626452941486], [32.314234734284746, 11.681484477166519], [32.073891524594778, 11.973329803218517], [32.674749548819641, 12.024831919580716], [32.743419037302537, 12.24800775714999], [33.206938084561777, 12.179338268667093], [33.086766479716729, 11.441141267476493], [33.206938084561777, 10.720111638406591], [33.721959248183097, 10.325262079630191], [33.842130853028145, 9.981914637215992], [33.824963480907506, 9.48406084571536], [33.963392794971178, 9.464285229420623]]] } }, - { "type": "Feature", "properties": { "admin": "Senegal", "name": "Senegal", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-16.713728807023468, 13.594958604379853], [-17.126106736712611, 14.373515733289221], [-17.625042690490655, 14.72954051356407], [-17.185172898822227, 14.91947724045286], [-16.700706346085919, 15.621527411354107], [-16.463098110407881, 16.135036119038457], [-16.120690070041928, 16.45566254319338], [-15.623666144258689, 16.369337063049809], [-15.135737270558813, 16.587282416240779], [-14.577347581428977, 16.598263658102805], [-14.099521450242175, 16.304302273010489], [-13.43573767745306, 16.039383042866188], [-12.830658331747513, 15.303691514542942], [-12.170750291380299, 14.616834214735503], [-12.124887457721256, 13.994727484589784], [-11.927716030311613, 13.422075100147392], [-11.553397793005427, 13.141213690641063], [-11.467899135778522, 12.754518947800973], [-11.513942836950587, 12.442987575729415], [-11.658300950557928, 12.386582749882834], [-12.20356482588563, 12.465647691289401], [-12.278599005573438, 12.354440008997285], [-12.499050665730561, 12.332089952031053], [-13.217818162478235, 12.575873521367964], [-13.700476040084322, 12.586182969610192], [-15.548476935274005, 12.628170070847343], [-15.816574266004251, 12.515567124883345], [-16.147716844130581, 12.547761542201185], [-16.67745195155457, 12.38485158940105], [-16.84152462408127, 13.151393947802557], [-15.931295945692208, 13.130284125211331], [-15.691000535534991, 13.270353094938455], [-15.511812506562931, 13.278569647672864], [-15.141163295949463, 13.509511623585235], [-14.712197231494626, 13.298206691943774], [-14.277701788784553, 13.28058502853224], [-13.844963344772404, 13.505041612191999], [-14.046992356817478, 13.794067898000446], [-14.376713833055785, 13.625680243377371], [-14.687030808968483, 13.63035696049978], [-15.081735398813816, 13.876491807505982], [-15.398770310924457, 13.860368760630916], [-15.624596320039936, 13.623587347869556], [-16.713728807023468, 13.594958604379853]]] } }, - { "type": "Feature", "properties": { "admin": "Solomon Islands", "name": "Solomon Is.", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[162.119024693040842, -10.482719008021133], [162.398645868172196, -10.826367282762119], [161.700032180018354, -10.820011081590222], [161.319796991214702, -10.204751478723123], [161.917383254237933, -10.446700534713653], [162.119024693040842, -10.482719008021133]]], [[[160.852228631837903, -9.872937106977002], [160.462588332357228, -9.89520964929484], [159.849447463214176, -9.794027194867367], [159.640002883135139, -9.639979750205269], [159.70294477766663, -9.242949720906777], [160.362956170898428, -9.400304457235533], [160.688517694337179, -9.610162448772808], [160.852228631837903, -9.872937106977002]]], [[[161.679981724289121, -9.599982191611373], [161.52939660059053, -9.784312025596433], [160.788253208660507, -8.917543226764918], [160.579997186524338, -8.320008640173965], [160.92002811100491, -8.320008640173965], [161.280006138349961, -9.120011488484449], [161.679981724289121, -9.599982191611373]]], [[[159.875027297198585, -8.337320244991714], [159.917401971677975, -8.538289890174864], [159.133677199539335, -8.114181410355398], [158.586113722974687, -7.754823500197713], [158.211149530264834, -7.421872246941147], [158.359977655265425, -7.320017998893915], [158.820001255527671, -7.56000335045739], [159.640002883135139, -8.020026950719567], [159.875027297198585, -8.337320244991714]]], [[[157.53842573468927, -7.347819919466928], [157.339419793933217, -7.404767347852554], [156.902030471014768, -7.176874281445391], [156.491357863591304, -6.765943291860394], [156.542827590153934, -6.599338474151478], [157.140000441718882, -7.021638278840653], [157.53842573468927, -7.347819919466928]]]] } }, - { "type": "Feature", "properties": { "admin": "Sierra Leone", "name": "Sierra Leone", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-11.438779466182053, 6.785916856305746], [-11.708194545935736, 6.860098374860724], [-12.428098924193815, 7.262942002792029], [-12.949049038128193, 7.798645738145736], [-13.124025437868479, 8.163946438016977], [-13.246550258832512, 8.903048610871506], [-12.711957566773076, 9.342711696810765], [-12.596719122762206, 9.620188300001969], [-12.425928514037562, 9.835834051955953], [-12.150338100625003, 9.858571682164378], [-11.917277390988655, 10.046983954300556], [-11.117481248407328, 10.045872911006283], [-10.839151984083299, 9.688246161330367], [-10.622395188835037, 9.267910061068276], [-10.65477047366589, 8.977178452994194], [-10.494315151399629, 8.715540676300433], [-10.505477260774667, 8.348896389189603], [-10.230093553091276, 8.406205552601291], [-10.695594855176477, 7.939464016141085], [-11.14670427086838, 7.396706447779534], [-11.199801805048278, 7.105845648624735], [-11.438779466182053, 6.785916856305746]]] } }, - { "type": "Feature", "properties": { "admin": "El Salvador", "name": "El Salvador", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-87.793111131526558, 13.384480495655051], [-87.904112108089507, 13.149016831917134], [-88.483301561216791, 13.163951320849488], [-88.843227912129692, 13.259733588102474], [-89.256742723329282, 13.4585328231293], [-89.812393561547637, 13.520622056527994], [-90.095554572290951, 13.73533763270073], [-90.064677903996568, 13.881969509328924], [-89.7219339668207, 14.134228013561694], [-89.5342193265205, 14.244815578666302], [-89.587342698916544, 14.362586167859485], [-89.353325975282772, 14.424132798719112], [-89.058511929057644, 14.340029405164085], [-88.843072882832814, 14.140506700085169], [-88.541230841815974, 13.980154730683475], [-88.50399797234968, 13.845485948130854], [-88.065342576840123, 13.964625962779774], [-87.859515347021585, 13.893312486216979], [-87.723502977229387, 13.785050360565503], [-87.793111131526558, 13.384480495655051]]] } }, - { "type": "Feature", "properties": { "admin": "Somaliland", "name": "Somaliland", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[48.938129510296491, 9.451748968946672], [48.486735874226994, 8.837626247589979], [47.78942, 8.003], [46.948328484897942, 7.996876532417386], [43.67875, 9.183580000000116], [43.296975132018744, 9.540477403191742], [42.92812, 10.021940000000139], [42.55876, 10.572580000000126], [42.776851841000948, 10.926878566934416], [43.145304803242126, 11.462039699748853], [43.470659620951658, 11.27770986576388], [43.666668328634834, 10.864169216348158], [44.117803582542805, 10.445538438351603], [44.614259067570849, 10.442205308468941], [45.556940545439133, 10.698029486529775], [46.645401238802997, 10.816549383991171], [47.525657586462778, 11.127228094929986], [48.021596307167769, 11.193063869669741], [48.378783807169263, 11.375481675660122], [48.948206414593457, 11.410621649618516], [48.942005242718423, 11.394266058798163], [48.938491245322595, 10.982327378783451], [48.938232863161076, 9.973500067581481], [48.938129510296491, 9.451748968946672]]] } }, - { "type": "Feature", "properties": { "admin": "Somalia", "name": "Somalia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[49.72862, 11.5789], [50.25878, 11.67957], [50.73202, 12.0219], [51.1112, 12.02464], [51.13387, 11.74815], [51.04153, 11.16651], [51.04531, 10.6409], [50.83418, 10.27972], [50.55239, 9.19874], [50.07092, 8.08173], [49.4527, 6.80466], [48.59455, 5.33911], [47.74079, 4.2194], [46.56476, 2.85529], [45.56399, 2.04576], [44.06815, 1.05283], [43.13597, 0.2922], [42.04157, -0.91916], [41.81095, -1.44647], [41.58513, -1.68325], [40.993, -0.85829], [40.98105, 2.78452], [41.855083092643966, 3.918911920483726], [42.12861, 4.23413], [42.76967, 4.25259], [43.66087, 4.95755], [44.9636, 5.00162], [47.78942, 8.003], [48.486735874226937, 8.837626247589993], [48.938129510296442, 9.451748968946616], [48.938232863161026, 9.973500067581508], [48.938491245322481, 10.982327378783465], [48.942005242718345, 11.394266058798136], [48.948204758509732, 11.410617281697961], [49.26776, 11.43033], [49.72862, 11.5789]]] } }, - { "type": "Feature", "properties": { "admin": "Republic of Serbia", "name": "Serbia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[20.874312778413408, 45.416375433934306], [21.483526238702204, 45.181170152357865], [21.562022739353718, 44.768947251965635], [22.145087924902892, 44.478422349620573], [22.459022251075961, 44.702517198254426], [22.705725538837434, 44.578002834647002], [22.47400841644065, 44.409227606781762], [22.657149692483067, 44.234923000661347], [22.410446404721593, 44.008063462900047], [22.500156691180219, 43.642814439460999], [22.986018507588479, 43.211161200527094], [22.604801466571352, 42.898518785161109], [22.43659467946139, 42.580321153323943], [22.545011834409642, 42.461362006188025], [22.380525750424674, 42.320259507815074], [21.917080000000105, 42.30364], [21.576635989402117, 42.245224397061847], [21.54332, 42.32025], [21.66292, 42.43922], [21.77505, 42.6827], [21.63302, 42.67717], [21.43866, 42.86255], [21.27421, 42.90959], [21.143395, 43.068685000000123], [20.95651, 43.13094], [20.81448, 43.27205], [20.63508, 43.21671], [20.49679, 42.88469], [20.25758, 42.81275], [20.3398, 42.89852], [19.95857, 43.10604], [19.63, 43.213779970270522], [19.48389, 43.35229], [19.21852, 43.52384], [19.454, 43.568100000000115], [19.59976, 44.03847], [19.11761, 44.42307], [19.36803, 44.863], [19.00548, 44.86023], [19.390475701584588, 45.236515611342369], [19.072768995854172, 45.521511135432078], [18.82982, 45.90888], [19.596044549241636, 46.171729844744547], [20.22019249846289, 46.127468980486569], [20.76217492033998, 45.734573065771478], [20.874312778413408, 45.416375433934306]]] } }, - { "type": "Feature", "properties": { "admin": "Suriname", "name": "Suriname", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-57.147436489476874, 5.973149929219161], [-55.949318406789786, 5.772877915872], [-55.841779751190408, 5.953125311706059], [-55.033250291551759, 6.025291449401662], [-53.958044603070888, 5.756548163267764], [-54.478632981979224, 4.896755682795585], [-54.3995422023565, 4.212611395683466], [-54.006930508018996, 3.620037746592558], [-54.181726040246261, 3.189779771330421], [-54.269705166223183, 2.732391669115046], [-54.524754197799709, 2.311848863123785], [-55.097587449755125, 2.523748073736612], [-55.569755011605984, 2.42150625244713], [-55.973322109589361, 2.510363877773016], [-56.073341844290283, 2.220794989425499], [-55.905600145070871, 2.021995754398659], [-55.995698004771739, 1.817667141116601], [-56.53938574891454, 1.89952260986692], [-57.150097825739898, 2.768926906745406], [-57.281433478409703, 3.333491929534119], [-57.601568976457848, 3.334654649260684], [-58.044694383360664, 4.060863552258382], [-57.860209520078691, 4.576801052260449], [-57.914288906472123, 4.812626451024413], [-57.307245856339492, 5.073566595882225], [-57.147436489476874, 5.973149929219161]]] } }, - { "type": "Feature", "properties": { "admin": "Slovakia", "name": "Slovakia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[18.85314415861361, 49.496229763377634], [18.909574822676316, 49.435845852244562], [19.320712517990469, 49.571574001659179], [19.825022820726865, 49.217125352569219], [20.415839471119849, 49.431453355499755], [20.887955356538406, 49.328772284535823], [21.607808058364206, 49.470107326854077], [22.558137648211751, 49.08573802346713], [22.280841912533553, 48.825392157580659], [22.085608351334848, 48.422264309271782], [21.872236362401729, 48.319970811550007], [20.801293979584919, 48.62385407164237], [20.473562045989862, 48.562850043321809], [20.239054396249344, 48.327567247096916], [19.769470656013109, 48.2026911484636], [19.66136355965849, 48.266614895208647], [19.174364861739885, 48.111378892603859], [18.777024773847668, 48.081768296900627], [18.696512892336923, 47.88095368101439], [17.857132602620023, 47.758428860050365], [17.488472934649813, 47.867466132186209], [16.979666782304033, 48.123497015976298], [16.879982944412998, 48.470013332709463], [16.960288120194573, 48.596982326850593], [17.101984897538895, 48.8169688991171], [17.545006951577101, 48.800019029325362], [17.886484816161808, 48.903475246773695], [17.913511590250462, 48.996492824899072], [18.104972771891848, 49.043983466175298], [18.170498488037961, 49.271514797556421], [18.399993523846174, 49.315000515330034], [18.554971144289478, 49.495015367218777], [18.85314415861361, 49.496229763377634]]] } }, - { "type": "Feature", "properties": { "admin": "Slovenia", "name": "Slovenia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[13.806475457421524, 46.509306138691201], [14.632471551174827, 46.431817328469535], [15.137091912504982, 46.658702704447016], [16.011663852612653, 46.683610744811688], [16.202298211337361, 46.852385972676949], [16.370504998447412, 46.841327216166498], [16.564808383864854, 46.503750922219822], [15.768732944408548, 46.238108222023442], [15.671529575267552, 45.834153550797865], [15.323953891672403, 45.731782538427673], [15.327674594797424, 45.452316392593218], [14.935243767972931, 45.471695054702671], [14.595109490627804, 45.6349409043127], [14.411968214585411, 45.466165676447446], [13.715059848697221, 45.500323798192369], [13.937630242578305, 45.591015936864608], [13.698109978905475, 46.016778062517339], [13.806475457421524, 46.509306138691201]]] } }, - { "type": "Feature", "properties": { "admin": "Sweden", "name": "Sweden", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[22.183173455501922, 65.723740546320158], [21.213516879977213, 65.02600535751526], [21.369631381930954, 64.413587958424273], [19.778875766690216, 63.609554348395022], [17.847779168375208, 62.749400132896803], [17.11955488451812, 61.341165676510954], [17.831346062906388, 60.636583360427394], [18.787721795332086, 60.081914374422581], [17.869224887776337, 58.95376618105869], [16.829185011470084, 58.719826972073385], [16.44770958829147, 57.041118069071871], [15.87978559740378, 56.104301866268649], [14.666681349352071, 56.20088511822216], [14.100721062891461, 55.407781073622637], [12.942910597392054, 55.361737372450563], [12.625100538797025, 56.307080186581956], [11.787942335668671, 57.441817125063061], [11.027368605196866, 58.856149400459344], [11.468271925511145, 59.432393296946024], [12.300365838274896, 60.117932847730025], [12.631146681375181, 61.293571682370121], [11.992064243221559, 61.800362453856543], [11.930569288794228, 63.128317572676963], [12.57993533697393, 64.066218980558318], [13.571916131248711, 64.049114081469696], [13.9199052263022, 64.445420640716065], [13.555689731509087, 64.7870276963815], [15.108411492582999, 66.19386688909546], [16.108712192456775, 67.302455552836875], [16.768878614985478, 68.013936672631388], [17.729181756265344, 68.010551866316263], [17.993868442464329, 68.567391262477344], [19.878559604581248, 68.407194322372561], [20.025268995857882, 69.065138658312691], [20.645592889089521, 69.106247260200846], [21.978534783626113, 68.616845608180682], [23.539473097434435, 67.936008612735236], [23.565879754335576, 66.396050930437411], [23.903378533633795, 66.006927395279604], [22.183173455501922, 65.723740546320158]]] } }, - { "type": "Feature", "properties": { "admin": "Swaziland", "name": "Swaziland", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[32.071665480281062, -26.733820082304902], [31.868060337051073, -27.17792734142127], [31.282773064913325, -27.285879408478991], [30.685961948374477, -26.743845310169526], [30.676608514129633, -26.398078301704604], [30.949666782359905, -26.022649021104144], [31.044079624157146, -25.731452325139436], [31.333157586397899, -25.660190525008943], [31.837777947728057, -25.843331801051342], [31.985779249811962, -26.29177988048022], [32.071665480281062, -26.733820082304902]]] } }, - { "type": "Feature", "properties": { "admin": "Syria", "name": "Syria", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[38.792340529136077, 33.378686428352218], [36.834062127435537, 32.312937526980768], [35.719918247222743, 32.709192409794859], [35.700797967274745, 32.716013698857374], [35.836396925608618, 32.868123277308506], [35.821100701650231, 33.277426459276292], [36.066460402172048, 33.824912421192543], [36.611750115715886, 34.201788641897174], [36.448194207512095, 34.59393524834406], [35.998402540843628, 34.644914048799997], [35.905023227692219, 35.410009467097318], [36.149762811026527, 35.821534735653664], [36.417550083163029, 36.040616970355053], [36.685389031731795, 36.259699205056457], [36.739494256341395, 36.817520453431079], [37.066761102045824, 36.623036200500614], [38.167727492024191, 36.901210435527766], [38.699891391765895, 36.712927354472335], [39.522580193852541, 36.716053778625984], [40.673259311695681, 37.091276353497285], [41.212089471203043, 37.074352321921687], [42.349591098811764, 37.22987254490409], [41.837064243340954, 36.605853786763568], [41.289707472505448, 36.358814602192261], [41.383965285005807, 35.628316555314349], [41.00615888851992, 34.419372260062111], [38.792340529136077, 33.378686428352218]]] } }, - { "type": "Feature", "properties": { "admin": "Chad", "name": "Chad", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[14.495787387762899, 12.859396267137353], [14.595781284247604, 13.330426947477859], [13.954476759505607, 13.353448798063765], [13.956698846094124, 13.996691189016925], [13.540393507550785, 14.36713369390122], [13.97217, 15.68437], [15.247731154041842, 16.627305813050778], [15.300441114979716, 17.927949937405], [15.68574059414777, 19.957180080642384], [15.90324669766431, 20.387618923417499], [15.487148064850143, 20.730414537025634], [15.47106, 21.04845], [15.096887648181847, 21.308518785074902], [14.8513, 22.862950000000119], [15.86085, 23.40972], [19.84926, 21.49509], [23.837660000000135, 19.580470000000101], [23.886890000000101, 15.61084], [23.02459, 15.68072], [22.567950000000106, 14.944290000000134], [22.30351, 14.32682], [22.51202, 14.09318], [22.18329, 13.78648], [22.29658, 13.37232], [22.03759, 12.95546], [21.93681, 12.588180000000133], [22.28801, 12.64605], [22.49762, 12.26024], [22.50869, 11.67936], [22.87622, 11.384610000000119], [22.864165480244246, 11.142395127807616], [22.231129184668756, 10.971888739460608], [21.723821648859538, 10.567055568885959], [21.000868361096305, 9.475985215691479], [20.059685499764267, 9.012706000194838], [19.094008009526071, 9.074846910025768], [18.81200971850927, 8.982914536978623], [18.911021762780589, 8.630894680206435], [18.389554884523303, 8.281303615751879], [17.964929640380884, 7.890914008002992], [16.705988396886365, 7.508327541529978], [16.4561845231874, 7.734773667832938], [16.290561557691884, 7.754307359239417], [16.106231723706738, 7.497087917506461], [15.279460483469164, 7.42192454673801], [15.436091749745737, 7.692812404811887], [15.120865512765302, 8.382150173369437], [14.979995558337688, 8.796104234243442], [14.544466586981851, 8.965861314322238], [13.954218377344088, 9.549494940626685], [14.17146609869911, 10.021378282100043], [14.627200555081057, 9.920919297724591], [14.909353875394796, 9.992129421422758], [15.46787275560524, 9.982336737503543], [14.923564894275042, 10.891325181517514], [14.960151808337679, 11.555574042197234], [14.89336, 12.21905], [14.495787387762899, 12.859396267137353]]] } }, - { "type": "Feature", "properties": { "admin": "Togo", "name": "Togo", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[1.865240512712318, 6.14215770102973], [1.060121697604927, 5.928837388528875], [0.836931186536333, 6.279978745952147], [0.570384148774849, 6.914358628767188], [0.490957472342245, 7.411744289576474], [0.712029249686878, 8.312464504423827], [0.461191847342121, 8.677222601756013], [0.365900506195885, 9.46500397382948], [0.367579990245389, 10.191212876827176], [-0.049784715159944, 10.706917832883928], [0.023802524423701, 11.018681748900802], [0.899563022474069, 10.997339382364258], [0.772335646171484, 10.470808213742357], [1.077795037448737, 10.175606594275022], [1.425060662450136, 9.825395412632998], [1.46304284018467, 9.334624335157086], [1.664477573258381, 9.128590399609378], [1.618950636409238, 6.832038072126236], [1.865240512712318, 6.14215770102973]]] } }, - { "type": "Feature", "properties": { "admin": "Thailand", "name": "Thailand", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[102.58493248902667, 12.186594956913279], [101.687157830819928, 12.645740057826568], [100.831809523524839, 12.627084865769204], [100.978467238369191, 13.412721665902563], [100.097797479251099, 13.406856390837429], [100.018732537844528, 12.307001044153353], [99.478920526123602, 10.846366685423545], [99.153772414143134, 9.963061428258554], [99.222398716226749, 9.239255479362425], [99.873831821698118, 9.207862046745118], [100.279646844486194, 8.29515289960605], [100.45927412313273, 7.429572658717175], [101.017327915452697, 6.856868597842476], [101.623079054778032, 6.740622463401918], [102.141186964936367, 6.221636053894626], [101.81428185425797, 5.810808417174242], [101.154218784593837, 5.691384182147713], [101.075515578213327, 6.20486705161592], [100.259596388756933, 6.642824815289542], [100.085756870527092, 6.46448944745029], [99.690690545655727, 6.848212795433595], [99.519641554769606, 7.343453884302759], [98.988252801512289, 7.907993068875325], [98.503786248775967, 8.382305202666286], [98.339661899816988, 7.794511623562384], [98.150009393305808, 8.350007432483876], [98.259150018306229, 8.973922837759799], [98.553550653073017, 9.932959906448543], [99.038120558673953, 10.960545762572435], [99.587286004639694, 11.892762762901695], [99.196353794351637, 12.804748439988666], [99.212011753336071, 13.269293728076462], [99.097755161538728, 13.827502549693275], [98.430819126379859, 14.622027696180831], [98.192074009191373, 15.123702500870349], [98.537375929765687, 15.308497422746081], [98.90334842325673, 16.177824204976115], [98.493761020911322, 16.837835598207928], [97.859122755934848, 17.567946071843657], [97.375896437573516, 18.445437730375811], [97.797782830804394, 18.627080389881751], [98.253723992915582, 19.708203029860041], [98.959675734454848, 19.752980658440944], [99.543309360759281, 20.186597601802056], [100.115987583417819, 20.41784963630818], [100.548881056726856, 20.109237982661124], [100.606293573003128, 19.508344427971217], [101.282014601651667, 19.462584947176762], [101.035931431077742, 18.408928330961611], [101.059547560635139, 17.512497259994486], [102.113591750092453, 18.109101670804161], [102.413004998791592, 17.932781683824281], [102.998705682387694, 17.961694647691598], [103.200192091893726, 18.309632066312769], [103.956476678485288, 18.240954087796872], [104.716947056092465, 17.428858954330078], [104.779320509868768, 16.441864935771445], [105.589038527450128, 15.570316066952856], [105.544338413517664, 14.723933620660414], [105.218776890078871, 14.27321177821069], [104.281418084736586, 14.416743068901363], [102.988422072361601, 14.225721136934464], [102.348099399833004, 13.39424734135822], [102.58493248902667, 12.186594956913279]]] } }, - { "type": "Feature", "properties": { "admin": "Tajikistan", "name": "Tajikistan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[71.014198032520156, 40.244365546218226], [70.648018833299957, 39.935753892571157], [69.559609816368507, 40.103211371412968], [69.464886915977516, 39.526683254548693], [70.549161818325601, 39.604197902986492], [71.784693637991992, 39.279463202464363], [73.67537926625478, 39.431236884105594], [73.928852166646408, 38.505815334622724], [74.257514276022718, 38.606506862943441], [74.864815708316812, 38.378846340481587], [74.829985792952087, 37.990007025701388], [74.980002475895404, 37.419990139305888], [73.948695916646486, 37.421566270490786], [73.260055779924983, 37.495256862938994], [72.636889682917271, 37.047558091778349], [72.193040805962383, 36.94828766534566], [71.84463829945058, 36.738171291646914], [71.448693475230229, 37.065644843080513], [71.541917759084768, 37.905774441065631], [71.239403924448155, 37.953265082341879], [71.348131137990251, 38.258905341132156], [70.806820509732873, 38.486281643216408], [70.376304152309274, 38.138395901027515], [70.270574171840124, 37.73516469985401], [70.116578403610319, 37.588222764632086], [69.518785434857946, 37.608996690413413], [69.196272820924364, 37.15114350030742], [68.859445835245921, 37.344335842430588], [68.135562371701369, 37.023115139304302], [67.829999627559502, 37.144994004864678], [68.392032505165943, 38.157025254868728], [68.176025018185911, 38.901553453113898], [67.442219679641298, 39.140143541005479], [67.701428664017342, 39.580478420564518], [68.536416456989414, 39.533452867178923], [69.011632928345477, 40.086158148756653], [69.329494663372813, 40.727824408524839], [70.666622348925031, 40.960213324541407], [70.458159621059608, 40.49649485937028], [70.601406691372674, 40.218527330072284], [71.014198032520156, 40.244365546218226]]] } }, - { "type": "Feature", "properties": { "admin": "Turkmenistan", "name": "Turkmenistan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[61.21081709172573, 35.650072333309218], [61.123070509694131, 36.491597194966239], [60.377637973883864, 36.52738312432836], [59.234761997316795, 37.412987982730336], [58.436154412678192, 37.522309475243794], [57.330433790928964, 38.029229437810933], [56.619366082592805, 38.121394354803478], [56.180374790273319, 37.935126654607423], [55.511578403551894, 37.964117133123153], [54.800303989486558, 37.392420762678178], [53.921597934795543, 37.198918361961255], [53.735511102112504, 37.906136176091685], [53.880928582581831, 38.952093003895349], [53.101027866432894, 39.290573635407121], [53.357808058491216, 39.975286363274442], [52.693972609269807, 40.033629055331964], [52.91525109234361, 40.87652334244472], [53.85813927594112, 40.631034450842165], [54.736845330632136, 40.951014919593455], [54.0083109881813, 41.551210842447404], [53.721713494690576, 42.123191433270016], [52.916749708880069, 41.868116563477322], [52.81468875510361, 41.135370591794704], [52.502459751196135, 41.783315538086356], [52.94429324729164, 42.116034247397586], [54.079417759014937, 42.324109402020817], [54.755345493392625, 42.04397146256656], [55.455251092353755, 41.259859117185826], [55.968191359282898, 41.308641669269356], [57.096391229079089, 41.32231008561056], [56.93221520368779, 41.82602610937559], [57.786529982337065, 42.170552883465511], [58.629010857991453, 42.751551011723045], [59.976422153569771, 42.223081976890199], [60.083340691981654, 41.425146185871391], [60.46595299667068, 41.22032664648254], [61.547178989513547, 41.2663703476546], [61.882714064384679, 41.084856879229392], [62.374260288344992, 40.053886216790382], [63.518014764261018, 39.363256537425627], [64.170223016216752, 38.892406724598231], [65.215998976507379, 38.402695013984292], [66.546150343700205, 37.974684963526855], [66.518606805288655, 37.362784328758785], [66.217384881459324, 37.393790188133913], [65.745630731066811, 37.661164048812061], [65.588947788357828, 37.305216783185628], [64.746105177677393, 37.111817735333297], [64.546479119733888, 36.31207326918426], [63.982895949158696, 36.007957465146596], [63.193538445900337, 35.857165635718907], [62.984662306576588, 35.404040839167614], [62.230651483005879, 35.270663967422287], [61.21081709172573, 35.650072333309218]]] } }, - { "type": "Feature", "properties": { "admin": "East Timor", "name": "Timor-Leste", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[124.96868248911619, -8.892790215697081], [125.086246372580248, -8.656887302284678], [125.947072381698234, -8.432094821815033], [126.64470421763852, -8.39824675866385], [126.957243280139792, -8.273344821814396], [127.335928175974615, -8.397316582882601], [126.967991978056517, -8.668256117388891], [125.925885044458568, -9.106007175333351], [125.088520135601073, -9.393173109579292], [125.070019972840583, -9.08998748132287], [124.96868248911619, -8.892790215697081]]] } }, - { "type": "Feature", "properties": { "admin": "Trinidad and Tobago", "name": "Trinidad and Tobago", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-61.68, 10.76], [-61.105, 10.89], [-60.895, 10.855], [-60.935, 10.11], [-61.77, 10.0], [-61.95, 10.09], [-61.66, 10.365], [-61.68, 10.76]]] } }, - { "type": "Feature", "properties": { "admin": "Tunisia", "name": "Tunisia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[9.482139926805273, 30.307556057246181], [9.055602654668148, 32.102691962201284], [8.439102817426116, 32.506284898400814], [8.430472853233367, 32.748337307255944], [7.612641635782181, 33.344114895148955], [7.524481642292242, 34.097376410451453], [8.140981479534302, 34.655145982393783], [8.376367628623766, 35.479876003555937], [8.217824334352313, 36.433176988260271], [8.420964389691674, 36.946427313783154], [9.509993523810605, 37.349994411766531], [10.210002475636315, 37.230001735984807], [10.180650262094529, 36.724037787415071], [11.028867221733348, 37.09210317641395], [11.100025668999249, 36.899996039368908], [10.600004510143092, 36.410000108377368], [10.593286573945134, 35.947444362932806], [10.939518670300686, 35.698984076473486], [10.807847120821007, 34.833507188449182], [10.149592726287123, 34.330773016897702], [10.339658644256613, 33.785741685515312], [10.856836378633684, 33.768740139291275], [11.108500603895118, 33.293342800422188], [11.488787469131008, 33.136995754523134], [11.432253452203692, 32.368903103152867], [10.944789666394453, 32.081814683555358], [10.636901482799484, 31.761420803345747], [9.950225050505081, 31.376069647745251], [10.056575148161752, 30.961831366493595], [9.97001712407285, 30.539324856075236], [9.482139926805273, 30.307556057246181]]] } }, - { "type": "Feature", "properties": { "admin": "Turkey", "name": "Turkey", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[36.913127068842151, 41.335358384764291], [38.347664829264502, 40.948586127275711], [39.512606642420238, 41.102762763018561], [40.373432651538245, 41.013672593747337], [41.554084100110707, 41.535656236327604], [42.619548781104548, 41.58317271581992], [43.582745802592704, 41.09214325618256], [43.752657911968491, 40.740200914058811], [43.656436395040963, 40.253563951166157], [44.400008579288759, 40.005000311842302], [44.79398969908199, 39.713002631177027], [44.109225294782355, 39.428136298168049], [44.421402622257595, 38.281281236314513], [44.225755649600522, 37.971584377589345], [44.772699008977739, 37.170444647768441], [44.293451775902852, 37.001514390606353], [43.942258742047343, 37.256227525372928], [42.77912560402185, 37.385263576805798], [42.349591098811764, 37.229872544904104], [41.212089471203015, 37.074352321921729], [40.673259311695702, 37.091276353497356], [39.522580193852512, 36.716053778626012], [38.699891391765917, 36.712927354472313], [38.167727492024156, 36.90121043552778], [37.066761102045824, 36.623036200500614], [36.739494256341366, 36.817520453431108], [36.685389031731816, 36.259699205056499], [36.417550083163086, 36.040616970355096], [36.149762811026584, 35.821534735653664], [35.782084995269848, 36.274995429014915], [36.160821567537049, 36.650605577128367], [35.550936313628334, 36.565442816711325], [34.714553256984367, 36.795532131490909], [34.026894972476455, 36.219960028623966], [32.509158156064096, 36.107563788389193], [31.69959516777956, 36.644275214172602], [30.621624790171062, 36.677864895162308], [30.391096225717114, 36.262980658506983], [29.69997562024556, 36.144357408181001], [28.732902866335387, 36.676831366516431], [27.641186557737363, 36.658822129862749], [27.048767937943289, 37.653360907536005], [26.318218214633042, 38.208133246405382], [26.804700148228726, 38.985760199533551], [26.170785353304375, 39.463612168936457], [27.280019972449388, 40.420013739578302], [28.819977654747209, 40.460011298172212], [29.240003696415574, 41.219990749672682], [31.145933872204434, 41.087621568357058], [32.347979363745786, 41.736264146484629], [33.513282911927512, 42.018960069337304], [35.167703891751863, 42.040224921225438], [36.913127068842151, 41.335358384764291]]], [[[27.192376743282406, 40.690565700842448], [26.358009067497782, 40.151993923496477], [26.043351271272535, 40.617753607743161], [26.056942172965332, 40.824123440100735], [26.294602085075692, 40.936261298174166], [26.604195590936282, 41.562114569661013], [26.117041863720825, 41.826904608724554], [27.135739373490505, 42.141484890301307], [27.996720411905407, 42.007358710287768], [28.115524529744441, 41.622886054036279], [28.988442824018779, 41.299934190428175], [28.806438429486743, 41.05496206314853], [27.619017368284112, 40.999823309893102], [27.192376743282406, 40.690565700842448]]]] } }, - { "type": "Feature", "properties": { "admin": "Taiwan", "name": "Taiwan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[121.777817824389899, 24.394273586519393], [121.175632358892713, 22.790857245367164], [120.747079705896198, 21.970571397382106], [120.220083449383651, 22.814860948166732], [120.106188592612369, 23.556262722258229], [120.694679803552233, 24.53845083261373], [121.49504438688875, 25.295458889257379], [121.951243931161429, 24.997595933527034], [121.777817824389899, 24.394273586519393]]] } }, - { "type": "Feature", "properties": { "admin": "United Republic of Tanzania", "name": "Tanzania", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[33.903711197104592, -0.95], [34.07262, -1.05982], [37.69869, -3.09699], [37.7669, -3.67712], [39.20222, -4.67677], [38.74054, -5.90895], [38.79977, -6.47566], [39.44, -6.84], [39.470000000000134, -7.1], [39.19469, -7.7039], [39.25203, -8.00781], [39.18652, -8.48551], [39.53574, -9.112369999999883], [39.9496, -10.0984], [40.31659, -10.317099999999867], [39.521, -10.89688], [38.427556593587767, -11.285202325081626], [37.82764, -11.26879], [37.47129, -11.56876], [36.775150994622884, -11.59453744878078], [36.514081658684397, -11.720938002166745], [35.312397902169145, -11.439146416879165], [34.559989047999451, -11.520020033415845], [34.28, -10.16], [33.940837724096518, -9.693673841980283], [33.73972, -9.41715], [32.759375441221373, -9.230599053589001], [32.191864861791935, -8.930358981973255], [31.556348097466628, -8.762048841998647], [31.157751336950064, -8.594578747317312], [30.74, -8.34], [30.2, -7.08], [29.62, -6.52], [29.419992710088305, -5.939998874539297], [29.519986606573063, -5.419978936386257], [29.339997592900367, -4.499983412294113], [29.753512404099858, -4.452389418153301], [30.11632, -4.09012], [30.50554, -3.56858], [30.75224, -3.35931], [30.74301, -3.03431], [30.52766, -2.80762], [30.46967, -2.41383], [30.758308953583132, -2.287250257988375], [30.816134881317844, -1.698914076345374], [30.419104852019291, -1.134659112150416], [30.769860000000101, -1.01455], [31.86617, -1.02736], [33.903711197104592, -0.95]]] } }, - { "type": "Feature", "properties": { "admin": "Uganda", "name": "Uganda", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[31.86617, -1.02736], [30.769860000000101, -1.01455], [30.419104852019291, -1.134659112150416], [29.821518588996121, -1.443322442229771], [29.579466180141019, -1.341313164885605], [29.587837762172164, -0.587405694179381], [29.8195, -0.2053], [29.875778842902431, 0.597379868976361], [30.086153598762785, 1.062312730306416], [30.468507521290285, 1.583805446779706], [30.852670118948133, 1.849396470543752], [31.174149204235952, 2.204465236821306], [30.77332, 2.339890000000139], [30.83385, 3.50917], [31.24556, 3.7819], [31.88145, 3.55827], [32.68642, 3.79232], [33.39, 3.79], [34.005, 4.249884947362147], [34.47913, 3.5556], [34.59607, 3.053740000000118], [35.03599, 1.90584], [34.6721, 1.17694], [34.18, 0.515], [33.893568969666994, 0.109813537861839], [33.903711197104592, -0.95], [31.86617, -1.02736]]] } }, - { "type": "Feature", "properties": { "admin": "Ukraine", "name": "Ukraine", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[31.78599816257158, 52.10167796488544], [32.159412062312661, 52.061266994833204], [32.412058139787625, 52.288694973349735], [32.715760532366964, 52.238465481162038], [33.7526998227357, 52.335074571331681], [34.391730584457001, 51.768881740925778], [34.141978387190385, 51.566413479206226], [34.22481570815426, 51.255993150428942], [35.022183058417873, 51.207572333371445], [35.377923618315116, 50.773955390010343], [35.35611616388794, 50.577197374059054], [36.62616784032533, 50.225590928745127], [37.393459506995065, 50.383953355503586], [38.01063113785689, 49.915661526074622], [38.59498823421341, 49.926461900423618], [40.069058465339097, 49.601055406281688], [40.080789015469342, 49.307429917999272], [39.674663934087526, 48.783818467801872], [39.895632358567575, 48.232405097031425], [39.738277622238819, 47.898937079451983], [38.770584751141186, 47.825608222029807], [38.255112339029743, 47.546400458356807], [38.223538038899413, 47.102189846375872], [37.42513715998998, 47.022220567404197], [36.759854770664383, 46.698700263040919], [35.823684523264816, 46.645964463887054], [34.962341749823871, 46.273196519549636], [35.020787794745978, 45.65121898048465], [35.51000857925316, 45.409993394546177], [36.529997999830151, 45.46998973243705], [36.334712762199146, 45.113215643893952], [35.239999220528112, 44.939996242851599], [33.882511020652878, 44.361478583344066], [33.326420932760037, 44.564877020844875], [33.546924269349446, 45.034770819674883], [32.454174432105496, 45.327466132176063], [32.630804477679128, 45.519185695978905], [33.588162062318382, 45.851568508480227], [33.298567335754704, 46.08059845639783], [31.744140252415171, 46.333347886737378], [31.675307244602401, 46.706245022155528], [30.748748813609094, 46.583100084003995], [30.37760867688888, 46.032410183285663], [29.603289015427425, 45.293308010431119], [29.149724969201646, 45.464925442072442], [28.679779493939371, 45.30403087013169], [28.233553501099035, 45.488283189468369], [28.48526940279276, 45.596907050145887], [28.659987420371575, 45.939986884131628], [28.933717482221621, 46.258830471372491], [28.862972446414055, 46.437889309263824], [29.072106967899288, 46.517677720722482], [29.170653924279879, 46.379262396828693], [29.759971958136383, 46.349987697935354], [30.024658644335364, 46.423936672545032], [29.838210076626289, 46.525325832701675], [29.908851759569295, 46.67436066343145], [29.559674106573105, 46.928582872091312], [29.415135125452732, 47.346645209332571], [29.050867954227321, 47.510226955752493], [29.122698195113024, 47.849095160506458], [28.670891147585163, 48.118148505234089], [28.259546746541837, 48.155562242213406], [27.52253746919515, 48.467119452501102], [26.857823520624798, 48.368210761094488], [26.619336785597788, 48.220726223333457], [26.197450392366925, 48.220881252630342], [25.945941196402394, 47.987148749374207], [25.207743361112986, 47.891056423527459], [24.866317172960571, 47.737525743188307], [24.402056105250374, 47.981877753280422], [23.760958286237404, 47.985598456405448], [23.142236362406798, 48.096341050806942], [22.710531447040488, 47.882193915389394], [22.640819939878746, 48.150239569687351], [22.085608351334848, 48.422264309271782], [22.280841912533553, 48.825392157580659], [22.558137648211751, 49.08573802346713], [22.776418898212619, 49.027395331409608], [22.518450148211596, 49.476773586619736], [23.426508416444388, 50.308505764357449], [23.922757195743259, 50.424881089878738], [24.029985792748899, 50.705406602575174], [23.52707075368437, 51.578454087930233], [24.005077752384206, 51.617443956094448], [24.553106316839511, 51.888461005249177], [25.327787713327005, 51.910656032918538], [26.337958611768549, 51.832288723347915], [27.454066196408426, 51.59230337178446], [28.241615024536564, 51.572227077839059], [28.617612745892242, 51.427713934934836], [28.992835320763522, 51.602044379271462], [29.254938185347921, 51.368234361366881], [30.157363722460889, 51.416138414101454], [30.55511722181145, 51.319503485715643], [30.619454380014837, 51.822806098022362], [30.927549269338975, 52.042353420614383], [31.78599816257158, 52.10167796488544]]] } }, - { "type": "Feature", "properties": { "admin": "Uruguay", "name": "Uruguay", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-57.625133429582945, -30.216294854454258], [-56.976025763564721, -30.109686374636119], [-55.97324459494093, -30.883075860316296], [-55.601510179249331, -30.853878676071385], [-54.572451544805105, -31.494511407193745], [-53.787951626182185, -32.047242526987617], [-53.209588995971529, -32.727666110974717], [-53.650543992718084, -33.202004082981823], [-53.373661668498229, -33.768377780900757], [-53.806425950726521, -34.396814874002224], [-54.935866054897716, -34.952646579733617], [-55.674089728403274, -34.752658786764066], [-56.215297003796053, -34.85983570733741], [-57.139685024633096, -34.430456231424238], [-57.817860683815489, -34.462547295877492], [-58.427074144104381, -33.909454441057569], [-58.349611172098854, -33.2631889788154], [-58.132647671121433, -33.040566908502008], [-58.142440355040748, -32.044503676076147], [-57.874937303281875, -31.016556084926201], [-57.625133429582945, -30.216294854454258]]] } }, - { "type": "Feature", "properties": { "admin": "United States of America", "name": "United States", "continent": "North America" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-155.54211, 19.08348], [-155.68817, 18.91619], [-155.93665, 19.05939], [-155.90806, 19.33888], [-156.07347, 19.70294], [-156.02368, 19.81422], [-155.85008, 19.97729], [-155.91907, 20.17395], [-155.86108, 20.26721], [-155.78505, 20.2487], [-155.40214, 20.07975], [-155.22452, 19.99302], [-155.06226, 19.8591], [-154.80741, 19.50871], [-154.83147, 19.45328], [-155.222169999999892, 19.23972], [-155.54211, 19.08348]]], [[[-156.07926, 20.64397], [-156.41445, 20.57241], [-156.58673, 20.783], [-156.70167, 20.8643], [-156.71055, 20.92676], [-156.61258, 21.01249], [-156.25711, 20.91745], [-155.99566, 20.76404], [-156.07926, 20.64397]]], [[[-156.75824, 21.17684], [-156.78933, 21.06873], [-157.32521, 21.09777], [-157.25027, 21.21958], [-156.75824, 21.17684]]], [[[-157.65283, 21.32217], [-157.70703, 21.26442], [-157.7786, 21.27729], [-158.12667, 21.31244], [-158.2538, 21.53919], [-158.29265, 21.57912], [-158.0252, 21.71696], [-157.94161, 21.65272], [-157.65283, 21.32217]]], [[[-159.34512, 21.982], [-159.46372, 21.88299], [-159.80051, 22.06533], [-159.74877, 22.1382], [-159.5962, 22.23618], [-159.36569, 22.21494], [-159.34512, 21.982]]], [[[-94.81758, 49.38905], [-94.639999999999858, 48.840000000000103], [-94.32914, 48.67074], [-93.63087, 48.60926], [-92.61, 48.45], [-91.64, 48.14], [-90.829999999999856, 48.27], [-89.6, 48.01], [-89.272917446636654, 48.019808254582834], [-88.378114183286513, 48.302917588893806], [-87.439792623300207, 47.94], [-86.461990831228135, 47.553338019392037], [-85.652363247403215, 47.220218817730498], [-84.876079881514855, 46.900083319682366], [-84.779238247399817, 46.637101955749117], [-84.54374874544564, 46.538684190449224], [-84.6049, 46.4396], [-84.3367, 46.408770000000104], [-84.142119513673279, 46.512225857115723], [-84.091851264161463, 46.275418606138253], [-83.890765347005654, 46.116926988299149], [-83.616130947590491, 46.116926988299149], [-83.469550747394621, 45.994686387712584], [-83.592850714843067, 45.816893622412543], [-82.550924648758169, 45.347516587905446], [-82.337763125431053, 44.44], [-82.137642381503952, 43.571087551439987], [-82.43, 42.98], [-82.899999999999878, 42.430000000000135], [-83.119999999999877, 42.08], [-83.141999681312555, 41.975681057292995], [-83.029810146806909, 41.832795722005997], [-82.690089280920162, 41.675105088867319], [-82.439277716791608, 41.675105088867319], [-81.277746548167059, 42.209025987306845], [-80.247447679347843, 42.36619985612267], [-78.939362148743683, 42.863611355148116], [-78.92, 42.965], [-79.009999999999863, 43.27], [-79.171673550111862, 43.466339423184301], [-78.720279914042365, 43.625089423184953], [-77.737885097957601, 43.629055589363382], [-76.820034145805565, 43.628784288093748], [-76.5, 44.018458893758599], [-76.375, 44.09631], [-75.31821, 44.81645000000016], [-74.867, 45.00048000000011], [-73.347829999999874, 45.00738], [-71.505059999999858, 45.0082], [-71.405, 45.255000000000123], [-71.08482, 45.305240000000154], [-70.659999999999783, 45.46], [-70.305, 45.915], [-69.99997, 46.69307], [-69.237216, 47.447781], [-68.905, 47.185], [-68.23444, 47.35486], [-67.79046, 47.06636], [-67.79134, 45.702810000000134], [-67.13741, 45.13753], [-66.96466, 44.809700000000149], [-68.03252, 44.3252], [-69.059999999999874, 43.98], [-70.116169999999897, 43.684050000000141], [-70.645475633410967, 43.090238348964043], [-70.81489, 42.8653], [-70.825, 42.335], [-70.494999999999891, 41.805], [-70.08, 41.78], [-70.185, 42.145], [-69.88497, 41.922830000000111], [-69.96503, 41.637170000000161], [-70.64, 41.475], [-71.12039, 41.494450000000164], [-71.859999999999829, 41.32], [-72.295, 41.27], [-72.87643, 41.22065], [-73.71, 40.931102351654481], [-72.24126, 41.119480000000138], [-71.944999999999808, 40.93], [-73.345, 40.63], [-73.982, 40.628], [-73.952325, 40.75075], [-74.25671, 40.47351], [-73.96244, 40.42763], [-74.17838, 39.70926], [-74.90604, 38.93954], [-74.98041, 39.1964], [-75.20002, 39.24845], [-75.52805, 39.4985], [-75.32, 38.96], [-75.071834764789784, 38.782032230179276], [-75.05673, 38.404120000000106], [-75.37747, 38.01551], [-75.94023, 37.21689], [-76.03127, 37.2566], [-75.722049999999783, 37.937050000000106], [-76.23287, 38.319215], [-76.35, 39.15], [-76.542725, 38.717615], [-76.32933, 38.08326], [-76.98999793161353, 38.239991766913384], [-76.301619999999886, 37.917945], [-76.25874, 36.9664000000001], [-75.9718, 36.89726], [-75.868039999999809, 36.55125], [-75.72749, 35.550740000000125], [-76.36318, 34.808540000000129], [-77.39763499999988, 34.51201], [-78.05496, 33.92547], [-78.554349999999815, 33.861330000000116], [-79.06067, 33.49395], [-79.20357, 33.15839], [-80.301325, 32.509355], [-80.86498, 32.0333], [-81.33629, 31.44049], [-81.49042, 30.729990000000122], [-81.31371, 30.03552], [-80.98, 29.18000000000011], [-80.53558499999987, 28.47213], [-80.529999999999774, 28.04], [-80.056539284977532, 26.88000000000013], [-80.088015, 26.205765], [-80.131559999999837, 25.816775], [-80.38103, 25.20616], [-80.679999999999879, 25.08], [-81.17213, 25.201260000000126], [-81.33, 25.64], [-81.709999999999795, 25.87], [-82.239999999999895, 26.730000000000125], [-82.70515, 27.49504], [-82.85526, 27.88624], [-82.65, 28.550000000000146], [-82.929999999999865, 29.100000000000129], [-83.70959, 29.93656], [-84.1, 30.090000000000114], [-85.10882, 29.63615], [-85.28784, 29.686120000000127], [-85.7731, 30.152610000000116], [-86.399999999999878, 30.400000000000112], [-87.530359999999831, 30.27433], [-88.41782, 30.3849], [-89.180489999999836, 30.31598], [-89.593831178419748, 30.159994004836843], [-89.413735, 29.89419], [-89.43, 29.48864], [-89.21767, 29.29108], [-89.40823, 29.15961], [-89.77928, 29.307140000000135], [-90.15463, 29.11743], [-90.880224999999896, 29.148535000000116], [-91.626784999999842, 29.677000000000127], [-92.49906, 29.5523], [-93.22637, 29.78375], [-93.84842, 29.71363], [-94.69, 29.480000000000125], [-95.60026, 28.73863], [-96.59404, 28.30748], [-97.139999999999802, 27.83], [-97.37, 27.38], [-97.379999999999853, 26.69], [-97.33, 26.210000000000115], [-97.139999999999802, 25.87], [-97.529999999999859, 25.84], [-98.239999999999895, 26.060000000000109], [-99.019999999999854, 26.37], [-99.3, 26.84], [-99.52, 27.54], [-100.11, 28.11000000000012], [-100.45584, 28.696120000000118], [-100.957599999999886, 29.380710000000125], [-101.6624, 29.779300000000113], [-102.48, 29.76], [-103.11, 28.97], [-103.94, 29.27], [-104.456969999999814, 29.57196], [-104.705749999999895, 30.12173], [-105.03737, 30.64402], [-105.63159, 31.083830000000113], [-106.1429, 31.39995], [-106.507589999999794, 31.75452], [-108.24, 31.754853718166398], [-108.24194, 31.34222], [-109.035, 31.341940000000161], [-111.02361, 31.33472], [-113.30498, 32.03914], [-114.815, 32.52528], [-114.721389999999829, 32.72083], [-115.991349999999869, 32.61239000000014], [-117.127759999999753, 32.53534], [-117.295937691273863, 33.04622461520389], [-117.944, 33.621236431201389], [-118.410602275897475, 33.740909223124497], [-118.519894822799685, 34.027781577575745], [-119.081, 34.078], [-119.438840642016658, 34.348477178284291], [-120.36778, 34.44711], [-120.62286, 34.60855], [-120.74433, 35.156860000000101], [-121.714569999999853, 36.16153], [-122.54747, 37.551760000000101], [-122.51201, 37.783390000000132], [-122.95319, 38.113710000000104], [-123.7272, 38.951660000000111], [-123.865169999999878, 39.766990000000128], [-124.39807, 40.3132], [-124.17886, 41.142020000000109], [-124.2137, 41.999640000000134], [-124.532839999999894, 42.76599], [-124.14214, 43.70838], [-124.020535, 44.615895], [-123.898929999999893, 45.52341], [-124.079635, 46.86475], [-124.395669999999896, 47.72017], [-124.687210083007812, 48.184432983398537], [-124.566101074218736, 48.379714965820384], [-123.12, 48.04], [-122.587359999999876, 47.096], [-122.34, 47.36], [-122.5, 48.18], [-122.84, 49.0], [-120.0, 49.0], [-117.03121, 49.0], [-116.04818, 49.0], [-112.999999999999872, 49.0], [-110.049999999999812, 49.0], [-107.049999999999898, 49.0], [-104.04826, 48.99986], [-100.65, 49.0], [-97.228720000004699, 49.0007], [-95.159069509171943, 49.0], [-95.15609, 49.38425], [-94.81758, 49.38905]]], [[[-153.006314053336837, 57.115842190165878], [-154.0050902984581, 56.734676825581047], [-154.516402757770067, 56.992748928446687], [-154.670992804971092, 57.461195787172493], [-153.762779507441451, 57.816574612043773], [-153.228729417921073, 57.968968410872421], [-152.564790615835108, 57.901427313866961], [-152.141147223906273, 57.591058661521977], [-153.006314053336837, 57.115842190165878]]], [[[-165.579164191733554, 59.909986884187539], [-166.192770148767238, 59.754440822988961], [-166.848337368821944, 59.941406155020942], [-167.455277066090048, 60.213069159579376], [-166.467792121424566, 60.384169826897775], [-165.674429694663644, 60.293606879306232], [-165.579164191733554, 59.909986884187539]]], [[[-171.731656867539357, 63.782515367275906], [-171.114433560245175, 63.592191067144981], [-170.491112433940657, 63.694975490973505], [-169.682505459653555, 63.431115627691142], [-168.689439460300662, 63.297506212000584], [-168.77194088445458, 63.188598130945437], [-169.529439867204985, 62.976931464277882], [-170.290556200215917, 63.194437567794452], [-170.671385667990847, 63.375821845138965], [-171.553063117538642, 63.317789211675077], [-171.791110602891166, 63.40584585230048], [-171.731656867539357, 63.782515367275906]]], [[[-155.067790290324211, 71.147776394323685], [-154.344165208941206, 70.696408596470192], [-153.900006273392563, 70.889988511835682], [-152.210006069935275, 70.829992173944831], [-152.270002407826127, 70.60000621202984], [-150.739992438744508, 70.430016588005699], [-149.720003018167489, 70.530010484490433], [-147.613361579357047, 70.214034939241785], [-145.689989800225248, 70.120009670686741], [-144.920010959076393, 69.989991767040479], [-143.58944618042517, 70.152514146598307], [-142.072510348713365, 69.851938178172631], [-140.985987521560702, 69.711998399526365], [-140.985988329004869, 69.711998399526365], [-140.992498752029377, 66.000028591568665], [-140.997769748123119, 60.306396796298593], [-140.012997816153074, 60.276837877027575], [-139.03900042031583, 60.000007229240012], [-138.340889999999888, 59.562110000000146], [-137.4525, 58.905000000000101], [-136.47972, 59.46389], [-135.47583, 59.78778], [-134.945, 59.270560000000117], [-134.27111, 58.86111], [-133.355548882207188, 58.410285142645151], [-132.73042, 57.692890000000105], [-131.707809999999853, 56.55212], [-130.00778, 55.91583], [-129.979994263358265, 55.284997870497207], [-130.536110189467223, 54.802753404349389], [-131.08581823797212, 55.178906155002025], [-131.967211467142278, 55.497775580459049], [-132.250010742859445, 56.369996242897443], [-133.539181084356386, 57.178887437562125], [-134.07806292029602, 58.123067531966889], [-135.038211032279037, 58.187714748763931], [-136.628062309954629, 58.212209377670447], [-137.800006279686016, 58.499995429103777], [-139.867787041412981, 59.537761542389134], [-140.825273817133024, 59.72751740176507], [-142.574443535564427, 60.084446519604981], [-143.958880994879848, 59.99918040632339], [-145.925556816827822, 60.458609727614274], [-147.114373949146625, 60.884656073644628], [-148.224306200127643, 60.672989406977152], [-148.018065558850736, 59.978328965893631], [-148.570822516860858, 59.914172675203297], [-149.727857835875824, 59.705658270905545], [-150.608243374616421, 59.368211168039487], [-151.716392788683294, 59.155821031319974], [-151.859433153267105, 59.74498403587959], [-151.40971900124714, 60.725802720779392], [-150.346941494732505, 61.033587551509854], [-150.621110806256951, 61.284424953854447], [-151.895839199816834, 60.727197984451273], [-152.578329841095581, 60.061657212964285], [-154.019172126257558, 59.350279446034264], [-153.287511359653166, 58.864727688219787], [-154.232492438758442, 58.146373602930531], [-155.307491421510207, 57.727794501366319], [-156.308334723923082, 57.422774359763636], [-156.556097378546298, 56.979984849670636], [-158.117216559867728, 56.463608099994175], [-158.433321296197136, 55.994153550838533], [-159.603327399717415, 55.566686102920116], [-160.289719611634183, 55.643580634170561], [-161.223047655257773, 55.364734605523481], [-162.23776607974105, 55.024186916720097], [-163.069446581046378, 54.689737046927171], [-164.785569221027174, 54.40417308208216], [-164.942226325520011, 54.572224839895327], [-163.84833960676562, 55.039431464246107], [-162.870001390615897, 55.348043117893198], [-161.804174974596009, 55.894986477270429], [-160.563604702781134, 56.008054511125025], [-160.070559862284483, 56.418055324928744], [-158.684442918919416, 57.016675116597852], [-158.461097378553944, 57.216921291728866], [-157.722770352183858, 57.570000515363056], [-157.550274421193564, 58.328326321030218], [-157.041674974576949, 58.918884589261708], [-158.194731208305427, 58.615802313869828], [-158.517217984023034, 58.787781480537305], [-159.058606126928709, 58.424186102931671], [-159.711667040017318, 58.931390285876333], [-159.981288825500144, 58.572549140041623], [-160.355271165996498, 59.071123358793628], [-161.355003425115001, 58.670837714260742], [-161.968893602526293, 58.671664537177371], [-162.054986538724648, 59.266925360747436], [-161.874170702135331, 59.633621324290587], [-162.518059048492034, 59.989723619213905], [-163.818341437820123, 59.798055731843377], [-164.662217577146407, 60.267484442782639], [-165.346387702474772, 60.507495632562396], [-165.350831875651835, 61.073895168697497], [-166.121379157555907, 61.500019029376212], [-165.734451870770471, 62.074996853271792], [-164.919178636717788, 62.633076483807919], [-164.562507901039339, 63.146378485763044], [-163.753332485996964, 63.219448961023758], [-163.067224494457832, 63.05945872664801], [-162.260555386381697, 63.541935736741159], [-161.534449836248569, 63.455816962326757], [-160.772506680321101, 63.76610810002326], [-160.958335130842528, 64.222798570402759], [-161.518068407212184, 64.402787584075313], [-160.777777676414729, 64.788603827566405], [-161.391926235987597, 64.777235012462327], [-162.453050096668818, 64.559444688568206], [-162.757786017894034, 64.338605455168803], [-163.54639421288428, 64.559160468190484], [-164.960829841145141, 64.446945095468848], [-166.425288255864473, 64.686672064870706], [-166.845004238939026, 65.088895575614529], [-168.110560065767146, 65.669997056736733], [-166.70527116602193, 66.088317776139391], [-164.474709642575448, 66.576660061297488], [-163.652511766595637, 66.576660061297488], [-163.788601651036117, 66.077207343196662], [-161.677774421210131, 66.116119696712403], [-162.489714525379981, 66.735565090595102], [-163.719716966791083, 67.116394558370089], [-164.430991380856511, 67.616338202577779], [-165.390286831706703, 68.042772121850234], [-166.764440680995989, 68.35887685817967], [-166.204707404626561, 68.883030910916162], [-164.430810513343431, 68.915535386827727], [-163.168613654614489, 69.371114813912882], [-162.930566169261965, 69.858061835399255], [-161.908897264635499, 70.333329983187625], [-160.93479651593367, 70.447689927849567], [-159.039175788387126, 70.891642157668926], [-158.119722866833939, 70.824721177851032], [-156.580824551398024, 71.357763576941736], [-155.067790290324211, 71.147776394323685]]]] } }, - { "type": "Feature", "properties": { "admin": "Uzbekistan", "name": "Uzbekistan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[66.518606805288655, 37.362784328758785], [66.546150343700205, 37.974684963526855], [65.215998976507379, 38.402695013984292], [64.170223016216752, 38.892406724598231], [63.518014764261018, 39.363256537425627], [62.374260288344992, 40.053886216790382], [61.882714064384679, 41.084856879229392], [61.547178989513547, 41.2663703476546], [60.46595299667068, 41.22032664648254], [60.083340691981654, 41.425146185871391], [59.976422153569771, 42.223081976890199], [58.629010857991453, 42.751551011723045], [57.786529982337065, 42.170552883465511], [56.93221520368779, 41.82602610937559], [57.096391229079089, 41.32231008561056], [55.968191359282898, 41.308641669269356], [55.928917270741081, 44.995858466159099], [58.503127068928457, 45.586804307632818], [58.689989048095882, 45.500013739598621], [60.239971958258316, 44.784036770194717], [61.05831994003244, 44.405816962250505], [62.013300408786236, 43.504476630215642], [63.185786981056559, 43.650074978197999], [64.900824415959264, 43.728080552742576], [66.098012322865074, 42.997660020513088], [66.023391554635609, 41.994646307943974], [66.510648634715707, 41.987644151368436], [66.714047072216502, 41.168443508461493], [67.985855747351806, 41.135990708982213], [68.259895867795606, 40.662324530594894], [68.632482944620008, 40.668680731766798], [69.070027296835306, 41.384244289712363], [70.388964878220776, 42.081307684897439], [70.96231489449913, 42.266154283205481], [71.259247674448218, 42.167710679689456], [70.420022414028196, 41.519998277343134], [71.157858514291576, 41.143587144529107], [71.870114780570447, 41.392900092121259], [73.055417108049156, 40.86603302668945], [71.774875115856545, 40.145844428053763], [71.014198032520156, 40.244365546218226], [70.601406691372674, 40.218527330072284], [70.458159621059608, 40.49649485937028], [70.666622348925031, 40.960213324541407], [69.329494663372813, 40.727824408524839], [69.011632928345477, 40.086158148756653], [68.536416456989414, 39.533452867178923], [67.701428664017342, 39.580478420564518], [67.442219679641298, 39.140143541005479], [68.176025018185911, 38.901553453113898], [68.392032505165943, 38.157025254868728], [67.829999627559502, 37.144994004864678], [67.075782098259609, 37.35614390720928], [66.518606805288655, 37.362784328758785]]] } }, - { "type": "Feature", "properties": { "admin": "Venezuela", "name": "Venezuela", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-71.331583624950284, 11.776284084515805], [-71.36000566271079, 11.53999359786121], [-71.947049933546495, 11.423282375530018], [-71.620868292920164, 10.969459947142791], [-71.633063930941063, 10.446494452349027], [-72.074173956984495, 9.865651353388369], [-71.695644090446521, 9.072263088411246], [-71.26455929226772, 9.137194525585981], [-71.039999355743376, 9.859992784052407], [-71.350083787710773, 10.211935126176213], [-71.400623338492224, 10.968969021036013], [-70.155298834906503, 11.375481675660039], [-70.293843349881016, 11.846822414594211], [-69.943244594996813, 12.162307033736095], [-69.584300096297454, 11.459610907431211], [-68.882999233664435, 11.44338450769156], [-68.233271450458716, 10.885744126829945], [-68.194126552997616, 10.554653225135921], [-67.296248541926317, 10.545868231646306], [-66.227864142507983, 10.648626817258684], [-65.655237596281737, 10.20079885501732], [-64.890452236578156, 10.077214667191296], [-64.329478725833724, 10.389598700395679], [-64.318006557864933, 10.641417954953978], [-63.079322475828725, 10.701724351438598], [-61.880946010980182, 10.7156253117251], [-62.730118984616396, 10.420268662960904], [-62.388511928950969, 9.948204453974636], [-61.588767462801918, 9.873066921422263], [-60.830596686431711, 9.38133982994894], [-60.671252407459718, 8.580174261911877], [-60.150095587796166, 8.602756862823425], [-59.758284878159181, 8.367034816924045], [-60.550587938058186, 7.779602972846178], [-60.637972785063752, 7.414999904810853], [-60.295668097562377, 7.043911444522918], [-60.543999192940966, 6.856584377464881], [-61.159336310456467, 6.696077378766317], [-61.139415045807937, 6.234296779806142], [-61.410302903881941, 5.959068101419616], [-60.733574184803707, 5.2002772078619], [-60.601179165271922, 4.918098049332129], [-60.966893276601517, 4.536467596856638], [-62.085429653559125, 4.162123521334308], [-62.804533047116692, 4.006965033377951], [-63.093197597899092, 3.770571193858784], [-63.888342861574145, 4.020530096854571], [-64.628659430587533, 4.14848094320925], [-64.816064012294007, 4.056445217297422], [-64.368494432214092, 3.797210394705246], [-64.408827887617903, 3.126786200366623], [-64.269999152265783, 2.497005520025566], [-63.422867397705105, 2.411067613124174], [-63.368788011311644, 2.200899562993129], [-64.083085496666072, 1.91636912679408], [-64.199305792890499, 1.49285492594602], [-64.611011928959854, 1.328730576987041], [-65.354713304288353, 1.0952822941085], [-65.548267381437554, 0.78925446207603], [-66.325765143484944, 0.724452215982012], [-66.876325853122566, 1.253360500489336], [-67.181294318293041, 2.250638129074062], [-67.447092047786299, 2.600280869960869], [-67.809938117123693, 2.820655015469569], [-67.303173183853417, 3.31845408773718], [-67.33756384954367, 3.542342230641721], [-67.621835903581271, 3.839481716319994], [-67.823012254493534, 4.503937282728898], [-67.744696621355203, 5.221128648291667], [-67.521531948502741, 5.556870428891968], [-67.34143958196556, 6.095468044454021], [-67.695087246355001, 6.267318020040645], [-68.265052456318216, 6.153268133972473], [-68.985318569602327, 6.206804917826856], [-69.389479946557103, 6.099860541198835], [-70.093312954372408, 6.960376491723109], [-70.674233567981503, 7.087784735538717], [-71.960175747348629, 6.991614895043538], [-72.19835242378187, 7.340430813013682], [-72.444487270788059, 7.42378489830048], [-72.479678921178831, 7.632506008327352], [-72.360900641555958, 8.002638454617893], [-72.439862230097944, 8.405275376820027], [-72.660494757768092, 8.62528778730268], [-72.788729824500379, 9.085027167187331], [-73.304951544880026, 9.151999823437604], [-73.027604132769554, 9.736770331252441], [-72.905286017534692, 10.45034434655477], [-72.614657762325194, 10.821975409381777], [-72.227575446242923, 11.108702093953237], [-71.973921678338272, 11.608671576377116], [-71.331583624950284, 11.776284084515805]]] } }, - { "type": "Feature", "properties": { "admin": "Vietnam", "name": "Vietnam", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[108.050180291782908, 21.552379869060111], [106.715067987090066, 20.696850694252014], [105.881682163519002, 19.752050482659694], [105.662005649846279, 19.058165188060567], [106.426816847765991, 18.004120998603224], [107.36195356651973, 16.697456569887049], [108.269495070429599, 16.079742336486145], [108.877106561317447, 15.276690578670436], [109.335269810017209, 13.42602834721772], [109.200135939573954, 11.666859239137761], [108.366129998815424, 11.00832062422627], [107.22092858279521, 10.36448395430183], [106.4051127462034, 9.530839748569317], [105.158263787865081, 8.599759629750492], [104.795185174582372, 9.2410383162765], [105.076201613385592, 9.918490505406806], [104.334334751403446, 10.486543687375228], [105.199914992292321, 10.889309800658094], [106.249670037869436, 10.961811835163585], [105.810523716253101, 11.567614650921225], [107.491403029410861, 12.337205918827944], [107.614547967562402, 13.535530707244202], [107.382727492301058, 14.202440904186968], [107.564525181103875, 15.202173163305554], [107.312705926545576, 15.908538316303177], [106.55600792849566, 16.604283962464802], [105.925762160264, 17.485315456608955], [105.094598423281496, 18.666974595611073], [103.896532017026701, 19.265180975821799], [104.183387892678908, 19.624668077060214], [104.822573683697073, 19.886641750563879], [104.435000441508024, 20.758733221921528], [103.203861118586431, 20.766562201413745], [102.754896274834636, 21.675137233969462], [102.170435825613552, 22.464753119389297], [102.706992222100084, 22.708795070887668], [103.504514601660546, 22.703756618739202], [104.476858351664447, 22.819150092046961], [105.329209425886603, 23.352063300056908], [105.811247186305209, 22.976892401617899], [106.725403273548451, 22.794267889898414], [106.567273390735295, 22.218204860924768], [107.043420037872608, 21.811898912029907], [108.050180291782908, 21.552379869060111]]] } }, - { "type": "Feature", "properties": { "admin": "Vanuatu", "name": "Vanuatu", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[167.844876743845077, -16.466333103097153], [167.515181105822847, -16.597849623279966], [167.180007765977791, -16.159995212470957], [167.2168013857696, -15.891846205308449], [167.844876743845077, -16.466333103097153]]], [[[167.107712437201485, -14.933920179913951], [167.2700281110302, -15.74002084723487], [167.001207310247935, -15.614602146062492], [166.79315799384085, -15.668810723536719], [166.649859247095549, -15.392703545801192], [166.629136997746429, -14.6264970842096], [167.107712437201485, -14.933920179913951]]]] } }, - { "type": "Feature", "properties": { "admin": "Yemen", "name": "Yemen", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[53.108572625547502, 16.651051133688949], [52.385205926325874, 16.38241120041965], [52.191729363825075, 15.938433132384018], [52.168164910699986, 15.597420355689945], [51.172515089732471, 15.175249742081489], [49.574576450403136, 14.708766587782746], [48.679230584514151, 14.003202419485657], [48.238947381387412, 13.948089504446369], [47.938914015500771, 14.007233181204423], [47.354453566279702, 13.592219753468379], [46.71707645039173, 13.399699204965016], [45.877592807810252, 13.347764390511681], [45.625050083199874, 13.290946153206759], [45.406458774605241, 13.02690542241143], [45.144355910020849, 12.953938300015306], [44.9895333188744, 12.699586900274708], [44.494576450382844, 12.721652736863344], [44.175112745954486, 12.585950425664873], [43.48295861183712, 12.63680003504008], [43.222871128112118, 13.220950425667422], [43.251448195169516, 13.767583726450848], [43.087943963398047, 14.062630316621306], [42.892245314308717, 14.802249253798745], [42.604872674333606, 15.213335272680592], [42.805015496600042, 15.261962795467252], [42.702437778500652, 15.718885809791995], [42.823670688657408, 15.911742255105263], [42.779332309750963, 16.34789134364868], [43.218375278502734, 16.666889960186406], [43.115797560403351, 17.088440456607369], [43.380794305196098, 17.579986680567668], [43.791518589051904, 17.319976711491105], [44.062613152855072, 17.410358791569589], [45.216651238797184, 17.43332896572333], [45.399999220568752, 17.333335069238554], [46.366658563020529, 17.233315334537632], [46.749994337761642, 17.283338120996174], [47.000004917189749, 16.949999294497438], [47.466694777217626, 17.116681626854877], [48.183343540241324, 18.166669216377311], [49.116671583864857, 18.616667588774941], [52.000009800022227, 19.000003363516054], [52.782184279192037, 17.349742336491229], [53.108572625547502, 16.651051133688949]]] } }, - { "type": "Feature", "properties": { "admin": "South Africa", "name": "South Africa", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[31.521001417778869, -29.257386976846245], [31.325561150850994, -29.401977634398907], [30.901762729625336, -29.909956963828034], [30.622813348113816, -30.423775730106122], [30.055716180142774, -31.140269463832951], [28.925552605919535, -32.172041110972494], [28.219755893677092, -32.771952813448848], [27.464608188595967, -33.226963799778794], [26.419452345492818, -33.614950453426175], [25.909664340933482, -33.667040297176392], [25.78062828950069, -33.944646091448334], [25.172861769315965, -33.796851495093577], [24.67785322439212, -33.987175795224537], [23.594043409934635, -33.794474379208147], [22.988188917744729, -33.916430759416976], [22.574157342222232, -33.864082533505304], [21.542799106541022, -34.258838799782922], [20.689052768646999, -34.417175388325226], [20.071261020597628, -34.795136814107984], [19.616405063564567, -34.819166355123706], [19.193278435958714, -34.462598972309777], [18.855314568769867, -34.444305515278458], [18.424643182049376, -33.997872816708963], [18.377410922934612, -34.13652068454806], [18.244499139079917, -33.867751560198023], [18.250080193767442, -33.281430759414434], [17.925190463948436, -32.61129078545342], [18.247909783611185, -32.429131361624563], [18.221761508871477, -31.661632989225662], [17.566917758868861, -30.72572112398754], [17.0644161312627, -29.878641045859158], [17.06291751472622, -29.875953871379977], [16.344976840895239, -28.576705010697697], [16.824017368240899, -28.082161553664466], [17.218928663815401, -28.355943291946804], [17.387497185951499, -28.783514092729774], [17.836151971109526, -28.856377862261311], [18.464899122804745, -29.045461928017271], [19.002127312911082, -28.972443129188857], [19.89473432788861, -28.461104831660769], [19.895767856534427, -24.767790215760588], [20.165725538827186, -24.917961928000768], [20.758609246511831, -25.868136488551446], [20.666470167735437, -26.477453301704916], [20.889609002371731, -26.828542982695907], [21.60589603036939, -26.726533705351748], [22.105968865657864, -26.28025603607913], [22.579531691180584, -25.979447523708142], [22.824271274514896, -25.500458672794768], [23.312096795350179, -25.268689873965712], [23.733569777122703, -25.39012948985161], [24.211266717228792, -25.670215752873567], [25.025170525825782, -25.719670098576891], [25.664666375437712, -25.486816094669706], [25.765848829865206, -25.174845472923671], [25.941652052522151, -24.696373386333214], [26.485753208123292, -24.616326592713097], [26.78640669119741, -24.240690606383478], [27.119409620886238, -23.574323011979772], [28.017235955525244, -22.827753594659072], [29.432188348109033, -22.091312758067584], [29.839036899542965, -22.102216485281172], [30.322883335091767, -22.271611830333931], [30.659865350067083, -22.151567478119912], [31.191409132621278, -22.251509698172395], [31.670397983534645, -23.658969008073861], [31.930588820124242, -24.369416599222532], [31.752408481581874, -25.484283949487406], [31.837777947728057, -25.843331801051342], [31.333157586397899, -25.660190525008943], [31.044079624157146, -25.731452325139436], [30.949666782359905, -26.022649021104144], [30.676608514129633, -26.398078301704604], [30.685961948374477, -26.743845310169526], [31.282773064913325, -27.285879408478991], [31.868060337051073, -27.17792734142127], [32.071665480281062, -26.733820082304902], [32.830120477028878, -26.74219166433619], [32.580264926897677, -27.470157566031808], [32.462132602678444, -28.30101124442055], [32.203388706193032, -28.752404880490065], [31.521001417778869, -29.257386976846245]], [[28.978262566857236, -28.955596612261708], [28.541700066855491, -28.647501722937562], [28.07433841320778, -28.851468601193581], [27.532511020627471, -29.242710870075353], [26.999261915807629, -29.875953871379977], [27.749397006956478, -30.645105889612214], [28.107204624145421, -30.545732110314944], [28.291069370239903, -30.226216729454293], [28.848399692507734, -30.070050551068245], [29.018415154748016, -29.743765557577362], [29.325166456832587, -29.257386976846245], [28.978262566857236, -28.955596612261708]]] } }, - { "type": "Feature", "properties": { "admin": "Zambia", "name": "Zambia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[32.759375441221316, -9.230599053589058], [33.231387973775291, -9.676721693564799], [33.485687697083584, -10.525558770391111], [33.315310499817279, -10.796549981329695], [33.114289178201908, -11.607198174692311], [33.306422153463068, -12.435778090060214], [32.991764357237876, -12.783870537978272], [32.688165317523122, -13.712857761289273], [33.214024692525207, -13.97186003993615], [30.179481235481827, -14.796099134991525], [30.274255812305103, -15.507786960515208], [29.51683434420314, -15.644677829656386], [28.947463413211256, -16.043051446194436], [28.825868768028492, -16.389748630440611], [28.467906121542676, -16.468400160388843], [27.598243442502753, -17.290830580314005], [27.044427117630729, -17.938026218337427], [26.706773309035633, -17.961228936436477], [26.381935255648919, -17.846042168857892], [25.264225701608005, -17.736539808831413], [25.084443393664564, -17.661815687737366], [25.076950310982255, -17.578823337476617], [24.6823490740015, -17.35341073981947], [24.033861525170771, -17.29584319424632], [23.215048455506057, -17.52311614346598], [22.562478468524255, -16.89845142992181], [21.887842644953867, -16.080310153876876], [21.933886346125913, -12.898437188369357], [24.016136508894672, -12.91104623784857], [23.930922072045373, -12.565847670138854], [24.079905226342838, -12.191296888887361], [23.904153680118181, -11.722281589406318], [24.017893507592586, -11.237298272347088], [23.912215203555714, -10.926826267137512], [24.257155389103982, -10.951992689663655], [24.314516228947948, -11.262826429899269], [24.783169793402948, -11.238693536018962], [25.418118116973197, -11.330935967659958], [25.752309604604726, -11.784965101776356], [26.55308759939961, -11.924439792532125], [27.164419793412456, -11.608748467661071], [27.38879886242378, -12.132747491100663], [28.15510867687998, -12.272480564017894], [28.52356163912102, -12.698604424696679], [28.934285922976834, -13.248958428605132], [29.699613885219485, -13.257226657771827], [29.616001417771223, -12.178894545137307], [29.341547885869087, -12.36074391037241], [28.642417433392346, -11.971568698782312], [28.372253045370421, -11.793646742401389], [28.496069777141763, -10.789883721564044], [28.673681674928922, -9.605924981324931], [28.449871046672818, -9.164918308146083], [28.734866570762495, -8.526559340044576], [29.002912225060467, -8.40703175215347], [30.34608605319081, -8.238256524288216], [30.740015496551781, -8.340007419470913], [31.157751336950042, -8.594578747317362], [31.55634809746649, -8.76204884199864], [32.191864861791963, -8.930358981973276], [32.759375441221316, -9.230599053589058]]] } }, - { "type": "Feature", "properties": { "admin": "Zimbabwe", "name": "Zimbabwe", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[31.191409132621278, -22.251509698172395], [30.659865350067083, -22.151567478119912], [30.322883335091767, -22.271611830333931], [29.839036899542965, -22.102216485281172], [29.432188348109033, -22.091312758067584], [28.794656202924209, -21.639454034107445], [28.02137007010861, -21.485975030200578], [27.727227817503252, -20.851801853114711], [27.724747348753247, -20.499058526290387], [27.296504754350501, -20.391519870690995], [26.164790887158478, -19.293085625894935], [25.850391473094724, -18.714412937090533], [25.649163445750155, -18.536025892818987], [25.264225701608005, -17.736539808831413], [26.381935255648919, -17.846042168857892], [26.706773309035633, -17.961228936436477], [27.044427117630729, -17.938026218337427], [27.598243442502753, -17.290830580314005], [28.467906121542676, -16.468400160388843], [28.825868768028492, -16.389748630440611], [28.947463413211256, -16.043051446194436], [29.51683434420314, -15.644677829656386], [30.274255812305103, -15.507786960515208], [30.338954705534537, -15.880839125230242], [31.173063999157673, -15.860943698797868], [31.636498243951188, -16.071990248277881], [31.852040643040592, -16.319417006091374], [32.328238966610222, -16.392074069893749], [32.847638787575839, -16.713398125884613], [32.849860874164385, -17.979057305577175], [32.654885695127142, -18.672089939043492], [32.611994256324884, -19.419382826416268], [32.772707960752619, -19.715592136313294], [32.659743279762573, -20.30429005298231], [32.508693068173436, -20.395292250248303], [32.244988234188007, -21.116488539313689], [31.191409132621278, -22.251509698172395]]] } } - ] - }; - -var randomcountriesData1 = [ - { country: "Iran", "continent": "Asia", "CategoryName": "Books", "Sales": 550 }, - { country: "Benin", "continent": "Africa", "CategoryName": "Books", "Sales": 1000 }, - { country: "China", "continent": "Asia", "CategoryName": "Books", "Sales": 420 }, - { country: "Chile", "continent": "South America", "CategoryName": "Books", "Sales": 1100 }, - { country: "Cuba", "continent": "North America", "CategoryName": "Books", "Sales": 450 }, - { country: "Spain", "continent": "Europe", "CategoryName": "Books", "Sales": 1200 }, - { country: "Fiji", "continent": "Oceania", "CategoryName": "Books", "Sales": 618.0 }, -]; - -module mapcomponenet { - $(function () { - var mapsample = new ej.datavisualization.Map($("#map"), { - enableAnimation: true, - navigationControl: { - enableNavigation: true, - orientation: 'vertical', - absolutePosition: { x: 5, y: 15 }, - dockPosition: 'none' - }, - layers: [ - { - layerType: 'geometry', - enableMouseHover: false, - enableSelection: false, - shapeSettings: { - fill: "#626171", - autoFill: false, - highlightStroke: "white", - stroke: "white", - strokeThickness: 0.5, - highlightColor: "#BFBFBF" - }, - shapeData: world_map, - legendSettings: { dockOnMap: false } - } - ] - }); - }); -} - - - - - - -module MenuComponent { - $(function () { - var sample = new ej.Menu($("#syncfusionProducts"),{ - width: "100%", - animationType: ej.AnimationType.Default, - cssClass: 'gradient-lime ', - enableAnimation: true, - enableSeparator: true, - height: 40, - htmlAttributes: { "aria-label": "menu" }, - menuType: "normalmenu", - orientation: ej.Orientation.Horizontal, - showRootLevelArrows: true, - showSubLevelArrows: true, - subMenuDirection: ej.Direction.Right, - titleText: "Menu", - }); - }); -} - - - -module NavigationDrawerComponent { - $(function () { - var navigationdrawerInstance = new ej.NavigationDrawer($("#navpane"), { - targetId: "butdrawer", - contentId: "content_container", - type: "overlay", - direction: "left", - enableListView: true, - listViewSettings: { - width: 300, - selectedItemIndex: 0 - }, - position: "normal" - }); - $("#navpane_listview").click(function(e: any) { - var text=e.target["text"]||$(e.target).closest("li.e-list").text(); - $("#butdrawer").parent().children("h2").text(text); - }); - }); -} - - - -module PDFViewerComponent { - $(function () { - var pdfviewerControl = new ej.PdfViewer($("#pdfviewer"), { - serviceUrl:(window).baseurl+ "api/PdfViewer", - isResponsive: true - }); - }); -} - - - -module PivotChartOlap { - $(function () { - var sample = new ej.PivotChart($("#PivotChart"),{ - dataSource: { - data: "//bi.syncfusion.com/olap/msmdpump.dll", - catalog: "Adventure Works DW 2008 SE", - cube: "Adventure Works", - rows: [ - { - fieldName: "[Date].[Fiscal]" - } - ], - columns: [ - { - fieldName: "[Customer].[Customer Geography]" - } - ], - values: [ - { - measures: [ - { - fieldName: "[Measures].[Internet Sales Amount]" - } - ], - axis: "columns" - } - ], - filters:[] - }, - isResponsive: true,zooming:{enableScrollbar: true}, - commonSeriesOptions: { - type: "column" - }, - size: { height: "460px", width: "100%" }, - primaryXAxis: { title: { text: "Date - Fiscal" }, labelRotation: 0 }, - primaryYAxis: { title: { text: "Internet Sales Amount" } }, - legend: { visible: true, rowCount: 2 }, - load: function () { - var PivotChart = (window).themeStyle + (window).themeColor + (window).themeVarient; - PivotChart = PivotChart.toString(); - if (PivotChart.indexOf("dark") > -1 || PivotChart.indexOf("contrast") > -1) - PivotChart = "flatdark"; - else - PivotChart = "flatlight"; - this.model.theme = PivotChart; - }, - }); - }); -} - - - -var pivot_dataset = [ - { Amount: 100, Country: "Canada", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Alberta" }, - { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Van", Quantity: 3, State: "British Columbia" }, - { Amount: 300, Country: "Canada", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Brunswick" }, - { Amount: 150, Country: "Canada", Date: "FY 2008", Product: "Bike", Quantity: 3, State: "Manitoba" }, - { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Car", Quantity: 4, State: "Ontario" }, - { Amount: 100, Country: "Canada", Date: "FY 2007", Product: "Van", Quantity: 1, State: "Quebec" }, - { Amount: 200, Country: "France", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Charente-Maritime" }, - { Amount: 250, Country: "France", Date: "FY 2006", Product: "Van", Quantity: 4, State: "Essonne" }, - { Amount: 300, Country: "France", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Garonne (Haute)" }, - { Amount: 150, Country: "France", Date: "FY 2008", Product: "Van", Quantity: 2, State: "Gers" }, - { Amount: 200, Country: "Germany", Date: "FY 2006", Product: "Van", Quantity: 3, State: "Bayern" }, - { Amount: 250, Country: "Germany", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Brandenburg" }, - { Amount: 150, Country: "Germany", Date: "FY 2008", Product: "Car", Quantity: 4, State: "Hamburg" }, - { Amount: 200, Country: "Germany", Date: "FY 2008", Product: "Bike", Quantity: 4, State: "Hessen" }, - { Amount: 150, Country: "Germany", Date: "FY 2007", Product: "Van", Quantity: 3, State: "Nordrhein-Westfalen" }, - { Amount: 100, Country: "Germany", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Saarland" }, - { Amount: 150, Country: "United Kingdom", Date: "FY 2008", Product: "Bike", Quantity: 5, State: "England" }, - { Amount: 250, Country: "United States", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Alabama" }, - { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Van", Quantity: 4, State: "California" }, - { Amount: 100, Country: "United States", Date: "FY 2006", Product: "Bike", Quantity: 2, State: "Colorado" }, - { Amount: 150, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "New Mexico" }, - { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Bike", Quantity: 4, State: "New York" }, - { Amount: 250, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "North Carolina" }, - { Amount: 300, Country: "United States", Date: "FY 2007", Product: "Van", Quantity: 4, State: "South Carolina" } -] - -module PivotChartRelational { - - $(function () { - var sample = new ej.PivotChart($("#PivotChart"),{ - dataSource: { - data: pivot_dataset, - rows: [ - { - fieldName: "Country", - fieldCaption: "Country" - }, - { - fieldName: "State", - fieldCaption: "State" - }, - { - fieldName: "Date", - fieldCaption: "Date" - } - ], - columns: [ - { - fieldName: "Product", - fieldCaption: "Product" - } - ], - values: [ - { - fieldName: "Amount", - fieldCaption: "Amount" - } - ], - filters:[] - }, - isResponsive: true,zooming:{enableScrollbar: true}, - commonSeriesOptions: { - type: "column" - }, - size: { height: "460px", width: "100%" }, - primaryYAxis: { title: { text: "Amount" } }, - legend: { visible: true }, - load: function () { - var PivotChart = (window).themeStyle + (window).themeColor + (window).themeVarient; - PivotChart = PivotChart.toString(); - if (PivotChart.indexOf("dark") > -1 || PivotChart.indexOf("contrast") > -1) - PivotChart = "flatdark"; - else - PivotChart = "flatlight"; - this.model.theme = PivotChart; - }, - }); - }); -} - - - -module PivotGaugeOlap { - - $(function () { - var sample = new ej.PivotGauge($("#PivotGauge"),{ - dataSource: { - data: "//bi.syncfusion.com/olap/msmdpump.dll", - catalog: "Adventure Works DW 2008 SE", - cube: "Adventure Works", - rows: [ - { - fieldName: "[Date].[Fiscal]", - filterItems: { filterType: "include", values: ["[Date].[Fiscal].[Fiscal Year].&[2004]"] } - }, - ], - columns: [ - { - fieldName: "[Customer].[Customer Geography]" - } - ], - values: [ - { - measures: [ - { - fieldName: "[Measures].[Internet Sales Amount]" - }, - { - fieldName: "[Measures].[Internet Revenue Status]" - }, - { - fieldName: "[Measures].[Internet Revenue Trend]" - }, - { - fieldName: "[Measures].[Internet Revenue Goal]" - }, - ], - axis: "columns" - } - ], - filters:[] - }, - enableTooltip: true, isResponsive: true, - labelFormatSettings: { decimalPlaces: 2 }, - scales: [{ - showRanges: true, - radius: 150, showScaleBar: true, size: 1, - border: { - width: 0.5 - }, - showIndicators: true, showLabels: true, - pointers: [{ - showBackNeedle: true, - backNeedleLength: 20, - length: 120, - width: 7 - }, - { - type: "marker", - markerType: "diamond", - distanceFromScale: 5, - placement: "center", - backgroundColor: "#29A4D9", - length: 25, - width: 15 - }], - ticks: [{ - type: "major", - distanceFromScale: 2, - height: 16, - width: 1, color: "#8c8c8c" - }, - { - type: "minor", - height: 6, - width: 1, - distanceFromScale: 2, - color: "#8c8c8c" - }], - labels: [{ - color: "#8c8c8c" - }], - ranges: [{ - distanceFromScale: -5, - backgroundColor: "#fc0606", - border: { color: "#fc0606" } - }, - { - distanceFromScale: -5 - }], - customLabels: [{ - position: { x: 180, y: 290 }, - font: { size: "10px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" - }, - { - position: { x: 180, y: 320 }, - font: { size: "10px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" - }, - { - position: { x: 180, y: 150 }, - font: { size: "12px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" - }] - }] - }); - }); -} - - - -var pivot_dataset = [ - { Amount: 100, Country: "Canada", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Alberta" }, - { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Van", Quantity: 3, State: "British Columbia" }, - { Amount: 300, Country: "Canada", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Brunswick" }, - { Amount: 150, Country: "Canada", Date: "FY 2008", Product: "Bike", Quantity: 3, State: "Manitoba" }, - { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Car", Quantity: 4, State: "Ontario" }, - { Amount: 100, Country: "Canada", Date: "FY 2007", Product: "Van", Quantity: 1, State: "Quebec" }, - { Amount: 200, Country: "France", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Charente-Maritime" }, - { Amount: 250, Country: "France", Date: "FY 2006", Product: "Van", Quantity: 4, State: "Essonne" }, - { Amount: 300, Country: "France", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Garonne (Haute)" }, - { Amount: 150, Country: "France", Date: "FY 2008", Product: "Van", Quantity: 2, State: "Gers" }, - { Amount: 200, Country: "Germany", Date: "FY 2006", Product: "Van", Quantity: 3, State: "Bayern" }, - { Amount: 250, Country: "Germany", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Brandenburg" }, - { Amount: 150, Country: "Germany", Date: "FY 2008", Product: "Car", Quantity: 4, State: "Hamburg" }, - { Amount: 200, Country: "Germany", Date: "FY 2008", Product: "Bike", Quantity: 4, State: "Hessen" }, - { Amount: 150, Country: "Germany", Date: "FY 2007", Product: "Van", Quantity: 3, State: "Nordrhein-Westfalen" }, - { Amount: 100, Country: "Germany", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Saarland" }, - { Amount: 150, Country: "United Kingdom", Date: "FY 2008", Product: "Bike", Quantity: 5, State: "England" }, - { Amount: 250, Country: "United States", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Alabama" }, - { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Van", Quantity: 4, State: "California" }, - { Amount: 100, Country: "United States", Date: "FY 2006", Product: "Bike", Quantity: 2, State: "Colorado" }, - { Amount: 150, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "New Mexico" }, - { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Bike", Quantity: 4, State: "New York" }, - { Amount: 250, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "North Carolina" }, - { Amount: 300, Country: "United States", Date: "FY 2007", Product: "Van", Quantity: 4, State: "South Carolina" } -] - -module PivotGaugeRelational { - $(function () { - var sample = new ej.PivotGauge($("#PivotGauge"),{ - dataSource: { - data: pivot_dataset, - rows: [ - { - fieldName: "Country", - }, - { - fieldName: "State", - } - ], - columns: [ - { - fieldName: "Product", - } - ], - values: [ - { - fieldName: "Amount", - }, - { - fieldName: "Quantity", - } - ] - }, - enableTooltip: true, isResponsive: true, - labelFormatSettings: { decimalPlaces: 2 }, - scales: [{ - showRanges: true, - radius: 150, showScaleBar: true, size: 1, - border: { - width: 0.5 - }, - showIndicators: true, showLabels: true, - pointers: [{ - showBackNeedle: true, - backNeedleLength: 20, - length: 120, - width: 7 - }, - { - type: "marker", - markerType: "diamond", - distanceFromScale: 5, - placement: "center", - backgroundColor: "#29A4D9", - length: 25, - width: 15 - }], - ticks: [{ - type: "major", - distanceFromScale: 2, - height: 16, - width: 1, color: "#8c8c8c" - }, - { - type: "minor", - height: 6, - width: 1, - distanceFromScale: 2, - color: "#8c8c8c" - }], - labels: [{ - color: "#8c8c8c" - }], - ranges: [{ - distanceFromScale: -5, - backgroundColor: "#fc0606", - border: { color: "#fc0606" } - }, - { - distanceFromScale: -5 - }], - customLabels: [{ - position: { x: 180, y: 290 }, - font: { size: "10px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" - }, - { - position: { x: 180, y: 320 }, - font: { size: "10px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" - }, - { - position: { x: 180, y: 150 }, - font: { size: "12px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" - }] - }] - }); - }); -} - - - -module PivotGridOlap { - - $(function () { - var sample = new ej.PivotGrid($("#PivotGrid"),{ - dataSource: { - data: "//bi.syncfusion.com/olap/msmdpump.dll", - catalog: "Adventure Works DW 2008 SE", - cube: "Adventure Works", - rows: [ - { - fieldName: "[Date].[Fiscal]" - } - ], - columns: [ - { - fieldName: "[Customer].[Customer Geography]" - } - ], - values: [ - { - measures: [ - { - fieldName: "[Measures].[Internet Sales Amount]", - } - ], - axis: "columns" - } - ], - filters:[] - }, - enableGroupingBar: true, - pivotTableFieldListID:"PivotSchemaDesigner" - }); - $("#PivotSchemaDesigner").ejPivotSchemaDesigner(); - }); -} - - - -var pivot_dataset = [ - { Amount: 100, Country: "Canada", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Alberta" }, - { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Van", Quantity: 3, State: "British Columbia" }, - { Amount: 300, Country: "Canada", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Brunswick" }, - { Amount: 150, Country: "Canada", Date: "FY 2008", Product: "Bike", Quantity: 3, State: "Manitoba" }, - { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Car", Quantity: 4, State: "Ontario" }, - { Amount: 100, Country: "Canada", Date: "FY 2007", Product: "Van", Quantity: 1, State: "Quebec" }, - { Amount: 200, Country: "France", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Charente-Maritime" }, - { Amount: 250, Country: "France", Date: "FY 2006", Product: "Van", Quantity: 4, State: "Essonne" }, - { Amount: 300, Country: "France", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Garonne (Haute)" }, - { Amount: 150, Country: "France", Date: "FY 2008", Product: "Van", Quantity: 2, State: "Gers" }, - { Amount: 200, Country: "Germany", Date: "FY 2006", Product: "Van", Quantity: 3, State: "Bayern" }, - { Amount: 250, Country: "Germany", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Brandenburg" }, - { Amount: 150, Country: "Germany", Date: "FY 2008", Product: "Car", Quantity: 4, State: "Hamburg" }, - { Amount: 200, Country: "Germany", Date: "FY 2008", Product: "Bike", Quantity: 4, State: "Hessen" }, - { Amount: 150, Country: "Germany", Date: "FY 2007", Product: "Van", Quantity: 3, State: "Nordrhein-Westfalen" }, - { Amount: 100, Country: "Germany", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Saarland" }, - { Amount: 150, Country: "United Kingdom", Date: "FY 2008", Product: "Bike", Quantity: 5, State: "England" }, - { Amount: 250, Country: "United States", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Alabama" }, - { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Van", Quantity: 4, State: "California" }, - { Amount: 100, Country: "United States", Date: "FY 2006", Product: "Bike", Quantity: 2, State: "Colorado" }, - { Amount: 150, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "New Mexico" }, - { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Bike", Quantity: 4, State: "New York" }, - { Amount: 250, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "North Carolina" }, - { Amount: 300, Country: "United States", Date: "FY 2007", Product: "Van", Quantity: 4, State: "South Carolina" } -] - -module PivotGridRelational { - $(function () { - var sample = new ej.PivotGrid($("#PivotGrid"),{ - dataSource: { - data: pivot_dataset, - rows: [ - { - fieldName: "Country", - fieldCaption: "Country" - }, - { - fieldName: "State", - fieldCaption: "State" - } - ], - columns: - [{ - fieldName: "Product", - fieldCaption: "Product" - } - ], - values: [ - { - fieldName: "Amount", - fieldCaption: "Amount" - }, - { - fieldName: "Quantity", - fieldCaption: "Quantity" - } - ], - filters:[] - }, - enableGroupingBar: true, - pivotTableFieldListID:"PivotSchemaDesigner" - }); - $("#PivotSchemaDesigner").ejPivotSchemaDesigner(); - }); -} - - - -module PivotTreeMap { - $(function () { - var sample = new ej.PivotTreeMap($("#PivotTreeMap"),{ - dataSource: { - data: "//bi.syncfusion.com/olap/msmdpump.dll;Locale Identifier=1033;", - catalog: "Adventure Works DW 2008 SE", - cube: "Adventure Works", - rows: [ - { - fieldName: "[Customer].[Customer Geography]" - } - ], - columns: [ - { - fieldName: "[Date].[Fiscal]" - } - ], - values: [ - { - measures: [ - { - fieldName: "[Measures].[Customer Count]", - } - ], - axis: "columns" - } - ], - filters:[] - } - }); - }); -} - - - -module ProgressBarComponent { - $(function () { - var sample = new ej.ProgressBar($("#progressBar"),{ - width: 200, - value: 45, - height: 20, - enablePersistence: true, - maxValue: 200, - minValue: 0, - showRoundedCorner: true, - text: 'loading...' - }); - }); - -} - - - - -declare var rteObj: any; -declare var data: any; -var radialEle = $('#defaultradialmenu'), action = 0, forRedo = 0; -var rteEle = $("#rteSample1"); -module RadialMenuComponent { - $(function () { - - if (!(ej.browserInfo().name == "msie" && parseInt(ej.browserInfo().version) < 9)) { - var radialmenuInstance = new ej.RadialMenu($("#defaultradialmenu"), { - imageClass: "imageclass", - backImageClass: "backimageclass", - targetElementId: "radialtarget1" - }); - $("#radialtarget1").parent().css("position", "relative"); - } - else { - $("#contentDiv").html("Radial Menu is only supported from Internet Explorer Versioned 9 and above.").css({ "font-size": "20px", "color": "red" }); - } - var rteInstance = new ej.RTE($("#rteSample1"), { - width: "100%", - minWidth: "10px", - change: (e) => { radialEle.ejRadialMenu("enableItem", "Undo"); }, - select: (e) => { - var target = $("#radialtarget1"), radialRadius = 150, radialDiameter = 2 * radialRadius, - // To get Iframe positions - iframeY = e.event.clientY, iframeX = e.event.clientX, - // To set Radial Menu position within target - x = iframeX > target.width() - radialRadius ? target.width() - radialDiameter : (iframeX > radialRadius ? iframeX - radialRadius : 0), - y = iframeY > target.height() - radialRadius ? target.height() - radialDiameter : (iframeY > radialRadius ? iframeY - radialRadius : 0); - radialEle.ejRadialMenu("setPosition", x, y); - radialEle.focus(); - $('iframe').contents().find('body').blur(); - }, - showToolbar: false, - showContextMenu: false - }); - $(window).resize(function () { - if (ej.isMobile() && ej.isPortrait()) - $('#defaultradialmenu').css({ "left": 25 }); - }); - }); -} - -function bold(e: any) { - - rteObj = rteEle.data("ejRTE"); - rteObj.executeCommand("bold"); - data = rteObj._getSelectedHtmlString() ? true : false; - if (data) action += 1; - forRedo = action; - radialEle.focus(); -} -function italic(e: any) { - rteObj = rteEle.data("ejRTE"); - rteObj.executeCommand("italic"); - data = rteObj._getSelectedHtmlString() ? true : false; - if (data) action += 1; - forRedo = action; - radialEle.focus(); -} -function undo(e: any) { - rteObj = rteEle.data("ejRTE"); - rteObj.executeCommand("undo"); - action -= 1; - if (action == 0) - radialEle.ejRadialMenu("disableItem", "Undo"); - radialEle.ejRadialMenu("enableItem", "Redo"); - radialEle.focus(); -} -function redo(e: any) { - rteObj = rteEle.data("ejRTE"); - rteObj.executeCommand("redo"); - action += 1; - if (forRedo == action) radialEle.ejRadialMenu("disableItem", "Redo"); - radialEle.ejRadialMenu("enableItem", "Undo"); - radialEle.focus(); -} - - - -module RadialSliderComponent { - $(function () { - var radialsliderInstance = new ej.RadialSlider($("#radialSlider"), { - innerCircleImageUrl: "images/radialslider/chevron-right.png" - }); - }); -} - - -module rangecomponent { - $(function () { - var linearsample = new ej.datavisualization.RangeNavigator($("#RangeNavigator"), { - enableDeferredUpdate: true, - padding: "15", - allowSnapping: true, - selectedRangeSettings: { - start: "2010/5/1", end: "2011/10/1" - }, - isResponsive: true, - tooltipSettings: { - visible: true, labelFormat: "MM/dd/yyyy", backgroundColor: "gray", tooltipDisplayMode: "ondemand" - }, - load: () => { - var rn = $("#RangeNavigator").data("ejRangeNavigator"); - rn.model.series = [ - { - type: 'line', - dataSource: data.Open, xName: "XValue", yName: "YValue", - fill: '#69D2E7' - } - ]; - }, - loaded: function () { - var sender = $("#RangeNavigator").data("ejRangeNavigator"); - var theme = (window).themeStyle + (window).themeColor + (window).themeVarient; - if (theme) { - switch (theme) { - case "flatazurelight": - theme = "azurelight"; - break; - case "flatlimelight": - theme = "limelight"; - break; - case "flatsaffronlight": - theme = "saffronlight"; - break; - case "gradientazurelight": - theme = "gradientazure"; - break; - case "gradientlimelight": - theme = "gradientlime"; - break; - case "gradientsaffronlight": - theme = "gradientsaffron"; - break; - case "flatazuredark": - theme = "azuredark"; - break; - case "flatlimedark": - theme = "limedark"; - break; - case "flatsaffrondark": - theme = "saffrondark"; - break; - case "gradientazuredark": - theme = "gradientazuredark"; - break; - case "gradientlimedark": - theme = "gradientlimedark"; - break; - case "gradientsaffrondark": - theme = "gradientsaffrondark"; - break; - case "flathigh-contrast-01dark": - theme = "highcontrast01"; - break; - case "flathigh-contrast-02dark": - theme = "highcontrast02"; - break; - case "flatmateriallight": - theme = "material"; - break; - case "flatoffice-365light": - theme = "office"; - break; - default: - theme = "flatlight"; - break; - } - sender.model.theme = theme; - } - } - - }); - }); -} -var data; -data = GetData(); - -function GetData() { - var series1:any[]=[]; - var series2:any[]= []; - var value = 100; - var value1 = 120; - for (var i = 1; i < 730; i++) { - - if (Math.random() > .5) { - value += Math.random(); - value1 += Math.random(); - } else { - value -= Math.random(); - value1 -= Math.random(); - } - var point1 = { XValue: new Date(2010, 0, i), YValue: value }; - var point2 = { XValue: new Date(2010, 0, i), YValue: value1 }; - series1.push(point1); - series2.push(point2); - } - - data = { Open: series1, Close: series2 }; - return data; -}; - - - -module RatingComponent { - $(function () { - - var sample1 = new ej.Rating($("#fullRating"),{ - value: 4, - precision: ej.Rating.Precision.Full, - allowReset: true, - cssClass: "gradient-lime", - enabled: true, - enablePersistence: true, - incrementStep: 2, - maxValue: 10, - minValue: 0, - orientation: ej.Orientation.Horizontal, - shapeHeight: 25, - shapeWidth: 25, - showTooltip: true - }); - - var sample2 = new ej.Rating($("#halfRating"),{ - precision: ej.Rating.Precision.Half, - value: 3.5, - allowReset: true, - cssClass: "gradient-lime", - enabled: true, - enablePersistence: true, - incrementStep: 2, - maxValue: 10, - minValue: 0, - orientation: "horizontal", - shapeHeight: 25, - shapeWidth: 25, - showTooltip: true - }); - - var sample3 = new ej.Rating($("#exactRating"),{ - precision: ej.Rating.Precision.Exact, - value: 3.7, - allowReset: true, - cssClass: "gradient-lime", - enabled: true, - enablePersistence: true, - incrementStep: 2, - maxValue: 10, - minValue: 0, - orientation: "horizontal", - shapeHeight: 25, - shapeWidth: 25, - showTooltip: true - }); - }); -} - - - -module ReportViewerComponent { - $(function () { - var report = new ej.ReportViewer($("#DefaultReportViewer"), { - reportServiceUrl: (window).baseurl + 'api/ReportViewer', - processingMode: ej.ReportViewer.ProcessingMode.Remote, - reportPath: "ConditionalFormating.rdl", - isResponsive: true - }); - }); -} - - - -var fontfamily = ["Segoe UI", "Arial", "Times New Roman", "Tahoma", "Helvetica"], fontsize = ["1pt", "2pt", "3pt", "4pt", "5pt"], action1 = ["New", "Clear"], action2 = ["Bold", "Italic", "Underline", "strikethrough", "superscript", "subscript", "JustifyLeft", "JustifyCenter", "JustifyRight", "JustifyFull", "Undo", "Redo"]; -module RibbonComponent { - $(function () { - var sample = new ej.Ribbon($("#defaultRibbon"), { - width: "100%", - expandPinSettings: { - toolTip: "Collapse the Ribbon" - }, - collapsePinSettings: { - toolTip: "Pin the Ribbon" - }, - applicationTab: { - type: ej.Ribbon.ApplicationTabType.Menu, menuItemID: "ribbonmenu", menuSettings: { openOnClick: false } - }, - tabs: [{ - id: "home", text: "HOME", groups: [{ - text: "New", alignType: ej.Ribbon.AlignType.Rows, content: [{ - groups: [{ - id: "new", - text: "New", - toolTip: "New", - buttonSettings: { - contentType: ej.ContentType.ImageOnly, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-new", - click: "onClick" - } - } - ], - defaults: { - type: "button", - width: 60, - height: 70 - } - }] - }, - { - text: "Clipboard", alignType: ej.Ribbon.AlignType.Columns, content: [{ - groups: [{ - id: "paste", - text: "paste", - toolTip: "Paste", - splitButtonSettings: { - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon e-ribbonpaste", - targetID: "pasteSplit", - buttonMode: "dropdown", - click: "onClick", - arrowPosition: ej.ArrowPosition.Bottom - } - } - ], - defaults: { - type: "splitbutton", - width: 50, - height: 70 - } - }, - { - groups: [{ - id: "cut", - text: "Cut", - toolTip: "Cut", - buttonSettings: { - contentType: ej.ContentType.TextAndImage, - click: "onClick", - prefixIcon: "e-icon e-ribbon e-ribboncut" - } - }, - { - id: "copy", - text: "Copy", - toolTip: "Copy", - buttonSettings: { - contentType: ej.ContentType.TextAndImage, - click: "onClick", - prefixIcon: "e-icon e-ribbon e-ribboncopy" - } - }, - { - id: "clear", - text: "Clear", - toolTip: "Clear All", - buttonSettings: { - contentType: ej.ContentType.TextAndImage, - click: "onClick", - prefixIcon: "e-icon e-ribbon clearAll" - } - }], - defaults: { - type: "button", - width: 60, - isBig: false - } - }] - }, - { - text: "Font", alignType: "rows", content: [{ - groups: [{ - id: "fontfamily", - toolTip: "Font", - dropdownSettings: { - dataSource: fontfamily, - text: "Segoe UI", - select: "onClick", - width: 150 - } - }, - { - id: "fontsize", - toolTip: "FontSize", - dropdownSettings: { - dataSource: fontsize, - text: "1pt", - select: "onClick", - width: 65 - } - }], - defaults: { - type: "dropdownlist", - height: 28 - } - }, - { - groups: [{ - id: "bold", - toolTip: "Bold", - type: ej.Ribbon.Type.ToggleButton, - toggleButtonSettings: { - contentType: ej.ContentType.ImageOnly, - defaultText: "Bold", - activeText: "Bold", - click: "onClick", - defaultPrefixIcon: "e-icon e-ribbon bold", - activePrefixIcon: "e-icon e-ribbon bold" - } - }, - { - id: "italic", - toolTip: "Italic", - type: ej.Ribbon.Type.ToggleButton, - toggleButtonSettings: { - contentType: ej.ContentType.ImageOnly, - defaultText: "Italic", - activeText: "Italic", - click: "onClick", - defaultPrefixIcon: "e-icon e-ribbon e-ribbonitalic", - activePrefixIcon: "e-icon e-ribbon e-ribbonitalic" - } - }, - { - id: "underline", - text: "Underline", - toolTip: "Underline", - type: ej.Ribbon.Type.ToggleButton, - toggleButtonSettings: { - contentType: ej.ContentType.ImageOnly, - defaultText: "Underline", - activeText: "Underline", - click: "onClick", - defaultPrefixIcon: "e-icon e-ribbon e-ribbonunderline", - activePrefixIcon: "e-icon e-ribbon e-ribbonunderline" - } - }, - { - id: "strikethrough", - text: "strikethrough", - toolTip: "Strikethrough", - type: ej.Ribbon.Type.ToggleButton, - toggleButtonSettings: { - contentType: ej.ContentType.ImageOnly, - defaultText: "Strikethrough", - activeText: "Strikethrough", - click: "onClick", - defaultPrefixIcon: "e-icon e-ribbon strikethrough", - activePrefixIcon: "e-icon e-ribbon strikethrough" - } - }, - { - id: "superscript", - text: "superscript", - toolTip: "Superscript", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon e-superscripticon" - } - }, - { - id: "subscript", - text: "subscript", - toolTip: "Subscript", - enableSeparator: true, - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon e-subscripticon" - } - }, - { - id: "fontcolor", - text: "Font Color", - toolTip: "Font Color", - type: ej.Ribbon.Type.Custom, - contentID: "fontcolor" - }, - { - id: "fillcolor", - text: "Fill Color", - toolTip: "Fill Color", - type: ej.Ribbon.Type.Custom, - contentID: "fillcolor" - } - ], - defaults: { - isBig: false - } - }] - }, - { - text: "Alignment", alignType: ej.Ribbon.AlignType.Rows, content: [ - { - groups: [{ - id: "bullet", - text: "Bullet Format", - toolTip: "Bullets", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon e-bullet" - } - }, - { - id: "number", - text: "Number Format", - toolTip: "Numbering", - enableSeparator: true, - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon e-numbericon" - } - }, - { - id: "textindent", - text: "Indent", - toolTip: "Text Indent", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon e-indent" - } - }, - { - id: "textoudent", - text: "Outdent", - toolTip: "Text Outdent", - enableSeparator: true, - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon e-outdent" - } - }, - { - id: "sortascending", - text: "Sort", - toolTip: "Sort", - enableSeparator: true, - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon e-sort" - } - }, - { - id: "border", - text: "Border", - toolTip: "Border", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon e-border" - } - }], - defaults: { - type: "button", - isBig: false - } - }, - { - groups: [{ - id: "alignleft", - text: "JustifyLeft", - toolTip: "Align Left", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon alignleft" - } - }, - { - id: "aligncenter", - text: "JustifyCenter", - toolTip: "Align Center", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon aligncenter" - } - }, - { - id: "alignright", - text: "JustifyRight", - toolTip: "Align Right", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon alignright" - } - }, - { - id: "justify", - text: "JustifyFull", - toolTip: "Justify", - enableSeparator: true, - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon justify" - } - }, - { - id: "uppercase", - text: "Upper Case", - toolTip: "Upper Case", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon e-uppercase" - } - }, - { - id: "lowercase", - text: "Lower Case", - toolTip: "Lower Case", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon e-lowercase" - } - }], - defaults: { - type: "button", - isBig: false - } - }] - }, - { - text: "Actions", alignType: ej.Ribbon.AlignType.Rows, content: [{ - groups: [{ - id: "undo", - text: "Undo", - toolTip: "Undo", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-undo" - } - }, - { - id: "redo", - text: "Redo", - toolTip: "Redo", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-redo" - } - } - ], - defaults: { - type: "button", - width: 40, - height: 70 - } - }] - }, - { - text: "View", alignType: ej.Ribbon.AlignType.Rows, content: [{ - groups: [{ - id: "zoomin", - text: "Zoom In", - toolTip: "Zoom In", - buttonSettings: { - width: 58, - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-zoomin" - } - }, - { - id: "zoomout", - text: "Zoom Out", - toolTip: "Zoom Out", - buttonSettings: { - width: 70, - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-zoomout" - } - }, - { - id: "fullscreen", - text: "Full Screen", - toolTip: "Full Screen", - buttonSettings: { - width: 73, - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-fullscreen" - } - } - ], - defaults: { - type: "button", - height: 70 - } - }] - }] - },{ - id: "insert", text: "INSERT", groups: [{ - text: "Tables", alignType: ej.Ribbon.AlignType.Columns, content: [{ - groups: [{ - id: "tables", - text: "Tables", - toolTip: "Tables", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-table" - } - } - ], - defaults: { - type: "button", - width: 50, - height: 70 - } - }] - }, - { - text: "Illustrations", alignType: ej.Ribbon.AlignType.Rows, content: [{ - groups: [{ - id: "pictures", - text: "Pictures", - toolTip: "Pictures", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-picture" - } - }, - { - id: "videos", - text: "Videos", - toolTip: "Videos", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-video" - } - }, - { - id: "shapes", - text: "Shapes", - toolTip: "Shapes", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-shape" - } - }, - { - id: "charts", - text: "Charts", - toolTip: "Charts", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-chart" - } - } - ], - defaults: { - type: "button", - width: 56, - height: 70 - } - }] - }, - { - text: "Comments", alignType: ej.Ribbon.AlignType.Rows, content: [{ - groups: [{ - id: "comments", - text: "Comments", - toolTip: "Comments", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-comment" - } - } - ], - defaults: { - type: "button", - width: 70, - height: 70 - } - }] - }, - { - text: "Text", alignType: ej.Ribbon.AlignType.Rows, content: [{ - groups: [{ - id: "text", - text: "Text", - toolTip: "Text", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-text", - width: 50 - } - }, - { - id: "datetime", - text: "Date Time", - toolTip: "DateTime", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-datetimenew" - } - } - ], - defaults: { - type: "button", - width: 70, - height: 70 - } - }] - }, - { - text: "Hyperlink", alignType: ej.Ribbon.AlignType.Rows, content: [{ - groups: [{ - id: "hyperlink", - text: "Hyperlink", - toolTip: "Hyperlink", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-hyperlink" - } - } - ], - defaults: { - type: "button", - width: 70, - height: 70 - } - }] - }, - { - text: "Equation", alignType: ej.Ribbon.AlignType.Rows, content: [{ - groups: [{ - id: "equation", - text: "Equation", - toolTip: "Equation", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-equation" - } - } - ], - defaults: { - type: "button", - width: 60, - height: 70 - } - }] - }, - { - text: "Print Layout", alignType: ej.Ribbon.AlignType.Rows, content: [{ - groups: [{ - id: "printlayout", - text: "Print Layout", - toolTip: "Print Layout", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-printlayout" - } - } - ], - defaults: { - type: "button", - width: 80, - height: 70 - } - }] - }, - { - text: "Save", alignType: ej.Ribbon.AlignType.Rows, content: [{ - groups: [{ - id: "print", - text: "Print", - toolTip: "Print", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-print" - } - }, - { - id: "save", - text: "Save", - toolTip: "Save", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-save" - } - } - ], - defaults: { - type: "button", - width: 50, - height: 70 - } - }] - } - ] - } - ], - create: function createControl(args) { - var ribbon = $("#defaultRibbon").data("ejRibbon"); - $("#fontcolor").ejColorPicker({ value: "#FFFF00", modelType: "palette", cssClass: "e-ribbon", toolIcon: "e-fontcoloricon", select: colorHandler }); - $("#fillcolor").ejColorPicker({ value: "#FF0000", modelType: "palette", cssClass: "e-ribbon", toolIcon: "e-fillcoloricon", select: colorHandler }); - } - }); - }); -} -function colorHandler(args:any) { - (this._id.indexOf("fillcolor") != -1) ? $("#contenteditor").css('background-color', args.value) : document.execCommand('forecolor', false, args.value); -} -function onClick(args:any) { - let val:any, prop = args.text; - val = (ej.isNullOrUndefined(args.model.text)) ? args.model.activeText : args.model.text; - if (action1.indexOf(val) != -1) - $("#contenteditor").empty(); - else if (action2.indexOf(val) != -1) - document.execCommand(val, false, null); - else if (fontfamily.indexOf(prop) != -1) - document.execCommand("FontName", false, prop); - else if (fontsize.indexOf(prop) != -1) - document.execCommand("FontSize", false, prop.replace("pt", "")); - else - $("#contenteditor").append("

    Action: " + val + " Triggered

    "); -} - - - -module RotatorComponent { - $(function () { - var rotatorInstance = new ej.Rotator($("#sliderContent"), { - slideWidth: "100%", - frameSpace: "0px", - slideHeight: "auto", - displayItemsCount: "1", - navigateSteps: "1", - pagerPosition:"outside", - orientation: "horizontal", - showPager: true, - enabled: true, - showCaption: true, - allowKeyboardNavigation: true, - showPlayButton: true, - isResponsive:true, - animationType: "slide", - }); - }); -} - - - -module RTEComponent { - $(function () { - var sample = new ej.RTE($("#rteSample"),{ - width: "100%", - minWidth: "150px", - showFooter: true, - showHtmlSource: true, - allowEditing: true, - allowKeyboardNavigation: true, - autoFocus: true, - autoHeight: true, - colorPaletteColumns: 10, - colorPaletteRows: 5, - cssClass: 'gradient-lime', - enableResize: true, - enableTabKeyNavigation: true, - fileBrowser: { - filePath: (window).baseurl + "Content/FileBrowser/", - extensionAllow: "*.png, *.doc, *.pdf, *.txt, *.docx", - ajaxAction: (window).baseurl + "api/FileExplorer/FileOperations" - }, - imageBrowser: { - filePath: (window).baseurl + "Content/FileBrowser/", - extensionAllow: "*.png, *.gif, *.jpg, *.jpeg, *.docx", - ajaxAction: (window).baseurl + "api/FileExplorer/FileOperations" - }, - isResponsive: true, - showClearAll: true, - showClearFormat: true, - showDimensions: true, - showCharCount: true, - tools: { - formatStyle: ["format"], - edit: ["findAndReplace"], - font: ["fontName", "fontSize", "fontColor", "backgroundColor"], - style: ["bold", "italic", "underline", "strikethrough"], - alignment: ["justifyLeft", "justifyCenter", "justifyRight", "justifyFull"], - lists: ["unorderedList", "orderedList"], - clipboard: ["cut", "copy", "paste"], - doAction: ["undo", "redo"], - indenting: ["outdent", "indent"], - clear: ["clearFormat", "clearAll"], - links: ["createLink", "removeLink"], - images: ["image"], - media: ["video"], - tables: ["createTable", "addRowAbove", "addRowBelow", "addColumnLeft", "addColumnRight", "deleteRow", "deleteColumn", "deleteTable"], - effects: ["superscript", "subscript"], - casing: ["upperCase", "lowerCase"], - view: ["fullScreen", "zoomIn", "zoomOut"], - print: ["print"], - customUnorderedList: [{ - name: "unOrderInsert", - tooltip: "Custom UnOrderList", - css: "e-rte-toolbar-icon e-rte-unlistitems customUnOrder", - text: "Smiley", - listImage: "url('../content/images/rte/Smiley-GIF.gif')" - }], - customOrderedList: [{ - name: "orderInsert", - tooltip: "Custom OrderList", - css: "e-rte-toolbar-icon e-rte-listitems customOrder", - text: "Lower-Greek", - listStyle: "lower-greek" - }] - } - }); - }); - -} - - - -module ScheduleComponent { - $(function () { - var sample = new ej.Schedule($("#Schedule1"), { - width: "100%", - height: "525px", - currentDate: new Date(2017, 5, 5), - timeScale: { - minorSlotCount: 4, - majorSlot: 60 - }, - contextMenuSettings: { - enable: true, - menuItems: { - appointment: [ - { id: "open", text: "Open Appointment" }, - { id: "delete", text: "Delete Appointment" }, - { id: "customMenu3", text: "Menu Item 3" }, - { id: "customMenu4", text: "Menu Item 4" } - ], - cells: [ - { id: "new", text: "New Appointment" }, - { id: "recurrence", text: "New Recurring Appointment" }, - { id: "today", text: "Today" }, - { id: "gotodate", text: "Go to date" }, - { id: "settings", text: "Settings" }, - { id: "view", text: "View", parentId: "settings" }, - { id: "timemode", text: "TimeMode", parentId: "settings" }, - { id: "view_Day", text: "Day", parentId: "view" }, - { id: "view_Week", text: "Week", parentId: "view" }, - { id: "view_Workweek", text: "Workweek", parentId: "view" }, - { id: "view_Month", text: "Month", parentId: "view" }, - { id: "timemode_Hour12", text: "12 Hours", parentId: "timemode" }, - { id: "timemode_Hour24", text: "24 Hours", parentId: "timemode" }, - { id: "workhours", text: "Work Hours", parentId: "settings" }, - { id: "customMenu1", text: "Menu Item 1" }, - { id: "customMenu2", text: "Menu Item 2" } - ] - } - }, - resources: [{ - field: "ownerId", - title: "Owner", - name: "Owners", allowMultiple: true, - resourceSettings: { - dataSource: [ - { text: "Nancy", id: 1, groupId: 1, color: "#f8a398" }, - { text: "Steven", id: 3, groupId: 2, color: "#56ca85" }, - { text: "Michael", id: 5, groupId: 1, color: "#51a0ed" } - ], - text: "text", id: "id", groupId: "groupId", color: "color" - } - }], - appointmentSettings: { - dataSource: new ej.DataManager((window).ResourcesData).executeLocal(new ej.Query().take(10)), - id: "Id", - subject: "Subject", - startTime: "StartTime", - endTime: "EndTime", - description: "Description", - allDay: "AllDay", - recurrence: "Recurrence", - recurrenceRule: "RecurrenceRule", - resourceFields: "ownerId" - } - }); - }); -} - - - -module ScrollerComponent { - $(function () { - var scrollerSample = new ej.Scroller($("#scrollcontent"), { - height: "300px", - width: "100%" - }); - $(window).bind('resize', function () { - scrollerSample.refresh(); - }); - }); -} - - - -module SignatureComponent { - $(function () { - var basicSignature = new ej.Signature($("#signature"), { - height: "400px", - isResponsive: true, - strokeWidth: 3 - }); - }); -} - - - - -module SliderComponent { - $(function () { - var slider = new ej.Slider($("#minSlider"), { - sliderType: "MinRange", - value: 60, - minValue: 0, - maxValue: 100 - }); - var rangeslider = new ej.Slider($("#rangeSlider"), { - sliderType: "Range", - values: [30, 60], - minValue: 0 - }); - - }); -} - - - - - - -module linesparkline { - $(function () { - - var sparklinesample = new ej.Sparkline($("#line"), { - dataSource: [12, 14, 11, 12, 11, 15, 12, 10, 11, 12, 15, 13, 12, 11, 10, 13, 15, 12, 14, 16, 14, 12, 11], - tooltip: { - visible: true, - font: { size:"12px" } - }, - type: "line", - size: { height: "40", width:"170" }, - }); - }); -} - -module columnsparkline { - $(function () { - var sparkcolumnsample = new ej.Sparkline($("#column"), { - dataSource: [2, 6, -1, 1, 12, 5, -2, 7, -3, 5, 8, 10,], - negativePointColor: "red", - highPointColor: "blue", - tooltip: { - visible: true, - font: { - size: "12px", - } - }, - type: "column", - size: { height: "100", width: "150" }, - }); - }); -} - -module areasparkline { - $(function () { - var sparkareasample = new ej.Sparkline($("#area"), { - dataSource: [12, -10, 11, 8, 17, 6, 2, -17, 13, -6, 8, 10,], - markerSettings: { visible: true }, - highPointColor: "blue", - lowPointColor: "orange", - type: "area", - opacity: 0.5, - tooltip: { - visible: true, - font: { - size: "12px", - } - }, - size: { height: "100", width: "150" }, - }); - }); -} - -module windlosssparkline { - $(function () { - var sparkwinlosssample = new ej.Sparkline($("#winloss"), { - dataSource: [12, 15, -11, 13, 17, 0, -12, 17, 13, -15, 8, 10,], - type: "winloss", - size: { height: "100", width: "150" }, - }); - }); -} - -module piesparkline1 { - $(function () { - var sparkpiesample1 = new ej.Sparkline($("#pie1"), { - dataSource: [4, 6, 7], - type: "pie", - tooltip: { - visible: true, - font: { - size: "12px", - } - }, - size: { height: "40", width: "40" }, - }); - }); -} - -module piesparkline2 { - $(function () { - var sparkpiesample2 = new ej.Sparkline($("#pie2"), { - dataSource: [8, 9, 1,], - type: "pie", - tooltip: { - visible: true, - font: { - size: "12px", - } - }, - size: { height: "40", width: "40" }, - }); - }); -} - -module piesparkline3 { - $(function () { - var sparkpiesample3 = new ej.Sparkline($("#pie3"), { - dataSource: [2, 3, 5], - type: "pie", - tooltip: { - visible: true, - font: { - size: "12px", - } - }, - size: { height: "40", width: "40" }, - }); - }); -} - -module piesparkline4 { - $(function () { - var sparkpiesample4 = new ej.Sparkline($("#pie4"), { - dataSource: [10, 12, 11], - type: "pie", - tooltip: { - visible: true, - font: { - size: "12px", - } - }, - size: { height: "40", width: "40" }, - }); - }); -} - - - - -module SplitterComponent { - $(function () { - var splitterInstance = new ej.Splitter($("#outterSpliter"), { - height: "250px", - width: "50%", - orientation: ej.Orientation.Vertical, - properties: [{}, { paneSize: 80 }], - isResponsive:true - }); - var splitterInstance1 = new ej.Splitter($("#innerSpliter"), { - isResponsive:true, - }); - }); -} - - - -module SpreadsheetComponent { -$(function () { - var sample = new ej.Spreadsheet($("#basicSpreadsheet"), { - scrollSettings: { - height: 550, - }, - importSettings: { - importMapper: (window).baseurl + "api/Spreadsheet/Import" - }, - exportSettings: { - excelUrl: (window).baseurl + "api/Spreadsheet/ExcelExport", - csvUrl: (window).baseurl + "api/Spreadsheet/CsvExport", - pdfUrl: (window).baseurl + "api/Spreadsheet/PdfExport" - }, - sheets: [{ rangeSettings: [{ dataSource: (window).defaultData, startCell: "A1" }] }], - loadComplete: () => { - var spreadsheet = $("#basicSpreadsheet").data("ejSpreadsheet"), xlFormat = spreadsheet.XLFormat; - if (!(spreadsheet).isImport) { - spreadsheet.setWidthToColumns([140, 128, 105, 100, 100, 110, 120, 120, 100]); - xlFormat.format({ "style": { "font-weight": "bold" } }, "A1:H1"); - xlFormat.format({ "type": "currency" }, "E2:H11"); - spreadsheet.XLRibbon.updateRibbonIcons(); - }} - }); - }); -} - - - -var default_data: Array = [ - { Category : "Employees", Country : "USA", JobDescription : "Sales", JobGroup:"Executive", EmployeesCount : 50 }, - { Category : "Employees", Country : "USA", JobDescription : "Sales", JobGroup : "Analyst", EmployeesCount : 40 }, - { Category : "Employees", Country : "USA", JobDescription : "Marketing", EmployeesCount : 40 }, - { Category : "Employees", Country : "USA", JobDescription : "Technical", JobGroup : "Testers", EmployeesCount : 55 }, - { Category : "Employees", Country : "USA", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Windows", EmployeesCount : 175}, - { Category : "Employees", Country : "USA", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Web", EmployeesCount : 70 }, - { Category : "Employees", Country : "USA", JobDescription : "Management", EmployeesCount : 40 }, - { Category : "Employees", Country : "USA", JobDescription : "Accounts", EmployeesCount : 60 }, - - { Category : "Employees", Country : "India", JobDescription : "Technical", JobGroup : "Testers", EmployeesCount : 43 }, - { Category : "Employees", Country : "India", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Windows", EmployeesCount : 125}, - { Category : "Employees", Country : "India", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Web", EmployeesCount : 60 }, - { Category : "Employees", Country : "India", JobDescription : "HR Executives", EmployeesCount : 70 }, - { Category : "Employees", Country : "India", JobDescription : "Accounts", EmployeesCount : 45 }, - - { Category : "Employees", Country : "Germany", JobDescription : "Sales", JobGroup : "Executive", EmployeesCount : 30 }, - { Category : "Employees", Country : "Germany", JobDescription : "Sales", JobGroup : "Analyst", EmployeesCount : 40 }, - { Category : "Employees", Country : "Germany", JobDescription : "Marketing", EmployeesCount : 50 }, - { Category : "Employees", Country : "Germany", JobDescription : "Technical", JobGroup : "Testers", EmployeesCount : 40 }, - { Category : "Employees", Country : "Germany", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Windows", EmployeesCount : 65 }, - { Category : "Employees", Country : "Germany", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Web", EmployeesCount : 27 }, - { Category : "Employees", Country : "Germany", JobDescription : "Management", EmployeesCount : 33 }, - { Category : "Employees", Country : "Germany", JobDescription : "Accounts", EmployeesCount : 55 }, - - { Category : "Employees", Country : "UK", JobDescription : "Technical", JobGroup : "Testers", EmployeesCount : 45 }, - { Category : "Employees", Country : "UK", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Windows", EmployeesCount : 96 }, - { Category : "Employees", Country : "UK", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Web", EmployeesCount : 55 }, - { Category : "Employees", Country : "UK", JobDescription : "HR Executives", EmployeesCount : 60 }, - { Category : "Employees", Country : "UK", JobDescription: "Accounts", EmployeesCount: 30 }, - - { Category : "Employees", Country : "France", JobDescription : "Technical", JobGroup : "Testers", EmployeesCount : 40 }, - { Category : "Employees", Country : "France", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Windows", EmployeesCount : 65 }, - { Category : "Employees", Country : "France", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Web", EmployeesCount : 27 }, - { Category : "Employees", Country : "France", JobDescription: "Marketing", EmployeesCount: 50 } -]; - -module sunburstcomponent { - $(function () { - var sunburstsample = new ej.SunburstChart($("#Sunburst"), { - valueMemberPath: "EmployeesCount", - levels: [ - {groupMemberPath: "Country"}, - {groupMemberPath: "JobDescription"}, - {groupMemberPath: "JobGroup"}, - {groupMemberPath: "JobRole"} - ], - dataSource: default_data, - dataLabelSettings:{visible:true}, - tooltip:{visible:false}, - enableAnimation:false, - size:{height:"600"}, - innerRadius:0.2, - load: function () { - var sender = $("#Sunburst").data("ejSunburstChart"); - var SunBurstTheme = (window).themeStyle + (window).themeColor + (window).themeVarient; - SunBurstTheme = SunBurstTheme.toString(); - if (SunBurstTheme.indexOf("dark") > -1 || SunBurstTheme.indexOf("contrast") > -1) - SunBurstTheme = "flatdark"; - else - SunBurstTheme = "flatlight"; - sender.model.theme = SunBurstTheme; - }, - title:{text:"Employees Count"}, - zoomSettings:{enable:false}, - legend:{visible:true,position:'top'}, - }); - }); -} - - - -module TabComponent { - $(function () { - var sample = new ej.Tab($("#defaultTab"),{ - width: "500px", - collapsible: true, - events: "click", - heightAdjustMode: ej.Tab.HeightAdjustMode.Content, - showCloseButton: true, - showRoundedCorner: false - }); - }); -} - - - -module TagCloudComponent { - - var websiteCollection = [ - { text: "Google", url: "http://www.google.com", frequency: 12 }, - { text: "All Things Digital", url: "http://allthingsd.com/", frequency: 3 }, - { text: "Arts Technica", url: "http://arstechnica.com/", frequency: 8 }, - { text: "Business Week", url: "http://www.businessweek.com/", frequency: 2 }, - { text: "Yahoo", url: "http://in.yahoo.com/", frequency: 12 }, - { text: "Center Networks", url: "http://www.centernetworks.com/", frequency: 5 }, - { text: "Crave", url: "http://news.cnet.com/crave/", frequency: 8 }, - { text: "Crunch Gear", url: "http://techcrunch.com/gadgets/", frequency: 20 }, - { text: "Daily Tech", url: "http://www.dailytech.com/", frequency: 1 }, - { text: "Electronista", url: "http://www.electronista.com/", frequency: 3 }, - { text: "Engadget", url: "http://www.engadget.com/", frequency: 5 }, - { text: "Gearlog", url: "http://www.gearlog.com/", frequency: 9 }, - { text: "Information Week", url: "http://www.informationweek.com/", frequency: 0 }, - { text: "PCWorld", url: "http://www.pcworld.com/", frequency: 11 }, - { text: "Tech Republic", url: "http://techrepublic.com/", frequency: 3 }, - { text: "Valleywag", url: "http://valleywag.gawker.com/", frequency: 6 }, - { text: "Rediff", url: "http://in.rediff.com/", frequency: 9 }, - { text: "WebProNews", url: "http://www.webpronews.com/", frequency: 2 } - ]; - - $(function () { - var sample = new ej.TagCloud($("#techWebList"), { - titleText: "Tech Sites", - dataSource: websiteCollection, - cssClass: "gradient-lime", - fields: { - text: "text", url: "url", frequency: "frequency" - } - }); - }); -} - - -module EditorComponent { - $(function () { - var num = new ej.NumericTextbox($("#numeric"), { - value: 30, - minValue: 1, - maxValue: 100, - name: "numeric", - width: "100%" - }); - var per = new ej.PercentageTextbox($("#percent"), { - value: 60, - minValue: 10, - maxValue: 1000, - name: "percent", - width: "100%" - }); - var cur = new ej.CurrencyTextbox($("#currency"), { - value: 100, - minValue: 10, - maxValue: 1000, - name: "currency", - width: "100%" - }); - var mask = new ej.MaskEdit($("#maskedit"), { - name: "mask", - value: "4242422424", - maskFormat: "99 999-99999", - width: "100%" - }) - }); -} - - - -module TileViewComponent { - $(function () { - var tile1 = new ej.Tile($("#tile1"), { - imagePosition:"fill", - caption:{text:"People"}, - tileSize:"medium", - imageUrl:'content/images/tile/windows/people_1.png' - }); - var tile2 = new ej.Tile($("#tile2"), { - imagePosition:"center", - tileSize:"small", - imageUrl:'content/images/tile/windows/alerts.png', - }); - var tile3 = new ej.Tile($("#tile3"), { - imagePosition:"center", - tileSize:"small", - imageUrl:'content/images/tile/windows/bing.png', - }); - var tile4 = new ej.Tile($("#tile4"), { - tileSize:"small", - imageUrl:'content/images/tile/windows/camera.png', - }); - var tile5 = new ej.Tile($("#tile5"), { - imagePosition:"center", - tileSize:"small", - imageUrl:'content/images/tile/windows/messages.png', - }); - var tile6 = new ej.Tile($("#tile6"), { - imagePosition:"center", - tileSize:"medium", - imageUrl:'content/images/tile/windows/games.png', - caption:{text:"Play"} - }); - var tile7 = new ej.Tile($("#tile7"), { - tileSize:"medium", - imageUrl:'content/images/tile/windows/map.png', - caption:{text:"Maps"} - }); - var tile8 = new ej.Tile($("#tile8"), { - imagePosition:"fill", - tileSize:"wide", - imageUrl:'content/images/tile/windows/sports.png', - caption:{text:"Sports"} - }); - var tile9 = new ej.Tile($("#tile9"), { - imagePosition:"fill", - tileSize:"medium", - imageUrl:'content/images/tile/windows/people_2.png', - caption:{text:"People"} - }); - var tile10 = new ej.Tile($("#tile10"), { - imagePosition:"center", - tileSize:"medium", - imageUrl:'content/images/tile/windows/pictures.png', - caption:{text:"Photo"} - }); - var tile11 = new ej.Tile($("#tile11"), { - imagePosition:"center", - tileSize:"wide", - imageUrl:'content/images/tile/windows/weather.png', - caption:{text:"Weather"} - }); - var tile12 = new ej.Tile($("#tile12"), { - imagePosition:"center", - tileSize:"medium", - imageUrl:'content/images/tile/windows/music.png', - caption:{text:"Music"} - }); - var tile13 = new ej.Tile($("#tile13"), { - imagePosition:"center", - tileSize:"medium", - imageUrl:'content/images/tile/windows/favs.png', - caption:{text:"Favorites"} - }); - }); -} - - - -module TimePickerComponent { - $(function () { - var timeSample = new ej.TimePicker($("#timepick"), { - width: "100%" - }); - }); -} - - - - -module ToolbarComponent { - $(function () { - var sample = new ej.Toolbar($("#editingToolbar"),{ - width: "100%", - cssClass: "gradient-lime", - enableSeparator: true, - isResponsive: true, - orientation: ej.Orientation.Horizontal, - showRoundedCorner: true - }); - }); -} - - - -module TooltipComponent { - $(function () { - - var sample1 = new ej.Tooltip($("#link1"),{ - content: "ECMAScript (or ES) is a trademarked scripting-language specification standardized by Ecma International in ECMA-262 and ISO/IEC 16262.", - associate: "mousefollow", - autoCloseTimeout: 5000, - collision: "fit", - containment: ".frame", - showRoundedCorner: true, - showShadow: true - }); - - var sample2 = new ej.Tooltip($("#link2"),{ - content: "The World Wide Web (WWW) is an information space where documents and other web resources are identified by URLs, interlinked by hypertext links, and can be accessed via the Internet.", - position: { - stem: { - horizontal: "right", - vertical: "center" - }, - target: { - horizontal: "left", - vertical: "center" - } - }, - autoCloseTimeout: 5000, - collision: "fit", - containment: ".frame", - showRoundedCorner: true, - showShadow: true - }); - - var sample3 = new ej.Tooltip($("#link3"),{ - content: 'Object-oriented programming (OOP) is a programming language model organized around objects rather than "actions" and data rather than logic.', - position: { - stem: { - horizontal: "right", - vertical: "center" - }, - target: { - horizontal: "left", - vertical: "center", - }, - }, - associate: "mousefollow", - autoCloseTimeout: 5000, - collision: "fit", - containment: ".frame", - showRoundedCorner: true, - showShadow: true - }); - }); -} - - - -module TreeGridComponent { - $(function () { - var treegridInstance = new ej.TreeGrid($("#TreeGridContainer"), { - dataSource: (window).treeGridData, - childMapping: "subtasks", - allowSorting: true, - allowMultiSorting: true, - enableAltRow: true, - allowFiltering: true, - treeColumnIndex: 1, - allowKeyboardNavigation: true, - showColumnChooser: true, - showColumnOptions: true, - contextMenuSettings: { - showContextMenu: true, - contextMenuItems: ["add", "edit", "delete"] - }, - columnDialogFields: ["field", "headerText", "editType", "width", "visible", "allowSorting", "textAlign", "headerTextAlign"], - editSettings: { - allowAdding: true, - allowEditing: true, - allowDeleting: true, - editMode: "cellEditing", - rowPosition: "belowSelectedRow" - }, - toolbarSettings: { - showToolbar: true, - toolbarItems: ["add","edit","delete","update","cancel","expandAll","collapseAll"] - }, - columns: [ - { field: "taskID", headerText: "Task Id", allowFiltering: false, editType: "numericedit", filterEditType: "numericedit" }, - { field: "taskName", headerText: "Task Name", editType: "stringedit", filterEditType: "stringedit" }, - { field: "startDate", headerText: "Start Date", editType: "datepicker", filterEditType: "datepicker", format:"{0:MM/dd/yyyy}" }, - { field: "endDate", headerText: "End Date", editType: "datepicker", filterEditType: "datepicker", format:"{0:MM/dd/yyyy}" }, - { field: "progress", headerText: "Progress", editType: "numericedit", filterEditType: "numericedit" } - ], - isResponsive: true, - }); -}); -} - - - -var population_data: Array = [ - { Continent: "Asia", Country: "Indonesia", Growth: 3, Population: 237641326 }, - { Continent: "Asia", Country: "Russia", Growth: 2, Population: 152518015 }, - { Continent: "Asia", Country: "Malaysia", Growth: 1, Population: 29672000 }, - { Continent: "North America", Country: "United States", Growth: 4, Population: 315645000 }, - { Continent: "North America", Country: "Mexico", Growth: 2, Population: 112336538 }, - { Continent: "North America", Country: "Canada", Growth: 1, Population: 39056064 }, - { Continent: "South America", Country: "Colombia", Growth: 1, Population: 47000000 }, - { Continent: "South America", Country: "Brazil", Growth: 3, Population: 193946886 }, - { Continent: "Africa", Country: "Nigeria", Growth: 2, Population: 170901000 }, - { Continent: "Africa", Country: "Egypt", Growth: 1, Population: 83661000 }, - { Continent: "Europe", Country: "Germany", Growth: 1, Population: 81993000 }, - { Continent: "Europe", Country: "France", Growth: 1, Population: 65605000 }, - { Continent: "Europe", Country: "UK", Growth: 1, Population: 63181775 } -]; - -module treemapcomponent { - $(function () { - var treemapsample = new ej.datavisualization.TreeMap($("#treemap"), { - leafItemSettings: { showLabels: true, labelPath: "Country" }, - rangeColorMapping: [ - { color: "#77D8D8", legendLabel: "1% Growth", from: 0, to: 1 }, - { color: "#AED960", from: 0, legendLabel: "2% Growth", to: 2 }, - { color: "#FFAF51", from: 0, legendLabel: "3% Growth", to: 3 }, - { color: "#F3D240", from: 0, legendLabel: "4% Growth", to: 4 } - ], - levels: [ - { groupPath: "Continent", groupGap: 5, headerHeight: 25, showHeader: true, headerTemplate: 'headertemplate' } - ], - dataSource: population_data, - colorValuePath: "Growth", - weightValuePath: "Population", - borderThickness: 0, - showLegend: true - }); - }); -} - - - -module TreeViewComponent { - $(function () { - var tree = new ej.TreeView($("#treeView"), { - allowEditing: true, - allowDragAndDrop: true, - allowDropChild: true, - allowDropSibling: true, - }); - }); -} - - - -module UploadboxComponent { - - $(function () { - var sample = new ej.Uploadbox($("#UploadDefault"),{ - saveUrl: (window).baseurl + "api/uploadbox/Save", - removeUrl: (window).baseurl + "api/uploadbox/Remove", - buttonText: { - browse: "Choose File", upload: "Upload", cancel: "Cancel" - }, - cssClass: "gradient- purple", - dialogAction: { - modal: false, closeOnComplete: false, drag: true - }, - extensionsAllow: ".zip", - multipleFilesSelection: true, - showFileDetails: true - }); - }); - -} - - - -module WaitingPopupComponent { - $(function () { - var sample = new ej.WaitingPopup($("#target"),{ - showOnInit: true, - showImage: true, - text: 'waiting…', - target: "#target", - appendTo: "#waiting" - }); - }); - -} +module AccordionComponent { + $(function () { + var sample = new ej.Accordion($("#basicAccordion"), { + width: "100%", + allowKeyboardNavigation: true, + collapseSpeed: 500, + collapsible: true, + enableAnimation: true, + enableMultipleOpen: true, + events: "click", + expandSpeed: 500, + headerSize: "40px", + htmlAttributes: { title: "Demo" }, + selectedItemIndex: 1, + showCloseButton: true, + showRoundedCorner: true + }); + }); +} + + + +module AutocompleteComponent{ + var carList = [ + "Audi S6", "Austin-Healey", "Alfa Romeo", "Aston Martin", + "BMW 7", "Bentley Mulsanne", "Bugatti Veyron", + "Chevrolet Camaro", "Cadillac", + "Duesenberg J", "Dodge Sprinter", + "Elantra", "Excavator", + "Ford Boss 302", "Ferrari 360", "Ford Thunderbird", + "GAZ Siber", + "Honda S2000", "Hyundai Santro", + "Isuzu Swift", "Infiniti Skyline", + "Jaguar XJS", + "Kia Sedona EX", "Koenigsegg Agera", + "Lotus Esprit", "Lamborghini Diablo", + "Mercedes-Benz", "Mercury Coupe", "Maruti Alto 800", + "Nissan Qashqai", + "Oldsmobile S98", "Opel Superboss", + "Porsche 356", "Pontiac Sunbird", + "Scion SRS/SC/SD", "Saab Sportcombi", "Subaru Sambar", "Suzuki Swift", + "Triumph Spitfire", "Toyota 2000GT", + "Volvo P1800", "Volkswagen Shirako" + ]; + $(function () { + var autocompleteInstance =new ej.Autocomplete($("#selectCar"), { + width: "100%", + watermarkText: "Select a car", + dataSource: carList, + enableAutoFill: true, + showPopupButton: true, + multiSelectMode: "delimiter" + }); + }); +} + + + + +module Barcodecomponent { + $(function () { + var barcodesample = new ej.datavisualization.Barcode($("#Barcode"), { + text:"http://www.syncfusion.com" + }); + }); +} + + + + + +module Bulletgraphcomponent { + $(function () { + var bulletsample = new ej.datavisualization.BulletGraph($("#BulletGraph"), { + isResponsive: true, + load: function () { + var sender = $("#BulletGraph").data("ejBulletGraph"); + var bulletTheme = (window).themeStyle + (window).themeColor + (window).themeVarient; + if (bulletTheme) { + switch (bulletTheme) { + case "flatdark": + case "flatazuredark": + case "flatlimedark": + case "flatsaffrondark": + case "gradientdark": + case "gradientazuredark": + case "gradientlimedark": + case "gradientsaffrondark": + case "flathigh-contrast-01dark": + case "flathigh-contrast-02dark": + bulletTheme = "flatdark"; + break; + case "flatoffice-365light": + case "flatmateriallight": + bulletTheme = "material"; + break; + default: + bulletTheme = "flatlight"; + break; + } + sender.model.theme = bulletTheme; + } + + }, + tooltipSettings: { visible: true }, + quantitativeScaleSettings: { + featureMeasures: [{ + value: 8, comparativeMeasureValue:6.7 + }] + }, + qualitativeRanges: [{ + rangeEnd: 4.3, rangeStroke:"#ebebeb", + }, + { + rangeEnd: 7.3, rangeStroke:"#d8d8d8" + }, + { + rangeEnd: 10, rangeStroke: "#7f7f7f" + } + ], + captionSettings: { + textPosition: 'right', text: 'Revenue YTD', + subTitle: { + text: "$ in Thousands", textPosition:"right" + } + } + }); + }); +} + + + + + +module ButtonComponent { + $(function () { + var basicButton = new ej.Button($("#buttonnormal"), { + size: "large", + showRoundedCorner: true, + contentType: "textandimage", + prefixIcon: "e-icon e-save", + text: "Save" + }); + var toggleButton = new ej.ToggleButton($("#TextOnly"), { + showRoundedCorner: true, + size: "large", + contentType: "textandimage", + defaultPrefixIcon: "e-icon e-save", + activePrefixIcon: "e-icon e-delete", + defaultText: "Save", + activeText: "Delete" + }); + var splitbuttonnormal = new ej.SplitButton($("#splitbuttonnormal"), { + showRoundedCorner: true, + size: "large", + prefixIcon: "e-icon e-file-empty", + targetID: "menu1", + contentType: "textandimage", + text: "File" + }); + var groupButton = new ej.GroupButton($("#groupButton"), { + showRoundedCorner: true, + size: "large" + }); + var check1 = new ej.CheckBox($("#check1"), { + size: "medium", enableTriState: true + }); + var check2 = new ej.CheckBox($("#check2"), { + size: "medium", enableTriState: true + }); + var radio1 = new ej.RadioButton($("#radio1"), { + size: "medium" + }); + var radio2 = new ej.RadioButton($("#radio2"), { + size: "medium", checked: true + }); + }); +} + + + + +module ChartComponent { + $(function () { + var chartsample = new ej.datavisualization.Chart($("#Chart"), { + primaryXAxis: { + range: { min: 2005, max: 2011, interval: 1 }, + title: { text: "Year" }, + valueType: "category" + }, + primaryYAxis: { + range: { min: 25, max: 50, interval: 5 }, + labelFormat: "{value}%", + title: { text: "Efficiency" }, + }, + commonSeriesOptions: + { + type: 'line', enableAnimation: true, + tooltip:{ visible :true, template:'Tooltip'}, + marker: + { + shape: 'circle', + size: + { + height: 10, width: 10 + }, + visible: true + }, + border : {width: 2} + }, + series: + [ + { + points: [{ x: 2005, y: 28 }, { x: 2006, y: 25 }, { x: 2007, y: 26 }, { x: 2008, y: 27 }, + { x: 2009, y: 32 }, { x: 2010, y: 35 }, { x: 2011, y: 30 }], + name: 'India' + }, + { + points: [{ x: 2005, y: 31 }, { x: 2006, y: 28 }, { x: 2007, y: 30 }, { x: 2008, y: 36 }, + { x: 2009, y: 36 }, { x: 2010, y: 39 }, { x: 2011, y: 37 }], + name: 'Germany' + }, + { + points: [{ x: 2005, y: 36 }, { x: 2006, y: 32 }, { x: 2007, y: 34 }, { x: 2008, y: 41 }, + { x: 2009, y: 42 }, { x: 2010, y: 42 }, { x: 2011, y: 43 }], + name: 'England' + }, + { + points: [{ x: 2005, y: 39 }, { x: 2006, y: 36 }, { x: 2007, y: 40 }, { x: 2008, y: 44 }, + { x: 2009, y: 45 }, { x: 2010, y: 48 }, { x: 2011, y: 46 }], + name: 'France' + } + ], + isResponsive: true, + load: function () { + var sender = $("#Chart").data("ejChart"); + if (!!window.orientation && sender) { //to modify chart properties for mobile view + var model = sender.model, + seriesLength = model.series.length; + model.legend.visible = false; + model.size.height = null; + model.size.width = null; + for (var i = 0; i < seriesLength; i++) { + if (!model.series[i].marker) + model.series[i].marker = {}; + if (!model.series[i].marker.size) + model.series[i].marker.size = {}; + model.series[i].marker.size.width = 6; + model.series[i].marker.size.height = 6; + } + model.primaryXAxis.labelIntersectAction = "rotate45"; + if (model.primaryXAxis.title) + model.primaryXAxis.title.text = ""; + if (model.primaryYAxis.title) + model.primaryYAxis.title.text = ""; + model.primaryXAxis.edgeLabelPlacement = "hide"; + model.primaryYAxis.labelIntersectAction = "rotate45"; + model.primaryYAxis.edgeLabelPlacement = "hide"; + } + var theme = (window).themeStyle + (window).themeColor + (window).themeVarient; + if (theme) { + switch (theme) { + case "flatdark": + case "flatazuredark": + case "flatlimedark": + case "flatsaffrondark": + theme = "flatdark"; + break; + case "gradientlight": + case "gradientazurelight": + case "gradientlimelight": + case "gradientsaffronlight": + theme = "gradientlight"; + break; + case "gradientdark": + case "gradientazuredark": + case "gradientlimedark": + case "gradientsaffrondark": + theme = "gradientdark"; + break; + case "flatbootstraplight": + theme = "bootstrap"; + break; + case "flathigh-contrast-01dark": + case "flathigh-contrast-02dark": + theme = "high-contrast-01"; + break; + case "flatmateriallight": + case "flatoffice-365light": + theme = "material"; + break; + + default: + theme = "flatlight"; + break; + } + sender.model.theme = theme; + } + }, + title: { text: 'Efficiency of oil-fired power production' }, + size: { height: "600" }, + legend: { visible: true}, + }); + }); +} + + + + +module circulargaugecomponent { + $(function () { + var circularsample = new ej.datavisualization.CircularGauge($("#CircularGauge"), { + enableAnimation: false, + isResponsive: true, + backgroundColor: "transparent", width: 500, + scales: [{ + showRanges: true, + startAngle: 122, sweepAngle: 296, radius: 130, showScaleBar: true, size: 1, maximum: 120, majorIntervalValue: 20, minorIntervalValue: 10, + border: { + width: 0.5, + }, + pointers: [{ + value: 60, + showBackNeedle: true, + backNeedleLength: 20, + length: 95, + width: 7 + }], + ticks: [{ + type: "major", + distanceFromScale: 2, + height: 16, + width: 1, color: "#8c8c8c" + }, { type: "minor", height: 8, width: 1, distanceFromScale: 2, color: "#8c8c8c" }], + labels: [{ + color: "#8c8c8c" + }], + ranges: [{ + distanceFromScale: -30, + startValue: 0, + endValue: 70 + }, { + distanceFromScale: -30, + startValue: 70, + endValue: 110, + backgroundColor: "#fc0606", + border: { color: "#fc0606" } + }, + { + distanceFromScale: -30, + startValue: 110, + endValue: 120, + backgroundColor: "#f5b43f", + border: { color: "#f5b43f" } + }] + }] + }); + }); +} + + + +module ColorPickerComponent { + $(function () { + var colorSample = new ej.ColorPicker($("#colorpick"), { + value: "#278787" + }); + }); +} + + + + +module ComboBoxComponent{ + var BikeList = [ + { empid: "bk1", text: "Apache RTR" }, { empid: "bk2", text: "CBR 150-R" }, { empid: "bk3", text: "CBZ Xtreme" }, + { empid: "bk4", text: "Discover" }, { empid: "bk5", text: "Dazzler" }, { empid: "bk6", text: "Flame" }, + { empid: "bk7", text: "Fazzer" }, { empid: "bk8", text: "FZ-S" }, { empid: "bk9", text: "Pulsar" }, + { empid: "bk10", text: "Shine" }, { empid: "bk11", text: "R15" }, { empid: "bk12", text: "Unicorn" } + ]; + $(function () { + var comboboxInstance =new ej.ComboBox($("#selectCar"), { + width: "100%", + placeholder: "Select a Bike", + fields: { text: "text", value: "empid" }, + dataSource: BikeList, + autofill: true + }); + }); +} + + + +module DatePickerComponent { + $(function () { + var dateSample = new ej.DatePicker($("#datepick"), { + width: "100%" + }); + }); +} + + + + +module DateTimePickerComponent { + $(function () { + var datetimeSample = new ej.DateRangePicker($("#daterangepick"), { + width: "100%" + }); + }); +} + + + +module DateTimePickerComponent { + $(function () { + var datetimeSample = new ej.DateTimePicker($("#datetimepick"), { + width: "100%" + }); + }); +} + + + +$(function () { + var diagram = new ej.datavisualization.Diagram($("#diagram"), { + width: "1000px", + height: "600px", + pageSettings: { + //Sets page size + pageHeight: 500, + pageWidth: 500, + //Customizes the appearance of page + pageBorderWidth: 4, + pageBackgroundColor: "white", + pageBorderColor: "lightgray", + pageMargin: 25, + showPageBreak: true, + multiplePage: true, + pageOrientation: ej.datavisualization.Diagram.PageOrientations.Portrait + }, + scrollSettings: { + horizontalOffset: 0, + verticalOffset: 0 + }, + snapSettings: { + snapConstraints: ej.datavisualization.Diagram.SnapConstraints.ShowLines + }, + nodes: [ + createNode({ name: "NewIdea", width: 150, height: 60, offsetX: 300, offsetY: 60, labels: [createLabel({ "text": "New idea identified" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Terminator }), + createNode({ name: "Meeting", width: 150, height: 60, offsetX: 300, offsetY: 155, labels: [createLabel({ "text": "Meeting with board" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Process }), + createNode({ + name: "BoardDecision", width: 150, height: 110, offsetX: 300, offsetY: 280, labels: [createLabel({ text: "Board decides \nwhether \nto proceed", wrapText: "true", "margin": { left: 20, top: 0, right: 20, bottom: 0 } })], + type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Decision + }), + createNode({ name: "Project", width: 150, height: 100, offsetX: 300, offsetY: 430, labels: [createLabel({ "text": "Find Project \nmanager" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Decision }), + createNode({ + name: "End", width: 150, height: 60, offsetX: 300, offsetY: 555, labels: [createLabel({ "text": "Implement and Deliver" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Process }), + createNode({ name: "Decision", width: 250, height: 60, offsetX: 550, offsetY: 60, labels: [createLabel({ "text": "Decision Process for new software ideas" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Card, fillColor: "#858585", borderColor: "#858585" }), + createNode({ name: "Reject", width: 150, height: 60, offsetX: 550, offsetY: 285, labels: [createLabel({ "text": "Reject and write report" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Process }), + createNode({ name: "Resources", width: 150, height: 60, offsetX: 550, offsetY: 430, labels: [createLabel({ "text": "Hire new resources" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Process }) + ], + connectors: [ + createConnector({ name: "connector1", sourceNode: "NewIdea", targetNode: "Meeting" }), + createConnector({ name: "connector2", sourceNode: "Meeting", targetNode: "BoardDecision" }), + createConnector({ name: "connector3", sourceNode: "BoardDecision", targetNode: "Project", labels: [createLabel({ "text": "Yes" })] }), + createConnector({ name: "connector4", sourceNode: "Project", targetNode: "End", labels: [createLabel({ "text": "Yes" })] }), + createConnector({ name: "connector5", sourceNode: "BoardDecision", targetNode: "Reject", labels: [createLabel({ "text": "No" })] }), + createConnector({ name: "connector6", sourceNode: "Project", targetNode: "Resources", labels: [createLabel({ "text": "No" })] }) + ] + }); +}); + +function createNode(option: ej.datavisualization.Diagram.Node) { + if (!option.fillColor) { + option.borderColor = "#1BA0E2"; + option.fillColor = "#1BA0E2"; + } + option.labels[0].fontColor = "white"; + return option; +} + +function createConnector(option: ej.datavisualization.Diagram.Connector) { + option.targetDecorator = { shape: ej.datavisualization.Diagram.DecoratorShapes.Arrow, borderColor: "#606060", width: 10, height: 10 }; + option.lineColor = "#606060"; + if (option.labels && option.labels.length > 0) { + option.labels[0].fillColor = "white"; + } + return option; +} + +function createLabel(options : any) { + return options; +} + + + +module DialogComponent { + $(function () { + var dialogInstance = new ej.Dialog($("#basicDialog"), { + width: 550, + minWidth: 310, + minHeight: 215, + target:".control", + close:()=>{ + $("#btnOpen").show();} + }); + var btnInstance = new ej.Button($("#btnOpen"), { + size: "medium", + click: ()=>{ + $("#btnOpen").hide(); + $("#basicDialog").ejDialog("open");}, + type: "button", + height: 30, + width: 150 + }); + }); +} + + + + +module digitalgaugecomponent { + $(function () { + var digitalgaugesample = new ej.datavisualization.DigitalGauge($("#DigitalGauge"), { + width: 525, + height: 305, + isResponsive: true, + items: [{ + segmentSettings: { + width: 1, + spacing: 0, + color: "#8c8c8c" + }, + characterSettings: { + opacity: 0.8, + }, + value: "Syncfusion", + position: { x: 52, y: 52 } + }] + }); + }); +} + + + + + + +module DropDownListComponent { + var BikeList = [ + { empid: "bk1", text: "Apache RTR" }, { empid: "bk2", text: "CBR 150-R" }, { empid: "bk3", text: "CBZ Xtreme" }, + { empid: "bk4", text: "Discover" }, { empid: "bk5", text: "Dazzler" }, { empid: "bk6", text: "Flame" }, + { empid: "bk7", text: "Fazzer" }, { empid: "bk8", text: "FZ-S" }, { empid: "bk9", text: "Pulsar" }, + { empid: "bk10", text: "Shine" }, { empid: "bk11", text: "R15" }, { empid: "bk12", text: "Unicorn" } + ]; + $(function () { + var sample = new ej.DropDownList($("#bikeList"),{ + dataSource: BikeList, + width: "100%", + watermarkText: "Select a bike", + fields: { id: "empid", text: "text", value: "text" }, + enableFilterSearch: true, + caseSensitiveSearch: true, + enableIncrementalSearch: true, + enablePopupResize: true, + delimiterChar: ";", + multiSelectMode: ej.MultiSelectMode.Delimiter, + maxPopupHeight: "300px", + minPopupHeight: "150px", + maxPopupWidth: "500px", + minPopupWidth: "350px", + showCheckbox: true, + showRoundedCorner: true + }); + }); +} + + + + + +module ExplorerComponent { + $(function () { + var file = new ej.FileExplorer($("#fileExplorer"), { + path: (window).baseurl + "Content/FileBrowser/", + width: "100%", + minWidth: "150px", + layout: "tile", + isResponsive: true, + ajaxAction: (window).baseurl + "api/FileExplorer/FileOperations" + }); + }); +} + + + + +module GanttComponent { + $(function () { + var ganttInstance = new ej.Gantt($("#GanttContainer"), { + dataSource: (window).projectData, + allowColumnResize: true, + allowSorting: true, + allowSelection: true, + enableContextMenu: true, + taskIdMapping: "taskID", + allowDragAndDrop: true, + taskNameMapping: "taskName", + startDateMapping: "startDate", + showColumnChooser: true, + showColumnOptions: true, + progressMapping: "progress", + durationMapping: "duration", + endDateMapping: "endDate", + childMapping: "subtasks", + scheduleStartDate: "02/01/2017", + scheduleEndDate: "04/09/2017", + //Resources mapping + resourceInfoMapping: "resourceId", + resourceNameMapping: "resourceName", + resourceIdMapping: "resourceId", + resources: (window).projectResources, + predecessorMapping: "predecessor", + showResourceNames: true, + toolbarSettings: { + showToolbar: true, + toolbarItems: ["add","edit","delete","update","cancel","indent","outdent","expandAll","collapseAll","search"] + }, + editSettings: { + allowEditing: true, + allowAdding: true, + allowDeleting: true, + allowIndent: true, + editMode: "cellEditing" + }, + sizeSettings: { + width: "100%", + height: "100%" + }, + dragTooltip: { showTooltip: true }, + showGridCellTooltip: true, + treeColumnIndex: 1, + isResponsive: true, + }); +}); +} + + + +module GridComponent { + $(function () { + var gridInstance = new ej.Grid($("#Grid"), { + dataSource: (window).gridData, + allowGrouping: true, + allowSorting: true, + allowMultiSorting: true, + enableAltRow: true, + allowPaging: true, + allowReordering: true, + allowResizing: true, + allowFiltering: true, + allowScrolling: true, + enableRowHover: true, + selectionType: "multiple", + selectionSettings: { enableToggle: true, selectionMode: ["row", "cell", "column"] }, + allowKeyboardNavigation: true, + editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true, allowEditOnDblClick: true, showDeleteConfirmDialog: true }, + toolbarSettings: { showToolbar: true, toolbarItems: ["add", "edit", "delete", "update", "cancel", "search"] }, + columns: [ + { field: "OrderID", headerText: "Order ID", isPrimaryKey: true, width: 75, textAlign: ej.TextAlign.Right }, + { field: "CustomerID", headerText: "Customer ID", editType: ej.Grid.EditingType.String, width: 80 }, + { field: "EmployeeID", headerText: "Employee ID", width: 75, editType: ej.Grid.EditingType.Dropdown, textAlign: ej.TextAlign.Right, priority: 4 }, + { field: "Freight", width: 75, format: "{0:C}", editType: ej.Grid.EditingType.Numeric, textAlign: ej.TextAlign.Right, priority: 3 }, + { field: "OrderDate", headerText: "Order Date", width: 80, format: "{0:MM/dd/yyyy}", textAlign: ej.TextAlign.Right, priority: 2 }, + { field: "ShipCity", headerText: "Ship City", editType: ej.Grid.EditingType.Dropdown, width: 110, priority: 2 } + ], + isResponsive: true, + minWidth: 700, + showSummary: true, + summaryRows: [{ title: "Sum", summaryColumns: [{ summaryType: ej.Grid.SummaryType.Sum, displayColumn: "Freight", dataMember: "Freight", format: "{0:C2}" }] }] + }); + }); +} + + + +var columns = ["Vegie-spread", "Tofuaa", "Alice Mutton", "Konbu", "Fløtemysost"] +var itemSource: any[] = []; +for (var i = 0; i < columns.length; i++) { + for (var j = 0; j < 6; j++) { + var value = Math.floor((Math.random() * 100) + 1); + itemSource.push({ ProductName: columns[i], Year: "Y" + (2011 + j), Value: value }) + } +} + +$(function () { + var heatmap = new ej.datavisualization.HeatMap($("#heatmap"), { + colorMappingCollection: [ + { value: 0, color: "#8ec8f8", label: { text: "0" } }, + { value: 100, color: "#0d47a1", label: { text: "100" } } + ], + isResponsive: true, + itemsSource: itemSource, + width: "100%", + itemsMapping: { + column: { propertyName: "ProductName", displayName: "Product Name" }, + row: { propertyName: "Year", displayName: "Year" }, + value: { propertyName: "Value" }, + columnMapping: [ + { "propertyName": columns[0], "displayName": columns[0] }, + { "propertyName": columns[1], "displayName": columns[1] }, + { "propertyName": columns[2], "displayName": columns[2] }, + { "propertyName": columns[3], "displayName": columns[3] }, + { "propertyName": columns[4], "displayName": columns[4] }, + { "propertyName": columns[5], "displayName": columns[5] } + ], + headerMapping: { propertyName: "Year", displayName: "Year", columnStyle: { width: 105, textAlign: "right" } }, + }, + legendCollection: ["heatmap_legend"] + }); + var heatmaplegend = new ej.datavisualization.HeatMapLegend($("#heatmap_legend"), { + colorMappingCollection: [ + { value: 0, color: "#8ec8f8", label: { text: "0" } }, + { value: 100, color: "#0d47a1", label: { text: "100" } } + ], + height: "50px", + width: "75%", + isResponsive: true + }); +}); + + + + +module KanbanComponent { + $(function () { + var sample = new ej.Kanban($("#Kanban"), { + dataSource: new ej.DataManager((window).kanbanData).executeLocal(new ej.Query().take(20)), + columns: [ + { headerText: "Backlog", key: "Open" }, + { headerText: "In Progress", key: "InProgress" }, + { headerText: "Testing", key: "Testing" }, + { headerText: "Done", key: "Close" } + ], + keyField: "Status", + allowTitle: true, + fields: { + content: "Summary", + primaryKey: "Id", + imageUrl: "ImgUrl" + }, + allowSelection: false + }); + }); +} + + +module lineargaugecomponent { + $(function () { + var linearsample = new ej.datavisualization.LinearGauge($("#LinearGauge"), { + labelColor: "#8c8c8c", width: 500, + isResponsive: true, enableAnimation: false, + scales: [{ + width: 4, border: { color: "transparent", width: 0 }, showBarPointers: false, showRanges: true, length: 310, + position: { x: 52, y: 50 }, markerPointers: [{ + value: 50, length: 10, width: 10, backgroundColor: "#4D4D4D", border: { color: "#4D4D4D" } + }], + labels: [{ font: { size: "11px", fontFamily: "Segoe UI", fontStyle: "bold" }, distanceFromScale: { x: -13 } }], + ticks: [{ type: "majorinterval", width: 1, color: "#8c8c8c" }], + ranges: [{ + endValue: 60, + startValue: 0, + backgroundColor: "#F6B53F", + border: { color: "#F6B53F" }, startWidth: 4, endWidth: 4 + }, { + endValue: 100, + startValue: 60, + backgroundColor: "#E94649", + border: { color: "#E94649" }, startWidth: 4, endWidth: 4 + }] + }] + }); + }); +} + + + +module ListBoxComponent { + $(function () { + var listboxInstance = new ej.ListBox($("#selectcar"), { + showCheckbox: true + }); + }); +} + + + +module ListviewComponent { + $(function () { + var listviewInstance = new ej.ListView($("#defaultlistview"), { + enableCheckMark: true, + width: 400 + }); + }); +} + + +var world_map= + { + "type": "FeatureCollection", + "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, + "features": [ + { "type": "Feature", "properties": { "admin": "Afghanistan", "name": "Afghanistan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[61.21081709172573, 35.650072333309218], [62.230651483005879, 35.270663967422287], [62.984662306576588, 35.404040839167614], [63.193538445900337, 35.857165635718907], [63.982895949158696, 36.007957465146596], [64.546479119733888, 36.31207326918426], [64.746105177677393, 37.111817735333297], [65.588947788357828, 37.305216783185628], [65.745630731066811, 37.661164048812061], [66.217384881459324, 37.393790188133913], [66.518606805288655, 37.362784328758785], [67.075782098259609, 37.35614390720928], [67.829999627559502, 37.144994004864678], [68.135562371701369, 37.023115139304302], [68.859445835245921, 37.344335842430588], [69.196272820924364, 37.15114350030742], [69.518785434857946, 37.608996690413413], [70.116578403610319, 37.588222764632086], [70.270574171840124, 37.73516469985401], [70.376304152309274, 38.138395901027515], [70.806820509732873, 38.486281643216408], [71.348131137990251, 38.258905341132156], [71.239403924448155, 37.953265082341879], [71.541917759084768, 37.905774441065631], [71.448693475230229, 37.065644843080513], [71.84463829945058, 36.738171291646914], [72.193040805962383, 36.94828766534566], [72.636889682917271, 37.047558091778349], [73.260055779924983, 37.495256862938994], [73.948695916646486, 37.421566270490786], [74.980002475895404, 37.419990139305888], [75.158027785140902, 37.13303091078911], [74.575892775372964, 37.02084137628345], [74.067551710917812, 36.836175645488446], [72.920024855444453, 36.720007025696312], [71.846291945283909, 36.509942328429851], [71.262348260385735, 36.074387518857797], [71.498767938121077, 35.650563259415996], [71.613076206350698, 35.153203436822857], [71.115018751921625, 34.733125718722228], [71.156773309213449, 34.348911444632144], [70.881803012988385, 33.988855902638512], [69.93054324735958, 34.020120144175102], [70.323594191371583, 33.358532619758385], [69.687147251264847, 33.105498969041228], [69.262522007122541, 32.501944078088293], [69.317764113242546, 31.901412258424436], [68.926676873657655, 31.620189113892064], [68.556932000609308, 31.713310044882011], [67.792689243444769, 31.582930406209623], [67.683393589147457, 31.303154201781414], [66.938891229118454, 31.304911200479346], [66.38145755398601, 30.738899237586448], [66.346472609324408, 29.88794342703617], [65.046862013616092, 29.472180691031902], [64.350418735618504, 29.560030625928089], [64.148002150331237, 29.340819200145965], [63.550260858011164, 29.468330796826162], [62.549856805272775, 29.318572496044304], [60.874248488208778, 29.829238999952604], [61.78122155136343, 30.735850328081231], [61.699314406180811, 31.379506130492661], [60.941944614511115, 31.548074652628745], [60.863654819588952, 32.182919623334421], [60.536077915290761, 32.981268825811561], [60.963700392505991, 33.528832302376252], [60.528429803311575, 33.676446031217999], [60.80319339380744, 34.404101874319856], [61.21081709172573, 35.650072333309218]]] } }, + { "type": "Feature", "properties": { "admin": "Angola", "name": "Angola", "continent": "Africa" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[16.326528354567042, -5.877470391466217], [16.573179965896141, -6.622644545115092], [16.860190870845226, -7.222297865429978], [17.089995965247166, -7.545688978712474], [17.472970004962288, -8.068551120641656], [18.134221632569048, -7.987677504104865], [18.464175652752683, -7.847014255406475], [19.016751743249664, -7.988245944860138], [19.166613396896079, -7.738183688999724], [19.417502475673214, -7.155428562044277], [20.037723016040214, -7.116361179231658], [20.091621534920616, -6.943090101756949], [20.60182295093832, -6.939317722199688], [20.514748162526526, -7.299605808138663], [21.728110792739752, -7.290872491081315], [21.74645592620336, -7.920084730667113], [21.949130893652033, -8.305900974158304], [21.80180138518795, -8.908706556842985], [21.875181919042397, -9.523707777548564], [22.208753289486417, -9.894796237836529], [22.155268182064326, -11.084801120653777], [22.402798292742428, -10.99307545333569], [22.837345411884762, -11.017621758674334], [23.456790805767461, -10.867863457892481], [23.912215203555743, -10.926826267137541], [24.017893507592614, -11.237298272347115], [23.904153680118235, -11.722281589406332], [24.079905226342895, -12.191296888887305], [23.930922072045373, -12.565847670138821], [24.0161365088947, -12.91104623784855], [21.933886346125941, -12.898437188369353], [21.887842644953871, -16.080310153876891], [22.562478468524283, -16.898451429921831], [23.215048455506086, -17.523116143465952], [21.377176141045592, -17.930636488519706], [18.956186964603628, -17.789094740472233], [18.263309360434217, -17.309950860262003], [14.209706658595049, -17.353100681225708], [14.058501417709035, -17.423380629142653], [13.462362094789963, -16.971211846588741], [12.814081251688405, -16.941342868724075], [12.21546146001938, -17.111668389558059], [11.734198846085146, -17.301889336824498], [11.640096062881609, -16.673142185129205], [11.778537224991563, -15.793816013250687], [12.123580763404444, -14.878316338767927], [12.175618930722264, -14.449143568583889], [12.500095249083014, -13.547699883684398], [12.738478631245439, -13.137905775609934], [13.312913852601834, -12.483630466362511], [13.633721144269824, -12.038644707897189], [13.738727654686924, -11.297863050993142], [13.686379428775293, -10.73107594161584], [13.38732791510216, -10.373578383020726], [13.120987583069873, -9.766897067914112], [12.875369500386567, -9.166933689005488], [12.929061313537797, -8.959091078327573], [13.23643273280987, -8.56262948978434], [12.933040398824314, -7.596538588087752], [12.728298374083916, -6.927122084178803], [12.227347039446441, -6.294447523629372], [12.322431674863562, -6.100092461779651], [12.735171339578695, -5.965682061388476], [13.024869419006988, -5.984388929878106], [13.375597364971892, -5.864241224799555], [16.326528354567042, -5.877470391466217]]], [[[12.436688266660919, -5.684303887559223], [12.182336866920277, -5.789930515163801], [11.914963006242115, -5.037986748884733], [12.318607618873923, -4.606230157086158], [12.620759718484548, -4.438023369976121], [12.995517205465202, -4.781103203961918], [12.631611769265842, -4.991271254092935], [12.468004184629759, -5.248361504744991], [12.436688266660919, -5.684303887559223]]]] } }, + { "type": "Feature", "properties": { "admin": "Albania", "name": "Albania", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[20.590247430104906, 41.855404161133592], [20.463175083099195, 41.515089016275333], [20.605181919037356, 41.086226304685219], [21.020040317476397, 40.842726955725873], [20.99998986174722, 40.580003973953964], [20.67499677906363, 40.43499990494302], [20.61500044117275, 40.110006822259365], [20.150015903410516, 39.624997666983965], [19.980000441170144, 39.694993394523401], [19.9600016618732, 39.915005805006039], [19.40608198413673, 40.250773423822459], [19.319058872157139, 40.727230129553554], [19.403549838954287, 41.409565741535445], [19.540027296637099, 41.71998607031275], [19.371768833094958, 41.87754751237064], [19.304486118250786, 42.195745144207812], [19.738051385179627, 42.688247382165564], [19.801613396898681, 42.500093492190835], [20.0707, 42.58863], [20.28375451018189, 42.320259507815074], [20.52295, 42.21787], [20.590247430104906, 41.855404161133592]]] } }, + { "type": "Feature", "properties": { "admin": "United Arab Emirates", "name": "United Arab Emirates", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[51.579518670463258, 24.245497137951102], [51.757440626844172, 24.294072984305462], [51.794389275932865, 24.019826158132499], [52.577080519425593, 24.177439276622703], [53.404006788960139, 24.151316840099167], [54.008000929587574, 24.121757920828212], [54.693023716048614, 24.797892360935084], [55.439024692614126, 25.439145209244934], [56.070820753814544, 26.055464178973978], [56.261041701080948, 25.714606431576762], [56.396847365143991, 24.924732163995483], [55.886232537667993, 24.92083059335744], [55.804118686756212, 24.269604193615258], [55.981213820220454, 24.130542914317822], [55.528631626208231, 23.933604030853498], [55.525841098864461, 23.524869289640929], [55.234489373602869, 23.110992743415316], [55.208341098863187, 22.708329982997039], [55.006803012924898, 22.496947536707129], [52.000733270074321, 23.001154486578937], [51.617707553926969, 24.014219265228824], [51.579518670463258, 24.245497137951102]]] } }, + { "type": "Feature", "properties": { "admin": "Argentina", "name": "Argentina", "continent": "South America" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-65.5, -55.2], [-66.45, -55.25], [-66.95992, -54.89681], [-67.56244, -54.87001], [-68.63335, -54.8695], [-68.634010227583147, -52.636370458874453], [-68.25, -53.1], [-67.75, -53.85], [-66.45, -54.45], [-65.05, -54.7], [-65.5, -55.2]]], [[[-64.964892137294569, -22.075861504812348], [-64.377021043542257, -22.79809132252354], [-63.986838141522462, -21.993644301035953], [-62.84646847192154, -22.034985446869452], [-62.685057135657885, -22.249029229422401], [-60.846564704009928, -23.880712579038299], [-60.028966030503973, -24.032796319273238], [-58.807128465394939, -24.771459242453268], [-57.777217169817952, -25.162339776309032], [-57.633660040911124, -25.603656508081666], [-58.618173590719707, -27.123718763947117], [-57.609759690976134, -27.395898532828419], [-56.486701626192989, -27.548499037386243], [-55.695845506398186, -27.387837009390815], [-54.788794928595038, -26.621785577096087], [-54.625290696823541, -25.739255466415479], [-54.130049607954412, -25.547639255477243], [-53.628348965048716, -26.12486500417743], [-53.648735317587885, -26.923472588816104], [-54.490725267135517, -27.474756768505767], [-55.162286342984586, -27.881915378533414], [-56.290899624239088, -28.852760512000849], [-57.62513342958291, -30.21629485445424], [-57.874937303281897, -31.016556084926158], [-58.14244035504074, -32.044503676076182], [-58.132647671121404, -33.040566908502008], [-58.349611172098818, -33.263188978815428], [-58.427074144104367, -33.909454441057541], [-58.495442064026541, -34.4314897600701], [-57.225829637263629, -35.288026625307886], [-57.362358771378737, -35.977390232081497], [-56.737487352105447, -36.413125909166574], [-56.788285285048339, -36.901571547189327], [-57.749156867083421, -38.183870538079901], [-59.231857062401865, -38.720220228837199], [-61.2374452378656, -38.92842457454114], [-62.335956997310134, -38.827707208004362], [-62.125763108962914, -39.424104913084868], [-62.33053097191943, -40.172586358400316], [-62.145994432205228, -40.676896661136723], [-62.74580278181697, -41.028761488612083], [-63.770494757732514, -41.166789239263657], [-64.732089809819698, -40.802677097335128], [-65.118035244391578, -41.064314874028874], [-64.97856055363583, -42.058000990569312], [-64.303407965742466, -42.359016208669495], [-63.755947842042339, -42.043686618824495], [-63.458059048095883, -42.563138116222355], [-64.378803880456289, -42.873558444999638], [-65.181803961839691, -43.495380954767782], [-65.328823411710133, -44.501366062193689], [-65.565268927661592, -45.03678557716978], [-66.509965786389344, -45.039627780945843], [-67.293793911392427, -45.551896254255183], [-67.580546434180079, -46.301772963242527], [-66.597066413017259, -47.033924655953804], [-65.641026577401433, -47.23613453551188], [-65.98508826360073, -48.133289076531128], [-67.166178961847649, -48.697337334996931], [-67.816087612566449, -49.869668877970412], [-68.728745083273154, -50.26421843851886], [-69.138539191347789, -50.732510267947788], [-68.815561489523517, -51.771104011594097], [-68.149994879820397, -52.349983406127699], [-68.571545376241332, -52.299443855346247], [-69.498362189396076, -52.142760912637236], [-71.914803839796321, -52.009022305865912], [-72.329403856074023, -51.425956312872394], [-72.309973517532342, -50.677009779666342], [-72.975746832964617, -50.741450290734299], [-73.328050910114456, -50.378785088909865], [-73.415435757120022, -49.318436374712952], [-72.648247443314929, -48.878618259476774], [-72.331160854771937, -48.244238376661819], [-72.44735531278026, -47.738532810253517], [-71.917258470330196, -46.884838148791786], [-71.552009446891233, -45.560732924177117], [-71.659315558545316, -44.973688653341434], [-71.222778896759721, -44.784242852559409], [-71.329800788036195, -44.407521661151677], [-71.793622606071935, -44.207172133156099], [-71.464056159130493, -43.787611179378324], [-71.915423956983901, -43.408564548517404], [-72.148898078078517, -42.254888197601375], [-71.746803758415453, -42.051386407235988], [-71.915734015577542, -40.832339369470716], [-71.680761277946445, -39.808164157878061], [-71.413516608349042, -38.916022230791107], [-70.814664272734703, -38.552995293940732], [-71.118625047475419, -37.576827487947192], [-71.121880662709771, -36.65812387466233], [-70.364769253201658, -36.005088799789931], [-70.388049485949082, -35.169687595359441], [-69.817309129501453, -34.193571465798279], [-69.814776984319209, -33.273886000299839], [-70.074399380153622, -33.09120981214803], [-70.535068935819439, -31.365010267870279], [-69.919008348251921, -30.336339206668306], [-70.013550381129861, -29.367922865518544], [-69.656130337183143, -28.459141127233686], [-69.001234910748266, -27.521213881136127], [-68.295541551370391, -26.899339694935787], [-68.594799770772667, -26.50690886811126], [-68.386001146097342, -26.185016371365229], [-68.417652960876111, -24.518554782816874], [-67.328442959244128, -24.025303236590908], [-66.985233934177629, -22.986348565362825], [-67.106673550063604, -22.735924574476392], [-66.273339402924833, -21.832310479420677], [-64.964892137294569, -22.075861504812348]]]] } }, + { "type": "Feature", "properties": { "admin": "Armenia", "name": "Armenia", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[43.582745802592726, 41.09214325618256], [44.972480096218071, 41.248128567055588], [45.179495883979335, 40.985353908851401], [45.560351189970433, 40.812289537105919], [45.359174839058156, 40.561503811193447], [45.891907179555076, 40.218475653639992], [45.610012241402913, 39.899993801425175], [46.034534132680662, 39.628020738273058], [46.483498976432443, 39.464154771475528], [46.505719842317966, 38.770605373686287], [46.143623081248812, 38.74120148371221], [45.735379266143006, 39.319719143219736], [45.739978468616975, 39.473999131827114], [45.298144972521456, 39.471751207022422], [45.00198733905674, 39.740003567049548], [44.793989699081934, 39.713002631177041], [44.400008579288695, 40.005000311842267], [43.656436395040934, 40.253563951166178], [43.752657911968399, 40.740200914058754], [43.582745802592726, 41.09214325618256]]] } }, + { "type": "Feature", "properties": { "admin": "French Southern and Antarctic Lands", "name": "Fr. S. Antarctic Lands", "continent": "Seven seas (open ocean)" }, "geometry": { "type": "Polygon", "coordinates": [[[68.935, -48.625], [69.58, -48.94], [70.525, -49.065], [70.56, -49.255], [70.28, -49.71], [68.745, -49.775], [68.72, -49.2425], [68.8675, -48.83], [68.935, -48.625]]] } }, + { "type": "Feature", "properties": { "admin": "Australia", "name": "Australia", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[145.397978143494782, -40.792548516605883], [146.364120721623692, -41.137695407883335], [146.908583612250823, -41.000546156580668], [147.689259474884125, -40.808258152022681], [148.289067824495987, -40.875437514002122], [148.359864536735785, -42.062445163746439], [148.017301467073082, -42.40702361426861], [147.914051955353784, -43.211522312188485], [147.564564243763982, -42.937688897473855], [146.87034305235494, -43.634597263362082], [146.663327264593647, -43.580853773778543], [146.048377720320389, -43.54974456153888], [145.431929559510536, -42.693776137056268], [145.295090366801674, -42.03360971452755], [144.7180713238306, -41.162551771815707], [144.743754510679622, -40.703975111657705], [145.397978143494782, -40.792548516605883]]], [[[143.561811151299935, -13.763655694232209], [143.922099237238882, -14.548310642152], [144.563713820574804, -14.171176039285879], [144.894908075133515, -14.594457696188622], [145.374723748963419, -14.984976495018284], [145.271991001567244, -15.428205254785691], [145.48525963763575, -16.285672295804769], [145.637033319276952, -16.784918308176611], [145.888904250267672, -16.906926364817647], [146.160308872664473, -17.76165455492524], [146.063673944278662, -18.280072523677315], [146.387478469019584, -18.958274021075905], [147.471081577747896, -19.480722751546676], [148.177601760042478, -19.955939222902767], [148.848413527623222, -20.391209812097252], [148.717465448195583, -20.633468926681513], [149.289420200802056, -21.260510756111096], [149.678337030230637, -22.342511895438388], [150.07738244038859, -22.122783705333315], [150.482939081015161, -22.556142266533012], [150.727265252891158, -22.402404880464655], [150.899554478152254, -23.462236830338679], [151.609175246384211, -24.076256198830755], [152.07353966695905, -24.45788665130619], [152.855197381805908, -25.267501316023008], [153.136162144176751, -26.071173191026187], [153.161948683890358, -26.641319268502439], [153.09290897034856, -27.260299574494503], [153.569469028944184, -28.110066827102099], [153.512108189100218, -28.995077406532751], [153.339095493787056, -29.458201592732443], [153.069241164358857, -30.350240166954809], [153.089601678681788, -30.923641859665445], [152.891577590139377, -31.640445651985949], [152.450002476205327, -32.550002536755237], [151.709117466436766, -33.041342054986337], [151.343971795862387, -33.816023451473846], [151.010555454715103, -34.310360202777879], [150.714139439089024, -35.173459974916803], [150.328219842733233, -35.671879164371923], [150.075212030232251, -36.420205580390508], [149.946124302367139, -37.109052422841224], [149.997283970336127, -37.425260512035123], [149.423882277625523, -37.772681166333463], [148.304622430615893, -37.809061374666875], [147.38173302631526, -38.219217217767543], [146.922122837511324, -38.606532077795116], [146.317921991154776, -39.035756524411433], [145.489652134380549, -38.593767999019043], [144.876976353128157, -38.41744801203911], [145.032212355732952, -37.896187839510972], [144.485682407814011, -38.085323581699257], [143.609973586196077, -38.809465427405321], [142.745426873952965, -38.538267510737519], [142.17832970598198, -38.380034275059835], [141.606581659104677, -38.308514092767872], [140.638578729413211, -38.019332777662541], [139.992158237874321, -37.402936293285094], [139.806588169514043, -36.643602797188272], [139.574147577065219, -36.138362318670666], [139.082808058834075, -35.732754001611774], [138.120747918856296, -35.612296237939397], [138.449461704664998, -35.127261244447887], [138.207564325106659, -34.384722588845925], [137.719170363516128, -35.07682504653102], [136.829405552314711, -35.260534763328614], [137.352371047108477, -34.707338555644093], [137.503886346588331, -34.130267836240769], [137.890116001537649, -33.640478610978327], [137.810327590079112, -32.900007012668105], [136.996837192940347, -33.752771498348629], [136.372069126531642, -34.094766127256186], [135.98904341038434, -34.89011809666048], [135.208212518454104, -34.478670342752601], [135.239218377829161, -33.947953383114971], [134.613416782774607, -33.222778008763136], [134.085903761939107, -32.848072198214759], [134.273902622617015, -32.617233575166949], [132.990776808809812, -32.011224053680188], [132.288080682504869, -31.982646986622761], [131.326330601120901, -31.495803318001041], [129.535793898639668, -31.590422865527476], [128.240937534702198, -31.948488864877849], [127.102867466338282, -32.282266941051041], [126.148713820501129, -32.2159660784206], [125.088623488465586, -32.728751316052829], [124.22164798390493, -32.959486586236061], [124.028946567888511, -33.483847344701708], [123.65966678273071, -33.890179131812722], [122.811036411633609, -33.914467054989835], [122.18306440642283, -34.003402194964217], [121.299190708502579, -33.821036065406126], [120.580268182458113, -33.930176690406618], [119.893695103028222, -33.976065362281808], [119.298899367348781, -34.50936614353396], [119.007340936357977, -34.464149265278529], [118.505717808100769, -34.746819349915093], [118.024971958489516, -35.064732761374707], [117.295507440257438, -35.025458672832862], [116.62510908413492, -35.025096937806829], [115.564346958479689, -34.386427911111547], [115.026808709779516, -34.196517022438918], [115.048616164206763, -33.623425388322026], [115.545123325667078, -33.487257989232951], [115.714673700016661, -33.259571628554944], [115.679378696761376, -32.900368747694124], [115.801645135563959, -32.205062351207026], [115.689610630355105, -31.612437025683782], [115.160909051576937, -30.601594333622455], [114.99704308477942, -30.030724786094162], [115.040037876446249, -29.461095472940794], [114.64197431850198, -28.810230808224706], [114.61649783738217, -28.516398614213042], [114.173579136208446, -28.118076674107321], [114.048883905088132, -27.33476531342712], [113.477497593236876, -26.543134047147898], [113.338953078262477, -26.116545098578477], [113.77835778204026, -26.549025160429174], [113.440962355606587, -25.621278171493152], [113.936901076311642, -25.911234633082877], [114.232852004047288, -26.298446140245868], [114.216160516417006, -25.786281019801105], [113.721255324357685, -24.998938897402123], [113.625343866024025, -24.683971042583146], [113.393523390762667, -24.384764499613262], [113.502043898575607, -23.80635019297025], [113.706992629045146, -23.56021534596406], [113.843418410295669, -23.059987481378734], [113.736551548316072, -22.475475355725372], [114.149756300921865, -21.755881036061009], [114.225307244932651, -22.51748829517863], [114.64776207891866, -21.829519952076904], [115.460167270979298, -21.495173435148541], [115.94737267462699, -21.068687839443708], [116.711615431791529, -20.701681817306817], [117.166316359527684, -20.623598728113802], [117.441545037914238, -20.746898695562162], [118.229558953932951, -20.374208265873232], [118.836085239742701, -20.263310642174822], [118.987807244951753, -20.044202569257319], [119.252493931150624, -19.952941989829835], [119.805225050944543, -19.976506442954978], [120.856220330896633, -19.683707777589188], [121.399856398607199, -19.239755547769729], [121.655137974129062, -18.70531788500713], [122.241665480641757, -18.197648614171765], [122.286623976735655, -17.798603204013911], [122.312772251475408, -17.254967136303446], [123.012574497571904, -16.405199883695854], [123.433789097183009, -17.268558037996225], [123.859344517106592, -17.069035332917249], [123.503242222183232, -16.596506036040363], [123.817073195491915, -16.11131601325199], [124.258286574399847, -16.32794361741956], [124.379726190285794, -15.567059828353973], [124.926152785340022, -15.07510019293532], [125.167275018413875, -14.680395603090004], [125.670086704613823, -14.510070082256018], [125.685796340030493, -14.230655612853834], [126.125149367376096, -14.347340996968949], [126.142822707219864, -14.095986830301211], [126.582589146023736, -13.95279143642041], [127.065867140817332, -13.817967624570922], [127.804633416861932, -14.276906019755042], [128.359689976108939, -14.869169610252253], [128.985543247595899, -14.875990899314738], [129.621473423379598, -14.969783623924553], [129.409600050982988, -14.420669854391031], [129.888640578328591, -13.618703301653481], [130.339465773642928, -13.357375583553473], [130.183506300985982, -13.107520033422301], [130.617795037966971, -12.536392103732464], [131.223494500859999, -12.183648776908113], [131.73509118054946, -12.302452894747159], [132.575298293183096, -12.114040622611013], [132.557211541881031, -11.603012383676683], [131.824698114143644, -11.273781833545097], [132.357223748911395, -11.128519382372641], [133.019560581596409, -11.376411228076844], [133.550845981989028, -11.786515394745134], [134.393068475481982, -12.042365411022173], [134.678632440327021, -11.9411829565947], [135.298491245667975, -12.248606052299051], [135.882693312727611, -11.962266940969796], [136.258380975489445, -12.049341729381606], [136.492475213771627, -11.857208754120389], [136.951620314684988, -12.351958916882735], [136.685124953355739, -12.887223402562054], [136.305406528875096, -13.291229750219895], [135.961758254134111, -13.324509372615889], [136.077616815332533, -13.72427825282578], [135.783836297753226, -14.223989353088211], [135.4286641786112, -14.715432224183896], [135.500184360903177, -14.997740573794427], [136.295174595281367, -15.550264987859121], [137.065360142159477, -15.870762220933353], [137.580470819244795, -16.215082289294084], [138.303217401278971, -16.807604261952658], [138.58516401586337, -16.806622409739173], [139.108542922115475, -17.062679131745366], [139.260574985918197, -17.371600843986183], [140.215245396078274, -17.710804945550063], [140.875463495039241, -17.36906869880394], [141.071110467696258, -16.832047214426719], [141.274095493738798, -16.388870131091604], [141.398222284103781, -15.840531508042584], [141.702183058844611, -15.044921156476928], [141.563380161708665, -14.561333103089506], [141.635520461188094, -14.270394789286284], [141.519868605718955, -13.698078301653805], [141.650920038011009, -12.944687595270562], [141.842691278246207, -12.741547539931187], [141.68699018775078, -12.407614434461134], [141.928629185147543, -11.877465915578778], [142.118488397387978, -11.328042087451619], [142.14370649634634, -11.04273650476814], [142.51526004452495, -10.668185723516642], [142.797310011974048, -11.157354831591515], [142.866763136974271, -11.784706719614929], [143.11594689348567, -11.90562957117791], [143.158631626558758, -12.325655612846187], [143.522123651299864, -12.834358412327429], [143.597157830987669, -13.400422051652594], [143.561811151299935, -13.763655694232209]]]] } }, + { "type": "Feature", "properties": { "admin": "Austria", "name": "Austria", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[16.979666782304033, 48.123497015976298], [16.903754103267257, 47.714865627628321], [16.340584344150411, 47.712901923201215], [16.534267612380372, 47.496170966169103], [16.202298211337361, 46.852385972676949], [16.011663852612653, 46.683610744811688], [15.137091912504982, 46.658702704447016], [14.632471551174827, 46.431817328469535], [13.806475457421524, 46.509306138691201], [12.376485223040813, 46.767559109069843], [12.153088006243051, 47.115393174826437], [11.164827915093268, 46.941579494812721], [11.048555942436533, 46.751358547546324], [10.442701450246627, 46.893546250997424], [9.932448357796657, 46.920728054382948], [9.479969516649019, 47.102809963563367], [9.632931756232974, 47.347601223329974], [9.594226108446346, 47.525058091820256], [9.896068149463188, 47.58019684507569], [10.402083774465209, 47.302487697939156], [10.544504021861625, 47.566399237653762], [11.426414015354736, 47.523766181012967], [12.141357456112784, 47.703083401065761], [12.620759718484491, 47.672387600284395], [12.932626987365945, 47.467645575543983], [13.025851271220487, 47.637583523135824], [12.884102817443901, 48.289145819687903], [13.243357374736998, 48.41611481382904], [13.595945672264433, 48.877171942737135], [14.33889773932472, 48.555305284207193], [14.901447381254055, 48.964401760445817], [15.253415561593979, 49.039074205107575], [16.029647251050218, 48.733899034207916], [16.49928266771877, 48.785808010445095], [16.960288120194573, 48.596982326850593], [16.879982944412998, 48.470013332709463], [16.979666782304033, 48.123497015976298]]] } }, + { "type": "Feature", "properties": { "admin": "Azerbaijan", "name": "Azerbaijan", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[45.001987339056789, 39.740003567049591], [45.298144972521435, 39.471751207022422], [45.739978468616997, 39.473999131827149], [45.735379266143092, 39.319719143219785], [46.143623081248812, 38.74120148371221], [45.457721795438729, 38.874139105783108], [44.952688022650264, 39.33576467544642], [44.79398969908199, 39.713002631177027], [45.001987339056789, 39.740003567049591]]], [[[47.373315464066216, 41.219732367511249], [47.81566572448471, 41.151416124021338], [47.987283156126033, 41.405819200194223], [48.584352654826283, 41.808869533854669], [49.110263706260653, 41.282286688800518], [49.618914829309588, 40.572924302729966], [50.084829542853093, 40.526157131505776], [50.392821079312704, 40.256561184239096], [49.569202101444795, 40.176100979160701], [49.395259230350419, 39.39948171646224], [49.2232283872507, 39.04921885838791], [48.856532423707584, 38.815486355131775], [48.883249139202533, 38.320245266262638], [48.634375441284831, 38.270377509100925], [48.010744256386502, 38.794014797514528], [48.355529412637928, 39.288764960276886], [48.060095249225256, 39.582235419262439], [47.685079380083117, 39.508363959301185], [46.505719842317966, 38.770605373686251], [46.483498976432443, 39.464154771475528], [46.034534132680697, 39.628020738273044], [45.610012241402913, 39.899993801425175], [45.891907179555133, 40.21847565363997], [45.359174839058156, 40.561503811193482], [45.560351189970469, 40.812289537105947], [45.179495883979392, 40.98535390885143], [44.972480096218156, 41.248128567055623], [45.217426385281634, 41.411451931314041], [45.962600538930438, 41.123872585609789], [46.501637404166978, 41.064444688474104], [46.637908156120567, 41.181672675128219], [46.145431756378983, 41.72280243587263], [46.404950799348818, 41.860675157227341], [46.686070591016652, 41.827137152669899], [47.373315464066216, 41.219732367511249]]]] } }, + { "type": "Feature", "properties": { "admin": "Burundi", "name": "Burundi", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[29.339997592900342, -4.499983412294092], [29.276383904749046, -3.293907159034063], [29.02492638521678, -2.839257907730157], [29.632176141078585, -2.917857761246096], [29.938359002407935, -2.348486830254238], [30.469696079232978, -2.413857517103458], [30.527677036264457, -2.807631931167534], [30.743012729624692, -3.034284763199686], [30.752262811004943, -3.359329522315569], [30.505559523243559, -3.568567396665364], [30.116332635221166, -4.090137627787242], [29.753512404099919, -4.45238941815328], [29.339997592900342, -4.499983412294092]]] } }, + { "type": "Feature", "properties": { "admin": "Belgium", "name": "Belgium", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[3.314971144228536, 51.345780951536071], [4.047071160507527, 51.267258612668556], [4.973991326526913, 51.475023708698124], [5.60697594567, 51.037298488969768], [6.156658155958779, 50.803721015010574], [6.043073357781109, 50.128051662794221], [5.782417433300905, 50.090327867221205], [5.674051954784828, 49.52948354755749], [4.799221632515809, 49.985373033236371], [4.286022983425084, 49.90749664977254], [3.588184441755685, 50.378992418003563], [3.123251580425801, 50.780363267614561], [2.658422071960274, 50.796848049515731], [2.513573032246142, 51.148506171261815], [3.314971144228536, 51.345780951536071]]] } }, + { "type": "Feature", "properties": { "admin": "Benin", "name": "Benin", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[2.691701694356254, 6.258817246928628], [1.865240512712318, 6.14215770102973], [1.618950636409238, 6.832038072126236], [1.664477573258381, 9.128590399609378], [1.46304284018467, 9.334624335157086], [1.425060662450136, 9.825395412632998], [1.077795037448737, 10.175606594275022], [0.772335646171484, 10.470808213742357], [0.899563022474069, 10.997339382364258], [1.243469679376488, 11.11051076908346], [1.447178175471066, 11.547719224488857], [1.93598554851988, 11.641150214072551], [2.154473504249921, 11.940150051313337], [2.49016360841793, 12.233052069543671], [2.84864301922667, 12.235635891158266], [3.611180454125558, 11.660167141155966], [3.572216424177469, 11.327939357951516], [3.797112257511713, 10.734745591673104], [3.600070021182801, 10.332186184119406], [3.705438266625918, 10.063210354040207], [3.220351596702101, 9.4441525333997], [2.912308383810255, 9.13760793704432], [2.723792758809509, 8.506845404489708], [2.74906253420022, 7.870734361192886], [2.691701694356254, 6.258817246928628]]] } }, + { "type": "Feature", "properties": { "admin": "Burkina Faso", "name": "Burkina Faso", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-2.827496303712706, 9.642460842319775], [-3.511898972986272, 9.900326239456216], [-3.980449184576684, 9.862344061721698], [-4.330246954760383, 9.610834865757139], [-4.779883592131966, 9.821984768101741], [-4.954653286143098, 10.152713934769732], [-5.404341599946973, 10.370736802609144], [-5.470564947929004, 10.951269842976044], [-5.197842576508648, 11.375145778850136], [-5.220941941743119, 11.713858954307224], [-4.427166103523802, 12.542645575404292], [-4.280405035814879, 13.228443508349738], [-4.006390753587225, 13.472485459848112], [-3.52280270019986, 13.337661647998612], [-3.103706834312759, 13.54126679122859], [-2.967694464520576, 13.798150336151506], [-2.191824510090384, 14.246417548067352], [-2.001035122068771, 14.559008287000887], [-1.066363491205663, 14.973815009007764], [-0.515854458000348, 15.116157741755725], [-0.26625729003058, 14.924308986872147], [0.374892205414682, 14.928908189346128], [0.295646396495101, 14.444234930880651], [0.429927605805517, 13.988733018443922], [0.993045688490071, 13.335749620003821], [1.024103224297477, 12.851825669806573], [2.177107781593775, 12.625017808477532], [2.154473504249921, 11.940150051313337], [1.93598554851988, 11.641150214072551], [1.447178175471066, 11.547719224488857], [1.243469679376488, 11.11051076908346], [0.899563022474069, 10.997339382364258], [0.023802524423701, 11.018681748900802], [-0.438701544588582, 11.09834096927872], [-0.761575893548183, 10.936929633015053], [-1.203357713211431, 11.009819240762736], [-2.94040930827046, 10.962690334512557], [-2.963896246747111, 10.395334784380081], [-2.827496303712706, 9.642460842319775]]] } }, + { "type": "Feature", "properties": { "admin": "Bangladesh", "name": "Bangladesh", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[92.672720981825549, 22.041238918541247], [92.652257114637976, 21.324047552978481], [92.30323449093865, 21.475485337809815], [92.368553501355606, 20.670883287025344], [92.082886183646124, 21.192195135985767], [92.025215285208361, 21.701569729086764], [91.834890985077408, 22.182935695885561], [91.417087029997646, 22.765019029221218], [90.496006300827247, 22.805016587815125], [90.586956821660948, 22.392793687422863], [90.272970819055544, 21.836367702720107], [89.847467075564268, 22.039146023033421], [89.70204959509492, 21.857115790285299], [89.41886274613546, 21.966178900637296], [89.031961297566198, 22.055708319582973], [88.876311883503064, 22.879146429937826], [88.529769728553759, 23.631141872649163], [88.699940220090895, 24.233714911388557], [88.084422235062405, 24.501657212821918], [88.30637251175601, 24.866079413344199], [88.931553989623069, 25.238692328384769], [88.209789259802477, 25.768065700782707], [88.56304935094974, 26.446525580342716], [89.355094028687276, 26.014407253518065], [89.832480910199592, 25.965082098895476], [89.920692580121838, 25.269749864192171], [90.872210727912105, 25.13260061288954], [91.799595981822065, 25.14743174895731], [92.376201613334786, 24.976692816664961], [91.915092807994398, 24.130413723237108], [91.467729933643668, 24.072639471934789], [91.158963250699713, 23.503526923104381], [91.706475050832083, 22.985263983649183], [91.869927606171302, 23.62434642180278], [92.146034783906799, 23.62749868417259], [92.672720981825549, 22.041238918541247]]] } }, + { "type": "Feature", "properties": { "admin": "Bulgaria", "name": "Bulgaria", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[22.657149692482985, 44.234923000661276], [22.94483239105184, 43.823785305347123], [23.332302280376322, 43.897010809904707], [24.100679152124169, 43.741051337247846], [25.569271681426923, 43.688444729174712], [26.065158725699739, 43.943493760751259], [27.242399529740904, 44.175986029632398], [27.970107049275068, 43.812468166675202], [28.55808149589199, 43.707461656258118], [28.039095086384712, 43.293171698574177], [27.673897739378042, 42.577892361006214], [27.996720411905383, 42.007358710287775], [27.135739373490473, 42.141484890301335], [26.117041863720793, 41.826904608724554], [26.106138136507205, 41.328898830727766], [25.197201368925441, 41.234485988930523], [24.492644891058031, 41.583896185872028], [23.692073601992345, 41.309080918943842], [22.952377150166445, 41.337993882811141], [22.881373732197424, 41.999297186850242], [22.380525750424585, 42.320259507815081], [22.545011834409614, 42.461362006188025], [22.436594679461273, 42.580321153323929], [22.604801466571324, 42.898518785161137], [22.986018507588479, 43.211161200526959], [22.500156691180276, 43.642814439460977], [22.410446404721593, 44.008063462899948], [22.657149692482985, 44.234923000661276]]] } }, + { "type": "Feature", "properties": { "admin": "The Bahamas", "name": "Bahamas", "continent": "North America" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-77.53466, 23.75975], [-77.78, 23.71], [-78.03405, 24.28615], [-78.40848, 24.57564], [-78.19087, 25.2103], [-77.89, 25.17], [-77.54, 24.34], [-77.53466, 23.75975]]], [[[-77.82, 26.58], [-78.91, 26.42], [-78.98, 26.79], [-78.51, 26.87], [-77.85, 26.84], [-77.82, 26.58]]], [[[-77.0, 26.59], [-77.17255, 25.87918], [-77.35641, 26.00735], [-77.34, 26.53], [-77.78802, 26.92516], [-77.79, 27.04], [-77.0, 26.59]]]] } }, + { "type": "Feature", "properties": { "admin": "Bosnia and Herzegovina", "name": "Bosnia and Herz.", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[19.005486281010118, 44.860233669609144], [19.36803, 44.863], [19.11761, 44.42307], [19.59976, 44.03847], [19.454, 43.568100000000115], [19.21852, 43.52384], [19.03165, 43.43253], [18.70648, 43.20011], [18.56, 42.65], [17.674921502358981, 43.028562527023603], [17.297373488034449, 43.446340643887353], [16.916156447017325, 43.667722479825663], [16.456442905348862, 44.041239732431265], [16.239660271884528, 44.351143296885695], [15.750026075918978, 44.81871165626255], [15.959367303133373, 45.233776760430935], [16.318156772535868, 45.004126695325901], [16.534939406000202, 45.211607570977705], [17.00214603035101, 45.233776760430935], [17.861783481526398, 45.067740383477137], [18.553214145591646, 45.08158966733145], [19.005486281010118, 44.860233669609144]]] } }, + { "type": "Feature", "properties": { "admin": "Belarus", "name": "Belarus", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[23.484127638449841, 53.912497667041123], [24.45068362803703, 53.905702216194747], [25.536353794056989, 54.282423407602515], [25.768432651479792, 54.846962592175082], [26.588279249790386, 55.167175604871659], [26.494331495883749, 55.61510691997762], [27.102459751094525, 55.783313707087672], [28.17670942557799, 56.169129950578807], [29.2295133806603, 55.918344224666356], [29.371571893030669, 55.67009064393617], [29.896294386522353, 55.789463202530406], [30.87390913262, 55.550976467503396], [30.971835971813132, 55.081547756564028], [30.75753380709871, 54.811770941784303], [31.384472283663733, 54.157056382862422], [31.791424187962232, 53.974638576872117], [31.731272820774503, 53.794029446012011], [32.405598585751157, 53.618045355842028], [32.693643019346034, 53.351420803432106], [32.304519484188226, 53.132726141972903], [31.497643670382924, 53.167426866256889], [31.30520063652801, 53.073995876673195], [31.540018344862254, 52.742052313846344], [31.78599816257158, 52.10167796488544], [30.927549269338975, 52.042353420614383], [30.619454380014837, 51.822806098022362], [30.55511722181145, 51.319503485715643], [30.157363722460889, 51.416138414101454], [29.254938185347921, 51.368234361366881], [28.992835320763522, 51.602044379271462], [28.617612745892242, 51.427713934934836], [28.241615024536564, 51.572227077839059], [27.454066196408426, 51.59230337178446], [26.337958611768549, 51.832288723347915], [25.327787713327005, 51.910656032918538], [24.553106316839511, 51.888461005249177], [24.005077752384206, 51.617443956094448], [23.52707075368437, 51.578454087930233], [23.508002150168689, 52.023646552124717], [23.19949384938618, 52.486977444053664], [23.799198846133375, 52.691099351606553], [23.804934930117774, 53.08973135030606], [23.527535841574995, 53.47012156840654], [23.484127638449841, 53.912497667041123]]] } }, + { "type": "Feature", "properties": { "admin": "Belize", "name": "Belize", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-89.143080410503302, 17.808318996649316], [-89.150909389995519, 17.955467637600414], [-89.029857347351808, 18.001511338772485], [-88.848343878926585, 17.883198147040229], [-88.490122850279334, 18.486830552641603], [-88.300031094093669, 18.499982204659897], [-88.296336229184803, 18.353272813383263], [-88.106812913754368, 18.348673610909284], [-88.123478563168476, 18.076674709541003], [-88.285354987322776, 17.644142971258031], [-88.197866787452625, 17.489475409408453], [-88.302640753924422, 17.13169363043566], [-88.239517991879893, 17.036066392479551], [-88.355428229510551, 16.530774237529624], [-88.551824510435821, 16.265467434143144], [-88.732433641295927, 16.233634751851351], [-88.930612759135244, 15.887273464415072], [-89.229121670269265, 15.886937567605166], [-89.15080603713092, 17.015576687075832], [-89.143080410503302, 17.808318996649316]]] } }, + { "type": "Feature", "properties": { "admin": "Bolivia", "name": "Bolivia", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-62.84646847192154, -22.034985446869442], [-63.986838141522462, -21.993644301035946], [-64.377021043542243, -22.798091322523533], [-64.964892137294598, -22.07586150481232], [-66.273339402924833, -21.832310479420713], [-67.10667355006359, -22.735924574476414], [-67.82817989772272, -22.872918796482171], [-68.219913092711266, -21.494346612231858], [-68.757167121033731, -20.372657972904459], [-68.442225104430904, -19.405068454671426], [-68.966818406841853, -18.9816834449041], [-69.100246955019472, -18.260125420812674], [-69.590423753524036, -17.580011895419329], [-68.959635382753291, -16.500697930571267], [-69.389764166934697, -15.66012908291165], [-69.160346645774936, -15.323973890853015], [-69.339534674747, -14.953195489158828], [-68.94888668483658, -14.45363941819328], [-68.929223802349526, -13.602683607643007], [-68.880079515239956, -12.89972909917665], [-68.665079718689611, -12.561300144097171], [-69.52967810736493, -10.951734307502193], [-68.786157599549469, -11.036380303596276], [-68.27125362819325, -11.014521172736817], [-68.048192308205373, -10.712059014532484], [-67.173801235610725, -10.30681243249961], [-66.646908331962791, -9.931331475466861], [-65.33843522811641, -9.76198780684639], [-65.444837002205375, -10.51145110437543], [-65.321898769783004, -10.895872084194675], [-65.402281460213018, -11.566270440317151], [-64.31635291203159, -12.461978041232191], [-63.196498786050562, -12.627032565972433], [-62.803060268796372, -13.000653171442682], [-62.127080857986371, -13.19878061284972], [-61.713204311760769, -13.489202162330049], [-61.084121263255646, -13.479383640194595], [-60.503304002511122, -13.775954685117656], [-60.459198167550014, -14.354007256734551], [-60.264326341377355, -14.645979099183638], [-60.251148851142922, -15.077218926659318], [-60.542965664295131, -15.093910414289592], [-60.158389655179022, -16.258283786690082], [-58.241219855366673, -16.299573256091289], [-58.388058437724027, -16.877109063385273], [-58.280804002502244, -17.271710300366014], [-57.734558274960989, -17.552468357007765], [-57.498371141170971, -18.174187513911289], [-57.676008877174297, -18.961839694904025], [-57.949997321185819, -19.400004164306814], [-57.853801642474494, -19.969995212486186], [-58.166392381408038, -20.176700941653674], [-58.183471442280492, -19.868399346600359], [-59.11504248720609, -19.356906019775398], [-60.043564622626477, -19.342746677327419], [-61.786326463453761, -19.633736667562957], [-62.265961269770784, -20.513734633061272], [-62.291179368729203, -21.051634616787389], [-62.685057135657871, -22.24902922942238], [-62.84646847192154, -22.034985446869442]]] } }, + { "type": "Feature", "properties": { "admin": "Brazil", "name": "Brazil", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-57.625133429582945, -30.216294854454258], [-56.290899624239067, -28.852760512000884], [-55.162286342984558, -27.881915378533456], [-54.49072526713551, -27.474756768505785], [-53.648735317587885, -26.923472588816086], [-53.628348965048737, -26.124865004177465], [-54.130049607954376, -25.547639255477247], [-54.625290696823562, -25.739255466415507], [-54.428946092330577, -25.162184747012162], [-54.293476325077435, -24.570799655863958], [-54.292959560754511, -24.021014092710722], [-54.652834235235119, -23.839578138933955], [-55.027901780809543, -24.001273695575225], [-55.400747239795407, -23.956935316668797], [-55.517639329639621, -23.57199757252663], [-55.61068274598113, -22.655619398694839], [-55.797958136606894, -22.356929620047815], [-56.473317430229379, -22.086300144135279], [-56.881509568902885, -22.282153822521476], [-57.937155727761287, -22.090175876557169], [-57.870673997617786, -20.732687676681948], [-58.166392381408038, -20.176700941653674], [-57.853801642474494, -19.969995212486186], [-57.949997321185819, -19.400004164306814], [-57.676008877174297, -18.961839694904025], [-57.498371141170971, -18.174187513911289], [-57.734558274960989, -17.552468357007765], [-58.280804002502244, -17.271710300366014], [-58.388058437724027, -16.877109063385273], [-58.241219855366673, -16.299573256091289], [-60.158389655179022, -16.258283786690082], [-60.542965664295131, -15.093910414289592], [-60.251148851142922, -15.077218926659318], [-60.264326341377355, -14.645979099183638], [-60.459198167550014, -14.354007256734551], [-60.503304002511122, -13.775954685117656], [-61.084121263255646, -13.479383640194595], [-61.713204311760769, -13.489202162330049], [-62.127080857986371, -13.19878061284972], [-62.803060268796372, -13.000653171442682], [-63.196498786050562, -12.627032565972433], [-64.31635291203159, -12.461978041232191], [-65.402281460213018, -11.566270440317151], [-65.321898769783004, -10.895872084194675], [-65.444837002205375, -10.51145110437543], [-65.33843522811641, -9.76198780684639], [-66.646908331962791, -9.931331475466861], [-67.173801235610725, -10.30681243249961], [-68.048192308205373, -10.712059014532484], [-68.27125362819325, -11.014521172736817], [-68.786157599549469, -11.036380303596276], [-69.52967810736493, -10.951734307502193], [-70.093752204046879, -11.123971856331011], [-70.548685675728393, -11.009146823778462], [-70.481893886991159, -9.490118096558842], [-71.302412278921523, -10.079436130415372], [-72.184890713169821, -10.05359791426943], [-72.563033006465631, -9.520193780152715], [-73.226713426390148, -9.462212823121233], [-73.015382656532537, -9.03283334720806], [-73.571059332967053, -8.424446709835832], [-73.987235480429646, -7.523829847853063], [-73.723401455363486, -7.340998630404412], [-73.724486660441627, -6.918595472850638], [-73.120027431923575, -6.629930922068238], [-73.219711269814596, -6.089188734566076], [-72.964507208941185, -5.741251315944892], [-72.891927659787243, -5.274561455916979], [-71.748405727816532, -4.59398284263301], [-70.928843349883564, -4.401591485210367], [-70.79476884630229, -4.251264743673302], [-69.893635219996611, -4.298186944194326], [-69.444101935489599, -1.556287123219817], [-69.420485805932216, -1.122618503426409], [-69.577065395776586, -0.549991957200163], [-70.02065589057004, -0.185156345219539], [-70.015565761989293, 0.541414292804205], [-69.452396002872447, 0.706158758950693], [-69.252434048119042, 0.602650865070075], [-69.218637661400166, 0.985676581217433], [-69.804596727157701, 1.089081122233466], [-69.816973232691609, 1.714805202639624], [-67.868565029558823, 1.692455145673392], [-67.537810024674684, 2.037162787276329], [-67.25999752467358, 1.719998684084956], [-67.065048183852483, 1.130112209473225], [-66.876325853122566, 1.253360500489336], [-66.325765143484944, 0.724452215982012], [-65.548267381437554, 0.78925446207603], [-65.354713304288353, 1.0952822941085], [-64.611011928959854, 1.328730576987041], [-64.199305792890499, 1.49285492594602], [-64.083085496666072, 1.91636912679408], [-63.368788011311644, 2.200899562993129], [-63.422867397705105, 2.411067613124174], [-64.269999152265783, 2.497005520025566], [-64.408827887617903, 3.126786200366623], [-64.368494432214092, 3.797210394705246], [-64.816064012294007, 4.056445217297422], [-64.628659430587533, 4.14848094320925], [-63.888342861574145, 4.020530096854571], [-63.093197597899092, 3.770571193858784], [-62.804533047116692, 4.006965033377951], [-62.085429653559125, 4.162123521334308], [-60.966893276601517, 4.536467596856638], [-60.601179165271922, 4.918098049332129], [-60.733574184803707, 5.2002772078619], [-60.213683437731319, 5.2444863956876], [-59.980958624904865, 5.014061184098138], [-60.111002366767373, 4.574966538914082], [-59.767405768458701, 4.423502915866606], [-59.538039923731219, 3.958802598481937], [-59.815413174057852, 3.606498521332085], [-59.974524909084543, 2.755232652188055], [-59.718545701726732, 2.249630438644359], [-59.646043667221242, 1.786893825686789], [-59.030861579002639, 1.317697658692722], [-58.540012986878288, 1.26808828369252], [-58.429477098205957, 1.46394196207872], [-58.113449876525003, 1.507195135907025], [-57.660971035377358, 1.682584947105638], [-57.33582292339689, 1.948537705895759], [-56.782704230360814, 1.863710842288653], [-56.53938574891454, 1.89952260986692], [-55.995698004771739, 1.817667141116601], [-55.905600145070871, 2.021995754398659], [-56.073341844290283, 2.220794989425499], [-55.973322109589361, 2.510363877773016], [-55.569755011605984, 2.42150625244713], [-55.097587449755125, 2.523748073736612], [-54.524754197799709, 2.311848863123785], [-54.088062506717243, 2.105556545414629], [-53.778520677288903, 2.376702785650081], [-53.554839240113537, 2.33489655192595], [-53.4184651352953, 2.05338918701598], [-52.939657151894949, 2.124857692875636], [-52.556424730018414, 2.504705308437053], [-52.249337531123942, 3.241094468596244], [-51.657797410678882, 4.156232408053028], [-51.317146369010842, 4.203490505383953], [-51.069771287629649, 3.65039765056403], [-50.508875291533641, 1.901563828942456], [-49.974075893745045, 1.736483465986069], [-49.947100796088705, 1.046189683431223], [-50.699251268096901, 0.222984117021681], [-50.388210822132123, -0.078444512536819], [-48.620566779156313, -0.235489190271821], [-48.584496629416577, -1.237805271005001], [-47.824956427590621, -0.5816179337628], [-46.566583624851219, -0.941027520352776], [-44.9057030909904, -1.551739597178134], [-44.417619187993658, -2.137750339367975], [-44.581588507655773, -2.691308282078523], [-43.418791266440188, -2.383110039889793], [-41.47265682632824, -2.912018324397116], [-39.97866533055403, -2.87305429444904], [-38.50038347019656, -3.700652357603394], [-37.223252122535193, -4.820945733258915], [-36.45293738457638, -5.109403578312153], [-35.597795783010454, -5.149504489770648], [-35.235388963347553, -5.464937432480245], [-34.896029832486825, -6.738193047719709], [-34.729993455533027, -7.343220716992965], [-35.128212042774216, -8.996401462442284], [-35.636966518687707, -9.649281508017811], [-37.046518724096991, -11.040721123908799], [-37.683611619607355, -12.17119475672582], [-38.423876512188436, -13.038118584854285], [-38.673887091616507, -13.057652276260615], [-38.953275722802537, -13.79336964280002], [-38.882298143049645, -15.667053724838764], [-39.161092495264306, -17.208406670808468], [-39.267339240056394, -17.867746270420479], [-39.583521491034219, -18.262295830968934], [-39.76082333022763, -19.599113457927402], [-40.774740770010332, -20.90451181405242], [-40.944756232250597, -21.937316989837807], [-41.75416419123821, -22.370675551037454], [-41.988284267736546, -22.970070489190888], [-43.074703742024738, -22.967693373305462], [-44.647811855637798, -23.351959323827838], [-45.35213578955991, -23.796841729428579], [-46.472093268405523, -24.088968601174539], [-47.648972337420645, -24.885199069927715], [-48.495458136577689, -25.877024834905647], [-48.641004808127725, -26.623697605090928], [-48.474735887228647, -27.175911960561887], [-48.661520351747612, -28.186134535435713], [-48.888457404157393, -28.674115085567877], [-49.587329474472668, -29.224469089476333], [-50.696874152211478, -30.984465020472953], [-51.576226162306149, -31.777698256153204], [-52.256081305538032, -32.245369968394662], [-52.71209998229768, -33.196578057591175], [-53.373661668498229, -33.768377780900757], [-53.650543992718084, -33.202004082981823], [-53.209588995971529, -32.727666110974717], [-53.787951626182185, -32.047242526987617], [-54.572451544805105, -31.494511407193745], [-55.601510179249331, -30.853878676071385], [-55.97324459494093, -30.883075860316296], [-56.976025763564721, -30.109686374636119], [-57.625133429582945, -30.216294854454258]]] } }, + { "type": "Feature", "properties": { "admin": "Brunei", "name": "Brunei", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[114.204016554828343, 4.525873928236805], [114.599961379048707, 4.900011298029965], [115.450710483869798, 5.447729803891532], [115.405700311343566, 4.955227565933837], [115.347460972150643, 4.316636053887009], [114.869557326315373, 4.348313706881924], [114.659595981913498, 4.007636826997753], [114.204016554828343, 4.525873928236805]]] } }, + { "type": "Feature", "properties": { "admin": "Bhutan", "name": "Bhutan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[91.69665652869665, 27.771741848251661], [92.10371178585973, 27.4526140406332], [92.033483514375078, 26.838310451763554], [91.217512648486405, 26.808648179628019], [90.37327477413406, 26.875724188742872], [89.744527622438838, 26.71940298105995], [88.835642531289366, 27.098966376243755], [88.814248488320544, 27.299315904239361], [89.475810174521101, 28.04275889740639], [90.015828891971154, 28.296438503527209], [90.730513950567769, 28.064953925075748], [91.258853794319904, 28.040614325466287], [91.69665652869665, 27.771741848251661]]] } }, + { "type": "Feature", "properties": { "admin": "Botswana", "name": "Botswana", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[25.649163445750155, -18.536025892818987], [25.850391473094724, -18.714412937090533], [26.164790887158478, -19.293085625894935], [27.296504754350501, -20.391519870690995], [27.724747348753247, -20.499058526290387], [27.727227817503252, -20.851801853114711], [28.02137007010861, -21.485975030200578], [28.794656202924209, -21.639454034107445], [29.432188348109033, -22.091312758067584], [28.017235955525244, -22.827753594659072], [27.119409620886238, -23.574323011979772], [26.78640669119741, -24.240690606383478], [26.485753208123292, -24.616326592713097], [25.941652052522151, -24.696373386333214], [25.765848829865206, -25.174845472923671], [25.664666375437712, -25.486816094669706], [25.025170525825782, -25.719670098576891], [24.211266717228792, -25.670215752873567], [23.733569777122703, -25.39012948985161], [23.312096795350179, -25.268689873965712], [22.824271274514896, -25.500458672794768], [22.579531691180584, -25.979447523708142], [22.105968865657864, -26.28025603607913], [21.60589603036939, -26.726533705351748], [20.889609002371731, -26.828542982695907], [20.666470167735437, -26.477453301704916], [20.758609246511831, -25.868136488551446], [20.165725538827186, -24.917961928000768], [19.895767856534427, -24.767790215760588], [19.895457797940672, -21.849156996347865], [20.881134067475866, -21.814327080983144], [20.910641310314531, -18.252218926672018], [21.655040317478971, -18.219146010005222], [23.196858351339298, -17.869038181227783], [23.579005568137713, -18.281261081620055], [24.217364536239209, -17.889347019118485], [24.520705193792534, -17.887124932529932], [25.084443393664564, -17.661815687737366], [25.264225701608005, -17.736539808831413], [25.649163445750155, -18.536025892818987]]] } }, + { "type": "Feature", "properties": { "admin": "Central African Republic", "name": "Central African Rep.", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[15.279460483469107, 7.421924546737968], [16.106231723706767, 7.497087917506504], [16.290561557691884, 7.754307359239304], [16.456184523187343, 7.734773667832966], [16.705988396886251, 7.508327541529978], [17.964929640380884, 7.890914008002865], [18.389554884523218, 8.281303615751822], [18.911021762780504, 8.630894680206351], [18.81200971850927, 8.982914536978596], [19.094008009526018, 9.074846910025837], [20.059685499764267, 9.01270600019485], [21.00086836109616, 9.475985215691507], [21.723821648859452, 10.567055568885973], [22.231129184668784, 10.971888739460507], [22.864165480244218, 11.142395127807543], [22.977543572692603, 10.714462591998538], [23.554304233502187, 10.089255275915306], [23.557249790142826, 9.681218166538683], [23.394779087017181, 9.26506785729222], [23.459012892355979, 8.954285793488891], [23.805813429466745, 8.666318874542425], [24.567369012152078, 8.229187933785466], [25.114932488716786, 7.825104071479172], [25.12413089366472, 7.500085150579436], [25.796647983511171, 6.979315904158069], [26.21341840994511, 6.546603298362071], [26.465909458123232, 5.94671743410187], [27.213409051225163, 5.550953477394557], [27.374226108517483, 5.233944403500059], [27.044065382604703, 5.127852688004835], [26.402760857862535, 5.150874538590869], [25.650455356557465, 5.256087754737123], [25.278798455514302, 5.170408229997191], [25.128833449003274, 4.927244777847789], [24.805028924262409, 4.897246608902349], [24.41053104014625, 5.108784084489129], [23.297213982850135, 4.609693101414221], [22.841479526468103, 4.710126247573483], [22.704123569436284, 4.633050848810156], [22.405123732195531, 4.02916006104732], [21.659122755630019, 4.224341945813719], [20.927591180106273, 4.322785549329736], [20.290679152108932, 4.691677761245287], [19.467783644293146, 5.031527818212779], [18.932312452884755, 4.709506130385973], [18.542982211997778, 4.201785183118317], [18.453065219809925, 3.504385891123348], [17.809900343505259, 3.560196437998569], [17.133042433346297, 3.728196519379451], [16.537058139724135, 3.198254706226278], [16.01285241055535, 2.267639675298084], [15.907380812247649, 2.557389431158612], [15.862732374747479, 3.013537298998982], [15.405395948964379, 3.335300604664339], [15.036219516671249, 3.851367295747123], [14.950953403389658, 4.21038930909492], [14.478372430080466, 4.732605495620446], [14.558935988023501, 5.03059764243153], [14.459407179429345, 5.451760565610299], [14.536560092841111, 6.22695872642069], [14.776545444404572, 6.408498033062044], [15.279460483469107, 7.421924546737968]]] } }, + { "type": "Feature", "properties": { "admin": "Canada", "name": "Canada", "continent": "North America" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-63.6645, 46.55001], [-62.9393, 46.41587], [-62.01208, 46.44314], [-62.50391, 46.03339], [-62.87433, 45.96818], [-64.1428, 46.39265], [-64.39261, 46.72747], [-64.01486, 47.03601], [-63.6645, 46.55001]]], [[[-61.806305, 49.10506], [-62.29318, 49.08717], [-63.58926, 49.40069], [-64.51912, 49.87304], [-64.17322, 49.95718], [-62.85829, 49.70641], [-61.835585, 49.28855], [-61.806305, 49.10506]]], [[[-123.510001587551116, 48.51001089130343], [-124.012890788399474, 48.370846259141402], [-125.655012777338342, 48.825004584338494], [-125.954994466792726, 49.179995835967638], [-126.850004435871853, 49.530000311880421], [-127.029993449544392, 49.814995835970073], [-128.059336304366212, 49.994959011426594], [-128.444584107102145, 50.53913768167611], [-128.358413656255408, 50.770648098343678], [-127.308581096029883, 50.552573554071948], [-126.695000977212302, 50.40090322529538], [-125.755006673823161, 50.295018215529367], [-125.415001587558791, 49.950000515332604], [-124.920768189119315, 49.47527497008339], [-123.92250870832099, 49.062483628935794], [-123.510001587551116, 48.51001089130343]]], [[[-56.134035814017111, 50.687009792679298], [-56.795881720595261, 49.812308661490945], [-56.143105027884289, 50.15011749938283], [-55.471492275602934, 49.935815334668447], [-55.822401089080913, 49.587128607779093], [-54.93514258484565, 49.313010972686833], [-54.473775397343772, 49.556691189159167], [-53.47654944519131, 49.24913890237405], [-53.786013759971233, 48.516780503933617], [-53.086133999226249, 48.687803656603528], [-52.95864824076223, 48.157164211614472], [-52.648098720904173, 47.53554840757549], [-53.069158291218336, 46.655498765644936], [-53.521456264853029, 46.618291734394823], [-54.178935512902527, 46.807065741556997], [-53.961868659060471, 47.625207017601909], [-54.240482143762122, 47.752279364607617], [-55.400773078011483, 46.88499380145312], [-55.997480841685835, 46.919720363953289], [-55.291219041552765, 47.389562486350982], [-56.250798712780508, 47.632545070987383], [-57.325229254777085, 47.572807115257987], [-59.26601518414676, 47.603347886742498], [-59.41949418805369, 47.89945384377485], [-58.796586473207398, 48.251525376979473], [-59.23162451845652, 48.523188381537793], [-58.391804979065213, 49.125580552764163], [-57.358689744686025, 50.718274034215845], [-56.738650071831998, 51.287438259478527], [-55.87097693543528, 51.632094224649187], [-55.406974249886602, 51.588272610065722], [-55.600218268442077, 51.317074693397913], [-56.134035814017111, 50.687009792679298]]], [[[-133.180004041711669, 54.169975490935308], [-132.710007884431292, 54.040009315423518], [-131.749989584003259, 54.120004380909208], [-132.049480347350965, 52.984621487024519], [-131.179042521826574, 52.18043284769827], [-131.577829549822894, 52.182370713909236], [-132.180428426778519, 52.639707139692391], [-132.549992432313843, 53.100014960332132], [-133.054611178755493, 53.411468817755363], [-133.239664482792676, 53.851080227262386], [-133.180004041711669, 54.169975490935308]]], [[[-79.26582, 62.158675], [-79.65752, 61.63308], [-80.09956, 61.7181], [-80.36215, 62.01649], [-80.315395, 62.085565], [-79.92939, 62.3856], [-79.52002, 62.36371], [-79.26582, 62.158675]]], [[[-81.89825, 62.7108], [-83.06857, 62.15922], [-83.77462, 62.18231], [-83.99367, 62.4528], [-83.25048, 62.91409], [-81.87699, 62.90458], [-81.89825, 62.7108]]], [[[-85.161307949549851, 65.657284654392797], [-84.975763719405933, 65.217518215588981], [-84.464012010419495, 65.371772365980163], [-83.88262630891974, 65.109617824963536], [-82.78757687043877, 64.766693020274673], [-81.642013719392509, 64.455135809986942], [-81.553440314444245, 63.979609280037131], [-80.817361212878851, 64.057485663500998], [-80.103451300766594, 63.725981350348597], [-80.991019863595653, 63.41124603947496], [-82.547178107416997, 63.651722317145229], [-83.108797573565042, 64.101875718839707], [-84.100416632813847, 63.569711819098004], [-85.523404710618991, 63.052379055424076], [-85.866768764982339, 63.637252916103542], [-87.221983201836721, 63.541238104905212], [-86.352759772471259, 64.035833238370699], [-86.224886440765133, 64.822916978608262], [-85.883847825854858, 65.738778388117041], [-85.161307949549851, 65.657284654392797]]], [[[-75.86588, 67.14886], [-76.98687, 67.09873], [-77.2364, 67.58809], [-76.81166, 68.14856], [-75.89521, 68.28721], [-75.1145, 68.01036], [-75.10333, 67.58202], [-75.21597, 67.44425], [-75.86588, 67.14886]]], [[[-95.647681203800488, 69.107690358321761], [-96.269521203800579, 68.757040358321731], [-97.61740120380054, 69.060030358321782], [-98.431801203800504, 68.950700358321768], [-99.797401203800504, 69.400030358321786], [-98.917401203800523, 69.710030358321788], [-98.218261203800466, 70.143540358321744], [-97.157401203800532, 69.860030358321794], [-96.557401203800524, 69.680030358321758], [-96.257401203800498, 69.490030358321761], [-95.647681203800488, 69.107690358321761]]], [[[-90.5471, 69.49766], [-90.55151, 68.47499], [-89.21515, 69.25873], [-88.01966, 68.61508], [-88.31749, 67.87338], [-87.35017, 67.19872], [-86.30607, 67.92146], [-85.57664, 68.78456], [-85.52197, 69.88211], [-84.10081, 69.80539], [-82.62258, 69.65826], [-81.28043, 69.16202], [-81.2202, 68.66567], [-81.96436, 68.13253], [-81.25928, 67.59716], [-81.38653, 67.11078], [-83.34456, 66.41154], [-84.73542, 66.2573], [-85.76943, 66.55833], [-86.0676, 66.05625], [-87.03143, 65.21297], [-87.32324, 64.77563], [-88.48296, 64.09897], [-89.91444, 64.03273], [-90.70398, 63.61017], [-90.77004, 62.96021], [-91.93342, 62.83508], [-93.15698, 62.02469], [-94.24153, 60.89865], [-94.62931, 60.11021], [-94.6846, 58.94882], [-93.21502, 58.78212], [-92.76462, 57.84571], [-92.297029999999893, 57.08709], [-90.89769, 57.28468], [-89.03953, 56.85172], [-88.03978, 56.47162], [-87.32421, 55.99914], [-86.07121, 55.72383], [-85.01181, 55.3026], [-83.36055, 55.24489], [-82.27285, 55.14832], [-82.4362, 54.28227], [-82.12502, 53.27703], [-81.40075, 52.15788], [-79.91289, 51.20842], [-79.14301, 51.53393], [-78.60191, 52.56208], [-79.12421, 54.14145], [-79.82958, 54.66772], [-78.22874, 55.13645], [-77.0956, 55.83741], [-76.54137, 56.53423], [-76.62319, 57.20263], [-77.30226, 58.05209], [-78.51688, 58.80458], [-77.33676, 59.85261], [-77.77272, 60.75788], [-78.10687, 62.31964], [-77.41067, 62.55053], [-75.69621, 62.2784], [-74.6682, 62.18111], [-73.83988, 62.4438], [-72.90853, 62.10507], [-71.67708, 61.52535], [-71.37369, 61.13717], [-69.59042, 61.06141], [-69.62033, 60.22125], [-69.2879, 58.95736], [-68.37455, 58.80106], [-67.64976, 58.21206], [-66.20178, 58.76731], [-65.24517, 59.87071], [-64.58352, 60.33558], [-63.80475, 59.4426], [-62.50236, 58.16708], [-61.39655, 56.96745], [-61.79866, 56.33945], [-60.46853, 55.77548], [-59.56962, 55.20407], [-57.97508, 54.94549], [-57.3332, 54.6265], [-56.93689, 53.78032], [-56.15811, 53.64749], [-55.75632, 53.27036], [-55.68338, 52.14664], [-56.40916, 51.7707], [-57.12691, 51.41972], [-58.77482, 51.0643], [-60.03309, 50.24277], [-61.72366, 50.08046], [-63.86251, 50.29099], [-65.36331, 50.2982], [-66.39905, 50.22897], [-67.23631, 49.51156], [-68.51114, 49.06836], [-69.95362, 47.74488], [-71.10458, 46.82171], [-70.25522, 46.98606], [-68.65, 48.3], [-66.55243, 49.1331], [-65.05626, 49.23278], [-64.17099, 48.74248], [-65.11545, 48.07085], [-64.79854, 46.99297], [-64.47219, 46.23849], [-63.17329, 45.73902], [-61.52072, 45.88377], [-60.51815, 47.00793], [-60.4486, 46.28264], [-59.80287, 45.9204], [-61.03988, 45.26525], [-63.25471, 44.67014], [-64.24656, 44.26553], [-65.36406, 43.54523], [-66.1234, 43.61867], [-66.16173, 44.46512], [-64.42549, 45.29204], [-66.02605, 45.25931], [-67.13741, 45.13753], [-67.79134, 45.70281], [-67.79046, 47.06636], [-68.23444, 47.35486], [-68.905, 47.185], [-69.237216, 47.447781], [-69.99997, 46.69307], [-70.305, 45.915], [-70.66, 45.46], [-71.08482, 45.30524], [-71.405, 45.255], [-71.50506, 45.0082], [-73.34783, 45.00738], [-74.867, 45.00048], [-75.31821, 44.81645], [-76.375, 44.09631], [-76.5, 44.018458893758712], [-76.820034145805565, 43.628784288093748], [-77.737885097957687, 43.62905558936329], [-78.720279914042365, 43.625089423184868], [-79.171673550111862, 43.466339423184216], [-79.01, 43.27], [-78.92, 42.965], [-78.939362148743683, 42.863611355148031], [-80.247447679347928, 42.366199856122584], [-81.277746548167144, 42.209025987306845], [-82.439277716791608, 41.675105088867149], [-82.690089280920162, 41.675105088867149], [-83.029810146806909, 41.832795722005834], [-83.141999681312555, 41.975681057292825], [-83.12, 42.08], [-82.9, 42.43], [-82.43, 42.98], [-82.137642381503881, 43.571087551439909], [-82.337763125431053, 44.44], [-82.550924648758169, 45.347516587905368], [-83.592850714843067, 45.816893622412373], [-83.469550747394621, 45.994686387712584], [-83.616130947590563, 46.116926988299056], [-83.890765347005726, 46.116926988299056], [-84.091851264161463, 46.27541860613816], [-84.14211951367335, 46.512225857115723], [-84.3367, 46.40877], [-84.6049, 46.4396], [-84.543748745445853, 46.538684190449132], [-84.779238247399888, 46.637101955749038], [-84.876079881514855, 46.900083319682366], [-85.652363247403414, 47.220218817730498], [-86.461990831228249, 47.553338019392037], [-87.439792623300207, 47.94], [-88.378114183286698, 48.302917588893727], [-89.272917446636654, 48.019808254582657], [-89.6, 48.01], [-90.83, 48.27], [-91.64, 48.14], [-92.61, 48.45], [-93.63087, 48.60926], [-94.32914, 48.67074], [-94.64, 48.84], [-94.81758, 49.38905], [-95.15609, 49.38425], [-95.159069509172014, 49.0], [-97.228720000004799, 49.0007], [-100.65, 49.0], [-104.04826, 48.99986], [-107.05, 49.0], [-110.05, 49.0], [-113.0, 49.0], [-116.04818, 49.0], [-117.03121, 49.0], [-120.0, 49.0], [-122.84, 49.0], [-122.97421, 49.002537777777789], [-124.91024, 49.98456], [-125.62461, 50.41656], [-127.43561, 50.83061], [-127.99276, 51.71583], [-127.85032, 52.32961], [-129.12979, 52.75538], [-129.30523, 53.56159], [-130.51497, 54.28757], [-130.53611, 54.80278], [-129.98, 55.285], [-130.00778, 55.91583], [-131.70781, 56.55212], [-132.73042, 57.69289], [-133.35556, 58.41028], [-134.27111, 58.86111], [-134.945, 59.27056], [-135.47583, 59.78778], [-136.47972, 59.46389], [-137.4525, 58.905], [-138.34089, 59.56211], [-139.039, 60.0], [-140.013, 60.27682], [-140.99778, 60.30639], [-140.9925, 66.00003], [-140.986, 69.712], [-139.12052, 69.47102], [-137.54636, 68.99002], [-136.50358, 68.89804], [-135.62576, 69.31512], [-134.41464, 69.62743], [-132.92925, 69.50534], [-131.43136, 69.94451], [-129.79471, 70.19369], [-129.10773, 69.77927], [-128.36156, 70.01286], [-128.13817, 70.48384], [-127.44712, 70.37721], [-125.75632, 69.48058], [-124.42483, 70.1584], [-124.28968, 69.39969], [-123.06108, 69.56372], [-122.6835, 69.85553], [-121.47226, 69.79778], [-119.94288, 69.37786], [-117.60268, 69.01128], [-116.22643, 68.84151], [-115.2469, 68.90591], [-113.89794, 68.3989], [-115.30489, 67.90261], [-113.49727, 67.68815], [-110.798, 67.80612], [-109.94619, 67.98104], [-108.8802, 67.38144], [-107.79239, 67.88736], [-108.81299, 68.31164], [-108.16721, 68.65392], [-106.95, 68.7], [-106.15, 68.8], [-105.34282, 68.56122], [-104.33791, 68.018], [-103.22115, 68.09775], [-101.45433, 67.64689], [-99.90195, 67.80566], [-98.4432, 67.78165], [-98.5586, 68.40394], [-97.66948, 68.57864], [-96.11991, 68.23939], [-96.12588, 67.29338], [-95.48943, 68.0907], [-94.685, 68.06383], [-94.23282, 69.06903], [-95.30408, 69.68571], [-96.47131, 70.08976], [-96.39115, 71.19482], [-95.2088, 71.92053], [-93.88997, 71.76015], [-92.87818, 71.31869], [-91.51964, 70.19129], [-92.40692, 69.69997], [-90.5471, 69.49766]]], [[[-114.167169999999871, 73.12145], [-114.66634, 72.65277], [-112.441019999999867, 72.9554], [-111.05039, 72.4504], [-109.920349999999857, 72.96113], [-109.00654, 72.63335], [-108.188349999999886, 71.65089], [-107.68599, 72.06548], [-108.39639, 73.08953], [-107.51645, 73.23598], [-106.522589999999866, 73.07601], [-105.402459999999877, 72.67259], [-104.77484, 71.6984], [-104.464759999999814, 70.99297], [-102.78537, 70.49776], [-100.980779999999868, 70.02432], [-101.089289999999892, 69.58447000000011], [-102.731159999999875, 69.50402], [-102.09329, 69.11962], [-102.43024, 68.75282], [-104.24, 68.91], [-105.96, 69.180000000000135], [-107.12254, 69.11922], [-108.999999999999872, 68.78], [-111.534148875200117, 68.630059156817921], [-113.3132, 68.53554], [-113.854959999999807, 69.007440000000102], [-115.22, 69.28], [-116.10794, 69.16821], [-117.34, 69.960000000000107], [-116.674729999999869, 70.06655], [-115.13112, 70.2373], [-113.72141, 70.19237], [-112.4161, 70.36638], [-114.35, 70.6], [-116.48684, 70.52045], [-117.9048, 70.540560000000127], [-118.43238, 70.9092], [-116.11311, 71.30918], [-117.65568, 71.2952], [-119.40199, 71.55859], [-118.56267, 72.30785], [-117.866419999999877, 72.70594], [-115.18909, 73.314590000000109], [-114.167169999999871, 73.12145]]], [[[-104.5, 73.42], [-105.38, 72.76], [-106.94, 73.46], [-106.6, 73.6], [-105.26, 73.64], [-104.5, 73.42]]], [[[-76.34, 73.102684989953005], [-76.251403808593736, 72.826385498046861], [-77.314437866210895, 72.85554504394527], [-78.391670227050795, 72.876655578613253], [-79.486251831054645, 72.742202758789062], [-79.775833129882827, 72.80290222167973], [-80.876098632812514, 73.333183288574205], [-80.833885192871051, 73.693183898925767], [-80.353057861328111, 73.75971984863277], [-78.064437866210923, 73.651931762695327], [-76.34, 73.102684989953005]]], [[[-86.562178514334107, 73.157447007938444], [-85.774371304044521, 72.534125881633798], [-84.850112474288224, 73.34027822538711], [-82.315590176100969, 73.750950832810574], [-80.600087653307611, 72.716543687624181], [-80.748941616524391, 72.061906643350753], [-78.770638597310764, 72.352173163534147], [-77.824623989559569, 72.749616604291035], [-75.605844692675717, 72.243678493937381], [-74.228616095664975, 71.767144273557889], [-74.099140794557698, 71.330840155717638], [-72.242225714797641, 71.556924546994495], [-71.200015428335192, 70.920012518997211], [-68.78605424668487, 70.525023708774242], [-67.914970465756923, 70.121947536897594], [-66.969033372654152, 69.18608734809186], [-68.805122850200533, 68.720198472764409], [-66.449866095633851, 68.067163397892003], [-64.862314419195215, 67.847538560651614], [-63.424934454996745, 66.928473212340649], [-61.851981370680569, 66.862120673277829], [-62.163176845942296, 66.160251369889593], [-63.91844438338417, 64.998668524832837], [-65.148860236253611, 65.426032619886669], [-66.72121904159853, 66.388041083432185], [-68.015016038673949, 66.262725735124391], [-68.141287400979152, 65.689789130304362], [-67.089646165623392, 65.108455105236985], [-65.732080451099748, 64.64840566675862], [-65.320167609301265, 64.382737128346051], [-64.669406297449669, 63.392926744227474], [-65.013803880458894, 62.674185085695974], [-66.275044725190455, 62.945098781986069], [-68.783186204692711, 63.745670071051805], [-67.369680752213029, 62.883965562584869], [-66.328297288667201, 62.28007477482204], [-66.165568203380147, 61.930897121825879], [-68.877366502544632, 62.330149237712803], [-71.023437059193824, 62.910708116295829], [-72.23537858751898, 63.397836005295154], [-71.886278449171286, 63.679989325608837], [-73.37830624051837, 64.193963121183813], [-74.834418911422588, 64.679075629323776], [-74.818502570276706, 64.389093329517962], [-77.709979824520019, 64.229542344816778], [-78.55594885935416, 64.572906399180127], [-77.897281053361908, 65.309192206474776], [-76.018274298797181, 65.326968899183143], [-73.95979529488271, 65.454764716240888], [-74.293883429649625, 65.81177134872938], [-73.94491248238262, 66.310578111426722], [-72.65116716173938, 67.284575507263853], [-72.926059943316076, 67.726925767682374], [-73.311617804645721, 68.069437160912898], [-74.8433072577768, 68.554627183701271], [-76.869100918266739, 68.894735622830254], [-76.228649054657339, 69.147769273547411], [-77.28736996123709, 69.769540106883269], [-78.168633999326588, 69.826487535268896], [-78.95724219431672, 70.166880194775402], [-79.492455003563649, 69.871807766388898], [-81.305470954091732, 69.743185126414332], [-84.944706183598456, 69.966634019644388], [-87.060003424817864, 70.260001125765356], [-88.681713223001495, 70.410741278760796], [-89.513419562523012, 70.762037665480975], [-88.467721116880753, 71.218185533321318], [-89.888151211287465, 71.222552191849942], [-90.205160285181989, 72.235074367960792], [-89.43657670770493, 73.129464219852352], [-88.408241543312784, 73.537888902471209], [-85.826151089200906, 73.803815823045213], [-86.562178514334107, 73.157447007938444]]], [[[-100.35642, 73.84389], [-99.16387, 73.63339], [-97.38, 73.76], [-97.12, 73.47], [-98.05359, 72.99052], [-96.54, 72.56], [-96.72, 71.66], [-98.35966, 71.27285], [-99.32286, 71.35639], [-100.01482, 71.73827], [-102.5, 72.51], [-102.48, 72.83], [-100.43836, 72.70588], [-101.54, 73.36], [-100.35642, 73.84389]]], [[[-93.196295539100205, 72.771992499473342], [-94.26904659704725, 72.024596259235949], [-95.409855516322637, 72.061880805134578], [-96.033745083382428, 72.940276801231789], [-96.01826799191096, 73.437429918095788], [-95.495793423224001, 73.862416897264154], [-94.503657599652328, 74.134906724739196], [-92.420012173211745, 74.100025132942179], [-90.509792853542578, 73.85673248971203], [-92.003965216829869, 72.966244208458477], [-93.196295539100205, 72.771992499473342]]], [[[-120.46, 71.383601793087578], [-123.09219, 70.90164], [-123.62, 71.34], [-125.92894873747332, 71.868688463011395], [-125.499999999999872, 72.292260811795003], [-124.80729, 73.02256], [-123.94, 73.680000000000135], [-124.917749999999899, 74.292750000000112], [-121.53788, 74.44893], [-120.10978, 74.24135], [-117.55564, 74.18577], [-116.58442, 73.89607], [-115.51081, 73.47519], [-116.767939999999882, 73.22292], [-119.22, 72.52], [-120.46, 71.82], [-120.46, 71.383601793087578]]], [[[-93.612755906940464, 74.979997260224437], [-94.156908738973812, 74.59234650338685], [-95.60868058956558, 74.666863918751758], [-96.820932176484561, 74.927623196096576], [-96.288587409229791, 75.377828274223333], [-94.850819871789113, 75.647217515760886], [-93.977746548217908, 75.296489569795952], [-93.612755906940464, 74.979997260224437]]], [[[-98.5, 76.72], [-97.735585, 76.25656], [-97.704415, 75.74344], [-98.16, 75.0], [-99.80874, 74.89744], [-100.88366, 75.05736], [-100.86292, 75.64075], [-102.50209, 75.5638], [-102.56552, 76.3366], [-101.48973, 76.30537], [-99.98349, 76.64634], [-98.57699, 76.58859], [-98.5, 76.72]]], [[[-108.21141, 76.20168], [-107.81943, 75.84552], [-106.92893, 76.01282], [-105.881, 75.9694], [-105.70498, 75.47951], [-106.31347, 75.00527], [-109.7, 74.85], [-112.22307, 74.41696], [-113.74381, 74.39427], [-113.87135, 74.72029], [-111.79421, 75.1625], [-116.31221, 75.04343], [-117.7104, 75.2222], [-116.34602, 76.19903], [-115.40487, 76.47887], [-112.59056, 76.14134], [-110.81422, 75.54919], [-109.0671, 75.47321], [-110.49726, 76.42982], [-109.5811, 76.79417], [-108.54859, 76.67832], [-108.21141, 76.20168]]], [[[-94.684085862999439, 77.097878323058367], [-93.573921068073105, 76.776295884906062], [-91.605023159536586, 76.778517971494594], [-90.741845872749209, 76.449597479956807], [-90.969661424507976, 76.074013170059445], [-89.822237921899244, 75.847773749485626], [-89.187082892599776, 75.610165513807615], [-87.838276333349611, 75.566188869927217], [-86.379192267588664, 75.482421373182163], [-84.789625210290595, 75.699204006646497], [-82.753444586910049, 75.784315090631225], [-81.12853084992436, 75.713983466282016], [-80.05751095245914, 75.336848863415867], [-79.833932868148324, 74.923127346487192], [-80.457770758775823, 74.657303778777774], [-81.948842536125511, 74.442459011524321], [-83.2288936022114, 74.564027818490928], [-86.097452358733292, 74.410032050261137], [-88.150350307960196, 74.392307033984977], [-89.764722052758358, 74.515555325001117], [-92.422440965529418, 74.837757880340973], [-92.768285488642789, 75.38681997344213], [-92.889905972041717, 75.882655341282629], [-93.893824022175977, 76.319243679500516], [-95.962457445035795, 76.44138092722244], [-97.121378953829463, 76.751077785947587], [-96.745122850312342, 77.161388658345132], [-94.684085862999439, 77.097878323058367]]], [[[-116.198586595507322, 77.645286770326194], [-116.335813361458349, 76.876961575010554], [-117.106050584768766, 76.530031846819114], [-118.040412157038119, 76.481171780087081], [-119.899317586885687, 76.053213406061971], [-121.499995077126471, 75.900018622532784], [-122.85492448615895, 76.116542873835684], [-122.854925293603188, 76.116542873835684], [-121.157535360328239, 76.864507554828336], [-119.103938971821023, 77.512219957174608], [-117.570130784965954, 77.498318996888102], [-116.198586595507322, 77.645286770326194]]], [[[-93.840003017943971, 77.51999726023449], [-94.295608283245244, 77.491342678528682], [-96.169654100310055, 77.55511139597688], [-96.436304490936109, 77.83462921824362], [-94.422577277386353, 77.820004787904978], [-93.720656297565867, 77.634331366680314], [-93.840003017943971, 77.51999726023449]]], [[[-110.186938035912945, 77.697014879050286], [-112.051191169058455, 77.409228827616843], [-113.534278937619035, 77.732206529441143], [-112.724586758253835, 78.051050116681935], [-111.264443325630822, 78.152956041161545], [-109.854451870547067, 77.996324774884812], [-110.186938035912945, 77.697014879050286]]], [[[-109.663145718202557, 78.601972561345676], [-110.88131425661885, 78.406919867659994], [-112.542091437615142, 78.407901719873493], [-112.525890876091566, 78.550554511215225], [-111.500010342233367, 78.849993598130538], [-110.96366065147599, 78.804440823065207], [-109.663145718202557, 78.601972561345676]]], [[[-95.830294969449312, 78.056941229963243], [-97.309842902397975, 77.85059723582178], [-98.124289313533964, 78.082856960757567], [-98.55286780474664, 78.458105373845086], [-98.631984422585504, 78.871930243638374], [-97.337231411512604, 78.831984361476756], [-96.754398769908761, 78.765812689926989], [-95.559277920294562, 78.41831452098026], [-95.830294969449312, 78.056941229963243]]], [[[-100.060191820052111, 78.324754340315891], [-99.670939093813601, 77.907544664207393], [-101.303940192452984, 78.018984890444798], [-102.949808722733025, 78.343228664860206], [-105.176132778731514, 78.38033234324574], [-104.210429450277147, 78.677420152491777], [-105.419580451258511, 78.918335679836431], [-105.492289191493128, 79.301593939929177], [-103.529282396237917, 79.16534902619162], [-100.8251580472688, 78.80046173777869], [-100.060191820052111, 78.324754340315891]]], [[[-87.02, 79.66], [-85.81435, 79.3369], [-87.18756, 79.0393], [-89.03535, 78.28723], [-90.80436, 78.21533], [-92.87669, 78.34333], [-93.95116, 78.75099], [-93.93574, 79.11373], [-93.14524, 79.3801], [-94.974, 79.37248], [-96.07614, 79.70502], [-96.70972, 80.15777], [-96.01644, 80.60233], [-95.32345, 80.90729], [-94.29843, 80.97727], [-94.73542, 81.20646], [-92.40984, 81.25739], [-91.13289, 80.72345], [-89.45, 80.509322033898258], [-87.81, 80.32], [-87.02, 79.66]]], [[[-68.5, 83.106321516765732], [-65.82735, 83.02801], [-63.68, 82.9], [-61.85, 82.6286], [-61.89388, 82.36165], [-64.334, 81.92775], [-66.75342, 81.72527], [-67.65755, 81.50141], [-65.48031, 81.50657], [-67.84, 80.9], [-69.4697, 80.61683], [-71.18, 79.8], [-73.2428, 79.63415], [-73.88, 79.430162204802073], [-76.90773, 79.32309], [-75.52924, 79.19766], [-76.22046, 79.01907], [-75.39345, 78.52581], [-76.34354, 78.18296], [-77.88851, 77.89991], [-78.36269, 77.50859], [-79.75951, 77.20968], [-79.61965, 76.98336], [-77.91089, 77.022045], [-77.88911, 76.777955], [-80.56125, 76.17812], [-83.17439, 76.45403], [-86.11184, 76.29901], [-87.6, 76.42], [-89.49068, 76.47239], [-89.6161, 76.95213], [-87.76739, 77.17833], [-88.26, 77.9], [-87.65, 77.970222222222205], [-84.97634, 77.53873], [-86.34, 78.18], [-87.96192, 78.37181], [-87.15198, 78.75867], [-85.37868, 78.9969], [-85.09495, 79.34543], [-86.50734, 79.73624], [-86.93179, 80.25145], [-84.19844, 80.20836], [-83.408695652173819, 80.1], [-81.84823, 80.46442], [-84.1, 80.58], [-87.59895, 80.51627], [-89.36663, 80.85569], [-90.2, 81.26], [-91.36786, 81.5531], [-91.58702, 81.89429], [-90.1, 82.085], [-88.93227, 82.11751], [-86.97024, 82.27961], [-85.5, 82.652273458057024], [-84.260005, 82.6], [-83.18, 82.32], [-82.42, 82.86], [-81.1, 83.02], [-79.30664, 83.13056], [-76.25, 83.172058823529369], [-75.71878, 83.06404], [-72.83153, 83.23324], [-70.665765, 83.169780758382828], [-68.5, 83.106321516765732]]]] } }, + { "type": "Feature", "properties": { "admin": "Switzerland", "name": "Switzerland", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[9.594226108446346, 47.525058091820256], [9.632931756232974, 47.347601223329974], [9.479969516649019, 47.102809963563367], [9.932448357796657, 46.920728054382948], [10.442701450246627, 46.893546250997424], [10.36337812667861, 46.483571275409851], [9.922836541390378, 46.314899400409182], [9.182881707403054, 46.440214748716976], [8.966305779667804, 46.036931871111186], [8.489952426801322, 46.005150865251672], [8.316629672894377, 46.163642483090847], [7.755992058959832, 45.824490057959302], [7.273850945676655, 45.776947740250769], [6.843592970414504, 45.991146552100595], [6.500099724970424, 46.429672756529428], [6.022609490593537, 46.272989813820466], [6.037388950229, 46.725778713561859], [6.768713820023605, 47.287708238303686], [6.736571079138058, 47.541801255882838], [7.192202182655505, 47.449765529971003], [7.466759067422228, 47.620581976911794], [8.31730146651415, 47.613579820336255], [8.522611932009765, 47.830827541691285], [9.594226108446346, 47.525058091820256]]] } }, + { "type": "Feature", "properties": { "admin": "Chile", "name": "Chile", "continent": "South America" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-68.634010227583147, -52.636370458874353], [-68.633349999999879, -54.8695], [-67.56244, -54.87001], [-66.95992, -54.89681], [-67.291029999999878, -55.30124], [-68.148629999999841, -55.61183], [-68.639990810811796, -55.580017999086877], [-69.2321, -55.49906], [-69.95809, -55.19843], [-71.00568, -55.05383], [-72.2639, -54.49514], [-73.2852, -53.957519999999874], [-74.66253, -52.83749], [-73.8381, -53.04743], [-72.43418, -53.7154], [-71.10773, -54.07433], [-70.591779999999787, -53.61583], [-70.26748, -52.93123], [-69.345649999999878, -52.5183], [-68.634010227583147, -52.636370458874353]]], [[[-68.219913092711224, -21.49434661223183], [-67.828179897722634, -22.872918796482178], [-67.106673550063604, -22.735924574476392], [-66.985233934177629, -22.986348565362825], [-67.328442959244128, -24.025303236590908], [-68.417652960876111, -24.518554782816874], [-68.386001146097342, -26.185016371365229], [-68.594799770772667, -26.50690886811126], [-68.295541551370391, -26.899339694935787], [-69.001234910748266, -27.521213881136127], [-69.656130337183143, -28.459141127233686], [-70.013550381129861, -29.367922865518544], [-69.919008348251921, -30.336339206668306], [-70.535068935819439, -31.365010267870279], [-70.074399380153622, -33.09120981214803], [-69.814776984319209, -33.273886000299839], [-69.817309129501453, -34.193571465798279], [-70.388049485949082, -35.169687595359441], [-70.364769253201658, -36.005088799789931], [-71.121880662709771, -36.65812387466233], [-71.118625047475419, -37.576827487947192], [-70.814664272734703, -38.552995293940732], [-71.413516608349042, -38.916022230791107], [-71.680761277946445, -39.808164157878061], [-71.915734015577542, -40.832339369470716], [-71.746803758415453, -42.051386407235988], [-72.148898078078517, -42.254888197601375], [-71.915423956983901, -43.408564548517404], [-71.464056159130493, -43.787611179378324], [-71.793622606071935, -44.207172133156099], [-71.329800788036195, -44.407521661151677], [-71.222778896759721, -44.784242852559409], [-71.659315558545316, -44.973688653341434], [-71.552009446891233, -45.560732924177117], [-71.917258470330196, -46.884838148791786], [-72.44735531278026, -47.738532810253517], [-72.331160854771937, -48.244238376661819], [-72.648247443314929, -48.878618259476774], [-73.415435757120022, -49.318436374712952], [-73.328050910114456, -50.378785088909865], [-72.975746832964617, -50.741450290734299], [-72.309973517532342, -50.677009779666342], [-72.329403856074023, -51.425956312872394], [-71.914803839796321, -52.009022305865912], [-69.498362189396076, -52.142760912637236], [-68.571545376241332, -52.299443855346247], [-69.461284349226617, -52.291950772663924], [-69.94277950710611, -52.537930590373243], [-70.8451016913545, -52.899200528525711], [-71.006332160105217, -53.833252042201345], [-71.429794684520928, -53.856454760300373], [-72.557942877884855, -53.531410001184447], [-73.702756720662862, -52.835069268607249], [-73.702756720662862, -52.835070076051487], [-74.946763475225154, -52.262753588419017], [-75.260026007778507, -51.62935475037321], [-74.976632453089806, -51.043395684615675], [-75.47975419788348, -50.378371677451547], [-75.608015102831942, -48.673772881871784], [-75.182769741502128, -47.711919447623153], [-74.126580980104677, -46.939253431995084], [-75.644395311165439, -46.647643324572016], [-74.69215369332305, -45.76397633238097], [-74.351709357384252, -44.10304412208788], [-73.240356004515192, -44.454960625995611], [-72.717803921179765, -42.383355808278985], [-73.388899909138232, -42.117532240569567], [-73.701335618774834, -43.365776462579738], [-74.33194312203257, -43.224958184584395], [-74.017957119427152, -41.794812920906828], [-73.677099372029943, -39.942212823243111], [-73.217592536090663, -39.258688653318508], [-73.505559455037044, -38.282882582351064], [-73.588060879191076, -37.156284681956016], [-73.166717088499283, -37.123780206044351], [-72.553136969681717, -35.508840020491022], [-71.861732143832555, -33.909092706031522], [-71.438450486929895, -32.418899428030819], [-71.668720669222424, -30.920644626592516], [-71.370082567007714, -30.095682061484997], [-71.48989437527645, -28.861442152625909], [-70.905123867461569, -27.640379734001193], [-70.724953986275963, -25.705924167587209], [-70.403965827095035, -23.628996677344542], [-70.091245897080668, -21.393319187101223], [-70.164419725205974, -19.756468194256183], [-70.372572394477714, -18.347975355708879], [-69.858443569605797, -18.092693780187027], [-69.590423753523979, -17.580011895419286], [-69.100246955019401, -18.260125420812653], [-68.966818406841824, -18.981683444904089], [-68.442225104430918, -19.405068454671419], [-68.757167121033703, -20.37265797290447], [-68.219913092711224, -21.49434661223183]]]] } }, + { "type": "Feature", "properties": { "admin": "China", "name": "China", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[110.339187860151526, 18.678395087147603], [109.475209588663702, 18.19770091396861], [108.655207961056135, 18.507681993071397], [108.626217482540426, 19.367887885001974], [109.119055617308007, 19.821038519769385], [110.211598748822837, 20.101253973872073], [110.786550734502228, 20.077534491450077], [111.01005130416462, 19.695929877190732], [110.570646600386794, 19.255879218009305], [110.339187860151526, 18.678395087147603]]], [[[127.657407261262378, 49.760270494172929], [129.397817824420429, 49.440600084015429], [130.58229332898236, 48.729687404976112], [130.987281528853828, 47.790132351261391], [132.506671991099495, 47.788969631534876], [133.373595819228001, 48.183441677434914], [135.026311476786702, 48.478229885443902], [134.500813836810607, 47.578439846377833], [134.112362095272601, 47.212467352886719], [133.76964399631288, 46.116926988299056], [133.097126906466428, 45.14406647397216], [131.883454217659562, 45.32116160743643], [131.025212030156069, 44.967953192721573], [131.288555129115537, 44.111519680348252], [131.144687941614848, 42.929989732426932], [130.633866408409801, 42.903014634770543], [130.640015903852429, 42.39500946712527], [129.994267205933227, 42.985386867843793], [129.596668735879462, 42.424981797854592], [128.05221520397231, 41.994284572917984], [128.208433058790717, 41.466771552082534], [127.343782993683021, 41.503151760415953], [126.869083286649854, 41.816569322266155], [126.18204511932943, 41.107336127276362], [125.079941847840587, 40.569823716792449], [124.265624627785314, 39.928493353834135], [122.86757042856101, 39.637787583976255], [122.131387974130917, 39.170451768544623], [121.054554478032856, 38.89747101496291], [121.585994907722466, 39.360853583324136], [121.376757033372641, 39.750261338859524], [122.168595005381007, 40.422442531896046], [121.640358514493528, 40.946389878903304], [120.768628778161954, 40.593388169917596], [119.639602085449056, 39.898055935214209], [119.023463983233015, 39.252333075511096], [118.042748651197897, 39.204273993479674], [117.532702264477052, 38.73763580988409], [118.05969852098967, 38.061475531561051], [118.878149855628351, 37.897325344385898], [118.911636183753501, 37.448463853498723], [119.702802362142037, 37.156388658185072], [120.823457472823648, 37.870427761377968], [121.711258579597938, 37.481123358707165], [122.357937453298462, 37.454484157860684], [122.519994744965814, 36.930614325501828], [121.104163853033029, 36.651329047180432], [120.63700890511457, 36.111439520811125], [119.66456180224607, 35.609790554337728], [119.151208123858567, 34.909859117160458], [120.227524855633717, 34.360331936168613], [120.620369093916565, 33.37672272392512], [121.229014113450219, 32.460318711877186], [121.908145786630044, 31.692174384074683], [121.891919386890336, 30.949351508095098], [121.264257440273298, 30.676267401648712], [121.503519321784722, 30.14291494396425], [122.092113885589086, 29.832520453403156], [121.93842817595305, 29.018022365834803], [121.684438511238469, 28.225512600206677], [121.125661248866436, 28.135673122667178], [120.395473260582307, 27.053206895449385], [119.585496860839555, 25.740780544532605], [118.656871372554519, 24.547390855400234], [117.281606479970833, 23.624501451099714], [115.890735304835118, 22.782873236578094], [114.763827345846209, 22.668074042241663], [114.152546828265656, 22.223760077396204], [113.806779819800752, 22.548339748621423], [113.241077915501592, 22.051367499270462], [111.843592157032447, 21.550493679281512], [110.78546552942413, 21.39714386645533], [110.444039341271662, 20.34103261970639], [109.88986128137357, 20.282457383703441], [109.627655063924635, 21.008227037026725], [109.864488153118316, 21.395050970947516], [108.522812941524421, 21.715212307211821], [108.050180291782979, 21.552379869060101], [107.043420037872636, 21.8118989120299], [106.567273390735352, 22.21820486092474], [106.725403273548466, 22.794267889898375], [105.811247186305209, 22.976892401617899], [105.329209425886631, 23.352063300056976], [104.476858351664475, 22.819150092046918], [103.504514601660503, 22.703756618739217], [102.706992222100155, 22.708795070887696], [102.170435825613552, 22.464753119389336], [101.652017856861576, 22.318198757409554], [101.803119744882906, 21.174366766845051], [101.27002566936001, 21.201651923095167], [101.180005324307558, 21.436572984294052], [101.150032993578236, 21.849984442629015], [100.416537713627349, 21.558839423096654], [99.983489211021549, 21.742936713136451], [99.240898878987196, 22.118314317304559], [99.53199222208741, 22.949038804612591], [98.898749220782804, 23.142722072842581], [98.66026248575578, 24.063286037690002], [97.604719679762027, 23.897404690033049], [97.724609002679131, 25.083637193293036], [98.671838006589212, 25.91870250091349], [98.712093947344556, 26.743535874940243], [98.682690057370507, 27.508812160750658], [98.246230910233351, 27.747221381129172], [97.91198774616943, 28.335945136014367], [97.327113885490007, 28.261582749946339], [96.248833449287829, 28.411030992134467], [96.586590610747521, 28.830979519154361], [96.117678664131006, 29.452802028922513], [95.404802280664626, 29.031716620392157], [94.565990431702929, 29.27743805593996], [93.413347609432662, 28.640629380807233], [92.503118931043616, 27.896876329046442], [91.696656528696693, 27.771741848251615], [91.258853794319876, 28.040614325466343], [90.730513950567797, 28.064953925075738], [90.015828891971182, 28.296438503527177], [89.475810174521158, 28.042758897406365], [88.814248488320573, 27.299315904239389], [88.730325962278528, 28.086864732367552], [88.120440708369941, 27.876541652939572], [86.954517043000635, 27.974261786403524], [85.823319940131526, 28.203575954698742], [85.011638218123053, 28.642773952747369], [84.23457970575015, 28.839893703724691], [83.89899295444674, 29.320226141877633], [83.337115106137176, 29.463731594352193], [82.327512648450877, 30.115268052688204], [81.525804477874786, 30.422716986608659], [81.111256138029276, 30.183480943313402], [79.721366815107118, 30.882714748654728], [78.738894484374001, 31.515906073527045], [78.458446486326025, 32.61816437431272], [79.176128777995544, 32.483779812137747], [79.208891636068543, 32.994394639613738], [78.811086460285722, 33.506198025032397], [78.912268914713209, 34.321936346975768], [77.83745079947461, 35.494009507787794], [76.192848341785705, 35.89840342868785], [75.896897414050173, 36.666806138651872], [75.158027785140987, 37.133030910789152], [74.980002475895404, 37.419990139305888], [74.829985792952144, 37.990007025701445], [74.864815708316783, 38.378846340481587], [74.25751427602269, 38.606506862943476], [73.928852166646394, 38.505815334622717], [73.675379266254836, 39.431236884105566], [73.960013055318427, 39.660008449861714], [73.822243686828315, 39.893973497063136], [74.776862420556043, 40.366425279291619], [75.467827996730719, 40.56207225194867], [76.526368035797432, 40.427946071935132], [76.90448449087711, 41.066485907549648], [78.187196893226044, 41.185315863604799], [78.543660923175253, 41.582242540038713], [80.119430373051401, 42.12394074153822], [80.259990268885318, 42.34999929459908], [80.180150180994374, 42.920067857426844], [80.866206496101213, 43.180362046881008], [79.966106398441426, 44.917516994804622], [81.947070753918084, 45.317027492853143], [82.458925815769035, 45.539649563166499], [83.180483839860543, 47.330031236350735], [85.164290399113213, 47.000955715516099], [85.720483839870667, 47.452969468773077], [85.76823286330837, 48.455750637396896], [86.59877648310335, 48.549181626980605], [87.359970330762692, 49.214980780629148], [87.751264276076668, 49.297197984405464], [88.013832228551678, 48.599462795600594], [88.854297723346747, 48.069081732773007], [90.280825636763893, 47.693549099307901], [90.970809360724957, 46.88814606382293], [90.585768263718307, 45.719716091487491], [90.945539585334316, 45.286073309910243], [92.133890822318222, 45.115075995456429], [93.480733677141316, 44.97547211362], [94.688928664125356, 44.352331854828456], [95.306875441471504, 44.241330878265458], [95.762454868556688, 43.319449164394619], [96.349395786527808, 42.725635280928643], [97.451757440177971, 42.74888967546007], [99.515817498779995, 42.524691473961688], [100.845865513108279, 42.663804429691417], [101.833040399179936, 42.51487295182627], [103.312278273534787, 41.907468166667613], [104.522281935649005, 41.90834666601662], [104.964993931093431, 41.597409572916334], [106.129315627061658, 42.134327704428891], [107.744772576937976, 42.481515814781908], [109.243595819131428, 42.519446316084149], [110.412103306115299, 42.871233628911014], [111.129682244920218, 43.406834011400171], [111.82958784388137, 43.743118394539486], [111.667737257943202, 44.073175767587706], [111.348376906379428, 44.457441718110047], [111.87330610560025, 45.102079372735112], [112.436062453258842, 45.01164561622425], [113.463906691544196, 44.808893134127111], [114.46033165899604, 45.339816799493875], [115.985096470200133, 45.727235012386004], [116.717868280098855, 46.38820241961524], [117.421701287914246, 46.67273285581421], [118.874325799638711, 46.805412095723646], [119.663269891438745, 46.692679958678944], [119.772823927897562, 47.048058783550132], [118.866574334794947, 47.747060044946195], [118.064142694166719, 48.06673045510373], [117.295507440257438, 47.697709052107385], [116.308952671373234, 47.853410142602812], [115.742837355615734, 47.726544501326273], [115.485282017073018, 48.135382595403442], [116.191802199367601, 49.134598090199056], [116.67880089728618, 49.888531399121398], [117.879244419426371, 49.510983384796944], [119.288460728025839, 50.142882798862033], [119.279365675942358, 50.582907619827282], [120.182049595216924, 51.64356639261802], [120.738191359541972, 51.964115302124547], [120.725789015791975, 52.516226304730814], [120.177088657716865, 52.753886216841195], [121.003084751470226, 53.251401068731226], [122.245747918792858, 53.431725979213681], [123.571506789240843, 53.458804429734627], [125.068211297710434, 53.161044826868832], [125.946348911646169, 52.792798570356936], [126.564399041856959, 51.784255479532689], [126.939156528837657, 51.353894151405896], [127.287455682484904, 50.739797268265434], [127.657407261262378, 49.760270494172929]]]] } }, + { "type": "Feature", "properties": { "admin": "Ivory Coast", "name": "Côte d'Ivoire", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-2.856125047202397, 4.994475816259508], [-3.311084357100071, 4.984295559098014], [-4.008819545904941, 5.179813340674314], [-4.64991736491791, 5.168263658057084], [-5.834496222344525, 4.993700669775135], [-6.528769090185845, 4.705087795425015], [-7.518941209330434, 4.338288479017307], [-7.712159389669749, 4.364565944837721], [-7.63536821128403, 5.188159084489455], [-7.53971513511176, 5.313345241716517], [-7.570152553731686, 5.707352199725903], [-7.993692592795879, 6.126189683451541], [-8.311347622094017, 6.193033148621081], [-8.602880214868618, 6.467564195171659], [-8.385451626000572, 6.911800645368742], [-8.485445522485348, 7.395207831243068], [-8.439298468448696, 7.686042792181736], [-8.280703497744936, 7.687179673692156], [-8.221792364932197, 8.123328762235571], [-8.299048631208562, 8.316443589710302], [-8.203498907900878, 8.455453192575446], [-7.832100389019186, 8.575704250518625], [-8.079113735374348, 9.376223863152033], [-8.309616461612249, 9.789531968622439], [-8.22933712404682, 10.129020290563897], [-8.029943610048617, 10.206534939001711], [-7.89958980959237, 10.297382106970824], [-7.622759161804808, 10.147236232946792], [-6.850506557635057, 10.138993841996237], [-6.666460944027547, 10.430810655148447], [-6.493965013037267, 10.411302801958268], [-6.205222947606429, 10.524060777219132], [-6.050452032892266, 10.096360785355442], [-5.816926235365286, 10.222554633012191], [-5.404341599946973, 10.370736802609144], [-4.954653286143098, 10.152713934769732], [-4.779883592131966, 9.821984768101741], [-4.330246954760383, 9.610834865757139], [-3.980449184576684, 9.862344061721698], [-3.511898972986272, 9.900326239456216], [-2.827496303712706, 9.642460842319775], [-2.56218950032624, 8.219627793811481], [-2.983584967450326, 7.379704901555511], [-3.244370083011261, 6.2504715031135], [-2.810701463217839, 5.389051215024109], [-2.856125047202397, 4.994475816259508]]] } }, + { "type": "Feature", "properties": { "admin": "Cameroon", "name": "Cameroon", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[13.07582238124675, 2.267097072759014], [12.951333855855605, 2.321615708826939], [12.359380323952218, 2.19281220133945], [11.751665480199787, 2.326757513839993], [11.276449008843711, 2.261050930180871], [9.649158155972627, 2.283866075037735], [9.795195753629455, 3.073404445809117], [9.404366896205998, 3.734526882335202], [8.948115675501068, 3.904128933117135], [8.744923943729416, 4.352215277519959], [8.488815545290889, 4.495617377129917], [8.500287713259693, 4.771982937026847], [8.757532993208626, 5.47966583904791], [9.233162876023043, 6.444490668153334], [9.522705926154398, 6.453482367372116], [10.118276808318255, 7.038769639509879], [10.497375115611417, 7.055357774275562], [11.058787876030349, 6.644426784690593], [11.745774366918509, 6.981382961449753], [11.839308709366801, 7.397042344589434], [12.063946160539556, 7.799808457872301], [12.218872104550597, 8.305824082874322], [12.753671502339214, 8.717762762888993], [12.955467970438971, 9.417771714714702], [13.1675997249971, 9.64062632897341], [13.308676385153914, 10.160362046748926], [13.572949659894558, 10.798565985553564], [14.415378859116682, 11.572368882692071], [14.468192172918974, 11.90475169519341], [14.57717776862253, 12.085360826053501], [14.181336297266792, 12.483656927943112], [14.213530714584634, 12.802035427293344], [14.495787387762842, 12.859396267137326], [14.893385857816522, 12.219047756392582], [14.960151808337598, 11.555574042197222], [14.923564894274955, 10.891325181517471], [15.467872755605269, 9.982336737503429], [14.909353875394713, 9.99212942142273], [14.627200555081057, 9.920919297724536], [14.171466098699025, 10.021378282099928], [13.954218377344002, 9.549494940626685], [14.544466586981766, 8.965861314322266], [14.979995558337688, 8.796104234243471], [15.120865512765331, 8.382150173369423], [15.436091749745765, 7.692812404811971], [15.279460483469107, 7.421924546737968], [14.776545444404572, 6.408498033062044], [14.536560092841111, 6.22695872642069], [14.459407179429345, 5.451760565610299], [14.558935988023501, 5.03059764243153], [14.478372430080466, 4.732605495620446], [14.950953403389658, 4.21038930909492], [15.036219516671249, 3.851367295747123], [15.405395948964379, 3.335300604664339], [15.862732374747479, 3.013537298998982], [15.907380812247649, 2.557389431158612], [16.01285241055535, 2.267639675298084], [15.940918816805061, 1.727672634280295], [15.14634199388524, 1.964014797367184], [14.337812534246577, 2.22787466064949], [13.07582238124675, 2.267097072759014]]] } }, + { "type": "Feature", "properties": { "admin": "Democratic Republic of the Congo", "name": "Dem. Rep. Congo", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[30.833859897593801, 3.50916596111034], [30.773346795380036, 2.339883327642127], [31.174149204235807, 2.204465236821263], [30.852670118948048, 1.849396470543809], [30.468507521290292, 1.58380544677972], [30.086153598762703, 1.062312730306288], [29.875778842902488, 0.597379868976304], [29.819503208136634, -0.205310153813372], [29.587837762172164, -0.58740569417948], [29.579466180140876, -1.341313164885626], [29.29188683443661, -1.620055840667987], [29.254834832483336, -2.215109958508911], [29.117478875451546, -2.292211195488384], [29.02492638521678, -2.839257907730157], [29.276383904749046, -3.293907159034063], [29.339997592900342, -4.499983412294092], [29.519986606572925, -5.419978936386313], [29.41999271008816, -5.939998874539432], [29.620032179490003, -6.520015150583424], [30.199996779101692, -7.079980970898161], [30.740015496551781, -8.340007419470913], [30.34608605319081, -8.238256524288216], [29.002912225060467, -8.40703175215347], [28.734866570762495, -8.526559340044576], [28.449871046672818, -9.164918308146083], [28.673681674928922, -9.605924981324931], [28.496069777141763, -10.789883721564044], [28.372253045370421, -11.793646742401389], [28.642417433392346, -11.971568698782312], [29.341547885869087, -12.36074391037241], [29.616001417771223, -12.178894545137307], [29.699613885219485, -13.257226657771827], [28.934285922976834, -13.248958428605132], [28.52356163912102, -12.698604424696679], [28.15510867687998, -12.272480564017894], [27.38879886242378, -12.132747491100663], [27.164419793412456, -11.608748467661071], [26.55308759939961, -11.924439792532125], [25.752309604604726, -11.784965101776356], [25.418118116973197, -11.330935967659958], [24.783169793402948, -11.238693536018962], [24.314516228947948, -11.262826429899269], [24.257155389103982, -10.951992689663655], [23.912215203555714, -10.926826267137512], [23.456790805767433, -10.867863457892481], [22.837345411884733, -11.017621758674329], [22.402798292742371, -10.99307545333569], [22.155268182064304, -11.084801120653768], [22.208753289486388, -9.894796237836507], [21.87518191904234, -9.523707777548564], [21.801801385187897, -8.908706556842978], [21.949130893652036, -8.305900974158275], [21.746455926203303, -7.920084730667147], [21.728110792739695, -7.2908724910813], [20.514748162526498, -7.299605808138629], [20.601822950938292, -6.93931772219968], [20.091621534920645, -6.943090101756993], [20.037723016040214, -7.116361179231644], [19.417502475673157, -7.155428562044297], [19.166613396896107, -7.738183688999753], [19.016751743249664, -7.988245944860132], [18.464175652752683, -7.847014255406442], [18.134221632569048, -7.98767750410492], [17.472970004962232, -8.068551120641699], [17.089995965247166, -7.545688978712525], [16.860190870845198, -7.222297865429984], [16.573179965896141, -6.622644545115087], [16.326528354567042, -5.877470391466267], [13.375597364971892, -5.864241224799548], [13.02486941900696, -5.984388929878157], [12.735171339578695, -5.965682061388497], [12.322431674863507, -6.100092461779658], [12.182336866920249, -5.789930515163837], [12.436688266660866, -5.684303887559245], [12.468004184629734, -5.248361504745003], [12.631611769265788, -4.991271254092935], [12.995517205465173, -4.781103203961883], [13.258240187237044, -4.882957452009165], [13.600234816144676, -4.500138441590969], [14.144956088933295, -4.510008640158715], [14.209034864975219, -4.793092136253597], [14.582603794013179, -4.970238946150139], [15.170991652088441, -4.3435071753143], [15.753540073314749, -3.855164890156096], [16.006289503654298, -3.535132744972528], [15.972803175529149, -2.712392266453612], [16.407091912510051, -1.740927015798682], [16.86530683764212, -1.225816338713287], [17.523716261472853, -0.743830254726987], [17.638644646889983, -0.424831638189246], [17.663552687254676, -0.058083998213817], [17.826540154703245, 0.288923244626105], [17.774191928791563, 0.855658677571085], [17.89883548347958, 1.741831976728278], [18.09427575040743, 2.365721543788055], [18.39379235197114, 2.90044342692822], [18.453065219809925, 3.504385891123348], [18.542982211997778, 4.201785183118317], [18.932312452884755, 4.709506130385973], [19.467783644293146, 5.031527818212779], [20.290679152108932, 4.691677761245287], [20.927591180106273, 4.322785549329736], [21.659122755630019, 4.224341945813719], [22.405123732195531, 4.02916006104732], [22.704123569436284, 4.633050848810156], [22.841479526468103, 4.710126247573483], [23.297213982850135, 4.609693101414221], [24.41053104014625, 5.108784084489129], [24.805028924262409, 4.897246608902349], [25.128833449003274, 4.927244777847789], [25.278798455514302, 5.170408229997191], [25.650455356557465, 5.256087754737123], [26.402760857862535, 5.150874538590869], [27.044065382604703, 5.127852688004835], [27.374226108517483, 5.233944403500059], [27.979977247842807, 4.408413397637373], [28.428993768026906, 4.287154649264493], [28.696677687298795, 4.455077215996936], [29.159078403446497, 4.38926727947323], [29.715995314256013, 4.600804755060024], [29.953500197069467, 4.173699042167683], [30.833859897593801, 3.50916596111034]]] } }, + { "type": "Feature", "properties": { "admin": "Republic of Congo", "name": "Congo", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[12.995517205465173, -4.781103203961883], [12.620759718484491, -4.438023369976135], [12.318607618873923, -4.606230157086187], [11.914963006242086, -5.037986748884789], [11.093772820691923, -3.978826592630546], [11.855121697648114, -3.42687061932105], [11.478038771214299, -2.765618991714241], [11.820963575903189, -2.514161472181982], [12.495702752338159, -2.391688327650242], [12.575284458067639, -1.948511244315134], [13.109618767965626, -2.428740329603513], [13.992407260807706, -2.470804945489099], [14.299210239324564, -1.998275648612213], [14.425455763413593, -1.333406670744971], [14.316418491277741, -0.552627455247048], [13.843320753645653, 0.038757635901149], [14.276265903386953, 1.196929836426619], [14.026668735417214, 1.395677395021153], [13.282631463278816, 1.31418366129688], [13.003113641012074, 1.830896307783319], [13.07582238124675, 2.267097072759014], [14.337812534246577, 2.22787466064949], [15.14634199388524, 1.964014797367184], [15.940918816805061, 1.727672634280295], [16.01285241055535, 2.267639675298084], [16.537058139724135, 3.198254706226278], [17.133042433346297, 3.728196519379451], [17.809900343505259, 3.560196437998569], [18.453065219809925, 3.504385891123348], [18.39379235197114, 2.90044342692822], [18.09427575040743, 2.365721543788055], [17.89883548347958, 1.741831976728278], [17.774191928791563, 0.855658677571085], [17.826540154703245, 0.288923244626105], [17.663552687254676, -0.058083998213817], [17.638644646889983, -0.424831638189246], [17.523716261472853, -0.743830254726987], [16.86530683764212, -1.225816338713287], [16.407091912510051, -1.740927015798682], [15.972803175529149, -2.712392266453612], [16.006289503654298, -3.535132744972528], [15.753540073314749, -3.855164890156096], [15.170991652088441, -4.3435071753143], [14.582603794013179, -4.970238946150139], [14.209034864975219, -4.793092136253597], [14.144956088933295, -4.510008640158715], [13.600234816144676, -4.500138441590969], [13.258240187237044, -4.882957452009165], [12.995517205465173, -4.781103203961883]]] } }, + { "type": "Feature", "properties": { "admin": "Colombia", "name": "Colombia", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-75.373223232713841, -0.15203175212045], [-75.801465827116587, 0.084801337073202], [-76.292314419240938, 0.416047268064119], [-76.576379767549383, 0.256935533037435], [-77.424984300430367, 0.395686753741117], [-77.668612840470416, 0.825893052570961], [-77.855061408179509, 0.809925034992773], [-78.855258755188686, 1.380923773601822], [-78.990935228171026, 1.691369940595251], [-78.617831387023699, 1.766404120283056], [-78.662118089497838, 2.267355454920476], [-78.427610439757302, 2.629555568854215], [-77.931542527971473, 2.696605739752925], [-77.510431281224996, 3.325016994638246], [-77.127689785455246, 3.849636135265356], [-77.496271938776999, 4.087606105969427], [-77.307601284479375, 4.667984117039452], [-77.533220587865713, 5.582811997902496], [-77.318815070286718, 5.845354112161359], [-77.476660732722266, 6.691116441266301], [-77.881571417945239, 7.223771267114783], [-77.75341386586139, 7.709839789252141], [-77.431107957656977, 7.638061224798733], [-77.242566494440069, 7.935278225125442], [-77.474722866511314, 8.524286200388216], [-77.353360765273848, 8.670504665558068], [-76.836673957003541, 8.638749497914715], [-76.086383836557843, 9.336820583529486], [-75.674600185840035, 9.443248195834597], [-75.664704149056149, 9.774003200718736], [-75.480425991503338, 10.618990383339305], [-74.906895107711975, 11.08304474532032], [-74.276752692344871, 11.102035834187586], [-74.197222663047683, 11.310472723836865], [-73.414763963500278, 11.227015285685479], [-72.62783525255962, 11.731971543825519], [-72.238194953078903, 11.955549628136325], [-71.754090135368628, 12.437303168177305], [-71.399822353791691, 12.376040757695289], [-71.137461107045866, 12.112981879113503], [-71.331583624950284, 11.776284084515805], [-71.973921678338272, 11.608671576377116], [-72.227575446242923, 11.108702093953237], [-72.614657762325194, 10.821975409381777], [-72.905286017534692, 10.45034434655477], [-73.027604132769554, 9.736770331252441], [-73.304951544880026, 9.151999823437604], [-72.788729824500379, 9.085027167187331], [-72.660494757768092, 8.62528778730268], [-72.439862230097944, 8.405275376820027], [-72.360900641555958, 8.002638454617893], [-72.479678921178831, 7.632506008327352], [-72.444487270788059, 7.42378489830048], [-72.19835242378187, 7.340430813013682], [-71.960175747348629, 6.991614895043538], [-70.674233567981503, 7.087784735538717], [-70.093312954372408, 6.960376491723109], [-69.389479946557103, 6.099860541198835], [-68.985318569602327, 6.206804917826856], [-68.265052456318216, 6.153268133972473], [-67.695087246355001, 6.267318020040645], [-67.34143958196556, 6.095468044454021], [-67.521531948502741, 5.556870428891968], [-67.744696621355203, 5.221128648291667], [-67.823012254493534, 4.503937282728898], [-67.621835903581271, 3.839481716319994], [-67.33756384954367, 3.542342230641721], [-67.303173183853417, 3.31845408773718], [-67.809938117123693, 2.820655015469569], [-67.447092047786299, 2.600280869960869], [-67.181294318293041, 2.250638129074062], [-66.876325853122566, 1.253360500489336], [-67.065048183852483, 1.130112209473225], [-67.25999752467358, 1.719998684084956], [-67.537810024674684, 2.037162787276329], [-67.868565029558823, 1.692455145673392], [-69.816973232691609, 1.714805202639624], [-69.804596727157701, 1.089081122233466], [-69.218637661400166, 0.985676581217433], [-69.252434048119042, 0.602650865070075], [-69.452396002872447, 0.706158758950693], [-70.015565761989293, 0.541414292804205], [-70.02065589057004, -0.185156345219539], [-69.577065395776586, -0.549991957200163], [-69.420485805932216, -1.122618503426409], [-69.444101935489599, -1.556287123219817], [-69.893635219996611, -4.298186944194326], [-70.394043952094975, -3.766591485207825], [-70.692682054309699, -3.742872002785858], [-70.047708502874841, -2.725156345229699], [-70.813475714791949, -2.256864515800742], [-71.413645799429773, -2.342802422702128], [-71.774760708285385, -2.169789727388937], [-72.325786505813639, -2.434218031426453], [-73.070392218707212, -2.308954359550952], [-73.659503546834586, -1.260491224781134], [-74.122395189089048, -1.002832533373848], [-74.441600511355958, -0.530820000819887], [-75.106624518520064, -0.05720549886486], [-75.373223232713841, -0.15203175212045]]] } }, + { "type": "Feature", "properties": { "admin": "Costa Rica", "name": "Costa Rica", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-82.965783047197348, 8.225027980985983], [-83.508437262694287, 8.446926581247281], [-83.711473965169063, 8.656836249216864], [-83.596313035806631, 8.830443223501417], [-83.632641567707822, 9.051385809765319], [-83.909885626953724, 9.290802720573579], [-84.303401658856345, 9.487354030795712], [-84.64764421256865, 9.615537421095707], [-84.713350796227743, 9.908051866083849], [-84.975660366541319, 10.086723130733004], [-84.911374884770211, 9.795991522658921], [-85.110923428065291, 9.557039699741308], [-85.339488288092255, 9.834542141148658], [-85.660786505866966, 9.93334747969072], [-85.797444831062819, 10.134885565629032], [-85.791708747078417, 10.439337266476612], [-85.65931372754666, 10.754330959511718], [-85.941725430021748, 10.895278428587799], [-85.712540452807289, 11.088444932494822], [-85.561851976244171, 11.217119248901593], [-84.903003302738924, 10.952303371621895], [-84.673069017256239, 11.082657172078139], [-84.355930752281026, 10.999225572142901], [-84.190178595704822, 10.793450018756671], [-83.895054490885926, 10.726839097532444], [-83.655611741861563, 10.938764146361418], [-83.402319708982944, 10.39543813724465], [-83.015676642575158, 9.992982082555553], [-82.546196255203469, 9.566134751824674], [-82.932890998043561, 9.476812038608172], [-82.927154914059145, 9.074330145702914], [-82.719183112300513, 8.925708726431493], [-82.868657192704759, 8.807266343618521], [-82.829770677405151, 8.626295477732368], [-82.9131764391242, 8.423517157419068], [-82.965783047197348, 8.225027980985983]]] } }, + { "type": "Feature", "properties": { "admin": "Cuba", "name": "Cuba", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-82.268151211257035, 23.188610744717703], [-81.404457160146819, 23.117271429938775], [-80.61876868358118, 23.105980129482994], [-79.679523688460222, 22.765303249598823], [-79.281485968732071, 22.399201565027049], [-78.347434455056472, 22.512166246017085], [-77.993295864560253, 22.277193508385928], [-77.146422492161037, 21.657851467367831], [-76.523824835908528, 21.20681956632437], [-76.194620123993175, 21.220565497314006], [-75.598222418912655, 21.01662445727413], [-75.671060350228032, 20.735091254147999], [-74.933896043584483, 20.693905137611381], [-74.178024868451246, 20.284627793859737], [-74.296648118777242, 20.050378526280678], [-74.961594611292924, 19.923435370355687], [-75.634680141894577, 19.873774318923193], [-76.323656175425981, 19.952890936762056], [-77.755480923153044, 19.855480861891873], [-77.085108405246729, 20.413353786698789], [-77.492654588516601, 20.673105373613886], [-78.137292243141573, 20.739948838783427], [-78.482826707661161, 21.028613389565848], [-78.719866502583997, 21.598113511638431], [-79.284999966127913, 21.559175319906497], [-80.217475348618635, 21.827324327069032], [-80.517534552721401, 22.037078965741756], [-81.820943366203167, 22.192056586185068], [-82.169991828118611, 22.387109279870746], [-81.79500179719264, 22.636964830001951], [-82.775897996740838, 22.688150336187057], [-83.494458787759328, 22.168517971276124], [-83.908800421875611, 22.154565334557329], [-84.052150845053248, 21.910575059491251], [-84.547030198896351, 21.801227728761639], [-84.974911058273079, 21.896028143801082], [-84.44706214062775, 22.204949856041903], [-84.23035702181177, 22.56575470630376], [-83.778239915690165, 22.78811839445569], [-83.267547573565736, 22.983041897060641], [-82.510436164057495, 23.078746649665181], [-82.268151211257035, 23.188610744717703]]] } }, + { "type": "Feature", "properties": { "admin": "Northern Cyprus", "name": "N. Cyprus", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[32.731780226377445, 35.14002594658843], [32.802473585752743, 35.145503648411363], [32.946960890440799, 35.38670339613369], [33.667227003724939, 35.373215847305509], [34.576473829900458, 35.671595567358786], [33.900804477684197, 35.245755927057608], [33.973616570783456, 35.058506374647997], [33.866439650210104, 35.093594672174177], [33.675391880027057, 35.017862860650446], [33.525685255677494, 35.038688462864066], [33.475817498515845, 35.000344550103499], [33.45592207208346, 35.101423651666401], [33.383833449036295, 35.162711900364563], [33.190977003723042, 35.173124701471373], [32.919572381326127, 35.087832749973636], [32.731780226377445, 35.14002594658843]]] } }, + { "type": "Feature", "properties": { "admin": "Cyprus", "name": "Cyprus", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[33.973616570783456, 35.058506374647997], [34.004880812320032, 34.978097846001852], [32.97982710137844, 34.571869411755436], [32.490296258277532, 34.701654771456468], [32.256667107885953, 35.103232326796622], [32.731780226377445, 35.14002594658843], [32.919572381326127, 35.087832749973636], [33.190977003723042, 35.173124701471373], [33.383833449036295, 35.162711900364563], [33.45592207208346, 35.101423651666401], [33.475817498515845, 35.000344550103499], [33.525685255677494, 35.038688462864066], [33.675391880027057, 35.017862860650446], [33.866439650210104, 35.093594672174177], [33.973616570783456, 35.058506374647997]]] } }, + { "type": "Feature", "properties": { "admin": "Czech Republic", "name": "Czech Rep.", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[16.960288120194573, 48.596982326850593], [16.49928266771877, 48.785808010445095], [16.029647251050218, 48.733899034207916], [15.253415561593979, 49.039074205107575], [14.901447381254055, 48.964401760445817], [14.33889773932472, 48.555305284207193], [13.595945672264433, 48.877171942737135], [13.031328973043427, 49.307068182973232], [12.52102420416119, 49.54741526956272], [12.415190870827441, 49.96912079528056], [12.240111118222556, 50.266337795607271], [12.96683678554319, 50.484076443069071], [13.338131951560282, 50.733234361364346], [14.05622765468817, 50.926917629594286], [14.307013380600633, 51.117267767941399], [14.570718214586062, 51.002339382524262], [15.016995883858666, 51.106674099321566], [15.490972120839725, 50.7847299261432], [16.238626743238566, 50.697732652379827], [16.176253289462263, 50.4226073268579], [16.719475945714429, 50.215746568393527], [16.868769158605655, 50.473973700556016], [17.554567091551117, 50.36214590107641], [17.649445021238986, 50.049038397819942], [18.392913852622168, 49.988628648470737], [18.85314415861361, 49.496229763377634], [18.554971144289478, 49.495015367218777], [18.399993523846174, 49.315000515330034], [18.170498488037961, 49.271514797556421], [18.104972771891848, 49.043983466175298], [17.913511590250462, 48.996492824899072], [17.886484816161808, 48.903475246773695], [17.545006951577101, 48.800019029325362], [17.101984897538895, 48.8169688991171], [16.960288120194573, 48.596982326850593]]] } }, + { "type": "Feature", "properties": { "admin": "Germany", "name": "Germany", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[9.92190636560923, 54.983104153048025], [9.939579705452898, 54.596641954153242], [10.950112338920517, 54.363607082733147], [10.939466993868447, 54.008693345752583], [11.95625247564328, 54.196485500701144], [12.518440382546711, 54.470370591847988], [13.647467075259495, 54.075510972705885], [14.119686313542555, 53.757029120491026], [14.353315463934164, 53.248171291713092], [14.074521111719431, 52.981262518925334], [14.437599725002197, 52.62485016540829], [14.685026482815713, 52.089947414755208], [14.607098422919645, 51.745188096719964], [15.016995883858781, 51.106674099321701], [14.570718214586119, 51.002339382524369], [14.307013380600662, 51.117267767941364], [14.05622765468831, 50.92691762959435], [13.338131951560397, 50.733234361364268], [12.966836785543249, 50.484076443069164], [12.240111118222668, 50.266337795607214], [12.41519087082747, 49.969120795280602], [12.521024204161332, 49.547415269562741], [13.031328973043513, 49.307068182973232], [13.595945672264575, 48.877171942737156], [13.243357374737112, 48.416114813829026], [12.884102817443873, 48.289145819687846], [13.025851271220514, 47.637583523135945], [12.93262698736606, 47.467645575543983], [12.620759718484519, 47.672387600284409], [12.141357456112869, 47.703083401065768], [11.426414015354847, 47.523766181013045], [10.544504021861597, 47.566399237653783], [10.402083774465321, 47.302487697939164], [9.896068149463188, 47.58019684507569], [9.594226108446376, 47.525058091820185], [8.522611932009793, 47.830827541691342], [8.317301466514092, 47.613579820336263], [7.466759067422286, 47.620581976911907], [7.59367638513106, 48.333019110703724], [8.099278598674855, 49.017783515003423], [6.658229607783709, 49.201958319691627], [6.186320428094176, 49.4638028021145], [6.242751092156992, 49.90222565367872], [6.043073357781109, 50.128051662794221], [6.156658155958779, 50.803721015010574], [5.988658074577812, 51.85161570902504], [6.589396599970825, 51.85202912048338], [6.842869500362381, 52.228440253297542], [7.092053256873895, 53.14404328064488], [6.905139601274128, 53.482162177130633], [7.100424838905268, 53.693932196662658], [7.936239454793961, 53.748295803433777], [8.121706170289483, 53.527792466844275], [8.800734490604667, 54.02078563090889], [8.572117954145368, 54.395646470754045], [8.526229282270206, 54.962743638725144], [9.282048780971136, 54.830865383516297], [9.92190636560923, 54.983104153048025]]] } }, + { "type": "Feature", "properties": { "admin": "Djibouti", "name": "Djibouti", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[43.081226027200152, 12.699638576707112], [43.317852410664663, 12.390148423711022], [43.286381463398911, 11.974928290245883], [42.715873650896519, 11.735640570518338], [43.145304803242126, 11.462039699748853], [42.776851841000948, 10.926878566934416], [42.55493000000012, 11.105110000000193], [42.314140000000116, 11.0342], [41.755570000000191, 11.05091], [41.739590000000177, 11.355110000000137], [41.661760000000122, 11.6312], [42.000000000000107, 12.100000000000133], [42.351560000000106, 12.54223000000013], [42.779642368344739, 12.455415757695672], [43.081226027200152, 12.699638576707112]]] } }, + { "type": "Feature", "properties": { "admin": "Denmark", "name": "Denmark", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[12.690006137755629, 55.60999095318077], [12.089991082414738, 54.800014553437919], [11.043543328504226, 55.36486379660424], [10.90391360845163, 55.779954738988735], [12.370904168353288, 56.111407375708822], [12.690006137755629, 55.60999095318077]]], [[[10.912181837618359, 56.4586213242779], [10.667803989309986, 56.081383368547208], [10.369992710011983, 56.190007229224719], [9.649984978889306, 55.469999498102041], [9.921906365609173, 54.983104153048046], [9.282048780971136, 54.830865383516155], [8.526229282270235, 54.962743638724973], [8.120310906617588, 55.517722683323612], [8.089976840862247, 56.540011705137587], [8.256581658571262, 56.809969387430286], [8.543437534223385, 57.110002753316891], [9.424469028367609, 57.172066148499468], [9.775558709358561, 57.447940782289649], [10.580005730846151, 57.730016587954843], [10.54610599126269, 57.21573273378614], [10.250000034230222, 56.890016181050456], [10.369992710011983, 56.60998159446082], [10.912181837618359, 56.4586213242779]]]] } }, + { "type": "Feature", "properties": { "admin": "Dominican Republic", "name": "Dominican Rep.", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-71.71236141629295, 19.714455878167353], [-71.587304450146604, 19.884910590082093], [-70.806706102161726, 19.880285549391981], [-70.214364997016119, 19.622885240146157], [-69.950815192327568, 19.647999986240002], [-69.769250047470067, 19.293267116772437], [-69.222125820579862, 19.313214219637096], [-69.254346076113819, 19.015196234609871], [-68.809411994080818, 18.979074408437846], [-68.317943284768958, 18.612197577381689], [-68.689315965434503, 18.205142320218609], [-69.164945848248905, 18.422648423735108], [-69.623987596297624, 18.380712998930246], [-69.952933926051529, 18.428306993071057], [-70.133232998317879, 18.245915025296892], [-70.517137213814195, 18.184290879788829], [-70.669298468697619, 18.42688589118303], [-70.999950120717173, 18.283328762276206], [-71.400209927033885, 17.598564357976596], [-71.657661912712001, 17.757572740138695], [-71.708304816358037, 18.044997056546091], [-71.687737596305865, 18.316660061104468], [-71.945112067335543, 18.616900132720257], [-71.701302659782485, 18.785416978424049], [-71.624873216422813, 19.169837958243303], [-71.71236141629295, 19.714455878167353]]] } }, + { "type": "Feature", "properties": { "admin": "Algeria", "name": "Algeria", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[11.99950564947161, 23.471668402596443], [8.572893100629782, 21.565660712159136], [5.677565952180684, 19.601206976799713], [4.267419467800038, 19.155265204336995], [3.158133172222704, 19.057364203360034], [3.146661004253899, 19.693578599521441], [2.683588494486428, 19.856230170160114], [2.060990838233919, 20.142233384679482], [1.823227573259032, 20.61080943448604], [-1.550054897457613, 22.792665920497377], [-4.92333736817423, 24.974574082940993], [-8.684399786809051, 27.395744126895998], [-8.66512447756419, 27.58947907155822], [-8.665589565454805, 27.656425889592349], [-8.674116176782972, 28.841288967396572], [-7.059227667661928, 29.579228420524522], [-6.060632290053772, 29.731699734001687], [-5.242129278982786, 30.000443020135581], [-4.859646165374469, 30.501187649043839], [-3.690441046554695, 30.896951605751152], [-3.647497931320145, 31.637294012980668], [-3.068980271812647, 31.724497992473207], [-2.616604783529567, 32.094346218386143], [-1.30789913573787, 32.262888902306095], [-1.124551153966308, 32.651521511357124], [-1.388049282222567, 32.864015000941301], [-1.733454555661467, 33.91971283623198], [-1.792985805661686, 34.527918606091198], [-2.169913702798624, 35.168396307916673], [-1.208602871089056, 35.71484874118709], [-0.127454392894606, 35.888662421200799], [0.503876580415209, 36.301272894835272], [1.466918572606545, 36.605647081034398], [3.161698846050824, 36.783904934225205], [4.815758090849129, 36.865036932923452], [5.320120070017792, 36.716518866516616], [6.261819695672611, 37.110655015606731], [7.330384962603969, 37.118380642234364], [7.737078484741003, 36.885707505840209], [8.420964389691674, 36.946427313783154], [8.217824334352313, 36.433176988260271], [8.376367628623766, 35.479876003555937], [8.140981479534302, 34.655145982393783], [7.524481642292242, 34.097376410451453], [7.612641635782181, 33.344114895148955], [8.430472853233367, 32.748337307255944], [8.439102817426116, 32.506284898400814], [9.055602654668148, 32.102691962201284], [9.482139926805273, 30.307556057246181], [9.805634392952411, 29.424638373323383], [9.859997999723443, 28.959989732371007], [9.683884718472765, 28.144173895779193], [9.756128370816779, 27.688258571884141], [9.629056023811073, 27.140953477480913], [9.716285841519747, 26.512206325785691], [9.319410841518161, 26.094324856057447], [9.910692579801774, 25.365454616796733], [9.948261346077969, 24.93695364023251], [10.30384687667836, 24.37931325937091], [10.771363559622925, 24.562532050061744], [11.560669386449002, 24.097909247325511], [11.99950564947161, 23.471668402596443]]] } }, + { "type": "Feature", "properties": { "admin": "Ecuador", "name": "Ecuador", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-80.302560594387188, -3.404856459164712], [-79.770293341780913, -2.65751189535964], [-79.986559210922394, -2.220794366061014], [-80.368783942369234, -2.685158786635788], [-80.967765469064332, -2.246942640800703], [-80.764806281238023, -1.965047702648532], [-80.933659023751702, -1.057454522306358], [-80.583370327461239, -0.906662692878683], [-80.39932471385373, -0.283703301600141], [-80.020898200180355, 0.360340074053468], [-80.090609707342097, 0.768428859862396], [-79.542762010399784, 0.982937730305963], [-78.855258755188686, 1.380923773601822], [-77.855061408179509, 0.809925034992773], [-77.668612840470416, 0.825893052570961], [-77.424984300430367, 0.395686753741117], [-76.576379767549383, 0.256935533037435], [-76.292314419240938, 0.416047268064119], [-75.801465827116587, 0.084801337073202], [-75.373223232713841, -0.15203175212045], [-75.233722703741932, -0.911416924649529], [-75.544995693652027, -1.56160979574588], [-76.635394253226707, -2.608677666843817], [-77.83790483265858, -3.003020521663103], [-78.450683966775628, -3.873096612161375], [-78.639897223612323, -4.547784112164072], [-79.205289069317715, -4.959128513207388], [-79.62497921417615, -4.454198093283494], [-80.028908047185581, -4.346090996928893], [-80.442241990872134, -4.425724379090673], [-80.46929460317692, -4.059286797708999], [-80.184014858709645, -3.821161797708043], [-80.302560594387188, -3.404856459164712]]] } }, + { "type": "Feature", "properties": { "admin": "Egypt", "name": "Egypt", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[34.9226, 29.50133], [34.64174, 29.09942], [34.42655, 28.34399], [34.15451, 27.8233], [33.92136, 27.6487], [33.58811, 27.97136], [33.13676, 28.41765], [32.42323, 29.85108], [32.32046, 29.76043], [32.73482, 28.70523], [33.34876, 27.69989], [34.10455, 26.14227], [34.47387, 25.59856], [34.79507, 25.03375], [35.69241, 23.92671], [35.49372, 23.75237], [35.52598, 23.10244], [36.69069, 22.20485], [36.86623, 22.0], [32.9, 22.0], [29.02, 22.0], [25.0, 22.0], [25.0, 25.682499996360992], [25.0, 29.238654529533452], [24.70007, 30.04419], [24.95762, 30.6616], [24.80287, 31.08929], [25.16482, 31.56915], [26.49533, 31.58568], [27.45762, 31.32126], [28.45048, 31.02577], [28.91353, 30.87005], [29.68342, 31.18686], [30.09503, 31.4734], [30.97693, 31.55586], [31.68796, 31.4296], [31.96041, 30.9336], [32.19247, 31.26034], [32.99392, 31.02407], [33.7734, 30.96746], [34.26544, 31.21936], [34.9226, 29.50133]]] } }, + { "type": "Feature", "properties": { "admin": "Eritrea", "name": "Eritrea", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[42.351560000000106, 12.54223000000013], [42.00975, 12.86582], [41.59856, 13.452090000000108], [41.15519371924983, 13.773319810435224], [40.8966, 14.118640000000138], [40.026218702969167, 14.519579169162281], [39.34061, 14.53155], [39.0994, 14.74064], [38.51295, 14.50547], [37.90607, 14.959430000000165], [37.59377, 14.2131], [36.42951, 14.42211], [36.323188917798113, 14.822480577041057], [36.753860304518575, 16.291874091044289], [36.852530000000108, 16.95655], [37.16747, 17.263140000000128], [37.904000000000103, 17.42754], [38.410089959473218, 17.998307399970312], [38.990622999839999, 16.84062612555169], [39.266110060388016, 15.922723496967246], [39.814293654140208, 15.435647284400314], [41.179274936697645, 14.491079616753209], [41.734951613132345, 13.921036892141554], [42.276830682144848, 13.34399201095442], [42.589576450375255, 13.000421250861901], [43.081226027200152, 12.699638576707112], [42.779642368344739, 12.455415757695672], [42.351560000000106, 12.54223000000013]]] } }, + { "type": "Feature", "properties": { "admin": "Spain", "name": "Spain", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[-9.034817674180244, 41.880570583659669], [-8.98443315269567, 42.592775173506261], [-9.392883673530644, 43.026624660812686], [-7.978189663108308, 43.748337714200979], [-6.754491746436754, 43.567909450853918], [-5.411886359061596, 43.574239813809669], [-4.347842779955783, 43.403449205085025], [-3.51753170410609, 43.455900783861296], [-1.901351284177764, 43.422802028978332], [-1.502770961910528, 43.034014390630425], [0.338046909190581, 42.579546006839543], [0.701590610363894, 42.795734361332599], [1.826793247087153, 42.343384711265678], [2.985998976258457, 42.473015041669854], [3.039484083680548, 41.892120266276891], [2.091841668312184, 41.226088568683082], [0.810524529635188, 41.014731960609332], [0.721331007499401, 40.678318386389229], [0.106691521819869, 40.123933620762003], [-0.278711310212941, 39.309978135732713], [0.111290724293838, 38.738514309233032], [-0.467123582349103, 38.292365831041138], [-0.683389451490598, 37.642353827457811], [-1.438382127274849, 37.443063666324214], [-2.146452602538119, 36.674144192037282], [-3.415780808923386, 36.658899644511173], [-4.368900926114718, 36.677839056946141], [-4.995219285492211, 36.32470815687963], [-5.377159796561457, 35.946850083961458], [-5.866432257500902, 36.02981659600605], [-6.236693894872174, 36.367677110330327], [-6.520190802425402, 36.942913316387312], [-7.45372555177809, 37.097787583966053], [-7.537105475281022, 37.428904323876232], [-7.166507941099863, 37.803894354802217], [-7.029281175148794, 38.075764065089757], [-7.374092169616317, 38.373058580064914], [-7.098036668313126, 39.03007274022378], [-7.498632371439724, 39.629571031241802], [-7.066591559263527, 39.711891587882768], [-7.026413133156593, 40.184524237624238], [-6.864019944679383, 40.330871893874821], [-6.851126674822551, 41.111082668617513], [-6.389087693700914, 41.381815497394641], [-6.668605515967655, 41.883386949219577], [-7.251308966490822, 41.91834605566504], [-7.422512986673794, 41.792074693359822], [-8.01317460776991, 41.790886135417118], [-8.26385698081779, 42.280468654950326], [-8.671945766626719, 42.134689439454952], [-9.034817674180244, 41.880570583659669]]] } }, + { "type": "Feature", "properties": { "admin": "Estonia", "name": "Estonia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[24.312862583114615, 57.793423570376966], [24.428927850042154, 58.383413397853275], [24.061198357853179, 58.257374579493394], [23.426560092876681, 58.612753404364618], [23.339795363058641, 59.187240302153363], [24.604214308376182, 59.465853786855007], [25.864189080516631, 59.611090399811324], [26.949135776484518, 59.445803331125767], [27.981114129353237, 59.47538808861286], [28.131699253051742, 59.300825100330904], [27.420166456824941, 58.724581203844224], [27.716685825315714, 57.791899115624354], [27.288184848751509, 57.474528306703817], [26.46353234223778, 57.476388658266316], [25.602809685984365, 57.847528794986559], [25.164593540149262, 57.970156968815175], [24.312862583114615, 57.793423570376966]]] } }, + { "type": "Feature", "properties": { "admin": "Ethiopia", "name": "Ethiopia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[37.90607, 14.959430000000165], [38.51295, 14.50547], [39.0994, 14.74064], [39.34061, 14.53155], [40.026250000000111, 14.51959], [40.8966, 14.118640000000138], [41.1552, 13.77333], [41.59856, 13.452090000000108], [42.00975, 12.86582], [42.351560000000106, 12.54223000000013], [42.000000000000107, 12.100000000000133], [41.661760000000122, 11.6312], [41.739590000000177, 11.355110000000137], [41.755570000000191, 11.05091], [42.314140000000116, 11.0342], [42.55493000000012, 11.105110000000193], [42.776851841000948, 10.926878566934416], [42.55876, 10.572580000000126], [42.92812, 10.021940000000139], [43.29699, 9.540480000000169], [43.67875, 9.183580000000116], [46.94834, 7.99688], [47.78942, 8.003], [44.9636, 5.001620000000115], [43.66087, 4.95755], [42.769670000000119, 4.252590000000223], [42.12861, 4.234130000000163], [41.855083092644108, 3.918911920483764], [41.171800000000125, 3.91909], [40.768480000000118, 4.257020000000124], [39.854940000000106, 3.83879000000013], [39.559384258765917, 3.422060000000215], [38.89251, 3.50074], [38.67114, 3.61607], [38.436970000000137, 3.58851], [38.120915000000132, 3.598605], [36.85509323800823, 4.447864127672857], [36.159078632855646, 4.447864127672857], [35.817447662353622, 4.776965663462021], [35.817447662353622, 5.338232082790852], [35.298007118233095, 5.506], [34.70702, 6.59422000000012], [34.25032, 6.82607], [34.075100000000184, 7.22595], [33.56829, 7.71334], [32.954180000000228, 7.7849700000001], [33.294800000000116, 8.35458], [33.82550000000014, 8.37916], [33.97498, 8.684560000000145], [33.96162, 9.58358], [34.25745, 10.63009], [34.73115000000012, 10.910170000000106], [34.831630000000125, 11.318960000000116], [35.26049, 12.08286], [35.863630000000164, 12.57828], [36.27022, 13.563330000000118], [36.42951, 14.42211], [37.59377, 14.2131], [37.90607, 14.959430000000165]]] } }, + { "type": "Feature", "properties": { "admin": "Finland", "name": "Finland", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[28.591929559043187, 69.064776923286644], [28.445943637818651, 68.36461294216403], [29.9774263852206, 67.698297024192641], [29.054588657352319, 66.944286200621917], [30.21765, 65.80598], [29.544429559046982, 64.948671576590471], [30.444684686003704, 64.204453436939076], [30.035872430142714, 63.552813625738544], [31.516092156711117, 62.867687486412869], [31.139991082490891, 62.357692776124395], [30.211107212044443, 61.780027777749673], [28.06999759289527, 60.503516547275829], [26.25517296723697, 60.423960679762487], [24.496623976344516, 60.057316392651636], [22.869694858499454, 59.846373196036211], [22.290763787533589, 60.391921291741525], [21.322244093519313, 60.720169989659503], [21.544866163832687, 61.705329494871783], [21.059211053153682, 62.607393296958726], [21.536029493910799, 63.189735012455863], [22.442744174903986, 63.817810370531276], [24.730511508897528, 64.902343655040823], [25.398067661243939, 65.111426500093728], [25.2940430030404, 65.53434642197044], [23.903378533633795, 66.006927395279604], [23.565879754335576, 66.396050930437411], [23.539473097434435, 67.936008612735236], [21.978534783626113, 68.616845608180682], [20.645592889089521, 69.106247260200846], [21.244936150810666, 69.370443020293067], [22.356237827247405, 68.841741441514898], [23.662049594830751, 68.891247463650529], [24.735679152126721, 68.649556789821446], [25.689212680776361, 69.092113755969024], [26.179622023226241, 69.825298977326113], [27.732292107867856, 70.164193020296239], [29.015572950971968, 69.766491197377974], [28.591929559043187, 69.064776923286644]]] } }, + { "type": "Feature", "properties": { "admin": "Fiji", "name": "Fiji", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[178.3736, -17.33992], [178.71806, -17.62846], [178.55271, -18.15059], [177.93266, -18.28799], [177.38146, -18.16432], [177.28504, -17.72465], [177.67087, -17.38114], [178.12557, -17.50481], [178.3736, -17.33992]]], [[[179.364142661964223, -16.801354076946847], [178.725059362997058, -17.012041674368017], [178.596838595117021, -16.63915], [179.096609362997128, -16.43398427754742], [179.413509362997075, -16.379054277547393], [180.000000000000114, -16.067132663642436], [180.000000000000114, -16.555216566639157], [179.364142661964223, -16.801354076946847]]], [[[-179.917369384765237, -16.501783135649358], [-180.0, -16.555216566639157], [-180.0, -16.067132663642436], [-179.793320109048551, -16.020882256741228], [-179.917369384765237, -16.501783135649358]]]] } }, + { "type": "Feature", "properties": { "admin": "Falkland Islands", "name": "Falkland Is.", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-61.2, -51.85], [-60.0, -51.25], [-59.15, -51.5], [-58.55, -51.1], [-57.75, -51.55], [-58.05, -51.9], [-59.4, -52.2], [-59.85, -51.85], [-60.7, -52.3], [-61.2, -51.85]]] } }, + { "type": "Feature", "properties": { "admin": "France", "name": "France", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-52.556424730018378, 2.504705308437053], [-52.939657151894963, 2.124857692875622], [-53.41846513529525, 2.053389187016037], [-53.554839240113481, 2.334896551925964], [-53.778520677288881, 2.376702785650053], [-54.088062506717264, 2.105556545414629], [-54.524754197799737, 2.311848863123785], [-54.271229620975781, 2.738747870286942], [-54.184284023644743, 3.194172268075234], [-54.011503872276812, 3.622569891774857], [-54.3995422023565, 4.212611395683481], [-54.478632981979203, 4.896755682795642], [-53.958044603070917, 5.756548163267808], [-53.618452928264837, 5.646529038918401], [-52.882141282754063, 5.409850979021598], [-51.823342861525916, 4.565768133966144], [-51.657797410678874, 4.156232408053028], [-52.249337531123977, 3.241094468596287], [-52.556424730018378, 2.504705308437053]]], [[[9.560016310269132, 42.152491970379558], [9.229752231491771, 41.380006822264441], [8.77572309737536, 41.583611965494427], [8.544212680707828, 42.256516628583078], [8.746009148807586, 42.628121853193946], [9.390000848028901, 43.009984849614725], [9.560016310269132, 42.152491970379558]]], [[[3.588184441755714, 50.378992418003563], [4.28602298342514, 49.90749664977254], [4.799221632515752, 49.985373033236314], [5.674051954784885, 49.529483547557433], [5.897759230176375, 49.442667141307155], [6.186320428094204, 49.463802802114444], [6.658229607783538, 49.201958319691549], [8.09927859867477, 49.017783515003366], [7.59367638513106, 48.333019110703724], [7.466759067422228, 47.620581976911851], [7.192202182655533, 47.449765529970982], [6.736571079138086, 47.541801255882874], [6.768713820023634, 47.287708238303672], [6.037388950228971, 46.725778713561894], [6.022609490593566, 46.272989813820502], [6.500099724970453, 46.429672756529428], [6.84359297041456, 45.991146552100659], [6.80235517744566, 45.708579820328673], [7.096652459347835, 45.333098863295859], [6.749955275101711, 45.028517971367584], [7.007562290076661, 44.254766750661382], [7.549596388386161, 44.127901109384808], [7.435184767291841, 43.693844916349164], [6.529245232783068, 43.12889232031835], [4.556962517931395, 43.399650987311581], [3.100410597352719, 43.075200507167118], [2.985998976258486, 42.473015041669882], [1.826793247087181, 42.343384711265649], [0.701590610363922, 42.795734361332642], [0.338046909190581, 42.57954600683955], [-1.502770961910471, 43.034014390630482], [-1.901351284177735, 43.422802028978332], [-1.384225226232956, 44.022610378590166], [-1.193797573237361, 46.014917710954862], [-2.225724249673788, 47.064362697938201], [-2.963276129559573, 47.570326646507958], [-4.491554938159481, 47.95495433205641], [-4.592349819344746, 48.68416046812694], [-3.295813971357745, 48.901692409859628], [-1.616510789384932, 48.644421291694577], [-1.933494025063254, 49.776341864615759], [-0.98946895995536, 49.347375800160869], [1.338761020522753, 50.127173163445256], [1.6390010921385, 50.9466063502975], [2.51357303224617, 51.14850617126185], [2.65842207196033, 50.796848049515646], [3.123251580425716, 50.780363267614504], [3.588184441755714, 50.378992418003563]]]] } }, + { "type": "Feature", "properties": { "admin": "Gabon", "name": "Gabon", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[11.093772820691923, -3.978826592630546], [10.066135288135738, -2.969482517105681], [9.405245395554969, -2.144313246269042], [8.797995639693168, -1.111301364754496], [8.830086704146423, -0.779073581550037], [9.048419630579586, -0.459351494960217], [9.291350538783687, 0.268666083167687], [9.492888624721981, 1.010119533691494], [9.83028405115564, 1.067893784993799], [11.285078973036461, 1.057661851400013], [11.276449008843711, 2.261050930180871], [11.751665480199787, 2.326757513839993], [12.359380323952218, 2.19281220133945], [12.951333855855605, 2.321615708826939], [13.07582238124675, 2.267097072759014], [13.003113641012074, 1.830896307783319], [13.282631463278816, 1.31418366129688], [14.026668735417214, 1.395677395021153], [14.276265903386953, 1.196929836426619], [13.843320753645653, 0.038757635901149], [14.316418491277741, -0.552627455247048], [14.425455763413593, -1.333406670744971], [14.299210239324564, -1.998275648612213], [13.992407260807706, -2.470804945489099], [13.109618767965626, -2.428740329603513], [12.575284458067639, -1.948511244315134], [12.495702752338159, -2.391688327650242], [11.820963575903189, -2.514161472181982], [11.478038771214299, -2.765618991714241], [11.855121697648114, -3.42687061932105], [11.093772820691923, -3.978826592630546]]] } }, + { "type": "Feature", "properties": { "admin": "United Kingdom", "name": "United Kingdom", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-5.661948614921896, 54.554603176483838], [-6.197884894220976, 53.867565009163329], [-6.953730231137994, 54.073702297575622], [-7.572167934591078, 54.059956366585979], [-7.366030646178785, 54.595840969452688], [-7.572167934591078, 55.131622219454883], [-6.733847011736144, 55.172860012423783], [-5.661948614921896, 54.554603176483838]]], [[[-3.00500484863528, 58.635000108466322], [-4.073828497728015, 57.55302480735525], [-3.055001796877661, 57.690019029360933], [-1.959280564776918, 57.684799709699512], [-2.219988165689301, 56.870017401753515], [-3.119003058271118, 55.97379303651546], [-2.085009324543023, 55.909998480851264], [-2.005675679673856, 55.804902850350217], [-1.11499101399221, 54.624986477265388], [-0.4304849918542, 54.464376125702145], [0.184981316742039, 53.325014146531018], [0.469976840831777, 52.929999498091959], [1.681530795914739, 52.739520168663987], [1.559987827164377, 52.099998480836], [1.050561557630914, 51.806760565795678], [1.4498653499503, 51.289427802121949], [0.550333693045502, 50.765738837275862], [-0.787517462558639, 50.774988918656206], [-2.489997524414377, 50.500018622431227], [-2.956273972984035, 50.696879991247002], [-3.617448085942327, 50.228355617872708], [-4.542507900399243, 50.341837063185658], [-5.245023159191134, 49.959999904981082], [-5.776566941745299, 50.159677639356815], [-4.309989793301837, 51.210001125689146], [-3.414850633142122, 51.426008612669236], [-3.422719467108322, 51.426848167406078], [-4.984367234710873, 51.593466091510962], [-5.267295701508885, 51.991400458374571], [-4.222346564134852, 52.30135569926135], [-4.770013393564112, 52.840004991255611], [-4.579999152026914, 53.495003770555165], [-3.093830673788658, 53.404547400669671], [-3.092079637047106, 53.404440822963544], [-2.945008510744343, 53.98499970154667], [-3.614700825433033, 54.60093677329256], [-3.63000545898933, 54.615012925833], [-4.844169073903003, 54.790971177786837], [-5.082526617849224, 55.061600653699358], [-4.719112107756643, 55.508472601943467], [-5.047980922862108, 55.783985500707516], [-5.586397670911139, 55.311146145236805], [-5.64499874513018, 56.275014960344791], [-6.149980841486352, 56.785009670633528], [-5.78682471355529, 57.818848375064633], [-5.009998745127574, 58.630013332750039], [-4.211494513353555, 58.550845038479153], [-3.00500484863528, 58.635000108466322]]]] } }, + { "type": "Feature", "properties": { "admin": "Georgia", "name": "Georgia", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[41.55408410011065, 41.535656236327561], [41.703170607272703, 41.962942816732912], [41.453470086438379, 42.645123399417926], [40.875469191253785, 43.013628038091277], [40.321394484220313, 43.128633938156831], [39.955008579270917, 43.434997666999216], [40.07696495947976, 43.553104153002309], [40.922184686045618, 43.38215851498078], [42.394394565608806, 43.220307929042619], [43.756016880067378, 42.74082815202248], [43.931199985536828, 42.554973863284758], [44.537622918481979, 42.71199270280362], [45.470279168485703, 42.502780666669963], [45.776410353382758, 42.09244395605635], [46.404950799348818, 41.860675157227298], [46.145431756379004, 41.722802435872573], [46.637908156120574, 41.181672675128219], [46.501637404166921, 41.064444688474104], [45.962600538930381, 41.123872585609767], [45.217426385281577, 41.411451931314041], [44.972480096218071, 41.248128567055588], [43.582745802592726, 41.09214325618256], [42.619548781104484, 41.583172715819934], [41.55408410011065, 41.535656236327561]]] } }, + { "type": "Feature", "properties": { "admin": "Ghana", "name": "Ghana", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[1.060121697604927, 5.928837388528875], [-0.507637905265938, 5.343472601742675], [-1.063624640294193, 5.000547797053811], [-1.964706590167594, 4.71046214438337], [-2.856125047202397, 4.994475816259508], [-2.810701463217839, 5.389051215024109], [-3.244370083011261, 6.2504715031135], [-2.983584967450326, 7.379704901555511], [-2.56218950032624, 8.219627793811481], [-2.827496303712706, 9.642460842319775], [-2.963896246747111, 10.395334784380081], [-2.94040930827046, 10.962690334512557], [-1.203357713211431, 11.009819240762736], [-0.761575893548183, 10.936929633015053], [-0.438701544588582, 11.09834096927872], [0.023802524423701, 11.018681748900802], [-0.049784715159944, 10.706917832883928], [0.367579990245389, 10.191212876827176], [0.365900506195885, 9.46500397382948], [0.461191847342121, 8.677222601756013], [0.712029249686878, 8.312464504423827], [0.490957472342245, 7.411744289576474], [0.570384148774849, 6.914358628767188], [0.836931186536333, 6.279978745952147], [1.060121697604927, 5.928837388528875]]] } }, + { "type": "Feature", "properties": { "admin": "Guinea", "name": "Guinea", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-8.439298468448696, 7.686042792181736], [-8.722123582382123, 7.711674302598509], [-8.926064622422002, 7.309037380396375], [-9.208786383490844, 7.313920803247952], [-9.403348151069748, 7.526905218938906], [-9.33727983238458, 7.928534450711351], [-9.755342169625832, 8.541055202666923], [-10.016566534861253, 8.42850393313523], [-10.230093553091276, 8.406205552601291], [-10.505477260774667, 8.348896389189603], [-10.494315151399629, 8.715540676300433], [-10.65477047366589, 8.977178452994194], [-10.622395188835037, 9.267910061068276], [-10.839151984083299, 9.688246161330367], [-11.117481248407328, 10.045872911006283], [-11.917277390988655, 10.046983954300556], [-12.150338100625003, 9.858571682164378], [-12.425928514037562, 9.835834051955953], [-12.596719122762206, 9.620188300001969], [-12.711957566773076, 9.342711696810765], [-13.246550258832512, 8.903048610871506], [-13.685153977909788, 9.494743760613458], [-14.074044969122278, 9.886166897008248], [-14.330075852912367, 10.015719712763966], [-14.579698859098254, 10.214467271358513], [-14.693231980843501, 10.65630076745404], [-14.83955379887794, 10.876571560098139], [-15.130311245168167, 11.040411688679525], [-14.685687221728896, 11.527823798056485], [-14.382191534878727, 11.509271958863691], [-14.121406419317776, 11.677117010947693], [-13.900799729863772, 11.678718980348744], [-13.743160773157411, 11.811269029177408], [-13.828271857142122, 12.142644151249041], [-13.718743658899511, 12.247185573775507], [-13.700476040084322, 12.586182969610192], [-13.217818162478235, 12.575873521367964], [-12.499050665730561, 12.332089952031053], [-12.278599005573438, 12.354440008997285], [-12.20356482588563, 12.465647691289401], [-11.658300950557928, 12.386582749882834], [-11.513942836950587, 12.442987575729415], [-11.456168585648269, 12.076834214725336], [-11.297573614944508, 12.077971096235768], [-11.036555955438256, 12.211244615116513], [-10.870829637078211, 12.177887478072106], [-10.593223842806278, 11.923975328005977], [-10.165213792348835, 11.844083563682743], [-9.890992804392011, 12.060478623904968], [-9.567911749703212, 12.194243068892472], [-9.327616339546008, 12.334286200403451], [-9.127473517279581, 12.308060411015331], [-8.905264858424529, 12.088358059126433], [-8.786099005559462, 11.812560939984705], [-8.376304897484911, 11.393645941610627], [-8.581305304386772, 11.136245632364801], [-8.620321010767126, 10.810890814655181], [-8.407310756860026, 10.90925690352276], [-8.282357143578279, 10.792597357623842], [-8.335377163109738, 10.494811916541932], [-8.029943610048617, 10.206534939001711], [-8.22933712404682, 10.129020290563897], [-8.309616461612249, 9.789531968622439], [-8.079113735374348, 9.376223863152033], [-7.832100389019186, 8.575704250518625], [-8.203498907900878, 8.455453192575446], [-8.299048631208562, 8.316443589710302], [-8.221792364932197, 8.123328762235571], [-8.280703497744936, 7.687179673692156], [-8.439298468448696, 7.686042792181736]]] } }, + { "type": "Feature", "properties": { "admin": "Gambia", "name": "Gambia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-16.84152462408127, 13.151393947802557], [-16.713728807023468, 13.594958604379853], [-15.624596320039936, 13.623587347869556], [-15.398770310924457, 13.860368760630916], [-15.081735398813816, 13.876491807505982], [-14.687030808968483, 13.63035696049978], [-14.376713833055785, 13.625680243377371], [-14.046992356817478, 13.794067898000446], [-13.844963344772404, 13.505041612191999], [-14.277701788784553, 13.28058502853224], [-14.712197231494626, 13.298206691943774], [-15.141163295949463, 13.509511623585235], [-15.511812506562931, 13.278569647672864], [-15.691000535534991, 13.270353094938455], [-15.931295945692208, 13.130284125211331], [-16.84152462408127, 13.151393947802557]]] } }, + { "type": "Feature", "properties": { "admin": "Guinea Bissau", "name": "Guinea-Bissau", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-15.130311245168167, 11.040411688679525], [-15.664180467175523, 11.458474025920792], [-16.085214199273562, 11.524594021038236], [-16.314786749730199, 11.806514797406548], [-16.308947312881227, 11.958701890506116], [-16.613838263403277, 12.170911159712698], [-16.67745195155457, 12.38485158940105], [-16.147716844130581, 12.547761542201185], [-15.816574266004251, 12.515567124883345], [-15.548476935274005, 12.628170070847343], [-13.700476040084322, 12.586182969610192], [-13.718743658899511, 12.247185573775507], [-13.828271857142122, 12.142644151249041], [-13.743160773157411, 11.811269029177408], [-13.900799729863772, 11.678718980348744], [-14.121406419317776, 11.677117010947693], [-14.382191534878727, 11.509271958863691], [-14.685687221728896, 11.527823798056485], [-15.130311245168167, 11.040411688679525]]] } }, + { "type": "Feature", "properties": { "admin": "Equatorial Guinea", "name": "Eq. Guinea", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[9.492888624721981, 1.010119533691494], [9.305613234096255, 1.160911363119183], [9.649158155972627, 2.283866075037735], [11.276449008843711, 2.261050930180871], [11.285078973036461, 1.057661851400013], [9.83028405115564, 1.067893784993799], [9.492888624721981, 1.010119533691494]]] } }, + { "type": "Feature", "properties": { "admin": "Greece", "name": "Greece", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[23.699980096133, 35.705004380835526], [24.246665073348673, 35.368022365860149], [25.025015496528873, 35.424995632461979], [25.769207797964182, 35.354018052709073], [25.745023227651579, 35.179997666966209], [26.290002882601719, 35.299990342747911], [26.164997592887651, 35.004995429009789], [24.724982130642299, 34.919987697889603], [24.735007358506941, 35.084990546197581], [23.514978468528106, 35.27999156345097], [23.699980096133, 35.705004380835526]]], [[[26.604195590936282, 41.562114569661098], [26.294602085075777, 40.936261298174244], [26.056942172965499, 40.824123440100827], [25.44767703624418, 40.852545477861455], [24.925848422960932, 40.947061672523226], [23.714811232200809, 40.687129218095116], [24.407998894964063, 40.124992987624083], [23.89996788910258, 39.962005520175573], [23.342999301860797, 39.960997829745786], [22.813987664488959, 40.476005153966547], [22.626298862404777, 40.256561184239175], [22.849747755634805, 39.659310818025759], [23.350027296652595, 39.190011298167256], [22.97309939951554, 38.97090322524965], [23.53001631032495, 38.51000112563846], [24.025024855248937, 38.219992987616443], [24.040011020613601, 37.655014553369419], [23.115002882589145, 37.920011298162215], [23.409971958111065, 37.409990749657389], [22.77497195810863, 37.305010077456551], [23.154225294698612, 36.422505804992042], [22.4900281104511, 36.410000108377446], [21.670026482843692, 36.84498647719419], [21.295010613701574, 37.644989325504689], [21.120034213961329, 38.31032339126272], [20.730032179454579, 38.769985256498778], [20.217712029712853, 39.340234686839629], [20.150015903410516, 39.624997666984022], [20.615000441172779, 40.110006822259422], [20.67499677906363, 40.434999904943048], [20.999989861747274, 40.580003973953964], [21.020040317476422, 40.842726955725873], [21.674160597426969, 40.931274522457976], [22.055377638444266, 41.149865831052686], [22.597308383889008, 41.130487168943198], [22.76177, 41.3048], [22.952377150166562, 41.337993882811212], [23.692073601992455, 41.309080918943849], [24.492644891058031, 41.583896185872035], [25.19720136892553, 41.234485988930651], [26.106138136507177, 41.328898830727823], [26.11704186372091, 41.826904608724725], [26.604195590936282, 41.562114569661098]]]] } }, + { "type": "Feature", "properties": { "admin": "Greenland", "name": "Greenland", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-46.76379, 82.62796], [-43.40644, 83.22516], [-39.89753, 83.18018], [-38.62214, 83.54905], [-35.08787, 83.64513], [-27.10046, 83.51966], [-20.84539, 82.72669], [-22.69182, 82.34165], [-26.51753, 82.29765], [-31.9, 82.2], [-31.39646, 82.02154], [-27.85666, 82.13178], [-24.84448, 81.78697], [-22.90328, 82.09317], [-22.07175, 81.73449], [-23.16961, 81.15271], [-20.62363, 81.52462], [-15.76818, 81.91245], [-12.77018, 81.71885], [-12.20855, 81.29154], [-16.28533, 80.58004], [-16.85, 80.35], [-20.04624, 80.17708], [-17.73035, 80.12912], [-18.9, 79.4], [-19.70499, 78.75128], [-19.67353, 77.63859], [-18.47285, 76.98565], [-20.03503, 76.94434], [-21.67944, 76.62795], [-19.83407, 76.09808], [-19.59896, 75.24838], [-20.66818, 75.15585], [-19.37281, 74.29561], [-21.59422, 74.22382], [-20.43454, 73.81713], [-20.76234, 73.46436], [-22.17221, 73.30955], [-23.56593, 73.30663], [-22.31311, 72.62928], [-22.29954, 72.18409], [-24.27834, 72.59788], [-24.79296, 72.3302], [-23.44296, 72.08016], [-22.13281, 71.46898], [-21.75356, 70.66369], [-23.53603, 70.471], [-24.30702, 70.85649], [-25.54341, 71.43094], [-25.20135, 70.75226], [-26.36276, 70.22646], [-23.72742, 70.18401], [-22.34902, 70.12946], [-25.02927, 69.2588], [-27.74737, 68.47046], [-30.67371, 68.12503], [-31.77665, 68.12078], [-32.81105, 67.73547], [-34.20196, 66.67974], [-36.35284, 65.9789], [-37.04378, 65.93768], [-38.37505, 65.69213], [-39.81222, 65.45848], [-40.66899, 64.83997], [-40.68281, 64.13902], [-41.1887, 63.48246], [-42.81938, 62.68233], [-42.41666, 61.90093], [-42.86619, 61.07404], [-43.3784, 60.09772], [-44.7875, 60.03676], [-46.26364, 60.85328], [-48.26294, 60.85843], [-49.23308, 61.40681], [-49.90039, 62.38336], [-51.63325, 63.62691], [-52.14014, 64.27842], [-52.27659, 65.1767], [-53.66166, 66.09957], [-53.30161, 66.8365], [-53.96911, 67.18899], [-52.9804, 68.35759], [-51.47536, 68.72958], [-51.08041, 69.14781], [-50.87122, 69.9291], [-52.013585, 69.574925], [-52.55792, 69.42616], [-53.45629, 69.283625], [-54.68336, 69.61003], [-54.75001, 70.28932], [-54.35884, 70.821315], [-53.431315, 70.835755], [-51.39014, 70.56978], [-53.10937, 71.20485], [-54.00422, 71.54719], [-55.0, 71.406536967272558], [-55.83468, 71.65444], [-54.71819, 72.58625], [-55.32634, 72.95861], [-56.12003, 73.64977], [-57.32363, 74.71026], [-58.59679, 75.09861], [-58.58516, 75.51727], [-61.26861, 76.10238], [-63.39165, 76.1752], [-66.06427, 76.13486], [-68.50438, 76.06141], [-69.66485, 76.37975], [-71.40257, 77.00857], [-68.77671, 77.32312], [-66.76397, 77.37595], [-71.04293, 77.63595], [-73.297, 78.04419], [-73.15938, 78.43271], [-69.37345, 78.91388], [-65.7107, 79.39436], [-65.3239, 79.75814], [-68.02298, 80.11721], [-67.15129, 80.51582], [-63.68925, 81.21396], [-62.23444, 81.3211], [-62.65116, 81.77042], [-60.28249, 82.03363], [-57.20744, 82.19074], [-54.13442, 82.19962], [-53.04328, 81.88833], [-50.39061, 82.43883], [-48.00386, 82.06481], [-46.59984, 81.985945], [-44.523, 81.6607], [-46.9007, 82.19979], [-46.76379, 82.62796]]] } }, + { "type": "Feature", "properties": { "admin": "Guatemala", "name": "Guatemala", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-90.095554572290951, 13.73533763270073], [-90.608624030300817, 13.909771429901948], [-91.232410244496037, 13.927832342987953], [-91.689746670279106, 14.126218166556452], [-92.227750006869812, 14.538828640190925], [-92.203229539747298, 14.830102850804066], [-92.087215949252041, 15.064584662328436], [-92.229248623406249, 15.251446641495857], [-91.747960171255912, 16.066564846251719], [-90.464472622422647, 16.069562079324651], [-90.438866950222021, 16.410109768128091], [-90.600846727240906, 16.470777899638758], [-90.711821865587694, 16.687483018454724], [-91.081670091500641, 16.918476670799404], [-91.453921271515128, 17.252177232324168], [-91.002269253284197, 17.254657701074176], [-91.001519945015943, 17.817594916245707], [-90.067933519230948, 17.819326076727474], [-89.143080410503302, 17.808318996649316], [-89.15080603713092, 17.015576687075832], [-89.229121670269265, 15.886937567605166], [-88.930612759135244, 15.887273464415072], [-88.604586147805833, 15.706380113177358], [-88.518364020526846, 15.855389105690971], [-88.22502275262201, 15.727722479713901], [-88.680679694355618, 15.346247056535301], [-89.15481096063354, 15.066419175674806], [-89.225220099631244, 14.874286200413618], [-89.145535041037149, 14.67801911056908], [-89.353325975282772, 14.424132798719112], [-89.587342698916544, 14.362586167859485], [-89.5342193265205, 14.244815578666302], [-89.7219339668207, 14.134228013561694], [-90.064677903996568, 13.881969509328924], [-90.095554572290951, 13.73533763270073]]] } }, + { "type": "Feature", "properties": { "admin": "Guyana", "name": "Guyana", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-59.758284878159181, 8.367034816924045], [-59.10168412945864, 7.99920197187049], [-58.482962205628041, 7.347691351750696], [-58.454876064677414, 6.832787380394463], [-58.078103196837361, 6.809093736188641], [-57.542218593970631, 6.321268215353355], [-57.147436489476874, 5.973149929219161], [-57.307245856339492, 5.073566595882225], [-57.914288906472123, 4.812626451024413], [-57.860209520078691, 4.576801052260449], [-58.044694383360664, 4.060863552258382], [-57.601568976457848, 3.334654649260684], [-57.281433478409703, 3.333491929534119], [-57.150097825739898, 2.768926906745406], [-56.53938574891454, 1.89952260986692], [-56.782704230360814, 1.863710842288653], [-57.33582292339689, 1.948537705895759], [-57.660971035377358, 1.682584947105638], [-58.113449876525003, 1.507195135907025], [-58.429477098205957, 1.46394196207872], [-58.540012986878288, 1.26808828369252], [-59.030861579002639, 1.317697658692722], [-59.646043667221242, 1.786893825686789], [-59.718545701726732, 2.249630438644359], [-59.974524909084543, 2.755232652188055], [-59.815413174057852, 3.606498521332085], [-59.538039923731219, 3.958802598481937], [-59.767405768458701, 4.423502915866606], [-60.111002366767373, 4.574966538914082], [-59.980958624904865, 5.014061184098138], [-60.213683437731319, 5.2444863956876], [-60.733574184803707, 5.2002772078619], [-61.410302903881941, 5.959068101419616], [-61.139415045807937, 6.234296779806142], [-61.159336310456467, 6.696077378766317], [-60.543999192940966, 6.856584377464881], [-60.295668097562377, 7.043911444522918], [-60.637972785063752, 7.414999904810853], [-60.550587938058186, 7.779602972846178], [-59.758284878159181, 8.367034816924045]]] } }, + { "type": "Feature", "properties": { "admin": "Honduras", "name": "Honduras", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-87.316654425795463, 12.984685777229], [-87.48940873894712, 13.29753489832393], [-87.793111131526501, 13.384480495655165], [-87.723502977229288, 13.785050360565602], [-87.859515347021599, 13.893312486217097], [-88.065342576840109, 13.964625962779788], [-88.503997972349609, 13.845485948130939], [-88.541230841815931, 13.98015473068352], [-88.843072882832743, 14.140506700085208], [-89.058511929057644, 14.340029405164213], [-89.353325975282786, 14.424132798719084], [-89.145535041037164, 14.678019110569149], [-89.22522009963123, 14.874286200413675], [-89.154810960633526, 15.066419175674863], [-88.680679694355575, 15.346247056535386], [-88.225022752621925, 15.727722479714027], [-88.121153123715359, 15.688655096901355], [-87.901812506852394, 15.864458319558194], [-87.615680101252309, 15.878798529519198], [-87.522920905288444, 15.797278957578779], [-87.367762417332116, 15.846940009011286], [-86.903191291028165, 15.756712958229565], [-86.440945604177372, 15.782835394753189], [-86.119233974944322, 15.893448798073958], [-86.00195431185783, 16.005405788634388], [-85.68331743034625, 15.953651841693949], [-85.444003872402547, 15.885749009662444], [-85.182443610357183, 15.909158433490628], [-84.98372188997881, 15.995923163308698], [-84.526979743167118, 15.857223619037423], [-84.36825558138257, 15.835157782448729], [-84.063054572266807, 15.648244126849132], [-83.773976610026111, 15.42407176356687], [-83.410381232420363, 15.27090281825377], [-83.147219000974104, 14.995829169164207], [-83.489988776366005, 15.01626719813566], [-83.628584967772866, 14.880073960830368], [-83.975721401693576, 14.749435939996483], [-84.228341640952394, 14.748764146376626], [-84.449335903648588, 14.62161428472251], [-84.64958207877963, 14.666805324761865], [-84.820036790694289, 14.819586696832628], [-84.924500698572302, 14.790492865452332], [-85.052787441736868, 14.551541042534719], [-85.148750576502877, 14.560196844943615], [-85.165364549484806, 14.354369615125048], [-85.514413011400265, 14.079011745657905], [-85.698665330736944, 13.960078436737998], [-85.801294725268505, 13.8360549992376], [-86.096263800790595, 14.03818736414723], [-86.312142096689826, 13.771356106008223], [-86.520708177419891, 13.778487453664464], [-86.755086636079596, 13.754845485890936], [-86.733821784191463, 13.263092556201398], [-86.880557013684353, 13.254204209847213], [-87.005769009127434, 13.025794379117254], [-87.316654425795463, 12.984685777229]]] } }, + { "type": "Feature", "properties": { "admin": "Croatia", "name": "Croatia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[18.829838087650039, 45.908877671891837], [19.072768995854172, 45.521511135432078], [19.390475701584588, 45.236515611342369], [19.005486281010118, 44.860233669609144], [18.553214145591646, 45.08158966733145], [17.861783481526398, 45.067740383477137], [17.00214603035101, 45.233776760430935], [16.534939406000202, 45.211607570977705], [16.318156772535868, 45.004126695325901], [15.959367303133373, 45.233776760430935], [15.750026075918978, 44.81871165626255], [16.239660271884528, 44.351143296885695], [16.456442905348862, 44.041239732431265], [16.916156447017325, 43.667722479825663], [17.297373488034449, 43.446340643887353], [17.674921502358981, 43.028562527023603], [18.56, 42.65], [18.450016310304814, 42.47999136002931], [17.509970330483323, 42.84999461523914], [16.930005730871638, 43.209998480800373], [16.015384555737679, 43.507215481127204], [15.174453973052094, 44.243191229827907], [15.376250441151793, 44.317915350922064], [14.920309279040504, 44.73848399512945], [14.901602410550874, 45.076060289076104], [14.258747592839992, 45.233776760430935], [13.952254672917032, 44.802123521496853], [13.65697553880119, 45.136935126315947], [13.679403110415816, 45.484149074884996], [13.715059848697248, 45.500323798192419], [14.411968214585496, 45.466165676447403], [14.595109490627916, 45.63494090431282], [14.935243767972961, 45.471695054702757], [15.327674594797424, 45.452316392593325], [15.323953891672428, 45.731782538427687], [15.671529575267638, 45.8341535507979], [15.768732944408608, 46.23810822202352], [16.564808383864939, 46.503750922219794], [16.882515089595412, 46.380631822284428], [17.630066359129554, 45.951769110694087], [18.456062452882858, 45.759481106136143], [18.829838087650039, 45.908877671891837]]] } }, + { "type": "Feature", "properties": { "admin": "Haiti", "name": "Haiti", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-73.189790615517595, 19.915683905511909], [-72.579672817663607, 19.871500555902351], [-71.71236141629295, 19.714455878167353], [-71.624873216422813, 19.169837958243303], [-71.701302659782485, 18.785416978424049], [-71.945112067335543, 18.616900132720257], [-71.687737596305865, 18.316660061104468], [-71.708304816358037, 18.044997056546091], [-72.372476162389333, 18.214960842354053], [-72.844411180294856, 18.145611070218362], [-73.454554816365018, 18.217906398994696], [-73.922433234335642, 18.030992743395], [-74.458033616824764, 18.342549953682703], [-74.369925299767118, 18.664907538319408], [-73.449542202432696, 18.526052964751141], [-72.694937099890623, 18.445799465401858], [-72.334881557896992, 18.66842153571525], [-72.791649542924873, 19.101625067618027], [-72.784104783810264, 19.483591416903405], [-73.41502234566174, 19.639550889560276], [-73.189790615517595, 19.915683905511909]]] } }, + { "type": "Feature", "properties": { "admin": "Hungary", "name": "Hungary", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[16.202298211337361, 46.852385972676949], [16.534267612380372, 47.496170966169103], [16.340584344150411, 47.712901923201215], [16.903754103267257, 47.714865627628321], [16.979666782304033, 48.123497015976298], [17.488472934649813, 47.867466132186209], [17.857132602620023, 47.758428860050365], [18.696512892336923, 47.88095368101439], [18.777024773847668, 48.081768296900627], [19.174364861739885, 48.111378892603859], [19.66136355965849, 48.266614895208647], [19.769470656013109, 48.2026911484636], [20.239054396249344, 48.327567247096916], [20.473562045989862, 48.562850043321809], [20.801293979584919, 48.62385407164237], [21.872236362401729, 48.319970811550007], [22.085608351334848, 48.422264309271782], [22.640819939878746, 48.150239569687351], [22.710531447040488, 47.882193915389394], [22.09976769378283, 47.672439276716695], [21.626514926853869, 46.994237779318148], [21.021952345471245, 46.316087958351886], [20.220192498462833, 46.127468980486547], [19.596044549241579, 46.171729844744533], [18.829838087649957, 45.908877671891915], [18.456062452882858, 45.759481106136121], [17.630066359129554, 45.95176911069418], [16.882515089595298, 46.380631822284428], [16.564808383864854, 46.503750922219822], [16.370504998447412, 46.841327216166498], [16.202298211337361, 46.852385972676949]]] } }, + { "type": "Feature", "properties": { "admin": "Indonesia", "name": "Indonesia", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[120.715608758630438, -10.239581394087862], [120.295014276206871, -10.258649997603525], [118.967808465654684, -9.55796925215803], [119.900309686361609, -9.361340427287514], [120.425755649905398, -9.665921319215796], [120.775501743656719, -9.969675388227456], [120.715608758630438, -10.239581394087862]]], [[[124.435950148619384, -10.14000090906144], [123.579981724136701, -10.359987481327961], [123.459989048354998, -10.239994805546171], [123.55000939340745, -9.900015557497978], [123.980008986508096, -9.290026950724693], [124.96868248911619, -8.892790215697046], [125.070019972840612, -9.089987481322835], [125.088520135601073, -9.393173109579321], [124.435950148619384, -10.14000090906144]]], [[[117.900018345207741, -8.095681247594923], [118.260616489740471, -8.362383314653327], [118.87845991422212, -8.280682875199828], [119.126506789223086, -8.705824883665072], [117.97040164598927, -8.906639499551257], [117.277730747549015, -9.040894870645557], [116.74014082241662, -9.032936700072637], [117.083737420725313, -8.457157891476539], [117.632024367342126, -8.44930307376819], [117.900018345207741, -8.095681247594923]]], [[[122.903537225436082, -8.094234307490735], [122.756982863456287, -8.649807631060638], [121.2544905945701, -8.933666273639941], [119.924390903809567, -8.810417982623873], [119.920928582846102, -8.44485890059107], [120.715091994307542, -8.236964613480863], [121.341668735846554, -8.53673959720602], [122.007364536630405, -8.46062021244016], [122.903537225436082, -8.094234307490735]]], [[[108.623478631628927, -6.777673841990675], [110.539227329553285, -6.877357679881682], [110.759575636845909, -6.465186455921751], [112.614811232556349, -6.946035658397589], [112.978768345188087, -7.594213148634578], [114.478935174621142, -7.776527601760277], [115.705526971501058, -8.370806573116864], [114.564511346496488, -8.75181690840483], [113.464733514460875, -8.348947442257424], [112.559672479301028, -8.376180922075163], [111.522061395312448, -8.302128594600957], [110.586149530074294, -8.122604668819021], [109.427667270955183, -7.740664157749761], [108.693655226681301, -7.641600437046219], [108.277763299596302, -7.766657403192579], [106.454102004016136, -7.354899590690947], [106.280624220812285, -6.924899997590201], [105.365486281355516, -6.851416110871169], [106.051645949327053, -5.895918877794499], [107.265008579540165, -5.954985039904058], [108.072091099074683, -6.345762220895237], [108.486846144649235, -6.421984958525768], [108.623478631628927, -6.777673841990675]]], [[[134.724624465066654, -6.214400730009286], [134.210133905168902, -6.895237725454704], [134.112775506730998, -6.142467136259014], [134.290335728085779, -5.783057549669038], [134.499625278867882, -5.445042006047898], [134.727001580952106, -5.737582289252158], [134.724624465066654, -6.214400730009286]]], [[[127.249215122588893, -3.459065036638889], [126.874922723498855, -3.790982761249579], [126.183802118027302, -3.607376397316556], [125.989033644719257, -3.177273451351325], [127.00065148326496, -3.12931772218441], [127.249215122588893, -3.459065036638889]]], [[[130.471344028851775, -3.09376433676762], [130.834836053592767, -3.858472181822761], [129.990546502808115, -3.446300957862817], [129.155248651242403, -3.362636813982248], [128.590683628453633, -3.428679294451256], [127.898891229362334, -3.393435967628192], [128.135879347852779, -2.843650404474914], [129.370997756060888, -2.802154229344551], [130.471344028851775, -3.09376433676762]]], [[[134.143367954647772, -1.151867364103594], [134.422627394753022, -2.769184665542383], [135.457602980694674, -3.367752780779113], [136.293314243718754, -2.30704233155609], [137.4407377463275, -1.703513278819372], [138.329727411044757, -1.70268645590265], [139.18492068904294, -2.051295668143637], [139.926684198160387, -2.409051608900284], [141.000210402591847, -2.600151055515624], [141.017056919519007, -5.85902190513802], [141.033851760013874, -9.117892754760417], [140.143415155192542, -8.297167657100955], [139.127766554928087, -8.096042982620942], [138.881476678624949, -8.380935153846094], [137.614473911692812, -8.41168263105976], [138.039099155835174, -7.597882175327354], [138.668621454014783, -7.320224704623072], [138.407913853102343, -6.232849216337483], [137.927839797110835, -5.393365573755998], [135.989250116113453, -4.546543877789047], [135.164597609599667, -4.462931410340771], [133.662880487197867, -3.538853448097526], [133.367704705946778, -4.024818617370314], [132.983955519747326, -4.112978610860281], [132.75694095268895, -3.746282647317129], [132.753788690319197, -3.311787204607071], [131.989804315316178, -2.820551039240455], [133.066844517143466, -2.460417982598443], [133.780030959203486, -2.479848321140209], [133.69621178602614, -2.214541517753687], [132.232373488494204, -2.212526136894325], [131.836221958544684, -1.617161960459597], [130.942839797082797, -1.432522067880796], [130.519558140180038, -0.937720228686075], [131.867537876513609, -0.695461114101818], [132.380116408416768, -0.369537855636977], [133.985548130428384, -0.780210463060442], [134.143367954647772, -1.151867364103594]]], [[[125.240500522971573, 1.419836127117605], [124.43703535369734, 0.427881171058971], [123.685504998876695, 0.235593166500877], [122.723083123872854, 0.431136786293337], [121.056724888189081, 0.381217352699451], [120.18308312386273, 0.23724681233422], [120.040869582195455, -0.519657891444851], [120.935905389490699, -1.408905938323372], [121.475820754076167, -0.955962009285116], [123.34056481332847, -0.615672702643081], [123.258399285984481, -1.076213067228337], [122.822715285331597, -0.930950616055881], [122.388529901215364, -1.516858005381124], [121.508273553555455, -1.904482924002422], [122.454572381684272, -3.186058444840881], [122.271896193532541, -3.529500013852696], [123.170962762546537, -4.683693129091707], [123.162332798353759, -5.34060393638596], [122.628515252778683, -5.634591159694494], [122.236394484548057, -5.282933037948281], [122.71956912647704, -4.46417164471579], [121.738233677254357, -4.851331475446499], [121.48946333220124, -4.574552504091215], [121.619171177253861, -4.188477878438674], [120.898181593917684, -3.602105401222828], [120.972388950688767, -2.627642917494909], [120.305452915529884, -2.931603692235725], [120.39004723519173, -4.097579034037223], [120.430716587405371, -5.528241062037778], [119.796543410319487, -5.67340016034565], [119.36690555224493, -5.379878024927804], [119.653606398600104, -4.459417412944958], [119.498835483885969, -3.49441171632651], [119.078344354326987, -3.487021986508764], [118.767768996252869, -2.801999200047688], [119.180973748858662, -2.147103773612798], [119.323393996255049, -1.35314706788047], [119.825998976725828, 0.154254462073496], [120.035701938966341, 0.566477362465804], [120.885779250167687, 1.309222723796835], [121.666816847826965, 1.013943589681076], [122.927566766451818, 0.875192368977465], [124.077522414242836, 0.917101955566139], [125.065989211121803, 1.643259182131558], [125.240500522971573, 1.419836127117605]]], [[[128.688248732620707, 1.132385972494106], [128.635952183141342, 0.258485826006179], [128.120169712436166, 0.356412665199286], [127.968034295768845, -0.252077325037533], [128.379998813999691, -0.780003757331286], [128.100015903842291, -0.899996433112974], [127.69647464407501, -0.266598402511505], [127.399490187693743, 1.011721503092573], [127.600511509309044, 1.81069082275718], [127.932377557487484, 2.174596258956555], [128.004156121940809, 1.628531398928331], [128.594559360875451, 1.540810655112864], [128.688248732620707, 1.132385972494106]]], [[[117.875627069166001, 1.827640692548911], [118.996747267738158, 0.902219143066048], [117.811858351717788, 0.784241848143722], [117.478338657706047, 0.102474676917026], [117.521643507966587, -0.803723239753211], [116.560048455879496, -1.487660821136231], [116.533796828275158, -2.483517347832901], [116.148083937648607, -4.012726332214014], [116.000857782049067, -3.657037448749008], [114.864803094544513, -4.106984144714416], [114.468651564595064, -3.49570362713382], [113.755671828264099, -3.439169610206519], [113.256994256647545, -3.118775729996854], [112.068126255340644, -3.478392022316071], [111.703290643359992, -2.994442233902631], [111.04824018762821, -3.049425957861188], [110.223846063275971, -2.934032484553483], [110.070935500124335, -1.592874037282414], [109.571947869914041, -1.314906507984489], [109.091873813922518, -0.459506524257051], [108.952657505328162, 0.415375474444346], [109.069136183714036, 1.341933905437642], [109.663260125773718, 2.006466986494984], [109.830226678508836, 1.338135687664191], [110.514060907027101, 0.773131415200993], [111.159137811326559, 0.976478176269509], [111.797548455860408, 0.904441229654651], [112.380251906383648, 1.410120957846757], [112.859809198052176, 1.497790025229946], [113.805849644019531, 1.217548732911041], [114.621355422017473, 1.430688177898886], [115.134037306785231, 2.821481838386219], [115.51907840379198, 3.169238389494395], [115.86551720587677, 4.306559149590156], [117.01521447150634, 4.306094061699468], [117.882034946770162, 4.137551377779487], [117.313232456533513, 3.234428208830578], [118.048329705885351, 2.287690131027361], [117.875627069166001, 1.827640692548911]]], [[[105.817655063909356, -5.852355645372411], [104.710384149191498, -5.873284600450644], [103.868213332130736, -5.037314955264974], [102.584260695406897, -4.220258884298203], [102.156173130300999, -3.614146009946765], [101.399113397225051, -2.799777113459171], [100.902502882900137, -2.05026213949786], [100.141980828860596, -0.650347588710957], [99.26373986206022, 0.183141587724663], [98.970011020913319, 1.042882391764536], [98.601351352943084, 1.823506577965616], [97.699597609449881, 2.453183905442116], [97.17694217324987, 3.30879059489861], [96.424016554757316, 3.86885976807791], [95.380876092513475, 4.970782172053673], [95.293026157617305, 5.479820868344816], [95.936862827541745, 5.439513251157108], [97.484882033277088, 5.24632090903401], [98.369169142655679, 4.268370266126366], [99.142558628335792, 3.590349636240915], [99.693997837322399, 3.174328518075156], [100.641433546961665, 2.099381211755798], [101.658012323007313, 2.083697414555189], [102.498271112073212, 1.398700466310217], [103.076840448013002, 0.561361395668854], [103.838396030698348, 0.104541734208666], [103.437645298274973, -0.711945896002845], [104.010788608824001, -1.059211521004229], [104.369991489684878, -1.084843031421016], [104.539490187602155, -1.782371514496716], [104.887892694113987, -2.340425306816655], [105.622111444116982, -2.42884368246807], [106.10859337771268, -3.06177662517895], [105.857445916774111, -4.305524997579723], [105.817655063909356, -5.852355645372411]]]] } }, + { "type": "Feature", "properties": { "admin": "India", "name": "India", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[77.837450799474553, 35.494009507787759], [78.912268914713209, 34.321936346975782], [78.811086460285722, 33.506198025032404], [79.208891636068572, 32.994394639613709], [79.176128777995501, 32.483779812137705], [78.458446486325997, 32.61816437431272], [78.738894484374001, 31.515906073527056], [79.721366815107089, 30.882714748654724], [81.11125613802929, 30.183480943313398], [80.476721225917373, 29.729865220655334], [80.088424513676259, 28.794470119740136], [81.057202589851997, 28.416095282499036], [81.999987420584958, 27.925479234319987], [83.304248895199535, 27.364505723575554], [84.675017938173767, 27.234901231387528], [85.25177859898335, 26.726198431906337], [86.024392938179147, 26.630984605408567], [87.22747195836628, 26.39789805755607], [88.060237664749806, 26.414615383402484], [88.174804315140904, 26.810405178325944], [88.043132765661198, 27.445818589786818], [88.120440708369841, 27.876541652939586], [88.730325962278528, 28.086864732367509], [88.814248488320544, 27.299315904239361], [88.835642531289366, 27.098966376243755], [89.744527622438838, 26.71940298105995], [90.37327477413406, 26.875724188742872], [91.217512648486405, 26.808648179628019], [92.033483514375078, 26.838310451763554], [92.10371178585973, 27.4526140406332], [91.69665652869665, 27.771741848251661], [92.503118931043616, 27.896876329046442], [93.413347609432662, 28.640629380807219], [94.565990431702929, 29.277438055939978], [95.404802280664612, 29.031716620392125], [96.117678664131006, 29.452802028922459], [96.586590610747479, 28.830979519154337], [96.248833449287758, 28.411030992134435], [97.327113885490007, 28.261582749946331], [97.402561476636123, 27.88253611908544], [97.051988559968066, 27.699058946233144], [97.133999058015277, 27.08377350514996], [96.419365675850941, 27.264589341739221], [95.124767694074933, 26.573572089132295], [95.155153436262566, 26.001307277932078], [94.603249139385355, 25.162495428970399], [94.552657912171611, 24.675238348890328], [94.106741977925054, 23.850740871673477], [93.325187615942767, 24.078556423432197], [93.286326938859247, 23.043658352138998], [93.060294224014598, 22.703110663335565], [93.166127557348361, 22.278459580977099], [92.672720981825549, 22.041238918541247], [92.146034783906799, 23.62749868417259], [91.869927606171302, 23.62434642180278], [91.706475050832083, 22.985263983649183], [91.158963250699713, 23.503526923104381], [91.467729933643668, 24.072639471934789], [91.915092807994398, 24.130413723237108], [92.376201613334786, 24.976692816664961], [91.799595981822065, 25.14743174895731], [90.872210727912105, 25.13260061288954], [89.920692580121838, 25.269749864192171], [89.832480910199592, 25.965082098895476], [89.355094028687276, 26.014407253518065], [88.56304935094974, 26.446525580342716], [88.209789259802477, 25.768065700782707], [88.931553989623069, 25.238692328384769], [88.30637251175601, 24.866079413344199], [88.084422235062405, 24.501657212821918], [88.699940220090895, 24.233714911388557], [88.529769728553759, 23.631141872649163], [88.876311883503064, 22.879146429937826], [89.031961297566198, 22.055708319582973], [88.888765903685396, 21.690588487224741], [88.208497348995209, 21.703171698487804], [86.975704380240259, 21.495561631755201], [87.033168572948853, 20.743307806882406], [86.499351027373777, 20.151638495356604], [85.060265740909671, 19.478578802971096], [83.941005893899998, 18.302009792549722], [83.189217156917834, 17.671221421778977], [82.192792189465905, 17.016636053937813], [82.191241896497175, 16.556664130107844], [81.692719354177456, 16.3102192245079], [80.791999139330116, 15.951972357644488], [80.324895867843864, 15.899184882058346], [80.025069207686428, 15.136414903214144], [80.23327355339039, 13.835770778859978], [80.286293572921849, 13.006260687710832], [79.862546828128487, 12.056215318240886], [79.85799930208681, 10.357275091997108], [79.340511509115984, 10.308854274939618], [78.885345493489169, 9.54613597252772], [79.189719679688281, 9.216543687370146], [78.27794070833049, 8.933046779816932], [77.94116539908434, 8.25295909263974], [77.539897902337927, 7.965534776232331], [76.592978957021657, 8.899276231314188], [76.130061476551063, 10.299630031775518], [75.746467319648488, 11.308250637248303], [75.396101108709573, 11.781245022015822], [74.864815708316812, 12.741935736537895], [74.616717156883524, 13.992582912649677], [74.443859490867197, 14.617221787977693], [73.534199253233368, 15.990652167214957], [73.119909295549419, 17.928570054592495], [72.820909458308634, 19.208233547436162], [72.824475132136783, 20.41950328214153], [72.630533481745388, 21.356009426351001], [71.175273471973938, 20.757441311114228], [70.470458611945091, 20.877330634031381], [69.164130080038817, 22.089298000572697], [69.644927606082391, 22.450774644454334], [69.349596795534325, 22.843179633062686], [68.176645135373377, 23.691965033456704], [68.842599318318761, 24.359133612560932], [71.0432401874682, 24.356523952730193], [70.844699334602822, 25.215102037043511], [70.282873162725579, 25.722228705339823], [70.168926629522005, 26.491871649678835], [69.514392938113119, 26.940965684511365], [70.61649620960192, 27.989196275335861], [71.777665643200308, 27.913180243434521], [72.823751662084689, 28.961591701772047], [73.450638462217412, 29.976413479119863], [74.421380242820263, 30.97981476493117], [74.405928989564998, 31.692639471965272], [75.258641798813187, 32.271105455040491], [74.451559279278698, 32.764899603805489], [74.104293654277328, 33.441473293586846], [73.749948358051952, 34.317698879527846], [74.240202671204955, 34.748887030571247], [75.757060988268321, 34.504922593721311], [76.871721632804011, 34.653544012992732], [77.837450799474553, 35.494009507787759]]] } }, + { "type": "Feature", "properties": { "admin": "Ireland", "name": "Ireland", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[-6.197884894220989, 53.86756500916335], [-6.032985398777609, 53.153164170944336], [-6.788856573910847, 52.260117906292322], [-8.561616583683557, 51.669301255899349], [-9.977085740590267, 51.820454820353071], [-9.16628251793078, 52.864628811242667], [-9.688524542672452, 53.881362616585285], [-8.327987433292007, 54.664518947968624], [-7.572167934591064, 55.131622219454854], [-7.366030646178785, 54.595840969452709], [-7.572167934591064, 54.059956366585986], [-6.953730231138065, 54.073702297575622], [-6.197884894220989, 53.86756500916335]]] } }, + { "type": "Feature", "properties": { "admin": "Iran", "name": "Iran", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[53.921597934795543, 37.198918361961255], [54.800303989486558, 37.392420762678178], [55.511578403551894, 37.964117133123153], [56.180374790273319, 37.935126654607423], [56.619366082592805, 38.121394354803478], [57.330433790928964, 38.029229437810933], [58.436154412678192, 37.522309475243794], [59.234761997316795, 37.412987982730336], [60.377637973883864, 36.52738312432836], [61.123070509694131, 36.491597194966239], [61.21081709172573, 35.650072333309218], [60.80319339380744, 34.404101874319856], [60.528429803311575, 33.676446031217999], [60.963700392505991, 33.528832302376252], [60.536077915290761, 32.981268825811561], [60.863654819588952, 32.182919623334421], [60.941944614511115, 31.548074652628745], [61.699314406180811, 31.379506130492661], [61.78122155136343, 30.735850328081231], [60.874248488208778, 29.829238999952604], [61.369308709564926, 29.303276272085917], [61.771868117118615, 28.699333807890792], [62.727830438085974, 28.259644883735383], [62.755425652929851, 27.378923448184985], [63.23389773952028, 27.217047024030702], [63.316631707619578, 26.756532497661659], [61.874187453056535, 26.239974880472097], [61.497362908784183, 25.078237006118492], [59.616134067630831, 25.380156561783775], [58.525761346272297, 25.609961656185725], [57.39725141788238, 25.739902045183634], [56.97076582217754, 26.966106268821356], [56.492138706290199, 27.14330475515019], [55.723710158110059, 26.964633490501036], [54.715089552637252, 26.480657863871507], [53.493096958231334, 26.812368882753042], [52.483597853409599, 27.580849107365488], [51.520762566947404, 27.865689602158291], [50.852948032439528, 28.814520575469377], [50.115008579311571, 30.14777252859971], [49.576850213423988, 29.9857152369324], [48.941333449098536, 30.31709035900403], [48.567971225789748, 29.926778265903515], [48.014568312376085, 30.452456773392594], [48.00469811380831, 30.985137437457237], [47.685286085812258, 30.984853217079621], [47.849203729042095, 31.709175930298663], [47.334661492711895, 32.469155381799105], [46.109361606639304, 33.017287299118998], [45.416690708199035, 33.967797756479577], [45.648459507028079, 34.748137722303007], [46.15178795755093, 35.093258775364284], [46.076340366404786, 35.67738332777548], [45.420618117053202, 35.977545884742817], [44.77267, 37.17045], [44.225755649600522, 37.971584377589345], [44.421402622257538, 38.281281236314534], [44.109225294782334, 39.428136298168091], [44.793989699081934, 39.713002631177041], [44.9526880226503, 39.335764675446363], [45.457721795438765, 38.874139105783051], [46.143623081248812, 38.74120148371221], [46.505719842317966, 38.770605373686287], [47.685079380083081, 39.508363959301207], [48.060095249225235, 39.582235419262453], [48.355529412637871, 39.2887649602769], [48.010744256386474, 38.794014797514514], [48.634375441284803, 38.27037750910096], [48.883249139202483, 38.32024526626261], [49.199612257693332, 37.582874253889877], [50.147771437384606, 37.37456655532133], [50.842354363819695, 36.872814235983384], [52.26402469260141, 36.700421657857696], [53.825789829326411, 36.965030829408228], [53.921597934795543, 37.198918361961255]]] } }, + { "type": "Feature", "properties": { "admin": "Iraq", "name": "Iraq", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[45.420618117053202, 35.977545884742817], [46.076340366404786, 35.67738332777548], [46.15178795755093, 35.093258775364284], [45.648459507028079, 34.748137722303007], [45.416690708199035, 33.967797756479577], [46.109361606639304, 33.017287299118998], [47.334661492711895, 32.469155381799105], [47.849203729042095, 31.709175930298663], [47.685286085812258, 30.984853217079621], [48.00469811380831, 30.985137437457237], [48.014568312376085, 30.452456773392594], [48.567971225789748, 29.926778265903515], [47.974519077349889, 29.975819200148493], [47.302622104690947, 30.059069932570711], [46.568713413281742, 29.099025173452283], [44.709498732284736, 29.178891099559376], [41.889980910007829, 31.190008653278362], [40.399994337736238, 31.889991766887931], [39.195468377444961, 32.16100881604266], [38.792340529136077, 33.378686428352218], [41.00615888851992, 34.419372260062111], [41.383965285005807, 35.628316555314349], [41.289707472505448, 36.358814602192261], [41.837064243340954, 36.605853786763568], [42.349591098811764, 37.22987254490409], [42.779125604021822, 37.385263576805741], [43.942258742047287, 37.256227525372942], [44.293451775902852, 37.001514390606289], [44.772699008977689, 37.170444647768427], [45.420618117053202, 35.977545884742817]]] } }, + { "type": "Feature", "properties": { "admin": "Iceland", "name": "Iceland", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[-14.508695441129232, 66.455892239031414], [-14.739637417041605, 65.808748277440287], [-13.609732224979807, 65.126671047619851], [-14.9098337467949, 64.36408193628867], [-17.794438035543418, 63.67874909123384], [-18.656245896874989, 63.496382961675806], [-19.972754685942757, 63.643634955491514], [-22.762971971110154, 63.960178941495371], [-21.778484259517676, 64.402115790455497], [-23.955043911219104, 64.891129869233481], [-22.184402635170354, 65.084968166760291], [-22.227423265053329, 65.378593655042721], [-24.326184047939332, 65.611189276788451], [-23.650514695723082, 66.262519029395207], [-22.134922451250883, 66.410468655046856], [-20.576283738679543, 65.732112128351417], [-19.056841600001587, 66.276600857194751], [-17.798623826559048, 65.993853257909763], [-16.167818976292121, 66.526792304135853], [-14.508695441129232, 66.455892239031414]]] } }, + { "type": "Feature", "properties": { "admin": "Israel", "name": "Israel", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[35.719918247222743, 32.709192409794859], [35.545665317534535, 32.393992011030569], [35.183930291491428, 32.532510687788935], [34.974640740709319, 31.866582343059715], [35.225891554512422, 31.754341132121759], [34.970506626125989, 31.616778469360803], [34.927408481594554, 31.35343537040141], [35.397560662586038, 31.489086005167572], [35.420918409981958, 31.100065822874349], [34.922602573391423, 29.501326198844517], [34.26543338393568, 31.219360866820146], [34.556371697738903, 31.548823960896989], [34.48810713068135, 31.605538845337314], [34.752587111151165, 32.07292633720116], [34.955417107896771, 32.827376410446369], [35.098457472480668, 33.080539252244257], [35.126052687324538, 33.090900376918775], [35.460709262846699, 33.089040025356276], [35.552796665190805, 33.264274807258012], [35.821100701650231, 33.277426459276292], [35.836396925608618, 32.868123277308506], [35.700797967274745, 32.716013698857374], [35.719918247222743, 32.709192409794859]]] } }, + { "type": "Feature", "properties": { "admin": "Italy", "name": "Italy", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[15.52037601081383, 38.231155096991465], [15.160242954171732, 37.444045518537813], [15.309897902089002, 37.134219468731793], [15.099988234119445, 36.61998729099539], [14.335228712632013, 36.996630967754747], [13.826732618879927, 37.104531358380186], [12.431003859108809, 37.612949937483812], [12.570943637755132, 38.126381130519682], [13.741156447004581, 38.03496552179535], [14.761249220446157, 38.143873602850498], [15.52037601081383, 38.231155096991465]]], [[[9.210011834356264, 41.209991360024212], [9.809975213264973, 40.500008856766094], [9.669518670295671, 39.177376410471787], [9.214817742559486, 39.240473334300127], [8.806935662479729, 38.906617743478471], [8.428302443077113, 39.171847032216611], [8.388253208050939, 40.378310858718798], [8.159998406617659, 40.950007229163774], [8.709990675500107, 40.899984442705225], [9.210011834356264, 41.209991360024212]]], [[[12.376485223040842, 46.767559109069872], [13.806475457421552, 46.50930613869118], [13.698109978905475, 46.016778062517368], [13.937630242578335, 45.59101593686465], [13.141606479554294, 45.736691799495411], [12.328581170306304, 45.38177806251484], [12.383874952858601, 44.885374253919075], [12.261453484759157, 44.600482082694008], [12.589237094786482, 44.091365871754462], [13.526905958722491, 43.587727362637899], [14.029820997787024, 42.761007798832473], [15.142569614327952, 41.955139675456891], [15.926191033601892, 41.961315009115729], [16.169897088290409, 41.740294908203417], [15.889345737377793, 41.541082261718195], [16.785001661860573, 41.179605617836579], [17.519168735431204, 40.877143459632229], [18.376687452882575, 40.355624904942651], [18.4802470231954, 40.168866278639818], [18.293385044028096, 39.810774441073235], [17.738380161213279, 40.277671006830289], [16.869595981522334, 40.442234605463838], [16.448743116937319, 39.795400702466473], [17.171489698971495, 39.424699815420716], [17.052840610429339, 38.902871202137291], [16.635088331781841, 38.843572496082395], [16.100960727613053, 37.985898749334176], [15.684086948314498, 37.908849188787023], [15.687962680736318, 38.214592800441849], [15.891981235424705, 38.750942491199218], [16.109332309644312, 38.964547024077682], [15.718813510814638, 39.544072374014938], [15.413612501698818, 40.048356838535163], [14.998495721098234, 40.172948716790913], [14.703268263414767, 40.604550279292617], [14.06067182786526, 40.786347968095434], [13.627985060285393, 41.188287258461649], [12.888081902730418, 41.253089504555604], [12.106682570044907, 41.7045348170574], [11.191906365614184, 42.355425319989671], [10.511947869517794, 42.93146251074721], [10.200028924204046, 43.920006822274608], [9.702488234097812, 44.036278794931313], [8.888946160526869, 44.366336167979533], [8.428560825238575, 44.23122813575241], [7.8507666357832, 43.767147935555236], [7.435184767291841, 43.693844916349164], [7.549596388386161, 44.127901109384808], [7.007562290076661, 44.254766750661382], [6.749955275101711, 45.028517971367584], [7.096652459347835, 45.333098863295859], [6.80235517744566, 45.708579820328673], [6.84359297041456, 45.991146552100659], [7.273850945676683, 45.776947740250748], [7.755992058959832, 45.824490057959267], [8.316629672894377, 46.16364248309084], [8.489952426801294, 46.005150865251736], [8.966305779667833, 46.03693187111115], [9.18288170740311, 46.440214748716976], [9.92283654139035, 46.314899400409182], [10.363378126678665, 46.48357127540983], [10.4427014502466, 46.893546250997431], [11.048555942436504, 46.751358547546396], [11.164827915093325, 46.941579494812729], [12.153088006243079, 47.115393174826423], [12.376485223040842, 46.767559109069872]]]] } }, + { "type": "Feature", "properties": { "admin": "Jamaica", "name": "Jamaica", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-77.569600796199197, 18.490525417550483], [-76.896618618462114, 18.400866807524078], [-76.365359056285527, 18.16070058844759], [-76.19965857614163, 17.886867173732963], [-76.902561408175671, 17.868237819891743], [-77.206341315403449, 17.701116237859818], [-77.766022915340599, 17.861597398342237], [-78.337719285785596, 18.225967922432226], [-78.217726610003865, 18.454532782459193], [-77.797364671525614, 18.524218451404774], [-77.569600796199197, 18.490525417550483]]] } }, + { "type": "Feature", "properties": { "admin": "Jordan", "name": "Jordan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[35.545665317534535, 32.393992011030569], [35.719918247222743, 32.709192409794859], [36.834062127435537, 32.312937526980768], [38.792340529136077, 33.378686428352218], [39.195468377444961, 32.16100881604266], [39.004885695152545, 32.010216986614971], [37.002165561681004, 31.508412990844736], [37.998848911294367, 30.508499864213128], [37.668119744626374, 30.338665269485894], [37.503581984209028, 30.003776150018396], [36.740527784987243, 29.865283311476183], [36.501214227043583, 29.505253607698702], [36.068940870922049, 29.19749461518445], [34.956037225084252, 29.356554673778835], [34.922602573391423, 29.501326198844517], [35.420918409981958, 31.100065822874349], [35.397560662586038, 31.489086005167572], [35.545251906076196, 31.782504787720832], [35.545665317534535, 32.393992011030569]]] } }, + { "type": "Feature", "properties": { "admin": "Japan", "name": "Japan", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[134.638428176003856, 34.149233710256418], [134.766379022358478, 33.806334743783673], [134.20341596897083, 33.201177883429622], [133.792950067276479, 33.521985175097583], [133.280268182508848, 33.289570420864941], [133.014858026257855, 32.704567369104772], [132.363114862192674, 32.989382025681373], [132.371176385630179, 33.463642483040068], [132.924372593314786, 34.060298570282036], [133.492968377822194, 33.944620876596694], [133.904106073136347, 34.364931138642611], [134.638428176003856, 34.149233710256418]]], [[[140.976387567305267, 37.142074286440156], [140.599769728762084, 36.343983466124534], [140.774074334882641, 35.842877102190229], [140.253279250245072, 35.138113918593653], [138.975527785396196, 34.667600002576101], [137.217598911691198, 34.606285915661843], [135.792983026268871, 33.46480520276662], [135.120982700745401, 33.849071153289053], [135.07943484918269, 34.596544908174813], [133.340316196831964, 34.375938218720755], [132.156770868051296, 33.904933376596503], [130.986144647343451, 33.885761420216276], [132.000036248910021, 33.149992377244608], [131.33279015515734, 31.450354519164836], [130.68631798718593, 31.029579169228235], [130.202419875204953, 31.418237616495411], [130.447676222862128, 32.319474595665717], [129.81469160371887, 32.610309556604385], [129.408463169472554, 33.296055813117583], [130.353935174684636, 33.604150702441693], [130.878450962447118, 34.232742824840031], [131.884229364143891, 34.749713853487911], [132.617672967662486, 35.433393052709413], [134.608300815977771, 35.731617743465812], [135.677537876528902, 35.527134100886819], [136.723830601142424, 37.304984239240376], [137.390611607004473, 36.827390651998819], [138.857602166906247, 37.827484646143454], [139.426404657142882, 38.215962225897634], [140.054790073812057, 39.438807481436378], [139.883379347899847, 40.563312486323682], [140.305782505453664, 41.195005194659551], [141.368973423426667, 41.378559882160282], [141.914263136970476, 39.991616115878678], [141.884600864834965, 39.18086456965149], [140.959489373945729, 38.174000962876583], [140.976387567305267, 37.142074286440156]]], [[[143.910161981379474, 44.174099839853724], [144.613426548439634, 43.960882880217511], [145.320825230083074, 44.384732977875437], [145.543137241802754, 43.262088324550596], [144.059661899999867, 42.988358262700551], [143.183849725517291, 41.995214748699183], [141.611490920172457, 42.678790595056071], [141.067286411706618, 41.58459381770799], [139.95510623592105, 41.56955597591103], [139.817543573159924, 42.563758856774392], [140.312087030193169, 43.333272610032644], [141.380548944259999, 43.388824774746489], [141.671952345953912, 44.772125352551477], [141.967644891527982, 45.551483466161343], [143.142870314709796, 44.510358384776957], [143.910161981379474, 44.174099839853724]]]] } }, + { "type": "Feature", "properties": { "admin": "Kazakhstan", "name": "Kazakhstan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[70.962314894499272, 42.26615428320553], [70.388964878220776, 42.081307684897517], [69.070027296835221, 41.384244289712335], [68.632482944620037, 40.668680731766855], [68.259895867795635, 40.662324530594894], [67.985855747351806, 41.135990708982199], [66.714047072216587, 41.168443508461557], [66.510648634715707, 41.987644151368549], [66.023391554635609, 41.994646307944031], [66.098012322865188, 42.997660020513074], [64.90082441595932, 43.728080552742647], [63.18578698105658, 43.650074978197999], [62.013300408786264, 43.504476630215649], [61.05831994003249, 44.405816962250576], [60.239971958258472, 44.784036770194739], [58.689989048095796, 45.500013739598721], [58.503127068928428, 45.58680430763296], [55.928917270741167, 44.995858466159163], [55.968191359283011, 41.30864166926937], [55.455251092353805, 41.259859117185826], [54.755345493392653, 42.04397146256661], [54.079417759014959, 42.324109402020831], [52.944293247291725, 42.116034247397572], [52.502459751196277, 41.783315538086462], [52.446339145727208, 42.027150783855561], [52.692112257707251, 42.443895372073364], [52.501426222550315, 42.792297878585188], [51.342427199108201, 43.132974758469338], [50.891291945200223, 44.031033637053774], [50.339129266161358, 44.284015611338468], [50.305642938036257, 44.609835516938908], [51.278503452363211, 44.514854234386448], [51.316899041556034, 45.245998236667894], [52.167389764215713, 45.408391425145098], [53.040876499245194, 45.259046535821753], [53.220865512917712, 46.23464590105992], [53.042736850807771, 46.853006089864486], [52.042022739475598, 46.804636949239232], [51.191945428274252, 47.048704738953909], [50.034083286342465, 46.608989976582208], [49.10116, 46.39933000000012], [48.593241001180495, 46.561034247415471], [48.694733514201729, 47.075628160177921], [48.057253045449258, 47.743752753279516], [47.315231154170242, 47.715847479841948], [46.466445753776256, 48.394152330104923], [47.043671502476506, 49.1520388860976], [46.751596307162728, 49.35600576435376], [47.549480421749301, 50.454698391311119], [48.577841424357523, 49.874759629915658], [48.702381626181008, 50.605128485712825], [50.766648390512145, 51.692762356159889], [52.328723585830957, 51.71865224873811], [54.53287845237621, 51.026239732459302], [55.716940545479801, 50.62171662047853], [56.777961053296551, 51.043551337277037], [58.363290643146733, 51.063653469438563], [59.642282342370599, 50.545442206415707], [59.932807244715484, 50.842194118851857], [61.337424350840919, 50.799070136104248], [61.588003371024158, 51.2726587998432], [59.967533807215531, 51.960420437215696], [60.927268507740258, 52.447548326215028], [60.739993117114572, 52.719986477257734], [61.699986199800584, 52.979996446334255], [60.978066440683151, 53.664993394579128], [61.436591424409052, 54.006264553434775], [65.178533563095911, 54.354227810272093], [65.66687584825398, 54.601266994843449], [68.169100376258811, 54.970391750704309], [69.068166945272864, 55.385250149143516], [70.865266554655122, 55.169733588270091], [71.180131056609397, 54.133285224008247], [72.224150018202167, 54.376655381886728], [73.508516066384388, 54.035616766976588], [73.425678745420427, 53.489810289109741], [74.384845005190044, 53.546861070360066], [76.891100294913414, 54.490524400441913], [76.525179477854735, 54.177003485727127], [77.800915561844221, 53.404414984747561], [80.035559523441663, 50.864750881547238], [80.568446893235475, 51.388336493528456], [81.945985548839914, 50.812195949906354], [83.383003778012366, 51.069182847693909], [83.935114780618832, 50.889245510453563], [84.416377394553052, 50.311399644565817], [85.115559523462011, 50.117302964877631], [85.541269972682457, 49.69285858824815], [86.829356723989619, 49.826674709668154], [87.359970330762664, 49.214980780629148], [86.598776483103379, 48.549181626980605], [85.768232863308285, 48.455750637396974], [85.72048383987071, 47.452969468773112], [85.164290399113355, 47.000955715516099], [83.180483839860443, 47.330031236350848], [82.458925815769106, 45.539649563166499], [81.947070753918112, 45.317027492853235], [79.966106398441397, 44.917516994804643], [80.866206496101356, 43.180362046881037], [80.180150180994289, 42.920067857426936], [80.259990268885332, 42.349999294599101], [79.643645460940135, 42.496682847659649], [79.142177361979776, 42.856092434249589], [77.658391961583206, 42.960685533208327], [76.000353631498555, 42.988022365890622], [75.636964959622091, 42.877899888676765], [74.212865838522575, 43.298339341803505], [73.645303582660901, 43.091271877609863], [73.489757521462337, 42.500894476891276], [71.844638299450637, 42.845395412765178], [71.186280552052253, 42.704292914392219], [70.962314894499272, 42.26615428320553]]] } }, + { "type": "Feature", "properties": { "admin": "Kenya", "name": "Kenya", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[40.993, -0.85829], [41.58513, -1.68325], [40.88477, -2.08255], [40.63785, -2.49979], [40.26304, -2.57309], [40.12119, -3.27768], [39.80006, -3.68116], [39.60489, -4.34653], [39.20222, -4.67677], [37.7669, -3.67712], [37.69869, -3.09699], [34.07262, -1.05982], [33.903711197104521, -0.95], [33.893568969666937, 0.109813537861896], [34.18, 0.515], [34.6721, 1.17694], [35.03599, 1.90584], [34.59607, 3.05374], [34.47913, 3.5556], [34.005, 4.249884947362047], [34.620196267853871, 4.847122742081987], [35.298007118232974, 5.506], [35.817447662353501, 5.338232082790795], [35.817447662353501, 4.776965663461889], [36.159078632855639, 4.447864127672768], [36.855093238008116, 4.447864127672768], [38.120915, 3.598605], [38.43697, 3.58851], [38.67114, 3.61607], [38.89251, 3.50074], [39.559384258765846, 3.42206], [39.85494, 3.83879], [40.76848, 4.25702], [41.1718, 3.91909], [41.855083092643966, 3.918911920483726], [40.98105, 2.78452], [40.993, -0.85829]]] } }, + { "type": "Feature", "properties": { "admin": "Kyrgyzstan", "name": "Kyrgyzstan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[70.96231489449913, 42.266154283205481], [71.186280552052111, 42.704292914392127], [71.84463829945058, 42.845395412765093], [73.489757521462337, 42.500894476891311], [73.645303582660901, 43.09127187760982], [74.212865838522546, 43.298339341803363], [75.636964959622006, 42.877899888676673], [76.000353631498442, 42.988022365890664], [77.658391961583206, 42.960685533208256], [79.142177361979762, 42.856092434249511], [79.643645460940107, 42.496682847659514], [80.259990268885289, 42.349999294599044], [80.119430373051358, 42.123940741538235], [78.543660923175295, 41.582242540038685], [78.187196893225959, 41.185315863604792], [76.904484490877067, 41.066485907549634], [76.526368035797432, 40.427946071935111], [75.467827996730691, 40.562072251948663], [74.776862420556043, 40.366425279291619], [73.822243686828287, 39.893973497063179], [73.960013055318413, 39.660008449861721], [73.67537926625478, 39.431236884105594], [71.784693637991992, 39.279463202464363], [70.549161818325601, 39.604197902986492], [69.464886915977516, 39.526683254548693], [69.559609816368507, 40.103211371412968], [70.648018833299957, 39.935753892571157], [71.014198032520156, 40.244365546218226], [71.774875115856545, 40.145844428053763], [73.055417108049156, 40.86603302668945], [71.870114780570447, 41.392900092121259], [71.157858514291576, 41.143587144529107], [70.420022414028196, 41.519998277343134], [71.259247674448218, 42.167710679689456], [70.96231489449913, 42.266154283205481]]] } }, + { "type": "Feature", "properties": { "admin": "Cambodia", "name": "Cambodia", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[103.497279901139677, 10.632555446815926], [103.090689731867229, 11.153660590047162], [102.58493248902667, 12.186594956913279], [102.348099399833004, 13.39424734135822], [102.988422072361601, 14.225721136934464], [104.281418084736586, 14.416743068901363], [105.218776890078871, 14.27321177821069], [106.04394616091551, 13.881091009979952], [106.496373325630856, 14.57058380783428], [107.382727492301058, 14.202440904186968], [107.614547967562402, 13.535530707244202], [107.491403029410861, 12.337205918827944], [105.810523716253101, 11.567614650921225], [106.249670037869436, 10.961811835163585], [105.199914992292321, 10.889309800658094], [104.334334751403446, 10.486543687375228], [103.497279901139677, 10.632555446815926]]] } }, + { "type": "Feature", "properties": { "admin": "South Korea", "name": "Korea", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[128.349716424676586, 38.612242946927843], [129.212919549680038, 37.432392483055942], [129.460449660358137, 36.784189154602821], [129.468304478066472, 35.632140611303939], [129.091376580929563, 35.08248423923142], [128.18585045787907, 34.890377102186385], [127.386519403188373, 34.475673733044111], [126.485747511908713, 34.390045884736473], [126.3739197124291, 34.934560451795939], [126.559231398627773, 35.684540513647896], [126.117397902532261, 36.725484727519252], [126.860143263863364, 36.893924058574612], [126.174758742376213, 37.749685777328033], [126.237338901881742, 37.840377916000271], [126.683719924018888, 37.804772854151174], [127.073308547067342, 38.256114813788393], [127.780035435090966, 38.304535630845884], [128.205745884311426, 38.370397243801882], [128.349716424676586, 38.612242946927843]]] } }, + { "type": "Feature", "properties": { "admin": "Kosovo", "name": "Kosovo", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[20.76216, 42.05186], [20.717310000000108, 41.84711], [20.59023, 41.85541], [20.52295, 42.21787], [20.28374, 42.32025], [20.0707, 42.58863], [20.25758, 42.81275], [20.49679, 42.88469], [20.63508, 43.21671], [20.81448, 43.27205], [20.95651, 43.13094], [21.143395, 43.068685000000123], [21.27421, 42.90959], [21.43866, 42.86255], [21.63302, 42.67717], [21.77505, 42.6827], [21.66292, 42.43922], [21.54332, 42.32025], [21.576635989402117, 42.245224397061847], [21.352700000000134, 42.2068], [20.76216, 42.05186]]] } }, + { "type": "Feature", "properties": { "admin": "Kuwait", "name": "Kuwait", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[47.974519077349889, 29.975819200148493], [48.183188510944483, 29.534476630159759], [48.09394331237641, 29.306299343374999], [48.416094191283939, 28.552004299426663], [47.708850538937376, 28.526062730416136], [47.459821811722819, 29.002519436147217], [46.568713413281742, 29.099025173452283], [47.302622104690947, 30.059069932570711], [47.974519077349889, 29.975819200148493]]] } }, + { "type": "Feature", "properties": { "admin": "Laos", "name": "Lao PDR", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[105.218776890078871, 14.27321177821069], [105.544338413517664, 14.723933620660414], [105.589038527450128, 15.570316066952856], [104.779320509868768, 16.441864935771445], [104.716947056092465, 17.428858954330078], [103.956476678485288, 18.240954087796872], [103.200192091893726, 18.309632066312769], [102.998705682387694, 17.961694647691598], [102.413004998791592, 17.932781683824281], [102.113591750092453, 18.109101670804161], [101.059547560635139, 17.512497259994486], [101.035931431077742, 18.408928330961611], [101.282014601651667, 19.462584947176762], [100.606293573003128, 19.508344427971217], [100.548881056726856, 20.109237982661124], [100.115987583417819, 20.41784963630818], [100.329101190189519, 20.786121731036229], [101.180005324307515, 21.436572984294024], [101.270025669359939, 21.201651923095177], [101.803119744882906, 21.174366766845065], [101.652017856861491, 22.318198757409544], [102.170435825613552, 22.464753119389297], [102.754896274834636, 21.675137233969462], [103.203861118586431, 20.766562201413745], [104.435000441508024, 20.758733221921528], [104.822573683697073, 19.886641750563879], [104.183387892678908, 19.624668077060214], [103.896532017026701, 19.265180975821799], [105.094598423281496, 18.666974595611073], [105.925762160264, 17.485315456608955], [106.55600792849566, 16.604283962464802], [107.312705926545576, 15.908538316303177], [107.564525181103875, 15.202173163305554], [107.382727492301058, 14.202440904186968], [106.496373325630856, 14.57058380783428], [106.04394616091551, 13.881091009979952], [105.218776890078871, 14.27321177821069]]] } }, + { "type": "Feature", "properties": { "admin": "Lebanon", "name": "Lebanon", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[35.821100701650231, 33.277426459276292], [35.552796665190805, 33.264274807258012], [35.460709262846699, 33.089040025356276], [35.126052687324538, 33.090900376918775], [35.48220665868012, 33.905450140919434], [35.979592319489392, 34.610058295219126], [35.998402540843628, 34.644914048799997], [36.448194207512095, 34.59393524834406], [36.611750115715886, 34.201788641897174], [36.066460402172048, 33.824912421192543], [35.821100701650231, 33.277426459276292]]] } }, + { "type": "Feature", "properties": { "admin": "Liberia", "name": "Liberia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-7.712159389669749, 4.364565944837721], [-7.974107224957249, 4.355755113131961], [-9.004793667018673, 4.832418524592199], [-9.913420376006682, 5.593560695819205], [-10.765383876986643, 6.140710760925556], [-11.438779466182053, 6.785916856305746], [-11.199801805048278, 7.105845648624735], [-11.14670427086838, 7.396706447779534], [-10.695594855176477, 7.939464016141085], [-10.230093553091276, 8.406205552601291], [-10.016566534861253, 8.42850393313523], [-9.755342169625832, 8.541055202666923], [-9.33727983238458, 7.928534450711351], [-9.403348151069748, 7.526905218938906], [-9.208786383490844, 7.313920803247952], [-8.926064622422002, 7.309037380396375], [-8.722123582382123, 7.711674302598509], [-8.439298468448696, 7.686042792181736], [-8.485445522485348, 7.395207831243068], [-8.385451626000572, 6.911800645368742], [-8.602880214868618, 6.467564195171659], [-8.311347622094017, 6.193033148621081], [-7.993692592795879, 6.126189683451541], [-7.570152553731686, 5.707352199725903], [-7.53971513511176, 5.313345241716517], [-7.63536821128403, 5.188159084489455], [-7.712159389669749, 4.364565944837721]]] } }, + { "type": "Feature", "properties": { "admin": "Libya", "name": "Libya", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[14.8513, 22.862950000000119], [14.143870883855239, 22.491288967371126], [13.581424594790459, 23.040506089769274], [11.999505649471697, 23.471668402596432], [11.560669386449032, 24.09790924732561], [10.771363559622952, 24.562532050061741], [10.303846876678445, 24.379313259370967], [9.948261346078024, 24.936953640232613], [9.910692579801774, 25.365454616796789], [9.319410841518218, 26.094324856057476], [9.716285841519662, 26.512206325785652], [9.629056023811073, 27.140953477481041], [9.756128370816779, 27.688258571884198], [9.68388471847288, 28.144173895779311], [9.859997999723472, 28.959989732371064], [9.805634392952353, 29.424638373323369], [9.482139926805415, 30.307556057246181], [9.970017124072966, 30.539324856075375], [10.056575148161697, 30.961831366493517], [9.950225050505194, 31.376069647745275], [10.636901482799484, 31.761420803345679], [10.944789666394511, 32.081814683555358], [11.43225345220378, 32.368903103152824], [11.488787469131008, 33.136995754523234], [12.66331, 32.79278], [13.08326, 32.87882], [13.91868, 32.71196], [15.24563, 32.26508], [15.71394, 31.37626], [16.61162, 31.18218], [18.02109, 30.76357], [19.08641, 30.26639], [19.57404, 30.52582], [20.05335, 30.98576], [19.82033, 31.751790000000135], [20.13397, 32.2382], [20.85452, 32.7068], [21.54298, 32.8432], [22.89576, 32.63858], [23.2368, 32.19149], [23.6091300000001, 32.18726], [23.9275, 32.01667], [24.92114, 31.89936], [25.16482, 31.56915], [24.80287, 31.08929], [24.95762, 30.6616], [24.70007, 30.04419], [25.00000000000011, 29.238654529533552], [25.00000000000011, 25.682499996360995], [25.00000000000011, 22.0], [25.00000000000011, 20.00304], [23.850000000000129, 20.0], [23.837660000000135, 19.580470000000101], [19.84926, 21.49509], [15.86085, 23.40972], [14.8513, 22.862950000000119]]] } }, + { "type": "Feature", "properties": { "admin": "Sri Lanka", "name": "Sri Lanka", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[81.787959018891371, 7.523055324733162], [81.637322218760573, 6.481775214051921], [81.218019647144317, 6.197141424988287], [80.348356968104397, 5.968369859232154], [79.872468703128519, 6.763463446474928], [79.6951668639351, 8.200843410673384], [80.147800734379629, 9.824077663609554], [80.838817986986541, 9.268426825391186], [81.304319289071756, 8.564206244333688], [81.787959018891371, 7.523055324733162]]] } }, + { "type": "Feature", "properties": { "admin": "Lesotho", "name": "Lesotho", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[28.978262566857236, -28.955596612261708], [29.325166456832587, -29.257386976846245], [29.018415154748016, -29.743765557577362], [28.848399692507734, -30.070050551068245], [28.291069370239903, -30.226216729454293], [28.107204624145421, -30.545732110314944], [27.749397006956478, -30.645105889612214], [26.999261915807629, -29.875953871379977], [27.532511020627471, -29.242710870075353], [28.07433841320778, -28.851468601193581], [28.541700066855491, -28.647501722937562], [28.978262566857236, -28.955596612261708]]] } }, + { "type": "Feature", "properties": { "admin": "Lithuania", "name": "Lithuania", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[22.731098667092649, 54.327536932993311], [22.651051873472536, 54.582740993866729], [22.757763706155256, 54.856574408581366], [22.31572350433057, 55.01529857036585], [21.26844892750346, 55.190481675835301], [21.05580040862241, 56.031076361711051], [22.201156853939491, 56.337801825579483], [23.878263787539957, 56.273671373105259], [24.860684441840753, 56.372528388079616], [25.000934279080887, 56.164530748104831], [25.533046502390327, 56.100296942766029], [26.494331495883749, 55.61510691997762], [26.588279249790386, 55.167175604871659], [25.768432651479792, 54.846962592175082], [25.536353794056989, 54.282423407602515], [24.45068362803703, 53.905702216194747], [23.484127638449841, 53.912497667041123], [23.243987257589506, 54.220566718149129], [22.731098667092649, 54.327536932993311]]] } }, + { "type": "Feature", "properties": { "admin": "Luxembourg", "name": "Luxembourg", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[6.043073357781109, 50.128051662794221], [6.242751092156992, 49.90222565367872], [6.186320428094176, 49.4638028021145], [5.897759230176403, 49.442667141307012], [5.674051954784828, 49.52948354755749], [5.782417433300905, 50.090327867221205], [6.043073357781109, 50.128051662794221]]] } }, + { "type": "Feature", "properties": { "admin": "Latvia", "name": "Latvia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[21.05580040862241, 56.031076361711051], [21.090423618257965, 56.783872789122924], [21.581866489353668, 57.411870632549913], [22.524341261492872, 57.753374335350756], [23.31845299652209, 57.006236477274854], [24.120729607853423, 57.025692654032753], [24.312862583114615, 57.793423570376966], [25.164593540149262, 57.970156968815175], [25.602809685984365, 57.847528794986559], [26.46353234223778, 57.476388658266316], [27.288184848751509, 57.474528306703817], [27.770015903440925, 57.244258124411218], [27.855282016722519, 56.759326483784278], [28.17670942557799, 56.169129950578807], [27.102459751094525, 55.783313707087672], [26.494331495883749, 55.61510691997762], [25.533046502390327, 56.100296942766029], [25.000934279080887, 56.164530748104831], [24.860684441840753, 56.372528388079616], [23.878263787539957, 56.273671373105259], [22.201156853939491, 56.337801825579483], [21.05580040862241, 56.031076361711051]]] } }, + { "type": "Feature", "properties": { "admin": "Morocco", "name": "Morocco", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-5.193863491222031, 35.755182196590845], [-4.591006232105143, 35.330711981745644], [-3.640056525070007, 35.39985504815197], [-2.604305792644111, 35.17909332940112], [-2.169913702798624, 35.168396307916694], [-1.792985805661658, 34.527918606091298], [-1.73345455566141, 33.919712836232115], [-1.388049282222596, 32.864015000941372], [-1.124551153966195, 32.651521511357195], [-1.30789913573787, 32.262888902306024], [-2.616604783529567, 32.094346218386157], [-3.068980271812648, 31.724497992473285], [-3.647497931320145, 31.637294012980814], [-3.690441046554666, 30.896951605751152], [-4.859646165374442, 30.501187649043874], [-5.242129278982786, 30.00044302013557], [-6.060632290053745, 29.731699734001801], [-7.059227667661899, 29.57922842052465], [-8.67411617678283, 28.841288967396643], [-8.665589565454836, 27.656425889592462], [-8.817809007940523, 27.656425889592462], [-8.817828334986642, 27.656425889592462], [-8.794883999049032, 27.120696316022553], [-9.413037482124507, 27.088476060488539], [-9.735343390328749, 26.860944729107409], [-10.189424200877452, 26.860944729107409], [-10.551262579785258, 26.990807603456879], [-11.392554897496948, 26.883423977154386], [-11.718219773800339, 26.104091701760801], [-12.030758836301654, 26.030866197203121], [-12.500962693725368, 24.770116278578136], [-13.891110398809044, 23.691009019459383], [-14.22116777185715, 22.310163072188338], [-14.630832688850942, 21.860939846274867], [-14.750954555713404, 21.500600083903802], [-17.002961798561071, 21.42073415779668], [-17.020428432675768, 21.422310288981631], [-16.973247849993182, 21.88574453377495], [-16.589136928767626, 22.158234361250091], [-16.26192175949566, 22.679339504481273], [-16.326413946995896, 23.017768459560894], [-15.982610642958059, 23.723358466074096], [-15.426003790742183, 24.359133612561035], [-15.089331834360729, 24.520260728446964], [-14.824645148161689, 25.103532619725307], [-14.800925665739666, 25.636264960222285], [-14.439939947964827, 26.254418443297645], [-13.773804897506462, 26.618892320252279], [-13.13994177901429, 27.640147813420491], [-13.121613369914709, 27.654147671719805], [-12.61883663578311, 28.038185533148656], [-11.688919236690761, 28.148643907172577], [-10.9009569971044, 28.832142238880913], [-10.39959225100864, 29.09858592377778], [-9.564811163765624, 29.933573716749855], [-9.814718390329174, 31.177735500609053], [-9.434793260119362, 32.038096421836478], [-9.300692918321827, 32.564679266890629], [-8.657476365585039, 33.24024526624239], [-7.654178432638217, 33.697064927702506], [-6.912544114601358, 34.11047638603744], [-6.24434200685141, 35.145865383437517], [-5.929994269219832, 35.759988104793983], [-5.193863491222031, 35.755182196590845]]] } }, + { "type": "Feature", "properties": { "admin": "Moldova", "name": "Moldova", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[26.619336785597788, 48.220726223333457], [26.857823520624798, 48.368210761094488], [27.52253746919515, 48.467119452501102], [28.259546746541837, 48.155562242213406], [28.670891147585163, 48.118148505234089], [29.122698195113024, 47.849095160506458], [29.050867954227321, 47.510226955752493], [29.415135125452732, 47.346645209332571], [29.559674106573105, 46.928582872091312], [29.908851759569295, 46.67436066343145], [29.838210076626289, 46.525325832701675], [30.024658644335364, 46.423936672545032], [29.759971958136383, 46.349987697935354], [29.170653924279879, 46.379262396828693], [29.072106967899288, 46.517677720722482], [28.862972446414055, 46.437889309263824], [28.933717482221621, 46.258830471372491], [28.659987420371575, 45.939986884131628], [28.48526940279276, 45.596907050145887], [28.233553501099035, 45.488283189468369], [28.054442986775392, 45.944586086605618], [28.160017937947707, 46.371562608417207], [28.128030226359037, 46.81047638608824], [27.551166212684841, 47.405117092470817], [27.233872918412736, 47.826770941756365], [26.924176059687561, 48.123264472030982], [26.619336785597788, 48.220726223333457]]] } }, + { "type": "Feature", "properties": { "admin": "Madagascar", "name": "Madagascar", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[49.543518914595737, -12.469832858940553], [49.80898074727908, -12.895284925999551], [50.05651085795715, -13.555761407121981], [50.217431268114055, -14.758788750876795], [50.476536899625515, -15.226512139550541], [50.377111443895942, -15.706069431219122], [50.200274692593169, -16.000263360256763], [49.860605503138665, -15.414252618066913], [49.672606642460849, -15.710203545802477], [49.863344354050142, -16.451036879138773], [49.774564243372694, -16.875042006093597], [49.49861209493411, -17.10603565843827], [49.435618523970298, -17.953064060134363], [49.04179243347393, -19.118781019774442], [48.548540887247995, -20.496888116134119], [47.930749139198653, -22.391501153251077], [47.547723423051295, -23.781958916928513], [47.095761346226588, -24.941629733990446], [46.282477654817079, -25.178462823184102], [45.409507684110444, -25.601434421493082], [44.833573846217547, -25.346101169538933], [44.039720493349755, -24.9883452287823], [43.763768344911156, -24.460677178649988], [43.697777540874441, -23.574116306250595], [43.345654331237611, -22.77690398528387], [43.254187046080986, -22.057413018484116], [43.433297560404633, -21.336475111580185], [43.893682895692919, -21.163307386970121], [43.89637007017209, -20.830459486578167], [44.374325392439644, -20.072366224856385], [44.464397413924374, -19.435454196859045], [44.23242190936616, -18.961994724200899], [44.042976108584149, -18.331387220943167], [43.963084344260899, -17.409944756746778], [44.312468702986273, -16.850495700754951], [44.446517368351387, -16.216219170804504], [44.944936557806521, -16.179373874580396], [45.502731967964976, -15.974373467678538], [45.872993605336255, -15.793454278224681], [46.312243279817203, -15.780018405828795], [46.882182651564271, -15.210182386946309], [47.70512983581235, -14.594302666891762], [48.005214878131241, -14.091232598530372], [47.869047479042152, -13.663868503476582], [48.29382775248137, -13.784067884987483], [48.845060255738773, -13.08917489995866], [48.863508742066976, -12.487867933810417], [49.194651320193302, -12.040556735891967], [49.543518914595737, -12.469832858940553]]] } }, + { "type": "Feature", "properties": { "admin": "Mexico", "name": "Mexico", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-97.140008307670684, 25.869997463478395], [-97.528072475966539, 24.992144069920297], [-97.702945522842214, 24.272343044526728], [-97.776041836319024, 22.932579860927653], [-97.872366706111094, 22.444211737553356], [-97.699043952204164, 21.898689480064256], [-97.388959520236739, 21.411018988525818], [-97.189333462293277, 20.635433254473124], [-96.525575527720306, 19.890930894444061], [-96.292127244841737, 19.32037140550954], [-95.90088497595994, 18.828024196848727], [-94.8390634834427, 18.562717393462204], [-94.425729539756205, 18.144370835843343], [-93.548651292682365, 18.423836981677933], [-92.786113857783477, 18.524838568592255], [-92.037348192090391, 18.704569200103432], [-91.407903408559235, 18.876083278880227], [-90.771869879910852, 19.284120388256778], [-90.533589850613026, 19.867418117751292], [-90.451475999701231, 20.707521877520428], [-90.278618333684889, 20.999855454995547], [-89.601321173851474, 21.261725775634485], [-88.543866339862845, 21.493675441976613], [-87.658416510757704, 21.458845526611977], [-87.051890224948053, 21.543543199138295], [-86.811982388032931, 21.331514797444747], [-86.845907965832595, 20.849864610268348], [-87.383291185235848, 20.255404771398727], [-87.621054450210721, 19.646553046135917], [-87.436750454441764, 19.472403469312265], [-87.586560431655911, 19.040130113190738], [-87.837191128271485, 18.259815985583426], [-88.090664028663156, 18.516647854074048], [-88.300031094093626, 18.499982204659997], [-88.490122850279278, 18.486830552641717], [-88.84834387892657, 17.883198147040329], [-89.029857347351737, 18.001511338772556], [-89.150909389995462, 17.955467637600403], [-89.143080410503316, 17.808318996649401], [-90.067933519230891, 17.819326076727517], [-91.001519945015943, 17.817594916245692], [-91.002269253284155, 17.254657701074272], [-91.453921271515114, 17.252177232324183], [-91.08167009150057, 16.918476670799517], [-90.711821865587623, 16.687483018454767], [-90.600846727240921, 16.470777899638787], [-90.438866950221993, 16.410109768128105], [-90.464472622422633, 16.069562079324722], [-91.747960171255926, 16.066564846251762], [-92.229248623406278, 15.251446641495871], [-92.087215949252013, 15.06458466232851], [-92.203229539747255, 14.830102850804108], [-92.227750006869812, 14.538828640190953], [-93.359463874061746, 15.61542959234367], [-93.875168830118511, 15.94016429286591], [-94.691656460330108, 16.20097524664288], [-95.250227016973014, 16.128318182840641], [-96.053382127653293, 15.752087917539592], [-96.557434048228274, 15.653515122942787], [-97.263592495496624, 15.917064927631312], [-98.013029954809596, 16.107311713113912], [-98.947675747456486, 16.566043402568763], [-99.697397427147024, 16.706164048728166], [-100.829498867581293, 17.171071071842047], [-101.666088629954444, 17.649026394109622], [-101.918528001700196, 17.916090196193974], [-102.478132086988907, 17.975750637275095], [-103.500989549558057, 18.292294623278845], [-103.917527432046811, 18.748571682200005], [-104.992009650475467, 19.316133938061679], [-105.493038499761411, 19.946767279535429], [-105.731396043707633, 20.434101874264108], [-105.397772996831321, 20.531718654863422], [-105.500660773524402, 20.816895046466122], [-105.27075232625792, 21.076284898355137], [-105.265817226974022, 21.422103583252348], [-105.603160976975374, 21.871145941652568], [-105.693413865973113, 22.269080308516148], [-106.028716396898943, 22.77375234627862], [-106.909980434988341, 23.767774359628895], [-107.91544877809136, 24.548915310152946], [-108.401904873470954, 25.172313951105931], [-109.260198737406625, 25.580609442644054], [-109.444089321717314, 25.824883938087673], [-109.291643846456267, 26.44293406829842], [-109.801457689231796, 26.676175645447923], [-110.391731737085692, 27.162114976504533], [-110.641018846461606, 27.859876003525521], [-111.178918830187826, 27.941240546169062], [-111.759606899851619, 28.467952582303944], [-112.228234626090369, 28.954408677683482], [-112.27182369672866, 29.266844387320074], [-112.80959448937395, 30.021113593052341], [-113.163810594518651, 30.786880804969424], [-113.148669399857141, 31.170965887978912], [-113.871881069781836, 31.56760834403519], [-114.205736660603506, 31.524045111613123], [-114.776451178835003, 31.79953217216114], [-114.936699795372121, 31.393484605427595], [-114.771231859173483, 30.91361725516526], [-114.673899298951739, 30.162681179315985], [-114.330974494262918, 29.750432440707407], [-113.588875088335413, 29.061611436473008], [-113.424053107540516, 28.826173610951223], [-113.271969367305502, 28.754782619739892], [-113.140039435664363, 28.411289374295954], [-112.962298346796473, 28.425190334582503], [-112.761587083774856, 27.78021678314752], [-112.457910529411635, 27.525813706974752], [-112.24495195193677, 27.171726792910754], [-111.616489020619184, 26.662817287700474], [-111.284674648872993, 25.732589830014426], [-110.987819383572386, 25.294606228124557], [-110.71000688357131, 24.826004340101854], [-110.655048997828871, 24.298594672131113], [-110.17285620811343, 24.265547593680417], [-109.771847093528521, 23.811182562754194], [-109.409104377055698, 23.364672349536242], [-109.433392300232896, 23.185587673428696], [-109.85421932660168, 22.818271592698061], [-110.031391974714424, 22.823077500901199], [-110.295070970483636, 23.430973212166684], [-110.949501309028022, 24.000964260345988], [-111.670568407012681, 24.484423122652508], [-112.182035895621468, 24.73841278736716], [-112.148988817170817, 25.470125230404044], [-112.300710822379671, 26.012004299416613], [-112.777296719191526, 26.321959540303162], [-113.464670783321907, 26.768185533143416], [-113.596729906043805, 26.639459540304465], [-113.848936733844241, 26.900063788352437], [-114.465746629680027, 27.142090358991361], [-115.055142178184965, 27.722726752222904], [-114.982252570437382, 27.798200181585109], [-114.570365566854917, 27.741485297144884], [-114.199328782999231, 28.115002549750553], [-114.162018398884612, 28.566111965442296], [-114.931842210736605, 29.279479275015483], [-115.518653937626965, 29.556361599235395], [-115.887365282029563, 30.180793768834171], [-116.2583503894529, 30.836464341753572], [-116.721526252084956, 31.635743720012037], [-117.127759999999839, 32.53534], [-115.99135, 32.612390000000111], [-114.72139, 32.72083], [-114.815, 32.52528], [-113.30498, 32.03914], [-111.02361, 31.33472], [-109.035, 31.341940000000129], [-108.24194, 31.34222], [-108.24, 31.754853718166366], [-106.507589999999851, 31.75452], [-106.1429, 31.39995], [-105.63159, 31.08383], [-105.03737, 30.64402], [-104.70575, 30.12173], [-104.456969999999885, 29.57196], [-103.94, 29.27], [-103.11, 28.97], [-102.48, 29.76], [-101.6624, 29.7793], [-100.9576, 29.380710000000125], [-100.45584, 28.696120000000118], [-100.11, 28.11000000000012], [-99.52, 27.54], [-99.3, 26.84], [-99.019999999999897, 26.37], [-98.24, 26.06], [-97.529999999999887, 25.84], [-97.140008307670684, 25.869997463478395]]] } }, + { "type": "Feature", "properties": { "admin": "Macedonia", "name": "Macedonia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[20.59023, 41.85541], [20.717310000000108, 41.84711], [20.76216, 42.05186], [21.352700000000134, 42.2068], [21.576635989402117, 42.245224397061847], [21.917080000000105, 42.30364], [22.380525750424674, 42.320259507815074], [22.881373732197339, 41.999297186850349], [22.952377150166505, 41.337993882811176], [22.76177, 41.3048], [22.597308383889008, 41.130487168943198], [22.055377638444266, 41.149865831052686], [21.674160597426969, 40.93127452245794], [21.020040317476397, 40.842726955725873], [20.60518, 41.08622], [20.46315, 41.51509], [20.59023, 41.85541]]] } }, + { "type": "Feature", "properties": { "admin": "Mali", "name": "Mali", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-12.170750291380299, 14.616834214735503], [-11.834207526079465, 14.799096991428936], [-11.666078253617853, 15.388208319556295], [-11.349095017939502, 15.411256008358475], [-10.650791388379414, 15.132745876521422], [-10.086846482778212, 15.330485744686269], [-9.700255092802703, 15.264107367407359], [-9.550238409859388, 15.486496893775435], [-5.537744309908446, 15.501689764869253], [-5.315277268891931, 16.201853745991837], [-5.488522508150438, 16.325102037007962], [-5.971128709324247, 20.640833441647626], [-6.453786586930334, 24.956590684503418], [-4.92333736817423, 24.974574082940993], [-1.550054897457613, 22.792665920497377], [1.823227573259032, 20.61080943448604], [2.060990838233919, 20.142233384679482], [2.683588494486428, 19.856230170160114], [3.146661004253899, 19.693578599521441], [3.158133172222704, 19.057364203360034], [4.267419467800038, 19.155265204336995], [4.270209995143801, 16.852227484601212], [3.723421665063482, 16.184283759012612], [3.638258904646476, 15.568119818580453], [2.749992709981483, 15.409524847876693], [1.385528191746857, 15.323561102759168], [1.01578331869851, 14.968182277887944], [0.374892205414682, 14.928908189346128], [-0.26625729003058, 14.924308986872147], [-0.515854458000348, 15.116157741755725], [-1.066363491205663, 14.973815009007764], [-2.001035122068771, 14.559008287000887], [-2.191824510090384, 14.246417548067352], [-2.967694464520576, 13.798150336151506], [-3.103706834312759, 13.54126679122859], [-3.52280270019986, 13.337661647998612], [-4.006390753587225, 13.472485459848112], [-4.280405035814879, 13.228443508349738], [-4.427166103523802, 12.542645575404292], [-5.220941941743119, 11.713858954307224], [-5.197842576508648, 11.375145778850136], [-5.470564947929004, 10.951269842976044], [-5.404341599946973, 10.370736802609144], [-5.816926235365286, 10.222554633012191], [-6.050452032892266, 10.096360785355442], [-6.205222947606429, 10.524060777219132], [-6.493965013037267, 10.411302801958268], [-6.666460944027547, 10.430810655148447], [-6.850506557635057, 10.138993841996237], [-7.622759161804808, 10.147236232946792], [-7.89958980959237, 10.297382106970824], [-8.029943610048617, 10.206534939001711], [-8.335377163109738, 10.494811916541932], [-8.282357143578279, 10.792597357623842], [-8.407310756860026, 10.90925690352276], [-8.620321010767126, 10.810890814655181], [-8.581305304386772, 11.136245632364801], [-8.376304897484911, 11.393645941610627], [-8.786099005559462, 11.812560939984705], [-8.905264858424529, 12.088358059126433], [-9.127473517279581, 12.308060411015331], [-9.327616339546008, 12.334286200403451], [-9.567911749703212, 12.194243068892472], [-9.890992804392011, 12.060478623904968], [-10.165213792348835, 11.844083563682743], [-10.593223842806278, 11.923975328005977], [-10.870829637078211, 12.177887478072106], [-11.036555955438256, 12.211244615116513], [-11.297573614944508, 12.077971096235768], [-11.456168585648269, 12.076834214725336], [-11.513942836950587, 12.442987575729415], [-11.467899135778522, 12.754518947800973], [-11.553397793005427, 13.141213690641063], [-11.927716030311613, 13.422075100147392], [-12.124887457721256, 13.994727484589784], [-12.170750291380299, 14.616834214735503]]] } }, + { "type": "Feature", "properties": { "admin": "Myanmar", "name": "Myanmar", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[99.543309360759281, 20.186597601802056], [98.959675734454848, 19.752980658440944], [98.253723992915582, 19.708203029860041], [97.797782830804394, 18.627080389881751], [97.375896437573516, 18.445437730375811], [97.859122755934848, 17.567946071843657], [98.493761020911322, 16.837835598207928], [98.90334842325673, 16.177824204976115], [98.537375929765687, 15.308497422746081], [98.192074009191373, 15.123702500870349], [98.430819126379859, 14.622027696180831], [99.097755161538728, 13.827502549693275], [99.212011753336071, 13.269293728076462], [99.196353794351637, 12.804748439988666], [99.587286004639694, 11.892762762901695], [99.038120558673953, 10.960545762572435], [98.553550653073017, 9.932959906448543], [98.457174106848697, 10.675266018105146], [98.764545526120756, 11.441291612183745], [98.428338657629823, 12.032986761925681], [98.509574009192661, 13.122377631070675], [98.103603957107666, 13.64045970301285], [97.777732375075161, 14.837285874892638], [97.597071567782749, 16.100567938699765], [97.164539829499773, 16.928734442609336], [96.505768670642965, 16.427240505432845], [95.369352248112378, 15.714389960182599], [94.808404575584092, 15.803454291237637], [94.188804152404515, 16.037936102762014], [94.533485955791321, 17.277240301985724], [94.324816522196741, 18.213513902249893], [93.540988397193615, 19.366492621330021], [93.663254835996199, 19.726961574781992], [93.078277622452163, 19.855144965081973], [92.368553501355606, 20.670883287025344], [92.30323449093865, 21.475485337809815], [92.652257114637976, 21.324047552978481], [92.672720981825549, 22.041238918541247], [93.166127557348361, 22.278459580977099], [93.060294224014598, 22.703110663335565], [93.286326938859247, 23.043658352138998], [93.325187615942767, 24.078556423432197], [94.106741977925054, 23.850740871673477], [94.552657912171611, 24.675238348890328], [94.603249139385355, 25.162495428970399], [95.155153436262566, 26.001307277932078], [95.124767694074933, 26.573572089132295], [96.419365675850941, 27.264589341739221], [97.133999058015277, 27.08377350514996], [97.051988559968066, 27.699058946233144], [97.402561476636123, 27.88253611908544], [97.327113885490007, 28.261582749946331], [97.91198774616943, 28.335945136014338], [98.24623091023328, 27.747221381129172], [98.682690057370451, 27.508812160750612], [98.712093947344499, 26.74353587494026], [98.671838006589127, 25.918702500913518], [97.724609002679117, 25.083637193292994], [97.604719679761956, 23.897404690033039], [98.660262485755737, 24.063286037689959], [98.898749220782747, 23.142722072842524], [99.531992222087382, 22.949038804612574], [99.240898878987224, 22.118314317304577], [99.983489211021464, 21.742936713136398], [100.416537713627349, 21.558839423096607], [101.150032993578222, 21.849984442629015], [101.180005324307515, 21.436572984294024], [100.329101190189519, 20.786121731036229], [100.115987583417819, 20.41784963630818], [99.543309360759281, 20.186597601802056]]] } }, + { "type": "Feature", "properties": { "admin": "Montenegro", "name": "Montenegro", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[19.801613396898681, 42.500093492190835], [19.738051385179627, 42.688247382165564], [19.30449, 42.19574], [19.371770000000136, 41.87755], [19.16246, 41.95502], [18.88214, 42.28151], [18.45, 42.48], [18.56, 42.65], [18.70648, 43.20011], [19.03165, 43.43253], [19.21852, 43.52384], [19.48389, 43.35229], [19.63, 43.213779970270522], [19.95857, 43.10604], [20.3398, 42.89852], [20.25758, 42.81275], [20.0707, 42.58863], [19.801613396898681, 42.500093492190835]]] } }, + { "type": "Feature", "properties": { "admin": "Mongolia", "name": "Mongolia", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[87.751264276076697, 49.297197984405479], [88.805566847695488, 49.470520738312409], [90.713667433640666, 50.331811835321076], [92.234711541719662, 50.802170722041716], [93.104219191462661, 50.495290228876414], [94.147566359435615, 50.480536607457083], [94.815949334698701, 50.013433335970838], [95.814027947983973, 49.977466539095708], [97.259727817781396, 49.726060695995727], [98.231761509191543, 50.422400621128737], [97.825739780674283, 51.010995184933165], [98.861490513100307, 52.047366034546684], [99.981732212323507, 51.634006252643978], [100.889480421962588, 51.516855780638316], [102.065222609467298, 51.25992055928311], [102.255908644624299, 50.510560614618669], [103.676545444760194, 50.089966132195109], [104.621552362081687, 50.275329494826067], [105.886591424586726, 50.406019192092209], [106.888804152455336, 50.274295966180219], [107.868175897250936, 49.793705145865808], [108.475167270951275, 49.282547715850725], [109.402449171996636, 49.292960516957535], [110.662010532678764, 49.130128078805861], [111.581230910286607, 49.377968248077678], [112.897739699354361, 49.543565375356984], [114.362456496235239, 50.248302720737399], [114.962109816550154, 50.140247300815112], [115.485695428531386, 49.805177313834591], [116.678800897286152, 49.888531399121376], [116.191802199367544, 49.134598090199091], [115.485282017073018, 48.135382595403428], [115.742837355615748, 47.726544501326273], [116.308952671373206, 47.853410142602826], [117.295507440257396, 47.69770905210742], [118.064142694166691, 48.066730455103674], [118.866574334794933, 47.747060044946153], [119.772823927897477, 47.048058783550125], [119.66326989143873, 46.692679958678909], [118.874325799638711, 46.805412095723646], [117.421701287914175, 46.672732855814253], [116.717868280098841, 46.388202419615205], [115.985096470200062, 45.727235012385989], [114.46033165899604, 45.339816799493811], [113.463906691544139, 44.808893134127111], [112.436062453258785, 45.011645616224278], [111.873306105600278, 45.102079372735055], [111.348376906379428, 44.457441718110083], [111.667737257943202, 44.073175767587706], [111.829587843881342, 43.743118394539515], [111.129682244920218, 43.406834011400136], [110.412103306115256, 42.871233628911014], [109.243595819131428, 42.519446316084093], [107.744772576937933, 42.481515814781865], [106.129315627061658, 42.134327704428898], [104.964993931093446, 41.597409572916334], [104.522281935648977, 41.908346666016541], [103.312278273534787, 41.907468166667591], [101.833040399179922, 42.51487295182627], [100.845865513108237, 42.663804429691439], [99.515817498780009, 42.524691473961717], [97.451757440177985, 42.748889675460013], [96.349395786527793, 42.725635280928678], [95.762454868556674, 43.319449164394598], [95.306875441471504, 44.241330878265458], [94.688928664125299, 44.352331854828414], [93.480733677141274, 44.975472113619951], [92.133890822318193, 45.115075995456444], [90.945539585334288, 45.286073309910265], [90.585768263718265, 45.719716091487513], [90.970809360724985, 46.888146063822923], [90.280825636763893, 47.693549099307923], [88.854297723346733, 48.06908173277295], [88.013832228551721, 48.599462795600601], [87.751264276076697, 49.297197984405479]]] } }, + { "type": "Feature", "properties": { "admin": "Mozambique", "name": "Mozambique", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[34.559989047999345, -11.520020033415923], [35.312397902169032, -11.439146416879145], [36.514081658684248, -11.720938002166733], [36.775150994622791, -11.594537448780804], [37.471284214026596, -11.568750909067157], [37.827644891111383, -11.268769219612834], [38.427556593587745, -11.285202325081654], [39.521029900883768, -10.896853936408224], [40.316588576017182, -10.317096042525696], [40.478387485523022, -10.765440769089992], [40.437253045418672, -11.761710707245014], [40.560811395028558, -12.639176527561023], [40.599620395679743, -14.201975192931858], [40.775475294768988, -14.691764418194239], [40.477250604012596, -15.406294447493968], [40.089263950365208, -16.100774021064456], [39.452558628097044, -16.720891208566936], [38.53835086442151, -17.101023044505954], [37.411132846838875, -17.586368096591233], [36.281279331209348, -18.659687595293445], [35.896496616364054, -18.842260430580634], [35.198399692533137, -19.552811374593887], [34.786383497870041, -19.784011732667732], [34.701892531072836, -20.497043145431007], [35.176127150215358, -21.254361260668407], [35.373427768705731, -21.840837090748874], [35.385848253705397, -22.14], [35.562545536369079, -22.09], [35.533934767404297, -23.070787855727751], [35.371774122872374, -23.535358982031692], [35.607470330555621, -23.706563002214676], [35.458745558419615, -24.122609958596545], [35.040734897610655, -24.478350518493798], [34.215824008935463, -24.816314385682652], [33.013210076639005, -25.357573337507731], [32.574632195777859, -25.727318210556088], [32.660363396950082, -26.148584486599443], [32.915955031065685, -26.215867201443459], [32.830120477028878, -26.74219166433619], [32.071665480281062, -26.733820082304902], [31.985779249811962, -26.29177988048022], [31.837777947728057, -25.843331801051342], [31.752408481581874, -25.484283949487406], [31.930588820124242, -24.369416599222532], [31.670397983534645, -23.658969008073861], [31.191409132621278, -22.251509698172395], [32.244988234188007, -21.116488539313689], [32.508693068173436, -20.395292250248303], [32.659743279762573, -20.30429005298231], [32.772707960752619, -19.715592136313294], [32.611994256324884, -19.419382826416268], [32.654885695127142, -18.672089939043492], [32.849860874164385, -17.979057305577175], [32.847638787575839, -16.713398125884613], [32.328238966610222, -16.392074069893749], [31.852040643040592, -16.319417006091374], [31.636498243951188, -16.071990248277881], [31.173063999157673, -15.860943698797868], [30.338954705534537, -15.880839125230242], [30.274255812305103, -15.507786960515208], [30.179481235481827, -14.796099134991525], [33.214024692525207, -13.97186003993615], [33.789700148256678, -14.451830743063068], [34.064825473778619, -14.359950046448118], [34.459633416488536, -14.613009535381421], [34.517666049952304, -15.013708591372609], [34.307291294092089, -15.478641452702592], [34.381291945134045, -16.183559665596039], [35.033810255683527, -16.801299737213089], [35.339062941231639, -16.107440280830108], [35.771904738108347, -15.896858819240721], [35.686845330555926, -14.611045830954328], [35.267956170398001, -13.887834161029563], [34.907151320136158, -13.565424899960565], [34.559989047999345, -13.579997653866872], [34.280006137841973, -12.280025323132504], [34.559989047999345, -11.520020033415923]]] } }, + { "type": "Feature", "properties": { "admin": "Mauritania", "name": "Mauritania", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-12.170750291380299, 14.616834214735503], [-12.830658331747513, 15.303691514542942], [-13.43573767745306, 16.039383042866188], [-14.099521450242175, 16.304302273010489], [-14.577347581428977, 16.598263658102805], [-15.135737270558813, 16.587282416240779], [-15.623666144258689, 16.369337063049809], [-16.120690070041928, 16.45566254319338], [-16.463098110407881, 16.135036119038457], [-16.549707810929061, 16.673892116761959], [-16.270551723688353, 17.166962795474866], [-16.146347418674846, 18.108481553616652], [-16.256883307347163, 19.096715806550304], [-16.377651129613266, 19.593817246981981], [-16.277838100641514, 20.092520656814695], [-16.536323614965465, 20.567866319251486], [-17.063423224342568, 20.99975210213082], [-16.845193650773989, 21.333323472574875], [-12.929101935263528, 21.327070624267559], [-13.118754441774708, 22.771220201096249], [-12.874221564169574, 23.284832261645171], [-11.93722449385332, 23.374594224536164], [-11.969418911171159, 25.933352769468261], [-8.687293667017398, 25.881056219988899], [-8.684399786809051, 27.395744126895998], [-4.92333736817423, 24.974574082940993], [-6.453786586930334, 24.956590684503418], [-5.971128709324247, 20.640833441647626], [-5.488522508150438, 16.325102037007962], [-5.315277268891931, 16.201853745991837], [-5.537744309908446, 15.501689764869253], [-9.550238409859388, 15.486496893775435], [-9.700255092802703, 15.264107367407359], [-10.086846482778212, 15.330485744686269], [-10.650791388379414, 15.132745876521422], [-11.349095017939502, 15.411256008358475], [-11.666078253617853, 15.388208319556295], [-11.834207526079465, 14.799096991428936], [-12.170750291380299, 14.616834214735503]]] } }, + { "type": "Feature", "properties": { "admin": "Malawi", "name": "Malawi", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[34.559989047999345, -11.520020033415923], [34.280006137841973, -12.280025323132504], [34.559989047999345, -13.579997653866872], [34.907151320136158, -13.565424899960565], [35.267956170398001, -13.887834161029563], [35.686845330555926, -14.611045830954328], [35.771904738108347, -15.896858819240721], [35.339062941231639, -16.107440280830108], [35.033810255683527, -16.801299737213089], [34.381291945134045, -16.183559665596039], [34.307291294092089, -15.478641452702592], [34.517666049952304, -15.013708591372609], [34.459633416488536, -14.613009535381421], [34.064825473778619, -14.359950046448118], [33.789700148256678, -14.451830743063068], [33.214024692525207, -13.97186003993615], [32.688165317523122, -13.712857761289273], [32.991764357237876, -12.783870537978272], [33.306422153463068, -12.435778090060214], [33.114289178201908, -11.607198174692311], [33.315310499817279, -10.796549981329695], [33.485687697083584, -10.525558770391111], [33.231387973775291, -9.676721693564799], [32.759375441221316, -9.230599053589058], [33.739729038230443, -9.417150974162722], [33.940837724096532, -9.693673841980292], [34.280006137841973, -10.159999688358402], [34.559989047999345, -11.520020033415923]]] } }, + { "type": "Feature", "properties": { "admin": "Malaysia", "name": "Malaysia", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[101.075515578213299, 6.204867051615891], [101.154218784593809, 5.691384182147713], [101.814281854258013, 5.810808417174228], [102.141186964936423, 6.221636053894655], [102.371147088635212, 6.12820506431096], [102.961705356866673, 5.524495144061077], [103.381214634212142, 4.855001125503746], [103.438575474056165, 4.181605536308381], [103.332122023534851, 3.72669790284297], [103.42942874554052, 3.382868760589019], [103.502447544368877, 2.791018581550204], [103.854674106870334, 2.515454006353763], [104.247931756611479, 1.631141058759055], [104.228811476663523, 1.293048000489534], [103.519707472754433, 1.226333726400682], [102.573615350354771, 1.967115383304744], [101.39063846232915, 2.760813706875623], [101.273539666755838, 3.27029165284118], [100.69543541870668, 3.939139715994869], [100.557407668055092, 4.767280381688279], [100.19670617065772, 5.312492580583678], [100.306260207116509, 6.040561835143875], [100.085756870527078, 6.46448944745029], [100.259596388756918, 6.64282481528957], [101.075515578213299, 6.204867051615891]]], [[[118.618320754064825, 4.47820241944754], [117.882034946770162, 4.137551377779487], [117.01521447150634, 4.306094061699468], [115.86551720587677, 4.306559149590156], [115.51907840379198, 3.169238389494395], [115.134037306785231, 2.821481838386219], [114.621355422017473, 1.430688177898886], [113.805849644019531, 1.217548732911041], [112.859809198052176, 1.497790025229946], [112.380251906383648, 1.410120957846757], [111.797548455860408, 0.904441229654651], [111.159137811326559, 0.976478176269509], [110.514060907027101, 0.773131415200993], [109.830226678508836, 1.338135687664191], [109.663260125773718, 2.006466986494984], [110.396135288537039, 1.663774725751395], [111.168852980597478, 1.850636704918784], [111.370081007942076, 2.697303371588872], [111.796928338672842, 2.885896511238073], [112.995614862115247, 3.102394924324869], [113.712935418758718, 3.893509426281127], [114.204016554828399, 4.525873928236819], [114.659595981913526, 4.00763682699781], [114.869557326315373, 4.348313706881952], [115.347460972150671, 4.316636053887009], [115.405700311343594, 4.955227565933824], [115.450710483869798, 5.447729803891561], [116.220741001450961, 6.143191229675621], [116.725102980619752, 6.924771429873998], [117.129626092600461, 6.928052883324566], [117.643393182446303, 6.422166449403305], [117.689075148592337, 5.98749013918018], [118.347691278152197, 5.708695786965462], [119.181903924639926, 5.407835598162249], [119.110693800941718, 5.016128241389864], [118.439727004064082, 4.966518866389619], [118.618320754064825, 4.47820241944754]]]] } }, + { "type": "Feature", "properties": { "admin": "Namibia", "name": "Namibia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[16.344976840895239, -28.576705010697697], [15.601818068105812, -27.821247247022797], [15.210472446359457, -27.09095590587404], [14.989710727608548, -26.117371921495153], [14.74321414557633, -25.392920017195376], [14.40814415859583, -23.85301401132984], [14.385716586981145, -22.656652927340687], [14.257714064194172, -22.111208184499951], [13.868642205468657, -21.699036960539974], [13.352497999737437, -20.872834161057497], [12.82684533046449, -19.673165785401661], [12.608564080463617, -19.045348809487695], [11.794918654028063, -18.069129327061912], [11.734198846085118, -17.30188933682447], [12.215461460019352, -17.11166838955808], [12.814081251688405, -16.941342868724067], [13.462362094789963, -16.971211846588769], [14.058501417709007, -17.42338062914266], [14.209706658595021, -17.353100681225715], [18.26330936043416, -17.309950860262003], [18.956186964603599, -17.789094740472255], [21.377176141045563, -17.930636488519688], [23.215048455506057, -17.52311614346598], [24.033861525170771, -17.29584319424632], [24.6823490740015, -17.35341073981947], [25.076950310982255, -17.578823337476617], [25.084443393664564, -17.661815687737366], [24.520705193792534, -17.887124932529932], [24.217364536239209, -17.889347019118485], [23.579005568137713, -18.281261081620055], [23.196858351339298, -17.869038181227783], [21.655040317478971, -18.219146010005222], [20.910641310314531, -18.252218926672018], [20.881134067475866, -21.814327080983144], [19.895457797940672, -21.849156996347865], [19.895767856534427, -24.767790215760588], [19.89473432788861, -28.461104831660769], [19.002127312911082, -28.972443129188857], [18.464899122804745, -29.045461928017271], [17.836151971109526, -28.856377862261311], [17.387497185951499, -28.783514092729774], [17.218928663815401, -28.355943291946804], [16.824017368240899, -28.082161553664466], [16.344976840895239, -28.576705010697697]]] } }, + { "type": "Feature", "properties": { "admin": "New Caledonia", "name": "New Caledonia", "continent": "Oceania" }, "geometry": { "type": "Polygon", "coordinates": [[[165.779989862326346, -21.080004978115621], [166.599991489933814, -21.700018812753523], [167.120011428086883, -22.159990736583488], [166.74003462144475, -22.399976088146943], [166.189732293968632, -22.129708347260447], [165.474375441752159, -21.679606621998229], [164.829815301775653, -21.149819838141948], [164.16799523341362, -20.444746595951624], [164.029605747735957, -20.105645847252347], [164.459967075862664, -20.120011895429492], [165.020036249041993, -20.459991143477726], [165.460009393575064, -20.800022067958253], [165.779989862326346, -21.080004978115621]]] } }, + { "type": "Feature", "properties": { "admin": "Niger", "name": "Niger", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[2.154473504249949, 11.940150051313422], [2.177107781593917, 12.625017808477534], [1.024103224297619, 12.851825669806598], [0.993045688490156, 13.335749620003865], [0.429927605805517, 13.988733018443893], [0.295646396495215, 14.444234930880663], [0.374892205414767, 14.928908189346144], [1.015783318698481, 14.968182277887989], [1.385528191746971, 15.323561102759237], [2.74999270998154, 15.409524847876751], [3.63825890464659, 15.56811981858044], [3.723421665063596, 16.184283759012654], [4.270209995143886, 16.852227484601311], [4.267419467800095, 19.155265204337123], [5.677565952180712, 19.601206976799794], [8.572893100629868, 21.565660712159225], [11.999505649471697, 23.471668402596432], [13.581424594790459, 23.040506089769274], [14.143870883855239, 22.491288967371126], [14.8513, 22.862950000000119], [15.096887648181847, 21.308518785074902], [15.471076694407314, 21.048457139565979], [15.487148064850143, 20.730414537025634], [15.90324669766431, 20.387618923417499], [15.68574059414777, 19.957180080642384], [15.300441114979716, 17.927949937405], [15.247731154041842, 16.627305813050778], [13.972201775781681, 15.684365953021139], [13.540393507550785, 14.36713369390122], [13.956698846094124, 13.996691189016925], [13.954476759505607, 13.353448798063765], [14.595781284247604, 13.330426947477859], [14.495787387762899, 12.859396267137353], [14.213530714584746, 12.80203542729333], [14.181336297266906, 12.483656927943169], [13.995352817448289, 12.4615652531383], [13.318701613018558, 13.55635630945795], [13.083987257548809, 13.596147162322492], [12.302071160540546, 13.037189032437535], [11.527803175511504, 13.328980007373556], [10.989593133191532, 13.387322699431191], [10.701031935273816, 13.246917832894038], [10.114814487354748, 13.277251898649464], [9.524928012743088, 12.85110219975456], [9.014933302454436, 12.826659247280414], [7.804671258178869, 13.343526923063731], [7.330746697630046, 13.098038031461213], [6.82044192874781, 13.115091254117598], [6.445426059605721, 13.492768459522718], [5.443058302440135, 13.865923977102225], [4.368343540066006, 13.747481594289408], [4.107945997747378, 13.531215725147941], [3.967282749048933, 12.956108710171574], [3.680633579125924, 12.552903347214167], [3.611180454125587, 11.660167141155965], [2.848643019226585, 12.235635891158207], [2.490163608418015, 12.233052069543588], [2.154473504249949, 11.940150051313422]]] } }, + { "type": "Feature", "properties": { "admin": "Nigeria", "name": "Nigeria", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[8.500287713259693, 4.771982937026847], [7.462108188515939, 4.41210826254624], [7.082596469764438, 4.464689032403228], [6.698072137080598, 4.240594183769516], [5.898172641634686, 4.262453314628984], [5.362804803090881, 4.887970689305957], [5.033574252959368, 5.611802476418233], [4.325607130560683, 6.270651149923466], [3.574180128604552, 6.258300482605717], [2.691701694356254, 6.258817246928628], [2.74906253420022, 7.870734361192886], [2.723792758809509, 8.506845404489708], [2.912308383810255, 9.13760793704432], [3.220351596702101, 9.4441525333997], [3.705438266625918, 10.063210354040207], [3.600070021182801, 10.332186184119406], [3.797112257511713, 10.734745591673104], [3.572216424177469, 11.327939357951516], [3.611180454125558, 11.660167141155966], [3.68063357912581, 12.552903347214222], [3.967282749048848, 12.956108710171572], [4.107945997747321, 13.531215725147829], [4.368343540066063, 13.747481594289324], [5.443058302440163, 13.865923977102295], [6.445426059605636, 13.492768459522676], [6.820441928747753, 13.115091254117514], [7.330746697630017, 13.098038031461199], [7.804671258178784, 13.343526923063745], [9.014933302454462, 12.826659247280427], [9.524928012742945, 12.851102199754477], [10.114814487354689, 13.277251898649409], [10.701031935273702, 13.246917832894081], [10.989593133191532, 13.387322699431108], [11.527803175511393, 13.328980007373584], [12.302071160540521, 13.037189032437521], [13.083987257548866, 13.596147162322563], [13.318701613018558, 13.556356309457824], [13.995352817448346, 12.461565253138343], [14.181336297266792, 12.483656927943112], [14.57717776862253, 12.085360826053501], [14.468192172918974, 11.90475169519341], [14.415378859116682, 11.572368882692071], [13.572949659894558, 10.798565985553564], [13.308676385153914, 10.160362046748926], [13.1675997249971, 9.64062632897341], [12.955467970438971, 9.417771714714702], [12.753671502339214, 8.717762762888993], [12.218872104550597, 8.305824082874322], [12.063946160539556, 7.799808457872301], [11.839308709366801, 7.397042344589434], [11.745774366918509, 6.981382961449753], [11.058787876030349, 6.644426784690593], [10.497375115611417, 7.055357774275562], [10.118276808318255, 7.038769639509879], [9.522705926154398, 6.453482367372116], [9.233162876023043, 6.444490668153334], [8.757532993208626, 5.47966583904791], [8.500287713259693, 4.771982937026847]]] } }, + { "type": "Feature", "properties": { "admin": "Nicaragua", "name": "Nicaragua", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-85.712540452807289, 11.088444932494822], [-86.058488328785245, 11.40343862552994], [-86.525849982432931, 11.806876532432593], [-86.7459915839963, 12.143961900272483], [-87.167516242201131, 12.458257961471656], [-87.668493415054698, 12.909909979702629], [-87.557466600275603, 13.064551703336061], [-87.392386237319201, 12.914018256069836], [-87.316654425795463, 12.984685777228972], [-87.005769009127562, 13.025794379117157], [-86.880557013684339, 13.254204209847241], [-86.733821784191576, 13.263092556201441], [-86.755086636079696, 13.754845485890909], [-86.520708177419877, 13.778487453664436], [-86.312142096689911, 13.771356106008167], [-86.096263800790581, 14.038187364147245], [-85.801294725268576, 13.836054999237586], [-85.698665330736901, 13.960078436738083], [-85.514413011400222, 14.079011745657834], [-85.165364549484792, 14.354369615125076], [-85.148750576502948, 14.560196844943615], [-85.052787441736925, 14.551541042534719], [-84.924500698572388, 14.790492865452348], [-84.820036790694346, 14.819586696832669], [-84.649582078779602, 14.66680532476175], [-84.449335903648588, 14.621614284722494], [-84.228341640952394, 14.748764146376654], [-83.975721401693576, 14.749435939996458], [-83.628584967772895, 14.880073960830298], [-83.489988776366104, 15.016267198135534], [-83.147219000974104, 14.995829169164109], [-83.233234422523907, 14.8998660343981], [-83.28416154654758, 14.676623846897197], [-83.182126430987267, 14.310703029838447], [-83.412499966144424, 13.970077826386554], [-83.519831916014667, 13.56769928634588], [-83.55220720084553, 13.127054348193084], [-83.498515387694255, 12.869292303921226], [-83.473323126951968, 12.419087225794424], [-83.626104499022887, 12.320850328007563], [-83.719613003255034, 11.893124497927724], [-83.650857510090702, 11.629032090700116], [-83.855470343750369, 11.373311265503785], [-83.808935716471538, 11.103043524617274], [-83.655611741861563, 10.938764146361418], [-83.895054490885926, 10.726839097532444], [-84.190178595704822, 10.793450018756671], [-84.355930752281026, 10.999225572142901], [-84.673069017256239, 11.082657172078139], [-84.903003302738924, 10.952303371621895], [-85.561851976244171, 11.217119248901593], [-85.712540452807289, 11.088444932494822]]] } }, + { "type": "Feature", "properties": { "admin": "Netherlands", "name": "Netherlands", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[6.074182570020922, 53.51040334737813], [6.905139601274128, 53.482162177130633], [7.092053256873895, 53.14404328064488], [6.842869500362381, 52.228440253297542], [6.589396599970825, 51.85202912048338], [5.988658074577812, 51.85161570902504], [6.156658155958779, 50.803721015010574], [5.60697594567, 51.037298488969768], [4.973991326526913, 51.475023708698124], [4.047071160507527, 51.267258612668556], [3.314971144228536, 51.345755113319903], [3.830288527043137, 51.620544542031936], [4.705997348661184, 53.091798407597757], [6.074182570020922, 53.51040334737813]]] } }, + { "type": "Feature", "properties": { "admin": "Norway", "name": "Norway", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[28.165547316202911, 71.185474351680497], [31.293418409965472, 70.453787746859902], [30.005435011522785, 70.186258856884876], [31.101078728975118, 69.558080145944857], [29.399580519332879, 69.156916002063056], [28.591929559043187, 69.064776923286686], [29.015572950971968, 69.76649119737796], [27.732292107867885, 70.164193020296281], [26.179622023226298, 69.825298977326142], [25.689212680776389, 69.092113755968995], [24.735679152126714, 68.649556789821432], [23.662049594830759, 68.891247463650515], [22.356237827247405, 68.841741441514941], [21.244936150810723, 69.370443020293109], [20.645592889089581, 69.106247260200846], [20.02526899585791, 69.065138658312705], [19.878559604581248, 68.407194322372604], [17.993868442464386, 68.567391262477329], [17.729181756265344, 68.01055186631622], [16.768878614985535, 68.013936672631374], [16.108712192456832, 67.302455552836889], [15.108411492583055, 66.193866889095418], [13.555689731509087, 64.787027696381458], [13.919905226302202, 64.445420640716108], [13.571916131248766, 64.049114081469654], [12.57993533697393, 64.066218980558332], [11.930569288794228, 63.128317572676977], [11.992064243221531, 61.800362453856557], [12.63114668137524, 61.293571682370079], [12.300365838274896, 60.117932847730046], [11.468271925511173, 59.432393296945989], [11.027368605196925, 58.856149400459394], [10.356556837616095, 59.469807033925363], [8.382000359743641, 58.313288479233265], [7.048748406613297, 58.078884182357271], [5.665835402050418, 58.588155422593658], [5.308234490590733, 59.663231919993805], [4.992078077829005, 61.97099803328426], [5.912900424837885, 62.614472968182682], [8.553411085655766, 63.454008287196459], [10.527709181366784, 64.486038316497471], [12.358346795306371, 65.879725857193151], [14.7611458675816, 67.810641587995121], [16.435927361728968, 68.563205471461671], [19.184028354578512, 69.817444159617807], [21.378416375420606, 70.255169379346043], [23.02374230316158, 70.202071845166259], [24.546543409938515, 71.030496731237221], [26.370049676221807, 70.986261705195361], [28.165547316202911, 71.185474351680497]]], [[[24.72412, 77.85385], [22.49032, 77.44493], [20.72601, 77.67704], [21.41611, 77.93504], [20.8119, 78.25463], [22.88426, 78.45494], [23.28134, 78.07954], [24.72412, 77.85385]]], [[[18.25183, 79.70175], [21.54383, 78.95611], [19.02737, 78.5626], [18.47172, 77.82669], [17.59441, 77.63796], [17.1182, 76.80941], [15.91315, 76.77045], [13.76259, 77.38035], [14.66956, 77.73565], [13.1706, 78.02493], [11.22231, 78.8693], [10.44453, 79.65239], [13.17077, 80.01046], [13.71852, 79.66039], [15.14282, 79.67431], [15.52255, 80.01608], [16.99085, 80.05086], [18.25183, 79.70175]]], [[[25.447625359811887, 80.407340399894494], [27.407505730913492, 80.056405748200447], [25.924650506298171, 79.517833970854539], [23.024465773213613, 79.40001170522909], [20.075188429451877, 79.566823228667232], [19.897266473070907, 79.842361965647498], [18.46226362475792, 79.859880276194403], [17.368015170977454, 80.318896186027004], [20.455992059010693, 80.598155626132225], [21.907944777115397, 80.357679348462071], [22.919252557067431, 80.657144273593488], [25.447625359811887, 80.407340399894494]]]] } }, + { "type": "Feature", "properties": { "admin": "Nepal", "name": "Nepal", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[88.120440708369841, 27.876541652939586], [88.043132765661198, 27.445818589786818], [88.174804315140904, 26.810405178325944], [88.060237664749806, 26.414615383402484], [87.22747195836628, 26.39789805755607], [86.024392938179147, 26.630984605408567], [85.25177859898335, 26.726198431906337], [84.675017938173767, 27.234901231387528], [83.304248895199535, 27.364505723575554], [81.999987420584958, 27.925479234319987], [81.057202589851997, 28.416095282499036], [80.088424513676259, 28.794470119740136], [80.476721225917373, 29.729865220655334], [81.11125613802929, 30.183480943313398], [81.525804477874729, 30.422716986608627], [82.327512648450863, 30.115268052688126], [83.337115106137176, 29.463731594352193], [83.898992954446712, 29.320226141877654], [84.234579705750136, 28.839893703724691], [85.011638218123025, 28.642773952747337], [85.823319940131498, 28.203575954698699], [86.954517043000592, 27.97426178640351], [88.120440708369841, 27.876541652939586]]] } }, + { "type": "Feature", "properties": { "admin": "New Zealand", "name": "New Zealand", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[173.020374790740703, -40.919052422856417], [173.247234328502003, -41.331998793300777], [173.958405389702875, -40.926700534835604], [174.2475867048081, -41.349155368821663], [174.248516880589449, -41.770008233406749], [173.876446568087886, -42.233184096038819], [173.222739699595621, -42.970038344088557], [172.711246372770717, -43.372287693048492], [173.080112746470206, -43.853343601253577], [172.308583612352464, -43.865694268571332], [171.452925246463622, -44.24251881284372], [171.185137974327233, -44.897104180684885], [170.616697219116588, -45.908928724959701], [169.83142215400926, -46.355774834987585], [169.332331170934253, -46.641235446967848], [168.411353794628525, -46.619944756863582], [167.763744745146823, -46.290197442409195], [166.676886021184202, -46.219917494492236], [166.509144321964669, -45.852704766626204], [167.046424188503238, -45.110941257508664], [168.303763462596862, -44.12397307716612], [168.949408807651508, -43.93581918719142], [169.667814569373149, -43.555325616226334], [170.524919875366152, -43.031688327812823], [171.125089960004004, -42.512753594737781], [171.569713983443194, -41.767424411792128], [171.948708937871885, -41.514416599291145], [172.097227004278722, -40.956104424809674], [172.798579543343948, -40.493962090823466], [173.020374790740703, -40.919052422856417]]], [[[174.612008905330526, -36.156397393540537], [175.336615838927173, -37.209097995758263], [175.3575964704375, -36.52619394302112], [175.808886753642469, -36.798942152657681], [175.958490025127475, -37.555381768546063], [176.763195428776555, -37.881253350578696], [177.438813104560495, -37.961248467766488], [178.010354445708657, -37.579824721020124], [178.517093540762801, -37.695373223624792], [178.274731073313802, -38.582812595373092], [177.970460239979332, -39.166342868812968], [177.206992629299123, -39.145775648760839], [176.939980503647007, -39.449736423501562], [177.032946405340113, -39.879942722331471], [176.8858236026052, -40.06597787858216], [176.508017206119348, -40.60480803808958], [176.012440220440283, -41.289624118821493], [175.239567499082966, -41.688307793953236], [175.067898391009408, -41.425894870775075], [174.650972935278418, -41.281820977545443], [175.227630243223615, -40.459235528323397], [174.900156691789959, -39.908933200847216], [173.824046665743992, -39.508854262043506], [173.852261997775315, -39.146602471677461], [174.57480187408035, -38.797683200842748], [174.743473749081033, -38.027807712558378], [174.69701663645057, -37.381128838857954], [174.292028436579187, -36.71109221776144], [174.319003534235549, -36.534823907213884], [173.840996535535766, -36.121980889634109], [173.05417117745958, -35.237125339500331], [172.636005487353714, -34.529106540669382], [173.007042271209457, -34.450661716450334], [173.551298456107475, -35.006183363587958], [174.329390497126241, -35.265495700828616], [174.612008905330526, -36.156397393540537]]]] } }, + { "type": "Feature", "properties": { "admin": "Oman", "name": "Oman", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[58.861141391846573, 21.114034532144299], [58.487985874266961, 20.428985907467101], [58.03431847517659, 20.481437486243347], [57.826372511634098, 20.24300242764863], [57.66576216007094, 19.736004950433109], [57.788700392493368, 19.067570298737646], [57.694390903560667, 18.944709580963799], [57.2342639504338, 18.947991034414255], [56.609650913321971, 18.574267076079476], [56.512189162019482, 18.087113348863934], [56.283520949128011, 17.876066799383945], [55.661491733630683, 17.884128322821535], [55.269939406155189, 17.632309068263194], [55.274900343655091, 17.228354397037659], [54.791002231674113, 16.950696926333357], [54.239252964093751, 17.04498057704998], [53.57050825380459, 16.707662665264674], [53.108572625547502, 16.651051133688977], [52.782184279192066, 17.349742336491229], [52.000009800022227, 19.000003363516068], [54.999981723862405, 19.999994004796118], [55.666659376859869, 22.000001125572307], [55.208341098863187, 22.708329982997007], [55.234489373602869, 23.110992743415348], [55.52584109886449, 23.524869289640911], [55.528631626208288, 23.933604030853498], [55.981213820220503, 24.130542914317854], [55.80411868675624, 24.269604193615287], [55.88623253766805, 24.920830593357486], [56.396847365143984, 24.924732163995508], [56.845140415276049, 24.241673081961487], [57.403452589757428, 23.878594468678834], [58.136947869708322, 23.747930609628835], [58.729211460205427, 23.565667832935414], [59.180501743410346, 22.992395331305456], [59.450097690677033, 22.660270900965592], [59.80806033716285, 22.533611965418199], [59.806148309168087, 22.31052480721419], [59.442191196536399, 21.71454051359208], [59.282407667889871, 21.433885809814875], [58.861141391846573, 21.114034532144299]]], [[[56.391421339753393, 25.895990708921254], [56.261041701080913, 25.714606431576748], [56.070820753814544, 26.055464178973946], [56.362017449779344, 26.395934353128947], [56.485679152253809, 26.309117946878665], [56.391421339753393, 25.895990708921254]]]] } }, + { "type": "Feature", "properties": { "admin": "Pakistan", "name": "Pakistan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[75.158027785140902, 37.13303091078911], [75.896897414050116, 36.666806138651829], [76.192848341785677, 35.898403428687821], [77.837450799474553, 35.494009507787759], [76.871721632804011, 34.653544012992732], [75.757060988268321, 34.504922593721311], [74.240202671204955, 34.748887030571247], [73.749948358051952, 34.317698879527846], [74.104293654277328, 33.441473293586846], [74.451559279278698, 32.764899603805489], [75.258641798813187, 32.271105455040491], [74.405928989564998, 31.692639471965272], [74.421380242820263, 30.97981476493117], [73.450638462217412, 29.976413479119863], [72.823751662084689, 28.961591701772047], [71.777665643200308, 27.913180243434521], [70.61649620960192, 27.989196275335861], [69.514392938113119, 26.940965684511365], [70.168926629522005, 26.491871649678835], [70.282873162725579, 25.722228705339823], [70.844699334602822, 25.215102037043511], [71.0432401874682, 24.356523952730193], [68.842599318318761, 24.359133612560932], [68.176645135373377, 23.691965033456704], [67.443666619745457, 23.944843654876983], [67.145441928989058, 24.663611151624639], [66.37282758979326, 25.425140896093847], [64.530407749291115, 25.237038682551425], [62.905700718034595, 25.218409328710202], [61.497362908784183, 25.078237006118492], [61.874187453056535, 26.239974880472097], [63.316631707619578, 26.756532497661659], [63.23389773952028, 27.217047024030702], [62.755425652929851, 27.378923448184985], [62.727830438085974, 28.259644883735383], [61.771868117118615, 28.699333807890792], [61.369308709564926, 29.303276272085917], [60.874248488208778, 29.829238999952604], [62.549856805272775, 29.318572496044304], [63.550260858011164, 29.468330796826162], [64.148002150331237, 29.340819200145965], [64.350418735618504, 29.560030625928089], [65.046862013616092, 29.472180691031902], [66.346472609324408, 29.88794342703617], [66.38145755398601, 30.738899237586448], [66.938891229118454, 31.304911200479346], [67.683393589147457, 31.303154201781414], [67.792689243444769, 31.582930406209623], [68.556932000609308, 31.713310044882011], [68.926676873657655, 31.620189113892064], [69.317764113242546, 31.901412258424436], [69.262522007122541, 32.501944078088293], [69.687147251264847, 33.105498969041228], [70.323594191371583, 33.358532619758385], [69.93054324735958, 34.020120144175102], [70.881803012988385, 33.988855902638512], [71.156773309213449, 34.348911444632144], [71.115018751921625, 34.733125718722228], [71.613076206350698, 35.153203436822857], [71.498767938121077, 35.650563259415996], [71.262348260385735, 36.074387518857797], [71.846291945283909, 36.509942328429851], [72.920024855444453, 36.720007025696312], [74.067551710917812, 36.836175645488446], [74.575892775372964, 37.02084137628345], [75.158027785140902, 37.13303091078911]]] } }, + { "type": "Feature", "properties": { "admin": "Panama", "name": "Panama", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-77.881571417945239, 7.223771267114783], [-78.214936082660103, 7.512254950384159], [-78.429160732726061, 8.052041123888925], [-78.182095709938608, 8.319182440621772], [-78.43546525746568, 8.387705389840788], [-78.622120530903928, 8.718124497915026], [-79.120307176413732, 8.996092027213022], [-79.557877366845176, 8.932374986197145], [-79.760578172510037, 8.584515082224398], [-80.164481167303322, 8.333315944853593], [-80.382659064439608, 8.29840851484043], [-80.480689256497286, 8.090307522001067], [-80.003689948227148, 7.54752411542337], [-80.276670701808982, 7.419754136581713], [-80.421158006497066, 7.271571966984763], [-80.886400926420791, 7.220541490096535], [-81.059542812814698, 7.817921047390596], [-81.189715745757937, 7.647905585150339], [-81.519514736644666, 7.706610012233908], [-81.721311204744453, 8.108962714058434], [-82.131441209628889, 8.175392767769635], [-82.390934414382542, 8.292362372262287], [-82.820081346350406, 8.290863755725821], [-82.850958014644803, 8.073822740099954], [-82.965783047197348, 8.225027980985983], [-82.9131764391242, 8.423517157419068], [-82.829770677405151, 8.626295477732368], [-82.868657192704759, 8.807266343618521], [-82.719183112300513, 8.925708726431493], [-82.927154914059145, 9.074330145702914], [-82.932890998043561, 9.476812038608172], [-82.546196255203469, 9.566134751824674], [-82.187122565423394, 9.207448635286779], [-82.207586432610952, 8.995575262890098], [-81.808566860669259, 8.95061676679617], [-81.714154018872023, 9.031955471223581], [-81.43928707551153, 8.786234035675715], [-80.947301601876745, 8.858503526235905], [-80.521901211250054, 9.11107208906243], [-79.914599778955974, 9.312765204297618], [-79.573302781884294, 9.611610012241526], [-79.021191779277913, 9.552931423374103], [-79.058450486960353, 9.454565334506523], [-78.500887620747164, 9.420458889193879], [-78.055927700497989, 9.247730414258296], [-77.729513515926399, 8.946844387238867], [-77.353360765273848, 8.670504665558068], [-77.474722866511314, 8.524286200388216], [-77.242566494440069, 7.935278225125442], [-77.431107957656977, 7.638061224798733], [-77.75341386586139, 7.709839789252141], [-77.881571417945239, 7.223771267114783]]] } }, + { "type": "Feature", "properties": { "admin": "Peru", "name": "Peru", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-69.590423753524036, -17.580011895419329], [-69.858443569605839, -18.092693780187009], [-70.3725723944777, -18.347975355708861], [-71.375250210236914, -17.77379851651385], [-71.462040778271117, -17.363487644116379], [-73.444529588500401, -16.359362888252992], [-75.23788265654143, -15.26568287522778], [-76.009205084929931, -14.649286390850317], [-76.423469204397733, -13.823186944232431], [-76.259241502574156, -13.535039157772939], [-77.10619238962181, -12.222716159720816], [-78.092152879534623, -10.377712497604062], [-79.036953091126918, -8.38656788496589], [-79.445920376284832, -7.930833428583859], [-79.760578172510037, -7.194340915560081], [-80.537481655586049, -6.541667575713715], [-81.249996304026411, -6.136834405139182], [-80.926346808582423, -5.690556735866563], [-81.410942552399433, -4.736764825055459], [-81.099669562489353, -4.036394138203696], [-80.302560594387188, -3.404856459164712], [-80.184014858709645, -3.821161797708043], [-80.46929460317692, -4.059286797708999], [-80.442241990872134, -4.425724379090673], [-80.028908047185581, -4.346090996928893], [-79.62497921417615, -4.454198093283494], [-79.205289069317715, -4.959128513207388], [-78.639897223612323, -4.547784112164072], [-78.450683966775628, -3.873096612161375], [-77.83790483265858, -3.003020521663103], [-76.635394253226707, -2.608677666843817], [-75.544995693652027, -1.56160979574588], [-75.233722703741932, -0.911416924649529], [-75.373223232713841, -0.15203175212045], [-75.106624518520064, -0.05720549886486], [-74.441600511355958, -0.530820000819887], [-74.122395189089048, -1.002832533373848], [-73.659503546834586, -1.260491224781134], [-73.070392218707212, -2.308954359550952], [-72.325786505813639, -2.434218031426453], [-71.774760708285385, -2.169789727388937], [-71.413645799429773, -2.342802422702128], [-70.813475714791949, -2.256864515800742], [-70.047708502874841, -2.725156345229699], [-70.692682054309699, -3.742872002785858], [-70.394043952094975, -3.766591485207825], [-69.893635219996611, -4.298186944194326], [-70.79476884630229, -4.251264743673302], [-70.928843349883564, -4.401591485210367], [-71.748405727816532, -4.59398284263301], [-72.891927659787243, -5.274561455916979], [-72.964507208941185, -5.741251315944892], [-73.219711269814596, -6.089188734566076], [-73.120027431923575, -6.629930922068238], [-73.724486660441627, -6.918595472850638], [-73.723401455363486, -7.340998630404412], [-73.987235480429646, -7.523829847853063], [-73.571059332967053, -8.424446709835832], [-73.015382656532537, -9.03283334720806], [-73.226713426390148, -9.462212823121233], [-72.563033006465631, -9.520193780152715], [-72.184890713169821, -10.05359791426943], [-71.302412278921523, -10.079436130415372], [-70.481893886991159, -9.490118096558842], [-70.548685675728393, -11.009146823778462], [-70.093752204046879, -11.123971856331011], [-69.52967810736493, -10.951734307502193], [-68.665079718689611, -12.561300144097171], [-68.880079515239956, -12.89972909917665], [-68.929223802349526, -13.602683607643007], [-68.94888668483658, -14.45363941819328], [-69.339534674747, -14.953195489158828], [-69.160346645774936, -15.323973890853015], [-69.389764166934697, -15.66012908291165], [-68.959635382753291, -16.500697930571267], [-69.590423753524036, -17.580011895419329]]] } }, + { "type": "Feature", "properties": { "admin": "Philippines", "name": "Philippines", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[126.376813592637447, 8.414706325713352], [126.478512811387873, 7.750354112168976], [126.537423944200611, 7.189380601424572], [126.19677290253253, 6.274294338400038], [125.831420526229081, 7.293715318221855], [125.363852166852283, 6.78648529706099], [125.683160841983707, 6.049656887227257], [125.396511672060626, 5.581003322772288], [124.219787632342332, 6.16135549562618], [123.938719517106918, 6.88513560630612], [124.243662144061318, 7.360610459823659], [123.610212437027542, 7.833527329942753], [123.29607140512519, 7.418875637232786], [122.825505812675388, 7.457374579290216], [122.085499302255769, 6.899424139834847], [121.919928013192603, 7.192119452336072], [122.312358840017112, 8.034962063016506], [122.94239790251963, 8.316236883981174], [123.487687616063511, 8.693009751821192], [123.841154412939815, 8.240324204944384], [124.6014697612502, 8.514157619659015], [124.764612257995623, 8.960409450715458], [125.471390822451539, 8.986996975129641], [125.412117954612754, 9.760334784377545], [126.222714471543156, 9.28607432701885], [126.306636997585073, 8.782487494334573], [126.376813592637447, 8.414706325713352]]], [[[123.982437778825798, 10.278778591345811], [123.62318322153277, 9.950090643753297], [123.309920688979332, 9.318268744336676], [122.995883009941636, 9.022188625520398], [122.380054966319463, 9.713360907424201], [122.586088901867072, 9.981044826696104], [122.837081333508706, 10.261156927934234], [122.947410516451896, 10.881868394408029], [123.498849725438447, 10.940624497923945], [123.337774285984722, 10.267383938025445], [124.077935825701218, 11.232725531453706], [123.982437778825798, 10.278778591345811]]], [[[118.504580926590336, 9.316382554558087], [117.174274530100675, 8.367499904814663], [117.664477166821371, 9.066888739452933], [118.386913690261736, 9.684499619989223], [118.98734215706105, 10.376292019080507], [119.511496209797528, 11.36966807702721], [119.689676548339889, 10.554291490109872], [119.029458449378978, 10.003653265823869], [118.504580926590336, 9.316382554558087]]], [[[121.883547804859106, 11.891755072471977], [122.483821242361458, 11.582187404827506], [123.120216506035959, 11.583660183147867], [123.100837843926442, 11.165933742716486], [122.637713657726692, 10.741308498574226], [122.002610304859559, 10.441016750526087], [121.967366978036523, 10.905691229694622], [122.038370396005519, 11.415840969280039], [121.883547804859106, 11.891755072471977]]], [[[125.502551711123488, 12.162694606978347], [125.783464797062152, 11.046121934447767], [125.01188398651226, 11.311454576050377], [125.032761265158115, 10.975816148314703], [125.277449172060244, 10.358722032101308], [124.801819289245714, 10.134678859899889], [124.760168084818474, 10.8379951033923], [124.459101190286049, 10.889929917845633], [124.302521600441722, 11.495370998577227], [124.891012811381572, 11.415582587118589], [124.877990350443952, 11.794189968304988], [124.266761509295705, 12.557760931849682], [125.22711632700782, 12.53572093347719], [125.502551711123488, 12.162694606978347]]], [[[121.527393833503481, 13.069590155484516], [121.262190382981544, 12.2055602075644], [120.833896112146533, 12.704496161342416], [120.323436313967477, 13.466413479053866], [121.18012820850214, 13.429697373910439], [121.527393833503481, 13.069590155484516]]], [[[121.321308221523566, 18.504064642811013], [121.937601353036371, 18.21855235439838], [122.246006300954264, 18.478949896717094], [122.336956821787965, 18.224882717354173], [122.174279412933174, 17.810282701076371], [122.51565392465335, 17.09350474697197], [122.252310825693883, 16.262444362854122], [121.662786086108255, 15.931017564350125], [121.505069614753367, 15.124813544164621], [121.728828566577249, 14.328376369682244], [122.258925409027313, 14.218202216035973], [122.701275669445636, 14.336541245984417], [123.950295037940236, 13.782130642141066], [123.855107049658599, 13.237771104378464], [124.181288690284873, 12.997527370653469], [124.077419061378222, 12.536676947474573], [123.298035109552245, 13.027525539598981], [122.928651971529902, 13.552919826710404], [122.671355015148663, 13.185836289925131], [122.034649692880521, 13.784481919810343], [121.126384718918587, 13.636687323455559], [120.628637323083296, 13.857655747935649], [120.679383579593832, 14.271015529838319], [120.99181928923052, 14.525392767795079], [120.693336216312687, 14.756670640517282], [120.564145135582976, 14.396279201713821], [120.070428501466367, 14.970869452367094], [119.920928582846102, 15.406346747290735], [119.883773228028247, 16.363704331929963], [120.286487664878791, 16.034628811095327], [120.39004723519173, 17.599081122299506], [120.7158671407919, 18.505227362537536], [121.321308221523566, 18.504064642811013]]]] } }, + { "type": "Feature", "properties": { "admin": "Papua New Guinea", "name": "Papua New Guinea", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[155.880025669578401, -6.819996840037758], [155.599991082988765, -6.919990736522491], [155.166994256815087, -6.535931491729299], [154.729191522438327, -5.900828138862208], [154.514114211239644, -5.139117526880012], [154.652503696917336, -5.042430922061839], [154.759990676084357, -5.339983819198493], [155.062917922179338, -5.566791680527486], [155.547746209941693, -6.200654799019658], [156.019965448224752, -6.540013929880386], [155.880025669578401, -6.819996840037758]]], [[[151.982795851854462, -5.478063246282344], [151.459106887008659, -5.560280450058739], [151.301390415653884, -5.840728448106701], [150.754447056276661, -6.083762709175387], [150.241196730753813, -6.317753594592984], [149.709963006793316, -6.316513360218051], [148.890064732050462, -6.026040134305432], [148.318936802360696, -5.74714242922613], [148.401825799756864, -5.437755629094722], [149.298411900020824, -5.583741550319216], [149.845561965127217, -5.505503431829339], [149.996250441690279, -5.026101169457674], [150.139755894164921, -5.001348158389788], [150.236907586873485, -5.53222014732428], [150.807467075808063, -5.455842380396886], [151.089672072553981, -5.113692722192368], [151.647880894170811, -4.757073662946168], [151.537861769821518, -4.167807305521889], [152.136791620084352, -4.148790378438519], [152.338743117480988, -4.31296640382976], [152.318692661751754, -4.867661228050748], [151.982795851854462, -5.478063246282344]]], [[[147.191873814074938, -7.388024183789978], [148.084635858349372, -8.044108168167609], [148.734105259393573, -9.104663588093755], [149.306835158484432, -9.071435642130067], [149.266630894161324, -9.514406019736027], [150.038728469034311, -9.684318129111698], [149.738798456012262, -9.872937106977002], [150.801627638959133, -10.29368661869742], [150.690574985963849, -10.582712904505865], [150.028393182575826, -10.652476088099929], [149.782310012001972, -10.393267103723941], [148.923137648717216, -10.28092253992136], [147.913018426707993, -10.130440769087469], [147.135443150012236, -9.492443536012017], [146.567880894150619, -8.942554619994153], [146.048481073184917, -8.067414239131308], [144.74416792213799, -7.630128269077473], [143.897087844009661, -7.915330498896279], [143.286375767184268, -8.245491224809056], [143.413913202080664, -8.983068942910945], [142.628431431244223, -9.326820570516501], [142.068258905200196, -9.159595635620034], [141.033851760013874, -9.117892754760417], [141.017056919519007, -5.85902190513802], [141.000210402591847, -2.600151055515624], [142.735246616791443, -3.289152927263216], [144.583970982033236, -3.861417738463401], [145.27317955950997, -4.373737888205027], [145.829786411725649, -4.876497897972683], [145.981921828392956, -5.465609226100012], [147.648073358347574, -6.083659356310803], [147.891107619416175, -6.614014580922315], [146.970905389594861, -6.721656589386255], [147.191873814074938, -7.388024183789978]]], [[[153.14003787659874, -4.499983412294113], [152.827292108368255, -4.766427097190998], [152.63867313050298, -4.176127211120927], [152.406025832324929, -3.789742526874561], [151.953236932583536, -3.462062269711821], [151.384279413050024, -3.035421644710111], [150.6620495953388, -2.741486097833956], [150.939965448204532, -2.500002129734028], [151.479984165654514, -2.779985039891386], [151.820015090135087, -2.999971612157907], [152.239989455371074, -3.24000864015366], [152.640016717742526, -3.659983005389647], [153.019993524384631, -3.980015150573293], [153.14003787659874, -4.499983412294113]]]] } }, + { "type": "Feature", "properties": { "admin": "Poland", "name": "Poland", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[15.016995883858666, 51.106674099321566], [14.607098422919531, 51.745188096719964], [14.685026482815685, 52.089947414755187], [14.437599725002197, 52.624850165408382], [14.074521111719488, 52.981262518925426], [14.353315463934136, 53.248171291712957], [14.119686313542584, 53.757029120491026], [14.802900424873455, 54.050706285205735], [16.363477003655728, 54.513158677785711], [17.622831658608671, 54.851535956432897], [18.620858595461637, 54.682605699270766], [18.696254510175461, 54.438718777069276], [19.6606400896064, 54.426083889373913], [20.89224450041862, 54.312524929412518], [22.731098667092649, 54.327536932993311], [23.243987257589506, 54.220566718149129], [23.484127638449841, 53.912497667041123], [23.527535841574995, 53.47012156840654], [23.804934930117774, 53.08973135030606], [23.799198846133375, 52.691099351606553], [23.19949384938618, 52.486977444053664], [23.508002150168689, 52.023646552124717], [23.52707075368437, 51.578454087930233], [24.029985792748899, 50.705406602575174], [23.922757195743259, 50.424881089878738], [23.426508416444388, 50.308505764357449], [22.518450148211596, 49.476773586619736], [22.776418898212619, 49.027395331409608], [22.558137648211751, 49.08573802346713], [21.607808058364206, 49.470107326854077], [20.887955356538406, 49.328772284535823], [20.415839471119849, 49.431453355499755], [19.825022820726865, 49.217125352569219], [19.320712517990469, 49.571574001659179], [18.909574822676316, 49.435845852244562], [18.85314415861361, 49.496229763377634], [18.392913852622168, 49.988628648470737], [17.649445021238986, 50.049038397819942], [17.554567091551117, 50.36214590107641], [16.868769158605655, 50.473973700556016], [16.719475945714429, 50.215746568393527], [16.176253289462263, 50.4226073268579], [16.238626743238566, 50.697732652379827], [15.490972120839725, 50.7847299261432], [15.016995883858666, 51.106674099321566]]] } }, + { "type": "Feature", "properties": { "admin": "Puerto Rico", "name": "Puerto Rico", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-66.2824344550082, 18.51476166429536], [-65.771302863209286, 18.426679185453875], [-65.591003790942935, 18.228034979723912], [-65.847163865813755, 17.975905666571855], [-66.599934455009475, 17.98182261806927], [-67.184162360285256, 17.946553453030074], [-67.24242753769434, 18.374460150622934], [-67.100679083917726, 18.520601101144347], [-66.2824344550082, 18.51476166429536]]] } }, + { "type": "Feature", "properties": { "admin": "North Korea", "name": "Dem. Rep. Korea", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[130.640015903852401, 42.39500946712527], [130.780007358931101, 42.220007229168843], [130.400030552288996, 42.280003567059701], [129.965948521037234, 41.941367906251052], [129.667362095254788, 41.601104437825221], [129.705189243692445, 40.882827867184318], [129.188114862179958, 40.661807766271984], [129.010399611528186, 40.485436102859801], [128.633368361526692, 40.189846910150301], [127.967414178581322, 40.025412502597547], [127.533435500194145, 39.756850083976694], [127.502119582225276, 39.323930772451526], [127.385434198110261, 39.213472398427648], [127.783342726757709, 39.050898342437414], [128.349716424676586, 38.612242946927843], [128.205745884311426, 38.370397243801882], [127.780035435090966, 38.304535630845884], [127.073308547067342, 38.256114813788393], [126.683719924018888, 37.804772854151174], [126.237338901881742, 37.840377916000271], [126.174758742376213, 37.749685777328033], [125.689103631697165, 37.940010077459014], [125.568439162295675, 37.752088731429616], [125.275330438336184, 37.66907054295271], [125.24008711151312, 37.857224432927424], [124.981033156433952, 37.948820909164773], [124.712160679219352, 38.108346055649783], [124.985994093933954, 38.548474229479673], [125.221948683778677, 38.665857245430665], [125.13285851450749, 38.848559271798578], [125.386589797060566, 39.387957872061158], [125.321115757346774, 39.551384589184202], [124.737482131042384, 39.660344346671614], [124.265624627785286, 39.928493353834149], [125.079941847840615, 40.569823716792442], [126.182045119329402, 41.107336127276362], [126.86908328664984, 41.816569322266176], [127.343782993682993, 41.50315176041596], [128.208433058790632, 41.466771552082477], [128.052215203972281, 41.994284572917934], [129.59666873587949, 42.424981797854542], [129.994267205933198, 42.985386867843779], [130.640015903852401, 42.39500946712527]]] } }, + { "type": "Feature", "properties": { "admin": "Portugal", "name": "Portugal", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[-9.034817674180244, 41.880570583659669], [-8.671945766626719, 42.134689439454952], [-8.26385698081779, 42.280468654950326], [-8.01317460776991, 41.790886135417118], [-7.422512986673794, 41.792074693359822], [-7.251308966490822, 41.91834605566504], [-6.668605515967655, 41.883386949219577], [-6.389087693700914, 41.381815497394641], [-6.851126674822551, 41.111082668617513], [-6.864019944679383, 40.330871893874821], [-7.026413133156593, 40.184524237624238], [-7.066591559263527, 39.711891587882768], [-7.498632371439724, 39.629571031241802], [-7.098036668313126, 39.03007274022378], [-7.374092169616317, 38.373058580064914], [-7.029281175148794, 38.075764065089757], [-7.166507941099863, 37.803894354802217], [-7.537105475281022, 37.428904323876232], [-7.45372555177809, 37.097787583966053], [-7.855613165711985, 36.838268540996253], [-8.382816127953687, 36.978880113262449], [-8.898856980820325, 36.868809312480771], [-8.746101446965552, 37.6513455266766], [-8.839997524439879, 38.266243394517609], [-9.287463751655221, 38.358485826158592], [-9.526570603869713, 38.737429104154906], [-9.44698889814023, 39.392066148428363], [-9.048305223008425, 39.755093085278766], [-8.977353481471679, 40.159306138665798], [-8.7686840478771, 40.76063894303018], [-8.790853237330309, 41.18433401139125], [-8.990789353867568, 41.543459377603625], [-9.034817674180244, 41.880570583659669]]] } }, + { "type": "Feature", "properties": { "admin": "Paraguay", "name": "Paraguay", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-62.685057135657871, -22.24902922942238], [-62.291179368729203, -21.051634616787389], [-62.265961269770784, -20.513734633061272], [-61.786326463453761, -19.633736667562957], [-60.043564622626477, -19.342746677327419], [-59.11504248720609, -19.356906019775398], [-58.183471442280492, -19.868399346600359], [-58.166392381408038, -20.176700941653674], [-57.870673997617786, -20.732687676681948], [-57.937155727761287, -22.090175876557169], [-56.881509568902885, -22.282153822521476], [-56.473317430229379, -22.086300144135279], [-55.797958136606894, -22.356929620047815], [-55.61068274598113, -22.655619398694839], [-55.517639329639621, -23.57199757252663], [-55.400747239795407, -23.956935316668797], [-55.027901780809543, -24.001273695575225], [-54.652834235235119, -23.839578138933955], [-54.292959560754511, -24.021014092710722], [-54.293476325077435, -24.570799655863958], [-54.428946092330577, -25.162184747012162], [-54.625290696823562, -25.739255466415507], [-54.788794928595038, -26.621785577096126], [-55.695845506398143, -27.387837009390857], [-56.486701626192989, -27.548499037386286], [-57.609759690976134, -27.395898532828383], [-58.618173590719735, -27.123718763947089], [-57.633660040911117, -25.603656508081638], [-57.777217169817924, -25.162339776309032], [-58.807128465394968, -24.771459242453307], [-60.028966030504016, -24.032796319273267], [-60.846564704009907, -23.880712579038288], [-62.685057135657871, -22.24902922942238]]] } }, + { "type": "Feature", "properties": { "admin": "Palestine", "name": "Palestine", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[35.545665317534535, 32.393992011030569], [35.545251906076196, 31.782504787720832], [35.397560662586038, 31.489086005167572], [34.927408481594554, 31.35343537040141], [34.970506626125989, 31.616778469360803], [35.225891554512422, 31.754341132121759], [34.974640740709319, 31.866582343059715], [35.183930291491428, 32.532510687788935], [35.545665317534535, 32.393992011030569]]] } }, + { "type": "Feature", "properties": { "admin": "Qatar", "name": "Qatar", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[50.810108270069563, 24.754742539971371], [50.743910760303677, 25.482424221289389], [51.01335167827348, 26.006991685484191], [51.286461622936045, 26.114582017515865], [51.589078810437243, 25.801112779233375], [51.606700473848804, 25.215670477798735], [51.389607781790623, 24.627385972588051], [51.112415398977006, 24.556330878186721], [50.810108270069563, 24.754742539971371]]] } }, + { "type": "Feature", "properties": { "admin": "Romania", "name": "Romania", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[22.710531447040488, 47.882193915389394], [23.142236362406798, 48.096341050806942], [23.760958286237404, 47.985598456405448], [24.402056105250374, 47.981877753280422], [24.866317172960571, 47.737525743188307], [25.207743361112986, 47.891056423527459], [25.945941196402394, 47.987148749374207], [26.197450392366925, 48.220881252630342], [26.619336785597788, 48.220726223333457], [26.924176059687561, 48.123264472030982], [27.233872918412736, 47.826770941756365], [27.551166212684841, 47.405117092470817], [28.128030226359037, 46.81047638608824], [28.160017937947707, 46.371562608417207], [28.054442986775392, 45.944586086605618], [28.233553501099035, 45.488283189468369], [28.679779493939371, 45.30403087013169], [29.149724969201646, 45.464925442072442], [29.603289015427425, 45.293308010431119], [29.62654340995876, 45.035390936862392], [29.141611769331831, 44.820210272799038], [28.837857700320196, 44.913873806328041], [28.55808149589199, 43.707461656258118], [27.970107049275068, 43.812468166675202], [27.242399529740904, 44.175986029632398], [26.065158725699739, 43.943493760751259], [25.569271681426923, 43.688444729174712], [24.100679152124169, 43.741051337247846], [23.332302280376322, 43.897010809904707], [22.94483239105184, 43.823785305347123], [22.657149692482985, 44.234923000661276], [22.474008416440594, 44.409227606781762], [22.705725538837349, 44.578002834647016], [22.459022251075933, 44.702517198254291], [22.145087924902807, 44.478422349620573], [21.562022739353605, 44.768947251965486], [21.483526238702233, 45.181170152357772], [20.874312778413351, 45.416375433934228], [20.76217492033998, 45.734573065771428], [20.220192498462833, 46.127468980486547], [21.021952345471245, 46.316087958351886], [21.626514926853869, 46.994237779318148], [22.09976769378283, 47.672439276716695], [22.710531447040488, 47.882193915389394]]] } }, + { "type": "Feature", "properties": { "admin": "Russia", "name": "Russia", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[143.648007440362846, 50.747600409541512], [144.65414757708561, 48.976390692737581], [143.173927850517174, 49.306551418650365], [142.558668247650076, 47.861575018904908], [143.533492466404027, 46.836728013692479], [143.505277134372591, 46.137907619809475], [142.747700636973889, 46.740764878926562], [142.092030064054484, 45.966755276058777], [141.906925083585008, 46.805928860046535], [142.018442824470867, 47.780132961612921], [141.904444614835029, 48.859188544299563], [142.135800002205656, 49.615163072297449], [142.179983351815281, 50.952342434281903], [141.594075962490024, 51.935434882202529], [141.682546014573632, 53.301966457728767], [142.606934035410745, 53.762145087287891], [142.209748976815376, 54.225475979216853], [142.654786411712934, 54.365880845753864], [142.914615513276544, 53.704577541714734], [143.260847609632037, 52.740760403039033], [143.235267775647628, 51.756660264688733], [143.648007440362846, 50.747600409541512]]], [[[22.731098667092649, 54.327536932993311], [20.892244500418652, 54.312524929412568], [19.6606400896064, 54.42608388937397], [19.88848147958134, 54.866160386771483], [21.268448927503492, 55.190481675835279], [22.315723504330599, 55.015298570365886], [22.757763706155281, 54.856574408581416], [22.651051873472564, 54.582740993866693], [22.731098667092649, 54.327536932993311]]], [[[180.000000000000114, 70.832199208546669], [178.903425, 70.78114], [178.7253, 71.0988], [180.000000000000114, 71.515714336428246], [180.000000000000114, 70.832199208546669]]], [[[143.60385, 73.21244], [142.08763, 73.20544], [140.038155, 73.31692], [139.86312, 73.36983], [140.81171, 73.76506], [142.06207, 73.85758], [143.48283, 73.47525], [143.60385, 73.21244]]], [[[150.73167, 75.08406], [149.575925, 74.68892], [147.977465, 74.778355], [146.11919, 75.17298], [146.358485, 75.49682], [148.22223, 75.345845], [150.73167, 75.08406]]], [[[145.086285, 75.562625], [144.3, 74.82], [140.61381, 74.84768], [138.95544, 74.61148], [136.97439, 75.26167], [137.51176, 75.94917], [138.831075, 76.13676], [141.471615, 76.09289], [145.086285, 75.562625]]], [[[57.535692579992386, 70.720463975702145], [56.944979282463933, 70.63274323188665], [53.677375115784187, 70.762657782668455], [53.412016635965372, 71.206661688920192], [51.601894565645708, 71.474759019650477], [51.455753615124209, 72.014881089965129], [52.478275180883564, 72.229441636840946], [52.444168735570841, 72.77473135038484], [54.427613559797649, 73.627547512497571], [53.508289829325136, 73.749813951300141], [55.902458937407644, 74.627486477345329], [55.631932814359701, 75.081412258597155], [57.868643833248839, 75.609390367323186], [61.170044386647497, 76.251883450008123], [64.498368361270209, 76.439055487769267], [66.210977003855092, 76.809782213031227], [68.157059767534818, 76.939696763812904], [68.852211134725124, 76.544811306454605], [68.180572544227644, 76.233641669409096], [64.637326287703004, 75.737754625136219], [61.583507521414752, 75.260884507946784], [58.477082147053366, 74.309056301562819], [56.986785516187993, 73.333043524866227], [55.41933597191094, 72.371267605265956], [55.622837762276291, 71.540594794390316], [57.535692579992386, 70.720463975702145]]], [[[106.970130000000111, 76.97419], [107.240000000000123, 76.48], [108.1538, 76.723350000000138], [111.077260000000138, 76.71], [113.33151, 76.22224], [114.13417, 75.84764], [113.88539, 75.327790000000121], [112.77918, 75.03186], [110.151250000000175, 74.47673], [109.4, 74.18], [110.64, 74.04], [112.11919, 73.787740000000113], [113.019540000000234, 73.976930000000138], [113.529580000000294, 73.33505], [113.96881, 73.59488], [115.56782, 73.75285], [118.776330000000215, 73.58772], [119.02, 73.12], [123.20066, 72.97122], [123.257770000000178, 73.73503], [125.380000000000166, 73.56], [126.97644, 73.56549], [128.59126, 73.03871], [129.05157, 72.39872], [128.46, 71.98], [129.715990000000204, 71.19304], [131.288580000000252, 70.786990000000102], [132.253500000000145, 71.8363], [133.857660000000294, 71.386420000000143], [135.56193, 71.655250000000123], [137.49755, 71.34763], [138.234090000000123, 71.62803], [139.86983, 71.487830000000116], [139.14791, 72.4161900000001], [140.46817, 72.849410000000134], [149.5, 72.2], [150.35118000000017, 71.60643], [152.96890000000019, 70.84222], [157.00688, 71.03141], [158.99779, 70.86672], [159.830310000000225, 70.45324], [159.70866, 69.72198], [160.94053000000028, 69.43728], [162.279070000000104, 69.64204], [164.05248, 69.66823], [165.940370000000172, 69.47199], [167.83567, 69.58269], [169.57763000000017, 68.6938], [170.816880000000253, 69.01363], [170.008200000000159, 69.65276], [170.453450000000259, 70.09703], [173.643910000000204, 69.81743], [175.72403000000017, 69.877250000000217], [178.6, 69.4], [180.000000000000114, 68.963636363636553], [180.000000000000114, 64.979708702198465], [179.99281, 64.97433], [178.707200000000199, 64.53493], [177.411280000000147, 64.60821], [178.313000000000187, 64.07593], [178.90825000000018, 63.251970000000128], [179.37034, 62.98262], [179.48636, 62.56894], [179.228250000000116, 62.304100000000133], [177.3643, 62.5219], [174.569290000000194, 61.76915], [173.68013, 61.65261], [172.15, 60.95], [170.6985, 60.33618], [170.330850000000282, 59.88177], [168.90046, 60.57355], [166.294980000000265, 59.7885500000002], [165.840000000000202, 60.16], [164.87674, 59.7316], [163.539290000000108, 59.86871], [163.217110000000218, 59.21101], [162.01733, 58.24328], [162.05297, 57.83912], [163.19191, 57.61503], [163.057940000000144, 56.159240000000111], [162.129580000000203, 56.12219], [161.70146, 55.285680000000148], [162.117490000000117, 54.85514], [160.368770000000325, 54.34433], [160.021730000000218, 53.20257], [158.530940000000157, 52.958680000000236], [158.23118, 51.94269], [156.789790000000266, 51.01105], [156.42000000000013, 51.7], [155.99182, 53.15895], [155.43366, 55.381030000000109], [155.914420000000291, 56.767920000000132], [156.75815, 57.3647], [156.81035, 57.83204], [158.364330000000166, 58.05575], [160.150640000000124, 59.314770000000109], [161.87204, 60.343000000000117], [163.66969, 61.1409], [164.473550000000103, 62.55061], [163.258420000000172, 62.46627], [162.65791, 61.6425], [160.12148, 60.54423], [159.30232, 61.77396], [156.72068, 61.43442], [154.218060000000293, 59.758180000000117], [155.04375, 59.14495], [152.81185, 58.88385], [151.265730000000246, 58.78089], [151.33815, 59.50396], [149.78371, 59.655730000000126], [148.54481, 59.16448], [145.48722, 59.33637], [142.197820000000121, 59.03998], [138.958480000000293, 57.08805], [135.12619, 54.72959], [136.70171, 54.603550000000112], [137.19342, 53.97732], [138.1647, 53.755010000000247], [138.80463, 54.25455], [139.90151, 54.189680000000166], [141.34531, 53.089570000000109], [141.37923, 52.23877], [140.59742000000017, 51.23967], [140.51308, 50.045530000000113], [140.061930000000189, 48.446710000000152], [138.554720000000202, 46.99965], [138.21971, 46.30795], [136.86232, 45.143500000000174], [135.515350000000183, 43.989], [134.869390000000237, 43.39821], [133.536870000000249, 42.81147], [132.90627, 42.79849], [132.278070000000241, 43.284560000000106], [130.935870000000136, 42.55274], [130.78, 42.220000000000191], [130.640000000000157, 42.395], [130.633866408409801, 42.903014634770543], [131.144687941614961, 42.929989732426932], [131.288555129115593, 44.111519680348252], [131.025190000000237, 44.96796], [131.883454217659562, 45.321161607436508], [133.097120000000189, 45.14409], [133.769643996313164, 46.116926988299149], [134.112350000000163, 47.212480000000127], [134.50081, 47.578450000000139], [135.026311476786759, 48.478229885443902], [133.373595819228001, 48.183441677434836], [132.506690000000106, 47.78896], [130.987260000000106, 47.79013], [130.582293328982644, 48.72968740497619], [129.397817824420486, 49.4406000840156], [127.657400000000351, 49.76027], [127.287455682484904, 50.739797268265434], [126.939156528837827, 51.353894151405896], [126.564399041856959, 51.784255479532689], [125.946348911646439, 52.792798570356936], [125.068211297710434, 53.161044826868924], [123.57147, 53.4588], [122.245747918793043, 53.431725979213681], [121.003084751470354, 53.251401068731226], [120.177088657716865, 52.753886216841195], [120.725789015791975, 52.516226304730893], [120.7382, 51.96411], [120.182080000000155, 51.64355], [119.27939, 50.58292], [119.288460728025839, 50.142882798861947], [117.87924441942647, 49.510983384797036], [116.67880089728618, 49.888531399121398], [115.485695428531415, 49.805177313834733], [114.962109816550353, 50.140247300815119], [114.362456496235325, 50.24830272073747], [112.897739699354361, 49.543565375356984], [111.581230910286649, 49.377968248077671], [110.662010532678835, 49.130128078805846], [109.402449171996707, 49.292960516957685], [108.475167270951275, 49.282547715850704], [107.868175897251092, 49.793705145865871], [106.888804152455293, 50.274295966180276], [105.886591424586868, 50.40601919209216], [104.62158, 50.275320000000157], [103.676545444760336, 50.08996613219513], [102.25589, 50.510560000000105], [102.06521, 51.25991], [100.889480421962631, 51.516855780638409], [99.981732212323564, 51.63400625264395], [98.861490513100492, 52.047366034546698], [97.82573978067451, 51.010995184933236], [98.231761509191699, 50.422400621128716], [97.259760000000199, 49.72605], [95.814020000000156, 49.977460000000114], [94.815949334698757, 50.01343333597088], [94.147566359435601, 50.480536607457161], [93.10421, 50.49529], [92.234711541719676, 50.802170722041737], [90.713667433640765, 50.331811835321098], [88.805566847695573, 49.470520738312459], [87.751264276076824, 49.297197984405543], [87.359970330762692, 49.214980780629148], [86.829356723989648, 49.826674709668133], [85.541269972682485, 49.69285858824815], [85.115559523462082, 50.117302964877631], [84.416377394553038, 50.311399644565817], [83.935114780618903, 50.889245510453563], [83.383003778012451, 51.069182847693881], [81.945985548839943, 50.812195949906325], [80.568446893235446, 51.388336493528435], [80.035559523441705, 50.864750881547209], [77.80091556184432, 53.404414984747532], [76.525179477854749, 54.177003485727127], [76.891100294913443, 54.490524400441913], [74.384820000000119, 53.546850000000113], [73.425678745420512, 53.489810289109741], [73.50851606638436, 54.035616766976588], [72.224150018202195, 54.376655381886778], [71.180131056609468, 54.133285224008247], [70.86526655465515, 55.169733588270091], [69.068166945272893, 55.385250149143488], [68.169100376258896, 54.970391750704366], [65.66687, 54.601250000000149], [65.178533563095939, 54.354227810272064], [61.436600000000126, 54.00625], [60.978066440683236, 53.664993394579128], [61.69998619980062, 52.979996446334255], [60.73999311711453, 52.719986477257734], [60.927268507740237, 52.447548326214999], [59.967533807215567, 51.96042043721566], [61.588003371024136, 51.272658799843171], [61.337424350840998, 50.799070136104248], [59.932807244715555, 50.842194118851822], [59.642282342370564, 50.545442206415707], [58.363320000000122, 51.06364], [56.77798, 51.04355], [55.71694, 50.621710000000142], [54.532878452376181, 51.026239732459359], [52.328723585831042, 51.718652248738088], [50.766648390512174, 51.692762356159861], [48.702381626181044, 50.605128485712825], [48.577841424357601, 49.87475962991563], [47.549480421749379, 50.454698391311119], [46.751596307162764, 49.356005764353725], [47.043671502476585, 49.152038886097571], [46.466445753776291, 48.394152330104923], [47.315240000000152, 47.71585], [48.05725, 47.74377], [48.694733514201872, 47.075628160177885], [48.59325000000014, 46.56104], [49.101160000000121, 46.39933], [48.645410000000105, 45.80629], [47.67591, 45.641490000000111], [46.68201, 44.6092], [47.59094, 43.660160000000118], [47.49252, 42.98658], [48.58437000000017, 41.80888], [47.987283156126033, 41.405819200194387], [47.815665724484653, 41.151416124021338], [47.373315464066387, 41.219732367511135], [46.686070591016708, 41.827137152669899], [46.404950799348924, 41.860675157227426], [45.7764, 42.092440000000224], [45.470279168485909, 42.502780666670041], [44.537622918482057, 42.711992702803677], [43.93121, 42.554960000000101], [43.755990000000182, 42.74083], [42.394400000000154, 43.2203], [40.922190000000128, 43.382150000000131], [40.076964959479838, 43.553104153002486], [39.95500857927108, 43.434997666999287], [38.68, 44.28], [37.539120000000104, 44.65721], [36.675460000000122, 45.24469], [37.40317, 45.40451], [38.23295, 46.24087], [37.67372, 46.63657], [39.14767, 47.044750000000128], [39.121200000000123, 47.26336], [38.22353803889947, 47.102189846375971], [38.2551123390298, 47.546400458356956], [38.77057, 47.825620000000228], [39.738277622238982, 47.898937079452068], [39.895620000000136, 48.23241], [39.67465, 48.783820000000127], [40.080789015469477, 49.307429917999364], [40.069040000000108, 49.60105], [38.594988234213552, 49.926461900423718], [38.010631137857068, 49.915661526074715], [37.393459506995228, 50.383953355503664], [36.626167840325387, 50.225590928745127], [35.35611616388811, 50.577197374059139], [35.37791, 50.77394], [35.02218305841793, 51.207572333371495], [34.224815708154402, 51.255993150428921], [34.141978387190612, 51.56641347920619], [34.391730584457228, 51.768881740925892], [33.75269982273587, 52.335074571331646], [32.715760532367163, 52.238465481162159], [32.412058139787767, 52.288694973349763], [32.15944000000021, 52.061250000000101], [31.78597, 52.10168], [31.540018344862254, 52.742052313846429], [31.305200636527978, 53.073995876673301], [31.49764, 53.167430000000124], [32.304519484188368, 53.132726141972839], [32.693643019346119, 53.351420803432141], [32.405598585751157, 53.618045355842], [31.731272820774585, 53.794029446012011], [31.791424187962399, 53.974638576872181], [31.384472283663818, 54.157056382862365], [30.757533807098774, 54.811770941784388], [30.971835971813245, 55.08154775656412], [30.873909132620064, 55.55097646750351], [29.896294386522435, 55.789463202530484], [29.371571893030783, 55.670090643936263], [29.229513380660389, 55.918344224666399], [28.176709425577933, 56.169129950578778], [27.855282016722519, 56.759326483784363], [27.770015903440985, 57.244258124411189], [27.288184848751648, 57.474528306703903], [27.716685825315771, 57.791899115624439], [27.420150000000202, 58.724570000000128], [28.131699253051856, 59.300825100330982], [27.98112, 59.47537], [29.1177, 60.028050000000107], [28.07, 60.503520000000137], [30.211107212044645, 61.780027777749673], [31.139991082491029, 62.357692776124431], [31.516092156711263, 62.867687486412898], [30.035872430142796, 63.552813625738551], [30.444684686003736, 64.204453436939062], [29.544429559047014, 64.948671576590542], [30.21765, 65.80598], [29.054588657352376, 66.944286200622017], [29.977426385220689, 67.69829702419274], [28.445943637818765, 68.364612942163987], [28.591929559043358, 69.064776923286686], [29.39955, 69.15692000000017], [31.101080000000103, 69.55811], [32.132720000000255, 69.905950000000232], [33.77547, 69.301420000000107], [36.51396, 69.06342], [40.292340000000159, 67.9324], [41.059870000000124, 67.457130000000106], [41.125950000000174, 66.79158000000011], [40.01583, 66.266180000000119], [38.38295, 65.99953], [33.918710000000168, 66.75961], [33.18444, 66.63253], [34.81477, 65.900150000000124], [34.87857425307876, 65.436212877048192], [34.943910000000152, 64.414370000000147], [36.23129, 64.10945], [37.012730000000111, 63.84983], [37.141970000000143, 64.33471], [36.539579035089801, 64.76446], [37.176040000000135, 65.143220000000113], [39.59345, 64.520790000000162], [40.4356, 64.76446], [39.762600000000148, 65.49682], [42.09309, 66.47623], [43.01604000000011, 66.41858], [43.94975000000013, 66.06908], [44.53226, 66.756340000000122], [43.69839, 67.35245], [44.187950000000136, 67.95051], [43.45282, 68.57079], [46.250000000000135, 68.25], [46.821340000000156, 67.68997], [45.55517, 67.56652], [45.56202, 67.010050000000192], [46.349150000000137, 66.66767], [47.894160000000248, 66.884550000000146], [48.13876, 67.52238], [50.227660000000142, 67.998670000000132], [53.717430000000164, 68.85738], [54.47171, 68.80815], [53.485820000000118, 68.20131], [54.72628, 68.09702], [55.442680000000124, 68.43866], [57.317020000000149, 68.46628], [58.802000000000206, 68.88082], [59.941420000000178, 68.27844], [61.077840000000165, 68.94069], [60.03, 69.52], [60.55, 69.85], [63.504000000000147, 69.54739], [64.888115, 69.234835000000132], [68.512160000000108, 68.09233000000016], [69.18068, 68.61563000000011], [68.16444, 69.14436], [68.13522, 69.35649], [66.930080000000103, 69.454610000000102], [67.25976, 69.92873], [66.724920000000125, 70.708890000000125], [66.69466, 71.028970000000228], [68.540060000000111, 71.934500000000227], [69.19636, 72.843360000000146], [69.94, 73.04000000000012], [72.58754, 72.77629], [72.79603, 72.22006], [71.84811, 71.40898], [72.47011, 71.09019], [72.79188, 70.39114], [72.564700000000201, 69.02085], [73.66787, 68.4079], [73.2387, 67.7404], [71.280000000000101, 66.320000000000149], [72.423010000000147, 66.172670000000167], [72.82077, 66.53267], [73.920990000000131, 66.789460000000119], [74.186510000000183, 67.28429], [75.052, 67.760470000000154], [74.469260000000148, 68.32899], [74.93584, 68.98918], [73.84236, 69.07146], [73.601870000000204, 69.62763], [74.3998, 70.63175], [73.1011, 71.447170000000241], [74.890820000000204, 72.12119], [74.65926, 72.83227], [75.158010000000175, 72.854970000000108], [75.68351, 72.300560000000118], [75.288980000000109, 71.33556], [76.35911, 71.152870000000135], [75.903130000000161, 71.87401], [77.5766500000001, 72.26717], [79.652020000000107, 72.32011], [81.5, 71.75], [80.61071, 72.582850000000107], [80.51109, 73.6482], [82.25, 73.85], [84.65526, 73.805910000000154], [86.822300000000226, 73.93688], [86.00956, 74.459670000000145], [87.166820000000143, 75.11643], [88.31571, 75.14393], [90.26, 75.64], [92.90058, 75.77333], [93.234210000000132, 76.0472], [95.860000000000127, 76.14], [96.67821, 75.91548], [98.922540000000197, 76.44689], [100.759670000000199, 76.43028], [101.03532, 76.86189], [101.990840000000105, 77.287540000000192], [104.3516, 77.69792], [106.066640000000135, 77.37389], [104.705000000000211, 77.1274], [106.970130000000111, 76.97419]]], [[[105.07547, 78.30689], [99.43814, 77.921], [101.2649, 79.23399], [102.08635, 79.34641], [102.837815, 79.28129], [105.37243, 78.71334], [105.07547, 78.30689]]], [[[51.136186557831266, 80.54728017854093], [49.793684523320692, 80.415427761548202], [48.894411248577526, 80.33956675894369], [48.75493655782175, 80.175468248200829], [47.586119012244147, 80.010181179515328], [46.502825962109647, 80.247246812654339], [47.072455275262897, 80.559424140129451], [44.846958042181107, 80.589809882317169], [46.799138624871226, 80.771917629713627], [48.31847741068465, 80.784009914869927], [48.52280602396668, 80.514568996900138], [49.097189568890897, 80.753985907708412], [50.039767693894603, 80.918885403151791], [51.522932977103679, 80.699725653801906], [51.136186557831266, 80.54728017854093]]], [[[99.93976, 78.88094], [97.75794, 78.7562], [94.97259, 79.044745], [93.31288, 79.4265], [92.5454, 80.14379], [91.18107, 80.34146], [93.77766, 81.0246], [95.940895, 81.2504], [97.88385, 80.746975], [100.186655, 79.780135], [99.93976, 78.88094]]]] } }, + { "type": "Feature", "properties": { "admin": "Rwanda", "name": "Rwanda", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[30.419104852019235, -1.134659112150416], [30.816134881317705, -1.698914076345388], [30.758308953583104, -2.287250257988368], [30.469696079232978, -2.413857517103458], [29.938359002407935, -2.348486830254238], [29.632176141078585, -2.917857761246096], [29.02492638521678, -2.839257907730157], [29.117478875451546, -2.292211195488384], [29.254834832483336, -2.215109958508911], [29.29188683443661, -1.620055840667987], [29.579466180140876, -1.341313164885626], [29.821518588996003, -1.443322442229785], [30.419104852019235, -1.134659112150416]]] } }, + { "type": "Feature", "properties": { "admin": "Western Sahara", "name": "W. Sahara", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-8.794883999049075, 27.120696316022503], [-8.81782833498667, 27.656425889592349], [-8.665589565454805, 27.656425889592349], [-8.66512447756419, 27.58947907155822], [-8.684399786809051, 27.395744126895998], [-8.687293667017398, 25.881056219988899], [-11.969418911171159, 25.933352769468261], [-11.93722449385332, 23.374594224536164], [-12.874221564169574, 23.284832261645171], [-13.118754441774708, 22.771220201096249], [-12.929101935263528, 21.327070624267559], [-16.845193650773989, 21.333323472574875], [-17.063423224342568, 20.99975210213082], [-17.020428432675736, 21.422310288981475], [-17.002961798561085, 21.420734157796574], [-14.750954555713532, 21.50060008390366], [-14.630832688851068, 21.860939846274899], [-14.221167771857251, 22.310163072188153], [-13.891110398809044, 23.691009019459297], [-12.500962693725368, 24.770116278578193], [-12.030758836301613, 26.030866197203036], [-11.718219773800353, 26.104091701760616], [-11.392554897496977, 26.883423977154358], [-10.551262579785272, 26.990807603456879], [-10.18942420087758, 26.860944729107398], [-9.735343390328877, 26.860944729107398], [-9.413037482124464, 27.088476060488514], [-8.794883999049075, 27.120696316022503]]] } }, + { "type": "Feature", "properties": { "admin": "Saudi Arabia", "name": "Saudi Arabia", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[42.779332309750963, 16.34789134364868], [42.64957278826607, 16.77463532151496], [42.347989129410706, 17.075805568911996], [42.270887892431219, 17.474721787989122], [41.754381951673949, 17.833046169500971], [41.221391229015573, 18.671599636301206], [40.939341261566533, 19.486485297111752], [40.247652215339819, 20.174634507726488], [39.801684604660934, 20.338862209550054], [39.139399448408277, 21.29190481209293], [39.023695916506782, 21.986875311770191], [39.066328973147577, 22.579655666590263], [38.492772251140075, 23.688451036060851], [38.023860304523616, 24.078685614512928], [37.483634881344379, 24.285494696545008], [37.154817742671177, 24.858482977797301], [37.209491408035994, 25.084541530858104], [36.931627231602583, 25.602959499610172], [36.639603712721218, 25.826227525327219], [36.249136590323808, 26.570135606384873], [35.640181512196385, 27.376520494083415], [35.130186801907875, 28.063351955674712], [34.632336053207972, 28.058546047471559], [34.787778761541936, 28.607427273059692], [34.832220493312938, 28.957483425404838], [34.956037225084252, 29.356554673778835], [36.068940870922049, 29.19749461518445], [36.501214227043583, 29.505253607698702], [36.740527784987243, 29.865283311476183], [37.503581984209028, 30.003776150018396], [37.668119744626374, 30.338665269485894], [37.998848911294367, 30.508499864213128], [37.002165561681004, 31.508412990844736], [39.004885695152545, 32.010216986614971], [39.195468377444961, 32.16100881604266], [40.399994337736238, 31.889991766887931], [41.889980910007829, 31.190008653278362], [44.709498732284736, 29.178891099559376], [46.568713413281742, 29.099025173452283], [47.459821811722819, 29.002519436147217], [47.708850538937376, 28.526062730416136], [48.416094191283939, 28.552004299426663], [48.807594842327163, 27.689627997339876], [49.299554477745815, 27.461218166609804], [49.470913527225647, 27.109999294538078], [50.152422316290874, 26.689663194275994], [50.212935418504671, 26.277026882425371], [50.113303257045928, 25.943972276304248], [50.23985883972874, 25.608049628190923], [50.527386509000728, 25.327808335872099], [50.660556675016885, 24.999895534764018], [50.810108270069563, 24.754742539971371], [51.112415398977006, 24.556330878186721], [51.389607781790623, 24.627385972588051], [51.579518670463258, 24.245497137951102], [51.617707553926969, 24.014219265228824], [52.000733270074321, 23.001154486578937], [55.006803012924898, 22.496947536707129], [55.208341098863187, 22.708329982997039], [55.666659376859812, 22.000001125572336], [54.999981723862355, 19.999994004796104], [52.000009800022227, 19.000003363516054], [49.116671583864857, 18.616667588774941], [48.183343540241324, 18.166669216377311], [47.466694777217626, 17.116681626854877], [47.000004917189749, 16.949999294497438], [46.749994337761642, 17.283338120996174], [46.366658563020529, 17.233315334537632], [45.399999220568752, 17.333335069238554], [45.216651238797184, 17.43332896572333], [44.062613152855072, 17.410358791569589], [43.791518589051904, 17.319976711491105], [43.380794305196098, 17.579986680567668], [43.115797560403351, 17.088440456607369], [43.218375278502734, 16.666889960186406], [42.779332309750963, 16.34789134364868]]] } }, + { "type": "Feature", "properties": { "admin": "Sudan", "name": "Sudan", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[33.963392794971178, 9.464285229420623], [33.824963480907506, 9.48406084571536], [33.842130853028145, 9.981914637215992], [33.721959248183097, 10.325262079630191], [33.206938084561777, 10.720111638406591], [33.086766479716729, 11.441141267476493], [33.206938084561777, 12.179338268667093], [32.743419037302537, 12.24800775714999], [32.674749548819641, 12.024831919580716], [32.073891524594778, 11.973329803218517], [32.314234734284746, 11.681484477166519], [32.400071594888338, 11.080626452941486], [31.850715687025509, 10.531270545078822], [31.352861895524875, 9.810240916008693], [30.837840731903377, 9.707236683284519], [29.996639497988546, 10.290927335388684], [29.618957311332842, 10.084918869940223], [29.515953078608607, 9.793073543888053], [29.000931914987166, 9.604232450560287], [28.966597170745779, 9.398223985111654], [27.970889587744345, 9.398223985111654], [27.833550610778783, 9.604232450560287], [27.112520981708876, 9.638567194801622], [26.752006167173811, 9.466893473594492], [26.477328213242508, 9.552730334198086], [25.96230704962101, 10.136420986302422], [25.790633328413943, 10.411098940233726], [25.069603699343979, 10.27375996326799], [24.79492574541268, 9.810240916008693], [24.537415163602017, 8.917537565731719], [24.194067721187643, 8.728696472403895], [23.886979580860665, 8.619729712933063], [23.805813429466745, 8.666318874542522], [23.459012892355979, 8.954285793489019], [23.394779087017291, 9.26506785729225], [23.557249790142915, 9.681218166538766], [23.554304233502187, 10.089255275915319], [22.977543572692749, 10.714462591998538], [22.864165480244246, 11.142395127807616], [22.87622, 11.384610000000119], [22.50869, 11.67936], [22.49762, 12.26024], [22.28801, 12.64605], [21.93681, 12.588180000000133], [22.03759, 12.95546], [22.29658, 13.37232], [22.18329, 13.78648], [22.51202, 14.09318], [22.30351, 14.32682], [22.567950000000106, 14.944290000000134], [23.02459, 15.68072], [23.886890000000101, 15.61084], [23.837660000000135, 19.580470000000101], [23.850000000000129, 20.0], [25.00000000000011, 20.00304], [25.00000000000011, 22.0], [29.02, 22.0], [32.9, 22.0], [36.86623, 22.0], [37.18872, 21.01885], [36.96941, 20.837440000000125], [37.114700000000134, 19.80796], [37.48179, 18.61409], [37.86276, 18.36786], [38.410089959473218, 17.998307399970312], [37.904000000000103, 17.42754], [37.16747, 17.263140000000128], [36.852530000000108, 16.95655], [36.75389, 16.29186], [36.32322, 14.82249], [36.42951, 14.42211], [36.27022, 13.563330000000118], [35.86363, 12.57828], [35.26049, 12.08286], [34.831630000000125, 11.318960000000116], [34.73115000000012, 10.910170000000106], [34.25745, 10.63009], [33.96162, 9.58358], [33.963392794971178, 9.464285229420623]]] } }, + { "type": "Feature", "properties": { "admin": "South Sudan", "name": "S. Sudan", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[33.963392794971178, 9.464285229420623], [33.97498, 8.68456], [33.82550000000014, 8.37916], [33.294800000000116, 8.35458], [32.95418, 7.7849700000001], [33.56829, 7.71334], [34.0751, 7.22595], [34.25032, 6.82607], [34.70702, 6.59422000000012], [35.298007118233095, 5.506], [34.620196267853935, 4.847122742082034], [34.005, 4.249884947362147], [33.39, 3.79], [32.68642, 3.79232], [31.881450000000136, 3.55827], [31.24556, 3.7819], [30.83385, 3.50917], [29.95349, 4.1737], [29.715995314256013, 4.600804755060152], [29.159078403446635, 4.389267279473244], [28.696677687298795, 4.455077215996993], [28.428993768026992, 4.287154649264607], [27.979977247842946, 4.408413397637388], [27.374226108517625, 5.233944403500173], [27.213409051225248, 5.550953477394613], [26.465909458123289, 5.946717434101855], [26.213418409945113, 6.546603298362127], [25.796647983511257, 6.979315904158169], [25.124130893664805, 7.500085150579422], [25.114932488716867, 7.825104071479244], [24.567369012152191, 8.229187933785452], [23.886979580860665, 8.619729712933063], [24.194067721187643, 8.728696472403895], [24.537415163602017, 8.917537565731719], [24.79492574541268, 9.810240916008693], [25.069603699343979, 10.27375996326799], [25.790633328413943, 10.411098940233726], [25.96230704962101, 10.136420986302422], [26.477328213242508, 9.552730334198086], [26.752006167173811, 9.466893473594492], [27.112520981708876, 9.638567194801622], [27.833550610778783, 9.604232450560287], [27.970889587744345, 9.398223985111654], [28.966597170745779, 9.398223985111654], [29.000931914987166, 9.604232450560287], [29.515953078608607, 9.793073543888053], [29.618957311332842, 10.084918869940223], [29.996639497988546, 10.290927335388684], [30.837840731903377, 9.707236683284519], [31.352861895524875, 9.810240916008693], [31.850715687025509, 10.531270545078822], [32.400071594888338, 11.080626452941486], [32.314234734284746, 11.681484477166519], [32.073891524594778, 11.973329803218517], [32.674749548819641, 12.024831919580716], [32.743419037302537, 12.24800775714999], [33.206938084561777, 12.179338268667093], [33.086766479716729, 11.441141267476493], [33.206938084561777, 10.720111638406591], [33.721959248183097, 10.325262079630191], [33.842130853028145, 9.981914637215992], [33.824963480907506, 9.48406084571536], [33.963392794971178, 9.464285229420623]]] } }, + { "type": "Feature", "properties": { "admin": "Senegal", "name": "Senegal", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-16.713728807023468, 13.594958604379853], [-17.126106736712611, 14.373515733289221], [-17.625042690490655, 14.72954051356407], [-17.185172898822227, 14.91947724045286], [-16.700706346085919, 15.621527411354107], [-16.463098110407881, 16.135036119038457], [-16.120690070041928, 16.45566254319338], [-15.623666144258689, 16.369337063049809], [-15.135737270558813, 16.587282416240779], [-14.577347581428977, 16.598263658102805], [-14.099521450242175, 16.304302273010489], [-13.43573767745306, 16.039383042866188], [-12.830658331747513, 15.303691514542942], [-12.170750291380299, 14.616834214735503], [-12.124887457721256, 13.994727484589784], [-11.927716030311613, 13.422075100147392], [-11.553397793005427, 13.141213690641063], [-11.467899135778522, 12.754518947800973], [-11.513942836950587, 12.442987575729415], [-11.658300950557928, 12.386582749882834], [-12.20356482588563, 12.465647691289401], [-12.278599005573438, 12.354440008997285], [-12.499050665730561, 12.332089952031053], [-13.217818162478235, 12.575873521367964], [-13.700476040084322, 12.586182969610192], [-15.548476935274005, 12.628170070847343], [-15.816574266004251, 12.515567124883345], [-16.147716844130581, 12.547761542201185], [-16.67745195155457, 12.38485158940105], [-16.84152462408127, 13.151393947802557], [-15.931295945692208, 13.130284125211331], [-15.691000535534991, 13.270353094938455], [-15.511812506562931, 13.278569647672864], [-15.141163295949463, 13.509511623585235], [-14.712197231494626, 13.298206691943774], [-14.277701788784553, 13.28058502853224], [-13.844963344772404, 13.505041612191999], [-14.046992356817478, 13.794067898000446], [-14.376713833055785, 13.625680243377371], [-14.687030808968483, 13.63035696049978], [-15.081735398813816, 13.876491807505982], [-15.398770310924457, 13.860368760630916], [-15.624596320039936, 13.623587347869556], [-16.713728807023468, 13.594958604379853]]] } }, + { "type": "Feature", "properties": { "admin": "Solomon Islands", "name": "Solomon Is.", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[162.119024693040842, -10.482719008021133], [162.398645868172196, -10.826367282762119], [161.700032180018354, -10.820011081590222], [161.319796991214702, -10.204751478723123], [161.917383254237933, -10.446700534713653], [162.119024693040842, -10.482719008021133]]], [[[160.852228631837903, -9.872937106977002], [160.462588332357228, -9.89520964929484], [159.849447463214176, -9.794027194867367], [159.640002883135139, -9.639979750205269], [159.70294477766663, -9.242949720906777], [160.362956170898428, -9.400304457235533], [160.688517694337179, -9.610162448772808], [160.852228631837903, -9.872937106977002]]], [[[161.679981724289121, -9.599982191611373], [161.52939660059053, -9.784312025596433], [160.788253208660507, -8.917543226764918], [160.579997186524338, -8.320008640173965], [160.92002811100491, -8.320008640173965], [161.280006138349961, -9.120011488484449], [161.679981724289121, -9.599982191611373]]], [[[159.875027297198585, -8.337320244991714], [159.917401971677975, -8.538289890174864], [159.133677199539335, -8.114181410355398], [158.586113722974687, -7.754823500197713], [158.211149530264834, -7.421872246941147], [158.359977655265425, -7.320017998893915], [158.820001255527671, -7.56000335045739], [159.640002883135139, -8.020026950719567], [159.875027297198585, -8.337320244991714]]], [[[157.53842573468927, -7.347819919466928], [157.339419793933217, -7.404767347852554], [156.902030471014768, -7.176874281445391], [156.491357863591304, -6.765943291860394], [156.542827590153934, -6.599338474151478], [157.140000441718882, -7.021638278840653], [157.53842573468927, -7.347819919466928]]]] } }, + { "type": "Feature", "properties": { "admin": "Sierra Leone", "name": "Sierra Leone", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-11.438779466182053, 6.785916856305746], [-11.708194545935736, 6.860098374860724], [-12.428098924193815, 7.262942002792029], [-12.949049038128193, 7.798645738145736], [-13.124025437868479, 8.163946438016977], [-13.246550258832512, 8.903048610871506], [-12.711957566773076, 9.342711696810765], [-12.596719122762206, 9.620188300001969], [-12.425928514037562, 9.835834051955953], [-12.150338100625003, 9.858571682164378], [-11.917277390988655, 10.046983954300556], [-11.117481248407328, 10.045872911006283], [-10.839151984083299, 9.688246161330367], [-10.622395188835037, 9.267910061068276], [-10.65477047366589, 8.977178452994194], [-10.494315151399629, 8.715540676300433], [-10.505477260774667, 8.348896389189603], [-10.230093553091276, 8.406205552601291], [-10.695594855176477, 7.939464016141085], [-11.14670427086838, 7.396706447779534], [-11.199801805048278, 7.105845648624735], [-11.438779466182053, 6.785916856305746]]] } }, + { "type": "Feature", "properties": { "admin": "El Salvador", "name": "El Salvador", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-87.793111131526558, 13.384480495655051], [-87.904112108089507, 13.149016831917134], [-88.483301561216791, 13.163951320849488], [-88.843227912129692, 13.259733588102474], [-89.256742723329282, 13.4585328231293], [-89.812393561547637, 13.520622056527994], [-90.095554572290951, 13.73533763270073], [-90.064677903996568, 13.881969509328924], [-89.7219339668207, 14.134228013561694], [-89.5342193265205, 14.244815578666302], [-89.587342698916544, 14.362586167859485], [-89.353325975282772, 14.424132798719112], [-89.058511929057644, 14.340029405164085], [-88.843072882832814, 14.140506700085169], [-88.541230841815974, 13.980154730683475], [-88.50399797234968, 13.845485948130854], [-88.065342576840123, 13.964625962779774], [-87.859515347021585, 13.893312486216979], [-87.723502977229387, 13.785050360565503], [-87.793111131526558, 13.384480495655051]]] } }, + { "type": "Feature", "properties": { "admin": "Somaliland", "name": "Somaliland", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[48.938129510296491, 9.451748968946672], [48.486735874226994, 8.837626247589979], [47.78942, 8.003], [46.948328484897942, 7.996876532417386], [43.67875, 9.183580000000116], [43.296975132018744, 9.540477403191742], [42.92812, 10.021940000000139], [42.55876, 10.572580000000126], [42.776851841000948, 10.926878566934416], [43.145304803242126, 11.462039699748853], [43.470659620951658, 11.27770986576388], [43.666668328634834, 10.864169216348158], [44.117803582542805, 10.445538438351603], [44.614259067570849, 10.442205308468941], [45.556940545439133, 10.698029486529775], [46.645401238802997, 10.816549383991171], [47.525657586462778, 11.127228094929986], [48.021596307167769, 11.193063869669741], [48.378783807169263, 11.375481675660122], [48.948206414593457, 11.410621649618516], [48.942005242718423, 11.394266058798163], [48.938491245322595, 10.982327378783451], [48.938232863161076, 9.973500067581481], [48.938129510296491, 9.451748968946672]]] } }, + { "type": "Feature", "properties": { "admin": "Somalia", "name": "Somalia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[49.72862, 11.5789], [50.25878, 11.67957], [50.73202, 12.0219], [51.1112, 12.02464], [51.13387, 11.74815], [51.04153, 11.16651], [51.04531, 10.6409], [50.83418, 10.27972], [50.55239, 9.19874], [50.07092, 8.08173], [49.4527, 6.80466], [48.59455, 5.33911], [47.74079, 4.2194], [46.56476, 2.85529], [45.56399, 2.04576], [44.06815, 1.05283], [43.13597, 0.2922], [42.04157, -0.91916], [41.81095, -1.44647], [41.58513, -1.68325], [40.993, -0.85829], [40.98105, 2.78452], [41.855083092643966, 3.918911920483726], [42.12861, 4.23413], [42.76967, 4.25259], [43.66087, 4.95755], [44.9636, 5.00162], [47.78942, 8.003], [48.486735874226937, 8.837626247589993], [48.938129510296442, 9.451748968946616], [48.938232863161026, 9.973500067581508], [48.938491245322481, 10.982327378783465], [48.942005242718345, 11.394266058798136], [48.948204758509732, 11.410617281697961], [49.26776, 11.43033], [49.72862, 11.5789]]] } }, + { "type": "Feature", "properties": { "admin": "Republic of Serbia", "name": "Serbia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[20.874312778413408, 45.416375433934306], [21.483526238702204, 45.181170152357865], [21.562022739353718, 44.768947251965635], [22.145087924902892, 44.478422349620573], [22.459022251075961, 44.702517198254426], [22.705725538837434, 44.578002834647002], [22.47400841644065, 44.409227606781762], [22.657149692483067, 44.234923000661347], [22.410446404721593, 44.008063462900047], [22.500156691180219, 43.642814439460999], [22.986018507588479, 43.211161200527094], [22.604801466571352, 42.898518785161109], [22.43659467946139, 42.580321153323943], [22.545011834409642, 42.461362006188025], [22.380525750424674, 42.320259507815074], [21.917080000000105, 42.30364], [21.576635989402117, 42.245224397061847], [21.54332, 42.32025], [21.66292, 42.43922], [21.77505, 42.6827], [21.63302, 42.67717], [21.43866, 42.86255], [21.27421, 42.90959], [21.143395, 43.068685000000123], [20.95651, 43.13094], [20.81448, 43.27205], [20.63508, 43.21671], [20.49679, 42.88469], [20.25758, 42.81275], [20.3398, 42.89852], [19.95857, 43.10604], [19.63, 43.213779970270522], [19.48389, 43.35229], [19.21852, 43.52384], [19.454, 43.568100000000115], [19.59976, 44.03847], [19.11761, 44.42307], [19.36803, 44.863], [19.00548, 44.86023], [19.390475701584588, 45.236515611342369], [19.072768995854172, 45.521511135432078], [18.82982, 45.90888], [19.596044549241636, 46.171729844744547], [20.22019249846289, 46.127468980486569], [20.76217492033998, 45.734573065771478], [20.874312778413408, 45.416375433934306]]] } }, + { "type": "Feature", "properties": { "admin": "Suriname", "name": "Suriname", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-57.147436489476874, 5.973149929219161], [-55.949318406789786, 5.772877915872], [-55.841779751190408, 5.953125311706059], [-55.033250291551759, 6.025291449401662], [-53.958044603070888, 5.756548163267764], [-54.478632981979224, 4.896755682795585], [-54.3995422023565, 4.212611395683466], [-54.006930508018996, 3.620037746592558], [-54.181726040246261, 3.189779771330421], [-54.269705166223183, 2.732391669115046], [-54.524754197799709, 2.311848863123785], [-55.097587449755125, 2.523748073736612], [-55.569755011605984, 2.42150625244713], [-55.973322109589361, 2.510363877773016], [-56.073341844290283, 2.220794989425499], [-55.905600145070871, 2.021995754398659], [-55.995698004771739, 1.817667141116601], [-56.53938574891454, 1.89952260986692], [-57.150097825739898, 2.768926906745406], [-57.281433478409703, 3.333491929534119], [-57.601568976457848, 3.334654649260684], [-58.044694383360664, 4.060863552258382], [-57.860209520078691, 4.576801052260449], [-57.914288906472123, 4.812626451024413], [-57.307245856339492, 5.073566595882225], [-57.147436489476874, 5.973149929219161]]] } }, + { "type": "Feature", "properties": { "admin": "Slovakia", "name": "Slovakia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[18.85314415861361, 49.496229763377634], [18.909574822676316, 49.435845852244562], [19.320712517990469, 49.571574001659179], [19.825022820726865, 49.217125352569219], [20.415839471119849, 49.431453355499755], [20.887955356538406, 49.328772284535823], [21.607808058364206, 49.470107326854077], [22.558137648211751, 49.08573802346713], [22.280841912533553, 48.825392157580659], [22.085608351334848, 48.422264309271782], [21.872236362401729, 48.319970811550007], [20.801293979584919, 48.62385407164237], [20.473562045989862, 48.562850043321809], [20.239054396249344, 48.327567247096916], [19.769470656013109, 48.2026911484636], [19.66136355965849, 48.266614895208647], [19.174364861739885, 48.111378892603859], [18.777024773847668, 48.081768296900627], [18.696512892336923, 47.88095368101439], [17.857132602620023, 47.758428860050365], [17.488472934649813, 47.867466132186209], [16.979666782304033, 48.123497015976298], [16.879982944412998, 48.470013332709463], [16.960288120194573, 48.596982326850593], [17.101984897538895, 48.8169688991171], [17.545006951577101, 48.800019029325362], [17.886484816161808, 48.903475246773695], [17.913511590250462, 48.996492824899072], [18.104972771891848, 49.043983466175298], [18.170498488037961, 49.271514797556421], [18.399993523846174, 49.315000515330034], [18.554971144289478, 49.495015367218777], [18.85314415861361, 49.496229763377634]]] } }, + { "type": "Feature", "properties": { "admin": "Slovenia", "name": "Slovenia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[13.806475457421524, 46.509306138691201], [14.632471551174827, 46.431817328469535], [15.137091912504982, 46.658702704447016], [16.011663852612653, 46.683610744811688], [16.202298211337361, 46.852385972676949], [16.370504998447412, 46.841327216166498], [16.564808383864854, 46.503750922219822], [15.768732944408548, 46.238108222023442], [15.671529575267552, 45.834153550797865], [15.323953891672403, 45.731782538427673], [15.327674594797424, 45.452316392593218], [14.935243767972931, 45.471695054702671], [14.595109490627804, 45.6349409043127], [14.411968214585411, 45.466165676447446], [13.715059848697221, 45.500323798192369], [13.937630242578305, 45.591015936864608], [13.698109978905475, 46.016778062517339], [13.806475457421524, 46.509306138691201]]] } }, + { "type": "Feature", "properties": { "admin": "Sweden", "name": "Sweden", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[22.183173455501922, 65.723740546320158], [21.213516879977213, 65.02600535751526], [21.369631381930954, 64.413587958424273], [19.778875766690216, 63.609554348395022], [17.847779168375208, 62.749400132896803], [17.11955488451812, 61.341165676510954], [17.831346062906388, 60.636583360427394], [18.787721795332086, 60.081914374422581], [17.869224887776337, 58.95376618105869], [16.829185011470084, 58.719826972073385], [16.44770958829147, 57.041118069071871], [15.87978559740378, 56.104301866268649], [14.666681349352071, 56.20088511822216], [14.100721062891461, 55.407781073622637], [12.942910597392054, 55.361737372450563], [12.625100538797025, 56.307080186581956], [11.787942335668671, 57.441817125063061], [11.027368605196866, 58.856149400459344], [11.468271925511145, 59.432393296946024], [12.300365838274896, 60.117932847730025], [12.631146681375181, 61.293571682370121], [11.992064243221559, 61.800362453856543], [11.930569288794228, 63.128317572676963], [12.57993533697393, 64.066218980558318], [13.571916131248711, 64.049114081469696], [13.9199052263022, 64.445420640716065], [13.555689731509087, 64.7870276963815], [15.108411492582999, 66.19386688909546], [16.108712192456775, 67.302455552836875], [16.768878614985478, 68.013936672631388], [17.729181756265344, 68.010551866316263], [17.993868442464329, 68.567391262477344], [19.878559604581248, 68.407194322372561], [20.025268995857882, 69.065138658312691], [20.645592889089521, 69.106247260200846], [21.978534783626113, 68.616845608180682], [23.539473097434435, 67.936008612735236], [23.565879754335576, 66.396050930437411], [23.903378533633795, 66.006927395279604], [22.183173455501922, 65.723740546320158]]] } }, + { "type": "Feature", "properties": { "admin": "Swaziland", "name": "Swaziland", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[32.071665480281062, -26.733820082304902], [31.868060337051073, -27.17792734142127], [31.282773064913325, -27.285879408478991], [30.685961948374477, -26.743845310169526], [30.676608514129633, -26.398078301704604], [30.949666782359905, -26.022649021104144], [31.044079624157146, -25.731452325139436], [31.333157586397899, -25.660190525008943], [31.837777947728057, -25.843331801051342], [31.985779249811962, -26.29177988048022], [32.071665480281062, -26.733820082304902]]] } }, + { "type": "Feature", "properties": { "admin": "Syria", "name": "Syria", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[38.792340529136077, 33.378686428352218], [36.834062127435537, 32.312937526980768], [35.719918247222743, 32.709192409794859], [35.700797967274745, 32.716013698857374], [35.836396925608618, 32.868123277308506], [35.821100701650231, 33.277426459276292], [36.066460402172048, 33.824912421192543], [36.611750115715886, 34.201788641897174], [36.448194207512095, 34.59393524834406], [35.998402540843628, 34.644914048799997], [35.905023227692219, 35.410009467097318], [36.149762811026527, 35.821534735653664], [36.417550083163029, 36.040616970355053], [36.685389031731795, 36.259699205056457], [36.739494256341395, 36.817520453431079], [37.066761102045824, 36.623036200500614], [38.167727492024191, 36.901210435527766], [38.699891391765895, 36.712927354472335], [39.522580193852541, 36.716053778625984], [40.673259311695681, 37.091276353497285], [41.212089471203043, 37.074352321921687], [42.349591098811764, 37.22987254490409], [41.837064243340954, 36.605853786763568], [41.289707472505448, 36.358814602192261], [41.383965285005807, 35.628316555314349], [41.00615888851992, 34.419372260062111], [38.792340529136077, 33.378686428352218]]] } }, + { "type": "Feature", "properties": { "admin": "Chad", "name": "Chad", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[14.495787387762899, 12.859396267137353], [14.595781284247604, 13.330426947477859], [13.954476759505607, 13.353448798063765], [13.956698846094124, 13.996691189016925], [13.540393507550785, 14.36713369390122], [13.97217, 15.68437], [15.247731154041842, 16.627305813050778], [15.300441114979716, 17.927949937405], [15.68574059414777, 19.957180080642384], [15.90324669766431, 20.387618923417499], [15.487148064850143, 20.730414537025634], [15.47106, 21.04845], [15.096887648181847, 21.308518785074902], [14.8513, 22.862950000000119], [15.86085, 23.40972], [19.84926, 21.49509], [23.837660000000135, 19.580470000000101], [23.886890000000101, 15.61084], [23.02459, 15.68072], [22.567950000000106, 14.944290000000134], [22.30351, 14.32682], [22.51202, 14.09318], [22.18329, 13.78648], [22.29658, 13.37232], [22.03759, 12.95546], [21.93681, 12.588180000000133], [22.28801, 12.64605], [22.49762, 12.26024], [22.50869, 11.67936], [22.87622, 11.384610000000119], [22.864165480244246, 11.142395127807616], [22.231129184668756, 10.971888739460608], [21.723821648859538, 10.567055568885959], [21.000868361096305, 9.475985215691479], [20.059685499764267, 9.012706000194838], [19.094008009526071, 9.074846910025768], [18.81200971850927, 8.982914536978623], [18.911021762780589, 8.630894680206435], [18.389554884523303, 8.281303615751879], [17.964929640380884, 7.890914008002992], [16.705988396886365, 7.508327541529978], [16.4561845231874, 7.734773667832938], [16.290561557691884, 7.754307359239417], [16.106231723706738, 7.497087917506461], [15.279460483469164, 7.42192454673801], [15.436091749745737, 7.692812404811887], [15.120865512765302, 8.382150173369437], [14.979995558337688, 8.796104234243442], [14.544466586981851, 8.965861314322238], [13.954218377344088, 9.549494940626685], [14.17146609869911, 10.021378282100043], [14.627200555081057, 9.920919297724591], [14.909353875394796, 9.992129421422758], [15.46787275560524, 9.982336737503543], [14.923564894275042, 10.891325181517514], [14.960151808337679, 11.555574042197234], [14.89336, 12.21905], [14.495787387762899, 12.859396267137353]]] } }, + { "type": "Feature", "properties": { "admin": "Togo", "name": "Togo", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[1.865240512712318, 6.14215770102973], [1.060121697604927, 5.928837388528875], [0.836931186536333, 6.279978745952147], [0.570384148774849, 6.914358628767188], [0.490957472342245, 7.411744289576474], [0.712029249686878, 8.312464504423827], [0.461191847342121, 8.677222601756013], [0.365900506195885, 9.46500397382948], [0.367579990245389, 10.191212876827176], [-0.049784715159944, 10.706917832883928], [0.023802524423701, 11.018681748900802], [0.899563022474069, 10.997339382364258], [0.772335646171484, 10.470808213742357], [1.077795037448737, 10.175606594275022], [1.425060662450136, 9.825395412632998], [1.46304284018467, 9.334624335157086], [1.664477573258381, 9.128590399609378], [1.618950636409238, 6.832038072126236], [1.865240512712318, 6.14215770102973]]] } }, + { "type": "Feature", "properties": { "admin": "Thailand", "name": "Thailand", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[102.58493248902667, 12.186594956913279], [101.687157830819928, 12.645740057826568], [100.831809523524839, 12.627084865769204], [100.978467238369191, 13.412721665902563], [100.097797479251099, 13.406856390837429], [100.018732537844528, 12.307001044153353], [99.478920526123602, 10.846366685423545], [99.153772414143134, 9.963061428258554], [99.222398716226749, 9.239255479362425], [99.873831821698118, 9.207862046745118], [100.279646844486194, 8.29515289960605], [100.45927412313273, 7.429572658717175], [101.017327915452697, 6.856868597842476], [101.623079054778032, 6.740622463401918], [102.141186964936367, 6.221636053894626], [101.81428185425797, 5.810808417174242], [101.154218784593837, 5.691384182147713], [101.075515578213327, 6.20486705161592], [100.259596388756933, 6.642824815289542], [100.085756870527092, 6.46448944745029], [99.690690545655727, 6.848212795433595], [99.519641554769606, 7.343453884302759], [98.988252801512289, 7.907993068875325], [98.503786248775967, 8.382305202666286], [98.339661899816988, 7.794511623562384], [98.150009393305808, 8.350007432483876], [98.259150018306229, 8.973922837759799], [98.553550653073017, 9.932959906448543], [99.038120558673953, 10.960545762572435], [99.587286004639694, 11.892762762901695], [99.196353794351637, 12.804748439988666], [99.212011753336071, 13.269293728076462], [99.097755161538728, 13.827502549693275], [98.430819126379859, 14.622027696180831], [98.192074009191373, 15.123702500870349], [98.537375929765687, 15.308497422746081], [98.90334842325673, 16.177824204976115], [98.493761020911322, 16.837835598207928], [97.859122755934848, 17.567946071843657], [97.375896437573516, 18.445437730375811], [97.797782830804394, 18.627080389881751], [98.253723992915582, 19.708203029860041], [98.959675734454848, 19.752980658440944], [99.543309360759281, 20.186597601802056], [100.115987583417819, 20.41784963630818], [100.548881056726856, 20.109237982661124], [100.606293573003128, 19.508344427971217], [101.282014601651667, 19.462584947176762], [101.035931431077742, 18.408928330961611], [101.059547560635139, 17.512497259994486], [102.113591750092453, 18.109101670804161], [102.413004998791592, 17.932781683824281], [102.998705682387694, 17.961694647691598], [103.200192091893726, 18.309632066312769], [103.956476678485288, 18.240954087796872], [104.716947056092465, 17.428858954330078], [104.779320509868768, 16.441864935771445], [105.589038527450128, 15.570316066952856], [105.544338413517664, 14.723933620660414], [105.218776890078871, 14.27321177821069], [104.281418084736586, 14.416743068901363], [102.988422072361601, 14.225721136934464], [102.348099399833004, 13.39424734135822], [102.58493248902667, 12.186594956913279]]] } }, + { "type": "Feature", "properties": { "admin": "Tajikistan", "name": "Tajikistan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[71.014198032520156, 40.244365546218226], [70.648018833299957, 39.935753892571157], [69.559609816368507, 40.103211371412968], [69.464886915977516, 39.526683254548693], [70.549161818325601, 39.604197902986492], [71.784693637991992, 39.279463202464363], [73.67537926625478, 39.431236884105594], [73.928852166646408, 38.505815334622724], [74.257514276022718, 38.606506862943441], [74.864815708316812, 38.378846340481587], [74.829985792952087, 37.990007025701388], [74.980002475895404, 37.419990139305888], [73.948695916646486, 37.421566270490786], [73.260055779924983, 37.495256862938994], [72.636889682917271, 37.047558091778349], [72.193040805962383, 36.94828766534566], [71.84463829945058, 36.738171291646914], [71.448693475230229, 37.065644843080513], [71.541917759084768, 37.905774441065631], [71.239403924448155, 37.953265082341879], [71.348131137990251, 38.258905341132156], [70.806820509732873, 38.486281643216408], [70.376304152309274, 38.138395901027515], [70.270574171840124, 37.73516469985401], [70.116578403610319, 37.588222764632086], [69.518785434857946, 37.608996690413413], [69.196272820924364, 37.15114350030742], [68.859445835245921, 37.344335842430588], [68.135562371701369, 37.023115139304302], [67.829999627559502, 37.144994004864678], [68.392032505165943, 38.157025254868728], [68.176025018185911, 38.901553453113898], [67.442219679641298, 39.140143541005479], [67.701428664017342, 39.580478420564518], [68.536416456989414, 39.533452867178923], [69.011632928345477, 40.086158148756653], [69.329494663372813, 40.727824408524839], [70.666622348925031, 40.960213324541407], [70.458159621059608, 40.49649485937028], [70.601406691372674, 40.218527330072284], [71.014198032520156, 40.244365546218226]]] } }, + { "type": "Feature", "properties": { "admin": "Turkmenistan", "name": "Turkmenistan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[61.21081709172573, 35.650072333309218], [61.123070509694131, 36.491597194966239], [60.377637973883864, 36.52738312432836], [59.234761997316795, 37.412987982730336], [58.436154412678192, 37.522309475243794], [57.330433790928964, 38.029229437810933], [56.619366082592805, 38.121394354803478], [56.180374790273319, 37.935126654607423], [55.511578403551894, 37.964117133123153], [54.800303989486558, 37.392420762678178], [53.921597934795543, 37.198918361961255], [53.735511102112504, 37.906136176091685], [53.880928582581831, 38.952093003895349], [53.101027866432894, 39.290573635407121], [53.357808058491216, 39.975286363274442], [52.693972609269807, 40.033629055331964], [52.91525109234361, 40.87652334244472], [53.85813927594112, 40.631034450842165], [54.736845330632136, 40.951014919593455], [54.0083109881813, 41.551210842447404], [53.721713494690576, 42.123191433270016], [52.916749708880069, 41.868116563477322], [52.81468875510361, 41.135370591794704], [52.502459751196135, 41.783315538086356], [52.94429324729164, 42.116034247397586], [54.079417759014937, 42.324109402020817], [54.755345493392625, 42.04397146256656], [55.455251092353755, 41.259859117185826], [55.968191359282898, 41.308641669269356], [57.096391229079089, 41.32231008561056], [56.93221520368779, 41.82602610937559], [57.786529982337065, 42.170552883465511], [58.629010857991453, 42.751551011723045], [59.976422153569771, 42.223081976890199], [60.083340691981654, 41.425146185871391], [60.46595299667068, 41.22032664648254], [61.547178989513547, 41.2663703476546], [61.882714064384679, 41.084856879229392], [62.374260288344992, 40.053886216790382], [63.518014764261018, 39.363256537425627], [64.170223016216752, 38.892406724598231], [65.215998976507379, 38.402695013984292], [66.546150343700205, 37.974684963526855], [66.518606805288655, 37.362784328758785], [66.217384881459324, 37.393790188133913], [65.745630731066811, 37.661164048812061], [65.588947788357828, 37.305216783185628], [64.746105177677393, 37.111817735333297], [64.546479119733888, 36.31207326918426], [63.982895949158696, 36.007957465146596], [63.193538445900337, 35.857165635718907], [62.984662306576588, 35.404040839167614], [62.230651483005879, 35.270663967422287], [61.21081709172573, 35.650072333309218]]] } }, + { "type": "Feature", "properties": { "admin": "East Timor", "name": "Timor-Leste", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[124.96868248911619, -8.892790215697081], [125.086246372580248, -8.656887302284678], [125.947072381698234, -8.432094821815033], [126.64470421763852, -8.39824675866385], [126.957243280139792, -8.273344821814396], [127.335928175974615, -8.397316582882601], [126.967991978056517, -8.668256117388891], [125.925885044458568, -9.106007175333351], [125.088520135601073, -9.393173109579292], [125.070019972840583, -9.08998748132287], [124.96868248911619, -8.892790215697081]]] } }, + { "type": "Feature", "properties": { "admin": "Trinidad and Tobago", "name": "Trinidad and Tobago", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-61.68, 10.76], [-61.105, 10.89], [-60.895, 10.855], [-60.935, 10.11], [-61.77, 10.0], [-61.95, 10.09], [-61.66, 10.365], [-61.68, 10.76]]] } }, + { "type": "Feature", "properties": { "admin": "Tunisia", "name": "Tunisia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[9.482139926805273, 30.307556057246181], [9.055602654668148, 32.102691962201284], [8.439102817426116, 32.506284898400814], [8.430472853233367, 32.748337307255944], [7.612641635782181, 33.344114895148955], [7.524481642292242, 34.097376410451453], [8.140981479534302, 34.655145982393783], [8.376367628623766, 35.479876003555937], [8.217824334352313, 36.433176988260271], [8.420964389691674, 36.946427313783154], [9.509993523810605, 37.349994411766531], [10.210002475636315, 37.230001735984807], [10.180650262094529, 36.724037787415071], [11.028867221733348, 37.09210317641395], [11.100025668999249, 36.899996039368908], [10.600004510143092, 36.410000108377368], [10.593286573945134, 35.947444362932806], [10.939518670300686, 35.698984076473486], [10.807847120821007, 34.833507188449182], [10.149592726287123, 34.330773016897702], [10.339658644256613, 33.785741685515312], [10.856836378633684, 33.768740139291275], [11.108500603895118, 33.293342800422188], [11.488787469131008, 33.136995754523134], [11.432253452203692, 32.368903103152867], [10.944789666394453, 32.081814683555358], [10.636901482799484, 31.761420803345747], [9.950225050505081, 31.376069647745251], [10.056575148161752, 30.961831366493595], [9.97001712407285, 30.539324856075236], [9.482139926805273, 30.307556057246181]]] } }, + { "type": "Feature", "properties": { "admin": "Turkey", "name": "Turkey", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[36.913127068842151, 41.335358384764291], [38.347664829264502, 40.948586127275711], [39.512606642420238, 41.102762763018561], [40.373432651538245, 41.013672593747337], [41.554084100110707, 41.535656236327604], [42.619548781104548, 41.58317271581992], [43.582745802592704, 41.09214325618256], [43.752657911968491, 40.740200914058811], [43.656436395040963, 40.253563951166157], [44.400008579288759, 40.005000311842302], [44.79398969908199, 39.713002631177027], [44.109225294782355, 39.428136298168049], [44.421402622257595, 38.281281236314513], [44.225755649600522, 37.971584377589345], [44.772699008977739, 37.170444647768441], [44.293451775902852, 37.001514390606353], [43.942258742047343, 37.256227525372928], [42.77912560402185, 37.385263576805798], [42.349591098811764, 37.229872544904104], [41.212089471203015, 37.074352321921729], [40.673259311695702, 37.091276353497356], [39.522580193852512, 36.716053778626012], [38.699891391765917, 36.712927354472313], [38.167727492024156, 36.90121043552778], [37.066761102045824, 36.623036200500614], [36.739494256341366, 36.817520453431108], [36.685389031731816, 36.259699205056499], [36.417550083163086, 36.040616970355096], [36.149762811026584, 35.821534735653664], [35.782084995269848, 36.274995429014915], [36.160821567537049, 36.650605577128367], [35.550936313628334, 36.565442816711325], [34.714553256984367, 36.795532131490909], [34.026894972476455, 36.219960028623966], [32.509158156064096, 36.107563788389193], [31.69959516777956, 36.644275214172602], [30.621624790171062, 36.677864895162308], [30.391096225717114, 36.262980658506983], [29.69997562024556, 36.144357408181001], [28.732902866335387, 36.676831366516431], [27.641186557737363, 36.658822129862749], [27.048767937943289, 37.653360907536005], [26.318218214633042, 38.208133246405382], [26.804700148228726, 38.985760199533551], [26.170785353304375, 39.463612168936457], [27.280019972449388, 40.420013739578302], [28.819977654747209, 40.460011298172212], [29.240003696415574, 41.219990749672682], [31.145933872204434, 41.087621568357058], [32.347979363745786, 41.736264146484629], [33.513282911927512, 42.018960069337304], [35.167703891751863, 42.040224921225438], [36.913127068842151, 41.335358384764291]]], [[[27.192376743282406, 40.690565700842448], [26.358009067497782, 40.151993923496477], [26.043351271272535, 40.617753607743161], [26.056942172965332, 40.824123440100735], [26.294602085075692, 40.936261298174166], [26.604195590936282, 41.562114569661013], [26.117041863720825, 41.826904608724554], [27.135739373490505, 42.141484890301307], [27.996720411905407, 42.007358710287768], [28.115524529744441, 41.622886054036279], [28.988442824018779, 41.299934190428175], [28.806438429486743, 41.05496206314853], [27.619017368284112, 40.999823309893102], [27.192376743282406, 40.690565700842448]]]] } }, + { "type": "Feature", "properties": { "admin": "Taiwan", "name": "Taiwan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[121.777817824389899, 24.394273586519393], [121.175632358892713, 22.790857245367164], [120.747079705896198, 21.970571397382106], [120.220083449383651, 22.814860948166732], [120.106188592612369, 23.556262722258229], [120.694679803552233, 24.53845083261373], [121.49504438688875, 25.295458889257379], [121.951243931161429, 24.997595933527034], [121.777817824389899, 24.394273586519393]]] } }, + { "type": "Feature", "properties": { "admin": "United Republic of Tanzania", "name": "Tanzania", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[33.903711197104592, -0.95], [34.07262, -1.05982], [37.69869, -3.09699], [37.7669, -3.67712], [39.20222, -4.67677], [38.74054, -5.90895], [38.79977, -6.47566], [39.44, -6.84], [39.470000000000134, -7.1], [39.19469, -7.7039], [39.25203, -8.00781], [39.18652, -8.48551], [39.53574, -9.112369999999883], [39.9496, -10.0984], [40.31659, -10.317099999999867], [39.521, -10.89688], [38.427556593587767, -11.285202325081626], [37.82764, -11.26879], [37.47129, -11.56876], [36.775150994622884, -11.59453744878078], [36.514081658684397, -11.720938002166745], [35.312397902169145, -11.439146416879165], [34.559989047999451, -11.520020033415845], [34.28, -10.16], [33.940837724096518, -9.693673841980283], [33.73972, -9.41715], [32.759375441221373, -9.230599053589001], [32.191864861791935, -8.930358981973255], [31.556348097466628, -8.762048841998647], [31.157751336950064, -8.594578747317312], [30.74, -8.34], [30.2, -7.08], [29.62, -6.52], [29.419992710088305, -5.939998874539297], [29.519986606573063, -5.419978936386257], [29.339997592900367, -4.499983412294113], [29.753512404099858, -4.452389418153301], [30.11632, -4.09012], [30.50554, -3.56858], [30.75224, -3.35931], [30.74301, -3.03431], [30.52766, -2.80762], [30.46967, -2.41383], [30.758308953583132, -2.287250257988375], [30.816134881317844, -1.698914076345374], [30.419104852019291, -1.134659112150416], [30.769860000000101, -1.01455], [31.86617, -1.02736], [33.903711197104592, -0.95]]] } }, + { "type": "Feature", "properties": { "admin": "Uganda", "name": "Uganda", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[31.86617, -1.02736], [30.769860000000101, -1.01455], [30.419104852019291, -1.134659112150416], [29.821518588996121, -1.443322442229771], [29.579466180141019, -1.341313164885605], [29.587837762172164, -0.587405694179381], [29.8195, -0.2053], [29.875778842902431, 0.597379868976361], [30.086153598762785, 1.062312730306416], [30.468507521290285, 1.583805446779706], [30.852670118948133, 1.849396470543752], [31.174149204235952, 2.204465236821306], [30.77332, 2.339890000000139], [30.83385, 3.50917], [31.24556, 3.7819], [31.88145, 3.55827], [32.68642, 3.79232], [33.39, 3.79], [34.005, 4.249884947362147], [34.47913, 3.5556], [34.59607, 3.053740000000118], [35.03599, 1.90584], [34.6721, 1.17694], [34.18, 0.515], [33.893568969666994, 0.109813537861839], [33.903711197104592, -0.95], [31.86617, -1.02736]]] } }, + { "type": "Feature", "properties": { "admin": "Ukraine", "name": "Ukraine", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[31.78599816257158, 52.10167796488544], [32.159412062312661, 52.061266994833204], [32.412058139787625, 52.288694973349735], [32.715760532366964, 52.238465481162038], [33.7526998227357, 52.335074571331681], [34.391730584457001, 51.768881740925778], [34.141978387190385, 51.566413479206226], [34.22481570815426, 51.255993150428942], [35.022183058417873, 51.207572333371445], [35.377923618315116, 50.773955390010343], [35.35611616388794, 50.577197374059054], [36.62616784032533, 50.225590928745127], [37.393459506995065, 50.383953355503586], [38.01063113785689, 49.915661526074622], [38.59498823421341, 49.926461900423618], [40.069058465339097, 49.601055406281688], [40.080789015469342, 49.307429917999272], [39.674663934087526, 48.783818467801872], [39.895632358567575, 48.232405097031425], [39.738277622238819, 47.898937079451983], [38.770584751141186, 47.825608222029807], [38.255112339029743, 47.546400458356807], [38.223538038899413, 47.102189846375872], [37.42513715998998, 47.022220567404197], [36.759854770664383, 46.698700263040919], [35.823684523264816, 46.645964463887054], [34.962341749823871, 46.273196519549636], [35.020787794745978, 45.65121898048465], [35.51000857925316, 45.409993394546177], [36.529997999830151, 45.46998973243705], [36.334712762199146, 45.113215643893952], [35.239999220528112, 44.939996242851599], [33.882511020652878, 44.361478583344066], [33.326420932760037, 44.564877020844875], [33.546924269349446, 45.034770819674883], [32.454174432105496, 45.327466132176063], [32.630804477679128, 45.519185695978905], [33.588162062318382, 45.851568508480227], [33.298567335754704, 46.08059845639783], [31.744140252415171, 46.333347886737378], [31.675307244602401, 46.706245022155528], [30.748748813609094, 46.583100084003995], [30.37760867688888, 46.032410183285663], [29.603289015427425, 45.293308010431119], [29.149724969201646, 45.464925442072442], [28.679779493939371, 45.30403087013169], [28.233553501099035, 45.488283189468369], [28.48526940279276, 45.596907050145887], [28.659987420371575, 45.939986884131628], [28.933717482221621, 46.258830471372491], [28.862972446414055, 46.437889309263824], [29.072106967899288, 46.517677720722482], [29.170653924279879, 46.379262396828693], [29.759971958136383, 46.349987697935354], [30.024658644335364, 46.423936672545032], [29.838210076626289, 46.525325832701675], [29.908851759569295, 46.67436066343145], [29.559674106573105, 46.928582872091312], [29.415135125452732, 47.346645209332571], [29.050867954227321, 47.510226955752493], [29.122698195113024, 47.849095160506458], [28.670891147585163, 48.118148505234089], [28.259546746541837, 48.155562242213406], [27.52253746919515, 48.467119452501102], [26.857823520624798, 48.368210761094488], [26.619336785597788, 48.220726223333457], [26.197450392366925, 48.220881252630342], [25.945941196402394, 47.987148749374207], [25.207743361112986, 47.891056423527459], [24.866317172960571, 47.737525743188307], [24.402056105250374, 47.981877753280422], [23.760958286237404, 47.985598456405448], [23.142236362406798, 48.096341050806942], [22.710531447040488, 47.882193915389394], [22.640819939878746, 48.150239569687351], [22.085608351334848, 48.422264309271782], [22.280841912533553, 48.825392157580659], [22.558137648211751, 49.08573802346713], [22.776418898212619, 49.027395331409608], [22.518450148211596, 49.476773586619736], [23.426508416444388, 50.308505764357449], [23.922757195743259, 50.424881089878738], [24.029985792748899, 50.705406602575174], [23.52707075368437, 51.578454087930233], [24.005077752384206, 51.617443956094448], [24.553106316839511, 51.888461005249177], [25.327787713327005, 51.910656032918538], [26.337958611768549, 51.832288723347915], [27.454066196408426, 51.59230337178446], [28.241615024536564, 51.572227077839059], [28.617612745892242, 51.427713934934836], [28.992835320763522, 51.602044379271462], [29.254938185347921, 51.368234361366881], [30.157363722460889, 51.416138414101454], [30.55511722181145, 51.319503485715643], [30.619454380014837, 51.822806098022362], [30.927549269338975, 52.042353420614383], [31.78599816257158, 52.10167796488544]]] } }, + { "type": "Feature", "properties": { "admin": "Uruguay", "name": "Uruguay", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-57.625133429582945, -30.216294854454258], [-56.976025763564721, -30.109686374636119], [-55.97324459494093, -30.883075860316296], [-55.601510179249331, -30.853878676071385], [-54.572451544805105, -31.494511407193745], [-53.787951626182185, -32.047242526987617], [-53.209588995971529, -32.727666110974717], [-53.650543992718084, -33.202004082981823], [-53.373661668498229, -33.768377780900757], [-53.806425950726521, -34.396814874002224], [-54.935866054897716, -34.952646579733617], [-55.674089728403274, -34.752658786764066], [-56.215297003796053, -34.85983570733741], [-57.139685024633096, -34.430456231424238], [-57.817860683815489, -34.462547295877492], [-58.427074144104381, -33.909454441057569], [-58.349611172098854, -33.2631889788154], [-58.132647671121433, -33.040566908502008], [-58.142440355040748, -32.044503676076147], [-57.874937303281875, -31.016556084926201], [-57.625133429582945, -30.216294854454258]]] } }, + { "type": "Feature", "properties": { "admin": "United States of America", "name": "United States", "continent": "North America" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-155.54211, 19.08348], [-155.68817, 18.91619], [-155.93665, 19.05939], [-155.90806, 19.33888], [-156.07347, 19.70294], [-156.02368, 19.81422], [-155.85008, 19.97729], [-155.91907, 20.17395], [-155.86108, 20.26721], [-155.78505, 20.2487], [-155.40214, 20.07975], [-155.22452, 19.99302], [-155.06226, 19.8591], [-154.80741, 19.50871], [-154.83147, 19.45328], [-155.222169999999892, 19.23972], [-155.54211, 19.08348]]], [[[-156.07926, 20.64397], [-156.41445, 20.57241], [-156.58673, 20.783], [-156.70167, 20.8643], [-156.71055, 20.92676], [-156.61258, 21.01249], [-156.25711, 20.91745], [-155.99566, 20.76404], [-156.07926, 20.64397]]], [[[-156.75824, 21.17684], [-156.78933, 21.06873], [-157.32521, 21.09777], [-157.25027, 21.21958], [-156.75824, 21.17684]]], [[[-157.65283, 21.32217], [-157.70703, 21.26442], [-157.7786, 21.27729], [-158.12667, 21.31244], [-158.2538, 21.53919], [-158.29265, 21.57912], [-158.0252, 21.71696], [-157.94161, 21.65272], [-157.65283, 21.32217]]], [[[-159.34512, 21.982], [-159.46372, 21.88299], [-159.80051, 22.06533], [-159.74877, 22.1382], [-159.5962, 22.23618], [-159.36569, 22.21494], [-159.34512, 21.982]]], [[[-94.81758, 49.38905], [-94.639999999999858, 48.840000000000103], [-94.32914, 48.67074], [-93.63087, 48.60926], [-92.61, 48.45], [-91.64, 48.14], [-90.829999999999856, 48.27], [-89.6, 48.01], [-89.272917446636654, 48.019808254582834], [-88.378114183286513, 48.302917588893806], [-87.439792623300207, 47.94], [-86.461990831228135, 47.553338019392037], [-85.652363247403215, 47.220218817730498], [-84.876079881514855, 46.900083319682366], [-84.779238247399817, 46.637101955749117], [-84.54374874544564, 46.538684190449224], [-84.6049, 46.4396], [-84.3367, 46.408770000000104], [-84.142119513673279, 46.512225857115723], [-84.091851264161463, 46.275418606138253], [-83.890765347005654, 46.116926988299149], [-83.616130947590491, 46.116926988299149], [-83.469550747394621, 45.994686387712584], [-83.592850714843067, 45.816893622412543], [-82.550924648758169, 45.347516587905446], [-82.337763125431053, 44.44], [-82.137642381503952, 43.571087551439987], [-82.43, 42.98], [-82.899999999999878, 42.430000000000135], [-83.119999999999877, 42.08], [-83.141999681312555, 41.975681057292995], [-83.029810146806909, 41.832795722005997], [-82.690089280920162, 41.675105088867319], [-82.439277716791608, 41.675105088867319], [-81.277746548167059, 42.209025987306845], [-80.247447679347843, 42.36619985612267], [-78.939362148743683, 42.863611355148116], [-78.92, 42.965], [-79.009999999999863, 43.27], [-79.171673550111862, 43.466339423184301], [-78.720279914042365, 43.625089423184953], [-77.737885097957601, 43.629055589363382], [-76.820034145805565, 43.628784288093748], [-76.5, 44.018458893758599], [-76.375, 44.09631], [-75.31821, 44.81645000000016], [-74.867, 45.00048000000011], [-73.347829999999874, 45.00738], [-71.505059999999858, 45.0082], [-71.405, 45.255000000000123], [-71.08482, 45.305240000000154], [-70.659999999999783, 45.46], [-70.305, 45.915], [-69.99997, 46.69307], [-69.237216, 47.447781], [-68.905, 47.185], [-68.23444, 47.35486], [-67.79046, 47.06636], [-67.79134, 45.702810000000134], [-67.13741, 45.13753], [-66.96466, 44.809700000000149], [-68.03252, 44.3252], [-69.059999999999874, 43.98], [-70.116169999999897, 43.684050000000141], [-70.645475633410967, 43.090238348964043], [-70.81489, 42.8653], [-70.825, 42.335], [-70.494999999999891, 41.805], [-70.08, 41.78], [-70.185, 42.145], [-69.88497, 41.922830000000111], [-69.96503, 41.637170000000161], [-70.64, 41.475], [-71.12039, 41.494450000000164], [-71.859999999999829, 41.32], [-72.295, 41.27], [-72.87643, 41.22065], [-73.71, 40.931102351654481], [-72.24126, 41.119480000000138], [-71.944999999999808, 40.93], [-73.345, 40.63], [-73.982, 40.628], [-73.952325, 40.75075], [-74.25671, 40.47351], [-73.96244, 40.42763], [-74.17838, 39.70926], [-74.90604, 38.93954], [-74.98041, 39.1964], [-75.20002, 39.24845], [-75.52805, 39.4985], [-75.32, 38.96], [-75.071834764789784, 38.782032230179276], [-75.05673, 38.404120000000106], [-75.37747, 38.01551], [-75.94023, 37.21689], [-76.03127, 37.2566], [-75.722049999999783, 37.937050000000106], [-76.23287, 38.319215], [-76.35, 39.15], [-76.542725, 38.717615], [-76.32933, 38.08326], [-76.98999793161353, 38.239991766913384], [-76.301619999999886, 37.917945], [-76.25874, 36.9664000000001], [-75.9718, 36.89726], [-75.868039999999809, 36.55125], [-75.72749, 35.550740000000125], [-76.36318, 34.808540000000129], [-77.39763499999988, 34.51201], [-78.05496, 33.92547], [-78.554349999999815, 33.861330000000116], [-79.06067, 33.49395], [-79.20357, 33.15839], [-80.301325, 32.509355], [-80.86498, 32.0333], [-81.33629, 31.44049], [-81.49042, 30.729990000000122], [-81.31371, 30.03552], [-80.98, 29.18000000000011], [-80.53558499999987, 28.47213], [-80.529999999999774, 28.04], [-80.056539284977532, 26.88000000000013], [-80.088015, 26.205765], [-80.131559999999837, 25.816775], [-80.38103, 25.20616], [-80.679999999999879, 25.08], [-81.17213, 25.201260000000126], [-81.33, 25.64], [-81.709999999999795, 25.87], [-82.239999999999895, 26.730000000000125], [-82.70515, 27.49504], [-82.85526, 27.88624], [-82.65, 28.550000000000146], [-82.929999999999865, 29.100000000000129], [-83.70959, 29.93656], [-84.1, 30.090000000000114], [-85.10882, 29.63615], [-85.28784, 29.686120000000127], [-85.7731, 30.152610000000116], [-86.399999999999878, 30.400000000000112], [-87.530359999999831, 30.27433], [-88.41782, 30.3849], [-89.180489999999836, 30.31598], [-89.593831178419748, 30.159994004836843], [-89.413735, 29.89419], [-89.43, 29.48864], [-89.21767, 29.29108], [-89.40823, 29.15961], [-89.77928, 29.307140000000135], [-90.15463, 29.11743], [-90.880224999999896, 29.148535000000116], [-91.626784999999842, 29.677000000000127], [-92.49906, 29.5523], [-93.22637, 29.78375], [-93.84842, 29.71363], [-94.69, 29.480000000000125], [-95.60026, 28.73863], [-96.59404, 28.30748], [-97.139999999999802, 27.83], [-97.37, 27.38], [-97.379999999999853, 26.69], [-97.33, 26.210000000000115], [-97.139999999999802, 25.87], [-97.529999999999859, 25.84], [-98.239999999999895, 26.060000000000109], [-99.019999999999854, 26.37], [-99.3, 26.84], [-99.52, 27.54], [-100.11, 28.11000000000012], [-100.45584, 28.696120000000118], [-100.957599999999886, 29.380710000000125], [-101.6624, 29.779300000000113], [-102.48, 29.76], [-103.11, 28.97], [-103.94, 29.27], [-104.456969999999814, 29.57196], [-104.705749999999895, 30.12173], [-105.03737, 30.64402], [-105.63159, 31.083830000000113], [-106.1429, 31.39995], [-106.507589999999794, 31.75452], [-108.24, 31.754853718166398], [-108.24194, 31.34222], [-109.035, 31.341940000000161], [-111.02361, 31.33472], [-113.30498, 32.03914], [-114.815, 32.52528], [-114.721389999999829, 32.72083], [-115.991349999999869, 32.61239000000014], [-117.127759999999753, 32.53534], [-117.295937691273863, 33.04622461520389], [-117.944, 33.621236431201389], [-118.410602275897475, 33.740909223124497], [-118.519894822799685, 34.027781577575745], [-119.081, 34.078], [-119.438840642016658, 34.348477178284291], [-120.36778, 34.44711], [-120.62286, 34.60855], [-120.74433, 35.156860000000101], [-121.714569999999853, 36.16153], [-122.54747, 37.551760000000101], [-122.51201, 37.783390000000132], [-122.95319, 38.113710000000104], [-123.7272, 38.951660000000111], [-123.865169999999878, 39.766990000000128], [-124.39807, 40.3132], [-124.17886, 41.142020000000109], [-124.2137, 41.999640000000134], [-124.532839999999894, 42.76599], [-124.14214, 43.70838], [-124.020535, 44.615895], [-123.898929999999893, 45.52341], [-124.079635, 46.86475], [-124.395669999999896, 47.72017], [-124.687210083007812, 48.184432983398537], [-124.566101074218736, 48.379714965820384], [-123.12, 48.04], [-122.587359999999876, 47.096], [-122.34, 47.36], [-122.5, 48.18], [-122.84, 49.0], [-120.0, 49.0], [-117.03121, 49.0], [-116.04818, 49.0], [-112.999999999999872, 49.0], [-110.049999999999812, 49.0], [-107.049999999999898, 49.0], [-104.04826, 48.99986], [-100.65, 49.0], [-97.228720000004699, 49.0007], [-95.159069509171943, 49.0], [-95.15609, 49.38425], [-94.81758, 49.38905]]], [[[-153.006314053336837, 57.115842190165878], [-154.0050902984581, 56.734676825581047], [-154.516402757770067, 56.992748928446687], [-154.670992804971092, 57.461195787172493], [-153.762779507441451, 57.816574612043773], [-153.228729417921073, 57.968968410872421], [-152.564790615835108, 57.901427313866961], [-152.141147223906273, 57.591058661521977], [-153.006314053336837, 57.115842190165878]]], [[[-165.579164191733554, 59.909986884187539], [-166.192770148767238, 59.754440822988961], [-166.848337368821944, 59.941406155020942], [-167.455277066090048, 60.213069159579376], [-166.467792121424566, 60.384169826897775], [-165.674429694663644, 60.293606879306232], [-165.579164191733554, 59.909986884187539]]], [[[-171.731656867539357, 63.782515367275906], [-171.114433560245175, 63.592191067144981], [-170.491112433940657, 63.694975490973505], [-169.682505459653555, 63.431115627691142], [-168.689439460300662, 63.297506212000584], [-168.77194088445458, 63.188598130945437], [-169.529439867204985, 62.976931464277882], [-170.290556200215917, 63.194437567794452], [-170.671385667990847, 63.375821845138965], [-171.553063117538642, 63.317789211675077], [-171.791110602891166, 63.40584585230048], [-171.731656867539357, 63.782515367275906]]], [[[-155.067790290324211, 71.147776394323685], [-154.344165208941206, 70.696408596470192], [-153.900006273392563, 70.889988511835682], [-152.210006069935275, 70.829992173944831], [-152.270002407826127, 70.60000621202984], [-150.739992438744508, 70.430016588005699], [-149.720003018167489, 70.530010484490433], [-147.613361579357047, 70.214034939241785], [-145.689989800225248, 70.120009670686741], [-144.920010959076393, 69.989991767040479], [-143.58944618042517, 70.152514146598307], [-142.072510348713365, 69.851938178172631], [-140.985987521560702, 69.711998399526365], [-140.985988329004869, 69.711998399526365], [-140.992498752029377, 66.000028591568665], [-140.997769748123119, 60.306396796298593], [-140.012997816153074, 60.276837877027575], [-139.03900042031583, 60.000007229240012], [-138.340889999999888, 59.562110000000146], [-137.4525, 58.905000000000101], [-136.47972, 59.46389], [-135.47583, 59.78778], [-134.945, 59.270560000000117], [-134.27111, 58.86111], [-133.355548882207188, 58.410285142645151], [-132.73042, 57.692890000000105], [-131.707809999999853, 56.55212], [-130.00778, 55.91583], [-129.979994263358265, 55.284997870497207], [-130.536110189467223, 54.802753404349389], [-131.08581823797212, 55.178906155002025], [-131.967211467142278, 55.497775580459049], [-132.250010742859445, 56.369996242897443], [-133.539181084356386, 57.178887437562125], [-134.07806292029602, 58.123067531966889], [-135.038211032279037, 58.187714748763931], [-136.628062309954629, 58.212209377670447], [-137.800006279686016, 58.499995429103777], [-139.867787041412981, 59.537761542389134], [-140.825273817133024, 59.72751740176507], [-142.574443535564427, 60.084446519604981], [-143.958880994879848, 59.99918040632339], [-145.925556816827822, 60.458609727614274], [-147.114373949146625, 60.884656073644628], [-148.224306200127643, 60.672989406977152], [-148.018065558850736, 59.978328965893631], [-148.570822516860858, 59.914172675203297], [-149.727857835875824, 59.705658270905545], [-150.608243374616421, 59.368211168039487], [-151.716392788683294, 59.155821031319974], [-151.859433153267105, 59.74498403587959], [-151.40971900124714, 60.725802720779392], [-150.346941494732505, 61.033587551509854], [-150.621110806256951, 61.284424953854447], [-151.895839199816834, 60.727197984451273], [-152.578329841095581, 60.061657212964285], [-154.019172126257558, 59.350279446034264], [-153.287511359653166, 58.864727688219787], [-154.232492438758442, 58.146373602930531], [-155.307491421510207, 57.727794501366319], [-156.308334723923082, 57.422774359763636], [-156.556097378546298, 56.979984849670636], [-158.117216559867728, 56.463608099994175], [-158.433321296197136, 55.994153550838533], [-159.603327399717415, 55.566686102920116], [-160.289719611634183, 55.643580634170561], [-161.223047655257773, 55.364734605523481], [-162.23776607974105, 55.024186916720097], [-163.069446581046378, 54.689737046927171], [-164.785569221027174, 54.40417308208216], [-164.942226325520011, 54.572224839895327], [-163.84833960676562, 55.039431464246107], [-162.870001390615897, 55.348043117893198], [-161.804174974596009, 55.894986477270429], [-160.563604702781134, 56.008054511125025], [-160.070559862284483, 56.418055324928744], [-158.684442918919416, 57.016675116597852], [-158.461097378553944, 57.216921291728866], [-157.722770352183858, 57.570000515363056], [-157.550274421193564, 58.328326321030218], [-157.041674974576949, 58.918884589261708], [-158.194731208305427, 58.615802313869828], [-158.517217984023034, 58.787781480537305], [-159.058606126928709, 58.424186102931671], [-159.711667040017318, 58.931390285876333], [-159.981288825500144, 58.572549140041623], [-160.355271165996498, 59.071123358793628], [-161.355003425115001, 58.670837714260742], [-161.968893602526293, 58.671664537177371], [-162.054986538724648, 59.266925360747436], [-161.874170702135331, 59.633621324290587], [-162.518059048492034, 59.989723619213905], [-163.818341437820123, 59.798055731843377], [-164.662217577146407, 60.267484442782639], [-165.346387702474772, 60.507495632562396], [-165.350831875651835, 61.073895168697497], [-166.121379157555907, 61.500019029376212], [-165.734451870770471, 62.074996853271792], [-164.919178636717788, 62.633076483807919], [-164.562507901039339, 63.146378485763044], [-163.753332485996964, 63.219448961023758], [-163.067224494457832, 63.05945872664801], [-162.260555386381697, 63.541935736741159], [-161.534449836248569, 63.455816962326757], [-160.772506680321101, 63.76610810002326], [-160.958335130842528, 64.222798570402759], [-161.518068407212184, 64.402787584075313], [-160.777777676414729, 64.788603827566405], [-161.391926235987597, 64.777235012462327], [-162.453050096668818, 64.559444688568206], [-162.757786017894034, 64.338605455168803], [-163.54639421288428, 64.559160468190484], [-164.960829841145141, 64.446945095468848], [-166.425288255864473, 64.686672064870706], [-166.845004238939026, 65.088895575614529], [-168.110560065767146, 65.669997056736733], [-166.70527116602193, 66.088317776139391], [-164.474709642575448, 66.576660061297488], [-163.652511766595637, 66.576660061297488], [-163.788601651036117, 66.077207343196662], [-161.677774421210131, 66.116119696712403], [-162.489714525379981, 66.735565090595102], [-163.719716966791083, 67.116394558370089], [-164.430991380856511, 67.616338202577779], [-165.390286831706703, 68.042772121850234], [-166.764440680995989, 68.35887685817967], [-166.204707404626561, 68.883030910916162], [-164.430810513343431, 68.915535386827727], [-163.168613654614489, 69.371114813912882], [-162.930566169261965, 69.858061835399255], [-161.908897264635499, 70.333329983187625], [-160.93479651593367, 70.447689927849567], [-159.039175788387126, 70.891642157668926], [-158.119722866833939, 70.824721177851032], [-156.580824551398024, 71.357763576941736], [-155.067790290324211, 71.147776394323685]]]] } }, + { "type": "Feature", "properties": { "admin": "Uzbekistan", "name": "Uzbekistan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[66.518606805288655, 37.362784328758785], [66.546150343700205, 37.974684963526855], [65.215998976507379, 38.402695013984292], [64.170223016216752, 38.892406724598231], [63.518014764261018, 39.363256537425627], [62.374260288344992, 40.053886216790382], [61.882714064384679, 41.084856879229392], [61.547178989513547, 41.2663703476546], [60.46595299667068, 41.22032664648254], [60.083340691981654, 41.425146185871391], [59.976422153569771, 42.223081976890199], [58.629010857991453, 42.751551011723045], [57.786529982337065, 42.170552883465511], [56.93221520368779, 41.82602610937559], [57.096391229079089, 41.32231008561056], [55.968191359282898, 41.308641669269356], [55.928917270741081, 44.995858466159099], [58.503127068928457, 45.586804307632818], [58.689989048095882, 45.500013739598621], [60.239971958258316, 44.784036770194717], [61.05831994003244, 44.405816962250505], [62.013300408786236, 43.504476630215642], [63.185786981056559, 43.650074978197999], [64.900824415959264, 43.728080552742576], [66.098012322865074, 42.997660020513088], [66.023391554635609, 41.994646307943974], [66.510648634715707, 41.987644151368436], [66.714047072216502, 41.168443508461493], [67.985855747351806, 41.135990708982213], [68.259895867795606, 40.662324530594894], [68.632482944620008, 40.668680731766798], [69.070027296835306, 41.384244289712363], [70.388964878220776, 42.081307684897439], [70.96231489449913, 42.266154283205481], [71.259247674448218, 42.167710679689456], [70.420022414028196, 41.519998277343134], [71.157858514291576, 41.143587144529107], [71.870114780570447, 41.392900092121259], [73.055417108049156, 40.86603302668945], [71.774875115856545, 40.145844428053763], [71.014198032520156, 40.244365546218226], [70.601406691372674, 40.218527330072284], [70.458159621059608, 40.49649485937028], [70.666622348925031, 40.960213324541407], [69.329494663372813, 40.727824408524839], [69.011632928345477, 40.086158148756653], [68.536416456989414, 39.533452867178923], [67.701428664017342, 39.580478420564518], [67.442219679641298, 39.140143541005479], [68.176025018185911, 38.901553453113898], [68.392032505165943, 38.157025254868728], [67.829999627559502, 37.144994004864678], [67.075782098259609, 37.35614390720928], [66.518606805288655, 37.362784328758785]]] } }, + { "type": "Feature", "properties": { "admin": "Venezuela", "name": "Venezuela", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-71.331583624950284, 11.776284084515805], [-71.36000566271079, 11.53999359786121], [-71.947049933546495, 11.423282375530018], [-71.620868292920164, 10.969459947142791], [-71.633063930941063, 10.446494452349027], [-72.074173956984495, 9.865651353388369], [-71.695644090446521, 9.072263088411246], [-71.26455929226772, 9.137194525585981], [-71.039999355743376, 9.859992784052407], [-71.350083787710773, 10.211935126176213], [-71.400623338492224, 10.968969021036013], [-70.155298834906503, 11.375481675660039], [-70.293843349881016, 11.846822414594211], [-69.943244594996813, 12.162307033736095], [-69.584300096297454, 11.459610907431211], [-68.882999233664435, 11.44338450769156], [-68.233271450458716, 10.885744126829945], [-68.194126552997616, 10.554653225135921], [-67.296248541926317, 10.545868231646306], [-66.227864142507983, 10.648626817258684], [-65.655237596281737, 10.20079885501732], [-64.890452236578156, 10.077214667191296], [-64.329478725833724, 10.389598700395679], [-64.318006557864933, 10.641417954953978], [-63.079322475828725, 10.701724351438598], [-61.880946010980182, 10.7156253117251], [-62.730118984616396, 10.420268662960904], [-62.388511928950969, 9.948204453974636], [-61.588767462801918, 9.873066921422263], [-60.830596686431711, 9.38133982994894], [-60.671252407459718, 8.580174261911877], [-60.150095587796166, 8.602756862823425], [-59.758284878159181, 8.367034816924045], [-60.550587938058186, 7.779602972846178], [-60.637972785063752, 7.414999904810853], [-60.295668097562377, 7.043911444522918], [-60.543999192940966, 6.856584377464881], [-61.159336310456467, 6.696077378766317], [-61.139415045807937, 6.234296779806142], [-61.410302903881941, 5.959068101419616], [-60.733574184803707, 5.2002772078619], [-60.601179165271922, 4.918098049332129], [-60.966893276601517, 4.536467596856638], [-62.085429653559125, 4.162123521334308], [-62.804533047116692, 4.006965033377951], [-63.093197597899092, 3.770571193858784], [-63.888342861574145, 4.020530096854571], [-64.628659430587533, 4.14848094320925], [-64.816064012294007, 4.056445217297422], [-64.368494432214092, 3.797210394705246], [-64.408827887617903, 3.126786200366623], [-64.269999152265783, 2.497005520025566], [-63.422867397705105, 2.411067613124174], [-63.368788011311644, 2.200899562993129], [-64.083085496666072, 1.91636912679408], [-64.199305792890499, 1.49285492594602], [-64.611011928959854, 1.328730576987041], [-65.354713304288353, 1.0952822941085], [-65.548267381437554, 0.78925446207603], [-66.325765143484944, 0.724452215982012], [-66.876325853122566, 1.253360500489336], [-67.181294318293041, 2.250638129074062], [-67.447092047786299, 2.600280869960869], [-67.809938117123693, 2.820655015469569], [-67.303173183853417, 3.31845408773718], [-67.33756384954367, 3.542342230641721], [-67.621835903581271, 3.839481716319994], [-67.823012254493534, 4.503937282728898], [-67.744696621355203, 5.221128648291667], [-67.521531948502741, 5.556870428891968], [-67.34143958196556, 6.095468044454021], [-67.695087246355001, 6.267318020040645], [-68.265052456318216, 6.153268133972473], [-68.985318569602327, 6.206804917826856], [-69.389479946557103, 6.099860541198835], [-70.093312954372408, 6.960376491723109], [-70.674233567981503, 7.087784735538717], [-71.960175747348629, 6.991614895043538], [-72.19835242378187, 7.340430813013682], [-72.444487270788059, 7.42378489830048], [-72.479678921178831, 7.632506008327352], [-72.360900641555958, 8.002638454617893], [-72.439862230097944, 8.405275376820027], [-72.660494757768092, 8.62528778730268], [-72.788729824500379, 9.085027167187331], [-73.304951544880026, 9.151999823437604], [-73.027604132769554, 9.736770331252441], [-72.905286017534692, 10.45034434655477], [-72.614657762325194, 10.821975409381777], [-72.227575446242923, 11.108702093953237], [-71.973921678338272, 11.608671576377116], [-71.331583624950284, 11.776284084515805]]] } }, + { "type": "Feature", "properties": { "admin": "Vietnam", "name": "Vietnam", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[108.050180291782908, 21.552379869060111], [106.715067987090066, 20.696850694252014], [105.881682163519002, 19.752050482659694], [105.662005649846279, 19.058165188060567], [106.426816847765991, 18.004120998603224], [107.36195356651973, 16.697456569887049], [108.269495070429599, 16.079742336486145], [108.877106561317447, 15.276690578670436], [109.335269810017209, 13.42602834721772], [109.200135939573954, 11.666859239137761], [108.366129998815424, 11.00832062422627], [107.22092858279521, 10.36448395430183], [106.4051127462034, 9.530839748569317], [105.158263787865081, 8.599759629750492], [104.795185174582372, 9.2410383162765], [105.076201613385592, 9.918490505406806], [104.334334751403446, 10.486543687375228], [105.199914992292321, 10.889309800658094], [106.249670037869436, 10.961811835163585], [105.810523716253101, 11.567614650921225], [107.491403029410861, 12.337205918827944], [107.614547967562402, 13.535530707244202], [107.382727492301058, 14.202440904186968], [107.564525181103875, 15.202173163305554], [107.312705926545576, 15.908538316303177], [106.55600792849566, 16.604283962464802], [105.925762160264, 17.485315456608955], [105.094598423281496, 18.666974595611073], [103.896532017026701, 19.265180975821799], [104.183387892678908, 19.624668077060214], [104.822573683697073, 19.886641750563879], [104.435000441508024, 20.758733221921528], [103.203861118586431, 20.766562201413745], [102.754896274834636, 21.675137233969462], [102.170435825613552, 22.464753119389297], [102.706992222100084, 22.708795070887668], [103.504514601660546, 22.703756618739202], [104.476858351664447, 22.819150092046961], [105.329209425886603, 23.352063300056908], [105.811247186305209, 22.976892401617899], [106.725403273548451, 22.794267889898414], [106.567273390735295, 22.218204860924768], [107.043420037872608, 21.811898912029907], [108.050180291782908, 21.552379869060111]]] } }, + { "type": "Feature", "properties": { "admin": "Vanuatu", "name": "Vanuatu", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[167.844876743845077, -16.466333103097153], [167.515181105822847, -16.597849623279966], [167.180007765977791, -16.159995212470957], [167.2168013857696, -15.891846205308449], [167.844876743845077, -16.466333103097153]]], [[[167.107712437201485, -14.933920179913951], [167.2700281110302, -15.74002084723487], [167.001207310247935, -15.614602146062492], [166.79315799384085, -15.668810723536719], [166.649859247095549, -15.392703545801192], [166.629136997746429, -14.6264970842096], [167.107712437201485, -14.933920179913951]]]] } }, + { "type": "Feature", "properties": { "admin": "Yemen", "name": "Yemen", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[53.108572625547502, 16.651051133688949], [52.385205926325874, 16.38241120041965], [52.191729363825075, 15.938433132384018], [52.168164910699986, 15.597420355689945], [51.172515089732471, 15.175249742081489], [49.574576450403136, 14.708766587782746], [48.679230584514151, 14.003202419485657], [48.238947381387412, 13.948089504446369], [47.938914015500771, 14.007233181204423], [47.354453566279702, 13.592219753468379], [46.71707645039173, 13.399699204965016], [45.877592807810252, 13.347764390511681], [45.625050083199874, 13.290946153206759], [45.406458774605241, 13.02690542241143], [45.144355910020849, 12.953938300015306], [44.9895333188744, 12.699586900274708], [44.494576450382844, 12.721652736863344], [44.175112745954486, 12.585950425664873], [43.48295861183712, 12.63680003504008], [43.222871128112118, 13.220950425667422], [43.251448195169516, 13.767583726450848], [43.087943963398047, 14.062630316621306], [42.892245314308717, 14.802249253798745], [42.604872674333606, 15.213335272680592], [42.805015496600042, 15.261962795467252], [42.702437778500652, 15.718885809791995], [42.823670688657408, 15.911742255105263], [42.779332309750963, 16.34789134364868], [43.218375278502734, 16.666889960186406], [43.115797560403351, 17.088440456607369], [43.380794305196098, 17.579986680567668], [43.791518589051904, 17.319976711491105], [44.062613152855072, 17.410358791569589], [45.216651238797184, 17.43332896572333], [45.399999220568752, 17.333335069238554], [46.366658563020529, 17.233315334537632], [46.749994337761642, 17.283338120996174], [47.000004917189749, 16.949999294497438], [47.466694777217626, 17.116681626854877], [48.183343540241324, 18.166669216377311], [49.116671583864857, 18.616667588774941], [52.000009800022227, 19.000003363516054], [52.782184279192037, 17.349742336491229], [53.108572625547502, 16.651051133688949]]] } }, + { "type": "Feature", "properties": { "admin": "South Africa", "name": "South Africa", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[31.521001417778869, -29.257386976846245], [31.325561150850994, -29.401977634398907], [30.901762729625336, -29.909956963828034], [30.622813348113816, -30.423775730106122], [30.055716180142774, -31.140269463832951], [28.925552605919535, -32.172041110972494], [28.219755893677092, -32.771952813448848], [27.464608188595967, -33.226963799778794], [26.419452345492818, -33.614950453426175], [25.909664340933482, -33.667040297176392], [25.78062828950069, -33.944646091448334], [25.172861769315965, -33.796851495093577], [24.67785322439212, -33.987175795224537], [23.594043409934635, -33.794474379208147], [22.988188917744729, -33.916430759416976], [22.574157342222232, -33.864082533505304], [21.542799106541022, -34.258838799782922], [20.689052768646999, -34.417175388325226], [20.071261020597628, -34.795136814107984], [19.616405063564567, -34.819166355123706], [19.193278435958714, -34.462598972309777], [18.855314568769867, -34.444305515278458], [18.424643182049376, -33.997872816708963], [18.377410922934612, -34.13652068454806], [18.244499139079917, -33.867751560198023], [18.250080193767442, -33.281430759414434], [17.925190463948436, -32.61129078545342], [18.247909783611185, -32.429131361624563], [18.221761508871477, -31.661632989225662], [17.566917758868861, -30.72572112398754], [17.0644161312627, -29.878641045859158], [17.06291751472622, -29.875953871379977], [16.344976840895239, -28.576705010697697], [16.824017368240899, -28.082161553664466], [17.218928663815401, -28.355943291946804], [17.387497185951499, -28.783514092729774], [17.836151971109526, -28.856377862261311], [18.464899122804745, -29.045461928017271], [19.002127312911082, -28.972443129188857], [19.89473432788861, -28.461104831660769], [19.895767856534427, -24.767790215760588], [20.165725538827186, -24.917961928000768], [20.758609246511831, -25.868136488551446], [20.666470167735437, -26.477453301704916], [20.889609002371731, -26.828542982695907], [21.60589603036939, -26.726533705351748], [22.105968865657864, -26.28025603607913], [22.579531691180584, -25.979447523708142], [22.824271274514896, -25.500458672794768], [23.312096795350179, -25.268689873965712], [23.733569777122703, -25.39012948985161], [24.211266717228792, -25.670215752873567], [25.025170525825782, -25.719670098576891], [25.664666375437712, -25.486816094669706], [25.765848829865206, -25.174845472923671], [25.941652052522151, -24.696373386333214], [26.485753208123292, -24.616326592713097], [26.78640669119741, -24.240690606383478], [27.119409620886238, -23.574323011979772], [28.017235955525244, -22.827753594659072], [29.432188348109033, -22.091312758067584], [29.839036899542965, -22.102216485281172], [30.322883335091767, -22.271611830333931], [30.659865350067083, -22.151567478119912], [31.191409132621278, -22.251509698172395], [31.670397983534645, -23.658969008073861], [31.930588820124242, -24.369416599222532], [31.752408481581874, -25.484283949487406], [31.837777947728057, -25.843331801051342], [31.333157586397899, -25.660190525008943], [31.044079624157146, -25.731452325139436], [30.949666782359905, -26.022649021104144], [30.676608514129633, -26.398078301704604], [30.685961948374477, -26.743845310169526], [31.282773064913325, -27.285879408478991], [31.868060337051073, -27.17792734142127], [32.071665480281062, -26.733820082304902], [32.830120477028878, -26.74219166433619], [32.580264926897677, -27.470157566031808], [32.462132602678444, -28.30101124442055], [32.203388706193032, -28.752404880490065], [31.521001417778869, -29.257386976846245]], [[28.978262566857236, -28.955596612261708], [28.541700066855491, -28.647501722937562], [28.07433841320778, -28.851468601193581], [27.532511020627471, -29.242710870075353], [26.999261915807629, -29.875953871379977], [27.749397006956478, -30.645105889612214], [28.107204624145421, -30.545732110314944], [28.291069370239903, -30.226216729454293], [28.848399692507734, -30.070050551068245], [29.018415154748016, -29.743765557577362], [29.325166456832587, -29.257386976846245], [28.978262566857236, -28.955596612261708]]] } }, + { "type": "Feature", "properties": { "admin": "Zambia", "name": "Zambia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[32.759375441221316, -9.230599053589058], [33.231387973775291, -9.676721693564799], [33.485687697083584, -10.525558770391111], [33.315310499817279, -10.796549981329695], [33.114289178201908, -11.607198174692311], [33.306422153463068, -12.435778090060214], [32.991764357237876, -12.783870537978272], [32.688165317523122, -13.712857761289273], [33.214024692525207, -13.97186003993615], [30.179481235481827, -14.796099134991525], [30.274255812305103, -15.507786960515208], [29.51683434420314, -15.644677829656386], [28.947463413211256, -16.043051446194436], [28.825868768028492, -16.389748630440611], [28.467906121542676, -16.468400160388843], [27.598243442502753, -17.290830580314005], [27.044427117630729, -17.938026218337427], [26.706773309035633, -17.961228936436477], [26.381935255648919, -17.846042168857892], [25.264225701608005, -17.736539808831413], [25.084443393664564, -17.661815687737366], [25.076950310982255, -17.578823337476617], [24.6823490740015, -17.35341073981947], [24.033861525170771, -17.29584319424632], [23.215048455506057, -17.52311614346598], [22.562478468524255, -16.89845142992181], [21.887842644953867, -16.080310153876876], [21.933886346125913, -12.898437188369357], [24.016136508894672, -12.91104623784857], [23.930922072045373, -12.565847670138854], [24.079905226342838, -12.191296888887361], [23.904153680118181, -11.722281589406318], [24.017893507592586, -11.237298272347088], [23.912215203555714, -10.926826267137512], [24.257155389103982, -10.951992689663655], [24.314516228947948, -11.262826429899269], [24.783169793402948, -11.238693536018962], [25.418118116973197, -11.330935967659958], [25.752309604604726, -11.784965101776356], [26.55308759939961, -11.924439792532125], [27.164419793412456, -11.608748467661071], [27.38879886242378, -12.132747491100663], [28.15510867687998, -12.272480564017894], [28.52356163912102, -12.698604424696679], [28.934285922976834, -13.248958428605132], [29.699613885219485, -13.257226657771827], [29.616001417771223, -12.178894545137307], [29.341547885869087, -12.36074391037241], [28.642417433392346, -11.971568698782312], [28.372253045370421, -11.793646742401389], [28.496069777141763, -10.789883721564044], [28.673681674928922, -9.605924981324931], [28.449871046672818, -9.164918308146083], [28.734866570762495, -8.526559340044576], [29.002912225060467, -8.40703175215347], [30.34608605319081, -8.238256524288216], [30.740015496551781, -8.340007419470913], [31.157751336950042, -8.594578747317362], [31.55634809746649, -8.76204884199864], [32.191864861791963, -8.930358981973276], [32.759375441221316, -9.230599053589058]]] } }, + { "type": "Feature", "properties": { "admin": "Zimbabwe", "name": "Zimbabwe", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[31.191409132621278, -22.251509698172395], [30.659865350067083, -22.151567478119912], [30.322883335091767, -22.271611830333931], [29.839036899542965, -22.102216485281172], [29.432188348109033, -22.091312758067584], [28.794656202924209, -21.639454034107445], [28.02137007010861, -21.485975030200578], [27.727227817503252, -20.851801853114711], [27.724747348753247, -20.499058526290387], [27.296504754350501, -20.391519870690995], [26.164790887158478, -19.293085625894935], [25.850391473094724, -18.714412937090533], [25.649163445750155, -18.536025892818987], [25.264225701608005, -17.736539808831413], [26.381935255648919, -17.846042168857892], [26.706773309035633, -17.961228936436477], [27.044427117630729, -17.938026218337427], [27.598243442502753, -17.290830580314005], [28.467906121542676, -16.468400160388843], [28.825868768028492, -16.389748630440611], [28.947463413211256, -16.043051446194436], [29.51683434420314, -15.644677829656386], [30.274255812305103, -15.507786960515208], [30.338954705534537, -15.880839125230242], [31.173063999157673, -15.860943698797868], [31.636498243951188, -16.071990248277881], [31.852040643040592, -16.319417006091374], [32.328238966610222, -16.392074069893749], [32.847638787575839, -16.713398125884613], [32.849860874164385, -17.979057305577175], [32.654885695127142, -18.672089939043492], [32.611994256324884, -19.419382826416268], [32.772707960752619, -19.715592136313294], [32.659743279762573, -20.30429005298231], [32.508693068173436, -20.395292250248303], [32.244988234188007, -21.116488539313689], [31.191409132621278, -22.251509698172395]]] } } + ] + }; + +var randomcountriesData1 = [ + { country: "Iran", "continent": "Asia", "CategoryName": "Books", "Sales": 550 }, + { country: "Benin", "continent": "Africa", "CategoryName": "Books", "Sales": 1000 }, + { country: "China", "continent": "Asia", "CategoryName": "Books", "Sales": 420 }, + { country: "Chile", "continent": "South America", "CategoryName": "Books", "Sales": 1100 }, + { country: "Cuba", "continent": "North America", "CategoryName": "Books", "Sales": 450 }, + { country: "Spain", "continent": "Europe", "CategoryName": "Books", "Sales": 1200 }, + { country: "Fiji", "continent": "Oceania", "CategoryName": "Books", "Sales": 618.0 }, +]; + +module mapcomponenet { + $(function () { + var mapsample = new ej.datavisualization.Map($("#map"), { + enableAnimation: true, + navigationControl: { + enableNavigation: true, + orientation: 'vertical', + absolutePosition: { x: 5, y: 15 }, + dockPosition: 'none' + }, + layers: [ + { + layerType: 'geometry', + enableMouseHover: false, + enableSelection: false, + shapeSettings: { + fill: "#626171", + autoFill: false, + highlightStroke: "white", + stroke: "white", + strokeThickness: 0.5, + highlightColor: "#BFBFBF" + }, + shapeData: world_map, + legendSettings: { dockOnMap: false } + } + ] + }); + }); +} + + + + + + +module MenuComponent { + $(function () { + var sample = new ej.Menu($("#syncfusionProducts"),{ + width: "100%", + animationType: ej.AnimationType.Default, + cssClass: 'gradient-lime ', + enableAnimation: true, + enableSeparator: true, + height: 40, + htmlAttributes: { "aria-label": "menu" }, + menuType: "normalmenu", + orientation: ej.Orientation.Horizontal, + showRootLevelArrows: true, + showSubLevelArrows: true, + subMenuDirection: ej.Direction.Right, + titleText: "Menu", + }); + }); +} + + + +module NavigationDrawerComponent { + $(function () { + var navigationdrawerInstance = new ej.NavigationDrawer($("#navpane"), { + targetId: "butdrawer", + contentId: "content_container", + type: "overlay", + direction: "left", + enableListView: true, + listViewSettings: { + width: 300, + selectedItemIndex: 0 + }, + position: "normal" + }); + $("#navpane_listview").click(function(e: any) { + var text=e.target["text"]||$(e.target).closest("li.e-list").text(); + $("#butdrawer").parent().children("h2").text(text); + }); + }); +} + + + +module PDFViewerComponent { + $(function () { + var pdfviewerControl = new ej.PdfViewer($("#pdfviewer"), { + serviceUrl:(window).baseurl+ "api/PdfViewer", + isResponsive: true + }); + }); +} + + + +module PivotChartOlap { + $(function () { + var sample = new ej.PivotChart($("#PivotChart"),{ + dataSource: { + data: "//bi.syncfusion.com/olap/msmdpump.dll", + catalog: "Adventure Works DW 2008 SE", + cube: "Adventure Works", + rows: [ + { + fieldName: "[Date].[Fiscal]" + } + ], + columns: [ + { + fieldName: "[Customer].[Customer Geography]" + } + ], + values: [ + { + measures: [ + { + fieldName: "[Measures].[Internet Sales Amount]" + } + ], + axis: "columns" + } + ], + filters:[] + }, + isResponsive: true,zooming:{enableScrollbar: true}, + commonSeriesOptions: { + type: "column" + }, + size: { height: "460px", width: "100%" }, + primaryXAxis: { title: { text: "Date - Fiscal" }, labelRotation: 0 }, + primaryYAxis: { title: { text: "Internet Sales Amount" } }, + legend: { visible: true, rowCount: 2 }, + load: function () { + var PivotChart = (window).themeStyle + (window).themeColor + (window).themeVarient; + PivotChart = PivotChart.toString(); + if (PivotChart.indexOf("dark") > -1 || PivotChart.indexOf("contrast") > -1) + PivotChart = "flatdark"; + else + PivotChart = "flatlight"; + this.model.theme = PivotChart; + }, + }); + }); +} + + + +var pivot_dataset = [ + { Amount: 100, Country: "Canada", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Alberta" }, + { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Van", Quantity: 3, State: "British Columbia" }, + { Amount: 300, Country: "Canada", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Brunswick" }, + { Amount: 150, Country: "Canada", Date: "FY 2008", Product: "Bike", Quantity: 3, State: "Manitoba" }, + { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Car", Quantity: 4, State: "Ontario" }, + { Amount: 100, Country: "Canada", Date: "FY 2007", Product: "Van", Quantity: 1, State: "Quebec" }, + { Amount: 200, Country: "France", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Charente-Maritime" }, + { Amount: 250, Country: "France", Date: "FY 2006", Product: "Van", Quantity: 4, State: "Essonne" }, + { Amount: 300, Country: "France", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Garonne (Haute)" }, + { Amount: 150, Country: "France", Date: "FY 2008", Product: "Van", Quantity: 2, State: "Gers" }, + { Amount: 200, Country: "Germany", Date: "FY 2006", Product: "Van", Quantity: 3, State: "Bayern" }, + { Amount: 250, Country: "Germany", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Brandenburg" }, + { Amount: 150, Country: "Germany", Date: "FY 2008", Product: "Car", Quantity: 4, State: "Hamburg" }, + { Amount: 200, Country: "Germany", Date: "FY 2008", Product: "Bike", Quantity: 4, State: "Hessen" }, + { Amount: 150, Country: "Germany", Date: "FY 2007", Product: "Van", Quantity: 3, State: "Nordrhein-Westfalen" }, + { Amount: 100, Country: "Germany", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Saarland" }, + { Amount: 150, Country: "United Kingdom", Date: "FY 2008", Product: "Bike", Quantity: 5, State: "England" }, + { Amount: 250, Country: "United States", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Alabama" }, + { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Van", Quantity: 4, State: "California" }, + { Amount: 100, Country: "United States", Date: "FY 2006", Product: "Bike", Quantity: 2, State: "Colorado" }, + { Amount: 150, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "New Mexico" }, + { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Bike", Quantity: 4, State: "New York" }, + { Amount: 250, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "North Carolina" }, + { Amount: 300, Country: "United States", Date: "FY 2007", Product: "Van", Quantity: 4, State: "South Carolina" } +] + +module PivotChartRelational { + + $(function () { + var sample = new ej.PivotChart($("#PivotChart"),{ + dataSource: { + data: pivot_dataset, + rows: [ + { + fieldName: "Country", + fieldCaption: "Country" + }, + { + fieldName: "State", + fieldCaption: "State" + }, + { + fieldName: "Date", + fieldCaption: "Date" + } + ], + columns: [ + { + fieldName: "Product", + fieldCaption: "Product" + } + ], + values: [ + { + fieldName: "Amount", + fieldCaption: "Amount" + } + ], + filters:[] + }, + isResponsive: true,zooming:{enableScrollbar: true}, + commonSeriesOptions: { + type: "column" + }, + size: { height: "460px", width: "100%" }, + primaryYAxis: { title: { text: "Amount" } }, + legend: { visible: true }, + load: function () { + var PivotChart = (window).themeStyle + (window).themeColor + (window).themeVarient; + PivotChart = PivotChart.toString(); + if (PivotChart.indexOf("dark") > -1 || PivotChart.indexOf("contrast") > -1) + PivotChart = "flatdark"; + else + PivotChart = "flatlight"; + this.model.theme = PivotChart; + }, + }); + }); +} + + + +module PivotGaugeOlap { + + $(function () { + var sample = new ej.PivotGauge($("#PivotGauge"),{ + dataSource: { + data: "//bi.syncfusion.com/olap/msmdpump.dll", + catalog: "Adventure Works DW 2008 SE", + cube: "Adventure Works", + rows: [ + { + fieldName: "[Date].[Fiscal]", + filterItems: { filterType: "include", values: ["[Date].[Fiscal].[Fiscal Year].&[2004]"] } + }, + ], + columns: [ + { + fieldName: "[Customer].[Customer Geography]" + } + ], + values: [ + { + measures: [ + { + fieldName: "[Measures].[Internet Sales Amount]" + }, + { + fieldName: "[Measures].[Internet Revenue Status]" + }, + { + fieldName: "[Measures].[Internet Revenue Trend]" + }, + { + fieldName: "[Measures].[Internet Revenue Goal]" + }, + ], + axis: "columns" + } + ], + filters:[] + }, + enableTooltip: true, isResponsive: true, + labelFormatSettings: { decimalPlaces: 2 }, + scales: [{ + showRanges: true, + radius: 150, showScaleBar: true, size: 1, + border: { + width: 0.5 + }, + showIndicators: true, showLabels: true, + pointers: [{ + showBackNeedle: true, + backNeedleLength: 20, + length: 120, + width: 7 + }, + { + type: "marker", + markerType: "diamond", + distanceFromScale: 5, + placement: "center", + backgroundColor: "#29A4D9", + length: 25, + width: 15 + }], + ticks: [{ + type: "major", + distanceFromScale: 2, + height: 16, + width: 1, color: "#8c8c8c" + }, + { + type: "minor", + height: 6, + width: 1, + distanceFromScale: 2, + color: "#8c8c8c" + }], + labels: [{ + color: "#8c8c8c" + }], + ranges: [{ + distanceFromScale: -5, + backgroundColor: "#fc0606", + border: { color: "#fc0606" } + }, + { + distanceFromScale: -5 + }], + customLabels: [{ + position: { x: 180, y: 290 }, + font: { size: "10px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" + }, + { + position: { x: 180, y: 320 }, + font: { size: "10px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" + }, + { + position: { x: 180, y: 150 }, + font: { size: "12px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" + }] + }] + }); + }); +} + + + +var pivot_dataset = [ + { Amount: 100, Country: "Canada", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Alberta" }, + { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Van", Quantity: 3, State: "British Columbia" }, + { Amount: 300, Country: "Canada", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Brunswick" }, + { Amount: 150, Country: "Canada", Date: "FY 2008", Product: "Bike", Quantity: 3, State: "Manitoba" }, + { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Car", Quantity: 4, State: "Ontario" }, + { Amount: 100, Country: "Canada", Date: "FY 2007", Product: "Van", Quantity: 1, State: "Quebec" }, + { Amount: 200, Country: "France", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Charente-Maritime" }, + { Amount: 250, Country: "France", Date: "FY 2006", Product: "Van", Quantity: 4, State: "Essonne" }, + { Amount: 300, Country: "France", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Garonne (Haute)" }, + { Amount: 150, Country: "France", Date: "FY 2008", Product: "Van", Quantity: 2, State: "Gers" }, + { Amount: 200, Country: "Germany", Date: "FY 2006", Product: "Van", Quantity: 3, State: "Bayern" }, + { Amount: 250, Country: "Germany", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Brandenburg" }, + { Amount: 150, Country: "Germany", Date: "FY 2008", Product: "Car", Quantity: 4, State: "Hamburg" }, + { Amount: 200, Country: "Germany", Date: "FY 2008", Product: "Bike", Quantity: 4, State: "Hessen" }, + { Amount: 150, Country: "Germany", Date: "FY 2007", Product: "Van", Quantity: 3, State: "Nordrhein-Westfalen" }, + { Amount: 100, Country: "Germany", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Saarland" }, + { Amount: 150, Country: "United Kingdom", Date: "FY 2008", Product: "Bike", Quantity: 5, State: "England" }, + { Amount: 250, Country: "United States", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Alabama" }, + { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Van", Quantity: 4, State: "California" }, + { Amount: 100, Country: "United States", Date: "FY 2006", Product: "Bike", Quantity: 2, State: "Colorado" }, + { Amount: 150, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "New Mexico" }, + { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Bike", Quantity: 4, State: "New York" }, + { Amount: 250, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "North Carolina" }, + { Amount: 300, Country: "United States", Date: "FY 2007", Product: "Van", Quantity: 4, State: "South Carolina" } +] + +module PivotGaugeRelational { + $(function () { + var sample = new ej.PivotGauge($("#PivotGauge"),{ + dataSource: { + data: pivot_dataset, + rows: [ + { + fieldName: "Country", + }, + { + fieldName: "State", + } + ], + columns: [ + { + fieldName: "Product", + } + ], + values: [ + { + fieldName: "Amount", + }, + { + fieldName: "Quantity", + } + ] + }, + enableTooltip: true, isResponsive: true, + labelFormatSettings: { decimalPlaces: 2 }, + scales: [{ + showRanges: true, + radius: 150, showScaleBar: true, size: 1, + border: { + width: 0.5 + }, + showIndicators: true, showLabels: true, + pointers: [{ + showBackNeedle: true, + backNeedleLength: 20, + length: 120, + width: 7 + }, + { + type: "marker", + markerType: "diamond", + distanceFromScale: 5, + placement: "center", + backgroundColor: "#29A4D9", + length: 25, + width: 15 + }], + ticks: [{ + type: "major", + distanceFromScale: 2, + height: 16, + width: 1, color: "#8c8c8c" + }, + { + type: "minor", + height: 6, + width: 1, + distanceFromScale: 2, + color: "#8c8c8c" + }], + labels: [{ + color: "#8c8c8c" + }], + ranges: [{ + distanceFromScale: -5, + backgroundColor: "#fc0606", + border: { color: "#fc0606" } + }, + { + distanceFromScale: -5 + }], + customLabels: [{ + position: { x: 180, y: 290 }, + font: { size: "10px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" + }, + { + position: { x: 180, y: 320 }, + font: { size: "10px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" + }, + { + position: { x: 180, y: 150 }, + font: { size: "12px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" + }] + }] + }); + }); +} + + + +module PivotGridOlap { + + $(function () { + var sample = new ej.PivotGrid($("#PivotGrid"),{ + dataSource: { + data: "//bi.syncfusion.com/olap/msmdpump.dll", + catalog: "Adventure Works DW 2008 SE", + cube: "Adventure Works", + rows: [ + { + fieldName: "[Date].[Fiscal]" + } + ], + columns: [ + { + fieldName: "[Customer].[Customer Geography]" + } + ], + values: [ + { + measures: [ + { + fieldName: "[Measures].[Internet Sales Amount]", + } + ], + axis: "columns" + } + ], + filters:[] + }, + enableGroupingBar: true, + pivotTableFieldListID:"PivotSchemaDesigner" + }); + $("#PivotSchemaDesigner").ejPivotSchemaDesigner(); + }); +} + + + +var pivot_dataset = [ + { Amount: 100, Country: "Canada", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Alberta" }, + { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Van", Quantity: 3, State: "British Columbia" }, + { Amount: 300, Country: "Canada", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Brunswick" }, + { Amount: 150, Country: "Canada", Date: "FY 2008", Product: "Bike", Quantity: 3, State: "Manitoba" }, + { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Car", Quantity: 4, State: "Ontario" }, + { Amount: 100, Country: "Canada", Date: "FY 2007", Product: "Van", Quantity: 1, State: "Quebec" }, + { Amount: 200, Country: "France", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Charente-Maritime" }, + { Amount: 250, Country: "France", Date: "FY 2006", Product: "Van", Quantity: 4, State: "Essonne" }, + { Amount: 300, Country: "France", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Garonne (Haute)" }, + { Amount: 150, Country: "France", Date: "FY 2008", Product: "Van", Quantity: 2, State: "Gers" }, + { Amount: 200, Country: "Germany", Date: "FY 2006", Product: "Van", Quantity: 3, State: "Bayern" }, + { Amount: 250, Country: "Germany", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Brandenburg" }, + { Amount: 150, Country: "Germany", Date: "FY 2008", Product: "Car", Quantity: 4, State: "Hamburg" }, + { Amount: 200, Country: "Germany", Date: "FY 2008", Product: "Bike", Quantity: 4, State: "Hessen" }, + { Amount: 150, Country: "Germany", Date: "FY 2007", Product: "Van", Quantity: 3, State: "Nordrhein-Westfalen" }, + { Amount: 100, Country: "Germany", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Saarland" }, + { Amount: 150, Country: "United Kingdom", Date: "FY 2008", Product: "Bike", Quantity: 5, State: "England" }, + { Amount: 250, Country: "United States", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Alabama" }, + { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Van", Quantity: 4, State: "California" }, + { Amount: 100, Country: "United States", Date: "FY 2006", Product: "Bike", Quantity: 2, State: "Colorado" }, + { Amount: 150, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "New Mexico" }, + { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Bike", Quantity: 4, State: "New York" }, + { Amount: 250, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "North Carolina" }, + { Amount: 300, Country: "United States", Date: "FY 2007", Product: "Van", Quantity: 4, State: "South Carolina" } +] + +module PivotGridRelational { + $(function () { + var sample = new ej.PivotGrid($("#PivotGrid"),{ + dataSource: { + data: pivot_dataset, + rows: [ + { + fieldName: "Country", + fieldCaption: "Country" + }, + { + fieldName: "State", + fieldCaption: "State" + } + ], + columns: + [{ + fieldName: "Product", + fieldCaption: "Product" + } + ], + values: [ + { + fieldName: "Amount", + fieldCaption: "Amount" + }, + { + fieldName: "Quantity", + fieldCaption: "Quantity" + } + ], + filters:[] + }, + enableGroupingBar: true, + pivotTableFieldListID:"PivotSchemaDesigner" + }); + $("#PivotSchemaDesigner").ejPivotSchemaDesigner(); + }); +} + + + +module PivotTreeMap { + $(function () { + var sample = new ej.PivotTreeMap($("#PivotTreeMap"),{ + dataSource: { + data: "//bi.syncfusion.com/olap/msmdpump.dll;Locale Identifier=1033;", + catalog: "Adventure Works DW 2008 SE", + cube: "Adventure Works", + rows: [ + { + fieldName: "[Customer].[Customer Geography]" + } + ], + columns: [ + { + fieldName: "[Date].[Fiscal]" + } + ], + values: [ + { + measures: [ + { + fieldName: "[Measures].[Customer Count]", + } + ], + axis: "columns" + } + ], + filters:[] + } + }); + }); +} + + + +module ProgressBarComponent { + $(function () { + var sample = new ej.ProgressBar($("#progressBar"),{ + width: 200, + value: 45, + height: 20, + enablePersistence: true, + maxValue: 200, + minValue: 0, + showRoundedCorner: true, + text: 'loading...' + }); + }); + +} + + + + +declare var rteObj: any; +declare var data: any; +var radialEle = $('#defaultradialmenu'), action = 0, forRedo = 0; +var rteEle = $("#rteSample1"); +module RadialMenuComponent { + $(function () { + + if (!(ej.browserInfo().name == "msie" && parseInt(ej.browserInfo().version) < 9)) { + var radialmenuInstance = new ej.RadialMenu($("#defaultradialmenu"), { + imageClass: "imageclass", + backImageClass: "backimageclass", + targetElementId: "radialtarget1" + }); + $("#radialtarget1").parent().css("position", "relative"); + } + else { + $("#contentDiv").html("Radial Menu is only supported from Internet Explorer Versioned 9 and above.").css({ "font-size": "20px", "color": "red" }); + } + var rteInstance = new ej.RTE($("#rteSample1"), { + width: "100%", + minWidth: "10px", + change: (e) => { radialEle.ejRadialMenu("enableItem", "Undo"); }, + select: (e) => { + var target = $("#radialtarget1"), radialRadius = 150, radialDiameter = 2 * radialRadius, + // To get Iframe positions + iframeY = e.event.clientY, iframeX = e.event.clientX, + // To set Radial Menu position within target + x = iframeX > target.width() - radialRadius ? target.width() - radialDiameter : (iframeX > radialRadius ? iframeX - radialRadius : 0), + y = iframeY > target.height() - radialRadius ? target.height() - radialDiameter : (iframeY > radialRadius ? iframeY - radialRadius : 0); + radialEle.ejRadialMenu("setPosition", x, y); + radialEle.focus(); + $('iframe').contents().find('body').blur(); + }, + showToolbar: false, + showContextMenu: false + }); + $(window).resize(function () { + if (ej.isMobile() && ej.isPortrait()) + $('#defaultradialmenu').css({ "left": 25 }); + }); + }); +} + +function bold(e: any) { + + rteObj = rteEle.data("ejRTE"); + rteObj.executeCommand("bold"); + data = rteObj._getSelectedHtmlString() ? true : false; + if (data) action += 1; + forRedo = action; + radialEle.focus(); +} +function italic(e: any) { + rteObj = rteEle.data("ejRTE"); + rteObj.executeCommand("italic"); + data = rteObj._getSelectedHtmlString() ? true : false; + if (data) action += 1; + forRedo = action; + radialEle.focus(); +} +function undo(e: any) { + rteObj = rteEle.data("ejRTE"); + rteObj.executeCommand("undo"); + action -= 1; + if (action == 0) + radialEle.ejRadialMenu("disableItem", "Undo"); + radialEle.ejRadialMenu("enableItem", "Redo"); + radialEle.focus(); +} +function redo(e: any) { + rteObj = rteEle.data("ejRTE"); + rteObj.executeCommand("redo"); + action += 1; + if (forRedo == action) radialEle.ejRadialMenu("disableItem", "Redo"); + radialEle.ejRadialMenu("enableItem", "Undo"); + radialEle.focus(); +} + + + +module RadialSliderComponent { + $(function () { + var radialsliderInstance = new ej.RadialSlider($("#radialSlider"), { + innerCircleImageUrl: "images/radialslider/chevron-right.png" + }); + }); +} + + +module rangecomponent { + $(function () { + var linearsample = new ej.datavisualization.RangeNavigator($("#RangeNavigator"), { + enableDeferredUpdate: true, + padding: "15", + allowSnapping: true, + selectedRangeSettings: { + start: "2010/5/1", end: "2011/10/1" + }, + isResponsive: true, + tooltipSettings: { + visible: true, labelFormat: "MM/dd/yyyy", backgroundColor: "gray", tooltipDisplayMode: "ondemand" + }, + load: () => { + var rn = $("#RangeNavigator").data("ejRangeNavigator"); + rn.model.series = [ + { + type: 'line', + dataSource: data.Open, xName: "XValue", yName: "YValue", + fill: '#69D2E7' + } + ]; + }, + loaded: function () { + var sender = $("#RangeNavigator").data("ejRangeNavigator"); + var theme = (window).themeStyle + (window).themeColor + (window).themeVarient; + if (theme) { + switch (theme) { + case "flatazurelight": + theme = "azurelight"; + break; + case "flatlimelight": + theme = "limelight"; + break; + case "flatsaffronlight": + theme = "saffronlight"; + break; + case "gradientazurelight": + theme = "gradientazure"; + break; + case "gradientlimelight": + theme = "gradientlime"; + break; + case "gradientsaffronlight": + theme = "gradientsaffron"; + break; + case "flatazuredark": + theme = "azuredark"; + break; + case "flatlimedark": + theme = "limedark"; + break; + case "flatsaffrondark": + theme = "saffrondark"; + break; + case "gradientazuredark": + theme = "gradientazuredark"; + break; + case "gradientlimedark": + theme = "gradientlimedark"; + break; + case "gradientsaffrondark": + theme = "gradientsaffrondark"; + break; + case "flathigh-contrast-01dark": + theme = "highcontrast01"; + break; + case "flathigh-contrast-02dark": + theme = "highcontrast02"; + break; + case "flatmateriallight": + theme = "material"; + break; + case "flatoffice-365light": + theme = "office"; + break; + default: + theme = "flatlight"; + break; + } + sender.model.theme = theme; + } + } + + }); + }); +} +var data; +data = GetData(); + +function GetData() { + var series1:any[]=[]; + var series2:any[]= []; + var value = 100; + var value1 = 120; + for (var i = 1; i < 730; i++) { + + if (Math.random() > .5) { + value += Math.random(); + value1 += Math.random(); + } else { + value -= Math.random(); + value1 -= Math.random(); + } + var point1 = { XValue: new Date(2010, 0, i), YValue: value }; + var point2 = { XValue: new Date(2010, 0, i), YValue: value1 }; + series1.push(point1); + series2.push(point2); + } + + data = { Open: series1, Close: series2 }; + return data; +}; + + + +module RatingComponent { + $(function () { + + var sample1 = new ej.Rating($("#fullRating"),{ + value: 4, + precision: ej.Rating.Precision.Full, + allowReset: true, + cssClass: "gradient-lime", + enabled: true, + enablePersistence: true, + incrementStep: 2, + maxValue: 10, + minValue: 0, + orientation: ej.Orientation.Horizontal, + shapeHeight: 25, + shapeWidth: 25, + showTooltip: true + }); + + var sample2 = new ej.Rating($("#halfRating"),{ + precision: ej.Rating.Precision.Half, + value: 3.5, + allowReset: true, + cssClass: "gradient-lime", + enabled: true, + enablePersistence: true, + incrementStep: 2, + maxValue: 10, + minValue: 0, + orientation: "horizontal", + shapeHeight: 25, + shapeWidth: 25, + showTooltip: true + }); + + var sample3 = new ej.Rating($("#exactRating"),{ + precision: ej.Rating.Precision.Exact, + value: 3.7, + allowReset: true, + cssClass: "gradient-lime", + enabled: true, + enablePersistence: true, + incrementStep: 2, + maxValue: 10, + minValue: 0, + orientation: "horizontal", + shapeHeight: 25, + shapeWidth: 25, + showTooltip: true + }); + }); +} + + + +module ReportViewerComponent { + $(function () { + var report = new ej.ReportViewer($("#DefaultReportViewer"), { + reportServiceUrl: (window).baseurl + 'api/ReportViewer', + processingMode: ej.ReportViewer.ProcessingMode.Remote, + reportPath: "ConditionalFormating.rdl", + isResponsive: true + }); + }); +} + + + +var fontfamily = ["Segoe UI", "Arial", "Times New Roman", "Tahoma", "Helvetica"], fontsize = ["1pt", "2pt", "3pt", "4pt", "5pt"], action1 = ["New", "Clear"], action2 = ["Bold", "Italic", "Underline", "strikethrough", "superscript", "subscript", "JustifyLeft", "JustifyCenter", "JustifyRight", "JustifyFull", "Undo", "Redo"]; +module RibbonComponent { + $(function () { + var sample = new ej.Ribbon($("#defaultRibbon"), { + width: "100%", + expandPinSettings: { + toolTip: "Collapse the Ribbon" + }, + collapsePinSettings: { + toolTip: "Pin the Ribbon" + }, + applicationTab: { + type: ej.Ribbon.ApplicationTabType.Menu, menuItemID: "ribbonmenu", menuSettings: { openOnClick: false } + }, + tabs: [{ + id: "home", text: "HOME", groups: [{ + text: "New", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "new", + text: "New", + toolTip: "New", + buttonSettings: { + contentType: ej.ContentType.ImageOnly, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-new", + click: "onClick" + } + } + ], + defaults: { + type: "button", + width: 60, + height: 70 + } + }] + }, + { + text: "Clipboard", alignType: ej.Ribbon.AlignType.Columns, content: [{ + groups: [{ + id: "paste", + text: "paste", + toolTip: "Paste", + splitButtonSettings: { + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-ribbonpaste", + targetID: "pasteSplit", + buttonMode: "dropdown", + click: "onClick", + arrowPosition: ej.ArrowPosition.Bottom + } + } + ], + defaults: { + type: "splitbutton", + width: 50, + height: 70 + } + }, + { + groups: [{ + id: "cut", + text: "Cut", + toolTip: "Cut", + buttonSettings: { + contentType: ej.ContentType.TextAndImage, + click: "onClick", + prefixIcon: "e-icon e-ribbon e-ribboncut" + } + }, + { + id: "copy", + text: "Copy", + toolTip: "Copy", + buttonSettings: { + contentType: ej.ContentType.TextAndImage, + click: "onClick", + prefixIcon: "e-icon e-ribbon e-ribboncopy" + } + }, + { + id: "clear", + text: "Clear", + toolTip: "Clear All", + buttonSettings: { + contentType: ej.ContentType.TextAndImage, + click: "onClick", + prefixIcon: "e-icon e-ribbon clearAll" + } + }], + defaults: { + type: "button", + width: 60, + isBig: false + } + }] + }, + { + text: "Font", alignType: "rows", content: [{ + groups: [{ + id: "fontfamily", + toolTip: "Font", + dropdownSettings: { + dataSource: fontfamily, + text: "Segoe UI", + select: "onClick", + width: 150 + } + }, + { + id: "fontsize", + toolTip: "FontSize", + dropdownSettings: { + dataSource: fontsize, + text: "1pt", + select: "onClick", + width: 65 + } + }], + defaults: { + type: "dropdownlist", + height: 28 + } + }, + { + groups: [{ + id: "bold", + toolTip: "Bold", + type: ej.Ribbon.Type.ToggleButton, + toggleButtonSettings: { + contentType: ej.ContentType.ImageOnly, + defaultText: "Bold", + activeText: "Bold", + click: "onClick", + defaultPrefixIcon: "e-icon e-ribbon bold", + activePrefixIcon: "e-icon e-ribbon bold" + } + }, + { + id: "italic", + toolTip: "Italic", + type: ej.Ribbon.Type.ToggleButton, + toggleButtonSettings: { + contentType: ej.ContentType.ImageOnly, + defaultText: "Italic", + activeText: "Italic", + click: "onClick", + defaultPrefixIcon: "e-icon e-ribbon e-ribbonitalic", + activePrefixIcon: "e-icon e-ribbon e-ribbonitalic" + } + }, + { + id: "underline", + text: "Underline", + toolTip: "Underline", + type: ej.Ribbon.Type.ToggleButton, + toggleButtonSettings: { + contentType: ej.ContentType.ImageOnly, + defaultText: "Underline", + activeText: "Underline", + click: "onClick", + defaultPrefixIcon: "e-icon e-ribbon e-ribbonunderline", + activePrefixIcon: "e-icon e-ribbon e-ribbonunderline" + } + }, + { + id: "strikethrough", + text: "strikethrough", + toolTip: "Strikethrough", + type: ej.Ribbon.Type.ToggleButton, + toggleButtonSettings: { + contentType: ej.ContentType.ImageOnly, + defaultText: "Strikethrough", + activeText: "Strikethrough", + click: "onClick", + defaultPrefixIcon: "e-icon e-ribbon strikethrough", + activePrefixIcon: "e-icon e-ribbon strikethrough" + } + }, + { + id: "superscript", + text: "superscript", + toolTip: "Superscript", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-superscripticon" + } + }, + { + id: "subscript", + text: "subscript", + toolTip: "Subscript", + enableSeparator: true, + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-subscripticon" + } + }, + { + id: "fontcolor", + text: "Font Color", + toolTip: "Font Color", + type: ej.Ribbon.Type.Custom, + contentID: "fontcolor" + }, + { + id: "fillcolor", + text: "Fill Color", + toolTip: "Fill Color", + type: ej.Ribbon.Type.Custom, + contentID: "fillcolor" + } + ], + defaults: { + isBig: false + } + }] + }, + { + text: "Alignment", alignType: ej.Ribbon.AlignType.Rows, content: [ + { + groups: [{ + id: "bullet", + text: "Bullet Format", + toolTip: "Bullets", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-bullet" + } + }, + { + id: "number", + text: "Number Format", + toolTip: "Numbering", + enableSeparator: true, + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-numbericon" + } + }, + { + id: "textindent", + text: "Indent", + toolTip: "Text Indent", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-indent" + } + }, + { + id: "textoudent", + text: "Outdent", + toolTip: "Text Outdent", + enableSeparator: true, + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-outdent" + } + }, + { + id: "sortascending", + text: "Sort", + toolTip: "Sort", + enableSeparator: true, + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-sort" + } + }, + { + id: "border", + text: "Border", + toolTip: "Border", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-border" + } + }], + defaults: { + type: "button", + isBig: false + } + }, + { + groups: [{ + id: "alignleft", + text: "JustifyLeft", + toolTip: "Align Left", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon alignleft" + } + }, + { + id: "aligncenter", + text: "JustifyCenter", + toolTip: "Align Center", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon aligncenter" + } + }, + { + id: "alignright", + text: "JustifyRight", + toolTip: "Align Right", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon alignright" + } + }, + { + id: "justify", + text: "JustifyFull", + toolTip: "Justify", + enableSeparator: true, + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon justify" + } + }, + { + id: "uppercase", + text: "Upper Case", + toolTip: "Upper Case", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-uppercase" + } + }, + { + id: "lowercase", + text: "Lower Case", + toolTip: "Lower Case", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-lowercase" + } + }], + defaults: { + type: "button", + isBig: false + } + }] + }, + { + text: "Actions", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "undo", + text: "Undo", + toolTip: "Undo", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-undo" + } + }, + { + id: "redo", + text: "Redo", + toolTip: "Redo", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-redo" + } + } + ], + defaults: { + type: "button", + width: 40, + height: 70 + } + }] + }, + { + text: "View", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "zoomin", + text: "Zoom In", + toolTip: "Zoom In", + buttonSettings: { + width: 58, + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-zoomin" + } + }, + { + id: "zoomout", + text: "Zoom Out", + toolTip: "Zoom Out", + buttonSettings: { + width: 70, + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-zoomout" + } + }, + { + id: "fullscreen", + text: "Full Screen", + toolTip: "Full Screen", + buttonSettings: { + width: 73, + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-fullscreen" + } + } + ], + defaults: { + type: "button", + height: 70 + } + }] + }] + },{ + id: "insert", text: "INSERT", groups: [{ + text: "Tables", alignType: ej.Ribbon.AlignType.Columns, content: [{ + groups: [{ + id: "tables", + text: "Tables", + toolTip: "Tables", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-table" + } + } + ], + defaults: { + type: "button", + width: 50, + height: 70 + } + }] + }, + { + text: "Illustrations", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "pictures", + text: "Pictures", + toolTip: "Pictures", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-picture" + } + }, + { + id: "videos", + text: "Videos", + toolTip: "Videos", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-video" + } + }, + { + id: "shapes", + text: "Shapes", + toolTip: "Shapes", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-shape" + } + }, + { + id: "charts", + text: "Charts", + toolTip: "Charts", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-chart" + } + } + ], + defaults: { + type: "button", + width: 56, + height: 70 + } + }] + }, + { + text: "Comments", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "comments", + text: "Comments", + toolTip: "Comments", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-comment" + } + } + ], + defaults: { + type: "button", + width: 70, + height: 70 + } + }] + }, + { + text: "Text", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "text", + text: "Text", + toolTip: "Text", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-text", + width: 50 + } + }, + { + id: "datetime", + text: "Date Time", + toolTip: "DateTime", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-datetimenew" + } + } + ], + defaults: { + type: "button", + width: 70, + height: 70 + } + }] + }, + { + text: "Hyperlink", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "hyperlink", + text: "Hyperlink", + toolTip: "Hyperlink", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-hyperlink" + } + } + ], + defaults: { + type: "button", + width: 70, + height: 70 + } + }] + }, + { + text: "Equation", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "equation", + text: "Equation", + toolTip: "Equation", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-equation" + } + } + ], + defaults: { + type: "button", + width: 60, + height: 70 + } + }] + }, + { + text: "Print Layout", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "printlayout", + text: "Print Layout", + toolTip: "Print Layout", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-printlayout" + } + } + ], + defaults: { + type: "button", + width: 80, + height: 70 + } + }] + }, + { + text: "Save", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "print", + text: "Print", + toolTip: "Print", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-print" + } + }, + { + id: "save", + text: "Save", + toolTip: "Save", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-save" + } + } + ], + defaults: { + type: "button", + width: 50, + height: 70 + } + }] + } + ] + } + ], + create: function createControl(args) { + var ribbon = $("#defaultRibbon").data("ejRibbon"); + $("#fontcolor").ejColorPicker({ value: "#FFFF00", modelType: "palette", cssClass: "e-ribbon", toolIcon: "e-fontcoloricon", select: colorHandler }); + $("#fillcolor").ejColorPicker({ value: "#FF0000", modelType: "palette", cssClass: "e-ribbon", toolIcon: "e-fillcoloricon", select: colorHandler }); + } + }); + }); +} +function colorHandler(args:any) { + (this._id.indexOf("fillcolor") != -1) ? $("#contenteditor").css('background-color', args.value) : document.execCommand('forecolor', false, args.value); +} +function onClick(args:any) { + let val:any, prop = args.text; + val = (ej.isNullOrUndefined(args.model.text)) ? args.model.activeText : args.model.text; + if (action1.indexOf(val) != -1) + $("#contenteditor").empty(); + else if (action2.indexOf(val) != -1) + document.execCommand(val, false, null); + else if (fontfamily.indexOf(prop) != -1) + document.execCommand("FontName", false, prop); + else if (fontsize.indexOf(prop) != -1) + document.execCommand("FontSize", false, prop.replace("pt", "")); + else + $("#contenteditor").append("

    Action: " + val + " Triggered

    "); +} + + + +module RotatorComponent { + $(function () { + var rotatorInstance = new ej.Rotator($("#sliderContent"), { + slideWidth: "100%", + frameSpace: "0px", + slideHeight: "auto", + displayItemsCount: "1", + navigateSteps: "1", + pagerPosition:"outside", + orientation: "horizontal", + showPager: true, + enabled: true, + showCaption: true, + allowKeyboardNavigation: true, + showPlayButton: true, + isResponsive:true, + animationType: "slide", + }); + }); +} + + + +module RTEComponent { + $(function () { + var sample = new ej.RTE($("#rteSample"),{ + width: "100%", + minWidth: "150px", + showFooter: true, + showHtmlSource: true, + allowEditing: true, + allowKeyboardNavigation: true, + autoFocus: true, + autoHeight: true, + colorPaletteColumns: 10, + colorPaletteRows: 5, + cssClass: 'gradient-lime', + enableResize: true, + enableTabKeyNavigation: true, + fileBrowser: { + filePath: (window).baseurl + "Content/FileBrowser/", + extensionAllow: "*.png, *.doc, *.pdf, *.txt, *.docx", + ajaxAction: (window).baseurl + "api/FileExplorer/FileOperations" + }, + imageBrowser: { + filePath: (window).baseurl + "Content/FileBrowser/", + extensionAllow: "*.png, *.gif, *.jpg, *.jpeg, *.docx", + ajaxAction: (window).baseurl + "api/FileExplorer/FileOperations" + }, + isResponsive: true, + showClearAll: true, + showClearFormat: true, + showDimensions: true, + showCharCount: true, + tools: { + formatStyle: ["format"], + edit: ["findAndReplace"], + font: ["fontName", "fontSize", "fontColor", "backgroundColor"], + style: ["bold", "italic", "underline", "strikethrough"], + alignment: ["justifyLeft", "justifyCenter", "justifyRight", "justifyFull"], + lists: ["unorderedList", "orderedList"], + clipboard: ["cut", "copy", "paste"], + doAction: ["undo", "redo"], + indenting: ["outdent", "indent"], + clear: ["clearFormat", "clearAll"], + links: ["createLink", "removeLink"], + images: ["image"], + media: ["video"], + tables: ["createTable", "addRowAbove", "addRowBelow", "addColumnLeft", "addColumnRight", "deleteRow", "deleteColumn", "deleteTable"], + effects: ["superscript", "subscript"], + casing: ["upperCase", "lowerCase"], + view: ["fullScreen", "zoomIn", "zoomOut"], + print: ["print"], + customUnorderedList: [{ + name: "unOrderInsert", + tooltip: "Custom UnOrderList", + css: "e-rte-toolbar-icon e-rte-unlistitems customUnOrder", + text: "Smiley", + listImage: "url('../content/images/rte/Smiley-GIF.gif')" + }], + customOrderedList: [{ + name: "orderInsert", + tooltip: "Custom OrderList", + css: "e-rte-toolbar-icon e-rte-listitems customOrder", + text: "Lower-Greek", + listStyle: "lower-greek" + }] + } + }); + }); + +} + + + +module ScheduleComponent { + $(function () { + var sample = new ej.Schedule($("#Schedule1"), { + width: "100%", + height: "525px", + currentDate: new Date(2017, 5, 5), + timeScale: { + minorSlotCount: 4, + majorSlot: 60 + }, + contextMenuSettings: { + enable: true, + menuItems: { + appointment: [ + { id: "open", text: "Open Appointment" }, + { id: "delete", text: "Delete Appointment" }, + { id: "customMenu3", text: "Menu Item 3" }, + { id: "customMenu4", text: "Menu Item 4" } + ], + cells: [ + { id: "new", text: "New Appointment" }, + { id: "recurrence", text: "New Recurring Appointment" }, + { id: "today", text: "Today" }, + { id: "gotodate", text: "Go to date" }, + { id: "settings", text: "Settings" }, + { id: "view", text: "View", parentId: "settings" }, + { id: "timemode", text: "TimeMode", parentId: "settings" }, + { id: "view_Day", text: "Day", parentId: "view" }, + { id: "view_Week", text: "Week", parentId: "view" }, + { id: "view_Workweek", text: "Workweek", parentId: "view" }, + { id: "view_Month", text: "Month", parentId: "view" }, + { id: "timemode_Hour12", text: "12 Hours", parentId: "timemode" }, + { id: "timemode_Hour24", text: "24 Hours", parentId: "timemode" }, + { id: "workhours", text: "Work Hours", parentId: "settings" }, + { id: "customMenu1", text: "Menu Item 1" }, + { id: "customMenu2", text: "Menu Item 2" } + ] + } + }, + resources: [{ + field: "ownerId", + title: "Owner", + name: "Owners", allowMultiple: true, + resourceSettings: { + dataSource: [ + { text: "Nancy", id: 1, groupId: 1, color: "#f8a398" }, + { text: "Steven", id: 3, groupId: 2, color: "#56ca85" }, + { text: "Michael", id: 5, groupId: 1, color: "#51a0ed" } + ], + text: "text", id: "id", groupId: "groupId", color: "color" + } + }], + appointmentSettings: { + dataSource: new ej.DataManager((window).ResourcesData).executeLocal(new ej.Query().take(10)), + id: "Id", + subject: "Subject", + startTime: "StartTime", + endTime: "EndTime", + description: "Description", + allDay: "AllDay", + recurrence: "Recurrence", + recurrenceRule: "RecurrenceRule", + resourceFields: "ownerId" + } + }); + }); +} + + + +module ScrollerComponent { + $(function () { + var scrollerSample = new ej.Scroller($("#scrollcontent"), { + height: "300px", + width: "100%" + }); + $(window).bind('resize', function () { + scrollerSample.refresh(); + }); + + }); +} + + + +module SignatureComponent { + $(function () { + var basicSignature = new ej.Signature($("#signature"), { + height: "400px", + isResponsive: true, + strokeWidth: 3 + }); + }); +} + + + + +module SliderComponent { + $(function () { + var slider = new ej.Slider($("#minSlider"), { + sliderType: "MinRange", + value: 60, + minValue: 0, + maxValue: 100 + }); + var rangeslider = new ej.Slider($("#rangeSlider"), { + sliderType: "Range", + values: [30, 60], + minValue: 0 + }); + + }); +} + + + + + + +module linesparkline { + $(function () { + + var sparklinesample = new ej.Sparkline($("#line"), { + dataSource: [12, 14, 11, 12, 11, 15, 12, 10, 11, 12, 15, 13, 12, 11, 10, 13, 15, 12, 14, 16, 14, 12, 11], + tooltip: { + visible: true, + font: { size:"12px" } + }, + type: "line", + size: { height: "40", width:"170" }, + }); + }); +} + +module columnsparkline { + $(function () { + var sparkcolumnsample = new ej.Sparkline($("#column"), { + dataSource: [2, 6, -1, 1, 12, 5, -2, 7, -3, 5, 8, 10,], + negativePointColor: "red", + highPointColor: "blue", + tooltip: { + visible: true, + font: { + size: "12px", + } + }, + type: "column", + size: { height: "100", width: "150" }, + }); + }); +} + +module areasparkline { + $(function () { + var sparkareasample = new ej.Sparkline($("#area"), { + dataSource: [12, -10, 11, 8, 17, 6, 2, -17, 13, -6, 8, 10,], + markerSettings: { visible: true }, + highPointColor: "blue", + lowPointColor: "orange", + type: "area", + opacity: 0.5, + tooltip: { + visible: true, + font: { + size: "12px", + } + }, + size: { height: "100", width: "150" }, + }); + }); +} + +module windlosssparkline { + $(function () { + var sparkwinlosssample = new ej.Sparkline($("#winloss"), { + dataSource: [12, 15, -11, 13, 17, 0, -12, 17, 13, -15, 8, 10,], + type: "winloss", + size: { height: "100", width: "150" }, + }); + }); +} + +module piesparkline1 { + $(function () { + var sparkpiesample1 = new ej.Sparkline($("#pie1"), { + dataSource: [4, 6, 7], + type: "pie", + tooltip: { + visible: true, + font: { + size: "12px", + } + }, + size: { height: "40", width: "40" }, + }); + }); +} + +module piesparkline2 { + $(function () { + var sparkpiesample2 = new ej.Sparkline($("#pie2"), { + dataSource: [8, 9, 1,], + type: "pie", + tooltip: { + visible: true, + font: { + size: "12px", + } + }, + size: { height: "40", width: "40" }, + }); + }); +} + +module piesparkline3 { + $(function () { + var sparkpiesample3 = new ej.Sparkline($("#pie3"), { + dataSource: [2, 3, 5], + type: "pie", + tooltip: { + visible: true, + font: { + size: "12px", + } + }, + size: { height: "40", width: "40" }, + }); + }); +} + +module piesparkline4 { + $(function () { + var sparkpiesample4 = new ej.Sparkline($("#pie4"), { + dataSource: [10, 12, 11], + type: "pie", + tooltip: { + visible: true, + font: { + size: "12px", + } + }, + size: { height: "40", width: "40" }, + }); + }); +} + + + + +module SplitterComponent { + $(function () { + var splitterInstance = new ej.Splitter($("#outterSpliter"), { + height: "250px", + width: "50%", + orientation: ej.Orientation.Vertical, + properties: [{}, { paneSize: 80 }], + isResponsive:true + }); + var splitterInstance1 = new ej.Splitter($("#innerSpliter"), { + isResponsive:true, + }); + }); +} + + + +module SpreadsheetComponent { +$(function () { + var sample = new ej.Spreadsheet($("#basicSpreadsheet"), { + scrollSettings: { + height: 550, + }, + importSettings: { + importMapper: (window).baseurl + "api/Spreadsheet/Import" + }, + exportSettings: { + excelUrl: (window).baseurl + "api/Spreadsheet/ExcelExport", + csvUrl: (window).baseurl + "api/Spreadsheet/CsvExport", + pdfUrl: (window).baseurl + "api/Spreadsheet/PdfExport" + }, + sheets: [{ rangeSettings: [{ dataSource: (window).defaultData, startCell: "A1" }] }], + loadComplete: () => { + var spreadsheet = $("#basicSpreadsheet").data("ejSpreadsheet"), xlFormat = spreadsheet.XLFormat; + if (!(spreadsheet).isImport) { + spreadsheet.setWidthToColumns([140, 128, 105, 100, 100, 110, 120, 120, 100]); + xlFormat.format({ "style": { "font-weight": "bold" } }, "A1:H1"); + xlFormat.format({ "type": "currency" }, "E2:H11"); + spreadsheet.XLRibbon.updateRibbonIcons(); + }} + }); + }); +} + + + +var default_data: Array = [ + { Category : "Employees", Country : "USA", JobDescription : "Sales", JobGroup:"Executive", EmployeesCount : 50 }, + { Category : "Employees", Country : "USA", JobDescription : "Sales", JobGroup : "Analyst", EmployeesCount : 40 }, + { Category : "Employees", Country : "USA", JobDescription : "Marketing", EmployeesCount : 40 }, + { Category : "Employees", Country : "USA", JobDescription : "Technical", JobGroup : "Testers", EmployeesCount : 55 }, + { Category : "Employees", Country : "USA", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Windows", EmployeesCount : 175}, + { Category : "Employees", Country : "USA", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Web", EmployeesCount : 70 }, + { Category : "Employees", Country : "USA", JobDescription : "Management", EmployeesCount : 40 }, + { Category : "Employees", Country : "USA", JobDescription : "Accounts", EmployeesCount : 60 }, + + { Category : "Employees", Country : "India", JobDescription : "Technical", JobGroup : "Testers", EmployeesCount : 43 }, + { Category : "Employees", Country : "India", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Windows", EmployeesCount : 125}, + { Category : "Employees", Country : "India", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Web", EmployeesCount : 60 }, + { Category : "Employees", Country : "India", JobDescription : "HR Executives", EmployeesCount : 70 }, + { Category : "Employees", Country : "India", JobDescription : "Accounts", EmployeesCount : 45 }, + + { Category : "Employees", Country : "Germany", JobDescription : "Sales", JobGroup : "Executive", EmployeesCount : 30 }, + { Category : "Employees", Country : "Germany", JobDescription : "Sales", JobGroup : "Analyst", EmployeesCount : 40 }, + { Category : "Employees", Country : "Germany", JobDescription : "Marketing", EmployeesCount : 50 }, + { Category : "Employees", Country : "Germany", JobDescription : "Technical", JobGroup : "Testers", EmployeesCount : 40 }, + { Category : "Employees", Country : "Germany", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Windows", EmployeesCount : 65 }, + { Category : "Employees", Country : "Germany", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Web", EmployeesCount : 27 }, + { Category : "Employees", Country : "Germany", JobDescription : "Management", EmployeesCount : 33 }, + { Category : "Employees", Country : "Germany", JobDescription : "Accounts", EmployeesCount : 55 }, + + { Category : "Employees", Country : "UK", JobDescription : "Technical", JobGroup : "Testers", EmployeesCount : 45 }, + { Category : "Employees", Country : "UK", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Windows", EmployeesCount : 96 }, + { Category : "Employees", Country : "UK", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Web", EmployeesCount : 55 }, + { Category : "Employees", Country : "UK", JobDescription : "HR Executives", EmployeesCount : 60 }, + { Category : "Employees", Country : "UK", JobDescription: "Accounts", EmployeesCount: 30 }, + + { Category : "Employees", Country : "France", JobDescription : "Technical", JobGroup : "Testers", EmployeesCount : 40 }, + { Category : "Employees", Country : "France", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Windows", EmployeesCount : 65 }, + { Category : "Employees", Country : "France", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Web", EmployeesCount : 27 }, + { Category : "Employees", Country : "France", JobDescription: "Marketing", EmployeesCount: 50 } +]; + +module sunburstcomponent { + $(function () { + var sunburstsample = new ej.SunburstChart($("#Sunburst"), { + valueMemberPath: "EmployeesCount", + levels: [ + {groupMemberPath: "Country"}, + {groupMemberPath: "JobDescription"}, + {groupMemberPath: "JobGroup"}, + {groupMemberPath: "JobRole"} + ], + dataSource: default_data, + dataLabelSettings:{visible:true}, + tooltip:{visible:false}, + enableAnimation:false, + size:{height:"600"}, + innerRadius:0.2, + load: function () { + var sender = $("#Sunburst").data("ejSunburstChart"); + var SunBurstTheme = (window).themeStyle + (window).themeColor + (window).themeVarient; + SunBurstTheme = SunBurstTheme.toString(); + if (SunBurstTheme.indexOf("dark") > -1 || SunBurstTheme.indexOf("contrast") > -1) + SunBurstTheme = "flatdark"; + else + SunBurstTheme = "flatlight"; + sender.model.theme = SunBurstTheme; + }, + title:{text:"Employees Count"}, + zoomSettings:{enable:false}, + legend:{visible:true,position:'top'}, + }); + }); +} + + + +module TabComponent { + $(function () { + var sample = new ej.Tab($("#defaultTab"),{ + width: "500px", + collapsible: true, + events: "click", + heightAdjustMode: ej.Tab.HeightAdjustMode.Content, + showCloseButton: true, + showRoundedCorner: false + }); + }); +} + + + +module TagCloudComponent { + + var websiteCollection = [ + { text: "Google", url: "http://www.google.com", frequency: 12 }, + { text: "All Things Digital", url: "http://allthingsd.com/", frequency: 3 }, + { text: "Arts Technica", url: "http://arstechnica.com/", frequency: 8 }, + { text: "Business Week", url: "http://www.businessweek.com/", frequency: 2 }, + { text: "Yahoo", url: "http://in.yahoo.com/", frequency: 12 }, + { text: "Center Networks", url: "http://www.centernetworks.com/", frequency: 5 }, + { text: "Crave", url: "http://news.cnet.com/crave/", frequency: 8 }, + { text: "Crunch Gear", url: "http://techcrunch.com/gadgets/", frequency: 20 }, + { text: "Daily Tech", url: "http://www.dailytech.com/", frequency: 1 }, + { text: "Electronista", url: "http://www.electronista.com/", frequency: 3 }, + { text: "Engadget", url: "http://www.engadget.com/", frequency: 5 }, + { text: "Gearlog", url: "http://www.gearlog.com/", frequency: 9 }, + { text: "Information Week", url: "http://www.informationweek.com/", frequency: 0 }, + { text: "PCWorld", url: "http://www.pcworld.com/", frequency: 11 }, + { text: "Tech Republic", url: "http://techrepublic.com/", frequency: 3 }, + { text: "Valleywag", url: "http://valleywag.gawker.com/", frequency: 6 }, + { text: "Rediff", url: "http://in.rediff.com/", frequency: 9 }, + { text: "WebProNews", url: "http://www.webpronews.com/", frequency: 2 } + ]; + + $(function () { + var sample = new ej.TagCloud($("#techWebList"), { + titleText: "Tech Sites", + dataSource: websiteCollection, + cssClass: "gradient-lime", + fields: { + text: "text", url: "url", frequency: "frequency" + } + }); + }); +} + + +module EditorComponent { + $(function () { + var num = new ej.NumericTextbox($("#numeric"), { + value: 30, + minValue: 1, + maxValue: 100, + name: "numeric", + width: "100%" + }); + var per = new ej.PercentageTextbox($("#percent"), { + value: 60, + minValue: 10, + maxValue: 1000, + name: "percent", + width: "100%" + }); + var cur = new ej.CurrencyTextbox($("#currency"), { + value: 100, + minValue: 10, + maxValue: 1000, + name: "currency", + width: "100%" + }); + var mask = new ej.MaskEdit($("#maskedit"), { + name: "mask", + value: "4242422424", + maskFormat: "99 999-99999", + width: "100%" + }) + }); +} + + + +module TileViewComponent { + $(function () { + var tile1 = new ej.Tile($("#tile1"), { + imagePosition:"fill", + caption:{text:"People"}, + tileSize:"medium", + imageUrl:'content/images/tile/windows/people_1.png' + }); + var tile2 = new ej.Tile($("#tile2"), { + imagePosition:"center", + tileSize:"small", + imageUrl:'content/images/tile/windows/alerts.png', + }); + var tile3 = new ej.Tile($("#tile3"), { + imagePosition:"center", + tileSize:"small", + imageUrl:'content/images/tile/windows/bing.png', + }); + var tile4 = new ej.Tile($("#tile4"), { + tileSize:"small", + imageUrl:'content/images/tile/windows/camera.png', + }); + var tile5 = new ej.Tile($("#tile5"), { + imagePosition:"center", + tileSize:"small", + imageUrl:'content/images/tile/windows/messages.png', + }); + var tile6 = new ej.Tile($("#tile6"), { + imagePosition:"center", + tileSize:"medium", + imageUrl:'content/images/tile/windows/games.png', + caption:{text:"Play"} + }); + var tile7 = new ej.Tile($("#tile7"), { + tileSize:"medium", + imageUrl:'content/images/tile/windows/map.png', + caption:{text:"Maps"} + }); + var tile8 = new ej.Tile($("#tile8"), { + imagePosition:"fill", + tileSize:"wide", + imageUrl:'content/images/tile/windows/sports.png', + caption:{text:"Sports"} + }); + var tile9 = new ej.Tile($("#tile9"), { + imagePosition:"fill", + tileSize:"medium", + imageUrl:'content/images/tile/windows/people_2.png', + caption:{text:"People"} + }); + var tile10 = new ej.Tile($("#tile10"), { + imagePosition:"center", + tileSize:"medium", + imageUrl:'content/images/tile/windows/pictures.png', + caption:{text:"Photo"} + }); + var tile11 = new ej.Tile($("#tile11"), { + imagePosition:"center", + tileSize:"wide", + imageUrl:'content/images/tile/windows/weather.png', + caption:{text:"Weather"} + }); + var tile12 = new ej.Tile($("#tile12"), { + imagePosition:"center", + tileSize:"medium", + imageUrl:'content/images/tile/windows/music.png', + caption:{text:"Music"} + }); + var tile13 = new ej.Tile($("#tile13"), { + imagePosition:"center", + tileSize:"medium", + imageUrl:'content/images/tile/windows/favs.png', + caption:{text:"Favorites"} + }); + }); +} + + + +module TimePickerComponent { + $(function () { + var timeSample = new ej.TimePicker($("#timepick"), { + width: "100%" + }); + }); +} + + + + +module ToolbarComponent { + $(function () { + var sample = new ej.Toolbar($("#editingToolbar"),{ + width: "100%", + cssClass: "gradient-lime", + enableSeparator: true, + isResponsive: true, + orientation: ej.Orientation.Horizontal, + showRoundedCorner: true + }); + }); +} + + + +module TooltipComponent { + $(function () { + + var sample1 = new ej.Tooltip($("#link1"),{ + content: "ECMAScript (or ES) is a trademarked scripting-language specification standardized by Ecma International in ECMA-262 and ISO/IEC 16262.", + associate: "mousefollow", + autoCloseTimeout: 5000, + collision: "fit", + containment: ".frame", + showRoundedCorner: true, + showShadow: true + }); + + var sample2 = new ej.Tooltip($("#link2"),{ + content: "The World Wide Web (WWW) is an information space where documents and other web resources are identified by URLs, interlinked by hypertext links, and can be accessed via the Internet.", + position: { + stem: { + horizontal: "right", + vertical: "center" + }, + target: { + horizontal: "left", + vertical: "center" + } + }, + autoCloseTimeout: 5000, + collision: "fit", + containment: ".frame", + showRoundedCorner: true, + showShadow: true + }); + + var sample3 = new ej.Tooltip($("#link3"),{ + content: 'Object-oriented programming (OOP) is a programming language model organized around objects rather than "actions" and data rather than logic.', + position: { + stem: { + horizontal: "right", + vertical: "center" + }, + target: { + horizontal: "left", + vertical: "center", + }, + }, + associate: "mousefollow", + autoCloseTimeout: 5000, + collision: "fit", + containment: ".frame", + showRoundedCorner: true, + showShadow: true + }); + }); +} + + + +module TreeGridComponent { + $(function () { + var treegridInstance = new ej.TreeGrid($("#TreeGridContainer"), { + dataSource: (window).treeGridData, + childMapping: "subtasks", + allowSorting: true, + allowMultiSorting: true, + enableAltRow: true, + allowFiltering: true, + treeColumnIndex: 1, + allowKeyboardNavigation: true, + showColumnChooser: true, + showColumnOptions: true, + contextMenuSettings: { + showContextMenu: true, + contextMenuItems: ["add", "edit", "delete"] + }, + columnDialogFields: ["field", "headerText", "editType", "width", "visible", "allowSorting", "textAlign", "headerTextAlign"], + editSettings: { + allowAdding: true, + allowEditing: true, + allowDeleting: true, + editMode: "cellEditing", + rowPosition: "belowSelectedRow" + }, + toolbarSettings: { + showToolbar: true, + toolbarItems: ["add","edit","delete","update","cancel","expandAll","collapseAll"] + }, + columns: [ + { field: "taskID", headerText: "Task Id", allowFiltering: false, editType: "numericedit", filterEditType: "numericedit" }, + { field: "taskName", headerText: "Task Name", editType: "stringedit", filterEditType: "stringedit" }, + { field: "startDate", headerText: "Start Date", editType: "datepicker", filterEditType: "datepicker", format:"{0:MM/dd/yyyy}" }, + { field: "endDate", headerText: "End Date", editType: "datepicker", filterEditType: "datepicker", format:"{0:MM/dd/yyyy}" }, + { field: "progress", headerText: "Progress", editType: "numericedit", filterEditType: "numericedit" } + ], + isResponsive: true, + }); +}); +} + + + +var population_data: Array = [ + { Continent: "Asia", Country: "Indonesia", Growth: 3, Population: 237641326 }, + { Continent: "Asia", Country: "Russia", Growth: 2, Population: 152518015 }, + { Continent: "Asia", Country: "Malaysia", Growth: 1, Population: 29672000 }, + { Continent: "North America", Country: "United States", Growth: 4, Population: 315645000 }, + { Continent: "North America", Country: "Mexico", Growth: 2, Population: 112336538 }, + { Continent: "North America", Country: "Canada", Growth: 1, Population: 39056064 }, + { Continent: "South America", Country: "Colombia", Growth: 1, Population: 47000000 }, + { Continent: "South America", Country: "Brazil", Growth: 3, Population: 193946886 }, + { Continent: "Africa", Country: "Nigeria", Growth: 2, Population: 170901000 }, + { Continent: "Africa", Country: "Egypt", Growth: 1, Population: 83661000 }, + { Continent: "Europe", Country: "Germany", Growth: 1, Population: 81993000 }, + { Continent: "Europe", Country: "France", Growth: 1, Population: 65605000 }, + { Continent: "Europe", Country: "UK", Growth: 1, Population: 63181775 } +]; + +module treemapcomponent { + $(function () { + var treemapsample = new ej.datavisualization.TreeMap($("#treemap"), { + leafItemSettings: { showLabels: true, labelPath: "Country" }, + rangeColorMapping: [ + { color: "#77D8D8", legendLabel: "1% Growth", from: 0, to: 1 }, + { color: "#AED960", from: 0, legendLabel: "2% Growth", to: 2 }, + { color: "#FFAF51", from: 0, legendLabel: "3% Growth", to: 3 }, + { color: "#F3D240", from: 0, legendLabel: "4% Growth", to: 4 } + ], + levels: [ + { groupPath: "Continent", groupGap: 5, headerHeight: 25, showHeader: true, headerTemplate: 'headertemplate' } + ], + dataSource: population_data, + colorValuePath: "Growth", + weightValuePath: "Population", + borderThickness: 0, + showLegend: true + }); + }); +} + + + +module TreeViewComponent { + $(function () { + var tree = new ej.TreeView($("#treeView"), { + allowEditing: true, + allowDragAndDrop: true, + allowDropChild: true, + allowDropSibling: true, + }); + }); +} + + + +module UploadboxComponent { + + $(function () { + var sample = new ej.Uploadbox($("#UploadDefault"),{ + saveUrl: (window).baseurl + "api/uploadbox/Save", + removeUrl: (window).baseurl + "api/uploadbox/Remove", + buttonText: { + browse: "Choose File", upload: "Upload", cancel: "Cancel" + }, + cssClass: "gradient- purple", + dialogAction: { + modal: false, closeOnComplete: false, drag: true + }, + extensionsAllow: ".zip", + multipleFilesSelection: true, + showFileDetails: true + }); + }); + +} + + + +module WaitingPopupComponent { + $(function () { + var sample = new ej.WaitingPopup($("#target"),{ + showOnInit: true, + showImage: true, + text: 'waiting…', + target: "#target", + appendTo: "#waiting" + }); + }); + +} diff --git a/types/ej.web.all/index.d.ts b/types/ej.web.all/index.d.ts index 88f43378c3..77db23312f 100644 --- a/types/ej.web.all/index.d.ts +++ b/types/ej.web.all/index.d.ts @@ -46631,11 +46631,6 @@ declare namespace ej { */ searchPrevious(): void; - /** Aborts the search operation. - * @returns {void} - */ - cancelSearchText(): void; - /** Set the JSON data that are formed for rendering the document content in PDF viewer. * @param {any} Set the JSON data that are formed for rendering the document content. * @returns {void} From c1ce0b8e964fc89a2beaace7a75a323fd801239c Mon Sep 17 00:00:00 2001 From: Vincent Date: Thu, 13 Dec 2018 08:46:52 +0100 Subject: [PATCH 590/608] Include the react-syntax-highlighter version --- types/react-syntax-highlighter/index.d.ts | 2 +- types/react-syntax-highlighter/tslint.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/types/react-syntax-highlighter/index.d.ts b/types/react-syntax-highlighter/index.d.ts index 825608fe92..c1ad8f0242 100644 --- a/types/react-syntax-highlighter/index.d.ts +++ b/types/react-syntax-highlighter/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-syntax-highlighter +// Type definitions for react-syntax-highlighter 10.1 // Project: https://github.com/conorhastings/react-syntax-highlighter // Definitions by: Ivo Stratev // Aimee Gamble-Milner diff --git a/types/react-syntax-highlighter/tslint.json b/types/react-syntax-highlighter/tslint.json index a41bf5d19a..4cfa77fc40 100644 --- a/types/react-syntax-highlighter/tslint.json +++ b/types/react-syntax-highlighter/tslint.json @@ -7,7 +7,7 @@ "ban-types": false, "callable-types": false, "comment-format": false, - "dt-header": false, + "dt-header": true, "eofline": false, "export-just-namespace": false, "import-spacing": false, From 4e0b451c2f82dd40f3cf149e87c9388e9e74960c Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Thu, 13 Dec 2018 10:54:22 -0800 Subject: [PATCH 591/608] Update tests and Element.animate first parameter The tests no longer test onsample, since it's not part of the standard. --- types/web-animations-js/index.d.ts | 2 +- .../web-animations-js-tests.ts | 28 ------------------- 2 files changed, 1 insertion(+), 29 deletions(-) diff --git a/types/web-animations-js/index.d.ts b/types/web-animations-js/index.d.ts index c317675727..8e3ac25f95 100644 --- a/types/web-animations-js/index.d.ts +++ b/types/web-animations-js/index.d.ts @@ -103,7 +103,7 @@ declare class GroupEffect extends KeyframeEffect { constructor(effects: KeyframeEffect[]); } interface Element { - animate(effect: AnimationKeyFrame | AnimationKeyFrame[], timing: number | AnimationEffectTiming): Animation; + animate(effect: AnimationKeyFrame | AnimationKeyFrame[] | null, timing: number | AnimationEffectTiming): Animation; getAnimations(): Animation[]; } interface Document { diff --git a/types/web-animations-js/web-animations-js-tests.ts b/types/web-animations-js/web-animations-js-tests.ts index 934bc944d1..aa51fa14d1 100644 --- a/types/web-animations-js/web-animations-js-tests.ts +++ b/types/web-animations-js/web-animations-js-tests.ts @@ -88,31 +88,3 @@ function test_whiteRabbit() { } } } -// Testing onsample -// https://github.com/web-animations/web-animations-js/releases -function test_onsample_And_addEventListener() { - const elem = document.createElement("div"); - if (elem) { - elem.style.width = '150px'; - elem.style.color = 'black'; - elem.textContent = "HELLO"; - document.body.appendChild(elem); - const myEffect = new KeyframeEffect(elem, [], 1000); - myEffect.onsample = (timeFraction, effect, animation) => { - console.log("fraction", timeFraction); - // After finish event, timeFraction is null - if (timeFraction) { - effect.target.style.opacity = timeFraction.toFixed(2); - } - }; - // onsample is write only - console.log(myEffect.onsample); // => undefined - const myAnimation = document.timeline.play(myEffect); - myAnimation.addEventListener("finish", (e) => { - console.log("finished", e); - }); - myAnimation.addEventListener("cancel", (e) => { - console.log("canceled", e); - }); - } -} From 8fe4901ffedb82a8fc30a525f8608da5c4a89204 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Thu, 13 Dec 2018 11:26:28 -0800 Subject: [PATCH 592/608] Fix lint in bluebird --- types/bluebird/index.d.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/types/bluebird/index.d.ts b/types/bluebird/index.d.ts index 1f8768498a..24c2b79a32 100644 --- a/types/bluebird/index.d.ts +++ b/types/bluebird/index.d.ts @@ -35,7 +35,7 @@ * THE SOFTWARE. */ -type Constructor = new (...args: any[]) => E +type Constructor = new (...args: any[]) => E; type CatchFilter = ((error: E) => boolean) | (object & E); type IterableItem = R extends Iterable ? U : never; type IterableOrNever = Extract>; @@ -152,6 +152,7 @@ declare class Bluebird implements PromiseLike, Bluebird.Inspection { ): Bluebird; catch( + // tslint:disable-next-line:unified-signatures filter1: Constructor | CatchFilter, onReject: (error: E1) => Resolvable, ): Bluebird; @@ -262,6 +263,7 @@ declare class Bluebird implements PromiseLike, Bluebird.Inspection { onReject: (error: E1) => Resolvable, ): Bluebird; tapCatch( + // tslint:disable-next-line:unified-signatures filter1: Constructor | CatchFilter, onReject: (error: E1) => Resolvable, ): Bluebird; @@ -467,6 +469,7 @@ declare class Bluebird implements PromiseLike, Bluebird.Inspection { value: U, ): Bluebird; catchReturn( + // tslint:disable-next-line:unified-signatures filter1: Constructor | CatchFilter, value: U, ): Bluebird; @@ -541,6 +544,7 @@ declare class Bluebird implements PromiseLike, Bluebird.Inspection { reason: Error, ): Bluebird; catchThrow( + // tslint:disable-next-line:unified-signatures filter1: Constructor | CatchFilter, reason: Error, ): Bluebird; From b1c147e5e0e19ffb61b9b0fb0c67ac553c350b83 Mon Sep 17 00:00:00 2001 From: perry Date: Thu, 13 Dec 2018 12:29:19 -0800 Subject: [PATCH 593/608] Add missing option: env --- types/dd-trace/dd-trace-tests.ts | 4 ++-- types/dd-trace/index.d.ts | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/types/dd-trace/dd-trace-tests.ts b/types/dd-trace/dd-trace-tests.ts index f98a0853cf..cee1b6e3ee 100644 --- a/types/dd-trace/dd-trace-tests.ts +++ b/types/dd-trace/dd-trace-tests.ts @@ -6,11 +6,11 @@ tracer.init({ service: "MyLovelyService", hostname: "localhost", port: 8126, + env: "dev", logger: { debug: msg => {}, error: err => {}, - }, - tags: { tracerEnv: 'dev'} + } }); function useWebFrameworkPlugin(plugin: "express" | "hapi" | "koa" | "restify") { diff --git a/types/dd-trace/index.d.ts b/types/dd-trace/index.d.ts index 43bfd7183f..a55b7f8de7 100644 --- a/types/dd-trace/index.d.ts +++ b/types/dd-trace/index.d.ts @@ -83,6 +83,11 @@ interface TracerOptions { */ port?: number | string; + /** + * Set an application’s environment e.g. prod, pre-prod, stage. + */ + env?: string; + /** * Percentage of spans to sample as a float between 0 and 1. * @default 1 From c2a14812f93d3276a347f68ac0610385646c6cb7 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Wed, 12 Dec 2018 00:30:26 +0100 Subject: [PATCH 594/608] Enable strictNullChecks for file-type --- types/file-type/file-type-tests.ts | 4 +++- types/file-type/index.d.ts | 18 ++++++++++++++++-- types/file-type/tsconfig.json | 4 ++-- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/types/file-type/file-type-tests.ts b/types/file-type/file-type-tests.ts index 640d2c8fb0..d49a964829 100644 --- a/types/file-type/file-type-tests.ts +++ b/types/file-type/file-type-tests.ts @@ -1,6 +1,8 @@ import fileType = require("file-type"); +// $ExpectType FileTypeResult | null fileType(new Buffer([0xFF, 0xD8, 0xFF])); fileType(new Uint8Array([0xFF, 0xD8, 0xFF])); -const minimumBytes: number = fileType.minimumBytes; +// $ExpectType number +fileType.minimumBytes; diff --git a/types/file-type/index.d.ts b/types/file-type/index.d.ts index 2a0deee26a..c902dc384e 100644 --- a/types/file-type/index.d.ts +++ b/types/file-type/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for file-type 5.2 +// Type definitions for file-type 10.6 // Project: https://github.com/sindresorhus/file-type // Definitions by: KIM Jaesuck a.k.a. gim tcaesvk // BendingBender @@ -8,7 +8,17 @@ export = FileType; -declare function FileType(buf: Buffer | Uint8Array): FileType.FileTypeResult; +/** + * The file type is detected by checking the + * [magic number](http://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_numbers_in_files) of the buffer. + * + * @param buf It only needs the first `.minimumBytes` bytes. The exception is detection of + * `docx`, `pptx`, and `xlsx` which potentially requires reading the whole file. + * @returns an Object with: + * - ext - One of the [supported file types](https://github.com/sindresorhus/file-type/blob/master/readme.md#supported-file-types) + * - mime - The [MIME type](http://en.wikipedia.org/wiki/Internet_media_type) + */ +declare function FileType(buf: Buffer | Uint8Array): FileType.FileTypeResult | null; declare namespace FileType { interface FileTypeResult { @@ -16,5 +26,9 @@ declare namespace FileType { mime: string; } + /** + * The minimum amount of bytes needed to detect a file type. Currently, + * it's 4100 bytes, but it can change, so don't hard-code it. + */ const minimumBytes: number; } diff --git a/types/file-type/tsconfig.json b/types/file-type/tsconfig.json index 499b81459c..1894b908af 100644 --- a/types/file-type/tsconfig.json +++ b/types/file-type/tsconfig.json @@ -6,7 +6,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ @@ -20,4 +20,4 @@ "index.d.ts", "file-type-tests.ts" ] -} \ No newline at end of file +} From 3666c21e7a03513564da1645a2524023bbfc814f Mon Sep 17 00:00:00 2001 From: Bryan Kendall Date: Thu, 13 Dec 2018 14:13:58 -0800 Subject: [PATCH 595/608] update test to be in actual typescript --- types/progress/progress-tests.ts | 60 ++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/types/progress/progress-tests.ts b/types/progress/progress-tests.ts index 561f226b64..d93eb9bc3f 100644 --- a/types/progress/progress-tests.ts +++ b/types/progress/progress-tests.ts @@ -1,42 +1,48 @@ -var ProgressBar = require('progress'); +import * as ProgressBar from 'progress'; /** - * Usage example from https://github.com/tj/node-progress + * Usage example from https://github.com/visionmedia/node-progress + * (in Typescript) */ -var bar = new ProgressBar(':bar', { total: 10 }); -var timer = setInterval(function () { - bar.tick(); - if (bar.complete) { +const usageBar = new ProgressBar(':bar', { total: 10 }); +const timer = setInterval(function () { + usageBar.tick(); + if (usageBar.complete) { console.log('\ncomplete\n'); clearInterval(timer); } }, 100); - /** - * Custom token example from https://github.com/tj/node-progress + * Custom token example from https://github.com/visionmedia/node-progress + * (in Typescript) */ -var bar = new ProgressBar(':current: :token1 :token2', { total: 3 }); - -bar.tick({ - 'token1': "Hello", - 'token2': "World!\n" -}); - -bar.tick(2, { - 'token1': "Goodbye", - 'token2': "World!" -}); + const list = [ + 'image01.jpg', 'image02.jpg', 'image03.jpg', 'image04.jpg', 'image05.jpg', + 'image06.jpg', 'image07.jpg', 'image08.jpg', 'image09.jpg', 'image10.jpg' + ]; + const customTokenBar = new ProgressBar(':percent eta: :eta downloading :current/:total :file', { + total: list.length + }); + const customInterval = setInterval(function (){ + customTokenBar.tick({ + 'file': list[customTokenBar.curr] + }) + if (customTokenBar.complete) { + clearInterval(customInterval) + } + }, 500) /** * Interrupt example from https://github.com/visionmedia/node-progress + * (in Typescript) */ -var bar = new ProgressBar(':bar :current/:total', { total: 10 }); -var timer = setInterval(function () { - bar.tick(); - if (bar.complete) { - clearInterval(timer); - } else if (bar.curr === 5) { - bar.interrupt('this message appears above the progress bar\ncurrent progress is ' + bar.curr + '/' + bar.total); +const interruptBar = new ProgressBar(':bar :current/:total', { total: 10 }); +const interruptTimer = setInterval(function () { + interruptBar.tick(); + if (interruptBar.complete) { + clearInterval(interruptTimer); + } else if (interruptBar.curr === 5 || interruptBar.curr === 8) { + interruptBar.interrupt('interrupt: current progress is ' + interruptBar.curr + '/' + interruptBar.total); } -}, 1000); \ No newline at end of file +}, 1000); From a384bde65de2809a7ba25c460518148ec156ee8c Mon Sep 17 00:00:00 2001 From: Bryan Kendall Date: Thu, 13 Dec 2018 14:34:19 -0800 Subject: [PATCH 596/608] export as a namespace so the class and options are visible --- types/progress/index.d.ts | 132 ++++++++++++++++++++------------------ 1 file changed, 71 insertions(+), 61 deletions(-) diff --git a/types/progress/index.d.ts b/types/progress/index.d.ts index 6f6e2ea33d..6422dabbdc 100644 --- a/types/progress/index.d.ts +++ b/types/progress/index.d.ts @@ -1,67 +1,13 @@ // Type definitions for node-progress v2.0.0 -// Project: https://github.com/tj/node-progress +// Project: https://github.com/visionmedia/node-progress // Definitions by: Sebastian Lenz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// +export as namespace ProgressBar; - -/** - * These are keys in the options object you can pass to the progress bar along with total as seen in the example above. - */ -export interface ProgressBarOptions { - /** - * Total number of ticks to complete. - */ - total: number; - - /** - * current completed index - */ - curr?: number; - - /** - * head character defaulting to complete character - */ - head?: string; - - /** - * The displayed width of the progress bar defaulting to total. - */ - width?: number; - - /** - * minimum time between updates in milliseconds defaulting to 16 - */ - renderThrottle?: number; - - /** - * The output stream defaulting to stderr. - */ - stream?: NodeJS.WritableStream; - - /** - * Completion character defaulting to "=". - */ - complete?: string; - - /** - * Incomplete character defaulting to "-". - */ - incomplete?: string; - - /** - * Option to clear the bar on completion defaulting to false. - */ - clear?: boolean; - - /** - * Optional function to call when the progress bar completes. - */ - callback?: Function; -} - +export = ProgressBar; /** * Flexible ascii progress bar. @@ -90,7 +36,7 @@ declare class ProgressBar { * - `:eta` eta in seconds */ constructor(format: string, total: number); - constructor(format: string, options: ProgressBarOptions); + constructor(format: string, options: ProgressBar.ProgressBarOptions); /** @@ -135,7 +81,71 @@ declare class ProgressBar { * Completed status of progress (Boolean) */ complete: boolean; -} -declare namespace ProgressBar { } -export default ProgressBar; + /** + * Current tick number. + */ + curr: number; + + /** + * Total number of ticks to complete. + */ + total: number; +} + +declare namespace ProgressBar { + /** + * These are keys in the options object you can pass to the progress bar along with total as seen in the example above. + */ + interface ProgressBarOptions { + /** + * Total number of ticks to complete. + */ + total: number; + + /** + * current completed index + */ + curr?: number; + + /** + * head character defaulting to complete character + */ + head?: string; + + /** + * The displayed width of the progress bar defaulting to total. + */ + width?: number; + + /** + * minimum time between updates in milliseconds defaulting to 16 + */ + renderThrottle?: number; + + /** + * The output stream defaulting to stderr. + */ + stream?: NodeJS.WritableStream; + + /** + * Completion character defaulting to "=". + */ + complete?: string; + + /** + * Incomplete character defaulting to "-". + */ + incomplete?: string; + + /** + * Option to clear the bar on completion defaulting to false. + */ + clear?: boolean; + + /** + * Optional function to call when the progress bar completes. + */ + callback?: Function; + } +} From db1fac022e5b3a28487e4100342a7da783024a35 Mon Sep 17 00:00:00 2001 From: Bryan Kendall Date: Thu, 13 Dec 2018 14:34:55 -0800 Subject: [PATCH 597/608] fix inclusion of progress module --- types/multi-progress/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/multi-progress/index.d.ts b/types/multi-progress/index.d.ts index db15a15b1b..a98057ecc8 100644 --- a/types/multi-progress/index.d.ts +++ b/types/multi-progress/index.d.ts @@ -5,7 +5,7 @@ /// -import ProgressBar, { ProgressBarOptions } from 'progress'; +import * as ProgressBar from 'progress'; import { Stream } from 'stream'; export default class MultiProgress { @@ -18,7 +18,7 @@ export default class MultiProgress { /** * Add a new bar */ - newBar: (format: string, options: ProgressBarOptions) => ProgressBar; + newBar: (format: string, options: ProgressBar.ProgressBarOptions) => ProgressBar; /** * Close all bars From 4f40fdc2ec032e766d72bf3fa5fbdc8fa53eec17 Mon Sep 17 00:00:00 2001 From: Bryan Kendall Date: Thu, 13 Dec 2018 14:47:24 -0800 Subject: [PATCH 598/608] fix multi-progress typing to expose constructor as namespace --- types/multi-progress/index.d.ts | 8 +++++++- types/multi-progress/multi-progress-tests.ts | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/types/multi-progress/index.d.ts b/types/multi-progress/index.d.ts index a98057ecc8..31dd11b710 100644 --- a/types/multi-progress/index.d.ts +++ b/types/multi-progress/index.d.ts @@ -8,7 +8,11 @@ import * as ProgressBar from 'progress'; import { Stream } from 'stream'; -export default class MultiProgress { +export as namespace MultiProgress; + +export = MultiProgress; + +declare class MultiProgress { /** * Create a new @see MultiProgress with the given stream, or stderr by default * @param stream A stream to write the progress bars to @@ -40,3 +44,5 @@ export default class MultiProgress { */ update: (index: number, value: number, options?: any) => void; } + +declare namespace MultiProgress {} diff --git a/types/multi-progress/multi-progress-tests.ts b/types/multi-progress/multi-progress-tests.ts index 9dde27c16b..b14806b7c5 100644 --- a/types/multi-progress/multi-progress-tests.ts +++ b/types/multi-progress/multi-progress-tests.ts @@ -3,7 +3,7 @@ */ // require the library -import MultiProgress from 'multi-progress'; +import * as MultiProgress from 'multi-progress'; // spawn an instance with the optional stream to write to // use of `new` is optional From bc53931e5057c294dfdd1f53e86f61aa5ffa1004 Mon Sep 17 00:00:00 2001 From: Bryan Kendall Date: Thu, 13 Dec 2018 14:54:02 -0800 Subject: [PATCH 599/608] fix version number --- types/multi-progress/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/multi-progress/index.d.ts b/types/multi-progress/index.d.ts index 31dd11b710..d06f941fbb 100644 --- a/types/multi-progress/index.d.ts +++ b/types/multi-progress/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for multi-progress 2.0 +// Type definitions for multi-progress 2.0.0 // Project: https://github.com/pitaj/multi-progress // Definitions by: David Brett // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped From 2a93d32f56ea529bf62cf2b979cb0a8e5ae987bb Mon Sep 17 00:00:00 2001 From: Bryan Kendall Date: Thu, 13 Dec 2018 14:54:12 -0800 Subject: [PATCH 600/608] fix version number --- types/progress/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/progress/index.d.ts b/types/progress/index.d.ts index 6422dabbdc..ba9b0eb261 100644 --- a/types/progress/index.d.ts +++ b/types/progress/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for node-progress v2.0.0 +// Type definitions for node-progress v2.0.3 // Project: https://github.com/visionmedia/node-progress // Definitions by: Sebastian Lenz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped From e265533307c820a080e2a5e5d0e2a50dec957d01 Mon Sep 17 00:00:00 2001 From: Bryan Kendall Date: Thu, 13 Dec 2018 15:01:12 -0800 Subject: [PATCH 601/608] multi-progress version to '2.0' --- types/multi-progress/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/multi-progress/index.d.ts b/types/multi-progress/index.d.ts index d06f941fbb..31dd11b710 100644 --- a/types/multi-progress/index.d.ts +++ b/types/multi-progress/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for multi-progress 2.0.0 +// Type definitions for multi-progress 2.0 // Project: https://github.com/pitaj/multi-progress // Definitions by: David Brett // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped From e553952abcc391cf83cb2d679b6a91cbc1b3a147 Mon Sep 17 00:00:00 2001 From: Bryan Kendall Date: Thu, 13 Dec 2018 15:02:05 -0800 Subject: [PATCH 602/608] progress type to '2.0' --- types/progress/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/progress/index.d.ts b/types/progress/index.d.ts index ba9b0eb261..c1e199ec6c 100644 --- a/types/progress/index.d.ts +++ b/types/progress/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for node-progress v2.0.3 +// Type definitions for node-progress 2.0 // Project: https://github.com/visionmedia/node-progress // Definitions by: Sebastian Lenz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped From 6ca47a427aad7db33a623c3c8379e9183f4d1692 Mon Sep 17 00:00:00 2001 From: VincentBel Date: Fri, 14 Dec 2018 11:26:56 +0800 Subject: [PATCH 603/608] [memoize-one] add typings for v4.1 --- types/memoize-one/index.d.ts | 4 ++-- types/memoize-one/memoize-one-tests.ts | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/types/memoize-one/index.d.ts b/types/memoize-one/index.d.ts index 71f785e73c..e8ec195875 100644 --- a/types/memoize-one/index.d.ts +++ b/types/memoize-one/index.d.ts @@ -1,9 +1,9 @@ -// Type definitions for memoize-one 3.1 +// Type definitions for memoize-one 4.1 // Project: https://github.com/alexreardon/memoize-one#readme // Definitions by: Karol Majewski , Frank Li // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare function memoizeOne any>(resultFn: T, isEqual?: EqualityFn): T; -export type EqualityFn = (a: any, b: any) => boolean; +export type EqualityFn = (a: any, b: any, index: number) => boolean; export default memoizeOne; diff --git a/types/memoize-one/memoize-one-tests.ts b/types/memoize-one/memoize-one-tests.ts index 4feddf6e57..a9c565b500 100644 --- a/types/memoize-one/memoize-one-tests.ts +++ b/types/memoize-one/memoize-one-tests.ts @@ -3,6 +3,7 @@ import memoizeOne, { EqualityFn } from 'memoize-one'; declare function add(a: number, b: number): number ; declare function lousyEqualityFn(a: any, b: any): boolean; declare function strictEqualityFn(a: T, b: T): boolean; +declare function equalityFnWithIndex(a: T, b: T, index: number): boolean; /** * Accepts a second argument. @@ -10,17 +11,18 @@ declare function strictEqualityFn(a: T, b: T): boolean; memoizeOne(add); // $ExpectType (a: number, b: number) => number memoizeOne(add, lousyEqualityFn); // $ExpectType (a: number, b: number) => number memoizeOne(add, strictEqualityFn); // $ExpectType (a: number, b: number) => number +memoizeOne(add, equalityFnWithIndex); // $ExpectType (a: number, b: number) => number /** - * The second argument can be, but doesn't have to be stritly typed. + * The second argument can be, but doesn't have to be strictly typed. */ memoizeOne(add, (a, b) => a === b); // $ExpectType (a: number, b: number) => number memoizeOne(add, (a: string, b: string) => a === b); // $ExpectType (a: number, b: number) => number /** - * Function passed as the second argument accepts exactly two arguments. + * Function passed as the second argument accepts no more than three arguments. */ -memoizeOne(add, (a: number, b: number, c: number) => a === b || c); // $ExpectError +memoizeOne(add, (a: number, b: number, c: number, d: number) => Boolean(a && b && c && d)); // $ExpectError /** * Function passed as the second argument returns a boolean. From 7b41345f82a42a1cf234c4a7bd3c69949be327f9 Mon Sep 17 00:00:00 2001 From: BuffayBu Date: Fri, 14 Dec 2018 18:08:19 +0800 Subject: [PATCH 604/608] fix typo --- types/http-proxy-middleware/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/http-proxy-middleware/index.d.ts b/types/http-proxy-middleware/index.d.ts index b48214b8f6..09b80e21c4 100644 --- a/types/http-proxy-middleware/index.d.ts +++ b/types/http-proxy-middleware/index.d.ts @@ -18,7 +18,7 @@ declare function proxy(config: proxy.Config): proxy.Proxy; declare function proxy(contextOrUri: string | string[] | proxy.Filter, config: proxy.Config): proxy.Proxy; declare namespace proxy { - type Filter = (pathanme: string, req: http.IncomingMessage) => boolean; + type Filter = (pathname: string, req: http.IncomingMessage) => boolean; type Logger = (...args: any[]) => void; interface LogProvider { log: Logger; From 77dcb8b3c37d3e203ec5e62b0fa7323844a71e22 Mon Sep 17 00:00:00 2001 From: VincentBel Date: Fri, 14 Dec 2018 23:44:04 +0800 Subject: [PATCH 605/608] [memoize-one] keep v3 typings --- types/memoize-one/v3/index.d.ts | 9 +++++++ types/memoize-one/v3/memoize-one-tests.ts | 33 +++++++++++++++++++++++ types/memoize-one/v3/tsconfig.json | 26 ++++++++++++++++++ types/memoize-one/v3/tslint.json | 1 + 4 files changed, 69 insertions(+) create mode 100644 types/memoize-one/v3/index.d.ts create mode 100644 types/memoize-one/v3/memoize-one-tests.ts create mode 100644 types/memoize-one/v3/tsconfig.json create mode 100644 types/memoize-one/v3/tslint.json diff --git a/types/memoize-one/v3/index.d.ts b/types/memoize-one/v3/index.d.ts new file mode 100644 index 0000000000..71f785e73c --- /dev/null +++ b/types/memoize-one/v3/index.d.ts @@ -0,0 +1,9 @@ +// Type definitions for memoize-one 3.1 +// Project: https://github.com/alexreardon/memoize-one#readme +// Definitions by: Karol Majewski , Frank Li +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function memoizeOne any>(resultFn: T, isEqual?: EqualityFn): T; +export type EqualityFn = (a: any, b: any) => boolean; + +export default memoizeOne; diff --git a/types/memoize-one/v3/memoize-one-tests.ts b/types/memoize-one/v3/memoize-one-tests.ts new file mode 100644 index 0000000000..f163add16e --- /dev/null +++ b/types/memoize-one/v3/memoize-one-tests.ts @@ -0,0 +1,33 @@ +import memoizeOne, { EqualityFn } from 'memoize-one'; + +declare function add(a: number, b: number): number ; +declare function lousyEqualityFn(a: any, b: any): boolean; +declare function strictEqualityFn(a: T, b: T): boolean; + +/** + * Accepts a second argument. + */ +memoizeOne(add); // $ExpectType (a: number, b: number) => number +memoizeOne(add, lousyEqualityFn); // $ExpectType (a: number, b: number) => number +memoizeOne(add, strictEqualityFn); // $ExpectType (a: number, b: number) => number + +/** + * The second argument can be, but doesn't have to be strictly typed. + */ +memoizeOne(add, (a, b) => a === b); // $ExpectType (a: number, b: number) => number +memoizeOne(add, (a: string, b: string) => a === b); // $ExpectType (a: number, b: number) => number + +/** + * Function passed as the second argument accepts exactly two arguments. + */ +memoizeOne(add, (a: number, b: number, c: number) => a === b || c); // $ExpectError + +/** + * Function passed as the second argument returns a boolean. + */ +memoizeOne(add, (a: string, b: string) => 0); // $ExpectError + +/** + * The `EqualityFn` type is publicly accessible. + */ +const simpleIsEqual: EqualityFn = (x: number, y: number): boolean => (x === y); diff --git a/types/memoize-one/v3/tsconfig.json b/types/memoize-one/v3/tsconfig.json new file mode 100644 index 0000000000..728bd3ee58 --- /dev/null +++ b/types/memoize-one/v3/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../../", + "typeRoots": [ + "../../" + ], + "types": [], + "paths": { + "memoize-one": [ "memoize-one/v3" ] + }, + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "memoize-one-tests.ts" + ] +} diff --git a/types/memoize-one/v3/tslint.json b/types/memoize-one/v3/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/memoize-one/v3/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 9b9ce95bde0373d3e420d3a92e41cb4b51f222a0 Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Fri, 14 Dec 2018 07:55:20 -0800 Subject: [PATCH 606/608] Add checkReturnValue annotations to Jasmine#expect (#31240) --- types/jasmine/index.d.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/types/jasmine/index.d.ts b/types/jasmine/index.d.ts index a87b8b3a86..fdfe29607c 100644 --- a/types/jasmine/index.d.ts +++ b/types/jasmine/index.d.ts @@ -80,18 +80,21 @@ declare function afterAll(action: (done: DoneFn) => void, timeout?: number): voi /** * Create an expectation for a spec. + * @checkReturnValue see https://tsetse.info/check-return-value * @param spy */ declare function expect(spy: Function): jasmine.Matchers; /** * Create an expectation for a spec. + * @checkReturnValue see https://tsetse.info/check-return-value * @param actual */ declare function expect(actual: ArrayLike): jasmine.ArrayLikeMatchers; /** * Create an expectation for a spec. + * @checkReturnValue see https://tsetse.info/check-return-value * @param actual Actual computed value to test expectations against. */ declare function expect(actual: T): jasmine.Matchers; From 3feaf9ea10a0af7393fff44e8141d1af22c6961d Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Fri, 14 Dec 2018 09:20:26 -0800 Subject: [PATCH 607/608] Use typesVersions for 3.1 and 3.2 --- types/peerjs/index.d.ts | 6 +- types/peerjs/package.json | 7 + types/peerjs/peerjs-tests.ts | 2 +- types/peerjs/ts3.2/index.d.ts | 194 ++++++++++++++ types/peerjs/ts3.2/peerjs-tests.ts | 54 ++++ types/peerjs/ts3.2/tsconfig.json | 24 ++ types/peerjs/ts3.2/tslint.json | 79 ++++++ types/w3c-generic-sensor/index.d.ts | 2 +- types/w3c-generic-sensor/package.json | 14 + types/w3c-generic-sensor/ts3.2/index.d.ts | 90 +++++++ types/w3c-generic-sensor/ts3.2/tsconfig.json | 24 ++ types/w3c-generic-sensor/ts3.2/tslint.json | 1 + .../ts3.2/w3c-generic-sensor-tests.ts | 246 ++++++++++++++++++ types/w3c-generic-sensor/tsconfig.json | 2 +- types/w3c-screen-orientation/index.d.ts | 3 +- types/w3c-screen-orientation/package.json | 8 + types/w3c-screen-orientation/ts3.1/index.d.ts | 13 + .../ts3.1/tsconfig.json | 24 ++ .../w3c-screen-orientation/ts3.1/tslint.json | 1 + .../ts3.1/w3c-screen-orientation-tests.ts | 36 +++ types/w3c-screen-orientation/ts3.2/index.d.ts | 13 + .../ts3.2/tsconfig.json | 24 ++ .../w3c-screen-orientation/ts3.2/tslint.json | 1 + .../ts3.2/w3c-screen-orientation-tests.ts | 36 +++ types/web-animations-js/index.d.ts | 3 +- types/web-animations-js/package.json | 7 + types/web-animations-js/ts3.2/index.d.ts | 105 ++++++++ types/web-animations-js/ts3.2/tsconfig.json | 25 ++ types/web-animations-js/ts3.2/tslint.json | 1 + .../ts3.2/web-animations-js-tests.ts | 90 +++++++ .../web-animations-js-tests.ts | 20 +- 31 files changed, 1134 insertions(+), 21 deletions(-) create mode 100644 types/peerjs/package.json create mode 100644 types/peerjs/ts3.2/index.d.ts create mode 100644 types/peerjs/ts3.2/peerjs-tests.ts create mode 100644 types/peerjs/ts3.2/tsconfig.json create mode 100644 types/peerjs/ts3.2/tslint.json create mode 100644 types/w3c-generic-sensor/package.json create mode 100644 types/w3c-generic-sensor/ts3.2/index.d.ts create mode 100644 types/w3c-generic-sensor/ts3.2/tsconfig.json create mode 100644 types/w3c-generic-sensor/ts3.2/tslint.json create mode 100644 types/w3c-generic-sensor/ts3.2/w3c-generic-sensor-tests.ts create mode 100644 types/w3c-screen-orientation/package.json create mode 100644 types/w3c-screen-orientation/ts3.1/index.d.ts create mode 100644 types/w3c-screen-orientation/ts3.1/tsconfig.json create mode 100644 types/w3c-screen-orientation/ts3.1/tslint.json create mode 100644 types/w3c-screen-orientation/ts3.1/w3c-screen-orientation-tests.ts create mode 100644 types/w3c-screen-orientation/ts3.2/index.d.ts create mode 100644 types/w3c-screen-orientation/ts3.2/tsconfig.json create mode 100644 types/w3c-screen-orientation/ts3.2/tslint.json create mode 100644 types/w3c-screen-orientation/ts3.2/w3c-screen-orientation-tests.ts create mode 100644 types/web-animations-js/package.json create mode 100644 types/web-animations-js/ts3.2/index.d.ts create mode 100644 types/web-animations-js/ts3.2/tsconfig.json create mode 100644 types/web-animations-js/ts3.2/tslint.json create mode 100644 types/web-animations-js/ts3.2/web-animations-js-tests.ts diff --git a/types/peerjs/index.d.ts b/types/peerjs/index.d.ts index faf99dc9b3..f3ec14c796 100644 --- a/types/peerjs/index.d.ts +++ b/types/peerjs/index.d.ts @@ -2,7 +2,9 @@ // Project: http://peerjs.com/ // Definitions by: Toshiya Nakakura // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3.2 +// TypeScript Version: 3.0 + +/// declare namespace PeerJs{ interface PeerJSOption{ @@ -11,7 +13,7 @@ declare namespace PeerJs{ port?: number; path?: string; secure?: boolean; - config?: RTCConfiguration; + config?: RTCPeerConnectionConfig; debug?: number; } diff --git a/types/peerjs/package.json b/types/peerjs/package.json new file mode 100644 index 0000000000..d27d838dc6 --- /dev/null +++ b/types/peerjs/package.json @@ -0,0 +1,7 @@ +{ + "private": true, + "types": "index", + "typesVersions": { + ">=3.2.0-0": { "*": ["ts3.2/*"] } + } +} diff --git a/types/peerjs/peerjs-tests.ts b/types/peerjs/peerjs-tests.ts index 2246e6a8fd..eef24bf001 100644 --- a/types/peerjs/peerjs-tests.ts +++ b/types/peerjs/peerjs-tests.ts @@ -40,7 +40,7 @@ var connection = peerById.connect("id", { metadata: {message: 'hi i want to chat with you!'} }); -var call = peerById.call('callto-id', (window).localStream); +var call = peerById.call('callto-id', (window as any).localStream); var openHandler=()=> console.log("open"); peerById.on("open", openHandler); diff --git a/types/peerjs/ts3.2/index.d.ts b/types/peerjs/ts3.2/index.d.ts new file mode 100644 index 0000000000..71a6cc3c26 --- /dev/null +++ b/types/peerjs/ts3.2/index.d.ts @@ -0,0 +1,194 @@ +// Type definitions for PeerJS +// Project: http://peerjs.com/ +// Definitions by: Toshiya Nakakura +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace PeerJs{ + interface PeerJSOption{ + key?: string; + host?: string; + port?: number; + path?: string; + secure?: boolean; + config?: RTCConfiguration; + debug?: number; + } + + interface PeerConnectOption{ + label?: string; + metadata?: any; + serialization?: string; + reliable?: boolean; + + } + + interface DataConnection{ + send(data: any): void; + close(): void; + on(event: string, cb: ()=>void): void; + on(event: 'data', cb: (data: any)=>void): void; + on(event: 'open', cb: ()=>void): void; + on(event: 'close', cb: ()=>void): void; + on(event: 'error', cb: (err: any)=>void): void; + off(event: string, fn: Function, once?: boolean): void; + dataChannel: RTCDataChannel; + label: string; + metadata: any; + open: boolean; + peerConnection: any; + peer: string; + reliable: boolean; + serialization: string; + type: string; + buffSize: number; + } + + interface MediaConnection{ + answer(stream?: any): void; + close(): void; + on(event: string, cb: ()=>void): void; + on(event: 'stream', cb: (stream: any)=>void): void; + on(event: 'close', cb: ()=>void): void; + on(event: 'error', cb: (err: any)=>void): void; + off(event: string, fn: Function, once?: boolean): void; + open: boolean; + metadata: any; + peer: string; + type: string; + } + + interface utilSupportsObj { + audioVideo: boolean; + data: boolean; + binary: boolean; + reliable: boolean; + } + + interface util{ + browser: string; + supports: utilSupportsObj; + } + + export interface Peer{ + /** + * + * @param id The brokering ID of the remote peer (their peer.id). + * @param options for specifying details about Peer Connection + */ + connect(id: string, options?: PeerJs.PeerConnectOption): PeerJs.DataConnection; + /** + * Connects to the remote peer specified by id and returns a data connection. + * @param id The brokering ID of the remote peer (their peer.id). + * @param stream The caller's media stream + * @param options Metadata associated with the connection, passed in by whoever initiated the connection. + */ + call(id: string, stream: any, options?: any): PeerJs.MediaConnection; + /** + * Calls the remote peer specified by id and returns a media connection. + * @param event Event name + * @param cb Callback Function + */ + on(event: string, cb: ()=>void): void; + /** + * Emitted when a connection to the PeerServer is established. + * @param event Event name + * @param cb id is the brokering ID of the peer + */ + on(event: 'open', cb: (id: string)=>void): void; + /** + * Emitted when a new data connection is established from a remote peer. + * @param event Event name + * @param cb Callback Function + */ + on(event: 'connection', cb: (dataConnection: PeerJs.DataConnection)=>void): void; + /** + * Emitted when a remote peer attempts to call you. + * @param event Event name + * @param cb Callback Function + */ + on(event: 'call', cb: (mediaConnection: PeerJs.MediaConnection)=>void): void; + /** + * Emitted when the peer is destroyed and can no longer accept or create any new connections. + * @param event Event name + * @param cb Callback Function + */ + on(event: 'close', cb: ()=>void): void; + /** + * Emitted when the peer is disconnected from the signalling server + * @param event Event name + * @param cb Callback Function + */ + on(event: 'disconnected', cb: ()=>void): void; + /** + * Errors on the peer are almost always fatal and will destroy the peer. + * @param event Event name + * @param cb Callback Function + */ + on(event: 'error', cb: (err: any)=>void): void; + /** + * Remove event listeners.(EventEmitter3) + * @param {String} event The event we want to remove. + * @param {Function} fn The listener that we need to find. + * @param {Boolean} once Only remove once listeners. + */ + off(event: string, fn: Function, once?: boolean): void; + /** + * Close the connection to the server, leaving all existing data and media connections intact. + */ + disconnect(): void; + /** + * Attempt to reconnect to the server with the peer's old ID + */ + reconnect(): void; + /** + * Close the connection to the server and terminate all existing connections. + */ + destroy(): void; + + /** + * Retrieve a data/media connection for this peer. + * @param peer + * @param id + */ + getConnection(peer: Peer, id: string): any; + + /** + * Get a list of available peer IDs + * @param callback + */ + listAllPeers(callback: (peerIds: Array)=>void): void; + /** + * The brokering ID of this peer + */ + id: string; + /** + * A hash of all connections associated with this peer, keyed by the remote peer's ID. + */ + connections: any; + /** + * false if there is an active connection to the PeerServer. + */ + disconnected: boolean; + /** + * true if this peer and all of its connections can no longer be used. + */ + destroyed: boolean; + } +} + +declare var Peer: { + prototype: RTCIceServer; + /** + * A peer can connect to other peers and listen for connections. + * @param id Other peers can connect to this peer using the provided ID. + * If no ID is given, one will be generated by the brokering server. + * @param options for specifying details about PeerServer + */ + new (id: string, options?: PeerJs.PeerJSOption): PeerJs.Peer; + + /** + * A peer can connect to other peers and listen for connections. + * @param options for specifying details about PeerServer + */ + new (options: PeerJs.PeerJSOption): PeerJs.Peer; +}; diff --git a/types/peerjs/ts3.2/peerjs-tests.ts b/types/peerjs/ts3.2/peerjs-tests.ts new file mode 100644 index 0000000000..eef24bf001 --- /dev/null +++ b/types/peerjs/ts3.2/peerjs-tests.ts @@ -0,0 +1,54 @@ +var peerByOption: PeerJs.Peer = new Peer({ + key: 'peerKey', + debug: 3, +}); + +peerByOption.on("connection", dataConnection => { + var type: string = dataConnection.type; +}); + +peerByOption.listAllPeers(function(items){ + for(var i in items){ + console.log(decodeURI(items[i])); + } +}); + +var peerById: PeerJs.Peer = new Peer("peerid"); + +var peerByIdAndOption: PeerJs.Peer = new Peer( + "peerId", + { + key: 'peerKey', + debug: 3, + }); +peerByIdAndOption.on("call", mediaConnection => { + var isOpen: boolean = mediaConnection.open; +}); + +var id = peerByOption.id; +var connections = peerByOption.connections; +var flag = peerByOption.disconnected; +flag = peerByOption.destroyed; + +peerByOption.disconnect(); +peerByOption.reconnect(); +peerByOption.destroy(); + +var connection = peerById.connect("id", { + label: 'chat', + serialization: 'none', + metadata: {message: 'hi i want to chat with you!'} +}); + +var call = peerById.call('callto-id', (window as any).localStream); + +var openHandler=()=> console.log("open"); +peerById.on("open", openHandler); +peerById.on("connection", (c)=> console.log("connection")); +peerById.on("call", (media)=> console.log("call")); +peerById.on("close", ()=> console.log("close")); +peerById.on("disconnected", ()=> console.log("disconnected")); +peerById.on("error", (err)=> console.log(err)); +peerById.off("open", openHandler); + +var connection2 = peerById.getConnection(peerByOption, "callto-id"); diff --git a/types/peerjs/ts3.2/tsconfig.json b/types/peerjs/ts3.2/tsconfig.json new file mode 100644 index 0000000000..eaa819fc0c --- /dev/null +++ b/types/peerjs/ts3.2/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "strictFunctionTypes": true, + "baseUrl": "../../", + "typeRoots": [ + "../../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "peerjs-tests.ts" + ] +} diff --git a/types/peerjs/ts3.2/tslint.json b/types/peerjs/ts3.2/tslint.json new file mode 100644 index 0000000000..a41bf5d19a --- /dev/null +++ b/types/peerjs/ts3.2/tslint.json @@ -0,0 +1,79 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "adjacent-overload-signatures": false, + "array-type": false, + "arrow-return-shorthand": false, + "ban-types": false, + "callable-types": false, + "comment-format": false, + "dt-header": false, + "eofline": false, + "export-just-namespace": false, + "import-spacing": false, + "interface-name": false, + "interface-over-type-literal": false, + "jsdoc-format": false, + "max-line-length": false, + "member-access": false, + "new-parens": false, + "no-any-union": false, + "no-boolean-literal-compare": false, + "no-conditional-assignment": false, + "no-consecutive-blank-lines": false, + "no-construct": false, + "no-declare-current-package": false, + "no-duplicate-imports": false, + "no-duplicate-variable": false, + "no-empty-interface": false, + "no-for-in-array": false, + "no-inferrable-types": false, + "no-internal-module": false, + "no-irregular-whitespace": false, + "no-mergeable-namespace": false, + "no-misused-new": false, + "no-namespace": false, + "no-object-literal-type-assertion": false, + "no-padding": false, + "no-redundant-jsdoc": false, + "no-redundant-jsdoc-2": false, + "no-redundant-undefined": false, + "no-reference-import": false, + "no-relative-import-in-test": false, + "no-self-import": false, + "no-single-declare-module": false, + "no-string-throw": false, + "no-unnecessary-callback-wrapper": false, + "no-unnecessary-class": false, + "no-unnecessary-generics": false, + "no-unnecessary-qualifier": false, + "no-unnecessary-type-assertion": false, + "no-useless-files": false, + "no-var-keyword": false, + "no-var-requires": false, + "no-void-expression": false, + "no-trailing-whitespace": false, + "object-literal-key-quotes": false, + "object-literal-shorthand": false, + "one-line": false, + "one-variable-per-declaration": false, + "only-arrow-functions": false, + "prefer-conditional-expression": false, + "prefer-const": false, + "prefer-declare-function": false, + "prefer-for-of": false, + "prefer-method-signature": false, + "prefer-template": false, + "radix": false, + "semicolon": false, + "space-before-function-paren": false, + "space-within-parens": false, + "strict-export-declare-modifiers": false, + "trim-file": false, + "triple-equals": false, + "typedef-whitespace": false, + "unified-signatures": false, + "void-return": false, + "whitespace": false + } +} diff --git a/types/w3c-generic-sensor/index.d.ts b/types/w3c-generic-sensor/index.d.ts index bec987d04f..70e41c87bf 100644 --- a/types/w3c-generic-sensor/index.d.ts +++ b/types/w3c-generic-sensor/index.d.ts @@ -2,7 +2,7 @@ // Project: https://www.w3.org/TR/generic-sensor/ // Definitions by: Kenneth Rohde Christiansen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3.2 +// TypeScript Version: 3.0 // Explainer: https://www.w3.org/TR/motion-sensors/ diff --git a/types/w3c-generic-sensor/package.json b/types/w3c-generic-sensor/package.json new file mode 100644 index 0000000000..ac057ed75f --- /dev/null +++ b/types/w3c-generic-sensor/package.json @@ -0,0 +1,14 @@ +{ + "private": true, + "types": "index", + "typesVersions": { + ">=3.2.0-0": { + "*": [ + "ts3.2/*" + ] + } + }, + "dependencies": { + "typescript": "^2.2.2" + } +} diff --git a/types/w3c-generic-sensor/ts3.2/index.d.ts b/types/w3c-generic-sensor/ts3.2/index.d.ts new file mode 100644 index 0000000000..12a22260ee --- /dev/null +++ b/types/w3c-generic-sensor/ts3.2/index.d.ts @@ -0,0 +1,90 @@ +// Explainer: https://www.w3.org/TR/motion-sensors/ + +declare class SensorErrorEvent extends Event { + constructor(type: string, errorEventInitDict: SensorErrorEventInit); + readonly error: Error; +} + +interface SensorErrorEventInit extends EventInit { + error: Error; +} + +declare class Sensor extends EventTarget { + readonly activated: boolean; + readonly timestamp?: number; // Should be DOMHighResTimeStamp. + start(): void; + stop(): void; + + onreading: (this: this, ev: Event) => any; + onactivate: (this: this, ev: Event) => any; + onerror: (this: this, ev: SensorErrorEvent) => any; + + addEventListener(type: "reading" | "activate", listener: (this: this, ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "error", listener: (this: this, ev: SensorErrorEvent) => any, useCapture?: boolean): void; +} + +interface SensorOptions { + frequency?: number; +} + +// Accelerometer: https://www.w3.org/TR/accelerometer/ + +declare class Accelerometer extends Sensor { + constructor(options?: SensorOptions); + readonly x?: number; + readonly y?: number; + readonly z?: number; +} + +declare class LinearAccelerationSensor extends Accelerometer { + constructor(options?: SensorOptions); +} + +declare class GravitySensor extends Accelerometer { + constructor(options?: SensorOptions); +} + +// Gyroscope: https://www.w3.org/TR/gyroscope/ + +declare class Gyroscope extends Sensor { + constructor(options?: SensorOptions); + readonly x?: number; + readonly y?: number; + readonly z?: number; +} + +// Magnetometer: https://www.w3.org/TR/magnetometer/ + +declare class Magnetometer extends Sensor { + constructor(options?: SensorOptions); + readonly x?: number; + readonly y?: number; + readonly z?: number; +} + +declare class UncalibratedMagnetometer extends Sensor { + constructor(options?: SensorOptions); + readonly x?: number; + readonly y?: number; + readonly z?: number; + readonly xBias?: number; + readonly yBias?: number; + readonly zBias?: number; +} + +// Orientation Sensor: https://www.w3.org/TR/orientation-sensor/ + +type RotationMatrixType = Float32Array | Float64Array | DOMMatrix; + +declare class OrientationSensor extends Sensor { + readonly quaternion?: number[]; + populateMatrix(targetMatrix: RotationMatrixType): void; +} + +declare class AbsoluteOrientationSensor extends OrientationSensor { + constructor(options?: SensorOptions); +} + +declare class RelativeOrientationSensor extends OrientationSensor { + constructor(options?: SensorOptions); +} diff --git a/types/w3c-generic-sensor/ts3.2/tsconfig.json b/types/w3c-generic-sensor/ts3.2/tsconfig.json new file mode 100644 index 0000000000..c40f91a278 --- /dev/null +++ b/types/w3c-generic-sensor/ts3.2/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../../", + "typeRoots": [ + "../../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "w3c-generic-sensor-tests.ts" + ] +} diff --git a/types/w3c-generic-sensor/ts3.2/tslint.json b/types/w3c-generic-sensor/ts3.2/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/w3c-generic-sensor/ts3.2/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/w3c-generic-sensor/ts3.2/w3c-generic-sensor-tests.ts b/types/w3c-generic-sensor/ts3.2/w3c-generic-sensor-tests.ts new file mode 100644 index 0000000000..84f6891a46 --- /dev/null +++ b/types/w3c-generic-sensor/ts3.2/w3c-generic-sensor-tests.ts @@ -0,0 +1,246 @@ +// Accelerometer: https://www.w3.org/TR/accelerometer/ + +const accelerometer1 = () => { + const sensor = new Accelerometer(); + sensor.start(); + + sensor.onreading = () => { + console.log("Acceleration along X-axis: " + sensor.x); + console.log("Acceleration along Y-axis: " + sensor.y); + console.log("Acceleration along Z-axis: " + sensor.z); + }; + + sensor.onerror = event => console.log(event.error.name, event.error.message); +}; + +// Gyroscope: https://www.w3.org/TR/gyroscope/ + +const gyroscope1 = () => { + const sensor = new Gyroscope(); + sensor.start(); + + sensor.onreading = () => { + console.log("Angular velocity around the X-axis " + sensor.x); + console.log("Angular velocity around the Y-axis " + sensor.y); + console.log("Angular velocity around the Z-axis " + sensor.z); + }; + + sensor.onerror = event => console.log(event.error.name, event.error.message); +}; + +// From Magnetometer spec: https://www.w3.org/TR/magnetometer/ + +const magnetometer1 = () => { + const sensor = new Magnetometer(); + sensor.start(); + + sensor.onreading = () => { + console.log("Magnetic field along the X-axis " + sensor.x); + console.log("Magnetic field along the Y-axis " + sensor.y); + console.log("Magnetic field along the Z-axis " + sensor.z); + }; + + sensor.onerror = event => console.log(event.error.name, event.error.message); +}; + +const magnetometer2 = () => { + const sensor = new Magnetometer(); + sensor.start(); + + sensor.onreading = () => { + if (!sensor.y || !sensor.x) { + return; + } + const heading = Math.atan2(sensor.y, sensor.x) * (180 / Math.PI); + console.log('Heading in degrees: ' + heading); + }; +}; + +const magnetometer3 = () => { + const sensor = new Magnetometer(); + sensor.start(); + + sensor.onreading = async () => { + if (!sensor.y || !sensor.x) { + return; + } + const heading = Math.atan2(sensor.y, sensor.x) * (180 / Math.PI); + + // Get the latitude and longitude, omitted for brevity here. + const latitude = 0; + const longitude = 0; + + // Get the magnetic declination at the given latitude and longitude. + const response = await fetch('https://www.ngdc.noaa.gov/geomag-web/calculators/calculateDeclination' + + `?lat1=${latitude}&lon1=${longitude}&resultFormat=csv`); + const text = await response.text(); + + const declination = parseFloat(text.replace(/^#.*$/gm, '').trim().split(',')[4]); + + // Compensate for the magnetic declination to get the geographic north. + console.log('True heading in degrees: ' + (heading + declination)); + }; +}; + +// From Orientation Sensor spec: https://www.w3.org/TR/orientation-sensor/ + +const orientation1 = () => { + const sensor = new AbsoluteOrientationSensor(); + const mat4 = new Float32Array(16); + sensor.start(); + sensor.onerror = event => console.log(event.error.name, event.error.message); + + sensor.onreading = () => { + sensor.populateMatrix(mat4); + }; +}; + +const orientation2 = () => { + const sensor = new AbsoluteOrientationSensor({ frequency: 60 }); + const mat4 = new Float32Array(16); + sensor.start(); + sensor.onerror = event => console.log(event.error.name, event.error.message); + + function draw() { + window.requestAnimationFrame(draw); + try { + sensor.populateMatrix(mat4); + } catch (err) { + console.log("mat4 has not been updated: " + err); + } + // Drawing... + } + + window.requestAnimationFrame(draw); +}; + +// From Explainer: https://www.w3.org/TR/motion-sensors/ + +const explainer1 = () => { + class LowPassFilterData { + x: number; + y: number; + z: number; + bias: number; + + constructor(reading: Accelerometer | Gyroscope | Magnetometer, bias: number) { + Object.assign(this, { x: reading.x, y: reading.y, z: reading.z }); + this.bias = bias; + } + + update(reading: Accelerometer | Gyroscope | Magnetometer) { + if (!reading.x || !reading.y || !reading.z) { + return; + } + + this.x = this.x * this.bias + reading.x * (1 - this.bias); + this.y = this.y * this.bias + reading.y * (1 - this.bias); + this.z = this.z * this.bias + reading.z * (1 - this.bias); + } + } + + const accl = new Accelerometer({ frequency: 20 }); + + // Isolate gravity with low-pass filter. + const filter = new LowPassFilterData(accl, 0.8); + + accl.onreading = () => { + filter.update(accl); // Pass latest values through filter. + console.log(`Isolated gravity (${filter.x}, ${filter.y}, ${filter.z})`); + }; + + accl.start(); +}; + +const explainer2 = () => { + class HighPassFilterData { + cutoff: number; + timestamp?: number; + x?: number; + y?: number; + z?: number; + + constructor(reading: Accelerometer | Gyroscope | Magnetometer, cutoffFrequency: number) { + this.x = reading.x; + this.y = reading.y; + this.z = reading.z; + this.cutoff = cutoffFrequency; + this.timestamp = reading.timestamp; + } + + update(reading: Accelerometer | Gyroscope | Magnetometer) { + if (!this.timestamp || !this.x || !this.y || !this.z) { + this.x = reading.x; + this.y = reading.y; + this.z = reading.z; + this.timestamp = reading.timestamp; + return; + } + + if (!reading.timestamp || !reading.x || ! reading.y || !reading.z) { + return; + } + + const dt = reading.timestamp - this.timestamp / 1000; + this.timestamp = reading.timestamp; + + const alpha = this.cutoff / (this.cutoff + dt); + this.x = this.x + alpha * (reading.x - this.x); + this.y = this.y + alpha * (reading.y - this.y); + this.z = this.z + alpha * (reading.z - this.z); + } + } + + const gyro = new Gyroscope({ frequency: 20 }); + + // Remove drift with a high pass filter. + const filter = new HighPassFilterData(gyro, 0.8); + + gyro.onreading = () => { + filter.update(gyro); // Pass latest values through filter. + console.log(`Steady gyroscope (${filter.x}, ${filter.y}, ${filter.z})`); + }; + + gyro.start(); +}; + +const explainer3 = () => { + const options = { frequency: 50 }; + + const accl = new Accelerometer(options); + const gyro = new Gyroscope(options); + + let timestamp = 0; + let alpha = 0; + let beta = 0; + let gamma = 0; + const bias = 0.98; + + gyro.onreading = () => { + if (!gyro.timestamp || !gyro.x || !gyro.y || !gyro.z || !accl.x || !accl.y || !accl.z) { + return; + } + + const dt = timestamp ? (gyro.timestamp - timestamp) / 1000 : 0; + timestamp = gyro.timestamp; + + // Treat the acceleration vector as an orientation vector by normalizing it. + // Keep in mind that the if the device is flipped, the vector will just be + // pointing in the other direction, so we have no way to know from the + // accelerometer data which way the device is oriented. + const norm = Math.sqrt(accl.x ** 2 + accl.y ** 2 + accl.z ** 2); + + // As we only can cover half (PI rad) of the full spectrum (2*PI rad) we multiply + // the unit vector with values from [-1, 1] with PI/2, covering [-PI/2, PI/2]. + const scale = Math.PI / 2; + + alpha = alpha + gyro.z * dt; + beta = bias * (beta + gyro.x * dt) + (1.0 - bias) * (accl.x * scale / norm); + gamma = bias * (gamma + gyro.y * dt) + (1.0 - bias) * (accl.y * -scale / norm); + + // Do something with Euler angles (alpha, beta, gamma). + }; + + accl.start(); + gyro.start(); +}; diff --git a/types/w3c-generic-sensor/tsconfig.json b/types/w3c-generic-sensor/tsconfig.json index 4a33837faa..35ab867a63 100644 --- a/types/w3c-generic-sensor/tsconfig.json +++ b/types/w3c-generic-sensor/tsconfig.json @@ -21,4 +21,4 @@ "index.d.ts", "w3c-generic-sensor-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/w3c-screen-orientation/index.d.ts b/types/w3c-screen-orientation/index.d.ts index 74fee2ecb6..6942fa04ad 100644 --- a/types/w3c-screen-orientation/index.d.ts +++ b/types/w3c-screen-orientation/index.d.ts @@ -2,8 +2,9 @@ // Project: https://www.w3.org/TR/screen-orientation/ // Definitions by: Kenneth Rohde Christiansen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3.2 +// TypeScript Version: 2.3 +type OrientationType = "portrait-primary" | "portrait-secondary" | "landscape-primary" | "landscape-secondary"; type ScreenOrientationLockType = "any" | "natural" | "landscape" | "portrait" | "portrait-primary" | "portrait-secondary" | "landscape-primary" | "landscape-secondary"; interface ScreenOrientation extends EventTarget { diff --git a/types/w3c-screen-orientation/package.json b/types/w3c-screen-orientation/package.json new file mode 100644 index 0000000000..aedf75343b --- /dev/null +++ b/types/w3c-screen-orientation/package.json @@ -0,0 +1,8 @@ +{ + "private": true, + "types": "index", + "typesVersions": { + ">=3.1.0-0": { "*": ["ts3.1/*"] }, + ">=3.2.0-0": { "*": ["ts3.2/*"] } + } +} diff --git a/types/w3c-screen-orientation/ts3.1/index.d.ts b/types/w3c-screen-orientation/ts3.1/index.d.ts new file mode 100644 index 0000000000..6d88f98715 --- /dev/null +++ b/types/w3c-screen-orientation/ts3.1/index.d.ts @@ -0,0 +1,13 @@ +type ScreenOrientationLockType = "any" | "natural" | "landscape" | "portrait" | "portrait-primary" | "portrait-secondary" | "landscape-primary" | "landscape-secondary"; + +interface ScreenOrientation extends EventTarget { + lock(orientation: ScreenOrientationLockType): Promise; + unlock(): void; + readonly type: OrientationType; + readonly angle: number; + addEventListener(type: "change", listener: (this: this, ev: Event) => any, useCapture?: boolean): void; +} + +interface Screen { + readonly orientation: ScreenOrientation; +} diff --git a/types/w3c-screen-orientation/ts3.1/tsconfig.json b/types/w3c-screen-orientation/ts3.1/tsconfig.json new file mode 100644 index 0000000000..2786c93736 --- /dev/null +++ b/types/w3c-screen-orientation/ts3.1/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "strictFunctionTypes": true, + "baseUrl": "../../", + "typeRoots": [ + "../../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "w3c-screen-orientation-tests.ts" + ] +} diff --git a/types/w3c-screen-orientation/ts3.1/tslint.json b/types/w3c-screen-orientation/ts3.1/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/w3c-screen-orientation/ts3.1/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/w3c-screen-orientation/ts3.1/w3c-screen-orientation-tests.ts b/types/w3c-screen-orientation/ts3.1/w3c-screen-orientation-tests.ts new file mode 100644 index 0000000000..63963da5ac --- /dev/null +++ b/types/w3c-screen-orientation/ts3.1/w3c-screen-orientation-tests.ts @@ -0,0 +1,36 @@ +// Example 1 (from the spec): +const show = () => { + console.log("Orientation type is " + screen.orientation.type); + console.log("Orientation angle is " + screen.orientation.angle); +}; + +screen.orientation.addEventListener("change", show); +window.onload = show; + +// Example 2 (from the spec): +const start = () => { + document.onfullscreenchange = () => { + screen.orientation.lock('natural').then(startInternal); + }; + document.documentElement.requestFullscreen(); +}; + +// Example 3 (from the spec): +const startInternal = () => {}; + +const start2 = () => { + screen.orientation.lock('landscape-primary').then(startInternal, () => { + alert('To start, rotate your screen to landscape.'); + + const orientationChangeHandler = () => { + if (!screen.orientation.type.startsWith('landscape')) { + return; + } + screen.orientation.removeEventListener('change', orientationChangeHandler); + startInternal(); + }; + + screen.orientation.addEventListener('change', orientationChangeHandler); + }); +}; +window.onload = start2; diff --git a/types/w3c-screen-orientation/ts3.2/index.d.ts b/types/w3c-screen-orientation/ts3.2/index.d.ts new file mode 100644 index 0000000000..6d88f98715 --- /dev/null +++ b/types/w3c-screen-orientation/ts3.2/index.d.ts @@ -0,0 +1,13 @@ +type ScreenOrientationLockType = "any" | "natural" | "landscape" | "portrait" | "portrait-primary" | "portrait-secondary" | "landscape-primary" | "landscape-secondary"; + +interface ScreenOrientation extends EventTarget { + lock(orientation: ScreenOrientationLockType): Promise; + unlock(): void; + readonly type: OrientationType; + readonly angle: number; + addEventListener(type: "change", listener: (this: this, ev: Event) => any, useCapture?: boolean): void; +} + +interface Screen { + readonly orientation: ScreenOrientation; +} diff --git a/types/w3c-screen-orientation/ts3.2/tsconfig.json b/types/w3c-screen-orientation/ts3.2/tsconfig.json new file mode 100644 index 0000000000..2786c93736 --- /dev/null +++ b/types/w3c-screen-orientation/ts3.2/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "strictFunctionTypes": true, + "baseUrl": "../../", + "typeRoots": [ + "../../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "w3c-screen-orientation-tests.ts" + ] +} diff --git a/types/w3c-screen-orientation/ts3.2/tslint.json b/types/w3c-screen-orientation/ts3.2/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/w3c-screen-orientation/ts3.2/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/w3c-screen-orientation/ts3.2/w3c-screen-orientation-tests.ts b/types/w3c-screen-orientation/ts3.2/w3c-screen-orientation-tests.ts new file mode 100644 index 0000000000..63963da5ac --- /dev/null +++ b/types/w3c-screen-orientation/ts3.2/w3c-screen-orientation-tests.ts @@ -0,0 +1,36 @@ +// Example 1 (from the spec): +const show = () => { + console.log("Orientation type is " + screen.orientation.type); + console.log("Orientation angle is " + screen.orientation.angle); +}; + +screen.orientation.addEventListener("change", show); +window.onload = show; + +// Example 2 (from the spec): +const start = () => { + document.onfullscreenchange = () => { + screen.orientation.lock('natural').then(startInternal); + }; + document.documentElement.requestFullscreen(); +}; + +// Example 3 (from the spec): +const startInternal = () => {}; + +const start2 = () => { + screen.orientation.lock('landscape-primary').then(startInternal, () => { + alert('To start, rotate your screen to landscape.'); + + const orientationChangeHandler = () => { + if (!screen.orientation.type.startsWith('landscape')) { + return; + } + screen.orientation.removeEventListener('change', orientationChangeHandler); + startInternal(); + }; + + screen.orientation.addEventListener('change', orientationChangeHandler); + }); +}; +window.onload = start2; diff --git a/types/web-animations-js/index.d.ts b/types/web-animations-js/index.d.ts index 8e3ac25f95..f809b1cd3e 100644 --- a/types/web-animations-js/index.d.ts +++ b/types/web-animations-js/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/web-animations/web-animations-js // Definitions by: Kristian Moerch // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3.2 +// TypeScript Version: 3.0 type AnimationEffectTimingFillMode = "none" | "forwards" | "backwards" | "both" | "auto"; type AnimationEffectTimingPlaybackDirection = "normal" | "reverse" | "alternate" | "alternate-reverse"; @@ -104,6 +104,7 @@ declare class GroupEffect extends KeyframeEffect { } interface Element { animate(effect: AnimationKeyFrame | AnimationKeyFrame[] | null, timing: number | AnimationEffectTiming): Animation; + animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions): Animation; getAnimations(): Animation[]; } interface Document { diff --git a/types/web-animations-js/package.json b/types/web-animations-js/package.json new file mode 100644 index 0000000000..d27d838dc6 --- /dev/null +++ b/types/web-animations-js/package.json @@ -0,0 +1,7 @@ +{ + "private": true, + "types": "index", + "typesVersions": { + ">=3.2.0-0": { "*": ["ts3.2/*"] } + } +} diff --git a/types/web-animations-js/ts3.2/index.d.ts b/types/web-animations-js/ts3.2/index.d.ts new file mode 100644 index 0000000000..f0c0b24517 --- /dev/null +++ b/types/web-animations-js/ts3.2/index.d.ts @@ -0,0 +1,105 @@ +type AnimationEffectTimingFillMode = "none" | "forwards" | "backwards" | "both" | "auto"; +type AnimationEffectTimingPlaybackDirection = "normal" | "reverse" | "alternate" | "alternate-reverse"; + +interface AnimationPlaybackEvent { + target: Animation; + readonly currentTime: number | null; + readonly timelineTime: number | null; + type: string; + bubbles: boolean; + cancelable: boolean; + currentTarget: Animation; + defaultPrevented: boolean; + eventPhase: number; + timeStamp: number; +} + +interface AnimationPlaybackEventInit extends EventInit { + currentTime?: number | null; + timelineTime?: number | null; +} + +declare var AnimationPlaybackEvent: { + prototype: AnimationPlaybackEvent; + new(type: string, eventInitDict?: AnimationPlaybackEventInit): AnimationPlaybackEvent; +}; + +interface AnimationKeyFrame { + easing?: string | string[]; + offset?: number | Array | null; + opacity?: number | number[]; + transform?: string | string[]; + // [key: string]: string | number | [string | number, string | number] | undefined; (duplicate string indexer in TypeScript 2.7+) +} + +interface AnimationTimeline { + readonly currentTime: number | null; + getAnimations(): Animation[]; + play(effect: KeyframeEffect): Animation; +} +interface AnimationEffectTiming { + delay?: number; + direction?: AnimationEffectTimingPlaybackDirection; + duration?: number; + easing?: string; + endDelay?: number; + fill?: AnimationEffectTimingFillMode; + iterationStart?: number; + iterations?: number; + playbackRate?: number; +} + +interface AnimationEffectReadOnly { + readonly timing: number; + getComputedTiming(): ComputedTimingProperties; +} + +interface ComputedTimingProperties { + endTime: number; + activeDuration: number; + localTime: number | null; + progress: number | null; + currentIteration: number | null; +} + +type AnimationEventListener = ((this: Animation, evt: AnimationPlaybackEvent) => any) | null; + +interface Animation extends EventTarget { + currentTime: number | null; + id: string; + oncancel: AnimationEventListener; + onfinish: AnimationEventListener; + readonly playState: AnimationPlayState; + playbackRate: number; + startTime: number | null; + cancel(): void; + finish(): void; + pause(): void; + play(): void; + reverse(): void; + addEventListener(type: "finish" | "cancel", handler: EventListener): void; + removeEventListener(type: "finish" | "cancel", handler: EventListener): void; + effect: AnimationEffect | null; + readonly finished: Promise; + readonly ready: Promise; + timeline: AnimationTimeline | null; +} + +declare var Animation: { + prototype: Animation; + new(effect?: AnimationEffect | null, timeline?: AnimationTimeline | null): Animation; +}; + +declare class SequenceEffect extends KeyframeEffect { + constructor(effects: KeyframeEffect[]); +} +declare class GroupEffect extends KeyframeEffect { + constructor(effects: KeyframeEffect[]); +} +interface Element { + animate(effect: AnimationKeyFrame | AnimationKeyFrame[] | null, timing: number | AnimationEffectTiming): Animation; + getAnimations(): Animation[]; +} +interface Document { + readonly timeline: AnimationTimeline; +} diff --git a/types/web-animations-js/ts3.2/tsconfig.json b/types/web-animations-js/ts3.2/tsconfig.json new file mode 100644 index 0000000000..d78a0d3aaf --- /dev/null +++ b/types/web-animations-js/ts3.2/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es5", + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../../", + "typeRoots": [ + "../../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "web-animations-js-tests.ts" + ] +} diff --git a/types/web-animations-js/ts3.2/tslint.json b/types/web-animations-js/ts3.2/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/web-animations-js/ts3.2/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/web-animations-js/ts3.2/web-animations-js-tests.ts b/types/web-animations-js/ts3.2/web-animations-js-tests.ts new file mode 100644 index 0000000000..aa51fa14d1 --- /dev/null +++ b/types/web-animations-js/ts3.2/web-animations-js-tests.ts @@ -0,0 +1,90 @@ +// From the documentation +function test_doc() { + const elem = document.createElement('div'); + const animation = elem.animate({ + opacity: [0.5, 1], + transform: ['scale(0.5)', 'scale(1)'] + }, { + direction: 'alternate', + duration: 500, + iterations: Infinity + }); +} +// From https://io2015codelabs.appspot.com/codelabs/web-animations-transitions-playbackcontrol +// To test KeyframeEffect, SequenceEffect and GroupEffect +function test_AnimationsApiNext() { + function buildFadeIn(target: HTMLElement) { + const steps = [ + { opacity: 0, transform: 'translate(0, 20em)' }, + { opacity: 1, transform: 'translate(0)' } + ]; + return new KeyframeEffect(target, steps, { + duration: 500, + delay: -1000, + fill: 'backwards', + easing: 'cubic-bezier(0.175, 0.885, 0.32, 1.275)' + }); + } + function buildFadeOut(target: HTMLElement) { + const angle = Math.pow((Math.random() * 16) - 6, 3); + const offset = (Math.random() * 20) - 10; + const transform = `translate(${offset}em, 20em) rotate(${angle}deg) scale(0)`; + const steps = [ + { visibility: 'visible', opacity: 1, transform: 'none' }, + { visibility: 'visible', opacity: 0, transform } + ]; + return new KeyframeEffect(target, steps, { + duration: 1500, + easing: 'ease-in' + }); + } + const effectNode = document.createElement('div'); + effectNode.className = 'circleEffect'; + const bounds = document.documentElement.getBoundingClientRect(); + effectNode.style.left = `${bounds.left + bounds.width / 2}px`; + effectNode.style.top = `${bounds.top + bounds.height / 2}px`; + const header = document.querySelector('header'); + if (header) { + header.appendChild(effectNode); + } + const newColor = `hsl(${Math.round(Math.random() * 255)}, 46%, 42%)`; + effectNode.style.background = newColor; + const scaleSteps = [{ transform: 'scale(0)' }, { transform: 'scale(1)' }]; + const timing: AnimationEffectTiming = { duration: 2500, easing: 'ease-in-out', fill: "backwards" }; + const scaleEffect = new KeyframeEffect(effectNode, scaleSteps, timing); + const fadeEffect = new SequenceEffect([buildFadeOut(effectNode), buildFadeIn(effectNode)]); + const allEffects = [scaleEffect, fadeEffect]; + // Play all animations within this group. + const groupEffect = new GroupEffect(allEffects); + const anim = document.timeline.play(groupEffect); +} + +// https://developer.mozilla.org/en-US/docs/Web/API/Animation/Animation +// http://codepen.io/rachelnabors/pen/eJyWzm/?editors=0010 +function test_whiteRabbit() { + const whiteRabbit = document.getElementById("rabbit"); + if (whiteRabbit) { + const rabbitDownKeyframes = new KeyframeEffect( + whiteRabbit, + [ + { transform: 'translateY(0%)' }, + { transform: 'translateY(100%)' } + ], + { duration: 3000, fill: 'forwards' } + ); + const rabbitDownAnimation = new Animation(rabbitDownKeyframes, document.timeline); + // On tap or click, + whiteRabbit.addEventListener("mousedown", downHeGoes, false); + whiteRabbit.addEventListener("touchstart", downHeGoes, false); + + // Trigger a single-fire animation + function downHeGoes(event: Event) { + // Remove those event listeners + whiteRabbit!.removeEventListener("mousedown", downHeGoes, false); + whiteRabbit!.removeEventListener("touchstart", downHeGoes, false); + + // Play rabbit animation + rabbitDownAnimation.play(); + } + } +} diff --git a/types/web-animations-js/web-animations-js-tests.ts b/types/web-animations-js/web-animations-js-tests.ts index aa51fa14d1..39d0e21faf 100644 --- a/types/web-animations-js/web-animations-js-tests.ts +++ b/types/web-animations-js/web-animations-js-tests.ts @@ -14,10 +14,7 @@ function test_doc() { // To test KeyframeEffect, SequenceEffect and GroupEffect function test_AnimationsApiNext() { function buildFadeIn(target: HTMLElement) { - const steps = [ - { opacity: 0, transform: 'translate(0, 20em)' }, - { opacity: 1, transform: 'translate(0)' } - ]; + const steps: Keyframe[] = []; return new KeyframeEffect(target, steps, { duration: 500, delay: -1000, @@ -29,10 +26,7 @@ function test_AnimationsApiNext() { const angle = Math.pow((Math.random() * 16) - 6, 3); const offset = (Math.random() * 20) - 10; const transform = `translate(${offset}em, 20em) rotate(${angle}deg) scale(0)`; - const steps = [ - { visibility: 'visible', opacity: 1, transform: 'none' }, - { visibility: 'visible', opacity: 0, transform } - ]; + const steps: Keyframe[] = []; return new KeyframeEffect(target, steps, { duration: 1500, easing: 'ease-in' @@ -40,7 +34,8 @@ function test_AnimationsApiNext() { } const effectNode = document.createElement('div'); effectNode.className = 'circleEffect'; - const bounds = document.documentElement.getBoundingClientRect(); + // tslint:disable-next-line:no-unnecessary-type-assertion + const bounds = document.documentElement!.getBoundingClientRect(); effectNode.style.left = `${bounds.left + bounds.width / 2}px`; effectNode.style.top = `${bounds.top + bounds.height / 2}px`; const header = document.querySelector('header'); @@ -49,7 +44,7 @@ function test_AnimationsApiNext() { } const newColor = `hsl(${Math.round(Math.random() * 255)}, 46%, 42%)`; effectNode.style.background = newColor; - const scaleSteps = [{ transform: 'scale(0)' }, { transform: 'scale(1)' }]; + const scaleSteps: Keyframe[] = []; const timing: AnimationEffectTiming = { duration: 2500, easing: 'ease-in-out', fill: "backwards" }; const scaleEffect = new KeyframeEffect(effectNode, scaleSteps, timing); const fadeEffect = new SequenceEffect([buildFadeOut(effectNode), buildFadeIn(effectNode)]); @@ -66,10 +61,7 @@ function test_whiteRabbit() { if (whiteRabbit) { const rabbitDownKeyframes = new KeyframeEffect( whiteRabbit, - [ - { transform: 'translateY(0%)' }, - { transform: 'translateY(100%)' } - ], + [], { duration: 3000, fill: 'forwards' } ); const rabbitDownAnimation = new Animation(rabbitDownKeyframes, document.timeline); From 84b4ada08e4cb70c6222396304852374954677c0 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Fri, 14 Dec 2018 09:44:41 -0800 Subject: [PATCH 608/608] Remove unneeded 2.3 requirement --- types/w3c-screen-orientation/index.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/types/w3c-screen-orientation/index.d.ts b/types/w3c-screen-orientation/index.d.ts index 6942fa04ad..7cac6c33f3 100644 --- a/types/w3c-screen-orientation/index.d.ts +++ b/types/w3c-screen-orientation/index.d.ts @@ -2,7 +2,6 @@ // Project: https://www.w3.org/TR/screen-orientation/ // Definitions by: Kenneth Rohde Christiansen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 type OrientationType = "portrait-primary" | "portrait-secondary" | "landscape-primary" | "landscape-secondary"; type ScreenOrientationLockType = "any" | "natural" | "landscape" | "portrait" | "portrait-primary" | "portrait-secondary" | "landscape-primary" | "landscape-secondary";