Hi Marien,
As part of the Mendix ModelSDK v4 release, we've upgraded to Typescript 2, which probably causes some of the issues you're having. So the first step would be to upgrade to TS 2.x and no longer use the TSD typing but directly use types in the package.json. Our updated documentation for the Mendix Platform SDK shows a bit more specific how to do that e.g. for the `when` library. Next would be fixing breaking changes in the ModelSDK, listed in our releasenotes for Model SDK 4.0. Hopefully, this is helpful to get started and please ask again if you keep running into problems :)