Skip to content

Default export doesn't work with project references #26669

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ikokostya opened this issue Aug 24, 2018 · 0 comments
Closed

Default export doesn't work with project references #26669

ikokostya opened this issue Aug 24, 2018 · 0 comments
Assignees
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@ikokostya
Copy link
Contributor

ikokostya commented Aug 24, 2018

TypeScript Version: 3.0, 3.1.0-dev.20180824

Search Terms:

Project References, default export

Code

Repository: https://github.com/ikokostya/ts-proj-ref-bug

Project structure:

foo/
   test.ts
   tsconfig.json
bar/
   test.ts
   tsconfig.json
// foo/test.ts

interface Foo {
    x: number;
}

export default Foo;
// foo/tsconfig.json 
{
    "compilerOptions": {
        "composite": true,
        "outDir": "../out/foo"
    },
    "include": [
        "*.ts"
    ]
}
// bar/test.ts

import Foo from '../foo/test';
// bar/tsconfig.json 
{
    "compilerOptions": {
        "composite": true,
        "outDir": "../out/bar"
    },
    "include": [
        "*.ts"
    ],
    "references": [
        {"path": "../foo"}
    ]
}

Expected behavior:

No errors.

Actual behavior:

Compile error:

out/foo/test.d.ts:1:16 - error TS2304: Cannot find name 'Foo'.

1 export default Foo;
                 ~~~

Playground Link:

Related Issues: #25600

@RyanCavanaugh RyanCavanaugh added the Bug A bug in TypeScript label Aug 24, 2018
@RyanCavanaugh RyanCavanaugh added this to the TypeScript 3.1 milestone Aug 24, 2018
sheetalkamat added a commit that referenced this issue Aug 29, 2018
…declaration flag is not set explicitly in options
sheetalkamat added a commit that referenced this issue Aug 29, 2018
@sheetalkamat sheetalkamat added the Fixed A PR has been merged for this issue label Aug 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

3 participants