Closed
Description
I've successfully been using SystemJS and TypeScript for a while now. I've been about to use the CommonJS syntax to easily import other TS modules, as well as other resources:
var OtherModule = require("./othermodule");
var Html = <string>require("./template.html!text");
require("./template.css!");
This is made possible by simply declaring the following function:
declare function require(name: string): any;
I'm now trying to do the same with the new ES6 syntax:
import { OtherModule } from "./othermodule"; // Works
import "./template.css!"; // Works
import Html from require("./template.html!text"); // Nope - 'Cannot find external module'
Of course I can do the same as before and declare and use 'require', but it'd be nice to keep it consistent. Perhaps assume that if an exclamation mark is in the path, then don't assume it's a TypeScript import?