function addNumbers ( a , b ) { return a + b ; } export default addNumbers ; export const addStrings = ( str1 , str2 = "" ) : string => `${ str1 } ${ str2 }` ; export const format = ( title , param ) : string => `${ title } ${ param }` ; export const printFormat = ( title , param ) : void => { console . log ( format ( title , param ) ) ; } ; export const fetchData = ( url ) : Promise < string > => Promise . resolve ( `Data from ${ url }` ) ; function introduce ( salutation , ... names ) { return `${ salutation } ${ names . join ( " " ) }` ; } export function getName ( user ) { return `${ user ?. first ?? "first" } ${ user ?. last ?? "last" }` ; }