Let's say I have foo.ts and app.ts as follows:
foo.ts:
export interface Foo { id: number; label: string; };
app.ts:
import {Foo} from './foo' var myfoo: Foo = { "id": 1, "label": "One" }; console.log(JSON.stringify(myfoo));
After compilation, the execution of 'node app.js' from the command line is executed as expected if I use "module"="commonjs" in my tsconfig.json . For what I would like to do is use my Foo client interface with Angular 2 and server side with node. Uncomfortably, Angular 2 quickstart, which I am modeling on here , wants "module"="system" in tsconfig.json . This configuration causes an error when trying to run 'node app.js' :
System.register([], function(exports_1) { ^ ReferenceError: System is not defined`
I tried following the instructions for using systemjs with node on github , but at this point I just overwrite the keys and can use some help. How can I (a) get my server side app.ts code using systemjs, or in turn, (b) get Angular 2 quick launch using commonjs?
source share