About external class

Hello, I have a difficult task: import a big JS library into my electron project.

Well, I can create classes in pascal and use 'asm' blocks to access the actual underlying object but it is really a huge work......so I try to find a short path to access the functions and methods such as using extenal classes, but I faild.

Cloud you please show me a simple example for using extenal class on this complex library? For example, access the methods 'TIMGetSDKVersion' at row 1596.

I can use 'TIMGetSDKVersion' by JS in this way:

const timRender = require('renderer');
let renderInstance;
renderInstance = new timRender();
renderInstance.TIMGetSDKVersion().then((result) => {
}).catch((err) => {
})

The library file is below:
renderer.js (108.9 KB)

Thank you very much

This is not a light task. There is at this moment not an automatic way to do this for just any JavaScript library.
To see examples of external classes, look at web.pas under Core Source\RTL folder

I see, thank you @brunofierens