typescript 5.8.0-dev.20250122 → 5.8.0-dev.20250123
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/_tsc.js +15 -3
- package/lib/lib.dom.d.ts +722 -123
- package/lib/lib.dom.iterable.d.ts +9 -7
- package/lib/lib.webworker.d.ts +254 -47
- package/lib/lib.webworker.iterable.d.ts +6 -7
- package/lib/typescript.js +15 -3
- package/package.json +2 -2
@@ -20,11 +20,6 @@ and limitations under the License.
|
|
20
20
|
/// Worker Iterable APIs
|
21
21
|
/////////////////////////////
|
22
22
|
|
23
|
-
interface AbortSignal {
|
24
|
-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */
|
25
|
-
any(signals: Iterable<AbortSignal>): AbortSignal;
|
26
|
-
}
|
27
|
-
|
28
23
|
interface CSSNumericArray {
|
29
24
|
[Symbol.iterator](): ArrayIterator<CSSNumericValue>;
|
30
25
|
entries(): ArrayIterator<[number, CSSNumericValue]>;
|
@@ -120,6 +115,10 @@ interface IDBObjectStore {
|
|
120
115
|
createIndex(name: string, keyPath: string | Iterable<string>, options?: IDBIndexParameters): IDBIndex;
|
121
116
|
}
|
122
117
|
|
118
|
+
interface ImageTrackList {
|
119
|
+
[Symbol.iterator](): ArrayIterator<ImageTrack>;
|
120
|
+
}
|
121
|
+
|
123
122
|
interface MessageEvent<T = any> {
|
124
123
|
/** @deprecated */
|
125
124
|
initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable<MessagePort>): void;
|
@@ -140,7 +139,7 @@ interface SubtleCrypto {
|
|
140
139
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */
|
141
140
|
deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
|
142
141
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey) */
|
143
|
-
generateKey(algorithm: "Ed25519", extractable: boolean, keyUsages: ReadonlyArray<"sign" | "verify">): Promise<CryptoKeyPair>;
|
142
|
+
generateKey(algorithm: "Ed25519" | { name: "Ed25519" }, extractable: boolean, keyUsages: ReadonlyArray<"sign" | "verify">): Promise<CryptoKeyPair>;
|
144
143
|
generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKeyPair>;
|
145
144
|
generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
|
146
145
|
generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKeyPair | CryptoKey>;
|
@@ -243,7 +242,7 @@ interface WebGL2RenderingContextOverloads {
|
|
243
242
|
uniform4fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
|
244
243
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
245
244
|
uniform4iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: number, srcLength?: GLuint): void;
|
246
|
-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
245
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */
|
247
246
|
uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
|
248
247
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */
|
249
248
|
uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
|
package/lib/typescript.js
CHANGED
@@ -2285,7 +2285,7 @@ module.exports = __toCommonJS(typescript_exports);
|
|
2285
2285
|
|
2286
2286
|
// src/compiler/corePublic.ts
|
2287
2287
|
var versionMajorMinor = "5.8";
|
2288
|
-
var version = `${versionMajorMinor}.0-dev.
|
2288
|
+
var version = `${versionMajorMinor}.0-dev.20250123`;
|
2289
2289
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
2290
2290
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
2291
2291
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
@@ -10210,6 +10210,7 @@ var Diagnostics = {
|
|
10210
10210
|
This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_during_emit_because_it_is_not_a_relative_path: diag(2877, 1 /* Error */, "This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_duri_2877", "This import uses a '{0}' extension to resolve to an input TypeScript file, but will not be rewritten during emit because it is not a relative path."),
|
10211
10211
|
This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_between_the_projects_output_files_is_not_the_same_as_the_relative_path_between_its_input_files: diag(2878, 1 /* Error */, "This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_b_2878", "This import path is unsafe to rewrite because it resolves to another project, and the relative path between the projects' output files is not the same as the relative path between its input files."),
|
10212
10212
|
Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found: diag(2879, 1 /* Error */, "Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found_2879", "Using JSX fragments requires fragment factory '{0}' to be in scope, but it could not be found."),
|
10213
|
+
Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_asserts: diag(2880, 1 /* Error */, "Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_asserts_2880", "Import assertions have been replaced by import attributes. Use 'with' instead of 'asserts'."),
|
10213
10214
|
Import_declaration_0_is_using_private_name_1: diag(4e3, 1 /* Error */, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
|
10214
10215
|
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, 1 /* Error */, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
|
10215
10216
|
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, 1 /* Error */, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
|
@@ -47387,13 +47388,16 @@ function createBinder() {
|
|
47387
47388
|
function bindForStatement(node) {
|
47388
47389
|
const preLoopLabel = setContinueTarget(node, createLoopLabel());
|
47389
47390
|
const preBodyLabel = createBranchLabel();
|
47391
|
+
const preIncrementorLabel = createBranchLabel();
|
47390
47392
|
const postLoopLabel = createBranchLabel();
|
47391
47393
|
bind(node.initializer);
|
47392
47394
|
addAntecedent(preLoopLabel, currentFlow);
|
47393
47395
|
currentFlow = preLoopLabel;
|
47394
47396
|
bindCondition(node.condition, preBodyLabel, postLoopLabel);
|
47395
47397
|
currentFlow = finishFlowLabel(preBodyLabel);
|
47396
|
-
bindIterativeStatement(node.statement, postLoopLabel,
|
47398
|
+
bindIterativeStatement(node.statement, postLoopLabel, preIncrementorLabel);
|
47399
|
+
addAntecedent(preIncrementorLabel, currentFlow);
|
47400
|
+
currentFlow = finishFlowLabel(preIncrementorLabel);
|
47397
47401
|
bind(node.incrementor);
|
47398
47402
|
addAntecedent(preLoopLabel, currentFlow);
|
47399
47403
|
currentFlow = finishFlowLabel(postLoopLabel);
|
@@ -53796,7 +53800,7 @@ function createTypeChecker(host) {
|
|
53796
53800
|
moduleReference
|
53797
53801
|
);
|
53798
53802
|
}
|
53799
|
-
if (errorNode && (
|
53803
|
+
if (errorNode && (moduleKind === 100 /* Node16 */ || moduleKind === 101 /* Node18 */)) {
|
53800
53804
|
const isSyncImport = currentSourceFile.impliedNodeFormat === 1 /* CommonJS */ && !findAncestor(location, isImportCall) || !!findAncestor(location, isImportEqualsDeclaration);
|
53801
53805
|
const overrideHost = findAncestor(location, (l) => isImportTypeNode(l) || isExportDeclaration(l) || isImportDeclaration(l) || isJSDocImportTag(l));
|
53802
53806
|
if (isSyncImport && sourceFile.impliedNodeFormat === 99 /* ESNext */ && !hasResolutionModeOverride(overrideHost)) {
|
@@ -64195,6 +64199,9 @@ function createTypeChecker(host) {
|
|
64195
64199
|
case "Number":
|
64196
64200
|
checkNoTypeArguments(node);
|
64197
64201
|
return numberType;
|
64202
|
+
case "BigInt":
|
64203
|
+
checkNoTypeArguments(node);
|
64204
|
+
return bigintType;
|
64198
64205
|
case "Boolean":
|
64199
64206
|
checkNoTypeArguments(node);
|
64200
64207
|
return booleanType;
|
@@ -73114,6 +73121,7 @@ function createTypeChecker(host) {
|
|
73114
73121
|
return target.kind === 108 /* SuperKeyword */;
|
73115
73122
|
case 235 /* NonNullExpression */:
|
73116
73123
|
case 217 /* ParenthesizedExpression */:
|
73124
|
+
case 238 /* SatisfiesExpression */:
|
73117
73125
|
return isMatchingReference(source.expression, target);
|
73118
73126
|
case 211 /* PropertyAccessExpression */:
|
73119
73127
|
case 212 /* ElementAccessExpression */:
|
@@ -75083,6 +75091,7 @@ function createTypeChecker(host) {
|
|
75083
75091
|
return narrowTypeByCallExpression(type, expr, assumeTrue);
|
75084
75092
|
case 217 /* ParenthesizedExpression */:
|
75085
75093
|
case 235 /* NonNullExpression */:
|
75094
|
+
case 238 /* SatisfiesExpression */:
|
75086
75095
|
return narrowType(type, expr.expression, assumeTrue);
|
75087
75096
|
case 226 /* BinaryExpression */:
|
75088
75097
|
return narrowTypeByBinaryExpression(type, expr, assumeTrue);
|
@@ -89899,6 +89908,9 @@ function createTypeChecker(host) {
|
|
89899
89908
|
isImportAttributes2 ? Diagnostics.Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_node18_nodenext_or_preserve : Diagnostics.Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_node18_nodenext_or_preserve
|
89900
89909
|
);
|
89901
89910
|
}
|
89911
|
+
if (moduleKind === 199 /* NodeNext */ && !isImportAttributes2) {
|
89912
|
+
return grammarErrorOnFirstToken(node, Diagnostics.Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_asserts);
|
89913
|
+
}
|
89902
89914
|
if (declaration.moduleSpecifier && getEmitSyntaxForModuleSpecifierExpression(declaration.moduleSpecifier) === 1 /* CommonJS */) {
|
89903
89915
|
return grammarErrorOnNode(
|
89904
89916
|
node,
|
package/package.json
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
"name": "typescript",
|
3
3
|
"author": "Microsoft Corp.",
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
5
|
-
"version": "5.8.0-dev.
|
5
|
+
"version": "5.8.0-dev.20250123",
|
6
6
|
"license": "Apache-2.0",
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
8
8
|
"keywords": [
|
@@ -116,5 +116,5 @@
|
|
116
116
|
"node": "20.1.0",
|
117
117
|
"npm": "8.19.4"
|
118
118
|
},
|
119
|
-
"gitHead": "
|
119
|
+
"gitHead": "5e52b28ee6d54f6637990be6d0dda1e974f78345"
|
120
120
|
}
|