@@ -3,7 +3,7 @@ import * as ts from "typescript";
33export class TSHelper {
44
55 // Reverse lookup of enum key by value
6- public static enumName ( needle , haystack ) {
6+ public static enumName ( needle , haystack ) : string {
77 for ( const name in haystack ) {
88 if ( haystack [ name ] === needle ) {
99 return name ;
@@ -13,7 +13,7 @@ export class TSHelper {
1313 }
1414
1515 // Breaks down a mask into all flag names.
16- public static enumNames ( mask , haystack ) {
16+ public static enumNames ( mask , haystack ) : string [ ] {
1717 const result = [ ] ;
1818 for ( const name in haystack ) {
1919 if ( ( mask & haystack [ name ] ) !== 0 && mask >= haystack [ name ] ) {
@@ -41,7 +41,7 @@ export class TSHelper {
4141 return undefined ;
4242 }
4343
44- public static isFileModule ( sourceFile : ts . SourceFile ) {
44+ public static isFileModule ( sourceFile : ts . SourceFile ) : boolean {
4545 if ( sourceFile ) {
4646 // Vanilla ts flags files as external module if they have an import or
4747 // export statement, we only check for export statements
@@ -53,7 +53,7 @@ export class TSHelper {
5353 return false ;
5454 }
5555
56- public static isInDestructingAssignment ( node : ts . Node ) {
56+ public static isInDestructingAssignment ( node : ts . Node ) : boolean {
5757 return node . parent && ts . isVariableDeclaration ( node . parent ) && ts . isArrayBindingPattern ( node . parent . name ) ;
5858 }
5959
0 commit comments