Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Define a type for translations #250

Open
FabienDehopre opened this issue Sep 30, 2016 · 4 comments
Open

Suggestion: Define a type for translations #250

FabienDehopre opened this issue Sep 30, 2016 · 4 comments

Comments

@FabienDehopre
Copy link

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).

@ocombe
Copy link
Member

ocombe commented Sep 30, 2016

yes, it's a good idea and easy to do

@FabienDehopre
Copy link
Author

If I have the time this weekend, I would probably do it and make a pull request by the beginning of next week.

@ocombe
Copy link
Member

ocombe commented Sep 30, 2016

That'd be nice !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
@FabienDehopre @ocombe and others