Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript declarations #186

Open
leeoniya opened this issue Nov 17, 2017 · 6 comments
Open

TypeScript declarations #186

leeoniya opened this issue Nov 17, 2017 · 6 comments

Comments

@leeoniya
Copy link
Member

i've started writing a domvm.d.ts file to make domvm pleasant to use with VSCode. so far i'm going through the following resources/examples written by people more familiar with TS:

https://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html
https://basarat.gitbooks.io/typescript/docs/types/ambient/d.ts.html
https://github.com/hyperapp/hyperapp/blob/master/hyperapp.d.ts

it's likely the initial version will not be optimal and could be reduced with generics, etc. if anyone has TS experience, i'd appreciate any improvements or recommendations.

cc @lawrence-dol @tropperstyle @iamjohnlong @Veid @logaan @sabine

@tropperstyle
Copy link

Just curious if there has been any movement here...

@leeoniya
Copy link
Member Author

i have some of this done and sitting around, i can push what i have to another branch if you'd like to help finish it up and test

@k-nrd
Copy link

k-nrd commented Jun 10, 2020

any progress made regarding type declarations?

would be happy to try to help with this

@leeoniya
Copy link
Member Author

i'll give this another go. my .d.ts-fu has improved somewhat as a result of making https://github.com/leeoniya/uPlot/blob/master/dist/uPlot.d.ts.

i should be able to put up at least 50% of it and you can maybe work on adding the rest?

also, since domvm comes in a bunch of flavors, what should be done? just make one def file for the full build with everything i guess?

@k-nrd
Copy link

k-nrd commented Jun 10, 2020

one def file for the full build seems reasonable

and sure, I can work on it when I can and see if we can get to 100%

i'd love to use domvm+typescript and do something like https://github.com/paldepind/functional-frontend-architecture w/ type safety

@leeoniya
Copy link
Member Author

hey @k-onrad, since i don't use TS myself and have other projects which need features/bugfixes, this is pretty low priority for me.

i wouldn't mind reviewing a PR if you'd like to submit one. try not to go too crazy with advanced TS meta-programming - take a look at https://github.com/leeoniya/uPlot/blob/master/dist/uPlot.d.ts for what i'd prefer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants