typescript 5.1.6 → 5.2.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/lib/lib.decorators.d.ts +17 -0
- package/lib/lib.dom.d.ts +313 -90
- package/lib/lib.es2015.collection.d.ts +9 -9
- package/lib/lib.es2015.core.d.ts +2 -2
- package/lib/lib.es2015.iterable.d.ts +4 -4
- package/lib/lib.es2015.symbol.wellknown.d.ts +2 -2
- package/lib/lib.es2017.d.ts +1 -0
- package/lib/lib.es2017.date.d.ts +31 -0
- package/lib/lib.es2020.bigint.d.ts +4 -4
- package/lib/lib.es2021.weakref.d.ts +19 -16
- package/lib/lib.es2023.array.d.ts +618 -36
- package/lib/lib.es2023.collection.d.ts +21 -0
- package/lib/lib.es2023.d.ts +1 -0
- package/lib/lib.es5.d.ts +27 -18
- package/lib/lib.esnext.d.ts +2 -0
- package/lib/lib.esnext.decorators.d.ts +28 -0
- package/lib/lib.esnext.disposable.d.ts +185 -0
- package/lib/lib.webworker.d.ts +172 -33
- package/lib/tsc.js +8311 -6557
- package/lib/tsserver.js +11796 -9281
- package/lib/tsserverlibrary.d.ts +287 -249
- package/lib/tsserverlibrary.js +11801 -9288
- package/lib/typescript.d.ts +274 -248
- package/lib/typescript.js +11678 -9231
- package/lib/typingsInstaller.js +1852 -1645
- package/package.json +7 -7
package/lib/lib.decorators.d.ts
CHANGED
|
@@ -35,6 +35,11 @@ type DecoratorContext =
|
|
|
35
35
|
| ClassMemberDecoratorContext
|
|
36
36
|
;
|
|
37
37
|
|
|
38
|
+
type DecoratorMetadataObject = Record<PropertyKey, unknown> & object;
|
|
39
|
+
|
|
40
|
+
type DecoratorMetadata =
|
|
41
|
+
typeof globalThis extends { Symbol: { readonly metadata: symbol } } ? DecoratorMetadataObject : DecoratorMetadataObject | undefined;
|
|
42
|
+
|
|
38
43
|
/**
|
|
39
44
|
* Context provided to a class decorator.
|
|
40
45
|
* @template Class The type of the decorated class associated with this context.
|
|
@@ -66,6 +71,8 @@ interface ClassDecoratorContext<
|
|
|
66
71
|
* ```
|
|
67
72
|
*/
|
|
68
73
|
addInitializer(initializer: (this: Class) => void): void;
|
|
74
|
+
|
|
75
|
+
readonly metadata: DecoratorMetadata;
|
|
69
76
|
}
|
|
70
77
|
|
|
71
78
|
/**
|
|
@@ -130,6 +137,8 @@ interface ClassMethodDecoratorContext<
|
|
|
130
137
|
* ```
|
|
131
138
|
*/
|
|
132
139
|
addInitializer(initializer: (this: This) => void): void;
|
|
140
|
+
|
|
141
|
+
readonly metadata: DecoratorMetadata;
|
|
133
142
|
}
|
|
134
143
|
|
|
135
144
|
/**
|
|
@@ -175,6 +184,8 @@ interface ClassGetterDecoratorContext<
|
|
|
175
184
|
* decorating a non-`static` element).
|
|
176
185
|
*/
|
|
177
186
|
addInitializer(initializer: (this: This) => void): void;
|
|
187
|
+
|
|
188
|
+
readonly metadata: DecoratorMetadata;
|
|
178
189
|
}
|
|
179
190
|
|
|
180
191
|
/**
|
|
@@ -220,6 +231,8 @@ interface ClassSetterDecoratorContext<
|
|
|
220
231
|
* decorating a non-`static` element).
|
|
221
232
|
*/
|
|
222
233
|
addInitializer(initializer: (this: This) => void): void;
|
|
234
|
+
|
|
235
|
+
readonly metadata: DecoratorMetadata;
|
|
223
236
|
}
|
|
224
237
|
|
|
225
238
|
/**
|
|
@@ -274,6 +287,8 @@ interface ClassAccessorDecoratorContext<
|
|
|
274
287
|
* decorating a non-`static` element).
|
|
275
288
|
*/
|
|
276
289
|
addInitializer(initializer: (this: This) => void): void;
|
|
290
|
+
|
|
291
|
+
readonly metadata: DecoratorMetadata;
|
|
277
292
|
}
|
|
278
293
|
|
|
279
294
|
/**
|
|
@@ -369,4 +384,6 @@ interface ClassFieldDecoratorContext<
|
|
|
369
384
|
* decorating a non-`static` element).
|
|
370
385
|
*/
|
|
371
386
|
addInitializer(initializer: (this: This) => void): void;
|
|
387
|
+
|
|
388
|
+
readonly metadata: DecoratorMetadata;
|
|
372
389
|
}
|