...**/!(*.map|*.min.js)Size
Gzip
Dependencies
Publish
Install
Publish
Install
@@ -18,7 +18,7 @@ | |||
| 18 | 18 | ||
| 19 | // src/compiler/corePublic.ts | 19 | // src/compiler/corePublic.ts |
| 20 | var versionMajorMinor = "5.9"; | 20 | var versionMajorMinor = "5.9"; |
| 21 | var version = "5.9.2"; | 21 | var version = "5.9.3"; |
| 22 | 22 | ||
| 23 | // src/compiler/core.ts | 23 | // src/compiler/core.ts |
| 24 | var emptyArray = []; | 24 | var emptyArray = []; |
@@ -20254,10 +20254,22 @@ | |||
| 20254 | } | 20254 | } |
| 20255 | return parenthesizerRule; | 20255 | return parenthesizerRule; |
| 20256 | } | 20256 | } |
| 20257 | function mixingBinaryOperatorsRequiresParentheses(a, b) { | ||
| 20258 | if (a === 61 /* QuestionQuestionToken */) { | ||
| 20259 | return b === 56 /* AmpersandAmpersandToken */ || b === 57 /* BarBarToken */; | ||
| 20260 | } | ||
| 20261 | if (b === 61 /* QuestionQuestionToken */) { | ||
| 20262 | return a === 56 /* AmpersandAmpersandToken */ || a === 57 /* BarBarToken */; | ||
| 20263 | } | ||
| 20264 | return false; | ||
| 20265 | } | ||
| 20257 | function binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { | 20266 | function binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { |
| 20267 | const emittedOperand = skipPartiallyEmittedExpressions(operand); | ||
| 20268 | if (isBinaryExpression(emittedOperand) && mixingBinaryOperatorsRequiresParentheses(binaryOperator, emittedOperand.operatorToken.kind)) { | ||
| 20269 | return true; | ||
| 20270 | } | ||
| 20258 | const binaryOperatorPrecedence = getOperatorPrecedence(227 /* BinaryExpression */, binaryOperator); | 20271 | const binaryOperatorPrecedence = getOperatorPrecedence(227 /* BinaryExpression */, binaryOperator); |
| 20259 | const binaryOperatorAssociativity = getOperatorAssociativity(227 /* BinaryExpression */, binaryOperator); | 20272 | const binaryOperatorAssociativity = getOperatorAssociativity(227 /* BinaryExpression */, binaryOperator); |
| 20260 | const emittedOperand = skipPartiallyEmittedExpressions(operand); | ||
| 20261 | if (!isLeftSideOfBinary && operand.kind === 220 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) { | 20273 | if (!isLeftSideOfBinary && operand.kind === 220 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) { |
| 20262 | return true; | 20274 | return true; |
| 20263 | } | 20275 | } |
@@ -53296,7 +53308,22 @@ | |||
| 53296 | function getPropertyNameNodeForSymbol(symbol, context) { | 53308 | function getPropertyNameNodeForSymbol(symbol, context) { |
| 53297 | const hashPrivateName = getClonedHashPrivateName(symbol); | 53309 | const hashPrivateName = getClonedHashPrivateName(symbol); |
| 53298 | if (hashPrivateName) { | 53310 | if (hashPrivateName) { |
| 53299 | return hashPrivateName; | 53311 | const shouldEmitErroneousFieldName = !!context.tracker.reportPrivateInBaseOfClassExpression && context.flags & 2048 /* WriteClassExpressionAsTypeLiteral */; |
| 53312 | if (!shouldEmitErroneousFieldName) { | ||
| 53313 | return hashPrivateName; | ||
| 53314 | } else { | ||
| 53315 | let rawName2 = unescapeLeadingUnderscores(symbol.escapedName); | ||
| 53316 | rawName2 = rawName2.replace(/__#\d+@#/g, "__#private@#"); | ||
| 53317 | return createPropertyNameNodeForIdentifierOrLiteral( | ||
| 53318 | rawName2, | ||
| 53319 | getEmitScriptTarget(compilerOptions), | ||
| 53320 | /*singleQuote*/ | ||
| 53321 | false, | ||
| 53322 | /*stringNamed*/ | ||
| 53323 | true, | ||
| 53324 | !!(symbol.flags & 8192 /* Method */) | ||
| 53325 | ); | ||
| 53326 | } | ||
| 53300 | } | 53327 | } |
| 53301 | const stringNamed = !!length(symbol.declarations) && every(symbol.declarations, isStringNamed); | 53328 | const stringNamed = !!length(symbol.declarations) && every(symbol.declarations, isStringNamed); |
| 53302 | const singleQuote = !!length(symbol.declarations) && every(symbol.declarations, isSingleQuotedStringNamed); | 53329 | const singleQuote = !!length(symbol.declarations) && every(symbol.declarations, isSingleQuotedStringNamed); |
@@ -124188,10 +124215,9 @@ | |||
| 124188 | } | 124215 | } |
| 124189 | const getCommonSourceDirectory3 = memoize(() => getCommonSourceDirectoryOfConfig(resolvedRef.commandLine, !host.useCaseSensitiveFileNames())); | 124216 | const getCommonSourceDirectory3 = memoize(() => getCommonSourceDirectoryOfConfig(resolvedRef.commandLine, !host.useCaseSensitiveFileNames())); |
| 124190 | commandLine.fileNames.forEach((fileName) => { | 124217 | commandLine.fileNames.forEach((fileName) => { |
| 124191 | if (isDeclarationFileName(fileName)) return; | ||
| 124192 | const path = toPath3(fileName); | 124218 | const path = toPath3(fileName); |
| 124193 | let outputDts; | 124219 | let outputDts; |
| 124194 | if (!fileExtensionIs(fileName, ".json" /* Json */)) { | 124220 | if (!isDeclarationFileName(fileName) && !fileExtensionIs(fileName, ".json" /* Json */)) { |
| 124195 | if (!commandLine.options.outFile) { | 124221 | if (!commandLine.options.outFile) { |
| 124196 | outputDts = getOutputDeclarationFileName(fileName, resolvedRef.commandLine, !host.useCaseSensitiveFileNames(), getCommonSourceDirectory3); | 124222 | outputDts = getOutputDeclarationFileName(fileName, resolvedRef.commandLine, !host.useCaseSensitiveFileNames(), getCommonSourceDirectory3); |
| 124197 | mapOutputFileToResolvedRef.set(toPath3(outputDts), { resolvedRef, source: fileName }); | 124223 | mapOutputFileToResolvedRef.set(toPath3(outputDts), { resolvedRef, source: fileName }); |
@@ -2,7 +2,7 @@ | |||
| 2 | "name": "typescript", | 2 | "name": "typescript", |
| 3 | "author": "Microsoft Corp.", | 3 | "author": "Microsoft Corp.", |
| 4 | "homepage": "https://www.typescriptlang.org/", | 4 | "homepage": "https://www.typescriptlang.org/", |
| 5 | "version": "5.9.2", | 5 | "version": "5.9.3", |
| 6 | "license": "Apache-2.0", | 6 | "license": "Apache-2.0", |
| 7 | "description": "TypeScript is a language for application scale JavaScript development", | 7 | "description": "TypeScript is a language for application scale JavaScript development", |
| 8 | "keywords": [ | 8 | "keywords": [ |
@@ -116,5 +116,5 @@ | |||
| 116 | "node": "20.1.0", | 116 | "node": "20.1.0", |
| 117 | "npm": "8.19.4" | 117 | "npm": "8.19.4" |
| 118 | }, | 118 | }, |
| 119 | "gitHead": "5be33469d551655d878876faa9e30aa3b49f8ee9" | 119 | "gitHead": "c63de15a992d37f0d6cec03ac7631872838602cb" |
| 120 | } | 120 | } |
@@ -374,6 +374,8 @@ | |||
| 374 | new (length?: number): Float16Array<ArrayBuffer>; | 374 | new (length?: number): Float16Array<ArrayBuffer>; |
| 375 | new (array: ArrayLike<number> | Iterable<number>): Float16Array<ArrayBuffer>; | 375 | new (array: ArrayLike<number> | Iterable<number>): Float16Array<ArrayBuffer>; |
| 376 | new <TArrayBuffer extends ArrayBufferLike = ArrayBuffer>(buffer: TArrayBuffer, byteOffset?: number, length?: number): Float16Array<TArrayBuffer>; | 376 | new <TArrayBuffer extends ArrayBufferLike = ArrayBuffer>(buffer: TArrayBuffer, byteOffset?: number, length?: number): Float16Array<TArrayBuffer>; |
| 377 | new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float16Array<ArrayBuffer>; | ||
| 378 | new (array: ArrayLike<number> | ArrayBuffer): Float16Array<ArrayBuffer>; | ||
| 377 | 379 | ||
| 378 | /** | 380 | /** |
| 379 | * The size in bytes of each element in the array. | 381 | * The size in bytes of each element in the array. |
@@ -5907,7 +5907,6 @@ | |||
| 5907 | */ | 5907 | */ |
| 5908 | interface SourceFileLike { | 5908 | interface SourceFileLike { |
| 5909 | readonly text: string; | 5909 | readonly text: string; |
| 5910 | languageVariant?: LanguageVariant; | ||
| 5911 | } | 5910 | } |
| 5912 | interface SourceFileLike { | 5911 | interface SourceFileLike { |
| 5913 | getLineAndCharacterOfPosition(pos: number): LineAndCharacter; | 5912 | getLineAndCharacterOfPosition(pos: number): LineAndCharacter; |