mirror of
https://github.com/labs42io/clean-code-typescript.git
synced 2024-11-23 05:34:04 +00:00
syntax error of type alias (#18)
This commit is contained in:
parent
008e81797a
commit
5c577fb5cc
14
README.md
14
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.
|
||||
|
|
Loading…
Reference in a new issue