Skip to content

Function args inconsistent with erroring vs not #49671

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

Closed
VividLemon opened this issue Jun 24, 2022 · 2 comments
Closed

Function args inconsistent with erroring vs not #49671

VividLemon opened this issue Jun 24, 2022 · 2 comments
Labels
Duplicate An existing issue was already created

Comments

@VividLemon
Copy link

Bug Report

🔎 Search Terms

Function args errors, args errors, function (Lets be honest, if there's a duplicate theres 5k issues to sort through)

🕗 Version & Regression Information

  • This is a crash
  • This changed between versions 4.6.4 and 4.7.4
  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
  • I was unable to test this on prior versions because _______

⏯ Playground Link

https://www.typescriptlang.org/play?ts=4.7.4#code/LAKAxg9gdgzgLgAgGYFcoILwIBQEMBcC8ATgJZQDmANAgG4CMhUKAtgEYCmxNtATE607c6AZkIlyFAJTi4ZSpgB8CAN6gECYhzgpi6AOS59oAL6hQqKNkP6aIqvYQ27NACw0ArFKA

Playground link with relevant code

💻 Code

const fun = (a: string, v1: number, v2: number, v3: string): string => {
  return 'a'
}

fun('a', 3,3, 'a', 3, 4, 5)

🙁 Actual behavior

Almost randomly, adding or changing args of a function will sometimes not cause it to have an error

🙂 Expected behavior

Have an error if an arg is missing

Review this video https://youtu.be/NhvZUvNglcQ ... It is almost random in how it will sometimes active an error, and sometimes not. If it's left to not have an error, it will seemingly never change to show an error.

@RyanCavanaugh RyanCavanaugh added Bug A bug in TypeScript Website Deprecated - please forward issue to microsoft/TypeScript-Website Help Wanted You can do this labels Jun 24, 2022
@RyanCavanaugh RyanCavanaugh added this to the Backlog milestone Jun 24, 2022
@RyanCavanaugh RyanCavanaugh removed Bug A bug in TypeScript Help Wanted You can do this Website Deprecated - please forward issue to microsoft/TypeScript-Website labels Jun 24, 2022
@RyanCavanaugh
Copy link
Member

I believe this is a duplicate of #49624 based on the symptoms. Reprioritizing that one.

@RyanCavanaugh RyanCavanaugh removed this from the Backlog milestone Jun 24, 2022
@RyanCavanaugh RyanCavanaugh added the Duplicate An existing issue was already created label Jun 24, 2022
@VividLemon
Copy link
Author

They look to be the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

2 participants