Skip to content

Commit

Permalink
Update LKG (#36164)
Browse files Browse the repository at this point in the history
  • Loading branch information
weswigham authored Jan 13, 2020
1 parent 08014bc commit 91ffa1c
Show file tree
Hide file tree
Showing 17 changed files with 102,406 additions and 83,662 deletions.
558 changes: 310 additions & 248 deletions lib/lib.dom.d.ts

Large diffs are not rendered by default.

629 changes: 629 additions & 0 deletions lib/lib.es2020.bigint.d.ts

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions lib/lib.es2020.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,7 @@ and limitations under the License.


/// <reference lib="es2019" />
/// <reference lib="es2020.bigint" />
/// <reference lib="es2020.promise" />
/// <reference lib="es2020.string" />
/// <reference lib="es2020.symbol.wellknown" />
50 changes: 50 additions & 0 deletions lib/lib.es2020.promise.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */



/// <reference no-default-lib="true"/>


interface PromiseFulfilledResult<T> {
status: "fulfilled";
value: T;
}

interface PromiseRejectedResult {
status: "rejected";
reason: any;
}

type PromiseSettledResult<T> = PromiseFulfilledResult<T> | PromiseRejectedResult;

interface PromiseConstructor {
/**
* Creates a Promise that is resolved with an array of results when all
* of the provided Promises resolve or reject.
* @param values An array of Promises.
* @returns A new Promise.
*/
allSettled<T extends readonly unknown[] | readonly [unknown]>(values: T):
Promise<{ -readonly [P in keyof T]: PromiseSettledResult<T[P] extends PromiseLike<infer U> ? U : T[P]> }>;

/**
* Creates a Promise that is resolved with an array of results when all
* of the provided Promises resolve or reject.
* @param values An array of Promises.
* @returns A new Promise.
*/
allSettled<T>(values: Iterable<T>): Promise<PromiseSettledResult<T extends PromiseLike<infer U> ? U : T>[]>;
}
2 changes: 1 addition & 1 deletion lib/lib.es5.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ declare var Function: FunctionConstructor;
/**
* Extracts the type of the 'this' parameter of a function type, or 'unknown' if the function type has no 'this' parameter.
*/
type ThisParameterType<T> = T extends (this: unknown, ...args: any[]) => any ? unknown : T extends (this: infer U, ...args: any[]) => any ? U : unknown;
type ThisParameterType<T> = T extends (this: infer U, ...args: any[]) => any ? U : unknown;

/**
* Removes the 'this' parameter from a function type.
Expand Down
1 change: 0 additions & 1 deletion lib/lib.esnext.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@ and limitations under the License.


/// <reference lib="es2020" />
/// <reference lib="esnext.bigint" />
/// <reference lib="esnext.intl" />
145 changes: 102 additions & 43 deletions lib/lib.webworker.d.ts

Large diffs are not rendered by default.

72 changes: 68 additions & 4 deletions lib/protocol.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ declare namespace ts.server.protocol {
OrganizeImports = "organizeImports",
GetEditsForFileRename = "getEditsForFileRename",
ConfigurePlugin = "configurePlugin",
SelectionRange = "selectionRange"
SelectionRange = "selectionRange",
PrepareCallHierarchy = "prepareCallHierarchy",
ProvideCallHierarchyIncomingCalls = "provideCallHierarchyIncomingCalls",
ProvideCallHierarchyOutgoingCalls = "provideCallHierarchyOutgoingCalls"
}
/**
* A TypeScript Server message
Expand Down Expand Up @@ -957,7 +960,7 @@ declare namespace ts.server.protocol {
* For external projects, some of the project settings are sent together with
* compiler settings.
*/
type ExternalProjectCompilerOptions = CompilerOptions & CompileOnSaveMixin;
type ExternalProjectCompilerOptions = CompilerOptions & CompileOnSaveMixin & WatchOptions;
/**
* Represents a set of changes that happen in project
*/
Expand Down Expand Up @@ -997,6 +1000,31 @@ declare namespace ts.server.protocol {
* The host's additional supported .js file extensions
*/
extraFileExtensions?: FileExtensionInfo[];
watchOptions?: WatchOptions;
}
const enum WatchFileKind {
FixedPollingInterval = "FixedPollingInterval",
PriorityPollingInterval = "PriorityPollingInterval",
DynamicPriorityPolling = "DynamicPriorityPolling",
UseFsEvents = "UseFsEvents",
UseFsEventsOnParentDirectory = "UseFsEventsOnParentDirectory"
}
const enum WatchDirectoryKind {
UseFsEvents = "UseFsEvents",
FixedPollingInterval = "FixedPollingInterval",
DynamicPriorityPolling = "DynamicPriorityPolling"
}
const enum PollingWatchKind {
FixedInterval = "FixedInterval",
PriorityInterval = "PriorityInterval",
DynamicPriority = "DynamicPriority"
}
interface WatchOptions {
watchFile?: WatchFileKind | ts.WatchFileKind;
watchDirectory?: WatchDirectoryKind | ts.WatchDirectoryKind;
fallbackPolling?: PollingWatchKind | ts.PollingWatchKind;
synchronousWatchDirectory?: boolean;
[option: string]: CompilerOptionsValue | undefined;
}
/**
* Configure request; value of command field is "configure". Specifies
Expand Down Expand Up @@ -2269,6 +2297,39 @@ declare namespace ts.server.protocol {
interface NavTreeResponse extends Response {
body?: NavigationTree;
}
interface CallHierarchyItem {
name: string;
kind: ScriptElementKind;
file: string;
span: TextSpan;
selectionSpan: TextSpan;
}
interface CallHierarchyIncomingCall {
from: CallHierarchyItem;
fromSpans: TextSpan[];
}
interface CallHierarchyOutgoingCall {
to: CallHierarchyItem;
fromSpans: TextSpan[];
}
interface PrepareCallHierarchyRequest extends FileLocationRequest {
command: CommandTypes.PrepareCallHierarchy;
}
interface PrepareCallHierarchyResponse extends Response {
readonly body: CallHierarchyItem | CallHierarchyItem[];
}
interface ProvideCallHierarchyIncomingCallsRequest extends FileLocationRequest {
command: CommandTypes.ProvideCallHierarchyIncomingCalls;
}
interface ProvideCallHierarchyIncomingCallsResponse extends Response {
readonly body: CallHierarchyIncomingCall[];
}
interface ProvideCallHierarchyOutgoingCallsRequest extends FileLocationRequest {
command: CommandTypes.ProvideCallHierarchyOutgoingCalls;
}
interface ProvideCallHierarchyOutgoingCallsResponse extends Response {
readonly body: CallHierarchyOutgoingCall[];
}
const enum IndentStyle {
None = "None",
Block = "Block",
Expand Down Expand Up @@ -2565,6 +2626,8 @@ declare namespace ts.server.protocol {
scriptKind?: ScriptKind;
}

export type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike<string[]> | PluginImport[] | ProjectReference[] | null | undefined;

interface JSDocTagInfo {
name: string;
text?: string;
Expand Down Expand Up @@ -2593,12 +2656,13 @@ declare namespace ts.server.protocol {
/** True if it is intended that this reference form a circularity */
circular?: boolean;
}

export type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike<string[]> | PluginImport[] | ProjectReference[] | null | undefined;
}
declare namespace ts {
// these types are empty stubs for types from services and should not be used directly
export type ScriptKind = never;
export type WatchFileKind = never;
export type WatchDirectoryKind = never;
export type PollingWatchKind = never;
export type IndentStyle = never;
export type JsxEmit = never;
export type ModuleKind = never;
Expand Down
Loading

0 comments on commit 91ffa1c

Please sign in to comment.