cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frederico Galvão <frederico.gal...@pontoget.com.br>
Subject Re: [DISCUSS] Include TypeScript definitions in plugins
Date Tue, 25 Apr 2017 21:01:30 GMT
Vladimir, I was recently questioned about this goal/topic on the .d.ts for
phonegap-push-plugin I maintain on DT, and the question I have now is:
How long will we have to maintain both in-house and DT versions for?
Is it a plan to remove them from DT once they are stable at home? How's the
landscape for type definitions in this regard?
I'd like yours, or anyone else's input on this issue if possible:
https://github.com/DefinitelyTyped/DefinitelyTyped/pull/16133

2017-01-17 18:35 GMT-02:00 Котиков Владимир <kotikov.vladimir@gmail.com>:

> Hey guys!
>
> I’m excited to see such positive feedback ☺ This sounds like a consensus,
> so we’re going to publish the PRs to the core plugins in a couple of days.
>
> Also, a bit of technical details:
>   - as Mike mentioned, typescript definitions are not necessarily need to
> be placed at the root of package – the package just need to have “types”
> entry in package.json, pointing to the typings location – so the proposed
> approach is to have “types”/”typings” directory at the root with
> “index.d.ts” file in it
>   - the typings in core plugins will coexist with the ones from
> DefinitelyTyped repository – this shouldn’t be a big deal from maintenance
> perspective as the plugin APIs are already stable and I suspect they won’t
> be changing often. We just need to make sure that if anyone changes the
> public API of the plugin, he/she will need to update DefinitelyTyped as
> well as typings in the plugin.
>
> -
> Best regards, Vladimir
>
>
> On 1/10/17, 05:02, "Steven Gill" <stevengill97@gmail.com> wrote:
>
>     DO ITTT
>
>     On Mon, Jan 9, 2017 at 5:04 PM, Frederico Galvão <
>     frederico.galvao@pontoget.com.br> wrote:
>
>     > Please do!
>     >
>     > 2017-01-09 20:40 GMT-02:00 Mike Hartington <mikehartington@gmail.com
> >:
>     >
>     > > Types can be in sub-folder.
>     > > As long as the type entried just points to the path
>     > >
>     > > https://na01.safelinks.protection.outlook.com/?url=
> https%3A%2F%2Fwww.typescriptlang.org%2Fdocs%2Fhandbook%2Fdeclaration-&
> data=02%7C01%7Cv-vlkoti%40microsoft.com%7C7f41d67cc4be48efc86308d438fc
> bd92%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%
> 7C636196105543207234&sdata=hqPuvVmtxIujvkxHMBKOLjcUkblK1S
> ASy68AtA9Nr7k%3D&reserved=0
>     > > files/publishing.html <https://na01.safelinks.
> protection.outlook.com/?url=https%3A%2F%2Fwww.typescriptlang&data=02%7C01%
> 7Cv-vlkoti%40microsoft.com%7C7f41d67cc4be48efc86308d438fcbd92%
> 7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636196105543207234&sdata=
> fPB1Zkl2t7GquW0Fbtd9qu2y0oKh%2BpO9i1EkdNYyPqI%3D&reserved=0.
>     > > org/docs/handbook/declaration-files/publishing.html>
>     > >
>     > >
>     > > Mike Hartington
>     > >
>     > >
>     > >
>     > > > On Jan 9, 2017, at 5:38 PM, Victor Sosa <sosah.victor@gmail.com>
>     > wrote:
>     > > >
>     > > > +1... I love this idea! Will help a lot to static analysis tools
> and
>     > > IDEs.
>     > > >
>     > > > On Mon, Jan 9, 2017 at 3:56 PM Shazron <shazron@gmail.com>
> wrote:
>     > > >
>     > > >> Thanks for bringing this up Vladimir,
>     > > >> +1 -- but does the .ts definition need to be in the root? I'd
> rather
>     > it
>     > > be
>     > > >> in a subfolder (either an existing one like 'www' or a new one)
>     > > >>
>     > > >> On Mon, Jan 9, 2017 at 5:23 AM, Vladimir Kotikov (Akvelon) <
>     > > >> v-vlkoti@microsoft.com> wrote:
>     > > >>
>     > > >>> Hey, everybody!
>     > > >>>
>     > > >>> I’d like to propose/discuss the idea of redistributing
> Typescript
>     > > >>> definitions along with core plugins, so that users who write
> their
>     > apps
>     > > >> in
>     > > >>> Typescript would get the typings in their projects without
> additional
>     > > >> mess
>     > > >>> with 'tsd'/'typings' (these all are the package managers for
>     > typescript
>     > > >>> declarations) or manual installation from '@types' NPM org.
>     > > >>>
>     > > >>> As mentioned above, our main goal - to reduce the number of
>     > additional
>     > > >>> actions needed to either add the plugin to Typescript project
> or get
>     > > the
>     > > >>> types information and intellisense for JavaScript projects.
> Also,
>     > this
>     > > >>> would reduce the number of network calls to other services
> (typings
>     > > >>> registry, NPM registry) which are known as common points of
> denial
>     > (per
>     > > >>> telemetry data).
>     > > >>>
>     > > >>> The changes are pretty minimal and include adding a d.ts file
> with
>     > type
>     > > >>> definitions (taken from DefinitelyTyped[1]) and 'types' entry
> to
>     > > >>> package.json according to Typescript convention [2]. The sample
>     > > >>> implementation for camera plugin is here:
> https://na01.safelinks.protection.outlook.com/?url=
> https%3A%2F%2Fgithub.com%2Fapache%2F&data=02%7C01%7Cv-
> vlkoti%40microsoft.com%7C7f41d67cc4be48efc86308d438fcbd92%
> 7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636196105543207234&sdata=
> AIkoLA7FNpc9ZYHmWt5kDcX0OgSY%2FgcRp4GJziC3Pno%3D&reserved=0
>     > > >>> cordova-plugin-camera/compare/master...vladimir-kotikov:add-
> typings
>     > > >>>
>     > > >>> Does anyone have any considerations/objections about this
> proposal?
>     > > >>>
>     > > >>> -
>     > > >>> [1] https://na01.safelinks.protection.outlook.com/?url=
> https%3A%2F%2Fgithub.com%2FDefinitelyTyped%2FDefinitelyTyped%2Fblob%
> 2Fmaster%2F&data=02%7C01%7Cv-vlkoti%40microsoft.com%
> 7C7f41d67cc4be48efc86308d438fcbd92%7C72f988bf86f141af91ab2d7cd011
> db47%7C1%7C0%7C636196105543207234&sdata=MyYfRRBvGglmjg%
> 2B6eJNW6jJkwk2BiFBQMjw4LOfo%2FMI%3D&reserved=0
>     > > >>> cordova-plugin-camera/index.d.ts
>     > > >>> [2] https://na01.safelinks.protection.outlook.com/?url=
> http%3A%2F%2Fwww.typescriptlang.org%2Fdocs%2Fhandbook%2Fdeclaration-&
> data=02%7C01%7Cv-vlkoti%40microsoft.com%7C7f41d67cc4be48efc86308d438fc
> bd92%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%
> 7C636196105543207234&sdata=CPBUnwWU%2FTzKyYz5XOeZl4LMIbTAOel3bOGfa
> ZAdQZg%3D&reserved=0
>     > > >>> files/publishing.html
>     > > >>>
>     > > >>> -
>     > > >>> Best regards, Vladimir
>     > > >>>
>     > > >>>
>     > > >>>
>     > > >>> -
>     > > >>> Best regards, Vladimir
>     > > >>>
>     > > >>>
>     > > >>>
>     > > >>
>     > >
>     > >
>     >
>     >
>     > --
>     >
>     > *Frederico Galvão*
>     >
>     > Diretor de Tecnologia
>     >
>     > PontoGet Inovação Web
>     >
>     >
>     > ( +55(62) 8131-5720
>     >
>     > * https://na01.safelinks.protection.outlook.com/?url=
> www.pontoget.com.br&data=02%7C01%7Cv-vlkoti%40microsoft.com%
> 7C7f41d67cc4be48efc86308d438fcbd92%7C72f988bf86f141af91ab2d7cd011
> db47%7C1%7C0%7C636196105543207234&sdata=IM8yAUf4kSDOesRor8F5eMbAu5f%
> 2FumyE0D2NtuJ8aUk%3D&reserved=0 <https://na01.safelinks.
> protection.outlook.com/?url=http%3A%2F%2Fwww.pontoget.com%
> 2F&data=02%7C01%7Cv-vlkoti%40microsoft.com%7C7f41d67cc4be48efc86308d438fc
> bd92%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%
> 7C636196105543207234&sdata=WBnI9Igg2XOizQhXSvlt%
> 2BP1Xqw1xIw8YyvtM%2BNNm31U%3D&reserved=0>
>     >
>
>
>
>


-- 

*Frederico Galvão*

Diretor de Tecnologia

PontoGet Inovação Web


( +55(62) 8131-5720

* www.pontoget.com.br <http://www.pontoget.com/>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message