0.11.7 • Published 7 months ago

@types/fluent v0.11.7

Weekly downloads
330
License
MIT
Repository
github
Last release
7 months ago

Installation

npm install --save @types/fluent

Summary

This package contains type definitions for fluent (http://projectfluent.org).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fluent.

index.d.ts

// Type definitions for fluent 0.11
// Project: http://projectfluent.org
// Definitions by: Huy Nguyen <https://github.com/huy-nguyen>, James Nimlos <https://github.com/jamesnimlos>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2

export interface FluentBundleContructorOptions {
    functions?: object | undefined;
    useIsolating?: boolean | undefined;
    transform?: ((...args: any[]) => any) | undefined;
}

export class FluentType {
    constructor(value: any, opts: object);
    toString(bundle: FluentBundle): string;
    valueOf(): any;
}

export class FluentNone extends FluentType  {}
export class FluentNumber extends FluentType {}
export class FluentDateTime extends FluentType {}

export type FluentNode = FluentType | string;

export class FluentResource extends Map {
    static fromString(source: string): FluentResource;
}

export class FluentBundle {
    constructor(locales: string | string[], options?: FluentBundleContructorOptions);
    locales: string[];
    messages: IterableIterator<[string, FluentNode[]]>;
    hasMessage(id: string): boolean;
    addMessages(source: string): string[];
    getMessage(id: string): FluentNode[] | undefined;
    format(message: FluentNode[], args?: object, errors?: Array<string | Error>): string;
    addResource(res: FluentResource): string[];
}

export function ftl(strings: TemplateStringsArray): string;

Additional Details

  • Last updated: Thu, 08 Jul 2021 12:01:43 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Huy Nguyen, and James Nimlos.

0.11.5

8 months ago

0.11.6

7 months ago

0.11.7

7 months ago

0.11.4

3 years ago

0.11.3

5 years ago

0.11.2

5 years ago

0.11.1

5 years ago

0.11.0

5 years ago

0.10.0

5 years ago