awesome-typescript-loader
awesome-typescript-loader copied to clipboard
Files with only type declarations do not get declaration files generated
Test repo: https://github.com/thejameskyle/test-awesome-ts-loader
If I have a file like this:
export interface a {}
And I run with these options:
{
test: /\.tsx?$/,
loader: 'awesome-typescript-loader',
options: {
declaration: true,
declarationDir: './types',
},
},
It will not create a file.
As soon as I add a value it will though.
export interface a {}
+ export const b = {};
I'm having a similar problem, but can't resolve it by adding an "export const WORKAROUND = 'workaround'". In addition, I need to import the const, and use it somewhere in a .ts file. I've put together a minimal project that shows this: https://github.com/tobiaspatton-s4/atl-interface-test
Having the same issue on 3.4.1
Using regular tsc works fine though.
@s-panferov any pointers as to where to look in the code to fix this?
Another test case: https://github.com/sqwk/declaration-test (Previously for a typescript bug—turns out tsc works fine …)
I also have the same error, awesome-typescript-loader version 5.2.1 doesn't export my files containing only interface declarations :(
Same issue here. Is there any update on this?
The last proper code commit was in Jul 2018, so probably no update on this. Maybe this project is dead?
https://github.com/s-panferov/awesome-typescript-loader/commits/master
For anyone wanting a quick fix until ATL gets updated, ts-loader ended up working fine for me.