cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Kotikov (Akvelon)" <v-vlk...@microsoft.com>
Subject [DISCUSS] Include TypeScript definitions in plugins
Date Mon, 09 Jan 2017 13:23:11 GMT
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
View raw message