{"version":3,"file":"msgfmt.mjs","names":[],"sources":["../src/msgfmt.ts"],"sourcesContent":["export type CompiledMessage =\n  /* plain message. Quotations such as \"It''s awsesome\" are already unescaped. */\n  | string\n  /* concatenation */\n  | CompiledMessage[]\n  /* interpolation for noneArg or simpleArg (\"{foo}\") */\n  | VarArg\n  /* plural form selection */\n  | PluralArg\n  /* # */\n  | NumberSign\n  /* component interpolation (<0>foo</0>) */\n  | ElementArg;\n\nexport type VarArg =\n  | StringArg\n  | NumberArg\n  | DateArg\n  | TimeArg\n  | SpelloutArg\n  | OrdinalArg\n  | DurationArg;\n\nexport type StringArg = {\n  type: \"Var\";\n  name: string | number;\n  argType?: undefined;\n};\n\nexport type NumberArg = {\n  type: \"Var\";\n  name: string | number;\n  argType: \"number\";\n  // TODO: skeleton\n  argStyle?: \"integer\" | \"currency\" | \"percent\" | undefined;\n};\n\nexport type DateArg = {\n  type: \"Var\";\n  name: string | number;\n  argType: \"date\";\n  argStyle?: \"short\" | \"medium\" | \"long\" | \"full\" | Intl.DateTimeFormatOptions;\n};\n\nexport type TimeArg = {\n  type: \"Var\";\n  name: string | number;\n  argType: \"time\";\n  argStyle?: \"short\" | \"medium\" | \"long\" | \"full\";\n};\n\nexport type SpelloutArg = {\n  type: \"Var\";\n  name: string | number;\n  argType: \"spellout\";\n};\n\nexport type OrdinalArg = {\n  type: \"Var\";\n  name: string | number;\n  argType: \"ordinal\";\n};\n\nexport type DurationArg = {\n  type: \"Var\";\n  name: string | number;\n  argType: \"duration\";\n};\n\nexport type PluralArg = {\n  type: \"Plural\";\n  name: string | number;\n  offset?: number | undefined;\n  branches: PluralBranch[];\n};\n\nexport type PluralBranch = {\n  selector: number | string;\n  message: CompiledMessage;\n};\n\nexport type NumberSign = {\n  type: \"Number\";\n};\n\nexport type ArgType = NonNullable<VarArg[\"argType\"]>;\n\nexport type ElementArg = {\n  type: \"Element\";\n  name: string | number;\n  message?: CompiledMessage | undefined;\n};\n"],"mappings":""}