Hi all,
I've been using @Pa_Vi/hana-client Promises module for many years. A new project is being written on TypeScript, and importing "@sap/hana-client/extension/Promise.js" leads to message "Could not find a declaration file for module '@sap/hana-client/extension/Promise.js'. '(...)/node_modules/@sap/hana-client/extension/Promise.js' implicitly has an 'any' type.
If the '@sap/hana-client' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@sap/hana-client/extension/Promise.js';". This makes type inferrence impossible on the downstream, so we need to manually type each variable/function declaration to not be of type any.
As @Pa_Vi/hana-client has a .d.ts file, I would expect the Promises module to be typed, but then it would probably be imported from the root of the module (as usual with any other lib), instead of being imported directly from the specific .js file.
With that context, I have 2 questions:
1) How/where can I raise an issue to the appropriate SAP team to have this correctly typed (and, even better, importable from the root)?
2) Is there a way we can "type the Promises module ourselves" (via type coercion from the types made available by @Pa_Vi/hana-client or something in that sense), so that types can be inferred as expected?
Thank you in advance,
Lawisch
Request clarification before answering.
Hi Lawisch,
I'm on the team responsible for the hana-client Node.js driver and adding the type declarations for Promise.js is currently on our backlog. Unfortunately I can't commit to a specific date when this will be available, but I'll look into raising the priority on our end.
Thanks,
Ian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.