Skip to content

Commit 98652a3

Browse files
Bump version to 4.9.0-beta and LKG.
1 parent 4d91204 commit 98652a3

File tree

56 files changed

+60339
-52613
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+60339
-52613
lines changed

lib/cs/diagnosticMessages.generated.json

Lines changed: 21 additions & 4 deletions
Large diffs are not rendered by default.

lib/de/diagnosticMessages.generated.json

Lines changed: 22 additions & 6 deletions
Large diffs are not rendered by default.

lib/es/diagnosticMessages.generated.json

Lines changed: 22 additions & 6 deletions
Large diffs are not rendered by default.

lib/fr/diagnosticMessages.generated.json

Lines changed: 21 additions & 4 deletions
Large diffs are not rendered by default.

lib/it/diagnosticMessages.generated.json

Lines changed: 21 additions & 4 deletions
Large diffs are not rendered by default.

lib/ja/diagnosticMessages.generated.json

Lines changed: 22 additions & 6 deletions
Large diffs are not rendered by default.

lib/ko/diagnosticMessages.generated.json

Lines changed: 22 additions & 6 deletions
Large diffs are not rendered by default.

lib/lib.dom.d.ts

Lines changed: 199 additions & 58 deletions
Large diffs are not rendered by default.

lib/lib.es2015.promise.d.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ interface PromiseConstructor {
4141
all<T extends readonly unknown[] | []>(values: T): Promise<{ -readonly [P in keyof T]: Awaited<T[P]> }>;
4242

4343
// see: lib.es2015.iterable.d.ts
44-
// all<T>(values: Iterable<T | PromiseLike<T>>): Promise<T[]>;
44+
// all<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>[]>;
4545

4646
/**
4747
* Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
@@ -52,7 +52,7 @@ interface PromiseConstructor {
5252
race<T extends readonly unknown[] | []>(values: T): Promise<Awaited<T[number]>>;
5353

5454
// see: lib.es2015.iterable.d.ts
55-
// race<T>(values: Iterable<T>): Promise<T extends PromiseLike<infer U> ? U : T>;
55+
// race<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>;
5656

5757
/**
5858
* Creates a new rejected promise for the provided reason.
@@ -66,13 +66,18 @@ interface PromiseConstructor {
6666
* @returns A resolved promise.
6767
*/
6868
resolve(): Promise<void>;
69-
7069
/**
7170
* Creates a new resolved promise for the provided value.
7271
* @param value A promise.
7372
* @returns A promise whose internal state matches the provided promise.
7473
*/
75-
resolve<T>(value: T | PromiseLike<T>): Promise<T>;
74+
resolve<T>(value: T): Promise<Awaited<T>>;
75+
/**
76+
* Creates a new resolved promise for the provided value.
77+
* @param value A promise.
78+
* @returns A promise whose internal state matches the provided promise.
79+
*/
80+
resolve<T>(value: T | PromiseLike<T>): Promise<Awaited<T>>;
7681
}
7782

7883
declare var Promise: PromiseConstructor;

lib/lib.es2015.proxy.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ interface ProxyHandler<T extends object> {
9898
* @param target The original object which is being proxied.
9999
* @param p The name or `Symbol` of the property to set.
100100
* @param receiver The object to which the assignment was originally directed.
101-
* @returns `A `Boolean` indicating whether or not the property was set.
101+
* @returns A `Boolean` indicating whether or not the property was set.
102102
*/
103103
set?(target: T, p: string | symbol, newValue: any, receiver: any): boolean;
104104

lib/lib.es2015.reflect.d.ts

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ declare namespace Reflect {
2626
* @param thisArgument The object to be used as the this object.
2727
* @param argumentsList An array of argument values to be passed to the function.
2828
*/
29+
function apply<T, A extends readonly any[], R>(
30+
target: (this: T, ...args: A) => R,
31+
thisArgument: T,
32+
argumentsList: Readonly<A>,
33+
): R;
2934
function apply(target: Function, thisArgument: any, argumentsList: ArrayLike<any>): any;
3035

3136
/**
@@ -35,6 +40,11 @@ declare namespace Reflect {
3540
* @param argumentsList An array of argument values to be passed to the constructor.
3641
* @param newTarget The constructor to be used as the `new.target` object.
3742
*/
43+
function construct<A extends readonly any[], R>(
44+
target: new (...args: A) => R,
45+
argumentsList: Readonly<A>,
46+
newTarget?: new (...args: any) => any,
47+
): R;
3848
function construct(target: Function, argumentsList: ArrayLike<any>, newTarget?: Function): any;
3949

4050
/**
@@ -61,15 +71,22 @@ declare namespace Reflect {
6171
* @param receiver The reference to use as the `this` value in the getter function,
6272
* if `target[propertyKey]` is an accessor property.
6373
*/
64-
function get(target: object, propertyKey: PropertyKey, receiver?: any): any;
74+
function get<T extends object, P extends PropertyKey>(
75+
target: T,
76+
propertyKey: P,
77+
receiver?: unknown,
78+
): P extends keyof T ? T[P] : any;
6579

6680
/**
6781
* Gets the own property descriptor of the specified object.
6882
* An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.
6983
* @param target Object that contains the property.
7084
* @param propertyKey The property name.
7185
*/
72-
function getOwnPropertyDescriptor(target: object, propertyKey: PropertyKey): PropertyDescriptor | undefined;
86+
function getOwnPropertyDescriptor<T extends object, P extends PropertyKey>(
87+
target: T,
88+
propertyKey: P,
89+
): TypedPropertyDescriptor<P extends keyof T ? T[P] : any> | undefined;
7390

7491
/**
7592
* Returns the prototype of an object.
@@ -111,6 +128,12 @@ declare namespace Reflect {
111128
* @param receiver The reference to use as the `this` value in the setter function,
112129
* if `target[propertyKey]` is an accessor property.
113130
*/
131+
function set<T extends object, P extends PropertyKey>(
132+
target: T,
133+
propertyKey: P,
134+
value: P extends keyof T ? T[P] : any,
135+
receiver?: any,
136+
): boolean;
114137
function set(target: object, propertyKey: PropertyKey, value: any, receiver?: any): boolean;
115138

116139
/**

lib/lib.es2019.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ and limitations under the License.
2323
/// <reference lib="es2019.object" />
2424
/// <reference lib="es2019.string" />
2525
/// <reference lib="es2019.symbol" />
26+
/// <reference lib="es2019.intl" />

lib/lib.es2019.intl.d.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
declare namespace Intl {
22+
interface DateTimeFormatPartTypesRegistry {
23+
unknown: any
24+
}
25+
}

lib/lib.es2020.intl.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ declare namespace Intl {
103103
*
104104
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument).
105105
*/
106-
type LocalesArgument = UnicodeBCP47LocaleIdentifier | Locale | (UnicodeBCP47LocaleIdentifier | Locale)[] | undefined;
106+
type LocalesArgument = UnicodeBCP47LocaleIdentifier | Locale | readonly (UnicodeBCP47LocaleIdentifier | Locale)[] | undefined;
107107

108108
/**
109109
* An object with some or all of properties of `options` parameter

lib/lib.es5.d.ts

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,6 @@ interface ObjectConstructor {
214214
*/
215215
seal<T>(o: T): T;
216216

217-
/**
218-
* Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
219-
* @param a Object on which to lock the attributes.
220-
*/
221-
freeze<T>(a: T[]): readonly T[];
222-
223217
/**
224218
* Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
225219
* @param f Object on which to lock the attributes.
@@ -908,7 +902,17 @@ interface Date {
908902
interface DateConstructor {
909903
new(): Date;
910904
new(value: number | string): Date;
911-
new(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date;
905+
/**
906+
* Creates a new Date.
907+
* @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.
908+
* @param monthIndex The month as a number between 0 and 11 (January to December).
909+
* @param date The date as a number between 1 and 31.
910+
* @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour.
911+
* @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes.
912+
* @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds.
913+
* @param ms A number from 0 to 999 that specifies the milliseconds.
914+
*/
915+
new(year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date;
912916
(): string;
913917
readonly prototype: Date;
914918
/**
@@ -919,14 +923,14 @@ interface DateConstructor {
919923
/**
920924
* Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.
921925
* @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.
922-
* @param month The month as a number between 0 and 11 (January to December).
926+
* @param monthIndex The month as a number between 0 and 11 (January to December).
923927
* @param date The date as a number between 1 and 31.
924928
* @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour.
925929
* @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes.
926930
* @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds.
927931
* @param ms A number from 0 to 999 that specifies the milliseconds.
928932
*/
929-
UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;
933+
UTC(year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;
930934
now(): number;
931935
}
932936

@@ -941,6 +945,10 @@ interface RegExpMatchArray extends Array<string> {
941945
* A copy of the search string.
942946
*/
943947
input?: string;
948+
/**
949+
* The first match. This will always be present because `null` will be returned if there are no matches.
950+
*/
951+
0: string;
944952
}
945953

946954
interface RegExpExecArray extends Array<string> {
@@ -952,6 +960,10 @@ interface RegExpExecArray extends Array<string> {
952960
* A copy of the search string.
953961
*/
954962
input: string;
963+
/**
964+
* The first match. This will always be present because `null` will be returned if there are no matches.
965+
*/
966+
0: string;
955967
}
956968

957969
interface RegExp {
@@ -1532,8 +1544,8 @@ interface Promise<T> {
15321544
*/
15331545
type Awaited<T> =
15341546
T extends null | undefined ? T : // special case for `null | undefined` when not in `--strictNullChecks` mode
1535-
T extends object & { then(onfulfilled: infer F): any } ? // `await` only unwraps object types with a callable `then`. Non-object types are not unwrapped
1536-
F extends ((value: infer V, ...args: any) => any) ? // if the argument to `then` is callable, extracts the first argument
1547+
T extends object & { then(onfulfilled: infer F, ...args: infer _): any } ? // `await` only unwraps object types with a callable `then`. Non-object types are not unwrapped
1548+
F extends ((value: infer V, ...args: infer _) => any) ? // if the argument to `then` is callable, extracts the first argument
15371549
Awaited<V> : // recursively unwrap the value
15381550
never : // the argument to `then` was not callable
15391551
T; // non-object or non-thenable

0 commit comments

Comments
 (0)