Php Function Optional Parameter Typescript Interview Question