Skip to content

Latest commit

 

History

History
121 lines (64 loc) · 2.31 KB

File metadata and controls

121 lines (64 loc) · 2.31 KB

@hydroperx/pi


@hydroperx/pi / react / PILayer

Class: PILayer

Defined in: src/react/index.tsx:12

Wraps a PI instance from the @hydroperx/pi module, with an unique identity.

Constructors

Constructor

new PILayer(pi): PILayer

Defined in: src/react/index.tsx:31

Constructor.

Parameters

pi

If null, then accessing the pi property throws a ReferenceError.

PI | null

Returns

PILayer

Accessors

identity

Get Signature

get identity(): number[]

Defined in: src/react/index.tsx:38

Returns the unique identity of this layer.

Returns

number[]


pi

Get Signature

get pi(): PI

Defined in: src/react/index.tsx:48

Returns the underlying PI instance from the @hydroperx/pi module. This PI instance provides further locale properties and operations like locales, currentLocale and supportsLocale().

Returns

PI

Methods

get()

get(id, args, errors): string | null

Defined in: src/react/index.tsx:61

Retrieves message and formats it. Returns null if undefined.

Look at @fluent/bundle for FluentVariable.

Parameters

id

string

args

Record<string, FluentVariable> | undefined

errors

Error[] | null

Returns

string | null


has()

has(id): boolean

Defined in: src/react/index.tsx:72

Determines if a message is defined.

Parameters

id

string

Returns

boolean