We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Should something this be allowed?
function callWithRandomNumbers(fn: (n1: number, n2: number) => void) { fn(Math.random(), Math.random()); } callWithRandomNumbers((a, b) => { // ^? (parameter) a: number // ^? (parameter) b: number console.log(a + b); });
This isn't supported in TwoSlash:
But I do support an equivalent for errors.
The workaround now is to put the second type assertion on another line:
function callWithRandomNumbers(fn: (n1: number, n2: number) => void) { fn(Math.random(), Math.random()); } callWithRandomNumbers((a, b) => { // ^? (parameter) a: number console.log(a + b); // ^? (parameter) b: number });
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Should something this be allowed?
This isn't supported in TwoSlash:
But I do support an equivalent for errors.
The workaround now is to put the second type assertion on another line:
The text was updated successfully, but these errors were encountered: