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

Error: Couldn't resolve literal node: null since typescript 4.x #778

Closed
3 of 4 tasks
simllll opened this issue Aug 24, 2020 · 4 comments
Closed
3 of 4 tasks

Error: Couldn't resolve literal node: null since typescript 4.x #778

simllll opened this issue Aug 24, 2020 · 4 comments

Comments

@simllll
Copy link
Contributor

simllll commented Aug 24, 2020

Sorting

  • I'm submitting a ...

    • bug report
    • feature request
    • support request
  • I confirm that I

    • used the search to make sure that a similar issue hasn't already been submit

Expected Behavior

I'm not quite sure about the nature of this "bug". I found several tickets regarding "nullable" and co, but as this just popped up on our side since we upgraded to ts 4.x it seems it is a tleast not directly related.

The first question therefore would be:
Should something like this be possible:
interface IInterviewQuestion {
....
moduleOptions?: { [key: string]: string | number | boolean | null };
...
}

I'm refering to the "null" here, we just recently changed this from undefined to null.

But now we get this error:
There was a problem resolving type of 'IInterviewQuestion'.
There was a problem resolving type of 'IStartInterviewResultDTO'.
Generate routes error.
Error: Couldn't resolve literal node: null
at new GenerateMetadataError (/home/simon/Dev/hokify/hokify-server/node_modules/tsoa/dist/metadataGeneration/exceptions.js:22:28)

Should this work? Or is null still unsupported?
see:

Current Behavior

It's not working with typescript 4.0.2

Context (Environment)

Version of the library: 3.2.1

Version of NodeJS: v12.18.3

@simllll
Copy link
Contributor Author

simllll commented Aug 24, 2020

Alright, very good news :-) I just tested it with tsoa 3.3.0-alpha.0 and the issue seems to be gone 🥳

@simllll simllll closed this as completed Aug 24, 2020
@simllll
Copy link
Contributor Author

simllll commented Aug 26, 2020

I'll keep it open till a new release is out :)

@simllll simllll reopened this Aug 26, 2020
@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

@github-actions github-actions bot added the Stale label Sep 26, 2020
@WoH WoH removed the Stale label Sep 26, 2020
@WoH
Copy link
Collaborator

WoH commented Sep 26, 2020

Assuming this is fixed now, will reopen if the issue remains.

@WoH WoH closed this as completed Sep 26, 2020
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

No branches or pull requests

2 participants