I'm dipping my toe into Mendix Typescript SDK and followed the instructions on https://docs.mendix.com/apidocs-mxsdk/mxsdk/setting-up-your-development-environment.
I then followed https://docs.mendix.com/apidocs-mxsdk/mxsdk/creating-your-first-script to create a script to try it out.
However, I'm getting the following error to the code script.ts
suggested on this page:
error TS2554: Expected 1-2 arguments, but got 0.
30 return dm.load();
~~~~~~~~~
node_modules/mendixmodelsdk/dist/gen/domainmodels.d.ts:583:14
583 load(callback: (element: DomainModel) => void, forceRefresh?: boolean): void;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
An argument for 'callback' was not provided.
Found 1 error.
return dm.load();
I'm not NodeJS savvy - but I can tell the parameter passed in to load()
is incorrect - just doesn't exists although load()
is defined to take a parameter. But then, why the error to a script on the suggested setup? I'll attack this issue. But need help on where to start.
This "feels" like a version difference/setup error. But I've seen no errors anywhere else while I was setting it up.
What am i missing?