From 5c577fb5cce4b7d3fcf043ec42fa5d9e939d7d1a Mon Sep 17 00:00:00 2001 From: "M.Sakamaki" Date: Wed, 13 Feb 2019 19:15:40 +0900 Subject: [PATCH] syntax error of type alias (#18) --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 82e79e9..bfafee3 100644 --- a/README.md +++ b/README.md @@ -1223,7 +1223,7 @@ interface Config { //... -type Shape { +type Shape = { // ... } ``` @@ -1232,11 +1232,11 @@ type Shape { ```ts -type EmailConfig { +type EmailConfig = { // ... } -type DbConfig { +type DbConfig = { // ... } @@ -2396,8 +2396,8 @@ const Artists = ['ACDC', 'Led Zeppelin', 'The Beatles']; function eraseDatabase() {} function restore_database() {} -type animal { /* ... */ } -type Container { /* ... */ } +type animal = { /* ... */ } +type Container = { /* ... */ } ``` **Good:** @@ -2412,8 +2412,8 @@ const ARTISTS = ['ACDC', 'Led Zeppelin', 'The Beatles']; function eraseDatabase() {} function restoreDatabase() {} -type Animal { /* ... */ } -type Container { /* ... */ } +type Animal = { /* ... */ } +type Container = { /* ... */ } ``` Prefer using `PascalCase` for class, interface, type and namespace names.