DEV Community


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

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) :

pahund profile image
Patrick Hund Author

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