diff --git a/systemjs/index.d.ts b/systemjs/index.d.ts index 428e303442..f759ba3f91 100644 --- a/systemjs/index.d.ts +++ b/systemjs/index.d.ts @@ -29,7 +29,7 @@ declare namespace SystemJSLoader { */ type Transpiler = "plugin-traceur" | "plugin-babel" | "plugin-typescript" | "traceur" | "babel" | "typescript" | boolean; - type ConfigMap = PackageList; + type ConfigMap = PackageList>; type ConfigMeta = PackageList; diff --git a/systemjs/systemjs-tests.ts b/systemjs/systemjs-tests.ts index 3c2f8ebadc..fa0ddbedaf 100644 --- a/systemjs/systemjs-tests.ts +++ b/systemjs/systemjs-tests.ts @@ -1,14 +1,12 @@ +import SystemJS = require('systemjs'); - -import System = require('systemjs'); - -System.config({ +SystemJS.config({ baseURL: '/app' }); -System.import('main.js'); +SystemJS.import('main.js'); -System.config({ +SystemJS.config({ // or 'traceur' or 'typescript' transpiler: 'babel', // or traceurOptions or typescriptOptions @@ -18,22 +16,33 @@ System.config({ }); -System.config({ +SystemJS.config({ map: { traceur: 'path/to/traceur.js' } }); -System.transpiler = 'traceur'; +SystemJS.config({ + map: { + 'local/package': { + x: 'vendor/x.js' + }, + 'another/package': { + x: 'vendor/y.js' + } + } +}); + +SystemJS.transpiler = 'traceur'; // loads './app.js' from the current directory -System.import('./app.js').then(function (m) { +SystemJS.import('./app.js').then(function (m) { console.log(m); }); -System.import('lodash').then(function (_) { +SystemJS.import('lodash').then(function (_) { console.log(_); }); -const clonedSystemJS = new System.constructor(); +const clonedSystemJSJS = new SystemJS.constructor();