Add typings
Jytesh opened this issue · comments
Will enable autocompletion in supported text editors/IDEs.
Previous discussion in #22
To prevent definitions going out of sync we should either include some sort of test to validate the definitions or alternatively they be generated from our source (annotated comments?).
From #25
Better to add the typings from PR: #30 instead of translating the whole thing to typescript (IMO)
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/keyv/index.d.ts
This is also a good reference
I think keeping types at DefinitelyTyped
repository it's great because it allows any member of the community to edit it without releasing a new keyv version.
Also I think that's a good practice inside TypeScript community, e.g.,
https://github.com/browserless/chrome/blob/master/base/Dockerfile#L85
Alright then! Any idea how to test those, and have a notif or something when the typings go out of sync?
And I think the types at @types/keyv
only provide types for keyv
by default, do we need to enable/configure something to make @keyvhq/keyv
use the same typings
And I think the types at
@types/keyv
only provide types forkeyv
by default, do we need to enable/configure something to make@keyvhq/keyv
use the same typings
@Kikobeats ^^