mirror of
https://github.com/denoland/deno.git
synced 2024-12-23 15:49:44 -05:00
feat: TypeScript 5.3 (#21480)
https://github.com/denoland/TypeScript/pull/9
This commit is contained in:
parent
a931a47511
commit
68d356eed9
46 changed files with 24822 additions and 6431 deletions
|
@ -428,7 +428,7 @@ fn main() {
|
|||
);
|
||||
|
||||
let ts_version = ts::version();
|
||||
debug_assert_eq!(ts_version, "5.2.2"); // bump this assertion when it changes
|
||||
debug_assert_eq!(ts_version, "5.3.3"); // bump this assertion when it changes
|
||||
println!("cargo:rustc-env=TS_VERSION={}", ts_version);
|
||||
println!("cargo:rerun-if-env-changed=TS_VERSION");
|
||||
|
||||
|
|
|
@ -9109,11 +9109,11 @@ fn lsp_workspace_symbol() {
|
|||
"uri": "deno:/asset/lib.decorators.d.ts",
|
||||
"range": {
|
||||
"start": {
|
||||
"line": 346,
|
||||
"line": 343,
|
||||
"character": 0,
|
||||
},
|
||||
"end": {
|
||||
"line": 388,
|
||||
"line": 385,
|
||||
"character": 1,
|
||||
},
|
||||
},
|
||||
|
|
|
@ -6,5 +6,5 @@ Deno.test(function version() {
|
|||
const pattern = /^\d+\.\d+\.\d+/;
|
||||
assert(pattern.test(Deno.version.deno));
|
||||
assert(pattern.test(Deno.version.v8));
|
||||
assertEquals(Deno.version.typescript, "5.2.2");
|
||||
assertEquals(Deno.version.typescript, "5.3.3");
|
||||
});
|
||||
|
|
25552
cli/tsc/00_typescript.js
vendored
25552
cli/tsc/00_typescript.js
vendored
File diff suppressed because one or more lines are too long
|
@ -226,6 +226,8 @@ delete Object.prototype.__proto__;
|
|||
impliedNodeFormat: isCjsCache.has(fileName)
|
||||
? ts.ModuleKind.CommonJS
|
||||
: ts.ModuleKind.ESNext,
|
||||
// in the lsp we want to be able to show documentation
|
||||
jsDocParsingMode: ts.JSDocParsingMode.ParseAll,
|
||||
},
|
||||
version,
|
||||
true,
|
||||
|
@ -537,11 +539,12 @@ delete Object.prototype.__proto__;
|
|||
_onError,
|
||||
_shouldCreateNewSourceFile,
|
||||
) {
|
||||
const createOptions = getCreateSourceFileOptions(languageVersion);
|
||||
if (logDebug) {
|
||||
debug(
|
||||
`host.getSourceFile("${specifier}", ${
|
||||
ts.ScriptTarget[createOptions.languageVersion]
|
||||
ts.ScriptTarget[
|
||||
getCreateSourceFileOptions(languageVersion).languageVersion
|
||||
]
|
||||
})`,
|
||||
);
|
||||
}
|
||||
|
@ -568,10 +571,12 @@ delete Object.prototype.__proto__;
|
|||
specifier,
|
||||
data,
|
||||
{
|
||||
...createOptions,
|
||||
...getCreateSourceFileOptions(languageVersion),
|
||||
impliedNodeFormat: isCjsCache.has(specifier)
|
||||
? ts.ModuleKind.CommonJS
|
||||
: ts.ModuleKind.ESNext,
|
||||
// no need to parse docs for `deno check`
|
||||
jsDocParsingMode: ts.JSDocParsingMode.ParseForTypeErrors,
|
||||
},
|
||||
false,
|
||||
scriptKind,
|
||||
|
|
9
cli/tsc/dts/lib.decorators.d.ts
vendored
9
cli/tsc/dts/lib.decorators.d.ts
vendored
|
@ -24,21 +24,18 @@ type ClassMemberDecoratorContext =
|
|||
| ClassGetterDecoratorContext
|
||||
| ClassSetterDecoratorContext
|
||||
| ClassFieldDecoratorContext
|
||||
| ClassAccessorDecoratorContext
|
||||
;
|
||||
| ClassAccessorDecoratorContext;
|
||||
|
||||
/**
|
||||
* The decorator context types provided to any decorator.
|
||||
*/
|
||||
type DecoratorContext =
|
||||
| ClassDecoratorContext
|
||||
| ClassMemberDecoratorContext
|
||||
;
|
||||
| ClassMemberDecoratorContext;
|
||||
|
||||
type DecoratorMetadataObject = Record<PropertyKey, unknown> & object;
|
||||
|
||||
type DecoratorMetadata =
|
||||
typeof globalThis extends { Symbol: { readonly metadata: symbol } } ? DecoratorMetadataObject : DecoratorMetadataObject | undefined;
|
||||
type DecoratorMetadata = typeof globalThis extends { Symbol: { readonly metadata: symbol; }; } ? DecoratorMetadataObject : DecoratorMetadataObject | undefined;
|
||||
|
||||
/**
|
||||
* Context provided to a class decorator.
|
||||
|
|
8
cli/tsc/dts/lib.dom.d.ts
vendored
8
cli/tsc/dts/lib.dom.d.ts
vendored
|
@ -1436,6 +1436,7 @@ interface RTCInboundRtpStreamStats extends RTCReceivedRtpStreamStats {
|
|||
keyFramesDecoded?: number;
|
||||
kind: string;
|
||||
lastPacketReceivedTimestamp?: DOMHighResTimeStamp;
|
||||
mid?: string;
|
||||
nackCount?: number;
|
||||
packetsDiscarded?: number;
|
||||
pliCount?: number;
|
||||
|
@ -1450,6 +1451,7 @@ interface RTCInboundRtpStreamStats extends RTCReceivedRtpStreamStats {
|
|||
totalSamplesDuration?: number;
|
||||
totalSamplesReceived?: number;
|
||||
totalSquaredInterFrameDelay?: number;
|
||||
trackIdentifier: string;
|
||||
}
|
||||
|
||||
interface RTCLocalSessionDescriptionInit {
|
||||
|
@ -8209,7 +8211,7 @@ interface EventTarget {
|
|||
*/
|
||||
addEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): void;
|
||||
/**
|
||||
* Dispatches a synthetic event to event target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
|
||||
* Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
|
||||
*
|
||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
|
||||
*/
|
||||
|
@ -21844,7 +21846,9 @@ interface SubtleCrypto {
|
|||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/exportKey) */
|
||||
exportKey(format: "jwk", key: CryptoKey): Promise<JsonWebKey>;
|
||||
exportKey(format: Exclude<KeyFormat, "jwk">, key: CryptoKey): Promise<ArrayBuffer>;
|
||||
exportKey(format: KeyFormat, key: CryptoKey): Promise<ArrayBuffer | JsonWebKey>;
|
||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey) */
|
||||
generateKey(algorithm: "Ed25519", extractable: boolean, keyUsages: ReadonlyArray<"sign" | "verify">): Promise<CryptoKeyPair>;
|
||||
generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKeyPair>;
|
||||
generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
|
||||
generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair | CryptoKey>;
|
||||
|
@ -27428,7 +27432,7 @@ declare function scrollTo(x: number, y: number): void;
|
|||
declare function stop(): void;
|
||||
declare function toString(): string;
|
||||
/**
|
||||
* Dispatches a synthetic event to event target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
|
||||
* Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
|
||||
*
|
||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
|
||||
*/
|
||||
|
|
3
cli/tsc/dts/lib.es2015.collection.d.ts
vendored
3
cli/tsc/dts/lib.es2015.collection.d.ts
vendored
|
@ -17,7 +17,6 @@ and limitations under the License.
|
|||
/// <reference no-default-lib="true"/>
|
||||
|
||||
interface Map<K, V> {
|
||||
|
||||
clear(): void;
|
||||
/**
|
||||
* @returns true if an element in the Map existed and has been removed, or false if the element does not exist.
|
||||
|
@ -47,7 +46,7 @@ interface Map<K, V> {
|
|||
}
|
||||
|
||||
interface MapConstructor {
|
||||
new(): Map<any, any>;
|
||||
new (): Map<any, any>;
|
||||
new <K, V>(entries?: readonly (readonly [K, V])[] | null): Map<K, V>;
|
||||
readonly prototype: Map<any, any>;
|
||||
}
|
||||
|
|
2
cli/tsc/dts/lib.es2015.core.d.ts
vendored
2
cli/tsc/dts/lib.es2015.core.d.ts
vendored
|
@ -553,5 +553,5 @@ interface StringConstructor {
|
|||
* @param template A well-formed template string call site representation.
|
||||
* @param substitutions A set of substitution values.
|
||||
*/
|
||||
raw(template: { raw: readonly string[] | ArrayLike<string>}, ...substitutions: any[]): string;
|
||||
raw(template: { raw: readonly string[] | ArrayLike<string>; }, ...substitutions: any[]): string;
|
||||
}
|
||||
|
|
9
cli/tsc/dts/lib.es2015.iterable.d.ts
vendored
9
cli/tsc/dts/lib.es2015.iterable.d.ts
vendored
|
@ -155,11 +155,11 @@ interface ReadonlyMap<K, V> {
|
|||
}
|
||||
|
||||
interface MapConstructor {
|
||||
new(): Map<any, any>;
|
||||
new (): Map<any, any>;
|
||||
new <K, V>(iterable?: Iterable<readonly [K, V]> | null): Map<K, V>;
|
||||
}
|
||||
|
||||
interface WeakMap<K extends WeakKey, V> { }
|
||||
interface WeakMap<K extends WeakKey, V> {}
|
||||
|
||||
interface WeakMapConstructor {
|
||||
new <K extends WeakKey, V>(iterable: Iterable<readonly [K, V]>): WeakMap<K, V>;
|
||||
|
@ -207,13 +207,13 @@ interface SetConstructor {
|
|||
new <T>(iterable?: Iterable<T> | null): Set<T>;
|
||||
}
|
||||
|
||||
interface WeakSet<T extends WeakKey> { }
|
||||
interface WeakSet<T extends WeakKey> {}
|
||||
|
||||
interface WeakSetConstructor {
|
||||
new <T extends WeakKey = WeakKey>(iterable: Iterable<T>): WeakSet<T>;
|
||||
}
|
||||
|
||||
interface Promise<T> { }
|
||||
interface Promise<T> {}
|
||||
|
||||
interface PromiseConstructor {
|
||||
/**
|
||||
|
@ -315,7 +315,6 @@ interface Uint8ClampedArray {
|
|||
interface Uint8ClampedArrayConstructor {
|
||||
new (elements: Iterable<number>): Uint8ClampedArray;
|
||||
|
||||
|
||||
/**
|
||||
* Creates an array from an array-like or iterable object.
|
||||
* @param arrayLike An array-like or iterable object to convert to an array.
|
||||
|
|
2
cli/tsc/dts/lib.es2015.promise.d.ts
vendored
2
cli/tsc/dts/lib.es2015.promise.d.ts
vendored
|
@ -36,7 +36,7 @@ interface PromiseConstructor {
|
|||
* @param values An array of Promises.
|
||||
* @returns A new Promise.
|
||||
*/
|
||||
all<T extends readonly unknown[] | []>(values: T): Promise<{ -readonly [P in keyof T]: Awaited<T[P]> }>;
|
||||
all<T extends readonly unknown[] | []>(values: T): Promise<{ -readonly [P in keyof T]: Awaited<T[P]>; }>;
|
||||
|
||||
// see: lib.es2015.iterable.d.ts
|
||||
// all<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>[]>;
|
||||
|
|
2
cli/tsc/dts/lib.es2015.symbol.d.ts
vendored
2
cli/tsc/dts/lib.es2015.symbol.d.ts
vendored
|
@ -43,4 +43,4 @@ interface SymbolConstructor {
|
|||
keyFor(sym: symbol): string | undefined;
|
||||
}
|
||||
|
||||
declare var Symbol: SymbolConstructor;
|
||||
declare var Symbol: SymbolConstructor;
|
||||
|
|
2
cli/tsc/dts/lib.es2016.array.include.d.ts
vendored
2
cli/tsc/dts/lib.es2016.array.include.d.ts
vendored
|
@ -113,4 +113,4 @@ interface Float64Array {
|
|||
* @param fromIndex The position in this array at which to begin searching for searchElement.
|
||||
*/
|
||||
includes(searchElement: number, fromIndex?: number): boolean;
|
||||
}
|
||||
}
|
||||
|
|
2
cli/tsc/dts/lib.es2016.d.ts
vendored
2
cli/tsc/dts/lib.es2016.d.ts
vendored
|
@ -17,4 +17,4 @@ and limitations under the License.
|
|||
/// <reference no-default-lib="true"/>
|
||||
|
||||
/// <reference lib="es2015" />
|
||||
/// <reference lib="es2016.array.include" />
|
||||
/// <reference lib="es2016.array.include" />
|
||||
|
|
2
cli/tsc/dts/lib.es2016.full.d.ts
vendored
2
cli/tsc/dts/lib.es2016.full.d.ts
vendored
|
@ -20,4 +20,4 @@ and limitations under the License.
|
|||
/// <reference lib="dom" />
|
||||
/// <reference lib="webworker.importscripts" />
|
||||
/// <reference lib="scripthost" />
|
||||
/// <reference lib="dom.iterable" />
|
||||
/// <reference lib="dom.iterable" />
|
||||
|
|
2
cli/tsc/dts/lib.es2017.full.d.ts
vendored
2
cli/tsc/dts/lib.es2017.full.d.ts
vendored
|
@ -20,4 +20,4 @@ and limitations under the License.
|
|||
/// <reference lib="dom" />
|
||||
/// <reference lib="webworker.importscripts" />
|
||||
/// <reference lib="scripthost" />
|
||||
/// <reference lib="dom.iterable" />
|
||||
/// <reference lib="dom.iterable" />
|
||||
|
|
23
cli/tsc/dts/lib.es2017.intl.d.ts
vendored
23
cli/tsc/dts/lib.es2017.intl.d.ts
vendored
|
@ -17,19 +17,18 @@ and limitations under the License.
|
|||
/// <reference no-default-lib="true"/>
|
||||
|
||||
declare namespace Intl {
|
||||
|
||||
interface DateTimeFormatPartTypesRegistry {
|
||||
day: any
|
||||
dayPeriod: any
|
||||
era: any
|
||||
hour: any
|
||||
literal: any
|
||||
minute: any
|
||||
month: any
|
||||
second: any
|
||||
timeZoneName: any
|
||||
weekday: any
|
||||
year: any
|
||||
day: any;
|
||||
dayPeriod: any;
|
||||
era: any;
|
||||
hour: any;
|
||||
literal: any;
|
||||
minute: any;
|
||||
month: any;
|
||||
second: any;
|
||||
timeZoneName: any;
|
||||
weekday: any;
|
||||
year: any;
|
||||
}
|
||||
|
||||
type DateTimeFormatPartTypes = keyof DateTimeFormatPartTypesRegistry;
|
||||
|
|
6
cli/tsc/dts/lib.es2017.object.d.ts
vendored
6
cli/tsc/dts/lib.es2017.object.d.ts
vendored
|
@ -21,7 +21,7 @@ interface ObjectConstructor {
|
|||
* Returns an array of values of the enumerable properties of an object
|
||||
* @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
|
||||
*/
|
||||
values<T>(o: { [s: string]: T } | ArrayLike<T>): T[];
|
||||
values<T>(o: { [s: string]: T; } | ArrayLike<T>): T[];
|
||||
|
||||
/**
|
||||
* Returns an array of values of the enumerable properties of an object
|
||||
|
@ -33,7 +33,7 @@ interface ObjectConstructor {
|
|||
* Returns an array of key/values of the enumerable properties of an object
|
||||
* @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
|
||||
*/
|
||||
entries<T>(o: { [s: string]: T } | ArrayLike<T>): [string, T][];
|
||||
entries<T>(o: { [s: string]: T; } | ArrayLike<T>): [string, T][];
|
||||
|
||||
/**
|
||||
* Returns an array of key/values of the enumerable properties of an object
|
||||
|
@ -45,5 +45,5 @@ interface ObjectConstructor {
|
|||
* Returns an object containing all own property descriptors of an object
|
||||
* @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
|
||||
*/
|
||||
getOwnPropertyDescriptors<T>(o: T): {[P in keyof T]: TypedPropertyDescriptor<T[P]>} & { [x: string]: PropertyDescriptor };
|
||||
getOwnPropertyDescriptors<T>(o: T): { [P in keyof T]: TypedPropertyDescriptor<T[P]>; } & { [x: string]: PropertyDescriptor; };
|
||||
}
|
||||
|
|
2
cli/tsc/dts/lib.es2018.asynciterable.d.ts
vendored
2
cli/tsc/dts/lib.es2018.asynciterable.d.ts
vendored
|
@ -40,4 +40,4 @@ interface AsyncIterable<T> {
|
|||
|
||||
interface AsyncIterableIterator<T> extends AsyncIterator<T> {
|
||||
[Symbol.asyncIterator](): AsyncIterableIterator<T>;
|
||||
}
|
||||
}
|
||||
|
|
2
cli/tsc/dts/lib.es2018.full.d.ts
vendored
2
cli/tsc/dts/lib.es2018.full.d.ts
vendored
|
@ -20,4 +20,4 @@ and limitations under the License.
|
|||
/// <reference lib="dom" />
|
||||
/// <reference lib="webworker.importscripts" />
|
||||
/// <reference lib="scripthost" />
|
||||
/// <reference lib="dom.iterable" />
|
||||
/// <reference lib="dom.iterable" />
|
||||
|
|
3
cli/tsc/dts/lib.es2018.intl.d.ts
vendored
3
cli/tsc/dts/lib.es2018.intl.d.ts
vendored
|
@ -17,7 +17,6 @@ and limitations under the License.
|
|||
/// <reference no-default-lib="true"/>
|
||||
|
||||
declare namespace Intl {
|
||||
|
||||
// http://cldr.unicode.org/index/cldr-spec/plural-rules#TOC-Determining-Plural-Categories
|
||||
type LDMLPluralRule = "zero" | "one" | "two" | "few" | "many" | "other";
|
||||
type PluralRuleType = "cardinal" | "ordinal";
|
||||
|
@ -52,7 +51,7 @@ declare namespace Intl {
|
|||
new (locales?: string | string[], options?: PluralRulesOptions): PluralRules;
|
||||
(locales?: string | string[], options?: PluralRulesOptions): PluralRules;
|
||||
|
||||
supportedLocalesOf(locales: string | string[], options?: { localeMatcher?: "lookup" | "best fit" }): string[];
|
||||
supportedLocalesOf(locales: string | string[], options?: { localeMatcher?: "lookup" | "best fit"; }): string[];
|
||||
};
|
||||
|
||||
// We can only have one definition for 'type' in TypeScript, and so you can learn where the keys come from here:
|
||||
|
|
2
cli/tsc/dts/lib.es2018.promise.d.ts
vendored
2
cli/tsc/dts/lib.es2018.promise.d.ts
vendored
|
@ -26,5 +26,5 @@ interface Promise<T> {
|
|||
* @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
|
||||
* @returns A Promise for the completion of the callback.
|
||||
*/
|
||||
finally(onfinally?: (() => void) | undefined | null): Promise<T>
|
||||
finally(onfinally?: (() => void) | undefined | null): Promise<T>;
|
||||
}
|
||||
|
|
10
cli/tsc/dts/lib.es2018.regexp.d.ts
vendored
10
cli/tsc/dts/lib.es2018.regexp.d.ts
vendored
|
@ -18,14 +18,14 @@ and limitations under the License.
|
|||
|
||||
interface RegExpMatchArray {
|
||||
groups?: {
|
||||
[key: string]: string
|
||||
}
|
||||
[key: string]: string;
|
||||
};
|
||||
}
|
||||
|
||||
interface RegExpExecArray {
|
||||
groups?: {
|
||||
[key: string]: string
|
||||
}
|
||||
[key: string]: string;
|
||||
};
|
||||
}
|
||||
|
||||
interface RegExp {
|
||||
|
@ -34,4 +34,4 @@ interface RegExp {
|
|||
* Default is false. Read-only.
|
||||
*/
|
||||
readonly dotAll: boolean;
|
||||
}
|
||||
}
|
||||
|
|
32
cli/tsc/dts/lib.es2019.array.d.ts
vendored
32
cli/tsc/dts/lib.es2019.array.d.ts
vendored
|
@ -17,14 +17,12 @@ and limitations under the License.
|
|||
/// <reference no-default-lib="true"/>
|
||||
|
||||
type FlatArray<Arr, Depth extends number> = {
|
||||
"done": Arr,
|
||||
"recur": Arr extends ReadonlyArray<infer InnerArr>
|
||||
? FlatArray<InnerArr, [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][Depth]>
|
||||
: Arr
|
||||
done: Arr;
|
||||
recur: Arr extends ReadonlyArray<infer InnerArr> ? FlatArray<InnerArr, [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][Depth]>
|
||||
: Arr;
|
||||
}[Depth extends -1 ? "done" : "recur"];
|
||||
|
||||
interface ReadonlyArray<T> {
|
||||
|
||||
/**
|
||||
* Calls a defined callback function on each element of an array. Then, flattens the result into
|
||||
* a new array.
|
||||
|
@ -35,11 +33,10 @@ interface ReadonlyArray<T> {
|
|||
* @param thisArg An object to which the this keyword can refer in the callback function. If
|
||||
* thisArg is omitted, undefined is used as the this value.
|
||||
*/
|
||||
flatMap<U, This = undefined> (
|
||||
flatMap<U, This = undefined>(
|
||||
callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray<U>,
|
||||
thisArg?: This
|
||||
): U[]
|
||||
|
||||
thisArg?: This,
|
||||
): U[];
|
||||
|
||||
/**
|
||||
* Returns a new array with all sub-array elements concatenated into it recursively up to the
|
||||
|
@ -49,12 +46,11 @@ interface ReadonlyArray<T> {
|
|||
*/
|
||||
flat<A, D extends number = 1>(
|
||||
this: A,
|
||||
depth?: D
|
||||
): FlatArray<A, D>[]
|
||||
}
|
||||
depth?: D,
|
||||
): FlatArray<A, D>[];
|
||||
}
|
||||
|
||||
interface Array<T> {
|
||||
|
||||
/**
|
||||
* Calls a defined callback function on each element of an array. Then, flattens the result into
|
||||
* a new array.
|
||||
|
@ -65,10 +61,10 @@ interface Array<T> {
|
|||
* @param thisArg An object to which the this keyword can refer in the callback function. If
|
||||
* thisArg is omitted, undefined is used as the this value.
|
||||
*/
|
||||
flatMap<U, This = undefined> (
|
||||
flatMap<U, This = undefined>(
|
||||
callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray<U>,
|
||||
thisArg?: This
|
||||
): U[]
|
||||
thisArg?: This,
|
||||
): U[];
|
||||
|
||||
/**
|
||||
* Returns a new array with all sub-array elements concatenated into it recursively up to the
|
||||
|
@ -78,6 +74,6 @@ interface Array<T> {
|
|||
*/
|
||||
flat<A, D extends number = 1>(
|
||||
this: A,
|
||||
depth?: D
|
||||
): FlatArray<A, D>[]
|
||||
depth?: D,
|
||||
): FlatArray<A, D>[];
|
||||
}
|
||||
|
|
2
cli/tsc/dts/lib.es2019.intl.d.ts
vendored
2
cli/tsc/dts/lib.es2019.intl.d.ts
vendored
|
@ -18,6 +18,6 @@ and limitations under the License.
|
|||
|
||||
declare namespace Intl {
|
||||
interface DateTimeFormatPartTypesRegistry {
|
||||
unknown: any
|
||||
unknown: any;
|
||||
}
|
||||
}
|
||||
|
|
2
cli/tsc/dts/lib.es2019.object.d.ts
vendored
2
cli/tsc/dts/lib.es2019.object.d.ts
vendored
|
@ -23,7 +23,7 @@ interface ObjectConstructor {
|
|||
* Returns an object created by key-value entries for properties and methods
|
||||
* @param entries An iterable object that contains key-value entries for properties and methods.
|
||||
*/
|
||||
fromEntries<T = any>(entries: Iterable<readonly [PropertyKey, T]>): { [k: string]: T };
|
||||
fromEntries<T = any>(entries: Iterable<readonly [PropertyKey, T]>): { [k: string]: T; };
|
||||
|
||||
/**
|
||||
* Returns an object created by key-value entries for properties and methods
|
||||
|
|
14
cli/tsc/dts/lib.es2020.bigint.d.ts
vendored
14
cli/tsc/dts/lib.es2020.bigint.d.ts
vendored
|
@ -389,9 +389,9 @@ interface BigInt64Array {
|
|||
|
||||
interface BigInt64ArrayConstructor {
|
||||
readonly prototype: BigInt64Array;
|
||||
new(length?: number): BigInt64Array;
|
||||
new(array: Iterable<bigint>): BigInt64Array;
|
||||
new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigInt64Array;
|
||||
new (length?: number): BigInt64Array;
|
||||
new (array: Iterable<bigint>): BigInt64Array;
|
||||
new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigInt64Array;
|
||||
|
||||
/** The size in bytes of each element in the array. */
|
||||
readonly BYTES_PER_ELEMENT: number;
|
||||
|
@ -661,9 +661,9 @@ interface BigUint64Array {
|
|||
|
||||
interface BigUint64ArrayConstructor {
|
||||
readonly prototype: BigUint64Array;
|
||||
new(length?: number): BigUint64Array;
|
||||
new(array: Iterable<bigint>): BigUint64Array;
|
||||
new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigUint64Array;
|
||||
new (length?: number): BigUint64Array;
|
||||
new (array: Iterable<bigint>): BigUint64Array;
|
||||
new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigUint64Array;
|
||||
|
||||
/** The size in bytes of each element in the array. */
|
||||
readonly BYTES_PER_ELEMENT: number;
|
||||
|
@ -720,7 +720,7 @@ interface DataView {
|
|||
setBigUint64(byteOffset: number, value: bigint, littleEndian?: boolean): void;
|
||||
}
|
||||
|
||||
declare namespace Intl{
|
||||
declare namespace Intl {
|
||||
interface NumberFormat {
|
||||
format(value: number | bigint): string;
|
||||
resolvedOptions(): ResolvedNumberFormatOptions;
|
||||
|
|
2
cli/tsc/dts/lib.es2020.date.d.ts
vendored
2
cli/tsc/dts/lib.es2020.date.d.ts
vendored
|
@ -39,4 +39,4 @@ interface Date {
|
|||
* @param options An object that contains one or more properties that specify comparison options.
|
||||
*/
|
||||
toLocaleTimeString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
|
||||
}
|
||||
}
|
||||
|
|
24
cli/tsc/dts/lib.es2020.intl.d.ts
vendored
24
cli/tsc/dts/lib.es2020.intl.d.ts
vendored
|
@ -18,7 +18,6 @@ and limitations under the License.
|
|||
|
||||
/// <reference lib="es2018.intl" />
|
||||
declare namespace Intl {
|
||||
|
||||
/**
|
||||
* [Unicode BCP 47 Locale Identifiers](https://unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers) definition.
|
||||
*
|
||||
|
@ -58,7 +57,7 @@ declare namespace Intl {
|
|||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts).
|
||||
*/
|
||||
type RelativeTimeFormatUnitSingular =
|
||||
type RelativeTimeFormatUnitSingular =
|
||||
| "year"
|
||||
| "quarter"
|
||||
| "month"
|
||||
|
@ -140,14 +139,14 @@ declare namespace Intl {
|
|||
*/
|
||||
type RelativeTimeFormatPart =
|
||||
| {
|
||||
type: "literal";
|
||||
value: string;
|
||||
}
|
||||
type: "literal";
|
||||
value: string;
|
||||
}
|
||||
| {
|
||||
type: Exclude<NumberFormatPartTypes, "literal">;
|
||||
value: string;
|
||||
unit: RelativeTimeFormatUnitSingular;
|
||||
};
|
||||
type: Exclude<NumberFormatPartTypes, "literal">;
|
||||
value: string;
|
||||
unit: RelativeTimeFormatUnitSingular;
|
||||
};
|
||||
|
||||
interface RelativeTimeFormat {
|
||||
/**
|
||||
|
@ -218,7 +217,7 @@ declare namespace Intl {
|
|||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat).
|
||||
*/
|
||||
new(
|
||||
new (
|
||||
locales?: UnicodeBCP47LocaleIdentifier | UnicodeBCP47LocaleIdentifier[],
|
||||
options?: RelativeTimeFormatOptions,
|
||||
): RelativeTimeFormat;
|
||||
|
@ -410,7 +409,7 @@ declare namespace Intl {
|
|||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/DisplayNames).
|
||||
*/
|
||||
new(locales: LocalesArgument, options: DisplayNamesOptions): DisplayNames;
|
||||
new (locales: LocalesArgument, options: DisplayNamesOptions): DisplayNames;
|
||||
|
||||
/**
|
||||
* Returns an array containing those of the provided locales that are supported in display names without having to fall back to the runtime's default locale.
|
||||
|
@ -425,7 +424,6 @@ declare namespace Intl {
|
|||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/supportedLocalesOf).
|
||||
*/
|
||||
supportedLocalesOf(locales?: LocalesArgument, options?: { localeMatcher?: RelativeTimeFormatLocaleMatcher }): BCP47LanguageTag[];
|
||||
supportedLocalesOf(locales?: LocalesArgument, options?: { localeMatcher?: RelativeTimeFormatLocaleMatcher; }): BCP47LanguageTag[];
|
||||
};
|
||||
|
||||
}
|
||||
|
|
2
cli/tsc/dts/lib.es2020.promise.d.ts
vendored
2
cli/tsc/dts/lib.es2020.promise.d.ts
vendored
|
@ -35,7 +35,7 @@ interface PromiseConstructor {
|
|||
* @param values An array of Promises.
|
||||
* @returns A new Promise.
|
||||
*/
|
||||
allSettled<T extends readonly unknown[] | []>(values: T): Promise<{ -readonly [P in keyof T]: PromiseSettledResult<Awaited<T[P]>> }>;
|
||||
allSettled<T extends readonly unknown[] | []>(values: T): Promise<{ -readonly [P in keyof T]: PromiseSettledResult<Awaited<T[P]>>; }>;
|
||||
|
||||
/**
|
||||
* Creates a Promise that is resolved with an array of results when all
|
||||
|
|
11
cli/tsc/dts/lib.es2021.intl.d.ts
vendored
11
cli/tsc/dts/lib.es2021.intl.d.ts
vendored
|
@ -17,10 +17,9 @@ and limitations under the License.
|
|||
/// <reference no-default-lib="true"/>
|
||||
|
||||
declare namespace Intl {
|
||||
|
||||
interface DateTimeFormatPartTypesRegistry {
|
||||
fractionalSecond: any
|
||||
}
|
||||
fractionalSecond: any;
|
||||
}
|
||||
|
||||
interface DateTimeFormatOptions {
|
||||
formatMatcher?: "basic" | "best fit" | "best fit" | undefined;
|
||||
|
@ -31,7 +30,7 @@ declare namespace Intl {
|
|||
}
|
||||
|
||||
interface DateTimeRangeFormatPart extends DateTimeFormatPart {
|
||||
source: "startRange" | "endRange" | "shared"
|
||||
source: "startRange" | "endRange" | "shared";
|
||||
}
|
||||
|
||||
interface DateTimeFormat {
|
||||
|
@ -114,7 +113,7 @@ declare namespace Intl {
|
|||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/formatToParts).
|
||||
*/
|
||||
formatToParts(list: Iterable<string>): { type: "element" | "literal", value: string; }[];
|
||||
formatToParts(list: Iterable<string>): { type: "element" | "literal"; value: string; }[];
|
||||
|
||||
/**
|
||||
* Returns a new object with properties reflecting the locale and style
|
||||
|
@ -144,7 +143,7 @@ declare namespace Intl {
|
|||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat).
|
||||
*/
|
||||
new(locales?: BCP47LanguageTag | BCP47LanguageTag[], options?: ListFormatOptions): ListFormat;
|
||||
new (locales?: BCP47LanguageTag | BCP47LanguageTag[], options?: ListFormatOptions): ListFormat;
|
||||
|
||||
/**
|
||||
* Returns an array containing those of the provided locales that are
|
||||
|
|
6
cli/tsc/dts/lib.es2021.promise.d.ts
vendored
6
cli/tsc/dts/lib.es2021.promise.d.ts
vendored
|
@ -17,11 +17,11 @@ and limitations under the License.
|
|||
/// <reference no-default-lib="true"/>
|
||||
|
||||
interface AggregateError extends Error {
|
||||
errors: any[]
|
||||
errors: any[];
|
||||
}
|
||||
|
||||
interface AggregateErrorConstructor {
|
||||
new(errors: Iterable<any>, message?: string): AggregateError;
|
||||
new (errors: Iterable<any>, message?: string): AggregateError;
|
||||
(errors: Iterable<any>, message?: string): AggregateError;
|
||||
readonly prototype: AggregateError;
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ interface PromiseConstructor {
|
|||
* @param values An array or iterable of Promises.
|
||||
* @returns A new Promise.
|
||||
*/
|
||||
any<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>
|
||||
any<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>;
|
||||
|
||||
/**
|
||||
* Creates a Promise that can be resolved or rejected using provided functions.
|
||||
|
|
4
cli/tsc/dts/lib.es2021.weakref.d.ts
vendored
4
cli/tsc/dts/lib.es2021.weakref.d.ts
vendored
|
@ -35,7 +35,7 @@ interface WeakRefConstructor {
|
|||
* In es2023 the value can be either a symbol or an object, in previous versions only object is permissible.
|
||||
* @param target The target value for the WeakRef instance.
|
||||
*/
|
||||
new<T extends WeakKey>(target: T): WeakRef<T>;
|
||||
new <T extends WeakKey>(target: T): WeakRef<T>;
|
||||
}
|
||||
|
||||
declare var WeakRef: WeakRefConstructor;
|
||||
|
@ -70,7 +70,7 @@ interface FinalizationRegistryConstructor {
|
|||
* Creates a finalization registry with an associated cleanup callback
|
||||
* @param cleanupCallback The callback to call after a value in the registry has been reclaimed.
|
||||
*/
|
||||
new<T>(cleanupCallback: (heldValue: T) => void): FinalizationRegistry<T>;
|
||||
new <T>(cleanupCallback: (heldValue: T) => void): FinalizationRegistry<T>;
|
||||
}
|
||||
|
||||
declare var FinalizationRegistry: FinalizationRegistryConstructor;
|
||||
|
|
4
cli/tsc/dts/lib.es2022.error.d.ts
vendored
4
cli/tsc/dts/lib.es2022.error.d.ts
vendored
|
@ -63,11 +63,11 @@ interface AggregateErrorConstructor {
|
|||
new (
|
||||
errors: Iterable<any>,
|
||||
message?: string,
|
||||
options?: ErrorOptions
|
||||
options?: ErrorOptions,
|
||||
): AggregateError;
|
||||
(
|
||||
errors: Iterable<any>,
|
||||
message?: string,
|
||||
options?: ErrorOptions
|
||||
options?: ErrorOptions,
|
||||
): AggregateError;
|
||||
}
|
||||
|
|
3
cli/tsc/dts/lib.es2022.intl.d.ts
vendored
3
cli/tsc/dts/lib.es2022.intl.d.ts
vendored
|
@ -17,7 +17,6 @@ and limitations under the License.
|
|||
/// <reference no-default-lib="true"/>
|
||||
|
||||
declare namespace Intl {
|
||||
|
||||
/**
|
||||
* An object with some or all properties of the `Intl.Segmenter` constructor `options` parameter.
|
||||
*
|
||||
|
@ -90,7 +89,7 @@ declare namespace Intl {
|
|||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter).
|
||||
*/
|
||||
new(locales?: BCP47LanguageTag | BCP47LanguageTag[], options?: SegmenterOptions): Segmenter;
|
||||
new (locales?: BCP47LanguageTag | BCP47LanguageTag[], options?: SegmenterOptions): Segmenter;
|
||||
|
||||
/**
|
||||
* Returns an array containing those of the provided locales that are supported without having to fall back to the runtime's default locale.
|
||||
|
|
4
cli/tsc/dts/lib.es2022.sharedmemory.d.ts
vendored
4
cli/tsc/dts/lib.es2022.sharedmemory.d.ts
vendored
|
@ -25,7 +25,7 @@ interface Atomics {
|
|||
* @param value The expected value to test.
|
||||
* @param [timeout] The expected value to test.
|
||||
*/
|
||||
waitAsync(typedArray: Int32Array, index: number, value: number, timeout?: number): { async: false, value: "not-equal" | "timed-out" } | { async: true, value: Promise<"ok" | "timed-out"> };
|
||||
waitAsync(typedArray: Int32Array, index: number, value: number, timeout?: number): { async: false; value: "not-equal" | "timed-out"; } | { async: true; value: Promise<"ok" | "timed-out">; };
|
||||
|
||||
/**
|
||||
* A non-blocking, asynchronous version of wait which is usable on the main thread.
|
||||
|
@ -35,5 +35,5 @@ interface Atomics {
|
|||
* @param value The expected value to test.
|
||||
* @param [timeout] The expected value to test.
|
||||
*/
|
||||
waitAsync(typedArray: BigInt64Array, index: number, value: bigint, timeout?: number): { async: false, value: "not-equal" | "timed-out" } | { async: true, value: Promise<"ok" | "timed-out"> };
|
||||
waitAsync(typedArray: BigInt64Array, index: number, value: bigint, timeout?: number): { async: false; value: "not-equal" | "timed-out"; } | { async: true; value: Promise<"ok" | "timed-out">; };
|
||||
}
|
||||
|
|
144
cli/tsc/dts/lib.es2023.array.d.ts
vendored
144
cli/tsc/dts/lib.es2023.array.d.ts
vendored
|
@ -97,11 +97,11 @@ interface ReadonlyArray<T> {
|
|||
*/
|
||||
findLast<S extends T>(
|
||||
predicate: (value: T, index: number, array: readonly T[]) => value is S,
|
||||
thisArg?: any
|
||||
thisArg?: any,
|
||||
): S | undefined;
|
||||
findLast(
|
||||
predicate: (value: T, index: number, array: readonly T[]) => unknown,
|
||||
thisArg?: any
|
||||
thisArg?: any,
|
||||
): T | undefined;
|
||||
|
||||
/**
|
||||
|
@ -115,7 +115,7 @@ interface ReadonlyArray<T> {
|
|||
*/
|
||||
findLastIndex(
|
||||
predicate: (value: T, index: number, array: readonly T[]) => unknown,
|
||||
thisArg?: any
|
||||
thisArg?: any,
|
||||
): number;
|
||||
|
||||
/**
|
||||
|
@ -177,13 +177,13 @@ interface Int8Array {
|
|||
predicate: (
|
||||
value: number,
|
||||
index: number,
|
||||
array: Int8Array
|
||||
array: Int8Array,
|
||||
) => value is S,
|
||||
thisArg?: any
|
||||
thisArg?: any,
|
||||
): S | undefined;
|
||||
findLast(
|
||||
predicate: (value: number, index: number, array: Int8Array) => unknown,
|
||||
thisArg?: any
|
||||
thisArg?: any,
|
||||
): number | undefined;
|
||||
|
||||
/**
|
||||
|
@ -197,7 +197,7 @@ interface Int8Array {
|
|||
*/
|
||||
findLastIndex(
|
||||
predicate: (value: number, index: number, array: Int8Array) => unknown,
|
||||
thisArg?: any
|
||||
thisArg?: any,
|
||||
): number;
|
||||
|
||||
/**
|
||||
|
@ -209,7 +209,7 @@ interface Int8Array {
|
|||
* Copies and sorts the array.
|
||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
||||
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
||||
* value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
|
||||
* value otherwise. If omitted, the elements are sorted in ascending order.
|
||||
* ```ts
|
||||
* const myNums = Uint8Array.from([11, 2, 22, 1]);
|
||||
* myNums.toSorted((a, b) => a - b) // Uint8Array(4) [1, 2, 11, 22]
|
||||
|
@ -241,13 +241,13 @@ interface Uint8Array {
|
|||
predicate: (
|
||||
value: number,
|
||||
index: number,
|
||||
array: Uint8Array
|
||||
array: Uint8Array,
|
||||
) => value is S,
|
||||
thisArg?: any
|
||||
thisArg?: any,
|
||||
): S | undefined;
|
||||
findLast(
|
||||
predicate: (value: number, index: number, array: Uint8Array) => unknown,
|
||||
thisArg?: any
|
||||
thisArg?: any,
|
||||
): number | undefined;
|
||||
|
||||
/**
|
||||
|
@ -261,7 +261,7 @@ interface Uint8Array {
|
|||
*/
|
||||
findLastIndex(
|
||||
predicate: (value: number, index: number, array: Uint8Array) => unknown,
|
||||
thisArg?: any
|
||||
thisArg?: any,
|
||||
): number;
|
||||
|
||||
/**
|
||||
|
@ -273,7 +273,7 @@ interface Uint8Array {
|
|||
* Copies and sorts the array.
|
||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
||||
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
||||
* value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
|
||||
* value otherwise. If omitted, the elements are sorted in ascending order.
|
||||
* ```ts
|
||||
* const myNums = Uint8Array.from([11, 2, 22, 1]);
|
||||
* myNums.toSorted((a, b) => a - b) // Uint8Array(4) [1, 2, 11, 22]
|
||||
|
@ -305,17 +305,17 @@ interface Uint8ClampedArray {
|
|||
predicate: (
|
||||
value: number,
|
||||
index: number,
|
||||
array: Uint8ClampedArray
|
||||
array: Uint8ClampedArray,
|
||||
) => value is S,
|
||||
thisArg?: any
|
||||
thisArg?: any,
|
||||
): S | undefined;
|
||||
findLast(
|
||||
predicate: (
|
||||
value: number,
|
||||
index: number,
|
||||
array: Uint8ClampedArray
|
||||
array: Uint8ClampedArray,
|
||||
) => unknown,
|
||||
thisArg?: any
|
||||
thisArg?: any,
|
||||
): number | undefined;
|
||||
|
||||
/**
|
||||
|
@ -331,9 +331,9 @@ interface Uint8ClampedArray {
|
|||
predicate: (
|
||||
value: number,
|
||||
index: number,
|
||||
array: Uint8ClampedArray
|
||||
array: Uint8ClampedArray,
|
||||
) => unknown,
|
||||
thisArg?: any
|
||||
thisArg?: any,
|
||||
): number;
|
||||
|
||||
/**
|
||||
|
@ -345,7 +345,7 @@ interface Uint8ClampedArray {
|
|||
* Copies and sorts the array.
|
||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
||||
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
||||
* value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
|
||||
* value otherwise. If omitted, the elements are sorted in ascending order.
|
||||
* ```ts
|
||||
* const myNums = Uint8ClampedArray.from([11, 2, 22, 1]);
|
||||
* myNums.toSorted((a, b) => a - b) // Uint8ClampedArray(4) [1, 2, 11, 22]
|
||||
|
@ -377,13 +377,13 @@ interface Int16Array {
|
|||
predicate: (
|
||||
value: number,
|
||||
index: number,
|
||||
array: Int16Array
|
||||
array: Int16Array,
|
||||
) => value is S,
|
||||
thisArg?: any
|
||||
thisArg?: any,
|
||||
): S | undefined;
|
||||
findLast(
|
||||
predicate: (value: number, index: number, array: Int16Array) => unknown,
|
||||
thisArg?: any
|
||||
thisArg?: any,
|
||||
): number | undefined;
|
||||
|
||||
/**
|
||||
|
@ -397,7 +397,7 @@ interface Int16Array {
|
|||
*/
|
||||
findLastIndex(
|
||||
predicate: (value: number, index: number, array: Int16Array) => unknown,
|
||||
thisArg?: any
|
||||
thisArg?: any,
|
||||
): number;
|
||||
|
||||
/**
|
||||
|
@ -409,7 +409,7 @@ interface Int16Array {
|
|||
* Copies and sorts the array.
|
||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
||||
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
||||
* value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
|
||||
* value otherwise. If omitted, the elements are sorted in ascending order.
|
||||
* ```ts
|
||||
* const myNums = Int16Array.from([11, 2, -22, 1]);
|
||||
* myNums.toSorted((a, b) => a - b) // Int16Array(4) [-22, 1, 2, 11]
|
||||
|
@ -441,17 +441,17 @@ interface Uint16Array {
|
|||
predicate: (
|
||||
value: number,
|
||||
index: number,
|
||||
array: Uint16Array
|
||||
array: Uint16Array,
|
||||
) => value is S,
|
||||
thisArg?: any
|
||||
thisArg?: any,
|
||||
): S | undefined;
|
||||
findLast(
|
||||
predicate: (
|
||||
value: number,
|
||||
index: number,
|
||||
array: Uint16Array
|
||||
array: Uint16Array,
|
||||
) => unknown,
|
||||
thisArg?: any
|
||||
thisArg?: any,
|
||||
): number | undefined;
|
||||
|
||||
/**
|
||||
|
@ -467,9 +467,9 @@ interface Uint16Array {
|
|||
predicate: (
|
||||
value: number,
|
||||
index: number,
|
||||
array: Uint16Array
|
||||
array: Uint16Array,
|
||||
) => unknown,
|
||||
thisArg?: any
|
||||
thisArg?: any,
|
||||
): number;
|
||||
|
||||
/**
|
||||
|
@ -481,7 +481,7 @@ interface Uint16Array {
|
|||
* Copies and sorts the array.
|
||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
||||
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
||||
* value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
|
||||
* value otherwise. If omitted, the elements are sorted in ascending order.
|
||||
* ```ts
|
||||
* const myNums = Uint16Array.from([11, 2, 22, 1]);
|
||||
* myNums.toSorted((a, b) => a - b) // Uint16Array(4) [1, 2, 11, 22]
|
||||
|
@ -513,13 +513,13 @@ interface Int32Array {
|
|||
predicate: (
|
||||
value: number,
|
||||
index: number,
|
||||
array: Int32Array
|
||||
array: Int32Array,
|
||||
) => value is S,
|
||||
thisArg?: any
|
||||
thisArg?: any,
|
||||
): S | undefined;
|
||||
findLast(
|
||||
predicate: (value: number, index: number, array: Int32Array) => unknown,
|
||||
thisArg?: any
|
||||
thisArg?: any,
|
||||
): number | undefined;
|
||||
|
||||
/**
|
||||
|
@ -533,7 +533,7 @@ interface Int32Array {
|
|||
*/
|
||||
findLastIndex(
|
||||
predicate: (value: number, index: number, array: Int32Array) => unknown,
|
||||
thisArg?: any
|
||||
thisArg?: any,
|
||||
): number;
|
||||
|
||||
/**
|
||||
|
@ -545,7 +545,7 @@ interface Int32Array {
|
|||
* Copies and sorts the array.
|
||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
||||
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
||||
* value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
|
||||
* value otherwise. If omitted, the elements are sorted in ascending order.
|
||||
* ```ts
|
||||
* const myNums = Int32Array.from([11, 2, -22, 1]);
|
||||
* myNums.toSorted((a, b) => a - b) // Int32Array(4) [-22, 1, 2, 11]
|
||||
|
@ -577,17 +577,17 @@ interface Uint32Array {
|
|||
predicate: (
|
||||
value: number,
|
||||
index: number,
|
||||
array: Uint32Array
|
||||
array: Uint32Array,
|
||||
) => value is S,
|
||||
thisArg?: any
|
||||
thisArg?: any,
|
||||
): S | undefined;
|
||||
findLast(
|
||||
predicate: (
|
||||
value: number,
|
||||
index: number,
|
||||
array: Uint32Array
|
||||
array: Uint32Array,
|
||||
) => unknown,
|
||||
thisArg?: any
|
||||
thisArg?: any,
|
||||
): number | undefined;
|
||||
|
||||
/**
|
||||
|
@ -603,9 +603,9 @@ interface Uint32Array {
|
|||
predicate: (
|
||||
value: number,
|
||||
index: number,
|
||||
array: Uint32Array
|
||||
array: Uint32Array,
|
||||
) => unknown,
|
||||
thisArg?: any
|
||||
thisArg?: any,
|
||||
): number;
|
||||
|
||||
/**
|
||||
|
@ -617,7 +617,7 @@ interface Uint32Array {
|
|||
* Copies and sorts the array.
|
||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
||||
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
||||
* value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
|
||||
* value otherwise. If omitted, the elements are sorted in ascending order.
|
||||
* ```ts
|
||||
* const myNums = Uint32Array.from([11, 2, 22, 1]);
|
||||
* myNums.toSorted((a, b) => a - b) // Uint32Array(4) [1, 2, 11, 22]
|
||||
|
@ -649,17 +649,17 @@ interface Float32Array {
|
|||
predicate: (
|
||||
value: number,
|
||||
index: number,
|
||||
array: Float32Array
|
||||
array: Float32Array,
|
||||
) => value is S,
|
||||
thisArg?: any
|
||||
thisArg?: any,
|
||||
): S | undefined;
|
||||
findLast(
|
||||
predicate: (
|
||||
value: number,
|
||||
index: number,
|
||||
array: Float32Array
|
||||
array: Float32Array,
|
||||
) => unknown,
|
||||
thisArg?: any
|
||||
thisArg?: any,
|
||||
): number | undefined;
|
||||
|
||||
/**
|
||||
|
@ -675,9 +675,9 @@ interface Float32Array {
|
|||
predicate: (
|
||||
value: number,
|
||||
index: number,
|
||||
array: Float32Array
|
||||
array: Float32Array,
|
||||
) => unknown,
|
||||
thisArg?: any
|
||||
thisArg?: any,
|
||||
): number;
|
||||
|
||||
/**
|
||||
|
@ -689,7 +689,7 @@ interface Float32Array {
|
|||
* Copies and sorts the array.
|
||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
||||
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
||||
* value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
|
||||
* value otherwise. If omitted, the elements are sorted in ascending order.
|
||||
* ```ts
|
||||
* const myNums = Float32Array.from([11.25, 2, -22.5, 1]);
|
||||
* myNums.toSorted((a, b) => a - b) // Float32Array(4) [-22.5, 1, 2, 11.5]
|
||||
|
@ -721,17 +721,17 @@ interface Float64Array {
|
|||
predicate: (
|
||||
value: number,
|
||||
index: number,
|
||||
array: Float64Array
|
||||
array: Float64Array,
|
||||
) => value is S,
|
||||
thisArg?: any
|
||||
thisArg?: any,
|
||||
): S | undefined;
|
||||
findLast(
|
||||
predicate: (
|
||||
value: number,
|
||||
index: number,
|
||||
array: Float64Array
|
||||
array: Float64Array,
|
||||
) => unknown,
|
||||
thisArg?: any
|
||||
thisArg?: any,
|
||||
): number | undefined;
|
||||
|
||||
/**
|
||||
|
@ -747,9 +747,9 @@ interface Float64Array {
|
|||
predicate: (
|
||||
value: number,
|
||||
index: number,
|
||||
array: Float64Array
|
||||
array: Float64Array,
|
||||
) => unknown,
|
||||
thisArg?: any
|
||||
thisArg?: any,
|
||||
): number;
|
||||
|
||||
/**
|
||||
|
@ -761,7 +761,7 @@ interface Float64Array {
|
|||
* Copies and sorts the array.
|
||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
||||
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
||||
* value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
|
||||
* value otherwise. If omitted, the elements are sorted in ascending order.
|
||||
* ```ts
|
||||
* const myNums = Float64Array.from([11.25, 2, -22.5, 1]);
|
||||
* myNums.toSorted((a, b) => a - b) // Float64Array(4) [-22.5, 1, 2, 11.5]
|
||||
|
@ -793,17 +793,17 @@ interface BigInt64Array {
|
|||
predicate: (
|
||||
value: bigint,
|
||||
index: number,
|
||||
array: BigInt64Array
|
||||
array: BigInt64Array,
|
||||
) => value is S,
|
||||
thisArg?: any
|
||||
thisArg?: any,
|
||||
): S | undefined;
|
||||
findLast(
|
||||
predicate: (
|
||||
value: bigint,
|
||||
index: number,
|
||||
array: BigInt64Array
|
||||
array: BigInt64Array,
|
||||
) => unknown,
|
||||
thisArg?: any
|
||||
thisArg?: any,
|
||||
): bigint | undefined;
|
||||
|
||||
/**
|
||||
|
@ -819,9 +819,9 @@ interface BigInt64Array {
|
|||
predicate: (
|
||||
value: bigint,
|
||||
index: number,
|
||||
array: BigInt64Array
|
||||
array: BigInt64Array,
|
||||
) => unknown,
|
||||
thisArg?: any
|
||||
thisArg?: any,
|
||||
): number;
|
||||
|
||||
/**
|
||||
|
@ -833,7 +833,7 @@ interface BigInt64Array {
|
|||
* Copies and sorts the array.
|
||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
||||
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
||||
* value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
|
||||
* value otherwise. If omitted, the elements are sorted in ascending order.
|
||||
* ```ts
|
||||
* const myNums = BigInt64Array.from([11n, 2n, -22n, 1n]);
|
||||
* myNums.toSorted((a, b) => Number(a - b)) // BigInt64Array(4) [-22n, 1n, 2n, 11n]
|
||||
|
@ -865,17 +865,17 @@ interface BigUint64Array {
|
|||
predicate: (
|
||||
value: bigint,
|
||||
index: number,
|
||||
array: BigUint64Array
|
||||
array: BigUint64Array,
|
||||
) => value is S,
|
||||
thisArg?: any
|
||||
thisArg?: any,
|
||||
): S | undefined;
|
||||
findLast(
|
||||
predicate: (
|
||||
value: bigint,
|
||||
index: number,
|
||||
array: BigUint64Array
|
||||
array: BigUint64Array,
|
||||
) => unknown,
|
||||
thisArg?: any
|
||||
thisArg?: any,
|
||||
): bigint | undefined;
|
||||
|
||||
/**
|
||||
|
@ -891,9 +891,9 @@ interface BigUint64Array {
|
|||
predicate: (
|
||||
value: bigint,
|
||||
index: number,
|
||||
array: BigUint64Array
|
||||
array: BigUint64Array,
|
||||
) => unknown,
|
||||
thisArg?: any
|
||||
thisArg?: any,
|
||||
): number;
|
||||
|
||||
/**
|
||||
|
@ -905,7 +905,7 @@ interface BigUint64Array {
|
|||
* Copies and sorts the array.
|
||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
||||
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
||||
* value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
|
||||
* value otherwise. If omitted, the elements are sorted in ascending order.
|
||||
* ```ts
|
||||
* const myNums = BigUint64Array.from([11n, 2n, 22n, 1n]);
|
||||
* myNums.toSorted((a, b) => Number(a - b)) // BigUint64Array(4) [1n, 2n, 11n, 22n]
|
||||
|
|
173
cli/tsc/dts/lib.es5.d.ts
vendored
173
cli/tsc/dts/lib.es5.d.ts
vendored
|
@ -153,7 +153,7 @@ interface Object {
|
|||
}
|
||||
|
||||
interface ObjectConstructor {
|
||||
new(value?: any): Object;
|
||||
new (value?: any): Object;
|
||||
(): any;
|
||||
(value: any): any;
|
||||
|
||||
|
@ -225,7 +225,7 @@ interface ObjectConstructor {
|
|||
* Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
|
||||
* @param o Object on which to lock the attributes.
|
||||
*/
|
||||
freeze<T extends {[idx: string]: U | null | undefined | object}, U extends string | bigint | number | boolean | symbol>(o: T): Readonly<T>;
|
||||
freeze<T extends { [idx: string]: U | null | undefined | object; }, U extends string | bigint | number | boolean | symbol>(o: T): Readonly<T>;
|
||||
|
||||
/**
|
||||
* Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
|
||||
|
@ -311,7 +311,7 @@ interface FunctionConstructor {
|
|||
* Creates a new function.
|
||||
* @param args A list of arguments the function accepts.
|
||||
*/
|
||||
new(...args: string[]): Function;
|
||||
new (...args: string[]): Function;
|
||||
(...args: string[]): Function;
|
||||
readonly prototype: Function;
|
||||
}
|
||||
|
@ -532,7 +532,7 @@ interface String {
|
|||
}
|
||||
|
||||
interface StringConstructor {
|
||||
new(value?: any): String;
|
||||
new (value?: any): String;
|
||||
(value?: any): string;
|
||||
readonly prototype: String;
|
||||
fromCharCode(...codes: number[]): string;
|
||||
|
@ -549,7 +549,7 @@ interface Boolean {
|
|||
}
|
||||
|
||||
interface BooleanConstructor {
|
||||
new(value?: any): Boolean;
|
||||
new (value?: any): Boolean;
|
||||
<T>(value?: T): boolean;
|
||||
readonly prototype: Boolean;
|
||||
}
|
||||
|
@ -586,7 +586,7 @@ interface Number {
|
|||
}
|
||||
|
||||
interface NumberConstructor {
|
||||
new(value?: any): Number;
|
||||
new (value?: any): Number;
|
||||
(value?: any): number;
|
||||
readonly prototype: Number;
|
||||
|
||||
|
@ -638,8 +638,8 @@ interface ImportMeta {
|
|||
* augmented via interface merging.
|
||||
*/
|
||||
interface ImportCallOptions {
|
||||
assert?: ImportAssertions;
|
||||
with?: ImportAssertions;
|
||||
/** @deprecated*/ assert?: ImportAssertions;
|
||||
with?: ImportAttributes;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -649,6 +649,13 @@ interface ImportAssertions {
|
|||
[key: string]: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* The type for the `with` property of the optional second argument to `import()`.
|
||||
*/
|
||||
interface ImportAttributes {
|
||||
[key: string]: string;
|
||||
}
|
||||
|
||||
interface Math {
|
||||
/** The mathematical constant e. This is Euler's number, the base of natural logarithms. */
|
||||
readonly E: number;
|
||||
|
@ -915,8 +922,8 @@ interface Date {
|
|||
}
|
||||
|
||||
interface DateConstructor {
|
||||
new(): Date;
|
||||
new(value: number | string): Date;
|
||||
new (): Date;
|
||||
new (value: number | string): Date;
|
||||
/**
|
||||
* Creates a new Date.
|
||||
* @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.
|
||||
|
@ -927,7 +934,7 @@ interface DateConstructor {
|
|||
* @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds.
|
||||
* @param ms A number from 0 to 999 that specifies the milliseconds.
|
||||
*/
|
||||
new(year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date;
|
||||
new (year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date;
|
||||
(): string;
|
||||
readonly prototype: Date;
|
||||
/**
|
||||
|
@ -1015,49 +1022,49 @@ interface RegExp {
|
|||
}
|
||||
|
||||
interface RegExpConstructor {
|
||||
new(pattern: RegExp | string): RegExp;
|
||||
new(pattern: string, flags?: string): RegExp;
|
||||
new (pattern: RegExp | string): RegExp;
|
||||
new (pattern: string, flags?: string): RegExp;
|
||||
(pattern: RegExp | string): RegExp;
|
||||
(pattern: string, flags?: string): RegExp;
|
||||
readonly prototype: RegExp;
|
||||
readonly "prototype": RegExp;
|
||||
|
||||
// Non-standard extensions
|
||||
/** @deprecated A legacy feature for browser compatibility */
|
||||
$1: string;
|
||||
"$1": string;
|
||||
/** @deprecated A legacy feature for browser compatibility */
|
||||
$2: string;
|
||||
"$2": string;
|
||||
/** @deprecated A legacy feature for browser compatibility */
|
||||
$3: string;
|
||||
"$3": string;
|
||||
/** @deprecated A legacy feature for browser compatibility */
|
||||
$4: string;
|
||||
"$4": string;
|
||||
/** @deprecated A legacy feature for browser compatibility */
|
||||
$5: string;
|
||||
"$5": string;
|
||||
/** @deprecated A legacy feature for browser compatibility */
|
||||
$6: string;
|
||||
"$6": string;
|
||||
/** @deprecated A legacy feature for browser compatibility */
|
||||
$7: string;
|
||||
"$7": string;
|
||||
/** @deprecated A legacy feature for browser compatibility */
|
||||
$8: string;
|
||||
"$8": string;
|
||||
/** @deprecated A legacy feature for browser compatibility */
|
||||
$9: string;
|
||||
"$9": string;
|
||||
/** @deprecated A legacy feature for browser compatibility */
|
||||
input: string;
|
||||
"input": string;
|
||||
/** @deprecated A legacy feature for browser compatibility */
|
||||
$_: string;
|
||||
"$_": string;
|
||||
/** @deprecated A legacy feature for browser compatibility */
|
||||
lastMatch: string;
|
||||
"lastMatch": string;
|
||||
/** @deprecated A legacy feature for browser compatibility */
|
||||
"$&": string;
|
||||
/** @deprecated A legacy feature for browser compatibility */
|
||||
lastParen: string;
|
||||
"lastParen": string;
|
||||
/** @deprecated A legacy feature for browser compatibility */
|
||||
"$+": string;
|
||||
/** @deprecated A legacy feature for browser compatibility */
|
||||
leftContext: string;
|
||||
"leftContext": string;
|
||||
/** @deprecated A legacy feature for browser compatibility */
|
||||
"$`": string;
|
||||
/** @deprecated A legacy feature for browser compatibility */
|
||||
rightContext: string;
|
||||
"rightContext": string;
|
||||
/** @deprecated A legacy feature for browser compatibility */
|
||||
"$'": string;
|
||||
}
|
||||
|
@ -1071,7 +1078,7 @@ interface Error {
|
|||
}
|
||||
|
||||
interface ErrorConstructor {
|
||||
new(message?: string): Error;
|
||||
new (message?: string): Error;
|
||||
(message?: string): Error;
|
||||
readonly prototype: Error;
|
||||
}
|
||||
|
@ -1082,7 +1089,7 @@ interface EvalError extends Error {
|
|||
}
|
||||
|
||||
interface EvalErrorConstructor extends ErrorConstructor {
|
||||
new(message?: string): EvalError;
|
||||
new (message?: string): EvalError;
|
||||
(message?: string): EvalError;
|
||||
readonly prototype: EvalError;
|
||||
}
|
||||
|
@ -1093,7 +1100,7 @@ interface RangeError extends Error {
|
|||
}
|
||||
|
||||
interface RangeErrorConstructor extends ErrorConstructor {
|
||||
new(message?: string): RangeError;
|
||||
new (message?: string): RangeError;
|
||||
(message?: string): RangeError;
|
||||
readonly prototype: RangeError;
|
||||
}
|
||||
|
@ -1104,7 +1111,7 @@ interface ReferenceError extends Error {
|
|||
}
|
||||
|
||||
interface ReferenceErrorConstructor extends ErrorConstructor {
|
||||
new(message?: string): ReferenceError;
|
||||
new (message?: string): ReferenceError;
|
||||
(message?: string): ReferenceError;
|
||||
readonly prototype: ReferenceError;
|
||||
}
|
||||
|
@ -1115,7 +1122,7 @@ interface SyntaxError extends Error {
|
|||
}
|
||||
|
||||
interface SyntaxErrorConstructor extends ErrorConstructor {
|
||||
new(message?: string): SyntaxError;
|
||||
new (message?: string): SyntaxError;
|
||||
(message?: string): SyntaxError;
|
||||
readonly prototype: SyntaxError;
|
||||
}
|
||||
|
@ -1126,7 +1133,7 @@ interface TypeError extends Error {
|
|||
}
|
||||
|
||||
interface TypeErrorConstructor extends ErrorConstructor {
|
||||
new(message?: string): TypeError;
|
||||
new (message?: string): TypeError;
|
||||
(message?: string): TypeError;
|
||||
readonly prototype: TypeError;
|
||||
}
|
||||
|
@ -1137,7 +1144,7 @@ interface URIError extends Error {
|
|||
}
|
||||
|
||||
interface URIErrorConstructor extends ErrorConstructor {
|
||||
new(message?: string): URIError;
|
||||
new (message?: string): URIError;
|
||||
(message?: string): URIError;
|
||||
readonly prototype: URIError;
|
||||
}
|
||||
|
@ -1173,7 +1180,6 @@ interface JSON {
|
|||
*/
|
||||
declare var JSON: JSON;
|
||||
|
||||
|
||||
/////////////////////////////
|
||||
/// ECMAScript Array API (specially handled by compiler)
|
||||
/////////////////////////////
|
||||
|
@ -1497,7 +1503,7 @@ interface Array<T> {
|
|||
}
|
||||
|
||||
interface ArrayConstructor {
|
||||
new(arrayLength?: number): any[];
|
||||
new (arrayLength?: number): any[];
|
||||
new <T>(arrayLength: number): T[];
|
||||
new <T>(...items: T[]): T[];
|
||||
(arrayLength?: number): any[];
|
||||
|
@ -1553,13 +1559,12 @@ interface Promise<T> {
|
|||
/**
|
||||
* Recursively unwraps the "awaited type" of a type. Non-promise "thenables" should resolve to `never`. This emulates the behavior of `await`.
|
||||
*/
|
||||
type Awaited<T> =
|
||||
T extends null | undefined ? T : // special case for `null | undefined` when not in `--strictNullChecks` mode
|
||||
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
|
||||
F extends ((value: infer V, ...args: infer _) => any) ? // if the argument to `then` is callable, extracts the first argument
|
||||
Awaited<V> : // recursively unwrap the value
|
||||
never : // the argument to `then` was not callable
|
||||
T; // non-object or non-thenable
|
||||
type Awaited<T> = T extends null | undefined ? T : // special case for `null | undefined` when not in `--strictNullChecks` mode
|
||||
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
|
||||
F extends ((value: infer V, ...args: infer _) => any) ? // if the argument to `then` is callable, extracts the first argument
|
||||
Awaited<V> : // recursively unwrap the value
|
||||
never : // the argument to `then` was not callable
|
||||
T; // non-object or non-thenable
|
||||
|
||||
interface ArrayLike<T> {
|
||||
readonly length: number;
|
||||
|
@ -1664,7 +1669,7 @@ type Uncapitalize<S extends string> = intrinsic;
|
|||
/**
|
||||
* Marker for contextual 'this' type
|
||||
*/
|
||||
interface ThisType<T> { }
|
||||
interface ThisType<T> {}
|
||||
|
||||
/**
|
||||
* Stores types to be used with WeakSet, WeakMap, WeakRef, and FinalizationRegistry
|
||||
|
@ -1703,7 +1708,7 @@ type ArrayBufferLike = ArrayBufferTypes[keyof ArrayBufferTypes];
|
|||
|
||||
interface ArrayBufferConstructor {
|
||||
readonly prototype: ArrayBuffer;
|
||||
new(byteLength: number): ArrayBuffer;
|
||||
new (byteLength: number): ArrayBuffer;
|
||||
isView(arg: any): arg is ArrayBufferView;
|
||||
}
|
||||
declare var ArrayBuffer: ArrayBufferConstructor;
|
||||
|
@ -1855,7 +1860,7 @@ interface DataView {
|
|||
|
||||
interface DataViewConstructor {
|
||||
readonly prototype: DataView;
|
||||
new(buffer: ArrayBufferLike & { BYTES_PER_ELEMENT?: never }, byteOffset?: number, byteLength?: number): DataView;
|
||||
new (buffer: ArrayBufferLike & { BYTES_PER_ELEMENT?: never; }, byteOffset?: number, byteLength?: number): DataView;
|
||||
}
|
||||
declare var DataView: DataViewConstructor;
|
||||
|
||||
|
@ -2108,9 +2113,9 @@ interface Int8Array {
|
|||
}
|
||||
interface Int8ArrayConstructor {
|
||||
readonly prototype: Int8Array;
|
||||
new(length: number): Int8Array;
|
||||
new(array: ArrayLike<number> | ArrayBufferLike): Int8Array;
|
||||
new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int8Array;
|
||||
new (length: number): Int8Array;
|
||||
new (array: ArrayLike<number> | ArrayBufferLike): Int8Array;
|
||||
new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int8Array;
|
||||
|
||||
/**
|
||||
* The size in bytes of each element in the array.
|
||||
|
@ -2136,8 +2141,6 @@ interface Int8ArrayConstructor {
|
|||
* @param thisArg Value of 'this' used to invoke the mapfn.
|
||||
*/
|
||||
from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array;
|
||||
|
||||
|
||||
}
|
||||
declare var Int8Array: Int8ArrayConstructor;
|
||||
|
||||
|
@ -2391,9 +2394,9 @@ interface Uint8Array {
|
|||
|
||||
interface Uint8ArrayConstructor {
|
||||
readonly prototype: Uint8Array;
|
||||
new(length: number): Uint8Array;
|
||||
new(array: ArrayLike<number> | ArrayBufferLike): Uint8Array;
|
||||
new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8Array;
|
||||
new (length: number): Uint8Array;
|
||||
new (array: ArrayLike<number> | ArrayBufferLike): Uint8Array;
|
||||
new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8Array;
|
||||
|
||||
/**
|
||||
* The size in bytes of each element in the array.
|
||||
|
@ -2419,7 +2422,6 @@ interface Uint8ArrayConstructor {
|
|||
* @param thisArg Value of 'this' used to invoke the mapfn.
|
||||
*/
|
||||
from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array;
|
||||
|
||||
}
|
||||
declare var Uint8Array: Uint8ArrayConstructor;
|
||||
|
||||
|
@ -2673,9 +2675,9 @@ interface Uint8ClampedArray {
|
|||
|
||||
interface Uint8ClampedArrayConstructor {
|
||||
readonly prototype: Uint8ClampedArray;
|
||||
new(length: number): Uint8ClampedArray;
|
||||
new(array: ArrayLike<number> | ArrayBufferLike): Uint8ClampedArray;
|
||||
new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8ClampedArray;
|
||||
new (length: number): Uint8ClampedArray;
|
||||
new (array: ArrayLike<number> | ArrayBufferLike): Uint8ClampedArray;
|
||||
new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8ClampedArray;
|
||||
|
||||
/**
|
||||
* The size in bytes of each element in the array.
|
||||
|
@ -2953,9 +2955,9 @@ interface Int16Array {
|
|||
|
||||
interface Int16ArrayConstructor {
|
||||
readonly prototype: Int16Array;
|
||||
new(length: number): Int16Array;
|
||||
new(array: ArrayLike<number> | ArrayBufferLike): Int16Array;
|
||||
new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int16Array;
|
||||
new (length: number): Int16Array;
|
||||
new (array: ArrayLike<number> | ArrayBufferLike): Int16Array;
|
||||
new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int16Array;
|
||||
|
||||
/**
|
||||
* The size in bytes of each element in the array.
|
||||
|
@ -2981,8 +2983,6 @@ interface Int16ArrayConstructor {
|
|||
* @param thisArg Value of 'this' used to invoke the mapfn.
|
||||
*/
|
||||
from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array;
|
||||
|
||||
|
||||
}
|
||||
declare var Int16Array: Int16ArrayConstructor;
|
||||
|
||||
|
@ -3236,9 +3236,9 @@ interface Uint16Array {
|
|||
|
||||
interface Uint16ArrayConstructor {
|
||||
readonly prototype: Uint16Array;
|
||||
new(length: number): Uint16Array;
|
||||
new(array: ArrayLike<number> | ArrayBufferLike): Uint16Array;
|
||||
new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint16Array;
|
||||
new (length: number): Uint16Array;
|
||||
new (array: ArrayLike<number> | ArrayBufferLike): Uint16Array;
|
||||
new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint16Array;
|
||||
|
||||
/**
|
||||
* The size in bytes of each element in the array.
|
||||
|
@ -3264,8 +3264,6 @@ interface Uint16ArrayConstructor {
|
|||
* @param thisArg Value of 'this' used to invoke the mapfn.
|
||||
*/
|
||||
from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array;
|
||||
|
||||
|
||||
}
|
||||
declare var Uint16Array: Uint16ArrayConstructor;
|
||||
/**
|
||||
|
@ -3518,9 +3516,9 @@ interface Int32Array {
|
|||
|
||||
interface Int32ArrayConstructor {
|
||||
readonly prototype: Int32Array;
|
||||
new(length: number): Int32Array;
|
||||
new(array: ArrayLike<number> | ArrayBufferLike): Int32Array;
|
||||
new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int32Array;
|
||||
new (length: number): Int32Array;
|
||||
new (array: ArrayLike<number> | ArrayBufferLike): Int32Array;
|
||||
new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int32Array;
|
||||
|
||||
/**
|
||||
* The size in bytes of each element in the array.
|
||||
|
@ -3546,7 +3544,6 @@ interface Int32ArrayConstructor {
|
|||
* @param thisArg Value of 'this' used to invoke the mapfn.
|
||||
*/
|
||||
from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array;
|
||||
|
||||
}
|
||||
declare var Int32Array: Int32ArrayConstructor;
|
||||
|
||||
|
@ -3799,9 +3796,9 @@ interface Uint32Array {
|
|||
|
||||
interface Uint32ArrayConstructor {
|
||||
readonly prototype: Uint32Array;
|
||||
new(length: number): Uint32Array;
|
||||
new(array: ArrayLike<number> | ArrayBufferLike): Uint32Array;
|
||||
new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint32Array;
|
||||
new (length: number): Uint32Array;
|
||||
new (array: ArrayLike<number> | ArrayBufferLike): Uint32Array;
|
||||
new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint32Array;
|
||||
|
||||
/**
|
||||
* The size in bytes of each element in the array.
|
||||
|
@ -3827,7 +3824,6 @@ interface Uint32ArrayConstructor {
|
|||
* @param thisArg Value of 'this' used to invoke the mapfn.
|
||||
*/
|
||||
from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array;
|
||||
|
||||
}
|
||||
declare var Uint32Array: Uint32ArrayConstructor;
|
||||
|
||||
|
@ -4081,9 +4077,9 @@ interface Float32Array {
|
|||
|
||||
interface Float32ArrayConstructor {
|
||||
readonly prototype: Float32Array;
|
||||
new(length: number): Float32Array;
|
||||
new(array: ArrayLike<number> | ArrayBufferLike): Float32Array;
|
||||
new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Float32Array;
|
||||
new (length: number): Float32Array;
|
||||
new (array: ArrayLike<number> | ArrayBufferLike): Float32Array;
|
||||
new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Float32Array;
|
||||
|
||||
/**
|
||||
* The size in bytes of each element in the array.
|
||||
|
@ -4109,8 +4105,6 @@ interface Float32ArrayConstructor {
|
|||
* @param thisArg Value of 'this' used to invoke the mapfn.
|
||||
*/
|
||||
from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array;
|
||||
|
||||
|
||||
}
|
||||
declare var Float32Array: Float32ArrayConstructor;
|
||||
|
||||
|
@ -4364,9 +4358,9 @@ interface Float64Array {
|
|||
|
||||
interface Float64ArrayConstructor {
|
||||
readonly prototype: Float64Array;
|
||||
new(length: number): Float64Array;
|
||||
new(array: ArrayLike<number> | ArrayBufferLike): Float64Array;
|
||||
new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Float64Array;
|
||||
new (length: number): Float64Array;
|
||||
new (array: ArrayLike<number> | ArrayBufferLike): Float64Array;
|
||||
new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Float64Array;
|
||||
|
||||
/**
|
||||
* The size in bytes of each element in the array.
|
||||
|
@ -4392,7 +4386,6 @@ interface Float64ArrayConstructor {
|
|||
* @param thisArg Value of 'this' used to invoke the mapfn.
|
||||
*/
|
||||
from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array;
|
||||
|
||||
}
|
||||
declare var Float64Array: Float64ArrayConstructor;
|
||||
|
||||
|
@ -4426,7 +4419,7 @@ declare namespace Intl {
|
|||
resolvedOptions(): ResolvedCollatorOptions;
|
||||
}
|
||||
var Collator: {
|
||||
new(locales?: string | string[], options?: CollatorOptions): Collator;
|
||||
new (locales?: string | string[], options?: CollatorOptions): Collator;
|
||||
(locales?: string | string[], options?: CollatorOptions): Collator;
|
||||
supportedLocalesOf(locales: string | string[], options?: CollatorOptions): string[];
|
||||
};
|
||||
|
@ -4462,7 +4455,7 @@ declare namespace Intl {
|
|||
resolvedOptions(): ResolvedNumberFormatOptions;
|
||||
}
|
||||
var NumberFormat: {
|
||||
new(locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
|
||||
new (locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
|
||||
(locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
|
||||
supportedLocalesOf(locales: string | string[], options?: NumberFormatOptions): string[];
|
||||
readonly prototype: NumberFormat;
|
||||
|
@ -4506,7 +4499,7 @@ declare namespace Intl {
|
|||
resolvedOptions(): ResolvedDateTimeFormatOptions;
|
||||
}
|
||||
var DateTimeFormat: {
|
||||
new(locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
|
||||
new (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
|
||||
(locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
|
||||
supportedLocalesOf(locales: string | string[], options?: DateTimeFormatOptions): string[];
|
||||
readonly prototype: DateTimeFormat;
|
||||
|
|
277
cli/tsc/dts/lib.esnext.array.d.ts
vendored
277
cli/tsc/dts/lib.esnext.array.d.ts
vendored
|
@ -15,283 +15,6 @@ and limitations under the License.
|
|||
|
||||
/// <reference no-default-lib="true"/>
|
||||
|
||||
interface Array<T> {
|
||||
/** Copies and reverses the elements in an array.*/
|
||||
toReversed(): T[];
|
||||
|
||||
/**
|
||||
* Copies and sorts an array.
|
||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
||||
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
||||
* value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
|
||||
* ```ts
|
||||
* [11,2,22,1].sort((a, b) => a - b)
|
||||
* ```
|
||||
*/
|
||||
toSorted(compareFn?: (a: T, b: T) => number): T[];
|
||||
|
||||
/**
|
||||
* Copies and elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
|
||||
* @param start The zero-based location in the array from which to start removing elements.
|
||||
* @param deleteCount The number of elements to remove.
|
||||
* @returns An array containing the elements that were deleted.
|
||||
*/
|
||||
toSpliced(start: number, deleteCount?: number): T[];
|
||||
/**
|
||||
* Copies and removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
|
||||
* @param start The zero-based location in the array from which to start removing elements.
|
||||
* @param deleteCount The number of elements to remove.
|
||||
* @param items Elements to insert into the array in place of the deleted elements.
|
||||
* @returns An array containing the elements that were deleted.
|
||||
*/
|
||||
toSpliced<F>(start: number, deleteCount: number, ...items: F[]): (F | T)[];
|
||||
|
||||
/**
|
||||
* Copies and replaces the element at the given index with the provided value.
|
||||
* @param index The zero-based location in the array for which to replace an element.
|
||||
* @param value Element to insert into the array in place of the replaced element.
|
||||
*/
|
||||
with<F>(index: number, value: F): (F | T)[];
|
||||
}
|
||||
|
||||
interface ReadonlyArray<T> {
|
||||
/** Copies and reverses the elements in an array.*/
|
||||
toReversed(): T[];
|
||||
|
||||
/**
|
||||
* Copies and sorts an array.
|
||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
||||
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
||||
* value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
|
||||
* ```ts
|
||||
* [11,2,22,1].sort((a, b) => a - b)
|
||||
* ```
|
||||
*/
|
||||
toSorted(compareFn?: (a: T, b: T) => number): T[];
|
||||
|
||||
/**
|
||||
* Copies and elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
|
||||
* @param start The zero-based location in the array from which to start removing elements.
|
||||
* @param deleteCount The number of elements to remove.
|
||||
* @returns An array containing the elements that were deleted.
|
||||
*/
|
||||
toSpliced(start: number, deleteCount?: number): T[];
|
||||
/**
|
||||
* Copies and removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
|
||||
* @param start The zero-based location in the array from which to start removing elements.
|
||||
* @param deleteCount The number of elements to remove.
|
||||
* @param items Elements to insert into the array in place of the deleted elements.
|
||||
* @returns An array containing the elements that were deleted.
|
||||
*/
|
||||
toSpliced<F>(start: number, deleteCount: number, ...items: F[]): (F | T)[];
|
||||
|
||||
/**
|
||||
* Copies and replaces the element at the given index with the provided value.
|
||||
* @param index The zero-based location in the array for which to replace an element.
|
||||
* @param value Element to insert into the array in place of the replaced element.
|
||||
*/
|
||||
with<F>(index: number, value: F): (F | T)[];
|
||||
}
|
||||
|
||||
interface Int8Array {
|
||||
/** Copies and reverses the elements in an array.*/
|
||||
toReversed(): Int8Array;
|
||||
|
||||
/**
|
||||
* Copies and sorts an array.
|
||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
||||
* a negative value if first argument is less than second argument, zero if they're equal and a positive
|
||||
* value otherwise. If omitted, the elements are sorted in ascending order.
|
||||
* ```ts
|
||||
* [11,2,22,1].sort((a, b) => a - b)
|
||||
* ```
|
||||
*/
|
||||
toSorted(compareFn?: (a: number, b: number) => number): Int8Array;
|
||||
|
||||
with(index: number, value: number): Int8Array;
|
||||
}
|
||||
|
||||
interface Uint8Array {
|
||||
/** Copies and reverses the elements in an array.*/
|
||||
toReversed(): Uint8Array;
|
||||
|
||||
/**
|
||||
* Copies and sorts an array.
|
||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
||||
* a negative value if first argument is less than second argument, zero if they're equal and a positive
|
||||
* value otherwise. If omitted, the elements are sorted in ascending order.
|
||||
* ```ts
|
||||
* [11,2,22,1].sort((a, b) => a - b)
|
||||
* ```
|
||||
*/
|
||||
toSorted(compareFn?: (a: number, b: number) => number): Uint8Array;
|
||||
|
||||
with(index: number, value: number): Uint8Array;
|
||||
}
|
||||
|
||||
interface Uint8ClampedArray {
|
||||
/** Copies and reverses the elements in an array.*/
|
||||
toReversed(): Uint8ClampedArray;
|
||||
|
||||
/**
|
||||
* Copies and sorts an array.
|
||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
||||
* a negative value if first argument is less than second argument, zero if they're equal and a positive
|
||||
* value otherwise. If omitted, the elements are sorted in ascending order.
|
||||
* ```ts
|
||||
* [11,2,22,1].sort((a, b) => a - b)
|
||||
* ```
|
||||
*/
|
||||
toSorted(compareFn?: (a: number, b: number) => number): Uint8ClampedArray;
|
||||
|
||||
with(index: number, value: number): Uint8ClampedArray;
|
||||
}
|
||||
|
||||
|
||||
interface Int16Array {
|
||||
/** Copies and reverses the elements in an array.*/
|
||||
toReversed(): Int16Array;
|
||||
|
||||
/**
|
||||
* Copies and sorts an array.
|
||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
||||
* a negative value if first argument is less than second argument, zero if they're equal and a positive
|
||||
* value otherwise. If omitted, the elements are sorted in ascending order.
|
||||
* ```ts
|
||||
* [11,2,22,1].sort((a, b) => a - b)
|
||||
* ```
|
||||
*/
|
||||
toSorted(compareFn?: (a: number, b: number) => number): Int16Array;
|
||||
|
||||
with(index: number, value: number): Int16Array;
|
||||
}
|
||||
|
||||
interface Uint16Array {
|
||||
/** Copies and reverses the elements in an array.*/
|
||||
toReversed(): Uint16Array;
|
||||
|
||||
/**
|
||||
* Copies and sorts an array.
|
||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
||||
* a negative value if first argument is less than second argument, zero if they're equal and a positive
|
||||
* value otherwise. If omitted, the elements are sorted in ascending order.
|
||||
* ```ts
|
||||
* [11,2,22,1].sort((a, b) => a - b)
|
||||
* ```
|
||||
*/
|
||||
toSorted(compareFn?: (a: number, b: number) => number): Uint16Array;
|
||||
|
||||
with(index: number, value: number): Uint16Array;
|
||||
}
|
||||
|
||||
interface Int32Array {
|
||||
/** Copies and reverses the elements in an array.*/
|
||||
toReversed(): Int32Array;
|
||||
|
||||
/**
|
||||
* Copies and sorts an array.
|
||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
||||
* a negative value if first argument is less than second argument, zero if they're equal and a positive
|
||||
* value otherwise. If omitted, the elements are sorted in ascending order.
|
||||
* ```ts
|
||||
* [11,2,22,1].sort((a, b) => a - b)
|
||||
* ```
|
||||
*/
|
||||
toSorted(compareFn?: (a: number, b: number) => number): Int32Array;
|
||||
|
||||
with(index: number, value: number): Int32Array;
|
||||
}
|
||||
|
||||
interface Uint32Array {
|
||||
/** Copies and reverses the elements in an array.*/
|
||||
toReversed(): Uint32Array;
|
||||
|
||||
/**
|
||||
* Copies and sorts an array.
|
||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
||||
* a negative value if first argument is less than second argument, zero if they're equal and a positive
|
||||
* value otherwise. If omitted, the elements are sorted in ascending order.
|
||||
* ```ts
|
||||
* [11,2,22,1].sort((a, b) => a - b)
|
||||
* ```
|
||||
*/
|
||||
toSorted(compareFn?: (a: number, b: number) => number): Uint32Array;
|
||||
|
||||
with(index: number, value: number): Uint32Array;
|
||||
}
|
||||
|
||||
interface Float32Array {
|
||||
/** Copies and reverses the elements in an array.*/
|
||||
toReversed(): Float32Array;
|
||||
|
||||
/**
|
||||
* Copies and sorts an array.
|
||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
||||
* a negative value if first argument is less than second argument, zero if they're equal and a positive
|
||||
* value otherwise. If omitted, the elements are sorted in ascending order.
|
||||
* ```ts
|
||||
* [11,2,22,1].sort((a, b) => a - b)
|
||||
* ```
|
||||
*/
|
||||
toSorted(compareFn?: (a: number, b: number) => number): Float32Array;
|
||||
|
||||
with(index: number, value: number): Float32Array;
|
||||
}
|
||||
|
||||
interface Float64Array {
|
||||
/** Copies and reverses the elements in an array.*/
|
||||
toReversed(): Float64Array;
|
||||
|
||||
/**
|
||||
* Copies and sorts an array.
|
||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
||||
* a negative value if first argument is less than second argument, zero if they're equal and a positive
|
||||
* value otherwise. If omitted, the elements are sorted in ascending order.
|
||||
* ```ts
|
||||
* [11,2,22,1].sort((a, b) => a - b)
|
||||
* ```
|
||||
*/
|
||||
toSorted(compareFn?: (a: number, b: number) => number): Float64Array;
|
||||
|
||||
with(index: number, value: number): Float64Array;
|
||||
}
|
||||
|
||||
interface BigInt64Array {
|
||||
/** Copies and reverses the elements in an array.*/
|
||||
toReversed(): BigInt64Array;
|
||||
|
||||
/**
|
||||
* Copies and sorts an array.
|
||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
||||
* a negative value if first argument is less than second argument, zero if they're equal and a positive
|
||||
* value otherwise. If omitted, the elements are sorted in ascending order.
|
||||
* ```ts
|
||||
* [11,2,22,1].sort((a, b) => a - b)
|
||||
* ```
|
||||
*/
|
||||
toSorted(compareFn?: (a: bigint, b: bigint) => number | bigint): BigInt64Array;
|
||||
|
||||
with(index: number, value: number): BigInt64Array;
|
||||
}
|
||||
|
||||
interface BigUint64Array {
|
||||
/** Copies and reverses the elements in an array.*/
|
||||
toReversed(): BigUint64Array;
|
||||
|
||||
/**
|
||||
* Copies and sorts an array.
|
||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
||||
* a negative value if first argument is less than second argument, zero if they're equal and a positive
|
||||
* value otherwise. If omitted, the elements are sorted in ascending order.
|
||||
* ```ts
|
||||
* [11,2,22,1].sort((a, b) => a - b)
|
||||
* ```
|
||||
*/
|
||||
toSorted(compareFn?: (a: bigint, b: bigint) => number | bigint): BigUint64Array;
|
||||
|
||||
with(index: number, value: number): BigUint64Array;
|
||||
}
|
||||
|
||||
// NOTE(bartlomieju): taken from https://github.com/microsoft/TypeScript/issues/50803#issuecomment-1249030430
|
||||
// while we wait for these types to officially ship
|
||||
interface ArrayConstructor {
|
||||
|
|
20
cli/tsc/dts/lib.esnext.disposable.d.ts
vendored
20
cli/tsc/dts/lib.esnext.disposable.d.ts
vendored
|
@ -88,18 +88,18 @@ interface DisposableStack {
|
|||
* constructor() {
|
||||
* // stack will be disposed when exiting constructor for any reason
|
||||
* using stack = new DisposableStack();
|
||||
*
|
||||
*
|
||||
* // get first resource
|
||||
* this.#res1 = stack.use(getResource1());
|
||||
*
|
||||
*
|
||||
* // get second resource. If this fails, both `stack` and `#res1` will be disposed.
|
||||
* this.#res2 = stack.use(getResource2());
|
||||
*
|
||||
*
|
||||
* // all operations succeeded, move resources out of `stack` so that they aren't disposed
|
||||
* // when constructor exits
|
||||
* this.#disposables = stack.move();
|
||||
* }
|
||||
*
|
||||
*
|
||||
* [Symbol.dispose]() {
|
||||
* this.#disposables.dispose();
|
||||
* }
|
||||
|
@ -112,7 +112,7 @@ interface DisposableStack {
|
|||
}
|
||||
|
||||
interface DisposableStackConstructor {
|
||||
new(): DisposableStack;
|
||||
new (): DisposableStack;
|
||||
readonly prototype: DisposableStack;
|
||||
}
|
||||
declare var DisposableStack: DisposableStackConstructor;
|
||||
|
@ -155,18 +155,18 @@ interface AsyncDisposableStack {
|
|||
* constructor() {
|
||||
* // stack will be disposed when exiting constructor for any reason
|
||||
* using stack = new DisposableStack();
|
||||
*
|
||||
*
|
||||
* // get first resource
|
||||
* this.#res1 = stack.use(getResource1());
|
||||
*
|
||||
*
|
||||
* // get second resource. If this fails, both `stack` and `#res1` will be disposed.
|
||||
* this.#res2 = stack.use(getResource2());
|
||||
*
|
||||
*
|
||||
* // all operations succeeded, move resources out of `stack` so that they aren't disposed
|
||||
* // when constructor exits
|
||||
* this.#disposables = stack.move();
|
||||
* }
|
||||
*
|
||||
*
|
||||
* [Symbol.dispose]() {
|
||||
* this.#disposables.dispose();
|
||||
* }
|
||||
|
@ -179,7 +179,7 @@ interface AsyncDisposableStack {
|
|||
}
|
||||
|
||||
interface AsyncDisposableStackConstructor {
|
||||
new(): AsyncDisposableStack;
|
||||
new (): AsyncDisposableStack;
|
||||
readonly prototype: AsyncDisposableStack;
|
||||
}
|
||||
declare var AsyncDisposableStack: AsyncDisposableStackConstructor;
|
||||
|
|
2
cli/tsc/dts/lib.esnext.full.d.ts
vendored
2
cli/tsc/dts/lib.esnext.full.d.ts
vendored
|
@ -20,4 +20,4 @@ and limitations under the License.
|
|||
/// <reference lib="dom" />
|
||||
/// <reference lib="webworker.importscripts" />
|
||||
/// <reference lib="scripthost" />
|
||||
/// <reference lib="dom.iterable" />
|
||||
/// <reference lib="dom.iterable" />
|
||||
|
|
14
cli/tsc/dts/lib.esnext.intl.d.ts
vendored
14
cli/tsc/dts/lib.esnext.intl.d.ts
vendored
|
@ -17,12 +17,12 @@ and limitations under the License.
|
|||
/// <reference no-default-lib="true"/>
|
||||
|
||||
declare namespace Intl {
|
||||
interface NumberRangeFormatPart extends NumberFormatPart {
|
||||
source: "startRange" | "endRange" | "shared"
|
||||
}
|
||||
interface NumberRangeFormatPart extends NumberFormatPart {
|
||||
source: "startRange" | "endRange" | "shared";
|
||||
}
|
||||
|
||||
interface NumberFormat {
|
||||
formatRange(start: number | bigint, end: number | bigint): string;
|
||||
formatRangeToParts(start: number | bigint, end: number | bigint): NumberRangeFormatPart[];
|
||||
}
|
||||
interface NumberFormat {
|
||||
formatRange(start: number | bigint, end: number | bigint): string;
|
||||
formatRangeToParts(start: number | bigint, end: number | bigint): NumberRangeFormatPart[];
|
||||
}
|
||||
}
|
||||
|
|
5
cli/tsc/dts/lib.scripthost.d.ts
vendored
5
cli/tsc/dts/lib.scripthost.d.ts
vendored
|
@ -16,13 +16,10 @@ and limitations under the License.
|
|||
|
||||
/// <reference no-default-lib="true"/>
|
||||
|
||||
|
||||
|
||||
/////////////////////////////
|
||||
/// Windows Script Host APIS
|
||||
/////////////////////////////
|
||||
|
||||
|
||||
interface ActiveXObject {
|
||||
new (s: string): any;
|
||||
}
|
||||
|
@ -262,7 +259,7 @@ interface Enumerator<T = any> {
|
|||
|
||||
interface EnumeratorConstructor {
|
||||
new <T = any>(safearray: SafeArray<T>): Enumerator<T>;
|
||||
new <T = any>(collection: { Item(index: any): T }): Enumerator<T>;
|
||||
new <T = any>(collection: { Item(index: any): T; }): Enumerator<T>;
|
||||
new <T = any>(collection: any): Enumerator<T>;
|
||||
}
|
||||
|
||||
|
|
8
cli/tsc/dts/lib.webworker.d.ts
vendored
8
cli/tsc/dts/lib.webworker.d.ts
vendored
|
@ -2628,7 +2628,7 @@ interface EventTarget {
|
|||
*/
|
||||
addEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): void;
|
||||
/**
|
||||
* Dispatches a synthetic event to event target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
|
||||
* Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
|
||||
*
|
||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
|
||||
*/
|
||||
|
@ -5340,7 +5340,9 @@ interface SubtleCrypto {
|
|||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/exportKey) */
|
||||
exportKey(format: "jwk", key: CryptoKey): Promise<JsonWebKey>;
|
||||
exportKey(format: Exclude<KeyFormat, "jwk">, key: CryptoKey): Promise<ArrayBuffer>;
|
||||
exportKey(format: KeyFormat, key: CryptoKey): Promise<ArrayBuffer | JsonWebKey>;
|
||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey) */
|
||||
generateKey(algorithm: "Ed25519", extractable: boolean, keyUsages: ReadonlyArray<"sign" | "verify">): Promise<CryptoKeyPair>;
|
||||
generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKeyPair>;
|
||||
generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
|
||||
generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair | CryptoKey>;
|
||||
|
@ -9098,7 +9100,7 @@ declare function close(): void;
|
|||
declare function postMessage(message: any, transfer: Transferable[]): void;
|
||||
declare function postMessage(message: any, options?: StructuredSerializeOptions): void;
|
||||
/**
|
||||
* Dispatches a synthetic event to event target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
|
||||
* Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
|
||||
*
|
||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
|
||||
*/
|
||||
|
@ -9138,7 +9140,7 @@ declare var self: WorkerGlobalScope & typeof globalThis;
|
|||
*/
|
||||
declare function importScripts(...urls: (string | URL)[]): void;
|
||||
/**
|
||||
* Dispatches a synthetic event to event target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
|
||||
* Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
|
||||
*
|
||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
|
||||
*/
|
||||
|
|
1
cli/tsc/dts/lib.webworker.importscripts.d.ts
vendored
1
cli/tsc/dts/lib.webworker.importscripts.d.ts
vendored
|
@ -16,7 +16,6 @@ and limitations under the License.
|
|||
|
||||
/// <reference no-default-lib="true"/>
|
||||
|
||||
|
||||
/////////////////////////////
|
||||
/// WorkerGlobalScope APIs
|
||||
/////////////////////////////
|
||||
|
|
4837
cli/tsc/dts/typescript.d.ts
vendored
4837
cli/tsc/dts/typescript.d.ts
vendored
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue