@@ -5,13 +5,13 @@ import { PropertyCallExpression } from "../transformers/call";
55import { checkForLuaLibType } from "../transformers/class/new" ;
66import { importLuaLibFeature , LuaLibFeature } from "../utils/lualib" ;
77import { getIdentifierSymbolId } from "../utils/symbols" ;
8- import { isArrayType , isFunctionType , isStandardLibraryType , isStringType } from "../utils/typescript" ;
8+ import { isArrayType , isFunctionType , isNumberType , isStandardLibraryType , isStringType } from "../utils/typescript" ;
99import { transformArrayProperty , transformArrayPrototypeCall } from "./array" ;
1010import { transformConsoleCall } from "./console" ;
1111import { transformFunctionPrototypeCall } from "./function" ;
1212import { transformGlobalCall } from "./global" ;
1313import { transformMathCall , transformMathProperty } from "./math" ;
14- import { transformNumberConstructorCall } from "./number" ;
14+ import { transformNumberConstructorCall , transformNumberPrototypeCall } from "./number" ;
1515import { transformObjectConstructorCall , transformObjectPrototypeCall } from "./object" ;
1616import { transformStringConstructorCall , transformStringProperty , transformStringPrototypeCall } from "./string" ;
1717import { transformSymbolConstructorCall } from "./symbol" ;
@@ -89,6 +89,10 @@ export function transformBuiltinCallExpression(
8989 return transformStringPrototypeCall ( context , propertyCall ) ;
9090 }
9191
92+ if ( isNumberType ( context , ownerType ) ) {
93+ return transformNumberPrototypeCall ( context , propertyCall ) ;
94+ }
95+
9296 if ( isArrayType ( context , ownerType ) ) {
9397 const result = transformArrayPrototypeCall ( context , propertyCall ) ;
9498 if ( result ) {
0 commit comments