Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

typescript-css-modules-loader-for-normal-css-loader

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typescript-css-modules-loader-for-normal-css-loader

Generate typescript declaration files (.d.ts) for css modules

  • 1.0.5
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

typescript-css-modules-loader

Loader to generate typescript declaration files (.d.ts) from css modules.

Installation

yarn add typescript-css-modules

npm i typescript-css-modules

Usage with .css files

{
  test: /\.css$/,
  loaders: [
    { loader: "style-loader" },
    { loader: "typescript-css-modules-loader" },
  ],
}

Usage with preprocessors (Sass, Stylus, Less, etc)

If you're using a preprocessor, put "typescript-css-modules-loader" just before your preprocessor loader.

{
  test: /\.styl$/,
  loaders: [
    { loader: "style-loader" },
    { loader: "typescript-css-modules-loader" },
    { loader: "stylus-loader" },
  ],
}

Example

In: styles.styl

.component
  display flex

Out: styles.styl.d.ts

declare const styles: {
  component: () => string;
};

export = styles;

FAQs

Package last updated on 15 Apr 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc