Skip to content

Commit 857edf2

Browse files
committed
docs(README): correct code
1 parent 3136ab1 commit 857edf2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ export const enum MyEnum {
2121
into object literal like this
2222

2323
```ts
24-
export const MyEnum {
24+
export const MyEnum = {
2525
A: 0,
2626
B: 1,
2727
C: 2,
2828
D: 10,
29-
E: 400
30-
} as const
29+
E: 400,
30+
} as const;
3131
```
3232

3333
and it also strips `const` in declaration file, to make your code compatible with [`--isolatedModules`](https://www.typescriptlang.org/tsconfig#isolatedModules)

0 commit comments

Comments
 (0)