I would like to get some help to make tf.js run in this environment/setup:

GraalVM: https://www.graalvm.org/ 4

TypeScript: https://www.typescriptlang.org/ 2


Do you think it is possible? I’m still pretty new to TypeScript so a sample code/project would be very helpful. Here’s my current tsconfig if it helps:

{
“compilerOptions”: {
“module”: “amd”,
“target”: “es5”,
“moduleResolution”: “node”,
“allowJs”: true,
“sourceMap”: false,
“newLine”: “LF”,
“esModuleInterop”: true,
“baseUrl”: “.”,
“rootDir”: “./src/TypeScript/”,
“outDir”: “./src/FileCabinet/SuiteApps/com.netsuite.unittestreference/src”,
“lib”: [“es2015”, “dom”],
“skipLibCheck”: true,
“paths”: {
“N”: [“node_modules/@hitc/netsuite-types/N”],
“N/": ["node_modules/@hitc/netsuite-types/N/”],
“n”: ["./src/TypeScript/types/n"],
“n/": ["./src/TypeScript/types/n/”]
}
},
“exclude”: ["./test//", "./src/TypeScript/types/"],
“include”: ["./src/TypeScript//*"]
}

I tried using the CDN version and I got this error:
Error: Could not find a global object [at Rg (/SuiteApps/com.netsuite.unittestreference/src/app/HelloTypeScriptPage/main/tf.min.js:17:125032)]
I also tried the npm version, the tf.js doesn’t seem to be automatically built by TypeScript. I have some experience on webpack. Should I use a bundler?