File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 2
2
/// <reference path="scanner.ts"/>
3
3
4
4
namespace ts {
5
+ const enum SignatureContext {
6
+ Yield = 1 << 0 ,
7
+ Await = 1 << 1 ,
8
+ Type = 1 << 2 ,
9
+ RequireCompleteParameterList = 1 << 3 ,
10
+ }
11
+
5
12
let NodeConstructor : new ( kind : SyntaxKind , pos : number , end : number ) => Node ;
6
13
let TokenConstructor : new ( kind : SyntaxKind , pos : number , end : number ) => Node ;
7
14
let IdentifierConstructor : new ( kind : SyntaxKind , pos : number , end : number ) => Node ;
@@ -2231,7 +2238,7 @@ namespace ts {
2231
2238
else if ( parseOptional ( returnToken ) ) {
2232
2239
signature . type = parseTypeOrTypePredicate ( ) ;
2233
2240
}
2234
- else if ( context === SignatureContext . Type ) {
2241
+ else if ( context & SignatureContext . Type ) {
2235
2242
const start = scanner . getTokenPos ( ) ;
2236
2243
const length = scanner . getTextPos ( ) - start ;
2237
2244
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 {
36
36
end : number ;
37
37
}
38
38
39
- export const enum SignatureContext {
40
- Yield = 1 << 1 ,
41
- Await = 1 << 2 ,
42
- Type = 1 << 3 ,
43
- RequireCompleteParameterList = 1 << 4 ,
44
- }
45
-
46
39
// token > SyntaxKind.Identifer => token is a keyword
47
40
// Also, If you add a new SyntaxKind be sure to keep the `Markers` section at the bottom in sync
48
41
export const enum SyntaxKind {
You can’t perform that action at this time.
0 commit comments