DEV Community

loading...

Discussion on: Writing a TypeScript Type Definition for a JavaScript npm Package

Collapse
noprod profile image
NOPROD ☄️ • Edited

Sometimes we can also directly look into the library's code, dev put somes exemples into the *.d.ts files, so you can follow it ^^

exemple in vue-next (runtime-core.d.ts) :

Collapse
pahund profile image
Patrick Hund Author

Definitely, that's the beauty of the JavaScript ecosystem, you can always inspect the source code