@@ -18,12 +18,12 @@ import {
1818 invalidMultiFunctionUse ,
1919} from "../../../transformation/utils/diagnostics" ;
2020
21- const isMultiHelperDeclaration = ( context : TransformationContext ) => ( declaration : ts . Declaration ) : boolean =>
22- helpers . getHelperFileKind ( context , declaration . getSourceFile ( ) ) === helpers . HelperKind . Multi ;
21+ const isMultiHelperDeclaration = ( declaration : ts . Declaration ) : boolean =>
22+ helpers . getHelperFileKind ( declaration ) === helpers . HelperKind . MultiFunction ;
2323
2424function isMultiHelperCallSignature ( context : TransformationContext , expression : ts . CallExpression ) : boolean {
2525 const type = context . checker . getTypeAtLocation ( expression . expression ) ;
26- return type . symbol ?. declarations ?. some ( isMultiHelperDeclaration ( context ) ) ?? false ;
26+ return type . symbol ?. declarations ?. some ( isMultiHelperDeclaration ) ?? false ;
2727}
2828
2929export function isMultiReturnCall ( context : TransformationContext , node : ts . Node ) : node is ts . CallExpression {
@@ -32,12 +32,12 @@ export function isMultiReturnCall(context: TransformationContext, node: ts.Node)
3232 }
3333
3434 const signature = context . checker . getResolvedSignature ( node ) ;
35- return signature ?. getReturnType ( ) . aliasSymbol ?. declarations ?. some ( isMultiHelperDeclaration ( context ) ) ?? false ;
35+ return signature ?. getReturnType ( ) . aliasSymbol ?. declarations ?. some ( isMultiHelperDeclaration ) ?? false ;
3636}
3737
3838export function isMultiHelperNode ( context : TransformationContext , node : ts . Node ) : boolean {
3939 const type = context . checker . getTypeAtLocation ( node ) ;
40- return type . symbol ?. declarations ?. some ( isMultiHelperDeclaration ( context ) ) ?? false ;
40+ return type . symbol ?. declarations ?. some ( isMultiHelperDeclaration ) ?? false ;
4141}
4242
4343export function transformMultiHelperReturnStatement (
@@ -158,7 +158,7 @@ export function findMultiHelperAssignmentViolations(
158158 const valueSymbol = context . checker . getShorthandAssignmentValueSymbol ( element ) ;
159159 if ( valueSymbol ) {
160160 const declaration = valueSymbol . valueDeclaration ;
161- if ( declaration && isMultiHelperDeclaration ( context ) ( declaration ) ) {
161+ if ( declaration && isMultiHelperDeclaration ( declaration ) ) {
162162 context . diagnostics . push ( invalidMultiFunctionUse ( element ) ) ;
163163 return element ;
164164 }
0 commit comments