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

Build failure with exactOptionalPropertyTypes enabled #960

Closed
jhasuraj01 opened this issue Feb 17, 2024 · 5 comments · Fixed by #1059
Closed

Build failure with exactOptionalPropertyTypes enabled #960

jhasuraj01 opened this issue Feb 17, 2024 · 5 comments · Fixed by #1059
Labels
next major This will be address in the next major version.

Comments

@jhasuraj01
Copy link

Is your feature request related to a problem? Please describe.

Building the project using this library fails when exactOptionalPropertyTypes is enabled in project's tsconfig.json unless skipLibCheck is also set to true. skipLibCheck bypasses type checking for third-party libraries, compromising type safety.

Describe the solution you'd like

  • Add the exactOptionalPropertyTypes property to oclif/core's tsconfig.json.
  • Make any necessary code changes to ensure successful build with this option enabled.

Example rc/config/plugin.ts#L85:

From To
{ 
    parent: Plugin | undefined;    
}
{
    parent?: Plugin;
}

Additional context

  • This change will improve type safety, leading to fewer potential runtime errors.
  • It demonstrates adherence to best practices for TypeScript projects.

I would be happy to come up with a PR or collaborate on a potential solution.

@mdonnalley mdonnalley added the unlikely Feature we are unlikely to implement label Mar 5, 2024
Copy link

github-actions bot commented Apr 5, 2024

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 7 days.

@github-actions github-actions bot added the stale No recent activity. label Apr 5, 2024
@WikiRik
Copy link

WikiRik commented Apr 5, 2024

This is still something I'm interested in

@mdonnalley mdonnalley removed the stale No recent activity. label Apr 5, 2024
Copy link

github-actions bot commented May 6, 2024

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 7 days.

@github-actions github-actions bot added the stale No recent activity. label May 6, 2024
@WikiRik
Copy link

WikiRik commented May 6, 2024

Just like last month, this still is something I'd like to see. @mdonnalley you marked this as unlikely, while the creator of the issue mentioned that they are willing to come up with a PR. What's holding us back?

@mdonnalley mdonnalley added next major This will be address in the next major version. and removed unlikely Feature we are unlikely to implement stale No recent activity. labels May 6, 2024
@mdonnalley
Copy link
Contributor

@WikiRik Sorry, I forgot to update the labels on this. We're planning on addressing this in the next major

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
next major This will be address in the next major version.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants