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
js, function, parameter, destructure, required
// utils.js export const getUserProfileByUsername = ({ username, withEmail = false, withNotificationSettings = false, } = {}) => { return {}; };
// main.ts import { getUserProfileByUsername } from './utils'; getUserProfileByUsername({ username: 'ly', });
src/main.ts:4:3 - error TS2353: Object literal may only specify known properties, and 'username' does not exist in type '{ withEmail?: boolean | undefined; withNotificationSettings?: boolean | undefined; }'. 4 username: 'ly', ~~~~~~~~ Found 1 error in src/main.ts:4
no ts validate error
ts 5.x not this issue, must be introduced by 5.6
The text was updated successfully, but these errors were encountered:
https://stackblitz.com/edit/vitejs-vite-usm5mx?file=package.json is not a playground link. Is there a reason you cannot replicate the issue on https://www.typescriptlang.org/play?
Sorry, something went wrong.
To be fair, the playground can't be used to demonstrate this because it involves 2 files. There is a bug workbench that can do this though: workbench
Bisects to #59183
jakebailey
Successfully merging a pull request may close this issue.
π Search Terms
js, function, parameter, destructure, required
π Version & Regression Information
β― Playground Link
π» Code
π Actual behavior
π Expected behavior
no ts validate error
Additional information about the issue
ts 5.x not this issue, must be introduced by 5.6
The text was updated successfully, but these errors were encountered: