cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shazron <shaz...@gmail.com>
Subject Re: [DISCUSS] Include TypeScript definitions in plugins
Date Mon, 09 Jan 2017 21:56:00 GMT
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://github.com/apache/
> cordova-plugin-camera/compare/master...vladimir-kotikov:add-typings
>
> Does anyone have any considerations/objections about this proposal?
>
> -
> [1] https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/
> cordova-plugin-camera/index.d.ts
> [2] http://www.typescriptlang.org/docs/handbook/declaration-
> files/publishing.html
>
> -
> Best regards, Vladimir
>
>
>
> -
> Best regards, Vladimir
>
>
>

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