postcss / postcss-nested

PostCSS plugin to unwrap nested rules like how Sass does it.
MIT License
1.15k stars 66 forks source link

fix: typescript definition improvements #89

Closed AviVahl closed 4 years ago

AviVahl commented 4 years ago

Updated types and jsdocs from @types/postcss-nested, which is no longer needed.

The definition now correctly exports the plugin as a commonjs export, which matches the library's runtime.

This allows typescript users who target module: commonjs to use import nested = require('postcss-nested);`

It also allows people who don't have esModuleInterop turned on to import the plugin as a namespace and use it.

Most importantly, the postcss.Plugin type is now being exported, which allows the library to be used both with postcss([nested()]) and postcss([nested]). This matches the runtime behavior.

ai commented 4 years ago

Thanks. Released in 4.2.1