question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeScript declarations

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
k-nrdcommented, 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

0reactions
leeoniyacommented, Jun 22, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found