fix(52594): this incorrectly applies in TS files in typeToString (#52610)

This commit is contained in:
Oleksandr T
2023-02-06 18:59:32 +02:00
committed by GitHub
parent 0bf99914e7
commit 70d14f3de2
8 changed files with 406 additions and 3 deletions

View File

@@ -7307,7 +7307,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
if (signature.thisParameter) {
return symbolToParameterDeclaration(signature.thisParameter, context);
}
if (signature.declaration) {
if (signature.declaration && isInJSFile(signature.declaration)) {
const thisTag = getJSDocThisTag(signature.declaration);
if (thisTag && thisTag.typeExpression) {
return factory.createParameterDeclaration(