typescript-json-schema icon indicating copy to clipboard operation
typescript-json-schema copied to clipboard

the file with subffix of '.d.ts' will be transformed to empty

Open michael8512 opened this issue 3 years ago • 4 comments

In programmatic use, the file with subffix of '.d.ts' will be transformed to empty, while it did well with cli command. Why?

michael8512 avatar Jun 07 '21 03:06 michael8512

Thanks for the report. Can you provide a minimal reproducible example that demonstrates the issue?

domoritz avatar Jun 07 '21 04:06 domoritz

Thanks for the report. Can you provide a minimal reproducible example that demonstrates the issue?

check and try https://github.com/michael8512/ts-json-test.git

michael8512 avatar Jun 07 '21 06:06 michael8512

I'd recommend using a tsconfig.json. And also try https://github.com/vega/ts-json-schema-generator.

domoritz avatar Jun 07 '21 15:06 domoritz

Happening to me as well. When I profile getProgramFromFiles file with .d.ts extension it gives back empty definitions. As soon as I change back to simple .ts file it works fine.

iam-dev0 avatar Sep 08 '22 04:09 iam-dev0