I know I can run tsc --declaration myfile.ts
to generate a declaration file. Is there some way I can do this programmatically with the TS compiler?
i.e something like
const ts = require('typescript');
const out = ts.declarations('source-string');
I know I can run tsc --declaration myfile.ts
to generate a declaration file. Is there some way I can do this programmatically with the TS compiler?
i.e something like
const ts = require('typescript');
const out = ts.declarations('source-string');
Copyright © 2021 Jogjafile Inc.
I think that this github project, can be solution for you: https://github.com/SitePen/dts-generator
Start: npm install dts-generator
Generate your d.ts bundle programmatically:
For more info you should visit link above :).