Can't export default from .d.ts file

Viewed 284

I try to use scss as module so I created declaration.d.ts:

declare module '*.scss' {
    const styles: {[key: string]: string};
    export default styles;
}

The IDE tells me A default export can only be used in an ECMAScript-style module and doesn't suggest me scss file in import. Of course, nothing is built. TypeScript (TS) can't find the ./x.scss file. The project is using Babel as compiler and TS is used for typechecking only.

0 Answers
Related