import { Layout , Navigation , Options } from 'react-native-navigation' ; import createLayout from './createLayout' ; export interface ShowOverlayCommand { ( layout ) : Promise < any > ; < P = { } > ( name , passProps ? , options ? ) : Promise < any > ; } function showOverlay < P = { } > ( nameOrLayout , passProps ? , options ? ) { const layout = typeof nameOrLayout === 'string' ? createLayout < P > ( nameOrLayout , passProps , options ) : nameOrLayout ; return Navigation . showOverlay ( layout ) ; } export default showOverlay ;