Skip to content

Instantly share code, notes, and snippets.

@phatnguyenuit
Created January 29, 2022 08:56
Show Gist options
  • Save phatnguyenuit/ee91574d2e1943ee05823e875a04ccff to your computer and use it in GitHub Desktop.
Save phatnguyenuit/ee91574d2e1943ee05823e875a04ccff to your computer and use it in GitHub Desktop.
How to build a React library with TypeScript - my-react-package src/global.d.ts
declare module '*.module.css' {
const classes: { readonly [key: string]: string };
export default classes;
}
declare module '*.module.scss' {
const classes: { readonly [key: string]: string };
export default classes;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment