Closed zivnadel closed 1 year ago
@yuhgto @gregra81
Hi @zivnadel,
thank you for the fix! However, unfortunately, I just saw that the interfaces are not being exported so it is not possible to use them in our own code base like import {GetResponse} from 'monday-sdk-js'
. We would have to rebuilt them in our code to have it working.
Should I create for this a new issue for this or was this on purpose?
It was intentional – we never exported the interfaces, even in the previous version.
But it should still work if you import the whole module:
import mondaySdk from 'monday-sdk-js';
const monday = mondaySdk();
const monday.storage.instance.setItem({'foo':'bar'}, 5) // will throw typescript errors
@yuhgto in our code we have some interfaces like
interface SomeInterface {
doStuff(): Promise<GetResponse>; // inside this method monday.storage.instance.setItem would be called
}
In order to add correct types here, we cannot directly import them from the sdk.
Oh cool! Ok, I'll discuss it internally and add an upcoming task to export these interfaces.
Great, thanks! 👍🏻
The types should be updated now according to the docs. Closes #84.