export function hello ( name ) { return `Hello ${ name }` ; } export type PossibleReturn = number | string | null ; export function foo < R extends PossibleReturn > ( bar ) { try { return bar ( ) ; } catch ( e ) { return null ; } }