@@ -6,14 +6,14 @@ import { checkForLuaLibType } from "../transformers/class/new";
66import { importLuaLibFeature , LuaLibFeature } from "../utils/lualib" ;
77import { getIdentifierSymbolId } from "../utils/symbols" ;
88import { isArrayType , isFunctionType , isStandardLibraryType , isStringType } from "../utils/typescript" ;
9- import { transformArrayCall , transformArrayProperty } from "./array" ;
9+ import { transformArrayProperty , transformArrayPrototypeCall } from "./array" ;
1010import { transformConsoleCall } from "./console" ;
11- import { transformFunctionCall } from "./function" ;
12- import { transformGlobalFunctionCall } from "./global" ;
11+ import { transformFunctionPrototypeCall } from "./function" ;
12+ import { transformGlobalCall } from "./global" ;
1313import { transformMathCall , transformMathProperty } from "./math" ;
1414import { transformNumberConstructorCall } from "./number" ;
15- import { transformObjectCall , transformObjectConstructorCall } from "./object" ;
16- import { transformStringCall , transformStringConstructorCall , transformStringProperty } from "./string" ;
15+ import { transformObjectConstructorCall , transformObjectPrototypeCall } from "./object" ;
16+ import { transformStringConstructorCall , transformStringProperty , transformStringPrototypeCall } from "./string" ;
1717import { transformSymbolConstructorCall } from "./symbol" ;
1818
1919export function transformBuiltinPropertyAccessExpression (
@@ -50,7 +50,7 @@ export function transformBuiltinCallExpression(
5050 if ( ts . isIdentifier ( node . expression ) && isStandardLibraryType ( context , expressionType , undefined ) ) {
5151 // TODO:
5252 checkForLuaLibType ( context , expressionType ) ;
53- const result = transformGlobalFunctionCall ( context , node ) ;
53+ const result = transformGlobalCall ( context , node ) ;
5454 if ( result ) {
5555 return result ;
5656 }
@@ -86,21 +86,21 @@ export function transformBuiltinCallExpression(
8686 }
8787
8888 if ( isStringType ( context , ownerType ) ) {
89- return transformStringCall ( context , propertyCall ) ;
89+ return transformStringPrototypeCall ( context , propertyCall ) ;
9090 }
9191
9292 if ( isArrayType ( context , ownerType ) ) {
93- const result = transformArrayCall ( context , propertyCall ) ;
93+ const result = transformArrayPrototypeCall ( context , propertyCall ) ;
9494 if ( result ) {
9595 return result ;
9696 }
9797 }
9898
9999 if ( isFunctionType ( context , ownerType ) ) {
100- return transformFunctionCall ( context , propertyCall ) ;
100+ return transformFunctionPrototypeCall ( context , propertyCall ) ;
101101 }
102102
103- const objectResult = transformObjectCall ( context , propertyCall ) ;
103+ const objectResult = transformObjectPrototypeCall ( context , propertyCall ) ;
104104 if ( objectResult ) {
105105 return objectResult ;
106106 }
0 commit comments