React-i18next: typescript definitons

Created on 25 Oct 2017  路  13Comments  路  Source: i18next/react-i18next

Hey,

would you be up to for adding TS defs?

those on definitely typed are really outdated. If you're ok with that I can send PR

cheers !

help wanted

Most helpful comment

Hey all! types have been updated on definitely typed so please use those 馃憤

https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-i18next

yarn add -D @types/react-i18next

Not everyone want's to deal with types for they own particular reasons @kachkaev. Please respect that :) Anyways we have overall good solution with Definitely typed ( whole OSS maintainers of 3rd party types are working super fast, so if API changes you can always submit PR there ).

Have a good day yo all ! 馃嵒

All 13 comments

see if we add the types here - we would have those outdated TS defs here. As i never will personally maintain those TS definitions (as i do not use nor like TS) i would prefer you doing a PR over at definitely typed.

this is how type safe code and DX dies :( ok valid points . thx

it's javascript...not a typesafe language...i think definitely typed does a great job in filling that gap in providing a place for typedefinitions for modules done in javascript.

plus honestly if i add it here, i would also have to add it in i18next, jquery-i18next, i18nextify, xhr-backend, interval-plural,...to much modules i would have to maintain typescript definitions in the end. More than enough work in supporting those modules in my free time. Sorry i can't be of more help in this case.

haha dude no need to apologies, I get it, i know what it takes to maintain oss stuff.

cheers ;)

@Hotell Did you come up with something, may be a gist?

@Hotell @stunaz if you've found a solution, what are you using now? TypeScript is far from dying, according to its Github stars trend:

screen shot 2018-03-05 at 11 49 29

_http://www.timqian.com/star-history/#Microsoft/TypeScript_

I discovered TypeScript for myself about a month ago and I love it. Same JavaScript, but with some extra superpower when you need it! I'm also considering i18next as a replacement of react-intl at the moment and type definitions would definitely give it a few extra points!

@jamuhl it'd be really good if you reconsidered your view of TypeScript, at least as a package maintainer! I'm seeing more and more react stuff around me supporting TypeScript and it'd be great if i18next was in thus club too!

Hey all! types have been updated on definitely typed so please use those 馃憤

https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-i18next

yarn add -D @types/react-i18next

Not everyone want's to deal with types for they own particular reasons @kachkaev. Please respect that :) Anyways we have overall good solution with Definitely typed ( whole OSS maintainers of 3rd party types are working super fast, so if API changes you can always submit PR there ).

Have a good day yo all ! 馃嵒

@Hotell Thanks so much for adding the types. Are you able to update the types to the latest version changes? Namely NamespacesConsumer is untyped.
I am a little surprised at the resistance of adding typings to this project. I get @jamuhl stance but as a Typescript convert, it has gotten wildly more popular. For the most part I will not even use a JS lib without typings, and choose libs written in Typescript first as there is a noticeable increase in quality and consistency (in general).

My resistance is not about adding them in first place - the problem is like now as they got out of sync and people expect me to update them...

plus there are a ton of repos that would have get added types...further what about flow?!? provide both?

But yes my personal opinion...one of the best things of javascript is that it is script -> no types no need to compile ;)

Even for projects using plain js, having the type definitions is a big plus, considering the amount of developers who uses vscode, which tries to fetch the types of every lib added to the project.

@Hotell @kachkaev @schettino @zachariahtimothy look i'm open to accept PRs to add typescript definitions....but as soon they got not kept maintained by the community using i18next and i blamed for having them not updated i take the freedom of removing those again. What i won't to say...i will change / add to i18next / react-i18next but i won't maintain the .ts files ever -> but accept PRs updating those.

Was this page helpful?
0 / 5 - 0 ratings