You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Данилов Семён <sa...@yandex.ru> on 2020/11/30 20:16:48 UTC

Migrating NodeJS client to TypeScript

Hello Igniters!

I'd like to propose a big change for the nodejs thin client: a full rewrite from JavaScript to TypeScript.

Strong typing will not only help us in future while developing new features, but will also indicate existing type inconsistencies (I know there is a couple).
Also, we will have out of the box types for API documentation, which is very handy for users.

So what do you think?

Kind regards,
Semyon.

Re: Migrating NodeJS client to TypeScript

Posted by Pavel Tupitsyn <pt...@apache.org>.
Semyon,

Fully agree, TypeScript is the way to go.

> full rewrite
I would not call it a "full rewrite", because TypeScript is a superset of
JavaScript.

1. Converting to TypeScript mostly means adding type annotations and
tweaking the code, not rewriting it from scratch
2. The conversion can be gradual

On Tue, Dec 1, 2020 at 9:59 AM Ivan Daschinsky <iv...@gmail.com> wrote:

> > Is there any value in keeping both versions - the plain JavaScript one
> and the TypeScript specific
> Hi! No, there is no value. TS sources should be transpiled to JS before
> execution.
>
> вт, 1 дек. 2020 г. в 01:31, Denis Magda <dm...@apache.org>:
>
> > Hi Semyon,
> >
> > Is there any value in keeping both versions - the plain JavaScript one
> and
> > the TypeScript specific?
> >
> > -
> > Denis
> >
> >
> > On Mon, Nov 30, 2020 at 12:16 PM Данилов Семён <sa...@yandex.ru>
> wrote:
> >
> > > Hello Igniters!
> > >
> > > I'd like to propose a big change for the nodejs thin client: a full
> > > rewrite from JavaScript to TypeScript.
> > >
> > > Strong typing will not only help us in future while developing new
> > > features, but will also indicate existing type inconsistencies (I know
> > > there is a couple).
> > > Also, we will have out of the box types for API documentation, which is
> > > very handy for users.
> > >
> > > So what do you think?
> > >
> > > Kind regards,
> > > Semyon.
> > >
> >
>
>
> --
> Sincerely yours, Ivan Daschinskiy
>

Re: Migrating NodeJS client to TypeScript

Posted by Igor Sapego <is...@apache.org>.
Cool, I like the idea.
You've got a +1 from me

Best Regards,
Igor


On Tue, Dec 1, 2020 at 12:20 PM Данилов Семён <sa...@yandex.ru> wrote:

> Yes, TS compiler produces JS files and TS-typings. Users that are already
> using JS version will have a seamless migration. Note: we'll have to
> publish compiled JS files along with typings.
>
> -
> Semyon.
>
> 01.12.2020, 09:59, "Ivan Daschinsky" <iv...@gmail.com>:
> >>  Is there any value in keeping both versions - the plain JavaScript one
> >
> > and the TypeScript specific
> > Hi! No, there is no value. TS sources should be transpiled to JS before
> > execution.
> >
> > вт, 1 дек. 2020 г. в 01:31, Denis Magda <dm...@apache.org>:
> >
> >>  Hi Semyon,
> >>
> >>  Is there any value in keeping both versions - the plain JavaScript one
> and
> >>  the TypeScript specific?
> >>
> >>  -
> >>  Denis
> >>
> >>  On Mon, Nov 30, 2020 at 12:16 PM Данилов Семён <sa...@yandex.ru>
> wrote:
> >>
> >>  > Hello Igniters!
> >>  >
> >>  > I'd like to propose a big change for the nodejs thin client: a full
> >>  > rewrite from JavaScript to TypeScript.
> >>  >
> >>  > Strong typing will not only help us in future while developing new
> >>  > features, but will also indicate existing type inconsistencies (I
> know
> >>  > there is a couple).
> >>  > Also, we will have out of the box types for API documentation, which
> is
> >>  > very handy for users.
> >>  >
> >>  > So what do you think?
> >>  >
> >>  > Kind regards,
> >>  > Semyon.
> >>  >
> >
> > --
> > Sincerely yours, Ivan Daschinskiy
>

Re: Migrating NodeJS client to TypeScript

Posted by Данилов Семён <sa...@yandex.ru>.
Yes, TS compiler produces JS files and TS-typings. Users that are already using JS version will have a seamless migration. Note: we'll have to publish compiled JS files along with typings.
 
-
Semyon.

01.12.2020, 09:59, "Ivan Daschinsky" <iv...@gmail.com>:
>>  Is there any value in keeping both versions - the plain JavaScript one
>
> and the TypeScript specific
> Hi! No, there is no value. TS sources should be transpiled to JS before
> execution.
>
> вт, 1 дек. 2020 г. в 01:31, Denis Magda <dm...@apache.org>:
>
>>  Hi Semyon,
>>
>>  Is there any value in keeping both versions - the plain JavaScript one and
>>  the TypeScript specific?
>>
>>  -
>>  Denis
>>
>>  On Mon, Nov 30, 2020 at 12:16 PM Данилов Семён <sa...@yandex.ru> wrote:
>>
>>  > Hello Igniters!
>>  >
>>  > I'd like to propose a big change for the nodejs thin client: a full
>>  > rewrite from JavaScript to TypeScript.
>>  >
>>  > Strong typing will not only help us in future while developing new
>>  > features, but will also indicate existing type inconsistencies (I know
>>  > there is a couple).
>>  > Also, we will have out of the box types for API documentation, which is
>>  > very handy for users.
>>  >
>>  > So what do you think?
>>  >
>>  > Kind regards,
>>  > Semyon.
>>  >
>
> --
> Sincerely yours, Ivan Daschinskiy

Re: Migrating NodeJS client to TypeScript

Posted by Ivan Daschinsky <iv...@gmail.com>.
> Is there any value in keeping both versions - the plain JavaScript one
and the TypeScript specific
Hi! No, there is no value. TS sources should be transpiled to JS before
execution.

вт, 1 дек. 2020 г. в 01:31, Denis Magda <dm...@apache.org>:

> Hi Semyon,
>
> Is there any value in keeping both versions - the plain JavaScript one and
> the TypeScript specific?
>
> -
> Denis
>
>
> On Mon, Nov 30, 2020 at 12:16 PM Данилов Семён <sa...@yandex.ru> wrote:
>
> > Hello Igniters!
> >
> > I'd like to propose a big change for the nodejs thin client: a full
> > rewrite from JavaScript to TypeScript.
> >
> > Strong typing will not only help us in future while developing new
> > features, but will also indicate existing type inconsistencies (I know
> > there is a couple).
> > Also, we will have out of the box types for API documentation, which is
> > very handy for users.
> >
> > So what do you think?
> >
> > Kind regards,
> > Semyon.
> >
>


-- 
Sincerely yours, Ivan Daschinskiy

Re: Migrating NodeJS client to TypeScript

Posted by Denis Magda <dm...@apache.org>.
Hi Semyon,

Is there any value in keeping both versions - the plain JavaScript one and
the TypeScript specific?

-
Denis


On Mon, Nov 30, 2020 at 12:16 PM Данилов Семён <sa...@yandex.ru> wrote:

> Hello Igniters!
>
> I'd like to propose a big change for the nodejs thin client: a full
> rewrite from JavaScript to TypeScript.
>
> Strong typing will not only help us in future while developing new
> features, but will also indicate existing type inconsistencies (I know
> there is a couple).
> Also, we will have out of the box types for API documentation, which is
> very handy for users.
>
> So what do you think?
>
> Kind regards,
> Semyon.
>