@types/gettext-parser
TypeScript icon, indicating that this package has built-in type declarations

4.0.4 • Public • Published

Installation

npm install --save @types/gettext-parser

Summary

This package contains type definitions for gettext-parser (https://github.com/smhg/gettext-parser).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/gettext-parser.

index.d.ts

/// <reference types="node" />

import { Transform } from "readable-stream";

export interface GetTextComment {
    translator: string;
    reference: string;
    extracted: string;
    flag: string;
    previous: string;
}

export interface GetTextTranslation {
    msgctxt?: string | undefined;
    msgid: string;
    msgid_plural?: any;
    msgstr: string[];
    comments?: GetTextComment | undefined;
}

export interface GetTextTranslations {
    charset: string;
    headers: { [headerName: string]: string };
    translations: { [msgctxt: string]: { [msgId: string]: GetTextTranslation } };
}

export interface PoParser {
    parse: (buffer: Buffer | string, defaultCharset?: string) => GetTextTranslations;
    compile: (table: GetTextTranslations, options?: any) => Buffer;
    createParseStream: (buffer: any, defaultCharset?: string) => Transform;
}

export interface MoParser {
    parse: (buffer: Buffer | string, defaultCharset?: string) => GetTextTranslations;
    compile: (table: GetTextTranslations, options?: any) => Buffer;
}

export const po: PoParser;
export const mo: MoParser;

Additional Details

Credits

These definitions were written by Lorent Lempereur.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/gettext-parser

Weekly Downloads

8,421

Version

4.0.4

License

MIT

Unpacked Size

4.98 kB

Total Files

5

Last publish

Collaborators

  • types