fix not recognize
This commit is contained in:
parent
6b641fd067
commit
e939d51720
18
README.md
18
README.md
@ -43,29 +43,29 @@ type Color = "red" | "blue" | {
|
||||
Creation of Interface
|
||||
```ts
|
||||
interface Product {
|
||||
each sub of interface is equal to creation of type
|
||||
// each sub of interface is equal to creation of type
|
||||
name: string,
|
||||
|
||||
Question mark(?) mean it optional ,
|
||||
when create product , no need implement "qty"
|
||||
// Question mark(?) mean it optional ,
|
||||
// when create product , no need implement "qty"
|
||||
qty?: number,
|
||||
|
||||
it can be interface
|
||||
// it can be interface
|
||||
creator: User,
|
||||
|
||||
or it can be type
|
||||
// or it can be type
|
||||
color?: Color
|
||||
|
||||
or it can be direct declare like interface
|
||||
// or it can be direct declare like interface
|
||||
price?: { currency: string , value: number },
|
||||
|
||||
or direct declare like type
|
||||
// or direct declare like type
|
||||
level?: 1 | 2 | 3,
|
||||
|
||||
or Array
|
||||
// or Array
|
||||
details: Array<string>
|
||||
|
||||
or Enum
|
||||
// or Enum
|
||||
productType: PRODUCT_TYPE
|
||||
}
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user