TypeScript Language Service Plugin for CSS modules.
Real-time autocompletion and validation of exports. Use alongside your build tool, such as webpack + css-loader or browserify + css-modulesify.
npm install --save-dev css-module-typesAdd declaration to global.d.ts:
declare module '*.css'{constexports: {[exportName: string]: string};export=exports;}Add plugin to tsconfig.json:
{
"compilerOptions": {
"plugins": [ { "name": "css-module-types" } ],
...
},
"include": [
"global.d.ts",
...
]
}
