Skip to content

Commit

Permalink
Merge pull request #769 from microsoft/4.2-update
Browse files Browse the repository at this point in the history
4.2 update
  • Loading branch information
DanielRosenwasser committed Feb 23, 2021
2 parents 27c0c0c + 3f8d0e5 commit 70f8ede
Show file tree
Hide file tree
Showing 47 changed files with 98,797 additions and 67,095 deletions.
447 changes: 319 additions & 128 deletions TypeScript.tmLanguage

Large diffs are not rendered by default.

447 changes: 319 additions & 128 deletions TypeScriptReact.tmLanguage

Large diffs are not rendered by default.

65 changes: 46 additions & 19 deletions tsserver/cs/diagnosticMessages.generated.json

Large diffs are not rendered by default.

75 changes: 57 additions & 18 deletions tsserver/de/diagnosticMessages.generated.json

Large diffs are not rendered by default.

1,047 changes: 0 additions & 1,047 deletions tsserver/diagnosticMessages.generated.json

This file was deleted.

81 changes: 60 additions & 21 deletions tsserver/es/diagnosticMessages.generated.json

Large diffs are not rendered by default.

87 changes: 63 additions & 24 deletions tsserver/fr/diagnosticMessages.generated.json

Large diffs are not rendered by default.

85 changes: 62 additions & 23 deletions tsserver/it/diagnosticMessages.generated.json

Large diffs are not rendered by default.

91 changes: 65 additions & 26 deletions tsserver/ja/diagnosticMessages.generated.json

Large diffs are not rendered by default.

65 changes: 46 additions & 19 deletions tsserver/ko/diagnosticMessages.generated.json

Large diffs are not rendered by default.

572 changes: 356 additions & 216 deletions tsserver/lib.dom.d.ts

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions tsserver/lib.dom.iterable.d.ts
Expand Up @@ -129,6 +129,13 @@ interface Headers {
values(): IterableIterator<string>;
}

interface IDBDatabase {
/**
* Returns a new transaction with the given mode ("readonly" or "readwrite") and scope which can be a single object store name or an array of names.
*/
transaction(storeNames: string | Iterable<string>, mode?: IDBTransactionMode): IDBTransaction;
}

interface IDBObjectStore {
/**
* Creates a new index in store with the given name, keyPath and options and returns a new IDBIndex. If the keyPath and options define constraints that cannot be satisfied with the data already in store the upgrade transaction will abort with a "ConstraintError" DOMException.
Expand Down
8 changes: 2 additions & 6 deletions tsserver/lib.es2015.iterable.d.ts
Expand Up @@ -174,7 +174,7 @@ interface Set<T> {
*/
entries(): IterableIterator<[T, T]>;
/**
* Despite its name, returns an iterable of the values in the set,
* Despite its name, returns an iterable of the values in the set.
*/
keys(): IterableIterator<T>;

Expand All @@ -194,7 +194,7 @@ interface ReadonlySet<T> {
entries(): IterableIterator<[T, T]>;

/**
* Despite its name, returns an iterable of the values in the set,
* Despite its name, returns an iterable of the values in the set.
*/
keys(): IterableIterator<T>;

Expand Down Expand Up @@ -242,10 +242,6 @@ interface PromiseConstructor {
race<T>(values: Iterable<T | PromiseLike<T>>): Promise<T>;
}

declare namespace Reflect {
function enumerate(target: object): IterableIterator<any>;
}

interface String {
/** Iterator */
[Symbol.iterator](): IterableIterator<string>;
Expand Down
14 changes: 7 additions & 7 deletions tsserver/lib.es2015.promise.d.ts
Expand Up @@ -30,7 +30,7 @@ interface PromiseConstructor {
* a resolve callback used to resolve the promise with a value or the result of another promise,
* and a reject callback used to reject the promise with a provided reason or error.
*/
new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;
new <T>(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;

/**
* Creates a Promise that is resolved with an array of results when all of the provided Promises
Expand Down Expand Up @@ -133,18 +133,18 @@ interface PromiseConstructor {
*/
reject<T = never>(reason?: any): Promise<T>;

/**
* Creates a new resolved promise.
* @returns A resolved promise.
*/
resolve(): Promise<void>;

/**
* Creates a new resolved promise for the provided value.
* @param value A promise.
* @returns A promise whose internal state matches the provided promise.
*/
resolve<T>(value: T | PromiseLike<T>): Promise<T>;

/**
* Creates a new resolved promise .
* @returns A resolved promise.
*/
resolve(): Promise<void>;
}

declare var Promise: PromiseConstructor;
27 changes: 13 additions & 14 deletions tsserver/lib.es2015.proxy.d.ts
Expand Up @@ -19,20 +19,19 @@ and limitations under the License.


interface ProxyHandler<T extends object> {
getPrototypeOf? (target: T): object | null;
setPrototypeOf? (target: T, v: any): boolean;
isExtensible? (target: T): boolean;
preventExtensions? (target: T): boolean;
getOwnPropertyDescriptor? (target: T, p: PropertyKey): PropertyDescriptor | undefined;
has? (target: T, p: PropertyKey): boolean;
get? (target: T, p: PropertyKey, receiver: any): any;
set? (target: T, p: PropertyKey, value: any, receiver: any): boolean;
deleteProperty? (target: T, p: PropertyKey): boolean;
defineProperty? (target: T, p: PropertyKey, attributes: PropertyDescriptor): boolean;
enumerate? (target: T): PropertyKey[];
ownKeys? (target: T): PropertyKey[];
apply? (target: T, thisArg: any, argArray?: any): any;
construct? (target: T, argArray: any, newTarget?: any): object;
apply?(target: T, thisArg: any, argArray: any[]): any;
construct?(target: T, argArray: any[], newTarget: Function): object;
defineProperty?(target: T, p: string | symbol, attributes: PropertyDescriptor): boolean;
deleteProperty?(target: T, p: string | symbol): boolean;
get?(target: T, p: string | symbol, receiver: any): any;
getOwnPropertyDescriptor?(target: T, p: string | symbol): PropertyDescriptor | undefined;
getPrototypeOf?(target: T): object | null;
has?(target: T, p: string | symbol): boolean;
isExtensible?(target: T): boolean;
ownKeys?(target: T): ArrayLike<string | symbol>;
preventExtensions?(target: T): boolean;
set?(target: T, p: string | symbol, value: any, receiver: any): boolean;
setPrototypeOf?(target: T, v: object | null): boolean;
}

interface ProxyConstructor {
Expand Down
96 changes: 92 additions & 4 deletions tsserver/lib.es2015.reflect.d.ts
Expand Up @@ -19,17 +19,105 @@ and limitations under the License.


declare namespace Reflect {
/**
* Calls the function with the specified object as the this value
* and the elements of specified array as the arguments.
* @param target The function to call.
* @param thisArgument The object to be used as the this object.
* @param argumentsList An array of argument values to be passed to the function.
*/
function apply(target: Function, thisArgument: any, argumentsList: ArrayLike<any>): any;
function construct(target: Function, argumentsList: ArrayLike<any>, newTarget?: any): any;

/**
* Constructs the target with the elements of specified array as the arguments
* and the specified constructor as the `new.target` value.
* @param target The constructor to invoke.
* @param argumentsList An array of argument values to be passed to the constructor.
* @param newTarget The constructor to be used as the `new.target` object.
*/
function construct(target: Function, argumentsList: ArrayLike<any>, newTarget?: Function): any;

/**
* Adds a property to an object, or modifies attributes of an existing property.
* @param target Object on which to add or modify the property. This can be a native JavaScript object
* (that is, a user-defined object or a built in object) or a DOM object.
* @param propertyKey The property name.
* @param attributes Descriptor for the property. It can be for a data property or an accessor property.
*/
function defineProperty(target: object, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean;

/**
* Removes a property from an object, equivalent to `delete target[propertyKey]`,
* except it won't throw if `target[propertyKey]` is non-configurable.
* @param target Object from which to remove the own property.
* @param propertyKey The property name.
*/
function deleteProperty(target: object, propertyKey: PropertyKey): boolean;

/**
* Gets the property of target, equivalent to `target[propertyKey]` when `receiver === target`.
* @param target Object that contains the property on itself or in its prototype chain.
* @param propertyKey The property name.
* @param receiver The reference to use as the `this` value in the getter function,
* if `target[propertyKey]` is an accessor property.
*/
function get(target: object, propertyKey: PropertyKey, receiver?: any): any;

/**
* Gets the own property descriptor of the specified object.
* An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.
* @param target Object that contains the property.
* @param propertyKey The property name.
*/
function getOwnPropertyDescriptor(target: object, propertyKey: PropertyKey): PropertyDescriptor | undefined;
function getPrototypeOf(target: object): object;

/**
* Returns the prototype of an object.
* @param target The object that references the prototype.
*/
function getPrototypeOf(target: object): object | null;

/**
* Equivalent to `propertyKey in target`.
* @param target Object that contains the property on itself or in its prototype chain.
* @param propertyKey Name of the property.
*/
function has(target: object, propertyKey: PropertyKey): boolean;

/**
* Returns a value that indicates whether new properties can be added to an object.
* @param target Object to test.
*/
function isExtensible(target: object): boolean;
function ownKeys(target: object): PropertyKey[];

/**
* Returns the string and symbol keys of the own properties of an object. The own properties of an object
* are those that are defined directly on that object, and are not inherited from the object's prototype.
* @param target Object that contains the own properties.
*/
function ownKeys(target: object): (string | symbol)[];

/**
* Prevents the addition of new properties to an object.
* @param target Object to make non-extensible.
* @return Whether the object has been made non-extensible.
*/
function preventExtensions(target: object): boolean;

/**
* Sets the property of target, equivalent to `target[propertyKey] = value` when `receiver === target`.
* @param target Object that contains the property on itself or in its prototype chain.
* @param propertyKey Name of the property.
* @param receiver The reference to use as the `this` value in the setter function,
* if `target[propertyKey]` is an accessor property.
*/
function set(target: object, propertyKey: PropertyKey, value: any, receiver?: any): boolean;
function setPrototypeOf(target: object, proto: any): boolean;

/**
* Sets the prototype of a specified object o to object proto or null.
* @param target The object to change its prototype.
* @param proto The value of the new prototype or null.
* @return Whether setting the prototype was successful.
*/
function setPrototypeOf(target: object, proto: object | null): boolean;
}
5 changes: 5 additions & 0 deletions tsserver/lib.es2015.symbol.wellknown.d.ts
Expand Up @@ -83,6 +83,11 @@ interface SymbolConstructor {
}

interface Symbol {
/**
* Converts a Symbol object to a symbol.
*/
[Symbol.toPrimitive](hint: string): symbol;

readonly [Symbol.toStringTag]: string;
}

Expand Down
4 changes: 0 additions & 4 deletions tsserver/lib.es2017.sharedmemory.d.ts
Expand Up @@ -27,10 +27,6 @@ interface SharedArrayBuffer {
*/
readonly byteLength: number;

/*
* The SharedArrayBuffer constructor's length property whose value is 1.
*/
length: number;
/**
* Returns a section of an SharedArrayBuffer.
*/
Expand Down
1 change: 1 addition & 0 deletions tsserver/lib.es2020.d.ts
Expand Up @@ -21,6 +21,7 @@ and limitations under the License.
/// <reference lib="es2019" />
/// <reference lib="es2020.bigint" />
/// <reference lib="es2020.promise" />
/// <reference lib="es2020.sharedmemory" />
/// <reference lib="es2020.string" />
/// <reference lib="es2020.symbol.wellknown" />
/// <reference lib="es2020.intl" />
14 changes: 14 additions & 0 deletions tsserver/lib.es2020.intl.d.ts
Expand Up @@ -283,14 +283,28 @@ declare namespace Intl {
};

interface NumberFormatOptions {
compactDisplay?: string;
notation?: string;
signDisplay?: string;
unit?: string;
unitDisplay?: string;
}

interface ResolvedNumberFormatOptions {
compactDisplay?: string;
notation?: string;
signDisplay?: string;
unit?: string;
unitDisplay?: string;
}

interface DateTimeFormatOptions {
dateStyle?: "full" | "long" | "medium" | "short";
timeStyle?: "full" | "long" | "medium" | "short";
calendar?: string;
dayPeriod?: "narrow" | "short" | "long";
numberingSystem?: string;
hourCycle?: "h11" | "h12" | "h23" | "h24";
fractionalSecondDigits?: 0 | 1 | 2 | 3;
}
}
99 changes: 99 additions & 0 deletions tsserver/lib.es2020.sharedmemory.d.ts
@@ -0,0 +1,99 @@
/*! *****************************************************************************
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 Atomics {
/**
* Adds a value to the value at the given position in the array, returning the original value.
* Until this atomic operation completes, any other read or write operation against the array
* will block.
*/
add(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint;

/**
* Stores the bitwise AND of a value with the value at the given position in the array,
* returning the original value. Until this atomic operation completes, any other read or
* write operation against the array will block.
*/
and(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint;

/**
* Replaces the value at the given position in the array if the original value equals the given
* expected value, returning the original value. Until this atomic operation completes, any
* other read or write operation against the array will block.
*/
compareExchange(typedArray: BigInt64Array | BigUint64Array, index: number, expectedValue: bigint, replacementValue: bigint): bigint;

/**
* Replaces the value at the given position in the array, returning the original value. Until
* this atomic operation completes, any other read or write operation against the array will
* block.
*/
exchange(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint;

/**
* Returns the value at the given position in the array. Until this atomic operation completes,
* any other read or write operation against the array will block.
*/
load(typedArray: BigInt64Array | BigUint64Array, index: number): bigint;

/**
* Stores the bitwise OR of a value with the value at the given position in the array,
* returning the original value. Until this atomic operation completes, any other read or write
* operation against the array will block.
*/
or(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint;

/**
* Stores a value at the given position in the array, returning the new value. Until this
* atomic operation completes, any other read or write operation against the array will block.
*/
store(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint;

/**
* Subtracts a value from the value at the given position in the array, returning the original
* value. Until this atomic operation completes, any other read or write operation against the
* array will block.
*/
sub(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint;

/**
* If the value at the given position in the array is equal to the provided value, the current
* agent is put to sleep causing execution to suspend until the timeout expires (returning
* `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns
* `"not-equal"`.
*/
wait(typedArray: BigInt64Array, index: number, value: bigint, timeout?: number): "ok" | "not-equal" | "timed-out";

/**
* Wakes up sleeping agents that are waiting on the given index of the array, returning the
* number of agents that were awoken.
* @param typedArray A shared BigInt64Array.
* @param index The position in the typedArray to wake up on.
* @param count The number of sleeping agents to notify. Defaults to +Infinity.
*/
notify(typedArray: BigInt64Array, index: number, count?: number): number;

/**
* Stores the bitwise XOR of a value with the value at the given position in the array,
* returning the original value. Until this atomic operation completes, any other read or write
* operation against the array will block.
*/
xor(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint;
}

0 comments on commit 70f8ede

Please sign in to comment.