@rindo/core 2.17.4 → 2.22.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/config-flags.d.ts +33 -21
- package/cli/index.cjs +693 -401
- package/cli/index.d.ts +3 -0
- package/cli/index.js +693 -401
- package/cli/package.json +1 -1
- package/compiler/lib.dom.d.ts +898 -184
- package/compiler/lib.dom.iterable.d.ts +22 -4
- package/compiler/lib.es2015.collection.d.ts +62 -1
- package/compiler/lib.es2015.core.d.ts +3 -3
- package/compiler/lib.es2015.iterable.d.ts +2 -1
- package/compiler/lib.es2015.promise.d.ts +9 -4
- package/compiler/lib.es2015.proxy.d.ts +91 -2
- package/compiler/lib.es2015.reflect.d.ts +26 -3
- package/compiler/lib.es2015.symbol.wellknown.d.ts +3 -3
- package/compiler/lib.es2017.intl.d.ts +16 -1
- package/compiler/lib.es2019.d.ts +1 -0
- package/compiler/lib.es2019.intl.d.ts +25 -0
- package/compiler/lib.es2020.bigint.d.ts +7 -5
- package/compiler/lib.es2020.d.ts +2 -0
- package/compiler/lib.es2020.date.d.ts +44 -0
- package/compiler/lib.es2020.intl.d.ts +81 -16
- package/compiler/lib.es2020.number.d.ts +30 -0
- package/compiler/lib.es2021.intl.d.ts +116 -6
- package/compiler/lib.es2022.array.d.ts +123 -0
- package/compiler/lib.es2022.d.ts +27 -0
- package/compiler/lib.es2022.error.d.ts +75 -0
- package/compiler/lib.es2022.full.d.ts +25 -0
- package/compiler/lib.es2022.intl.d.ts +111 -0
- package/compiler/lib.es2022.object.d.ts +28 -0
- package/compiler/lib.es2022.sharedmemory.d.ts +27 -0
- package/compiler/lib.es2022.string.d.ts +27 -0
- package/compiler/lib.es5.d.ts +62 -31
- package/compiler/lib.esnext.d.ts +1 -1
- package/compiler/lib.esnext.intl.d.ts +8 -1
- package/compiler/lib.webworker.d.ts +540 -81
- package/compiler/lib.webworker.iterable.d.ts +19 -4
- package/compiler/package.json +1 -1
- package/compiler/rindo.d.ts +3 -25
- package/compiler/rindo.js +54678 -52205
- package/compiler/rindo.min.js +2 -2
- package/compiler/sys/in-memory-fs.d.ts +218 -0
- package/compiler/transpile.d.ts +32 -0
- package/dependencies.json +12 -1
- package/dev-server/client/app-error.d.ts +1 -1
- package/dev-server/client/index.d.ts +2 -2
- package/dev-server/client/index.js +241 -241
- package/dev-server/client/package.json +1 -1
- package/dev-server/connector.html +3 -3
- package/dev-server/index.d.ts +1 -1
- package/dev-server/index.js +2 -2
- package/dev-server/open-in-editor-api.js +1 -1
- package/dev-server/package.json +1 -1
- package/dev-server/server-process.js +1192 -1158
- package/dev-server/ws.js +1 -1
- package/internal/app-data/package.json +1 -1
- package/internal/client/css-shim.js +2 -2
- package/internal/client/dom.js +1 -1
- package/internal/client/index.js +1130 -823
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +19 -1
- package/internal/client/patch-esm.js +1 -1
- package/internal/client/polyfills/css-shim.js +1 -1
- package/internal/client/shadow-css.js +1 -1
- package/internal/hydrate/index.js +154 -143
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.d.ts +1 -1
- package/internal/hydrate/runner.js +106 -106
- package/internal/package.json +1 -1
- package/internal/rindo-core/index.d.ts +9 -10
- package/internal/rindo-private.d.ts +149 -184
- package/internal/rindo-public-compiler.d.ts +83 -38
- package/internal/rindo-public-docs.d.ts +24 -0
- package/internal/rindo-public-runtime.d.ts +79 -7
- package/internal/testing/index.js +187 -175
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +526 -501
- package/mock-doc/index.d.ts +15 -14
- package/mock-doc/index.js +526 -501
- package/mock-doc/package.json +1 -1
- package/package.json +48 -59
- package/readme.md +44 -31
- package/screenshot/compare/build/p-f4745c2f.entry.js +1 -1
- package/screenshot/index.d.ts +1 -1
- package/screenshot/index.js +13 -13
- package/screenshot/package.json +1 -1
- package/screenshot/pixel-match.js +983 -849
- package/sys/node/autoprefixer.js +2 -2
- package/sys/node/glob.js +1 -1
- package/sys/node/index.d.ts +4 -0
- package/sys/node/index.js +399 -413
- package/sys/node/package.json +1 -1
- package/sys/node/prompts.js +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.d.ts +6 -6
- package/testing/index.js +684 -839
- package/testing/jest/jest-config.d.ts +1 -1
- package/testing/jest/jest-preprocessor.d.ts +3 -3
- package/testing/jest/jest-serializer.d.ts +1 -2
- package/testing/matchers/index.d.ts +3 -3
- package/testing/mock-fetch.d.ts +1 -1
- package/testing/mocks.d.ts +2 -2
- package/testing/package.json +1 -1
- package/testing/puppeteer/puppeteer-declarations.d.ts +5 -5
- package/testing/puppeteer/puppeteer-element.d.ts +2 -2
- package/testing/puppeteer/puppeteer-events.d.ts +1 -1
- package/testing/testing-logger.d.ts +1 -1
- package/testing/testing-utils.d.ts +6 -5
- package/testing/testing.d.ts +1 -1
|
@@ -0,0 +1,111 @@
|
|
|
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
|
+
|
|
23
|
+
/**
|
|
24
|
+
* An object with some or all properties of the `Intl.Segmenter` constructor `options` parameter.
|
|
25
|
+
*
|
|
26
|
+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/Segmenter#parameters)
|
|
27
|
+
*/
|
|
28
|
+
interface SegmenterOptions {
|
|
29
|
+
/** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */
|
|
30
|
+
localeMatcher?: "best fit" | "lookup" | undefined;
|
|
31
|
+
/** The type of input to be split */
|
|
32
|
+
granularity?: "grapheme" | "word" | "sentence" | undefined;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
interface Segmenter {
|
|
36
|
+
/**
|
|
37
|
+
* Returns `Segments` object containing the segments of the input string, using the segmenter's locale and granularity.
|
|
38
|
+
*
|
|
39
|
+
* @param input - The text to be segmented as a `string`.
|
|
40
|
+
*
|
|
41
|
+
* @returns A new iterable Segments object containing the segments of the input string, using the segmenter's locale and granularity.
|
|
42
|
+
*/
|
|
43
|
+
segment(input: string): Segments;
|
|
44
|
+
resolvedOptions(): ResolvedSegmenterOptions;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
interface ResolvedSegmenterOptions {
|
|
48
|
+
locale: string;
|
|
49
|
+
granularity: "grapheme" | "word" | "sentence";
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
interface Segments {
|
|
53
|
+
/**
|
|
54
|
+
* Returns an object describing the segment in the original string that includes the code unit at a specified index.
|
|
55
|
+
*
|
|
56
|
+
* @param codeUnitIndex - A number specifying the index of the code unit in the original input string. If the value is omitted, it defaults to `0`.
|
|
57
|
+
*/
|
|
58
|
+
containing(codeUnitIndex?: number): SegmentData;
|
|
59
|
+
|
|
60
|
+
/** Returns an iterator to iterate over the segments. */
|
|
61
|
+
[Symbol.iterator](): IterableIterator<SegmentData>;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
interface SegmentData {
|
|
65
|
+
/** A string containing the segment extracted from the original input string. */
|
|
66
|
+
segment: string;
|
|
67
|
+
/** The code unit index in the original input string at which the segment begins. */
|
|
68
|
+
index: number;
|
|
69
|
+
/** The complete input string that was segmented. */
|
|
70
|
+
input: string;
|
|
71
|
+
/**
|
|
72
|
+
* A boolean value only if granularity is "word"; otherwise, undefined.
|
|
73
|
+
* If granularity is "word", then isWordLike is true when the segment is word-like (i.e., consists of letters/numbers/ideographs/etc.); otherwise, false.
|
|
74
|
+
*/
|
|
75
|
+
isWordLike?: boolean;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const Segmenter: {
|
|
79
|
+
prototype: Segmenter;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Creates a new `Intl.Segmenter` object.
|
|
83
|
+
*
|
|
84
|
+
* @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings.
|
|
85
|
+
* For the general form and interpretation of the `locales` argument,
|
|
86
|
+
* see the [`Intl` page](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
|
|
87
|
+
*
|
|
88
|
+
* @param options - An [object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/Segmenter#parameters)
|
|
89
|
+
* with some or all options of `SegmenterOptions`.
|
|
90
|
+
*
|
|
91
|
+
* @returns [Intl.Segmenter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segments) object.
|
|
92
|
+
*
|
|
93
|
+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter).
|
|
94
|
+
*/
|
|
95
|
+
new(locales?: BCP47LanguageTag | BCP47LanguageTag[], options?: SegmenterOptions): Segmenter;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Returns an array containing those of the provided locales that are supported without having to fall back to the runtime's default locale.
|
|
99
|
+
*
|
|
100
|
+
* @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings.
|
|
101
|
+
* For the general form and interpretation of the `locales` argument,
|
|
102
|
+
* see the [`Intl` page](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
|
|
103
|
+
*
|
|
104
|
+
* @param options An [object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/supportedLocalesOf#parameters).
|
|
105
|
+
* with some or all possible options.
|
|
106
|
+
*
|
|
107
|
+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/supportedLocalesOf)
|
|
108
|
+
*/
|
|
109
|
+
supportedLocalesOf(locales: BCP47LanguageTag | BCP47LanguageTag[], options?: Pick<SegmenterOptions, "localeMatcher">): BCP47LanguageTag[];
|
|
110
|
+
};
|
|
111
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*! *****************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
4
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
5
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
8
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
9
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
10
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
11
|
+
|
|
12
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
13
|
+
and limitations under the License.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
/// <reference no-default-lib="true"/>
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
interface ObjectConstructor {
|
|
22
|
+
/**
|
|
23
|
+
* Determines whether an object has a property with the specified name.
|
|
24
|
+
* @param o An object.
|
|
25
|
+
* @param v A property name.
|
|
26
|
+
*/
|
|
27
|
+
hasOwn(o: object, v: PropertyKey): boolean;
|
|
28
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*! *****************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
4
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
5
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
8
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
9
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
10
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
11
|
+
|
|
12
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
13
|
+
and limitations under the License.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
/// <reference no-default-lib="true"/>
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
interface Atomics {
|
|
22
|
+
/**
|
|
23
|
+
* A non-blocking, asynchronous version of wait which is usable on the main thread.
|
|
24
|
+
* Waits asynchronously on a shared memory location and returns a Promise
|
|
25
|
+
*/
|
|
26
|
+
waitAsync(typedArray: BigInt64Array | Int32Array, index: number, value: bigint, timeout?: number): { async: false, value: "ok" | "not-equal" | "timed-out" } | { async: true, value: Promise<"ok" | "not-equal" | "timed-out"> };
|
|
27
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*! *****************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
4
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
5
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
8
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
9
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
10
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
11
|
+
|
|
12
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
13
|
+
and limitations under the License.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
/// <reference no-default-lib="true"/>
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
interface String {
|
|
22
|
+
/**
|
|
23
|
+
* Returns a new String consisting of the single UTF-16 code unit located at the specified index.
|
|
24
|
+
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
|
|
25
|
+
*/
|
|
26
|
+
at(index: number): string | undefined;
|
|
27
|
+
}
|
package/compiler/lib.es5.d.ts
CHANGED
|
@@ -72,13 +72,13 @@ declare function decodeURIComponent(encodedURIComponent: string): string;
|
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
74
|
* Encodes a text string as a valid Uniform Resource Identifier (URI)
|
|
75
|
-
* @param uri A value representing an
|
|
75
|
+
* @param uri A value representing an unencoded URI.
|
|
76
76
|
*/
|
|
77
77
|
declare function encodeURI(uri: string): string;
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
80
|
* Encodes a text string as a valid component of a Uniform Resource Identifier (URI).
|
|
81
|
-
* @param uriComponent A value representing an
|
|
81
|
+
* @param uriComponent A value representing an unencoded URI component.
|
|
82
82
|
*/
|
|
83
83
|
declare function encodeURIComponent(uriComponent: string | number | boolean): string;
|
|
84
84
|
|
|
@@ -116,7 +116,7 @@ interface PropertyDescriptor {
|
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
interface PropertyDescriptorMap {
|
|
119
|
-
[
|
|
119
|
+
[key: PropertyKey]: PropertyDescriptor;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
interface Object {
|
|
@@ -216,15 +216,15 @@ interface ObjectConstructor {
|
|
|
216
216
|
|
|
217
217
|
/**
|
|
218
218
|
* Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
|
|
219
|
-
* @param
|
|
219
|
+
* @param f Object on which to lock the attributes.
|
|
220
220
|
*/
|
|
221
|
-
freeze<T>(
|
|
221
|
+
freeze<T extends Function>(f: T): T;
|
|
222
222
|
|
|
223
223
|
/**
|
|
224
224
|
* Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
|
|
225
|
-
* @param
|
|
225
|
+
* @param o Object on which to lock the attributes.
|
|
226
226
|
*/
|
|
227
|
-
freeze<T extends
|
|
227
|
+
freeze<T extends {[idx: string]: U | null | undefined | object}, U extends string | bigint | number | boolean | symbol>(o: T): Readonly<T>;
|
|
228
228
|
|
|
229
229
|
/**
|
|
230
230
|
* Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
|
|
@@ -320,7 +320,7 @@ declare var Function: FunctionConstructor;
|
|
|
320
320
|
/**
|
|
321
321
|
* Extracts the type of the 'this' parameter of a function type, or 'unknown' if the function type has no 'this' parameter.
|
|
322
322
|
*/
|
|
323
|
-
type ThisParameterType<T> = T extends (this: infer U, ...args:
|
|
323
|
+
type ThisParameterType<T> = T extends (this: infer U, ...args: never) => any ? U : unknown;
|
|
324
324
|
|
|
325
325
|
/**
|
|
326
326
|
* Removes the 'this' parameter from a function type.
|
|
@@ -443,8 +443,8 @@ interface String {
|
|
|
443
443
|
|
|
444
444
|
/**
|
|
445
445
|
* Replaces text in a string, using a regular expression or search string.
|
|
446
|
-
* @param searchValue A string to search for.
|
|
447
|
-
* @param replaceValue A string containing the text to replace
|
|
446
|
+
* @param searchValue A string or regular expression to search for.
|
|
447
|
+
* @param replaceValue A string containing the text to replace. When the {@linkcode searchValue} is a `RegExp`, all matches are replaced if the `g` flag is set (or only those matches at the beginning, if the `y` flag is also present). Otherwise, only the first match of {@linkcode searchValue} is replaced.
|
|
448
448
|
*/
|
|
449
449
|
replace(searchValue: string | RegExp, replaceValue: string): string;
|
|
450
450
|
|
|
@@ -902,7 +902,17 @@ interface Date {
|
|
|
902
902
|
interface DateConstructor {
|
|
903
903
|
new(): Date;
|
|
904
904
|
new(value: number | string): Date;
|
|
905
|
-
|
|
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;
|
|
906
916
|
(): string;
|
|
907
917
|
readonly prototype: Date;
|
|
908
918
|
/**
|
|
@@ -913,27 +923,48 @@ interface DateConstructor {
|
|
|
913
923
|
/**
|
|
914
924
|
* Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.
|
|
915
925
|
* @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.
|
|
916
|
-
* @param
|
|
926
|
+
* @param monthIndex The month as a number between 0 and 11 (January to December).
|
|
917
927
|
* @param date The date as a number between 1 and 31.
|
|
918
928
|
* @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour.
|
|
919
929
|
* @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes.
|
|
920
930
|
* @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds.
|
|
921
931
|
* @param ms A number from 0 to 999 that specifies the milliseconds.
|
|
922
932
|
*/
|
|
923
|
-
UTC(year: number,
|
|
933
|
+
UTC(year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;
|
|
934
|
+
/** Returns the number of milliseconds elapsed since midnight, January 1, 1970 Universal Coordinated Time (UTC). */
|
|
924
935
|
now(): number;
|
|
925
936
|
}
|
|
926
937
|
|
|
927
938
|
declare var Date: DateConstructor;
|
|
928
939
|
|
|
929
940
|
interface RegExpMatchArray extends Array<string> {
|
|
941
|
+
/**
|
|
942
|
+
* The index of the search at which the result was found.
|
|
943
|
+
*/
|
|
930
944
|
index?: number;
|
|
945
|
+
/**
|
|
946
|
+
* A copy of the search string.
|
|
947
|
+
*/
|
|
931
948
|
input?: string;
|
|
949
|
+
/**
|
|
950
|
+
* The first match. This will always be present because `null` will be returned if there are no matches.
|
|
951
|
+
*/
|
|
952
|
+
0: string;
|
|
932
953
|
}
|
|
933
954
|
|
|
934
955
|
interface RegExpExecArray extends Array<string> {
|
|
956
|
+
/**
|
|
957
|
+
* The index of the search at which the result was found.
|
|
958
|
+
*/
|
|
935
959
|
index: number;
|
|
960
|
+
/**
|
|
961
|
+
* A copy of the search string.
|
|
962
|
+
*/
|
|
936
963
|
input: string;
|
|
964
|
+
/**
|
|
965
|
+
* The first match. This will always be present because `null` will be returned if there are no matches.
|
|
966
|
+
*/
|
|
967
|
+
0: string;
|
|
937
968
|
}
|
|
938
969
|
|
|
939
970
|
interface RegExp {
|
|
@@ -1514,8 +1545,8 @@ interface Promise<T> {
|
|
|
1514
1545
|
*/
|
|
1515
1546
|
type Awaited<T> =
|
|
1516
1547
|
T extends null | undefined ? T : // special case for `null | undefined` when not in `--strictNullChecks` mode
|
|
1517
|
-
T extends object & { then(onfulfilled: infer F): any } ? // `await` only unwraps object types with a callable `then`. Non-object types are not unwrapped
|
|
1518
|
-
F extends ((value: infer V, ...args:
|
|
1548
|
+
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
|
|
1549
|
+
F extends ((value: infer V, ...args: infer _) => any) ? // if the argument to `then` is callable, extracts the first argument
|
|
1519
1550
|
Awaited<V> : // recursively unwrap the value
|
|
1520
1551
|
never : // the argument to `then` was not callable
|
|
1521
1552
|
T; // non-object or non-thenable
|
|
@@ -1578,7 +1609,7 @@ type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;
|
|
|
1578
1609
|
/**
|
|
1579
1610
|
* Exclude null and undefined from T
|
|
1580
1611
|
*/
|
|
1581
|
-
type NonNullable<T> = T
|
|
1612
|
+
type NonNullable<T> = T & {};
|
|
1582
1613
|
|
|
1583
1614
|
/**
|
|
1584
1615
|
* Obtain the parameters of a function type in a tuple
|
|
@@ -1683,6 +1714,7 @@ interface DataView {
|
|
|
1683
1714
|
* Gets the Float32 value at the specified byte offset from the start of the view. There is
|
|
1684
1715
|
* no alignment constraint; multi-byte values may be fetched from any offset.
|
|
1685
1716
|
* @param byteOffset The place in the buffer at which the value should be retrieved.
|
|
1717
|
+
* @param littleEndian If false or undefined, a big-endian value should be read.
|
|
1686
1718
|
*/
|
|
1687
1719
|
getFloat32(byteOffset: number, littleEndian?: boolean): number;
|
|
1688
1720
|
|
|
@@ -1690,6 +1722,7 @@ interface DataView {
|
|
|
1690
1722
|
* Gets the Float64 value at the specified byte offset from the start of the view. There is
|
|
1691
1723
|
* no alignment constraint; multi-byte values may be fetched from any offset.
|
|
1692
1724
|
* @param byteOffset The place in the buffer at which the value should be retrieved.
|
|
1725
|
+
* @param littleEndian If false or undefined, a big-endian value should be read.
|
|
1693
1726
|
*/
|
|
1694
1727
|
getFloat64(byteOffset: number, littleEndian?: boolean): number;
|
|
1695
1728
|
|
|
@@ -1704,12 +1737,14 @@ interface DataView {
|
|
|
1704
1737
|
* Gets the Int16 value at the specified byte offset from the start of the view. There is
|
|
1705
1738
|
* no alignment constraint; multi-byte values may be fetched from any offset.
|
|
1706
1739
|
* @param byteOffset The place in the buffer at which the value should be retrieved.
|
|
1740
|
+
* @param littleEndian If false or undefined, a big-endian value should be read.
|
|
1707
1741
|
*/
|
|
1708
1742
|
getInt16(byteOffset: number, littleEndian?: boolean): number;
|
|
1709
1743
|
/**
|
|
1710
1744
|
* Gets the Int32 value at the specified byte offset from the start of the view. There is
|
|
1711
1745
|
* no alignment constraint; multi-byte values may be fetched from any offset.
|
|
1712
1746
|
* @param byteOffset The place in the buffer at which the value should be retrieved.
|
|
1747
|
+
* @param littleEndian If false or undefined, a big-endian value should be read.
|
|
1713
1748
|
*/
|
|
1714
1749
|
getInt32(byteOffset: number, littleEndian?: boolean): number;
|
|
1715
1750
|
|
|
@@ -1724,6 +1759,7 @@ interface DataView {
|
|
|
1724
1759
|
* Gets the Uint16 value at the specified byte offset from the start of the view. There is
|
|
1725
1760
|
* no alignment constraint; multi-byte values may be fetched from any offset.
|
|
1726
1761
|
* @param byteOffset The place in the buffer at which the value should be retrieved.
|
|
1762
|
+
* @param littleEndian If false or undefined, a big-endian value should be read.
|
|
1727
1763
|
*/
|
|
1728
1764
|
getUint16(byteOffset: number, littleEndian?: boolean): number;
|
|
1729
1765
|
|
|
@@ -1731,6 +1767,7 @@ interface DataView {
|
|
|
1731
1767
|
* Gets the Uint32 value at the specified byte offset from the start of the view. There is
|
|
1732
1768
|
* no alignment constraint; multi-byte values may be fetched from any offset.
|
|
1733
1769
|
* @param byteOffset The place in the buffer at which the value should be retrieved.
|
|
1770
|
+
* @param littleEndian If false or undefined, a big-endian value should be read.
|
|
1734
1771
|
*/
|
|
1735
1772
|
getUint32(byteOffset: number, littleEndian?: boolean): number;
|
|
1736
1773
|
|
|
@@ -1738,8 +1775,7 @@ interface DataView {
|
|
|
1738
1775
|
* Stores an Float32 value at the specified byte offset from the start of the view.
|
|
1739
1776
|
* @param byteOffset The place in the buffer at which the value should be set.
|
|
1740
1777
|
* @param value The value to set.
|
|
1741
|
-
* @param littleEndian If false or undefined, a big-endian value should be written
|
|
1742
|
-
* otherwise a little-endian value should be written.
|
|
1778
|
+
* @param littleEndian If false or undefined, a big-endian value should be written.
|
|
1743
1779
|
*/
|
|
1744
1780
|
setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void;
|
|
1745
1781
|
|
|
@@ -1747,8 +1783,7 @@ interface DataView {
|
|
|
1747
1783
|
* Stores an Float64 value at the specified byte offset from the start of the view.
|
|
1748
1784
|
* @param byteOffset The place in the buffer at which the value should be set.
|
|
1749
1785
|
* @param value The value to set.
|
|
1750
|
-
* @param littleEndian If false or undefined, a big-endian value should be written
|
|
1751
|
-
* otherwise a little-endian value should be written.
|
|
1786
|
+
* @param littleEndian If false or undefined, a big-endian value should be written.
|
|
1752
1787
|
*/
|
|
1753
1788
|
setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void;
|
|
1754
1789
|
|
|
@@ -1763,8 +1798,7 @@ interface DataView {
|
|
|
1763
1798
|
* Stores an Int16 value at the specified byte offset from the start of the view.
|
|
1764
1799
|
* @param byteOffset The place in the buffer at which the value should be set.
|
|
1765
1800
|
* @param value The value to set.
|
|
1766
|
-
* @param littleEndian If false or undefined, a big-endian value should be written
|
|
1767
|
-
* otherwise a little-endian value should be written.
|
|
1801
|
+
* @param littleEndian If false or undefined, a big-endian value should be written.
|
|
1768
1802
|
*/
|
|
1769
1803
|
setInt16(byteOffset: number, value: number, littleEndian?: boolean): void;
|
|
1770
1804
|
|
|
@@ -1772,8 +1806,7 @@ interface DataView {
|
|
|
1772
1806
|
* Stores an Int32 value at the specified byte offset from the start of the view.
|
|
1773
1807
|
* @param byteOffset The place in the buffer at which the value should be set.
|
|
1774
1808
|
* @param value The value to set.
|
|
1775
|
-
* @param littleEndian If false or undefined, a big-endian value should be written
|
|
1776
|
-
* otherwise a little-endian value should be written.
|
|
1809
|
+
* @param littleEndian If false or undefined, a big-endian value should be written.
|
|
1777
1810
|
*/
|
|
1778
1811
|
setInt32(byteOffset: number, value: number, littleEndian?: boolean): void;
|
|
1779
1812
|
|
|
@@ -1788,8 +1821,7 @@ interface DataView {
|
|
|
1788
1821
|
* Stores an Uint16 value at the specified byte offset from the start of the view.
|
|
1789
1822
|
* @param byteOffset The place in the buffer at which the value should be set.
|
|
1790
1823
|
* @param value The value to set.
|
|
1791
|
-
* @param littleEndian If false or undefined, a big-endian value should be written
|
|
1792
|
-
* otherwise a little-endian value should be written.
|
|
1824
|
+
* @param littleEndian If false or undefined, a big-endian value should be written.
|
|
1793
1825
|
*/
|
|
1794
1826
|
setUint16(byteOffset: number, value: number, littleEndian?: boolean): void;
|
|
1795
1827
|
|
|
@@ -1797,8 +1829,7 @@ interface DataView {
|
|
|
1797
1829
|
* Stores an Uint32 value at the specified byte offset from the start of the view.
|
|
1798
1830
|
* @param byteOffset The place in the buffer at which the value should be set.
|
|
1799
1831
|
* @param value The value to set.
|
|
1800
|
-
* @param littleEndian If false or undefined, a big-endian value should be written
|
|
1801
|
-
* otherwise a little-endian value should be written.
|
|
1832
|
+
* @param littleEndian If false or undefined, a big-endian value should be written.
|
|
1802
1833
|
*/
|
|
1803
1834
|
setUint32(byteOffset: number, value: number, littleEndian?: boolean): void;
|
|
1804
1835
|
}
|
|
@@ -4375,7 +4406,6 @@ declare namespace Intl {
|
|
|
4375
4406
|
localeMatcher?: string | undefined;
|
|
4376
4407
|
style?: string | undefined;
|
|
4377
4408
|
currency?: string | undefined;
|
|
4378
|
-
currencyDisplay?: string | undefined;
|
|
4379
4409
|
currencySign?: string | undefined;
|
|
4380
4410
|
useGrouping?: boolean | undefined;
|
|
4381
4411
|
minimumIntegerDigits?: number | undefined;
|
|
@@ -4390,7 +4420,6 @@ declare namespace Intl {
|
|
|
4390
4420
|
numberingSystem: string;
|
|
4391
4421
|
style: string;
|
|
4392
4422
|
currency?: string;
|
|
4393
|
-
currencyDisplay?: string;
|
|
4394
4423
|
minimumIntegerDigits: number;
|
|
4395
4424
|
minimumFractionDigits: number;
|
|
4396
4425
|
maximumFractionDigits: number;
|
|
@@ -4407,6 +4436,7 @@ declare namespace Intl {
|
|
|
4407
4436
|
new(locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
|
|
4408
4437
|
(locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
|
|
4409
4438
|
supportedLocalesOf(locales: string | string[], options?: NumberFormatOptions): string[];
|
|
4439
|
+
readonly prototype: NumberFormat;
|
|
4410
4440
|
};
|
|
4411
4441
|
|
|
4412
4442
|
interface DateTimeFormatOptions {
|
|
@@ -4419,7 +4449,7 @@ declare namespace Intl {
|
|
|
4419
4449
|
hour?: "numeric" | "2-digit" | undefined;
|
|
4420
4450
|
minute?: "numeric" | "2-digit" | undefined;
|
|
4421
4451
|
second?: "numeric" | "2-digit" | undefined;
|
|
4422
|
-
timeZoneName?: "long" | "
|
|
4452
|
+
timeZoneName?: "short" | "long" | "shortOffset" | "longOffset" | "shortGeneric" | "longGeneric" | undefined;
|
|
4423
4453
|
formatMatcher?: "best fit" | "basic" | undefined;
|
|
4424
4454
|
hour12?: boolean | undefined;
|
|
4425
4455
|
timeZone?: string | undefined;
|
|
@@ -4450,6 +4480,7 @@ declare namespace Intl {
|
|
|
4450
4480
|
new(locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
|
|
4451
4481
|
(locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
|
|
4452
4482
|
supportedLocalesOf(locales: string | string[], options?: DateTimeFormatOptions): string[];
|
|
4483
|
+
readonly prototype: DateTimeFormat;
|
|
4453
4484
|
};
|
|
4454
4485
|
}
|
|
4455
4486
|
|
package/compiler/lib.esnext.d.ts
CHANGED
|
@@ -19,5 +19,12 @@ and limitations under the License.
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
declare namespace Intl {
|
|
22
|
-
|
|
22
|
+
interface NumberRangeFormatPart extends NumberFormatPart {
|
|
23
|
+
source: "startRange" | "endRange" | "shared"
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
interface NumberFormat {
|
|
27
|
+
formatRange(start: number | bigint, end: number | bigint): string;
|
|
28
|
+
formatRangeToParts(start: number | bigint, end: number | bigint): NumberRangeFormatPart[];
|
|
29
|
+
}
|
|
23
30
|
}
|