From 83af898254689400de8fb6495c34119ae57ec3fe Mon Sep 17 00:00:00 2001 From: Nathan Walker Date: Thu, 23 Jul 2015 10:45:23 -0700 Subject: [PATCH] systemjs: type definitions for System universal dynamic module loader https://github.com/systemjs/systemjs/issues/321 --- systemjs/systemjs-tests.ts | 12 ++++++++++++ systemjs/systemjs.d.ts | 21 +++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 systemjs/systemjs-tests.ts create mode 100644 systemjs/systemjs.d.ts diff --git a/systemjs/systemjs-tests.ts b/systemjs/systemjs-tests.ts new file mode 100644 index 000000000..689543849 --- /dev/null +++ b/systemjs/systemjs-tests.ts @@ -0,0 +1,12 @@ +/// + +import System = require('systemjs'); + +System.config({ + baseURL: '/', + paths: {'*': '*.js?v=0.18.4'} +}); + +System.import('app') + .catch(e => console.error(e, + 'There was an error loading.')); \ No newline at end of file diff --git a/systemjs/systemjs.d.ts b/systemjs/systemjs.d.ts new file mode 100644 index 000000000..c63a79158 --- /dev/null +++ b/systemjs/systemjs.d.ts @@ -0,0 +1,21 @@ +// Type definitions for System.js 0.18.4 +// Project: https://github.com/systemjs/systemjs +// Definitions by: Ludovic HENIN , Nathan Walker +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +interface System { + import(name: string): any; + defined: any; + amdDefine: () => void; + amdRequire: () => void; + baseURL: string; + paths: { [key: string]: string }; + meta: { [key: string]: Object }; + config: any; +} + +declare var System: System; + +declare module "systemjs" { + export = System; +} \ No newline at end of file