@typescript-deploys/pr-build 5.8.0-pr-55267-194 → 5.8.0-pr-60576-12
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 +3 -3
- package/lib/typescript.js +3 -3
- package/package.json +1 -1
package/lib/_tsc.js
CHANGED
|
@@ -132150,9 +132150,9 @@ function createSyntacticTypeNodeBuilder(options, resolver) {
|
|
|
132150
132150
|
}
|
|
132151
132151
|
if (!result && node.kind === 303 /* PropertyAssignment */) {
|
|
132152
132152
|
const initializer = node.initializer;
|
|
132153
|
-
const
|
|
132154
|
-
if (
|
|
132155
|
-
result = serializeExistingTypeNode(
|
|
132153
|
+
const assertionNode = isJSDocTypeAssertion(initializer) ? getJSDocTypeAssertionType(initializer) : initializer.kind === 234 /* AsExpression */ || initializer.kind === 216 /* TypeAssertionExpression */ ? initializer.type : void 0;
|
|
132154
|
+
if (assertionNode && !isConstTypeReference(assertionNode) && resolver.canReuseTypeNodeAnnotation(context, node, assertionNode, symbol)) {
|
|
132155
|
+
result = serializeExistingTypeNode(assertionNode, context);
|
|
132156
132156
|
}
|
|
132157
132157
|
}
|
|
132158
132158
|
return result ?? inferTypeOfDeclaration(
|
package/lib/typescript.js
CHANGED
|
@@ -137111,9 +137111,9 @@ function createSyntacticTypeNodeBuilder(options, resolver) {
|
|
|
137111
137111
|
}
|
|
137112
137112
|
if (!result && node.kind === 303 /* PropertyAssignment */) {
|
|
137113
137113
|
const initializer = node.initializer;
|
|
137114
|
-
const
|
|
137115
|
-
if (
|
|
137116
|
-
result = serializeExistingTypeNode(
|
|
137114
|
+
const assertionNode = isJSDocTypeAssertion(initializer) ? getJSDocTypeAssertionType(initializer) : initializer.kind === 234 /* AsExpression */ || initializer.kind === 216 /* TypeAssertionExpression */ ? initializer.type : void 0;
|
|
137115
|
+
if (assertionNode && !isConstTypeReference(assertionNode) && resolver.canReuseTypeNodeAnnotation(context, node, assertionNode, symbol)) {
|
|
137116
|
+
result = serializeExistingTypeNode(assertionNode, context);
|
|
137117
137117
|
}
|
|
137118
137118
|
}
|
|
137119
137119
|
return result ?? inferTypeOfDeclaration(
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@typescript-deploys/pr-build",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "5.8.0-pr-
|
|
5
|
+
"version": "5.8.0-pr-60576-12",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|