File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22/// <reference path="scanner.ts"/>
33
44namespace ts {
5+ const enum SignatureContext {
6+ Yield = 1 << 0 ,
7+ Await = 1 << 1 ,
8+ Type = 1 << 2 ,
9+ RequireCompleteParameterList = 1 << 3 ,
10+ }
11+
512 let NodeConstructor : new ( kind : SyntaxKind , pos : number , end : number ) => Node ;
613 let TokenConstructor : new ( kind : SyntaxKind , pos : number , end : number ) => Node ;
714 let IdentifierConstructor : new ( kind : SyntaxKind , pos : number , end : number ) => Node ;
@@ -2231,7 +2238,7 @@ namespace ts {
22312238 else if ( parseOptional ( returnToken ) ) {
22322239 signature . type = parseTypeOrTypePredicate ( ) ;
22332240 }
2234- else if ( context === SignatureContext . Type ) {
2241+ else if ( context & SignatureContext . Type ) {
22352242 const start = scanner . getTokenPos ( ) ;
22362243 const length = scanner . getTextPos ( ) - start ;
22372244 const backwardToken = parseOptional ( returnToken === SyntaxKind . ColonToken ? SyntaxKind . EqualsGreaterThanToken : SyntaxKind . ColonToken ) ;
Original file line number Diff line number Diff line change @@ -36,13 +36,6 @@ namespace ts {
3636 end : number ;
3737 }
3838
39- export const enum SignatureContext {
40- Yield = 1 << 1 ,
41- Await = 1 << 2 ,
42- Type = 1 << 3 ,
43- RequireCompleteParameterList = 1 << 4 ,
44- }
45-
4639 // token > SyntaxKind.Identifer => token is a keyword
4740 // Also, If you add a new SyntaxKind be sure to keep the `Markers` section at the bottom in sync
4841 export const enum SyntaxKind {
You can’t perform that action at this time.
0 commit comments