TypeScript: Support conditional types syntax (#7404)
Microsoft/TypeScript#21316 and Microsoft/TypeScript#21496
This commit is contained in:
@@ -1875,6 +1875,22 @@ Aliases: `TSTypeElement`
|
||||
|
||||
---
|
||||
|
||||
### tSConditionalType
|
||||
```javascript
|
||||
t.tsConditionalType(checkType, extendsType, trueType, falseType)
|
||||
```
|
||||
|
||||
See also `t.isTSConditionalType(node, opts)` and `t.assertTSConditionalType(node, opts)`.
|
||||
|
||||
Aliases: `TSType`
|
||||
|
||||
- `checkType`: `TSType` (required)
|
||||
- `extendsType`: `TSType` (required)
|
||||
- `trueType`: `TSType` (required)
|
||||
- `falseType`: `TSType` (required)
|
||||
|
||||
---
|
||||
|
||||
### tSConstructSignatureDeclaration
|
||||
```javascript
|
||||
t.tsConstructSignatureDeclaration(typeParameters, parameters, typeAnnotation)
|
||||
@@ -2074,6 +2090,19 @@ Aliases: `TSType`
|
||||
|
||||
---
|
||||
|
||||
### tSInferType
|
||||
```javascript
|
||||
t.tsInferType(typeParameter)
|
||||
```
|
||||
|
||||
See also `t.isTSInferType(node, opts)` and `t.assertTSInferType(node, opts)`.
|
||||
|
||||
Aliases: `TSType`
|
||||
|
||||
- `typeParameter`: `TSType` (required)
|
||||
|
||||
---
|
||||
|
||||
### tSInterfaceBody
|
||||
```javascript
|
||||
t.tsInterfaceBody(body)
|
||||
|
||||
Reference in New Issue
Block a user