镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content
This repository was archived by the owner on Dec 6, 2020. It is now read-only.
timothykangPublic archive

About

TypeScript Language Service Plugin for CSS modules.

Resources

Stars

39 stars

Watchers

1 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

Repository files navigation

css-module-types

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.

screenshot

Install

npm install --save-dev css-module-types

Usage

Add declaration to global.d.ts:

declare module '*.css' {
  const exports: { [exportName: string]: string };
  export = exports;
}

Add plugin to tsconfig.json:

{
  "compilerOptions": {
    "plugins": [ { "name": "css-module-types" } ],
    ...
  },
  "include": [
    "global.d.ts",
    ...
  ]
}

About

TypeScript Language Service Plugin for CSS modules.

Resources

Stars

39 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages