-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Closed
Copy link
Labels
Domain: Declaration EmitThe issue relates to the emission of d.ts filesThe issue relates to the emission of d.ts filesFixedA PR has been merged for this issueA PR has been merged for this issueSuggestionAn idea for TypeScriptAn idea for TypeScript
Milestone
Description
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?
frederickfogerty, GabiGrin, arlair, rolandjitsu, mijay and 145 more
Metadata
Metadata
Assignees
Labels
Domain: Declaration EmitThe issue relates to the emission of d.ts filesThe issue relates to the emission of d.ts filesFixedA PR has been merged for this issueA PR has been merged for this issueSuggestionAn idea for TypeScriptAn idea for TypeScript