Skip to content

Commit 5c577fb

Browse files
MSakamakidimadeveatii
authored andcommitted
syntax error of type alias (labs42io#18)
1 parent 008e817 commit 5c577fb

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,7 +1223,7 @@ interface Config {
12231223

12241224
//...
12251225

1226-
type Shape {
1226+
type Shape = {
12271227
// ...
12281228
}
12291229
```
@@ -1232,11 +1232,11 @@ type Shape {
12321232
12331233
```ts
12341234

1235-
type EmailConfig {
1235+
type EmailConfig = {
12361236
// ...
12371237
}
12381238

1239-
type DbConfig {
1239+
type DbConfig = {
12401240
// ...
12411241
}
12421242

@@ -2396,8 +2396,8 @@ const Artists = ['ACDC', 'Led Zeppelin', 'The Beatles'];
23962396
function eraseDatabase() {}
23972397
function restore_database() {}
23982398

2399-
type animal { /* ... */ }
2400-
type Container { /* ... */ }
2399+
type animal = { /* ... */ }
2400+
type Container = { /* ... */ }
24012401
```
24022402
24032403
**Good:**
@@ -2412,8 +2412,8 @@ const ARTISTS = ['ACDC', 'Led Zeppelin', 'The Beatles'];
24122412
function eraseDatabase() {}
24132413
function restoreDatabase() {}
24142414

2415-
type Animal { /* ... */ }
2416-
type Container { /* ... */ }
2415+
type Animal = { /* ... */ }
2416+
type Container = { /* ... */ }
24172417
```
24182418
24192419
Prefer using `PascalCase` for class, interface, type and namespace names.

0 commit comments

Comments
 (0)