node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »



Create from css files typescript definition file

It be useful for webpack css-modules with typescript


npm i -g css-dts

How to use

css-dts foo.css

.foo {
    color: red;
.foo-bar {
    color: green;

Will generate foo.css.d.ts

export let foo:''
export let fooBar:''

Now you can get classes names from ts files

import * as style from './foo.css'
export class Foo extends React.Component<{}, {}>{
      return <div className={}>Foo</div>

This module useful as watcher for IDE

webstorm webstorm