File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2721,11 +2721,11 @@ namespace ts {
2721
2721
* Gets the effective type annotation of a variable, parameter, or property. If the node was
2722
2722
* parsed in a JavaScript file, gets the type annotation from JSDoc.
2723
2723
*/
2724
- export function getEffectiveTypeAnnotationNode ( node : VariableLikeDeclaration ) : TypeNode {
2724
+ export function getEffectiveTypeAnnotationNode ( node : VariableLikeDeclaration ) : TypeNode | undefined {
2725
2725
if ( node . type ) {
2726
2726
return node . type ;
2727
2727
}
2728
- if ( node . flags & NodeFlags . JavaScriptFile ) {
2728
+ if ( isInJavaScriptFile ( node ) ) {
2729
2729
return getJSDocType ( node ) ;
2730
2730
}
2731
2731
}
@@ -2734,11 +2734,11 @@ namespace ts {
2734
2734
* Gets the effective return type annotation of a signature. If the node was parsed in a
2735
2735
* JavaScript file, gets the return type annotation from JSDoc.
2736
2736
*/
2737
- export function getEffectiveReturnTypeNode ( node : SignatureDeclaration ) : TypeNode {
2737
+ export function getEffectiveReturnTypeNode ( node : SignatureDeclaration ) : TypeNode | undefined {
2738
2738
if ( node . type ) {
2739
2739
return node . type ;
2740
2740
}
2741
- if ( node . flags & NodeFlags . JavaScriptFile ) {
2741
+ if ( isInJavaScriptFile ( node ) ) {
2742
2742
return getJSDocReturnType ( node ) ;
2743
2743
}
2744
2744
}
You can’t perform that action at this time.
0 commit comments