Skip to content

Suggestion: Define a type for translations #250

Open
@FabienDehopre

Description

@FabienDehopre

I'm submitting a ... (check one with "x")

[ ] bug report => check the FAQ and search github for a similar issue or PR before submitting
[ ] support request => check the FAQ and search github for a similar issue before submitting
[x] feature request

Current behavior
N/A

Expected/desired behavior
Declare (and export) a type for translation.
Instead of having Observable<any>, you can declare a type type Translation = { [key: string]: string | Translation }; and use Observable<Translation>

The type any is too vague and if I understand correctly the translation is an object where all properties are either a string or another type with string property or object (recursively).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions