strict-ts-lib-v5.0 0.4.0

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.
Files changed (77) hide show
  1. package/README.md +28 -0
  2. package/libs/decorators/index.d.ts +344 -0
  3. package/libs/decorators/legacy/index.d.ts +19 -0
  4. package/libs/dom/index.d.ts +25408 -0
  5. package/libs/dom/iterable/index.d.ts +630 -0
  6. package/libs/es2015/collection/index.d.ts +148 -0
  7. package/libs/es2015/core/index.d.ts +574 -0
  8. package/libs/es2015/generator/index.d.ts +65 -0
  9. package/libs/es2015/index.d.ts +12 -0
  10. package/libs/es2015/iterable/index.d.ts +522 -0
  11. package/libs/es2015/promise/index.d.ts +74 -0
  12. package/libs/es2015/proxy/index.d.ts +131 -0
  13. package/libs/es2015/reflect/index.d.ts +145 -0
  14. package/libs/es2015/symbol/index.d.ts +30 -0
  15. package/libs/es2015/symbol-wellknown/index.d.ts +331 -0
  16. package/libs/es2016/array-include/index.d.ts +115 -0
  17. package/libs/es2016/full/index.d.ts +7 -0
  18. package/libs/es2016/index.d.ts +4 -0
  19. package/libs/es2017/full/index.d.ts +7 -0
  20. package/libs/es2017/index.d.ts +8 -0
  21. package/libs/es2017/intl/index.d.ts +28 -0
  22. package/libs/es2017/object/index.d.ts +115 -0
  23. package/libs/es2017/sharedmemory/index.d.ts +244 -0
  24. package/libs/es2017/string/index.d.ts +29 -0
  25. package/libs/es2017/typedarrays/index.d.ts +37 -0
  26. package/libs/es2018/asyncgenerator/index.d.ts +69 -0
  27. package/libs/es2018/asynciterable/index.d.ts +31 -0
  28. package/libs/es2018/full/index.d.ts +7 -0
  29. package/libs/es2018/index.d.ts +8 -0
  30. package/libs/es2018/intl/index.d.ts +102 -0
  31. package/libs/es2018/promise/index.d.ts +14 -0
  32. package/libs/es2018/regexp/index.d.ts +21 -0
  33. package/libs/es2019/array/index.d.ts +94 -0
  34. package/libs/es2019/full/index.d.ts +7 -0
  35. package/libs/es2019/index.d.ts +8 -0
  36. package/libs/es2019/intl/index.d.ts +7 -0
  37. package/libs/es2019/object/index.d.ts +143 -0
  38. package/libs/es2019/string/index.d.ts +21 -0
  39. package/libs/es2019/symbol/index.d.ts +8 -0
  40. package/libs/es2020/bigint/index.d.ts +833 -0
  41. package/libs/es2020/date/index.d.ts +35 -0
  42. package/libs/es2020/full/index.d.ts +7 -0
  43. package/libs/es2020/index.d.ts +11 -0
  44. package/libs/es2020/intl/index.d.ts +433 -0
  45. package/libs/es2020/number/index.d.ts +15 -0
  46. package/libs/es2020/promise/index.d.ts +37 -0
  47. package/libs/es2020/sharedmemory/index.d.ts +119 -0
  48. package/libs/es2020/string/index.d.ts +12 -0
  49. package/libs/es2020/symbol-wellknown/index.d.ts +21 -0
  50. package/libs/es2021/full/index.d.ts +7 -0
  51. package/libs/es2021/index.d.ts +7 -0
  52. package/libs/es2021/intl/index.d.ts +164 -0
  53. package/libs/es2021/promise/index.d.ts +34 -0
  54. package/libs/es2021/string/index.d.ts +20 -0
  55. package/libs/es2021/weakref/index.d.ts +57 -0
  56. package/libs/es2022/array/index.d.ts +105 -0
  57. package/libs/es2022/error/index.d.ts +57 -0
  58. package/libs/es2022/full/index.d.ts +7 -0
  59. package/libs/es2022/index.d.ts +10 -0
  60. package/libs/es2022/intl/index.d.ts +98 -0
  61. package/libs/es2022/object/index.d.ts +41 -0
  62. package/libs/es2022/regexp/index.d.ts +23 -0
  63. package/libs/es2022/sharedmemory/index.d.ts +37 -0
  64. package/libs/es2022/string/index.d.ts +9 -0
  65. package/libs/es2023/array/index.d.ts +495 -0
  66. package/libs/es2023/full/index.d.ts +7 -0
  67. package/libs/es2023/index.d.ts +4 -0
  68. package/libs/es5/index.d.ts +5709 -0
  69. package/libs/es6/index.d.ts +7 -0
  70. package/libs/esnext/full/index.d.ts +7 -0
  71. package/libs/esnext/index.d.ts +4 -0
  72. package/libs/esnext/intl/index.d.ts +15 -0
  73. package/libs/scripthost/index.d.ts +310 -0
  74. package/libs/webworker/importscripts/index.d.ts +7 -0
  75. package/libs/webworker/index.d.ts +8426 -0
  76. package/libs/webworker/iterable/index.d.ts +439 -0
  77. package/package.json +23 -0
@@ -0,0 +1,21 @@
1
+ /// <reference no-default-lib="true"/>
2
+
3
+ /// <reference lib="es2015.iterable" />
4
+ /// <reference lib="es2015.symbol" />
5
+
6
+ interface SymbolConstructor {
7
+ /**
8
+ * A regular expression method that matches the regular expression against a string. Called
9
+ * by the String.prototype.matchAll method.
10
+ */
11
+ readonly matchAll: unique symbol;
12
+ }
13
+
14
+ interface RegExp {
15
+ /**
16
+ * Matches a string with this regular expression, and returns an iterable of matches
17
+ * containing the results of that search.
18
+ * @param string A string to search within.
19
+ */
20
+ [Symbol.matchAll](str: string): IterableIterator<RegExpMatchArray>;
21
+ }
@@ -0,0 +1,7 @@
1
+ /// <reference no-default-lib="true"/>
2
+
3
+ /// <reference lib="es2021" />
4
+ /// <reference lib="dom" />
5
+ /// <reference lib="webworker.importscripts" />
6
+ /// <reference lib="scripthost" />
7
+ /// <reference lib="dom.iterable" />
@@ -0,0 +1,7 @@
1
+ /// <reference no-default-lib="true"/>
2
+
3
+ /// <reference lib="es2020" />
4
+ /// <reference lib="es2021.promise" />
5
+ /// <reference lib="es2021.string" />
6
+ /// <reference lib="es2021.weakref" />
7
+ /// <reference lib="es2021.intl" />
@@ -0,0 +1,164 @@
1
+ /// <reference no-default-lib="true"/>
2
+
3
+ declare namespace Intl {
4
+ interface DateTimeFormatPartTypesRegistry {
5
+ readonly fractionalSecond: unknown;
6
+ }
7
+
8
+ interface DateTimeFormatOptions {
9
+ readonly formatMatcher?: 'basic' | 'best fit' | 'best fit' | undefined;
10
+ readonly dateStyle?: 'full' | 'long' | 'medium' | 'short' | undefined;
11
+ readonly timeStyle?: 'full' | 'long' | 'medium' | 'short' | undefined;
12
+ readonly dayPeriod?: 'narrow' | 'short' | 'long' | undefined;
13
+ readonly fractionalSecondDigits?: 1 | 2 | 3 | undefined;
14
+ }
15
+
16
+ interface DateTimeRangeFormatPart extends DateTimeFormatPart {
17
+ readonly source: 'startRange' | 'endRange' | 'shared';
18
+ }
19
+
20
+ interface DateTimeFormat {
21
+ formatRange(
22
+ startDate: Date | number | bigint,
23
+ endDate: Date | number | bigint,
24
+ ): string;
25
+ formatRangeToParts(
26
+ startDate: Date | number | bigint,
27
+ endDate: Date | number | bigint,
28
+ ): DateTimeRangeFormatPart[];
29
+ }
30
+
31
+ interface ResolvedDateTimeFormatOptions {
32
+ readonly formatMatcher?: 'basic' | 'best fit' | 'best fit';
33
+ readonly dateStyle?: 'full' | 'long' | 'medium' | 'short';
34
+ readonly timeStyle?: 'full' | 'long' | 'medium' | 'short';
35
+ readonly hourCycle?: 'h11' | 'h12' | 'h23' | 'h24';
36
+ readonly dayPeriod?: 'narrow' | 'short' | 'long';
37
+ readonly fractionalSecondDigits?: 1 | 2 | 3;
38
+ }
39
+
40
+ /**
41
+ * The locale matching algorithm to use.
42
+ *
43
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters).
44
+ */
45
+ type ListFormatLocaleMatcher = 'lookup' | 'best fit';
46
+
47
+ /**
48
+ * The format of output message.
49
+ *
50
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters).
51
+ */
52
+ type ListFormatType = 'conjunction' | 'disjunction' | 'unit';
53
+
54
+ /**
55
+ * The length of the formatted message.
56
+ *
57
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters).
58
+ */
59
+ type ListFormatStyle = 'long' | 'short' | 'narrow';
60
+
61
+ /**
62
+ * An object with some or all properties of the `Intl.ListFormat` constructor `options` parameter.
63
+ *
64
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters).
65
+ */
66
+ interface ListFormatOptions {
67
+ /** 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). */
68
+ readonly localeMatcher?: ListFormatLocaleMatcher | undefined;
69
+ /** The format of output message. */
70
+ readonly type?: ListFormatType | undefined;
71
+ /** The length of the internationalized message. */
72
+ readonly style?: ListFormatStyle | undefined;
73
+ }
74
+
75
+ interface ResolvedListFormatOptions {
76
+ readonly locale: string;
77
+ readonly style: ListFormatStyle;
78
+ readonly type: ListFormatType;
79
+ }
80
+
81
+ interface ListFormat {
82
+ /**
83
+ * Returns a string with a language-specific representation of the list.
84
+ *
85
+ * @param list - An iterable object, such as an [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array).
86
+ *
87
+ * @throws `TypeError` if `list` includes something other than the possible values.
88
+ *
89
+ * @returns {string} A language-specific formatted string representing the elements of the list.
90
+ *
91
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/format).
92
+ */
93
+ format(list: Iterable<string>): string;
94
+
95
+ /**
96
+ * Returns an Array of objects representing the different components that can be used to format a list of values in a locale-aware fashion.
97
+ *
98
+ * @param list - An iterable object, such as an [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array), to be formatted according to a locale.
99
+ *
100
+ * @throws `TypeError` if `list` includes something other than the possible values.
101
+ *
102
+ * @returns {{ type: "element" | "literal", value: string; }[]} An Array of components which contains the formatted parts from the list.
103
+ *
104
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/formatToParts).
105
+ */
106
+ formatToParts(
107
+ list: Iterable<string>,
108
+ ): { type: 'element' | 'literal'; value: string }[];
109
+
110
+ /**
111
+ * Returns a new object with properties reflecting the locale and style
112
+ * formatting options computed during the construction of the current
113
+ * `Intl.ListFormat` object.
114
+ *
115
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/resolvedOptions).
116
+ */
117
+ resolvedOptions(): ResolvedListFormatOptions;
118
+ }
119
+
120
+ const ListFormat: {
121
+ readonly prototype: ListFormat;
122
+
123
+ /**
124
+ * Creates [Intl.ListFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) objects that
125
+ * enable language-sensitive list formatting.
126
+ *
127
+ * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings.
128
+ * For the general form and interpretation of the `locales` argument,
129
+ * see the [`Intl` page](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
130
+ *
131
+ * @param options - An [object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters)
132
+ * with some or all options of `ListFormatOptions`.
133
+ *
134
+ * @returns [Intl.ListFormatOptions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) object.
135
+ *
136
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat).
137
+ */
138
+ new (
139
+ locales?: BCP47LanguageTag | readonly BCP47LanguageTag[],
140
+ options?: ListFormatOptions,
141
+ ): ListFormat;
142
+
143
+ /**
144
+ * Returns an array containing those of the provided locales that are
145
+ * supported in list formatting without having to fall back to the runtime's default locale.
146
+ *
147
+ * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings.
148
+ * For the general form and interpretation of the `locales` argument,
149
+ * see the [`Intl` page](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
150
+ *
151
+ * @param options - An [object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf#parameters).
152
+ * with some or all possible options.
153
+ *
154
+ * @returns An array of strings representing a subset of the given locale tags that are supported in list
155
+ * formatting without having to fall back to the runtime's default locale.
156
+ *
157
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf).
158
+ */
159
+ supportedLocalesOf(
160
+ locales: BCP47LanguageTag | readonly BCP47LanguageTag[],
161
+ options?: Pick<ListFormatOptions, 'localeMatcher'>,
162
+ ): BCP47LanguageTag[];
163
+ };
164
+ }
@@ -0,0 +1,34 @@
1
+ /// <reference no-default-lib="true"/>
2
+
3
+ interface AggregateError extends Error {
4
+ readonly errors: readonly unknown[];
5
+ }
6
+
7
+ interface AggregateErrorConstructor {
8
+ new (errors: Iterable<unknown>, message?: string): AggregateError;
9
+ (errors: Iterable<unknown>, message?: string): AggregateError;
10
+ readonly prototype: AggregateError;
11
+ }
12
+
13
+ declare const AggregateError: AggregateErrorConstructor;
14
+
15
+ /**
16
+ * Represents the completion of an asynchronous operation
17
+ */
18
+ interface PromiseConstructor {
19
+ /**
20
+ * The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm.
21
+ * @param values An array or iterable of Promises.
22
+ * @returns A new Promise.
23
+ */
24
+ any<T extends readonly unknown[] | readonly []>(
25
+ values: T,
26
+ ): Promise<Awaited<T[number]>>;
27
+
28
+ /**
29
+ * The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm.
30
+ * @param values An array or iterable of Promises.
31
+ * @returns A new Promise.
32
+ */
33
+ any<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>;
34
+ }
@@ -0,0 +1,20 @@
1
+ /// <reference no-default-lib="true"/>
2
+
3
+ interface String {
4
+ /**
5
+ * Replace all instances of a substring in a string, using a regular expression or search string.
6
+ * @param searchValue A string to search for.
7
+ * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
8
+ */
9
+ replaceAll(searchValue: string | RegExp, replaceValue: string): string;
10
+
11
+ /**
12
+ * Replace all instances of a substring in a string, using a regular expression or search string.
13
+ * @param searchValue A string to search for.
14
+ * @param replacer A function that returns the replacement text.
15
+ */
16
+ replaceAll(
17
+ searchValue: string | RegExp,
18
+ replacer: (substring: string, ...args: readonly unknown[]) => string,
19
+ ): string;
20
+ }
@@ -0,0 +1,57 @@
1
+ /// <reference no-default-lib="true"/>
2
+
3
+ interface WeakRef<T extends object> {
4
+ readonly [Symbol.toStringTag]: 'WeakRef';
5
+
6
+ /**
7
+ * Returns the WeakRef instance's target object, or undefined if the target object has been
8
+ * reclaimed.
9
+ */
10
+ deref(): T | undefined;
11
+ }
12
+
13
+ interface WeakRefConstructor {
14
+ readonly prototype: WeakRef<object>;
15
+
16
+ /**
17
+ * Creates a WeakRef instance for the given target object.
18
+ * @param target The target object for the WeakRef instance.
19
+ */
20
+ new <T extends object>(target: T): WeakRef<T>;
21
+ }
22
+
23
+ declare const WeakRef: WeakRefConstructor;
24
+
25
+ interface FinalizationRegistry<T> {
26
+ readonly [Symbol.toStringTag]: 'FinalizationRegistry';
27
+
28
+ /**
29
+ * Registers an object with the registry.
30
+ * @param target The target object to register.
31
+ * @param heldValue The value to pass to the finalizer for this object. This cannot be the
32
+ * target object.
33
+ * @param unregisterToken The token to pass to the unregister method to unregister the target
34
+ * object. If provided (and not undefined), this must be an object. If not provided, the target
35
+ * cannot be unregistered.
36
+ */
37
+ register(target: object, heldValue: T, unregisterToken?: object): void;
38
+
39
+ /**
40
+ * Unregisters an object from the registry.
41
+ * @param unregisterToken The token that was used as the unregisterToken argument when calling
42
+ * register to register the target object.
43
+ */
44
+ unregister(unregisterToken: object): void;
45
+ }
46
+
47
+ interface FinalizationRegistryConstructor {
48
+ readonly prototype: FinalizationRegistry<unknown>;
49
+
50
+ /**
51
+ * Creates a finalization registry with an associated cleanup callback
52
+ * @param cleanupCallback The callback to call after an object in the registry has been reclaimed.
53
+ */
54
+ new <T>(cleanupCallback: (heldValue: T) => void): FinalizationRegistry<T>;
55
+ }
56
+
57
+ declare const FinalizationRegistry: FinalizationRegistryConstructor;
@@ -0,0 +1,105 @@
1
+ /// <reference no-default-lib="true"/>
2
+
3
+ interface Array<T> {
4
+ /**
5
+ * Returns the item located at the specified index.
6
+ * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
7
+ */
8
+ at(index: number): T | undefined;
9
+ }
10
+
11
+ interface ReadonlyArray<T> {
12
+ /**
13
+ * Returns the item located at the specified index.
14
+ * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
15
+ */
16
+ at(index: number): T | undefined;
17
+ }
18
+
19
+ interface Int8Array {
20
+ /**
21
+ * Returns the item located at the specified index.
22
+ * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
23
+ */
24
+ at(index: number): import('ts-type-forge').Int8 | undefined;
25
+ }
26
+
27
+ interface Uint8Array {
28
+ /**
29
+ * Returns the item located at the specified index.
30
+ * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
31
+ */
32
+ at(index: number): import('ts-type-forge').Uint8 | undefined;
33
+ }
34
+
35
+ interface Uint8ClampedArray {
36
+ /**
37
+ * Returns the item located at the specified index.
38
+ * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
39
+ */
40
+ at(index: number): import('ts-type-forge').Uint8 | undefined;
41
+ }
42
+
43
+ interface Int16Array {
44
+ /**
45
+ * Returns the item located at the specified index.
46
+ * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
47
+ */
48
+ at(index: number): number | undefined;
49
+ }
50
+
51
+ interface Uint16Array {
52
+ /**
53
+ * Returns the item located at the specified index.
54
+ * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
55
+ */
56
+ at(index: number): number | undefined;
57
+ }
58
+
59
+ interface Int32Array {
60
+ /**
61
+ * Returns the item located at the specified index.
62
+ * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
63
+ */
64
+ at(index: number): number | undefined;
65
+ }
66
+
67
+ interface Uint32Array {
68
+ /**
69
+ * Returns the item located at the specified index.
70
+ * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
71
+ */
72
+ at(index: number): number | undefined;
73
+ }
74
+
75
+ interface Float32Array {
76
+ /**
77
+ * Returns the item located at the specified index.
78
+ * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
79
+ */
80
+ at(index: number): number | undefined;
81
+ }
82
+
83
+ interface Float64Array {
84
+ /**
85
+ * Returns the item located at the specified index.
86
+ * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
87
+ */
88
+ at(index: number): number | undefined;
89
+ }
90
+
91
+ interface BigInt64Array {
92
+ /**
93
+ * Returns the item located at the specified index.
94
+ * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
95
+ */
96
+ at(index: number): bigint | undefined;
97
+ }
98
+
99
+ interface BigUint64Array {
100
+ /**
101
+ * Returns the item located at the specified index.
102
+ * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
103
+ */
104
+ at(index: number): bigint | undefined;
105
+ }
@@ -0,0 +1,57 @@
1
+ /// <reference no-default-lib="true"/>
2
+
3
+ interface ErrorOptions {
4
+ readonly cause?: unknown;
5
+ }
6
+
7
+ interface Error {
8
+ readonly cause?: unknown;
9
+ }
10
+
11
+ interface ErrorConstructor {
12
+ new (message?: string, options?: ErrorOptions): Error;
13
+ (message?: string, options?: ErrorOptions): Error;
14
+ }
15
+
16
+ interface EvalErrorConstructor {
17
+ new (message?: string, options?: ErrorOptions): EvalError;
18
+ (message?: string, options?: ErrorOptions): EvalError;
19
+ }
20
+
21
+ interface RangeErrorConstructor {
22
+ new (message?: string, options?: ErrorOptions): RangeError;
23
+ (message?: string, options?: ErrorOptions): RangeError;
24
+ }
25
+
26
+ interface ReferenceErrorConstructor {
27
+ new (message?: string, options?: ErrorOptions): ReferenceError;
28
+ (message?: string, options?: ErrorOptions): ReferenceError;
29
+ }
30
+
31
+ interface SyntaxErrorConstructor {
32
+ new (message?: string, options?: ErrorOptions): SyntaxError;
33
+ (message?: string, options?: ErrorOptions): SyntaxError;
34
+ }
35
+
36
+ interface TypeErrorConstructor {
37
+ new (message?: string, options?: ErrorOptions): TypeError;
38
+ (message?: string, options?: ErrorOptions): TypeError;
39
+ }
40
+
41
+ interface URIErrorConstructor {
42
+ new (message?: string, options?: ErrorOptions): URIError;
43
+ (message?: string, options?: ErrorOptions): URIError;
44
+ }
45
+
46
+ interface AggregateErrorConstructor {
47
+ new (
48
+ errors: Iterable<unknown>,
49
+ message?: string,
50
+ options?: ErrorOptions,
51
+ ): AggregateError;
52
+ (
53
+ errors: Iterable<unknown>,
54
+ message?: string,
55
+ options?: ErrorOptions,
56
+ ): AggregateError;
57
+ }
@@ -0,0 +1,7 @@
1
+ /// <reference no-default-lib="true"/>
2
+
3
+ /// <reference lib="es2022" />
4
+ /// <reference lib="dom" />
5
+ /// <reference lib="webworker.importscripts" />
6
+ /// <reference lib="scripthost" />
7
+ /// <reference lib="dom.iterable" />
@@ -0,0 +1,10 @@
1
+ /// <reference no-default-lib="true"/>
2
+
3
+ /// <reference lib="es2021" />
4
+ /// <reference lib="es2022.array" />
5
+ /// <reference lib="es2022.error" />
6
+ /// <reference lib="es2022.intl" />
7
+ /// <reference lib="es2022.object" />
8
+ /// <reference lib="es2022.sharedmemory" />
9
+ /// <reference lib="es2022.string" />
10
+ /// <reference lib="es2022.regexp" />
@@ -0,0 +1,98 @@
1
+ /// <reference no-default-lib="true"/>
2
+
3
+ declare namespace Intl {
4
+ /**
5
+ * An object with some or all properties of the `Intl.Segmenter` constructor `options` parameter.
6
+ *
7
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/Segmenter#parameters)
8
+ */
9
+ interface SegmenterOptions {
10
+ /** 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). */
11
+ readonly localeMatcher?: 'best fit' | 'lookup' | undefined;
12
+ /** The type of input to be split */
13
+ readonly granularity?: 'grapheme' | 'word' | 'sentence' | undefined;
14
+ }
15
+
16
+ interface Segmenter {
17
+ /**
18
+ * Returns `Segments` object containing the segments of the input string, using the segmenter's locale and granularity.
19
+ *
20
+ * @param input - The text to be segmented as a `string`.
21
+ *
22
+ * @returns A new iterable Segments object containing the segments of the input string, using the segmenter's locale and granularity.
23
+ */
24
+ segment(input: string): Segments;
25
+ resolvedOptions(): ResolvedSegmenterOptions;
26
+ }
27
+
28
+ interface ResolvedSegmenterOptions {
29
+ readonly locale: string;
30
+ readonly granularity: 'grapheme' | 'word' | 'sentence';
31
+ }
32
+
33
+ interface Segments {
34
+ /**
35
+ * Returns an object describing the segment in the original string that includes the code unit at a specified index.
36
+ *
37
+ * @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`.
38
+ */
39
+ containing(codeUnitIndex?: number): SegmentData;
40
+
41
+ /** Returns an iterator to iterate over the segments. */
42
+ [Symbol.iterator](): IterableIterator<SegmentData>;
43
+ }
44
+
45
+ interface SegmentData {
46
+ /** A string containing the segment extracted from the original input string. */
47
+ readonly segment: string;
48
+ /** The code unit index in the original input string at which the segment begins. */
49
+ readonly index: number;
50
+ /** The complete input string that was segmented. */
51
+ readonly input: string;
52
+ /**
53
+ * A boolean value only if granularity is "word"; otherwise, undefined.
54
+ * If granularity is "word", then isWordLike is true when the segment is word-like (i.e., consists of letters/numbers/ideographs/etc.); otherwise, false.
55
+ */
56
+ readonly isWordLike?: boolean;
57
+ }
58
+
59
+ const Segmenter: {
60
+ readonly prototype: Segmenter;
61
+
62
+ /**
63
+ * Creates a new `Intl.Segmenter` object.
64
+ *
65
+ * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings.
66
+ * For the general form and interpretation of the `locales` argument,
67
+ * see the [`Intl` page](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
68
+ *
69
+ * @param options - An [object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/Segmenter#parameters)
70
+ * with some or all options of `SegmenterOptions`.
71
+ *
72
+ * @returns [Intl.Segmenter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segments) object.
73
+ *
74
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter).
75
+ */
76
+ new (
77
+ locales?: BCP47LanguageTag | readonly BCP47LanguageTag[],
78
+ options?: SegmenterOptions,
79
+ ): Segmenter;
80
+
81
+ /**
82
+ * Returns an array containing those of the provided locales that are supported without having to fall back to the runtime's default locale.
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/supportedLocalesOf#parameters).
89
+ * with some or all possible options.
90
+ *
91
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/supportedLocalesOf)
92
+ */
93
+ supportedLocalesOf(
94
+ locales: BCP47LanguageTag | readonly BCP47LanguageTag[],
95
+ options?: Pick<SegmenterOptions, 'localeMatcher'>,
96
+ ): BCP47LanguageTag[];
97
+ };
98
+ }
@@ -0,0 +1,41 @@
1
+ /// <reference no-default-lib="true"/>
2
+ /// <reference lib="es5" />
3
+
4
+ /**
5
+ * @internal
6
+ * R が union 型(要素数1の場合も含む)のとき、 union の要素の中に K をキーとして含むものが一つでもあれば、
7
+ * union 型を K をキーとして含むもののみに絞った型を返す。
8
+ * union の要素の中に K をキーとして含むものが一つも無ければ、`MutableRecord<K, unknown>` を返す。
9
+ * 結果には Readonly を付ける。
10
+ */
11
+ declare namespace StrictLibInternals {
12
+ export type HasOwnReturnType<
13
+ R extends import('ts-type-forge').UnknownRecord,
14
+ K extends PropertyKey,
15
+ > = R extends R // union distribution
16
+ ? K extends keyof R
17
+ ? string extends keyof R
18
+ ? import('ts-type-forge').MutableRecord<K, R[keyof R]> & R
19
+ : number extends keyof R
20
+ ? import('ts-type-forge').MutableRecord<K, R[keyof R]> & R
21
+ : symbol extends keyof R
22
+ ? import('ts-type-forge').MutableRecord<K, R[keyof R]> & R
23
+ : R
24
+ : never // omit union member that does not have key K
25
+ : never; // dummy case for union distribution
26
+ }
27
+
28
+ interface ObjectConstructor {
29
+ /**
30
+ * Determines whether an object has a property with the specified name.
31
+ * @param obj An object.
32
+ * @param key A property name.
33
+ */
34
+ hasOwn<
35
+ R extends import('ts-type-forge').UnknownRecord,
36
+ K extends PropertyKey,
37
+ >(
38
+ obj: R,
39
+ key: K,
40
+ ): obj is StrictLibInternals.HasOwnReturnType<R, K>;
41
+ }
@@ -0,0 +1,23 @@
1
+ /// <reference no-default-lib="true"/>
2
+
3
+ interface RegExpMatchArray {
4
+ readonly indices?: RegExpIndicesArray;
5
+ }
6
+
7
+ interface RegExpExecArray {
8
+ readonly indices?: RegExpIndicesArray;
9
+ }
10
+
11
+ interface RegExpIndicesArray extends Array<readonly [number, number]> {
12
+ readonly groups?: {
13
+ readonly [key: string]: readonly [number, number];
14
+ };
15
+ }
16
+
17
+ interface RegExp {
18
+ /**
19
+ * Returns a Boolean value indicating the state of the hasIndices flag (d) used with with a regular expression.
20
+ * Default is false. Read-only.
21
+ */
22
+ readonly hasIndices: boolean;
23
+ }