Closed LumaKernel closed 3 years ago
We do not intend to formally support TypeScript, I think this would be a great contribution for https://github.com/DefinitelyTyped/DefinitelyTyped, wdyt?
Okay, thanks! I will do that.
Right on! If you'd like to add myself and @brianleroux as co-maintainers, happy to provide backup/feedback where we can!
I made the PR for DefinitelyTyped and applied necessary fixes. https://github.com/DefinitelyTyped/DefinitelyTyped/pull/54596 @ryanblock @brianleroux Thank you for running. I appreciate reviewing since it may take longer to wait reviewed by DefinitelyTyped owners. If you have time to review, would you visit above link? If you've reviewed, I'll add to owners!
Ah, it looks I need to add as owners beforehand...? Can I add you two ( @ryanblock @brianleroux ) as maintainers?
It's been merged and released as @types/begin__data
❤️
Yes, please add us as maintainers! Thanks for creating this, this is great!
Adding
typing.d.ts
for TypeScript users ( and also including JS users ). It enables to use@begin/data
in TypeScript way!Most of doc comments are cited from https://docs.begin.com/en/data/begin-data
Some detailed of my decisions.
undefined
in{ [key: string]: BeginDataType | undefined }
inBeginDataType
?{table:"foo", bar: "hi", ...{bar: undefined}}
for deleting keys.err
isError | null | undefined
instead ofError | null
?null
butundefined
, so I decided to make it consistent.data.destroy([{ table, key }], (...args) => {console.log(args); });
shows[]
..page()
so I've added only typing for this.Thank you!