File tree 4 files changed +6
-14
lines changed
tests/baselines/reference/api 4 files changed +6
-14
lines changed Original file line number Diff line number Diff line change @@ -441,7 +441,7 @@ namespace ts {
441
441
},
442
442
getAugmentedPropertiesOfType,
443
443
getRootSymbols,
444
- getContextualType: (nodeIn, contextFlags) => {
444
+ getContextualType: (nodeIn: Expression , contextFlags?: ContextFlags ) => {
445
445
const node = getParseTreeNode(nodeIn, isExpression);
446
446
return node ? getContextualType(node, contextFlags) : undefined;
447
447
},
Original file line number Diff line number Diff line change @@ -3222,7 +3222,8 @@ namespace ts {
3222
3222
getAugmentedPropertiesOfType ( type : Type ) : Symbol [ ] ;
3223
3223
3224
3224
getRootSymbols ( symbol : Symbol ) : ReadonlyArray < Symbol > ;
3225
- getContextualType ( node : Expression , contextFlags ?: ContextFlags ) : Type | undefined ;
3225
+ getContextualType ( node : Expression ) : Type | undefined ;
3226
+ /* @internal */ getContextualType ( node : Expression , contextFlags ?: ContextFlags ) : Type | undefined ; // tslint:disable-line unified-signatures
3226
3227
/* @internal */ getContextualTypeForObjectLiteralElement ( element : ObjectLiteralElementLike ) : Type | undefined ;
3227
3228
/* @internal */ getContextualTypeForArgumentAtIndex ( call : CallLikeExpression , argIndex : number ) : Type | undefined ;
3228
3229
/* @internal */ getContextualTypeForJsxAttribute ( attribute : JsxAttribute | JsxSpreadAttribute ) : Type | undefined ;
@@ -3380,6 +3381,7 @@ namespace ts {
3380
3381
Subtype
3381
3382
}
3382
3383
3384
+ /* @internal */
3383
3385
export const enum ContextFlags {
3384
3386
None = 0 ,
3385
3387
Signature = 1 << 0 , // Obtaining contextual signature
Original file line number Diff line number Diff line change @@ -1995,7 +1995,7 @@ declare namespace ts {
1995
1995
getFullyQualifiedName ( symbol : Symbol ) : string ;
1996
1996
getAugmentedPropertiesOfType ( type : Type ) : Symbol [ ] ;
1997
1997
getRootSymbols ( symbol : Symbol ) : ReadonlyArray < Symbol > ;
1998
- getContextualType ( node : Expression , contextFlags ?: ContextFlags ) : Type | undefined ;
1998
+ getContextualType ( node : Expression ) : Type | undefined ;
1999
1999
/**
2000
2000
* returns unknownSignature in the case of an error.
2001
2001
* returns undefined if the node is not valid.
@@ -2026,11 +2026,6 @@ declare namespace ts {
2026
2026
*/
2027
2027
runWithCancellationToken < T > ( token : CancellationToken , cb : ( checker : TypeChecker ) => T ) : T ;
2028
2028
}
2029
- export enum ContextFlags {
2030
- None = 0 ,
2031
- Signature = 1 ,
2032
- Completion = 2
2033
- }
2034
2029
export enum NodeBuilderFlags {
2035
2030
None = 0 ,
2036
2031
NoTruncation = 1 ,
Original file line number Diff line number Diff line change @@ -1995,7 +1995,7 @@ declare namespace ts {
1995
1995
getFullyQualifiedName ( symbol : Symbol ) : string ;
1996
1996
getAugmentedPropertiesOfType ( type : Type ) : Symbol [ ] ;
1997
1997
getRootSymbols ( symbol : Symbol ) : ReadonlyArray < Symbol > ;
1998
- getContextualType ( node : Expression , contextFlags ?: ContextFlags ) : Type | undefined ;
1998
+ getContextualType ( node : Expression ) : Type | undefined ;
1999
1999
/**
2000
2000
* returns unknownSignature in the case of an error.
2001
2001
* returns undefined if the node is not valid.
@@ -2026,11 +2026,6 @@ declare namespace ts {
2026
2026
*/
2027
2027
runWithCancellationToken < T > ( token : CancellationToken , cb : ( checker : TypeChecker ) => T ) : T ;
2028
2028
}
2029
- export enum ContextFlags {
2030
- None = 0 ,
2031
- Signature = 1 ,
2032
- Completion = 2
2033
- }
2034
2029
export enum NodeBuilderFlags {
2035
2030
None = 0 ,
2036
2031
NoTruncation = 1 ,
You can’t perform that action at this time.
0 commit comments