You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, is there any reason to have SlotRecord as Partial? With current implementation, having incomplete slot recipe configuration does not trigger TS error.
Problem Statement/Justification
For example, following code have slots that were not defined in base:
This discussion was converted from issue #1665 on November 10, 2023 17:08.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Hello, is there any reason to have SlotRecord as Partial? With current implementation, having incomplete slot recipe configuration does not trigger TS error.
Problem Statement/Justification
For example, following code have slots that were not defined in base:
But because
SlotRecord
is defined asIt will not trigger an error.
But as developer, I would expect TS error in such situations, since object is incomplete/invalid. It will also allow to catch error early.
Is there any specific reason to keep SlotRecord a partial?
Proposed Solution or API
Enforce
SlotRecord
type alias:Or allow users to hook in into generated code/types with hook system.
Alternatives
No response
Additional Information
No response
Beta Was this translation helpful? Give feedback.
All reactions