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

Type error: '?' expected. #683

Closed
fgrs opened this issue Sep 8, 2023 · 2 comments
Closed

Type error: '?' expected. #683

fgrs opened this issue Sep 8, 2023 · 2 comments

Comments

@fgrs
Copy link

fgrs commented Sep 8, 2023

I'm getting Type error here:

infer FirstWord extends string,

./node_modules/type-fest/source/camel-case.d.ts:25:32
Type error: '?' expected.

  23 |  OutputString extends string = '',
  24 | > = Words extends [
> 25 |  infer FirstWord extends string,
     |                                ^
  26 |  ...infer RemainingWords extends string[],
  27 | ]
  28 |  ? Options['preserveConsecutiveUppercase'] extends true
error Command failed with exit code 1.
@yanghuiLu
Copy link

Thank you @fregante, This solves my problem.

You'll have to upgrade to TypeScript 4.7 or later.

@sindresorhus sindresorhus closed this as not planned Won't fix, can't repro, duplicate, stale Sep 26, 2023
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

4 participants