Skip to content

Instantly share code, notes, and snippets.

@haggen
Last active May 24, 2023 22:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save haggen/5065ca9b76ec6c78d5a0538c36d84d7e to your computer and use it in GitHub Desktop.
Save haggen/5065ca9b76ec6c78d5a0538c36d84d7e to your computer and use it in GitHub Desktop.
TypeScript type for CSS modules. e.g. import styles from "styles.module.css".
/**
* Stylesheet module classes.
*/
declare module "*.module.css" {
const stylesheet: {
[key: string]: string;
};
export = stylesheet;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment