mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 01:58:53 +01:00
Fixes #94136
This commit is contained in:
@@ -2420,7 +2420,7 @@ export class SemanticTokensLegend {
|
||||
public readonly tokenTypes: string[];
|
||||
public readonly tokenModifiers: string[];
|
||||
|
||||
constructor(tokenTypes: string[], tokenModifiers: string[]) {
|
||||
constructor(tokenTypes: string[], tokenModifiers: string[] = []) {
|
||||
this.tokenTypes = tokenTypes;
|
||||
this.tokenModifiers = tokenModifiers;
|
||||
}
|
||||
@@ -2461,10 +2461,13 @@ export class SemanticTokensBuilder {
|
||||
}
|
||||
}
|
||||
|
||||
public push(line: number, char: number, length: number, tokenType: number, tokenModifiers: number): void;
|
||||
public push(line: number, char: number, length: number, tokenType: number, tokenModifiers?: number): void;
|
||||
public push(range: Range, tokenType: string, tokenModifiers?: string[]): void;
|
||||
public push(arg0: any, arg1: any, arg2: any, arg3?: any, arg4?: any): void {
|
||||
if (typeof arg0 === 'number' && typeof arg1 === 'number' && typeof arg2 === 'number' && typeof arg3 === 'number' && typeof arg4 === 'number') {
|
||||
if (typeof arg0 === 'number' && typeof arg1 === 'number' && typeof arg2 === 'number' && typeof arg3 === 'number' && (typeof arg4 === 'number' || typeof arg4 === 'undefined')) {
|
||||
if (typeof arg4 === 'undefined') {
|
||||
arg4 = 0;
|
||||
}
|
||||
// 1st overload
|
||||
return this._pushEncoded(arg0, arg1, arg2, arg3, arg4);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user