From d80421d647d395bd6634f8b0cecb2c3ece09fd32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Mon, 28 Jan 2019 20:45:26 +0100 Subject: [PATCH] add types.ts file --- web/static/globals.d.ts | 3 --- web/static/src/ts/registry.ts | 1 + web/static/src/ts/services/action_manager.ts | 5 +++-- web/static/src/ts/types.ts | 3 +++ 4 files changed, 7 insertions(+), 5 deletions(-) delete mode 100644 web/static/globals.d.ts create mode 100644 web/static/src/ts/types.ts diff --git a/web/static/globals.d.ts b/web/static/globals.d.ts deleted file mode 100644 index 4b658c7f..00000000 --- a/web/static/globals.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -interface Type extends Function { - new (...args: any[]): T; -} diff --git a/web/static/src/ts/registry.ts b/web/static/src/ts/registry.ts index 602d5e76..75e7ca71 100644 --- a/web/static/src/ts/registry.ts +++ b/web/static/src/ts/registry.ts @@ -1,5 +1,6 @@ import { Widget } from "./core/widget"; import { Env } from "./env"; +import { Type } from "./types"; //------------------------------------------------------------------------------ // Types diff --git a/web/static/src/ts/services/action_manager.ts b/web/static/src/ts/services/action_manager.ts index 47fd88eb..5a099ed0 100644 --- a/web/static/src/ts/services/action_manager.ts +++ b/web/static/src/ts/services/action_manager.ts @@ -1,10 +1,11 @@ -import { EventBus, Callback } from "../core/event_bus"; +import { Callback, EventBus } from "../core/event_bus"; import { Widget } from "../core/widget"; import { Env } from "../env"; import { Registry } from "../registry"; +import { Type } from "../types"; import { CRM } from "../widgets/crm"; import { Discuss } from "../widgets/discuss"; -import { Query, IRouter } from "./router"; +import { IRouter, Query } from "./router"; //------------------------------------------------------------------------------ // Types diff --git a/web/static/src/ts/types.ts b/web/static/src/ts/types.ts new file mode 100644 index 00000000..3a5628f4 --- /dev/null +++ b/web/static/src/ts/types.ts @@ -0,0 +1,3 @@ +export interface Type extends Function { + new (...args: any[]): T; +}