TypeScript declarations
See original GitHub issuei’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
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Documentation - Introduction - TypeScript
The Declaration Files section is designed to teach you how to write a high-quality TypeScript Declaration File. We need to assume basic familiarity...
Read more >A quick introduction to “Type Declaration” files and adding ...
In this lesson, we are going to take a closer look at type declaration files which are one of the key ingredients of...
Read more >TypeScript — Type Declaration Files | by Makesh Kumar
Type declaration files are the files with d.ts extension, where types were declared via interface or type . These declaration files have no...
Read more >Writing Declaration Files for @types - TypeScript
Declaration files, if you're not familiar, are just files that describe the shape of an existing JavaScript codebase to TypeScript. By using ...
Read more >Declaration Files | The TypeScript Workshop
Traditionally, declaration files are kept in their own directory called types/ and are then imported by the modules that they are defining. It's...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
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.