You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@royale.apache.org by Yishay Weiss <yi...@hotmail.com> on 2018/09/17 08:24:30 UTC
TypeDefs for Moment.js
Hi,
I’m struggling trying create a typedefs for moment.js [1]. There’s no ready externs file as far as I can tell so I tried using TypeScript definition file [2] in conjunction with this conversion utility [3].
Unfortunately, there are overloaded methods which seem to confuse the conversion utility and create duplicate arguments in signatures (e.g. weekdays – line 1196 [4]).
Any ideas?
[1] https://momentjs.com/
[2] https://github.com/moment/moment/blob/develop/moment.d.ts
[3] https://github.com/eredo/tsd2cce
[4] https://github.com/royale-extras/closure-compiler/blob/master/contrib/externs/moment.js
Re: TypeDefs for Moment.js
Posted by Piotr Zarzycki <pi...@gmail.com>.
Great! Thank you!
pon., 17 wrz 2018 o 11:08 Yishay Weiss <yi...@hotmail.com> napisał(a):
> Already created a branch (moment).
>
>
>
> ________________________________
> From: Piotr Zarzycki <pi...@gmail.com>
> Sent: Monday, September 17, 2018 12:07:05 PM
> To: dev@royale.apache.org
> Subject: Re: TypeDefs for Moment.js
>
> Hi Yishay,
>
> Please make that stuff on a branch feature/momentjs_typedefs. I'm trying to
> prepare release so don't want to have more new stuff in develop.
>
> Thanks,
> Piotr
>
> pon., 17 wrz 2018 o 10:24 Yishay Weiss <yi...@hotmail.com>
> napisał(a):
>
> > Hi,
> >
> > I’m struggling trying create a typedefs for moment.js [1]. There’s no
> > ready externs file as far as I can tell so I tried using TypeScript
> > definition file [2] in conjunction with this conversion utility [3].
> >
> > Unfortunately, there are overloaded methods which seem to confuse the
> > conversion utility and create duplicate arguments in signatures (e.g.
> > weekdays – line 1196 [4]).
> >
> > Any ideas?
> >
> > [1] https://momentjs.com/
> > [2] https://github.com/moment/moment/blob/develop/moment.d.ts
> > [3] https://github.com/eredo/tsd2cce
> > [4]
> >
> https://github.com/royale-extras/closure-compiler/blob/master/contrib/externs/moment.js
> >
>
>
> --
>
> Piotr Zarzycki
>
> Patreon: *https://www.patreon.com/piotrzarzycki
> <https://www.patreon.com/piotrzarzycki>*
>
--
Piotr Zarzycki
Patreon: *https://www.patreon.com/piotrzarzycki
<https://www.patreon.com/piotrzarzycki>*
RE: TypeDefs for Moment.js
Posted by Yishay Weiss <yi...@hotmail.com>.
Already created a branch (moment).
________________________________
From: Piotr Zarzycki <pi...@gmail.com>
Sent: Monday, September 17, 2018 12:07:05 PM
To: dev@royale.apache.org
Subject: Re: TypeDefs for Moment.js
Hi Yishay,
Please make that stuff on a branch feature/momentjs_typedefs. I'm trying to
prepare release so don't want to have more new stuff in develop.
Thanks,
Piotr
pon., 17 wrz 2018 o 10:24 Yishay Weiss <yi...@hotmail.com> napisał(a):
> Hi,
>
> I’m struggling trying create a typedefs for moment.js [1]. There’s no
> ready externs file as far as I can tell so I tried using TypeScript
> definition file [2] in conjunction with this conversion utility [3].
>
> Unfortunately, there are overloaded methods which seem to confuse the
> conversion utility and create duplicate arguments in signatures (e.g.
> weekdays – line 1196 [4]).
>
> Any ideas?
>
> [1] https://momentjs.com/
> [2] https://github.com/moment/moment/blob/develop/moment.d.ts
> [3] https://github.com/eredo/tsd2cce
> [4]
> https://github.com/royale-extras/closure-compiler/blob/master/contrib/externs/moment.js
>
--
Piotr Zarzycki
Patreon: *https://www.patreon.com/piotrzarzycki
<https://www.patreon.com/piotrzarzycki>*
Re: TypeDefs for Moment.js
Posted by Piotr Zarzycki <pi...@gmail.com>.
Hi Yishay,
Please make that stuff on a branch feature/momentjs_typedefs. I'm trying to
prepare release so don't want to have more new stuff in develop.
Thanks,
Piotr
pon., 17 wrz 2018 o 10:24 Yishay Weiss <yi...@hotmail.com> napisał(a):
> Hi,
>
> I’m struggling trying create a typedefs for moment.js [1]. There’s no
> ready externs file as far as I can tell so I tried using TypeScript
> definition file [2] in conjunction with this conversion utility [3].
>
> Unfortunately, there are overloaded methods which seem to confuse the
> conversion utility and create duplicate arguments in signatures (e.g.
> weekdays – line 1196 [4]).
>
> Any ideas?
>
> [1] https://momentjs.com/
> [2] https://github.com/moment/moment/blob/develop/moment.d.ts
> [3] https://github.com/eredo/tsd2cce
> [4]
> https://github.com/royale-extras/closure-compiler/blob/master/contrib/externs/moment.js
>
--
Piotr Zarzycki
Patreon: *https://www.patreon.com/piotrzarzycki
<https://www.patreon.com/piotrzarzycki>*