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 if the left operand of ?? is syntactically provable to not be nullish #59038

Closed

Conversation

RyanCavanaugh
Copy link
Member

Follow-on to #59003 based on a hit that PR had

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Jun 26, 2024
@RyanCavanaugh
Copy link
Member Author

@typescript-bot test top400

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jun 26, 2024

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
test top400 ✅ Started 👀 Results

@typescript-bot
Copy link
Collaborator

@RyanCavanaugh Here are the results of running the top 400 repos with tsc comparing main and refs/pull/59038/merge:

Something interesting changed - please have a look.

Details

ChatGPTNextWeb/ChatGPT-Next-Web

tsconfig.json

  • error TS2869: Left operand of ?? is never undefined/null. Are you missing parentheses?

microsoft/vscode

4 of 54 projects failed to build with the old tsc and were ignored

src/tsconfig.tsec.json

src/tsconfig.json

supabase/supabase

31 of 37 projects failed to build with the old tsc and were ignored

apps/studio/tsconfig.json

tailwindlabs/headlessui

1 of 5 projects failed to build with the old tsc and were ignored

packages/@headlessui-react/tsconfig.json

@RyanCavanaugh
Copy link
Member Author

headlessui. Huh?

let isParentDisabled = parent?.getAttribute('disabled') === '' ?? false

supabase. Again, huh?

  const isAcknowledged =
    typeof window !== 'undefined' ? localStorage?.getItem(key) === 'true' ?? false : false

vscode. Looks like missing parens?

    return this.viewModel?.welcomeExperience === WelcomeExperience.ForWorkspace ?? true;

ChatGPT-Next-Web. Missing parens as found in prior PR

    if (historyMsgLength > modelConfig?.max_tokens ?? 4000)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants