Skip to content

Instantly share code, notes, and snippets.

@blink1073 blink1073/index.js
Created Nov 6, 2017

Embed
What would you like to do?
es6 module with es5 target
import * as path from 'path';
function foo() {
return import('leaflet').then(function (mod) {
console.log(mod);
});
}
;
console.log(path);
console.log(foo);
import * as path from 'path';
function foo(): Promise<void> {
return import('leaflet').then(mod => {
console.log(mod);
});
};
console.log(path);
console.log(foo);
{
"compilerOptions": {
"declaration": true,
"noImplicitAny": true,
"noEmitOnError": true,
"noUnusedLocals": true,
"module": "esnext",
"moduleResolution": "node",
"target": "es5",
"outDir": "./lib",
"lib": ["ES5", "ES2015.Promise", "DOM", "ES2015.Collection"]
},
"include": ["src/*"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.