Closed aniravi24 closed 2 years ago
@sandulat we enabled a plugin in our project that triggered this error, thought I should change it here so it works for everyone! The Record utility type has been around since TS 2.1 so it should work.
@sandulat Can this be merged please?
Sorry for the delay @aniravi24! This is now released under routes-gen
0.5.1
.
https://github.com/sandulat/routes-gen/releases/tag/v0.5.1
https://www.npmjs.com/package/routes-gen/v/0.5.1
cc @IgnisDa
Thank you very much @aniravi24!
@sandulat awesome, thank you!
To use the more accurate type based on typescript/eslint's recommendations, The generated type when there's no param was changed to Record<string, never>
https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/ban-types.md
For example, this is valid in the current main branch
But once it's changed, now it throws an error
However, this is still valid as expected