Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Support nullable #535
Support nullable #535
Changes from all commits
9f42f43
f4fbe87
ad4ee38
6982494
84cff45
061ad03
42f3676
caf143c
988a6f4
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand why you added
warning
as its a good addition, but unless I'm reading theutils
incorrectly it will always log if this conditional is hit. I don't see any other logs in this file, just errors being thrown.The only location
error
is imported is in thecli.ts
file and that means the programmatic version will always log if this is hit, when you are actually under the hood fixing the issue vs. logging a properly formated error during acli
command.(see my comment on the recommended change in
utils.ts
a).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will always log. If you look at the
log
function below it actually returnsvoid
when its NOT verbose.Since this is just a warning I recommend the following change:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was written to mimic
json-schema-to-typescript/src/utils.ts
Lines 205 to 210 in 6adcad9
I don't pretend to understand that choice and it's not my aim to question it. I'm just following precedence here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I figured, but I believe that is only done in the
cli
not meant for run time usage as I don't really wantconsole.error
orconsole.warn
being called when I use the library programatically.