Skip to content

Commit

Permalink
Update example in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Obi-Dann committed Nov 17, 2019
1 parent 33ed211 commit 1e25ff8
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,20 @@ Imagine you have a file `~/my-project/src/component/MyComponent/myComponent.scss
Adding the `typings-for-css-modules-loader` will generate a file `~/my-project/src/component/MyComponent/myComponent.scss.d.ts` that has the following content:

```ts
export interface IMyComponentScss {
"some-class": string;
someOtherClass: string;
"some-class-sayWhat": string;
declare namespace MyComponentScssModule {
export interface IMyComponentScss {
"some-class": string;
someOtherClass: string;
"some-class-sayWhat": string;
}
}

export const locals: IExampleCss;
export default locals;
declare const MyComponentScssModule: MyComponentScssModule.IMyComponentScss & {
/** WARNING: Only available when `css-loader` is used without `style-loader` or `mini-css-extract-plugin` */
locals: MyComponentScssModule.IMyComponentScss;
};

export = MyComponentScssModule;
```

```ts
Expand Down

0 comments on commit 1e25ff8

Please sign in to comment.