-
-
Notifications
You must be signed in to change notification settings - Fork 174
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Given a custom modal component named MyModal that has a prop myProp, the following results in a type error:
const { create } = useModal();
await using modal = create({
component: MyModal,
myProp: 'My Value', // Triggers TS 2353
});
await modal.show();Object literal may only specify known properties, and 'myProp' does not exist in type 'ModalOrchestratorCreateParam'.
The binding still works, but I have to add a ts-expect-error suppression to circumvent type checks.
In the reproduction, you can press Ctrl+C in the terminal and run npm run build to display the error.
Reproduction
Used Package Manager
pnpm
Copilot
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working