rewrite ts define
This commit is contained in:
parent
b8676a4fe6
commit
207308a1ac
86
pofile.d.ts
vendored
86
pofile.d.ts
vendored
@ -1,44 +1,46 @@
|
|||||||
declare module pofile {
|
// tslint:disable
|
||||||
function parse(data: string): PO;
|
declare interface IHeaders {
|
||||||
function load(fileName: string, callback: (err: NodeJS.ErrnoException | null, po: PO) => void): void;
|
'Project-Id-Version': string;
|
||||||
|
'Report-Msgid-Bugs-To': string;
|
||||||
class PO {
|
'POT-Creation-Date': string;
|
||||||
public comments: string[];
|
'PO-Revision-Date': string;
|
||||||
public extractedComments: string[];
|
'Last-Translator': string;
|
||||||
public items: Item[];
|
'Language': string;
|
||||||
public headers: Partial<IHeaders>
|
'Language-Team': string;
|
||||||
|
'Content-Type': string;
|
||||||
public save(filename: string, callback: (err?: NodeJS.ErrnoException) => void): void;
|
'Content-Transfer-Encoding': string;
|
||||||
public toString(): string;
|
'Plural-Forms': string;
|
||||||
}
|
[name: string]: string;
|
||||||
|
|
||||||
interface IHeaders {
|
|
||||||
'Project-Id-Version': string;
|
|
||||||
'Report-Msgid-Bugs-To': string;
|
|
||||||
'POT-Creation-Date': string;
|
|
||||||
'PO-Revision-Date': string;
|
|
||||||
'Last-Translator': string;
|
|
||||||
'Language': string;
|
|
||||||
'Language-Team': string;
|
|
||||||
'Content-Type': string;
|
|
||||||
'Content-Transfer-Encoding': string;
|
|
||||||
'Plural-Forms': string;
|
|
||||||
}
|
|
||||||
|
|
||||||
class Item {
|
|
||||||
public msgid: string;
|
|
||||||
public msgctxt?: string;
|
|
||||||
public references: string[];
|
|
||||||
public msgid_plural?: string;
|
|
||||||
public msgstr: string[];
|
|
||||||
public comments: string[];
|
|
||||||
public extractedComments: string[];
|
|
||||||
public flags: { [flag: string]: boolean | undefined }
|
|
||||||
private nplurals: number;
|
|
||||||
private obsolete: boolean;
|
|
||||||
|
|
||||||
public toString(): string;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export = pofile
|
declare class Item {
|
||||||
|
public msgid: string;
|
||||||
|
public msgctxt?: string;
|
||||||
|
public references: string[];
|
||||||
|
public msgid_plural?: string;
|
||||||
|
public msgstr: string[];
|
||||||
|
public comments: string[];
|
||||||
|
public extractedComments: string[];
|
||||||
|
public flags: Record<string, boolean | undefined>;
|
||||||
|
private nplurals: number;
|
||||||
|
private obsolete: boolean;
|
||||||
|
|
||||||
|
public toString(): string;
|
||||||
|
}
|
||||||
|
|
||||||
|
declare class PO {
|
||||||
|
public comments: string[];
|
||||||
|
public extractedComments: string[];
|
||||||
|
public items: Item[];
|
||||||
|
public headers: Partial<IHeaders>
|
||||||
|
|
||||||
|
public static parse(data: string): PO;
|
||||||
|
public static parsePluralForms(forms: string): PO;
|
||||||
|
public static load(fileName: string, callback: (err: NodeJS.ErrnoException, po: PO) => void): void;
|
||||||
|
public static Item: typeof Item;
|
||||||
|
|
||||||
|
public save(fileName: string, callback: (err: NodeJS.ErrnoException) => void): void;
|
||||||
|
public toString(): string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export = PO
|
||||||
|
Loading…
Reference in New Issue
Block a user