TypeScript Version: 2.0.0
npm init
npm install clime --save
tsconfig.json
{
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"noEmitOnError": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"strictNullChecks": true,
"declaration": true,
"sourceMap": true,
"rootDir": "src",
"outDir": "bld"
},
"exclude": [
"node_modules"
]
}
src/cli.ts
#!/usr/bin/env node
import * as Path from 'path';
import { CLI, Shim } from 'clime';
let cli = new CLI('henge', Path.join(__dirname, 'commands'));
// This is okay.
export default cli;
// This gives errors:
// TS4023: Exported variable 'foo' has or is using name 'Promise' from external module "C:/Projects/clime/node_modules/thenfail/bld/promise" but cannot be named.
// TS4023: Exported variable 'foo' has or is using name 'Printable' from external module "C:/Projects/clime/bld/core/object" but cannot be named.
let foo = cli.execute([]);
export { foo };
It seems that if I import Printable from clime, the second error would go away, but I cannot import Promise from the dependency of clime.
Is this expected behavior or a bug?
TypeScript Version: 2.0.0
tsconfig.json
{ "compilerOptions": { "target": "es6", "module": "commonjs", "emitDecoratorMetadata": true, "experimentalDecorators": true, "noEmitOnError": true, "noImplicitAny": true, "noImplicitReturns": true, "noImplicitThis": true, "strictNullChecks": true, "declaration": true, "sourceMap": true, "rootDir": "src", "outDir": "bld" }, "exclude": [ "node_modules" ] }src/cli.ts
It seems that if I import
Printablefromclime, the second error would go away, but I cannot importPromisefrom the dependency ofclime.Is this expected behavior or a bug?