Tech
Beyond Promise<any>: Designing a Type-Safe Modal API
await modal.open(...) improves control flow. But if the result is any , the most important part of the contract is still unchecked.
In the previous article , I described a modal interaction as an asynchronous operation:
Input
↓
[ user interaction ]
↓
Result
That naturally leads to an API like:
const result = await modal . open ( renameReportModal , input );
That immediately raises the question that determines whether the abstracti...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to