Skip to content

Commit

Permalink
refactor: use types instead of interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
ruicsh committed Dec 11, 2023
1 parent 0228e2f commit 66a3862
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ import { getOrdinal } from "./helpers/ordinal";

type Value = unknown;

export interface IFormats {
export type IFormats = {
number?: Record<string, Intl.NumberFormatOptions>;
dateTime?: Record<string, Intl.DateTimeFormatOptions>;
list?: Record<string, Intl.ListFormatOptions>;
}
};

interface IArgs {
type IArgs = {
locale: string;
messages: object;
formats?: IFormats;
}
};

class I18n {
#locale: string;
Expand Down

0 comments on commit 66a3862

Please sign in to comment.