react-native-navigation-hooks icon indicating copy to clipboard operation
react-native-navigation-hooks copied to clipboard

Allow passProps type parameter to be used with Layout in ShowModalCommand

Open dyerw opened this issue 4 years ago • 0 comments

The PushCommand show here allows the parameter P to specify the passProps type but it's not parameterized similarly in ShowModalCommand. I would like to validate my props when using the ShowModalCommand and I believe it just needs to be updated to a similar type. Thanks!

interface PushCommand {
    <P = {}>(layout: Layout<P>): Promise<any>;
    (name: string): Promise<any>;
    <P = {}>(name: string, passProps?: P): Promise<any>;
    <P = {}>(name: string, passProps?: P, options?: Options): Promise<any>;
}
interface ShowModalCommand {
    (layout: Layout): Promise<any>;
    <P = {}>(name: string, passProps?: P, options?: Options): Promise<any>;
}

dyerw avatar Mar 23 '21 20:03 dyerw