-
Notifications
You must be signed in to change notification settings - Fork 367
[Bug][Types] 'lovefield.d.ts' is not a module #188
Comments
you can try: npm i @types/lovefield --save-dev import * as lf from 'lovefield'
.... |
I did try the first one, when i was providing it as a global variable with Webpack's As for the second it worked very well, i realized later that if it was an UMD module i had to import like that, then the typings started working, however i still have the doubt, why does the one inside the lovefield package differs from the one in DefinitelyTyped/DefinitelyTyped#13574 Also take a look to this line in the typings of the repo, it seems like you want to get the typings of |
To bundle types, you should add A few notes about improving the definition:
export = lf;
export as namespace lf; |
@andy-ms What do you mean to use |
The |
I meant to ask, is that an option in the library repo or is it in the client project that uses this lib? For example i use webpack, and i don't recall this option being available. |
Aside in my project i provide promises polyfill through |
|
Yeah, i'm already making use of a polyfill that takes care of Promise's shimming, and most likely other users will. |
Closing this issue since there's no actionable item from Lovefield library. |
Please re-open. The typings are currently unusable and they are easy to fix. Don't know why you think there is no actionable item, since I did mention a few. The most important one is to add |
Ok, I thought you were talking about adding to Luchillo's stuff (since the "your" looks like replying his post). TBH Lovefield team will not be able to test that npm package.json and we don't know if that would create side effects. |
This is what VSCode shows when importing lovefield, in my repo it shows
module '*'
if can't find, if i get into the dist folder then shows the error in the image.The text was updated successfully, but these errors were encountered: