declare namespace timexe { type Timex = string; type ID = number; type Action = (param?: T) => void; interface Result { result?: string; error?: string; id: ID; } interface Item { timex: string; action: Action; param: T; timeoutShortened: boolean; } } interface Timexe { (timex: timexe.Timex, action: timexe.Action, param?: T): timexe.Result; add(timex: timexe.Timex, action: timexe.Action, param?: T): timexe.Result; remove(id: timexe.ID): timexe.Result; get(id?: timexe.ID): timexe.Item | Array>; timeResolution: number; maxTimerDelay: number; } declare const timexe: Timexe; export as namespace timexe; export = timexe;