Skip to content

multiple schema files into single .d.ts file export #94

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ducin opened this issue May 24, 2017 · 1 comment
Closed

multiple schema files into single .d.ts file export #94

ducin opened this issue May 24, 2017 · 1 comment

Comments

@ducin
Copy link

ducin commented May 24, 2017

Is there any way to consume json2ts bin file to load multiple schema files and output just a single .d.ts file?

I've got many schema files and, of course, I can map them like this: schema -> .d.ts, but I'd have to maintain such mapping and consume multiple .d.ts files in my typescript app. I'd prefer to be able to do this:

$ ./node_modules/.bin/json2ts api/geo/country.schema.json api/geo/locale.schema.json ...

or even this:

$ ./node_modules/.bin/json2ts api/geo/*.schema.json

and then it outputs everything to a single .d.ts file.

In fact, I'm touching 2 things here at the same time: mutliple file input and single file output. The latter is more important - just to include a single .d.ts file. Then, my TS app could just load this single .d.ts file and forget the whole thing. But now, if there is any new file arriving - or if a file name changes - consumer app has to reflect file name changes... Would really like to avoid that.

Any chance on that?

@bcherny
Copy link
Owner

bcherny commented May 24, 2017

Good to have more interest for this - please vote on #16.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants