mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-03 08:28:31 +00:00
Initial commit for converting FrankerFaceZ to TypeScript.
This commit is contained in:
parent
ba72969c51
commit
b9d23accf0
86 changed files with 8673 additions and 5005 deletions
55
types/ffz_icu-msgparser.d.ts
vendored
Normal file
55
types/ffz_icu-msgparser.d.ts
vendored
Normal file
|
@ -0,0 +1,55 @@
|
|||
declare module '@ffz/icu-msgparser' {
|
||||
|
||||
export type MessageAST = MessageNode[];
|
||||
|
||||
export type MessageNode = string | MessagePlaceholder;
|
||||
|
||||
export type MessagePlaceholder = MessageTag | MessageVariable;
|
||||
|
||||
export type MessageTag = {
|
||||
n: string;
|
||||
v: never;
|
||||
t: never;
|
||||
c?: MessageAST;
|
||||
};
|
||||
|
||||
export type MessageVariable = {
|
||||
n: never;
|
||||
v: string;
|
||||
t?: string;
|
||||
f?: string | number;
|
||||
o?: MessageSubmessages;
|
||||
};
|
||||
|
||||
export type MessageSubmessages = {
|
||||
[rule: string]: MessageAST;
|
||||
};
|
||||
|
||||
export type ParserOptions = {
|
||||
OPEN: string;
|
||||
CLOSE: string;
|
||||
SEP: string;
|
||||
ESCAPE: string;
|
||||
SUB_VAR: string;
|
||||
TAG_OPEN: string;
|
||||
TAG_CLOSE: string;
|
||||
TAG_CLOSING: string;
|
||||
|
||||
OFFSET: string;
|
||||
|
||||
subnumeric_types: string[];
|
||||
submessage_types: string[];
|
||||
|
||||
allowTags: boolean;
|
||||
requireOther: boolean | string[];
|
||||
}
|
||||
|
||||
export default class Parser {
|
||||
|
||||
constructor(options?: Partial<ParserOptions>);
|
||||
|
||||
parse(input: string): MessageAST;
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue