-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add fallback to any
/ unknown
in case of errors in generating .d.ts
#2
Comments
any
in case of errors in generating .d.ts
any
/ unknown
in case of errors in generating .d.ts
@mozkarakoc will you adopt such MR? |
The generator returns |
const { generate } = require('react-dts-generator');
const result = generate({
input: './Feedback.js',
isBaseClass: true,
});
console.log(result); gives me
debug output in code function generateOneOf(name, values, flag) {
let unions = '';
values.forEach(item => unions += `${item.value} | `);
unions = unions.substr(0, unions.length - 3);
const property = dom.create.property(name, unions, flag);
return { property };
} gives me
|
I'm ready to provide a PR with tests and so on. Just wondering if you're fine about it |
I think this is a bug and it would be nice to fix. PR's are always welcome. |
@vvscode thanks for your contribution. I'll publish a new version. |
@KuveytTurk
In some cases, the generator fails with errors. Looks like it worth to add a fallback to
any
type in such casesThe text was updated successfully, but these errors were encountered: