Skip to content
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

fix(NJsonSchema.CodeGeneration.TypeScript): add explicit '| null' in createInstance return type #1287

Merged
merged 1 commit into from
Nov 26, 2020

Conversation

rars
Copy link
Contributor

@rars rars commented Nov 26, 2020

When compiling the generated TypeScript code with strict null checking enabled, the return type of createInstance is highlighted as an error as its return type is T even though null can be returned.

This PR adds | null to the return type.

… include explicit '| null' to return type of createInstance
@RicoSuter RicoSuter merged commit 75e55c5 into RicoSuter:master Nov 26, 2020
@RicoSuter
Copy link
Owner

Thanks for the PR.

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

Successfully merging this pull request may close these issues.

2 participants