You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for your library. It exactly fits my needs here.
I'd like to propose integrating a typescript definition file for those of us working in typescript.
Just for information, here is the code I wrote for the definition file. It should only be added to the project:
Hello!
Thanks for your library. It exactly fits my needs here.
I'd like to propose integrating a typescript definition file for those of us working in typescript.
Just for information, here is the code I wrote for the definition file. It should only be added to the project:
`declare module 'timespan' {
export class TimeSpan {
constructor(milliseconds: number, seconds: number, minutes: number, hours: number, days: number);
add(timeSpan: TimeSpan): void;
addMilliseconds(milliseconds: number): void;
addSeconds(seconds: number): void;
addMinutes(minutes: number): void;
addHours(hours: number): void;
addDays(days: number): void;
subtract(timeSpan: TimeSpan): void;
subtractMilliseconds(milliseconds: number): void;
subtractSeconds(seconds: number): void;
subtractMinutes(minutes: number): void;
subtractHours(hours: number): void;
subtractDays(days: number): void;
totalMilliseconds(roundDown: boolean): number;
totalSeconds(roundDown: boolean): number;
totalMinutes(roundDown: boolean): number;
totalHours(roundDown: boolean): number;
totalDays(roundDown: boolean): number;
}
`
And reference it in your package.json. eg:
{ "name": "awesome", "author": "Vandelay Industries", "version": "1.0.0", "main": "./lib/main.js", "types": "./lib/main.d.ts" }
Thanks!
The text was updated successfully, but these errors were encountered: