mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-11 02:15:10 -05:00
fix(26635): allow casts only when JSDoc type directly attached to an expression (#45960)
This commit is contained in:
@@ -33722,7 +33722,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
function checkParenthesizedExpression(node: ParenthesizedExpression, checkMode?: CheckMode): Type {
|
||||
if (isJSDocTypeAssertion(node)) {
|
||||
if (hasJSDocNodes(node) && isJSDocTypeAssertion(node)) {
|
||||
const type = getJSDocTypeAssertionType(node);
|
||||
return checkAssertionWorker(type, type, node.expression, checkMode);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user