Description
I'm testing out the capabilities of Creating .d.ts files from .js files with the fastify project.
We ship our own, hand written types at Fastify under the types directory as well as the fastify.d.ts root file. The testing im doing here is meant to ignore all of that and just see what the TSC compiler can generate for us.
I'm using the command (from a clean master branch and renaming the existing fastify.d.ts file to _fastify.d.ts):
npx typescript@next fastify.js --declaration --allowJs --emitDeclarationOnly --outDir types2
Which results in:
npx: installed 1 in 2.449s
Cannot read property 'kind' of undefined
It does not generate a fastify.d.ts
file, but does generate matching type definitions for all of our core deps found in lib
.
Would be interested in why this error is being returned and how we could fix it.
TypeScript Version: npx typescript@next
Search Terms:
"Cannot read property 'kind' of undefined"
Code
clean master branch and renaming the existing fastify.d.ts file to _fastify.d.ts
Expected behavior:
A fastify.d.ts
file to generated
Actual behavior:
A lib
directory is generated in the types2
directory and the Cannot read property 'kind' of undefined
is returned in the console.
Related Issues:
#38383