Created
May 16, 2023 16:38
-
-
Save wolak041/cbe5666a8a5b6209aa270d3e4bcd16a1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Messenger { | |
sendText: () => void; | |
sendFile: () => void; | |
} | |
type Async<T> = { | |
[Property in keyof T]: () => Promise<void>; | |
}; | |
// type AsyncMessenger = { | |
// sendText: () => Promise<void>; | |
// sendFile: () => Promise<void>; | |
// } | |
type AsyncMessenger = Async<Messenger>; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment