@@ -29,36 +29,41 @@ export function getNodeType(value: unknown): ParentNodeType {
2929 if ( Boolean ( value ) && isRecord ( value ) ) {
3030 if ( isESNode ( value ) ) {
3131 return 'esNode' ;
32- } else if ( '$id' in value && 'childScopes' in value && 'type' in value ) {
32+ }
33+ if ( '$id' in value && 'childScopes' in value && 'type' in value ) {
3334 return 'scope' ;
34- } else if (
35+ }
36+ if (
3537 'scopes' in value &&
3638 'nodeToScope' in value &&
3739 'declaredVariables' in value
3840 ) {
3941 return 'scopeManager' ;
40- } else if (
41- 'references' in value &&
42- 'identifiers' in value &&
43- 'name' in value
44- ) {
42+ }
43+ if ( 'references' in value && 'identifiers' in value && 'name' in value ) {
4544 return 'scopeVariable' ;
46- } else if ( '$id' in value && 'type' in value && 'node' in value ) {
45+ }
46+ if ( '$id' in value && 'type' in value && 'node' in value ) {
4747 return 'scopeDefinition' ;
48- } else if (
48+ }
49+ if (
4950 '$id' in value &&
5051 'resolved' in value &&
5152 'identifier' in value &&
5253 'from' in value
5354 ) {
5455 return 'scopeReference' ;
55- } else if ( 'kind' in value && 'pos' in value && 'flags' in value ) {
56+ }
57+ if ( 'kind' in value && 'pos' in value && 'flags' in value ) {
5658 return 'tsNode' ;
57- } else if ( 'getSymbol' in value ) {
59+ }
60+ if ( 'getSymbol' in value ) {
5861 return 'tsType' ;
59- } else if ( 'getDeclarations' in value && value . getDeclarations != null ) {
62+ }
63+ if ( 'getDeclarations' in value && value . getDeclarations != null ) {
6064 return 'tsSymbol' ;
61- } else if ( 'getParameters' in value && value . getParameters != null ) {
65+ }
66+ if ( 'getParameters' in value && value . getParameters != null ) {
6267 return 'tsSignature' ;
6368 }
6469 }
@@ -137,7 +142,8 @@ export function getTooltipLabel(
137142 case 'tsType' :
138143 if ( propName === 'flags' ) {
139144 return tsEnumFlagToString ( 'TypeFlags' , value ) ;
140- } else if ( propName === 'objectFlags' ) {
145+ }
146+ if ( propName === 'objectFlags' ) {
141147 return tsEnumFlagToString ( 'ObjectFlags' , value ) ;
142148 }
143149 break ;
0 commit comments