Skip to content

Commit 892bc6d

Browse files
committed
Update LKG
1 parent bc8b9ee commit 892bc6d

File tree

8 files changed

+739
-262
lines changed

8 files changed

+739
-262
lines changed

bin/lib.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7355,6 +7355,8 @@ interface HTMLCanvasElement extends HTMLElement {
73557355
* Returns an object that provides methods and properties for drawing and manipulating images and graphics on a canvas element in a document. A context object includes information about colors, line widths, fonts, and other graphic parameters that can be drawn on a canvas.
73567356
* @param contextId The identifier (ID) of the type of canvas to create. Internet Explorer 9 and Internet Explorer 10 support only a 2-D context using canvas.getContext("2d"); IE11 Preview also supports 3-D or WebGL context using canvas.getContext("experimental-webgl");
73577357
*/
7358+
getContext(contextId: "2d"): CanvasRenderingContext2D;
7359+
getContext(contextId: "experimental-webgl"): WebGLRenderingContext;
73587360
getContext(contextId: string, ...args: any[]): CanvasRenderingContext2D | WebGLRenderingContext;
73597361
/**
73607362
* Returns a blob object encoded as a Portable Network Graphics (PNG) format from a canvas image or drawing.

bin/lib.dom.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6185,6 +6185,8 @@ interface HTMLCanvasElement extends HTMLElement {
61856185
* Returns an object that provides methods and properties for drawing and manipulating images and graphics on a canvas element in a document. A context object includes information about colors, line widths, fonts, and other graphic parameters that can be drawn on a canvas.
61866186
* @param contextId The identifier (ID) of the type of canvas to create. Internet Explorer 9 and Internet Explorer 10 support only a 2-D context using canvas.getContext("2d"); IE11 Preview also supports 3-D or WebGL context using canvas.getContext("experimental-webgl");
61876187
*/
6188+
getContext(contextId: "2d"): CanvasRenderingContext2D;
6189+
getContext(contextId: "experimental-webgl"): WebGLRenderingContext;
61886190
getContext(contextId: string, ...args: any[]): CanvasRenderingContext2D | WebGLRenderingContext;
61896191
/**
61906192
* Returns a blob object encoded as a Portable Network Graphics (PNG) format from a canvas image or drawing.

bin/lib.es6.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8700,6 +8700,8 @@ interface HTMLCanvasElement extends HTMLElement {
87008700
* Returns an object that provides methods and properties for drawing and manipulating images and graphics on a canvas element in a document. A context object includes information about colors, line widths, fonts, and other graphic parameters that can be drawn on a canvas.
87018701
* @param contextId The identifier (ID) of the type of canvas to create. Internet Explorer 9 and Internet Explorer 10 support only a 2-D context using canvas.getContext("2d"); IE11 Preview also supports 3-D or WebGL context using canvas.getContext("experimental-webgl");
87028702
*/
8703+
getContext(contextId: "2d"): CanvasRenderingContext2D;
8704+
getContext(contextId: "experimental-webgl"): WebGLRenderingContext;
87038705
getContext(contextId: string, ...args: any[]): CanvasRenderingContext2D | WebGLRenderingContext;
87048706
/**
87058707
* Returns a blob object encoded as a Portable Network Graphics (PNG) format from a canvas image or drawing.

bin/tsserver.js

Lines changed: 169 additions & 72 deletions
Large diffs are not rendered by default.

bin/typescript.d.ts

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1361,8 +1361,16 @@ declare module "typescript" {
13611361
getSyntacticDiagnostics(fileName: string): Diagnostic[];
13621362
getSemanticDiagnostics(fileName: string): Diagnostic[];
13631363
getCompilerOptionsDiagnostics(): Diagnostic[];
1364+
/**
1365+
* @deprecated Use getEncodedSyntacticClassifications instead.
1366+
*/
13641367
getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[];
1368+
/**
1369+
* @deprecated Use getEncodedSemanticClassifications instead.
1370+
*/
13651371
getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[];
1372+
getEncodedSyntacticClassifications(fileName: string, span: TextSpan): Classifications;
1373+
getEncodedSemanticClassifications(fileName: string, span: TextSpan): Classifications;
13661374
getCompletionsAtPosition(fileName: string, position: number): CompletionInfo;
13671375
getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails;
13681376
getQuickInfoAtPosition(fileName: string, position: number): QuickInfo;
@@ -1391,6 +1399,10 @@ declare module "typescript" {
13911399
getSourceFile(fileName: string): SourceFile;
13921400
dispose(): void;
13931401
}
1402+
interface Classifications {
1403+
spans: number[];
1404+
endOfLineState: EndOfLineState;
1405+
}
13941406
interface ClassifiedSpan {
13951407
textSpan: TextSpan;
13961408
classificationType: string;
@@ -1602,7 +1614,7 @@ declare module "typescript" {
16021614
text: string;
16031615
}
16041616
const enum EndOfLineState {
1605-
Start = 0,
1617+
None = 0,
16061618
InMultiLineCommentTrivia = 1,
16071619
InSingleQuoteStringLiteral = 2,
16081620
InDoubleQuoteStringLiteral = 3,
@@ -1648,8 +1660,10 @@ declare module "typescript" {
16481660
* classifications which may be incorrectly categorized will be given
16491661
* back as Identifiers in order to allow the syntactic classifier to
16501662
* subsume the classification.
1663+
* @deprecated Use getLexicalClassifications instead.
16511664
*/
16521665
getClassificationsForLine(text: string, lexState: EndOfLineState, syntacticClassifierAbsent: boolean): ClassificationResult;
1666+
getEncodedLexicalClassifications(text: string, endOfLineState: EndOfLineState, syntacticClassifierAbsent: boolean): Classifications;
16531667
}
16541668
/**
16551669
* The document registry represents a store of SourceFile objects that can be shared between
@@ -1760,7 +1774,27 @@ declare module "typescript" {
17601774
static interfaceName: string;
17611775
static moduleName: string;
17621776
static typeParameterName: string;
1763-
static typeAlias: string;
1777+
static typeAliasName: string;
1778+
static parameterName: string;
1779+
}
1780+
const enum ClassificationType {
1781+
comment = 1,
1782+
identifier = 2,
1783+
keyword = 3,
1784+
numericLiteral = 4,
1785+
operator = 5,
1786+
stringLiteral = 6,
1787+
regularExpressionLiteral = 7,
1788+
whiteSpace = 8,
1789+
text = 9,
1790+
punctuation = 10,
1791+
className = 11,
1792+
enumName = 12,
1793+
interfaceName = 13,
1794+
moduleName = 14,
1795+
typeParameterName = 15,
1796+
typeAliasName = 16,
1797+
parameterName = 17,
17641798
}
17651799
interface DisplayPartsSymbolWriter extends SymbolWriter {
17661800
displayParts(): SymbolDisplayPart[];

0 commit comments

Comments
 (0)