Skip to content

Commit 91ffa1c

Browse files
authored
Update LKG (#36164)
1 parent 08014bc commit 91ffa1c

17 files changed

+102406
-83662
lines changed

lib/lib.dom.d.ts

+310-248
Large diffs are not rendered by default.

lib/lib.es2020.bigint.d.ts

+629
Large diffs are not rendered by default.

lib/lib.es2020.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,7 @@ and limitations under the License.
1919

2020

2121
/// <reference lib="es2019" />
22+
/// <reference lib="es2020.bigint" />
23+
/// <reference lib="es2020.promise" />
2224
/// <reference lib="es2020.string" />
2325
/// <reference lib="es2020.symbol.wellknown" />

lib/lib.es2020.promise.d.ts

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*! *****************************************************************************
2+
Copyright (c) Microsoft Corporation. All rights reserved.
3+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4+
this file except in compliance with the License. You may obtain a copy of the
5+
License at http://www.apache.org/licenses/LICENSE-2.0
6+
7+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10+
MERCHANTABLITY OR NON-INFRINGEMENT.
11+
12+
See the Apache Version 2.0 License for specific language governing permissions
13+
and limitations under the License.
14+
***************************************************************************** */
15+
16+
17+
18+
/// <reference no-default-lib="true"/>
19+
20+
21+
interface PromiseFulfilledResult<T> {
22+
status: "fulfilled";
23+
value: T;
24+
}
25+
26+
interface PromiseRejectedResult {
27+
status: "rejected";
28+
reason: any;
29+
}
30+
31+
type PromiseSettledResult<T> = PromiseFulfilledResult<T> | PromiseRejectedResult;
32+
33+
interface PromiseConstructor {
34+
/**
35+
* Creates a Promise that is resolved with an array of results when all
36+
* of the provided Promises resolve or reject.
37+
* @param values An array of Promises.
38+
* @returns A new Promise.
39+
*/
40+
allSettled<T extends readonly unknown[] | readonly [unknown]>(values: T):
41+
Promise<{ -readonly [P in keyof T]: PromiseSettledResult<T[P] extends PromiseLike<infer U> ? U : T[P]> }>;
42+
43+
/**
44+
* Creates a Promise that is resolved with an array of results when all
45+
* of the provided Promises resolve or reject.
46+
* @param values An array of Promises.
47+
* @returns A new Promise.
48+
*/
49+
allSettled<T>(values: Iterable<T>): Promise<PromiseSettledResult<T extends PromiseLike<infer U> ? U : T>[]>;
50+
}

lib/lib.es5.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ declare var Function: FunctionConstructor;
318318
/**
319319
* Extracts the type of the 'this' parameter of a function type, or 'unknown' if the function type has no 'this' parameter.
320320
*/
321-
type ThisParameterType<T> = T extends (this: unknown, ...args: any[]) => any ? unknown : T extends (this: infer U, ...args: any[]) => any ? U : unknown;
321+
type ThisParameterType<T> = T extends (this: infer U, ...args: any[]) => any ? U : unknown;
322322

323323
/**
324324
* Removes the 'this' parameter from a function type.

lib/lib.esnext.d.ts

-1
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,4 @@ and limitations under the License.
1919

2020

2121
/// <reference lib="es2020" />
22-
/// <reference lib="esnext.bigint" />
2322
/// <reference lib="esnext.intl" />

lib/lib.webworker.d.ts

+102-43
Large diffs are not rendered by default.

lib/protocol.d.ts

+68-4
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,10 @@ declare namespace ts.server.protocol {
6464
OrganizeImports = "organizeImports",
6565
GetEditsForFileRename = "getEditsForFileRename",
6666
ConfigurePlugin = "configurePlugin",
67-
SelectionRange = "selectionRange"
67+
SelectionRange = "selectionRange",
68+
PrepareCallHierarchy = "prepareCallHierarchy",
69+
ProvideCallHierarchyIncomingCalls = "provideCallHierarchyIncomingCalls",
70+
ProvideCallHierarchyOutgoingCalls = "provideCallHierarchyOutgoingCalls"
6871
}
6972
/**
7073
* A TypeScript Server message
@@ -957,7 +960,7 @@ declare namespace ts.server.protocol {
957960
* For external projects, some of the project settings are sent together with
958961
* compiler settings.
959962
*/
960-
type ExternalProjectCompilerOptions = CompilerOptions & CompileOnSaveMixin;
963+
type ExternalProjectCompilerOptions = CompilerOptions & CompileOnSaveMixin & WatchOptions;
961964
/**
962965
* Represents a set of changes that happen in project
963966
*/
@@ -997,6 +1000,31 @@ declare namespace ts.server.protocol {
9971000
* The host's additional supported .js file extensions
9981001
*/
9991002
extraFileExtensions?: FileExtensionInfo[];
1003+
watchOptions?: WatchOptions;
1004+
}
1005+
const enum WatchFileKind {
1006+
FixedPollingInterval = "FixedPollingInterval",
1007+
PriorityPollingInterval = "PriorityPollingInterval",
1008+
DynamicPriorityPolling = "DynamicPriorityPolling",
1009+
UseFsEvents = "UseFsEvents",
1010+
UseFsEventsOnParentDirectory = "UseFsEventsOnParentDirectory"
1011+
}
1012+
const enum WatchDirectoryKind {
1013+
UseFsEvents = "UseFsEvents",
1014+
FixedPollingInterval = "FixedPollingInterval",
1015+
DynamicPriorityPolling = "DynamicPriorityPolling"
1016+
}
1017+
const enum PollingWatchKind {
1018+
FixedInterval = "FixedInterval",
1019+
PriorityInterval = "PriorityInterval",
1020+
DynamicPriority = "DynamicPriority"
1021+
}
1022+
interface WatchOptions {
1023+
watchFile?: WatchFileKind | ts.WatchFileKind;
1024+
watchDirectory?: WatchDirectoryKind | ts.WatchDirectoryKind;
1025+
fallbackPolling?: PollingWatchKind | ts.PollingWatchKind;
1026+
synchronousWatchDirectory?: boolean;
1027+
[option: string]: CompilerOptionsValue | undefined;
10001028
}
10011029
/**
10021030
* Configure request; value of command field is "configure". Specifies
@@ -2269,6 +2297,39 @@ declare namespace ts.server.protocol {
22692297
interface NavTreeResponse extends Response {
22702298
body?: NavigationTree;
22712299
}
2300+
interface CallHierarchyItem {
2301+
name: string;
2302+
kind: ScriptElementKind;
2303+
file: string;
2304+
span: TextSpan;
2305+
selectionSpan: TextSpan;
2306+
}
2307+
interface CallHierarchyIncomingCall {
2308+
from: CallHierarchyItem;
2309+
fromSpans: TextSpan[];
2310+
}
2311+
interface CallHierarchyOutgoingCall {
2312+
to: CallHierarchyItem;
2313+
fromSpans: TextSpan[];
2314+
}
2315+
interface PrepareCallHierarchyRequest extends FileLocationRequest {
2316+
command: CommandTypes.PrepareCallHierarchy;
2317+
}
2318+
interface PrepareCallHierarchyResponse extends Response {
2319+
readonly body: CallHierarchyItem | CallHierarchyItem[];
2320+
}
2321+
interface ProvideCallHierarchyIncomingCallsRequest extends FileLocationRequest {
2322+
command: CommandTypes.ProvideCallHierarchyIncomingCalls;
2323+
}
2324+
interface ProvideCallHierarchyIncomingCallsResponse extends Response {
2325+
readonly body: CallHierarchyIncomingCall[];
2326+
}
2327+
interface ProvideCallHierarchyOutgoingCallsRequest extends FileLocationRequest {
2328+
command: CommandTypes.ProvideCallHierarchyOutgoingCalls;
2329+
}
2330+
interface ProvideCallHierarchyOutgoingCallsResponse extends Response {
2331+
readonly body: CallHierarchyOutgoingCall[];
2332+
}
22722333
const enum IndentStyle {
22732334
None = "None",
22742335
Block = "Block",
@@ -2565,6 +2626,8 @@ declare namespace ts.server.protocol {
25652626
scriptKind?: ScriptKind;
25662627
}
25672628

2629+
export type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike<string[]> | PluginImport[] | ProjectReference[] | null | undefined;
2630+
25682631
interface JSDocTagInfo {
25692632
name: string;
25702633
text?: string;
@@ -2593,12 +2656,13 @@ declare namespace ts.server.protocol {
25932656
/** True if it is intended that this reference form a circularity */
25942657
circular?: boolean;
25952658
}
2596-
2597-
export type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike<string[]> | PluginImport[] | ProjectReference[] | null | undefined;
25982659
}
25992660
declare namespace ts {
26002661
// these types are empty stubs for types from services and should not be used directly
26012662
export type ScriptKind = never;
2663+
export type WatchFileKind = never;
2664+
export type WatchDirectoryKind = never;
2665+
export type PollingWatchKind = never;
26022666
export type IndentStyle = never;
26032667
export type JsxEmit = never;
26042668
export type ModuleKind = never;

0 commit comments

Comments
 (0)