@@ -8873,10 +8873,8 @@ namespace ts {
8873
8873
return getReturnTypeOfSignature(getterSignature);
8874
8874
}
8875
8875
}
8876
- if (isInJSFile(declaration)) {
8877
- const type = getParameterTypeOfTypeTag(func, declaration);
8878
- if (type) return type;
8879
- }
8876
+ const parameterTypeOfTypeTag = getParameterTypeOfTypeTag(func, declaration);
8877
+ if (parameterTypeOfTypeTag) return parameterTypeOfTypeTag;
8880
8878
// Use contextual parameter type if one is available
8881
8879
const type = declaration.symbol.escapedName === InternalSymbolName.This ? getContextualThisParameterType(func) : getContextuallyTypedParameterType(declaration);
8882
8880
if (type) {
@@ -12762,10 +12760,8 @@ namespace ts {
12762
12760
}
12763
12761
12764
12762
function getSignatureFromDeclaration(declaration: SignatureDeclaration | JSDocSignature): Signature {
12765
- if (isInJSFile(declaration)) {
12766
- const signature = getSignatureOfTypeTag(declaration);
12767
- if (signature) return signature;
12768
- }
12763
+ const signature = getSignatureOfTypeTag(declaration);
12764
+ if (signature) return signature;
12769
12765
const links = getNodeLinks(declaration);
12770
12766
if (!links.resolvedSignature) {
12771
12767
const parameters: Symbol[] = [];
@@ -12980,7 +12976,7 @@ namespace ts {
12980
12976
else {
12981
12977
const type = signature.declaration && getEffectiveReturnTypeNode(signature.declaration);
12982
12978
let jsdocPredicate: TypePredicate | undefined;
12983
- if (!type && isInJSFile(signature.declaration) ) {
12979
+ if (!type) {
12984
12980
const jsdocSignature = getSignatureOfTypeTag(signature.declaration!);
12985
12981
if (jsdocSignature && signature !== jsdocSignature) {
12986
12982
jsdocPredicate = getTypePredicateOfSignature(jsdocSignature);
0 commit comments