export interface INotificationService { error(message: string, title?: string, autoHideAfter? : number); } class X { error(message: string, title?: string, autoHideAfter?: number) { console.log(message, title, autoHideAfter); } } new X().error("hi there", undefined, 1000);