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

ts-spec no longer works in TS 4.8 #6

Open
geoffreytools opened this issue Feb 20, 2023 · 1 comment
Open

ts-spec no longer works in TS 4.8 #6

geoffreytools opened this issue Feb 20, 2023 · 1 comment

Comments

@geoffreytools
Copy link
Owner

The fix in #5 caused a regression in TS 4.8.

In this version, Uppercase<string> | Lowercase<string> | Capitalize<string> | Uncapitalize<string> can't be resolved to anything and any conditional type mentioning them makes the problem bubble up, to the point the entire disambiguation algorithm and the two operands of the comparison ultimately fail to resolve as well.

@geoffreytools
Copy link
Owner Author

geoffreytools commented Feb 20, 2023

In the meantime users can disable support for intrinsic utility types over string via a configuration option

declare module 'ts-spec' {
    interface Config {
        'TS 4.8': true
    }
}

playground

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

1 participant