react-native-actions-sheet
react-native-actions-sheet copied to clipboard
Generic `returnValue` for SheetManager.show
i would like SheetManager.show's return type to be the return type of callback
SheetManager.show('dialog-sheet', {
payload: {
callback: createUser,
},
}).then(user => {
// user is type any, would like UserType
declare module 'react-native-actions-sheet' {
interface Sheets<T = any> {
'dialog-sheet': SheetDefinition<{
callback: () => T | Promise<T>
returnValue: T
}>
}
}
is this possible?