-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
TypeScript Version: 2.9.1 (also tried 3.0.0-dev.20180531)
Search Terms: export default, export default from
Code
A project that was working on 2.8 started failing on 2.9 with this error:
.../dts/Schema.d.ts:6:46 - error TS2507: Type 'typeof import(".../node_modules/shapeshifter/...' is not a constructor function type.
export default class Schema<T = any> extends BaseSchema {
The shapeshifter declaration looks like the following.
export { default } from './Schema';
export { MetadataField, PrimaryKey, Relation } from './types';
The above causes the error, while the following does not cause the error.
import Schema from './Schema';
export { MetadataField, PrimaryKey, Relation } from './types';
export default Schema;
Expected behavior:
It doesn't error and supports export { default } from.
Actual behavior:
It errors.
Related Issues: N/A
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue