Skip to content

Commit

Permalink
fix: add missing docstring to the types
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Apr 18, 2022
1 parent 97b52bb commit a6f8423
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,18 @@ export interface Locale {
}

export interface Formatter {
/**
* Returns difference between two dates as a text string.
*/
format(firstDate: Date | number, secondDate: Date | number, options?: Config): string;
}

export function create(config?: Config): Formatter;

/**
* Adds pluralization data for the specified locale.
* Should be called in browser.
*/
export function addLocale(localeData: (Locale | Locale[]));

export const defaultConfig: Config;

0 comments on commit a6f8423

Please sign in to comment.