mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 01:04:49 -05:00
PR Feedback
This commit is contained in:
@@ -12744,9 +12744,11 @@ namespace ts {
|
||||
if (declaration.type) {
|
||||
return getTypeFromTypeNode(declaration.type);
|
||||
}
|
||||
const jsDocType = isInJavaScriptFile(declaration) && getTypeForDeclarationFromJSDocComment(declaration);
|
||||
if (jsDocType) {
|
||||
return jsDocType;
|
||||
if (isInJavaScriptFile(declaration)) {
|
||||
const jsDocType = getTypeForDeclarationFromJSDocComment(declaration);
|
||||
if (jsDocType) {
|
||||
return jsDocType;
|
||||
}
|
||||
}
|
||||
if (declaration.kind === SyntaxKind.Parameter) {
|
||||
const type = getContextuallyTypedParameterType(<ParameterDeclaration>declaration);
|
||||
|
||||
@@ -2625,13 +2625,11 @@ namespace ts {
|
||||
if (accessor && accessor.parameters.length > 0) {
|
||||
const hasThis = accessor.parameters.length === 2 && parameterIsThisKeyword(accessor.parameters[0]);
|
||||
const parameter = accessor.parameters[hasThis ? 1 : 0];
|
||||
if (parameter) {
|
||||
if (parameter.type) {
|
||||
return parameter.type;
|
||||
}
|
||||
if (includeJSDocType && parameter.flags & NodeFlags.JavaScriptFile) {
|
||||
return getJSDocType(parameter);
|
||||
}
|
||||
if (parameter.type) {
|
||||
return parameter.type;
|
||||
}
|
||||
if (includeJSDocType && parameter.flags & NodeFlags.JavaScriptFile) {
|
||||
return getJSDocType(parameter);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user