@@ -24,14 +24,14 @@ export class TSHelper {
2424 }
2525
2626 public static containsStatement ( statements : ts . NodeArray < ts . Statement > , kind : ts . SyntaxKind ) : boolean {
27- return statements . some ( ( statement ) => statement . kind === kind ) ;
27+ return statements . some ( statement => statement . kind === kind ) ;
2828 }
2929
3030 public static isFileModule ( sourceFile : ts . SourceFile ) {
3131 if ( sourceFile ) {
3232 // Vanilla ts flags files as external module if they have an import or
3333 // export statement, we only check for export statements
34- return sourceFile . statements . some ( ( statement ) =>
34+ return sourceFile . statements . some ( statement =>
3535 ( ts . getCombinedModifierFlags ( statement ) & ts . ModifierFlags . Export ) !== 0
3636 || statement . kind === ts . SyntaxKind . ExportAssignment
3737 || statement . kind === ts . SyntaxKind . ExportDeclaration ) ;
@@ -88,9 +88,11 @@ export class TSHelper {
8888
8989 public static hasCustomDecorator ( type : ts . Type , checker : ts . TypeChecker , decorator : string ) : boolean {
9090 if ( type . symbol ) {
91- const comment = type . symbol . getDocumentationComment ( checker ) ;
91+ const comments = type . symbol . getDocumentationComment ( checker ) ;
9292 const decorators =
93- comment . filter ( ( _ ) => _ . kind === "text" ) . map ( ( _ ) => _ . text . trim ( ) ) . filter ( ( _ ) => _ [ 0 ] === "!" ) ;
93+ comments . filter ( comment => comment . kind === "text" )
94+ . map ( comment => comment . text . trim ( ) )
95+ . filter ( comment => comment [ 0 ] === "!" ) ;
9496 return decorators . indexOf ( decorator ) > - 1 ;
9597 }
9698 return false ;
0 commit comments