From 1907cc359bba46fb875f3c19226bdf30d49d37a3 Mon Sep 17 00:00:00 2001 From: Andy Hanson Date: Wed, 2 Nov 2016 13:10:12 -0700 Subject: [PATCH] Convert `highcharts-modules-xxx.d.ts` to `highcharts/modules/xxx.d.ts` and include in tsconfig.json --- highcharts/highcharts-more-tests.ts | 1 + highcharts/highcharts-more.d.ts | 10 +++------- highcharts/modules/boost-tests.ts | 1 + .../boost.d.ts} | 6 ++---- highcharts/modules/exporting-tests.ts | 1 + .../exporting.d.ts} | 6 ++---- .../no-data-to-display-tests.ts} | 3 --- .../no-data-to-display.d.ts} | 0 highcharts/modules/offline-exporting-tests.ts | 1 + .../offline-exporting.d.ts} | 6 ++---- highcharts/tsconfig.json | 13 +++++++++++-- 11 files changed, 24 insertions(+), 24 deletions(-) create mode 100644 highcharts/highcharts-more-tests.ts create mode 100644 highcharts/modules/boost-tests.ts rename highcharts/{highcharts-modules-boost.d.ts => modules/boost.d.ts} (80%) create mode 100644 highcharts/modules/exporting-tests.ts rename highcharts/{highcharts-modules-exporting.d.ts => modules/exporting.d.ts} (79%) rename highcharts/{highcharts-modules-no-data-to-display-tests.ts => modules/no-data-to-display-tests.ts} (65%) rename highcharts/{highcharts-modules-no-data-to-display.d.ts => modules/no-data-to-display.d.ts} (100%) create mode 100644 highcharts/modules/offline-exporting-tests.ts rename highcharts/{highcharts-modules-offline-exporting.d.ts => modules/offline-exporting.d.ts} (77%) diff --git a/highcharts/highcharts-more-tests.ts b/highcharts/highcharts-more-tests.ts new file mode 100644 index 0000000000..e6e5e9af5c --- /dev/null +++ b/highcharts/highcharts-more-tests.ts @@ -0,0 +1 @@ +HighchartsMore(Highcharts); diff --git a/highcharts/highcharts-more.d.ts b/highcharts/highcharts-more.d.ts index b93b286563..dd5950fe35 100644 --- a/highcharts/highcharts-more.d.ts +++ b/highcharts/highcharts-more.d.ts @@ -3,10 +3,6 @@ // Definitions by: Maciej Suchecki // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -import { Static } from "highcharts"; - -declare var HighchartsMore: (H: Static) => Static; - -declare module "highcharts/highcharts-more" { - export = HighchartsMore; -} +declare var HighchartsMore: (H: Highcharts.Static) => Highcharts.Static; +export = HighchartsMore; +export as namespace HighchartsMore; diff --git a/highcharts/modules/boost-tests.ts b/highcharts/modules/boost-tests.ts new file mode 100644 index 0000000000..98202a2129 --- /dev/null +++ b/highcharts/modules/boost-tests.ts @@ -0,0 +1 @@ +HighchartsBoost(Highcharts); diff --git a/highcharts/highcharts-modules-boost.d.ts b/highcharts/modules/boost.d.ts similarity index 80% rename from highcharts/highcharts-modules-boost.d.ts rename to highcharts/modules/boost.d.ts index 5670df007b..9b62dab1c7 100644 --- a/highcharts/highcharts-modules-boost.d.ts +++ b/highcharts/modules/boost.d.ts @@ -6,7 +6,5 @@ import { Static } from "highcharts"; declare var HighchartsBoost: (H: Static) => Static; - -declare module "highcharts/modules/boost" { - export = HighchartsBoost; -} +export = HighchartsBoost; +export as namespace HighchartsBoost; diff --git a/highcharts/modules/exporting-tests.ts b/highcharts/modules/exporting-tests.ts new file mode 100644 index 0000000000..22bced1b24 --- /dev/null +++ b/highcharts/modules/exporting-tests.ts @@ -0,0 +1 @@ +HighchartsExporting(Highcharts); diff --git a/highcharts/highcharts-modules-exporting.d.ts b/highcharts/modules/exporting.d.ts similarity index 79% rename from highcharts/highcharts-modules-exporting.d.ts rename to highcharts/modules/exporting.d.ts index 207e50ab8e..877ef3d0c1 100644 --- a/highcharts/highcharts-modules-exporting.d.ts +++ b/highcharts/modules/exporting.d.ts @@ -6,7 +6,5 @@ import { Static } from "highcharts"; declare var HighchartsExporting: (H: Static) => Static; - -declare module "highcharts/modules/exporting" { - export = HighchartsExporting; -} +export = HighchartsExporting; +export as namespace HighchartsExporting; diff --git a/highcharts/highcharts-modules-no-data-to-display-tests.ts b/highcharts/modules/no-data-to-display-tests.ts similarity index 65% rename from highcharts/highcharts-modules-no-data-to-display-tests.ts rename to highcharts/modules/no-data-to-display-tests.ts index acd06d2f9f..84392c3bf4 100644 --- a/highcharts/highcharts-modules-no-data-to-display-tests.ts +++ b/highcharts/modules/no-data-to-display-tests.ts @@ -1,6 +1,3 @@ -/// -/// - function test_NoDataToDisplay() { var chart = $("#container").highcharts(); var chartHasData = chart.hasData(); diff --git a/highcharts/highcharts-modules-no-data-to-display.d.ts b/highcharts/modules/no-data-to-display.d.ts similarity index 100% rename from highcharts/highcharts-modules-no-data-to-display.d.ts rename to highcharts/modules/no-data-to-display.d.ts diff --git a/highcharts/modules/offline-exporting-tests.ts b/highcharts/modules/offline-exporting-tests.ts new file mode 100644 index 0000000000..22bced1b24 --- /dev/null +++ b/highcharts/modules/offline-exporting-tests.ts @@ -0,0 +1 @@ +HighchartsExporting(Highcharts); diff --git a/highcharts/highcharts-modules-offline-exporting.d.ts b/highcharts/modules/offline-exporting.d.ts similarity index 77% rename from highcharts/highcharts-modules-offline-exporting.d.ts rename to highcharts/modules/offline-exporting.d.ts index ff4de198ea..94ecf53485 100644 --- a/highcharts/highcharts-modules-offline-exporting.d.ts +++ b/highcharts/modules/offline-exporting.d.ts @@ -6,7 +6,5 @@ import { Static } from "highcharts"; declare var HighchartsOfflineExporting: (H: Static) => Static; - -declare module "highcharts/modules/offline-exporting" { - export = HighchartsOfflineExporting; -} +export = HighchartsOfflineExporting; +export as namespace HighchartsOfflineExporting; diff --git a/highcharts/tsconfig.json b/highcharts/tsconfig.json index ac1cda76a2..8082640c3b 100644 --- a/highcharts/tsconfig.json +++ b/highcharts/tsconfig.json @@ -14,9 +14,18 @@ }, "files": [ "index.d.ts", - "highstock.d.ts", "highcharts-tests.ts", - "highcharts-modules-no-data-to-display-tests.ts", + "modules/boost.d.ts", + "modules/boost-tests.ts", + "modules/exporting.d.ts", + "modules/exporting-tests.ts", + "modules/no-data-to-display.d.ts", + "modules/no-data-to-display-tests.ts", + "modules/offline-exporting.d.ts", + "modules/offline-exporting-tests.ts", + "highcharts-more.d.ts", + "highcharts-more-tests.ts", + "highstock.d.ts", "highstock-tests.ts" ] } \ No newline at end of file