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 RE: Managing typescript typings for Cordova and plugins
Date Wed, 03 Aug 2016 13:14:39 GMT
> Right now the only typings that I am aware of are in the definitelytyped git repository

What about new typings delivery mechanism via `npm I @types` [1]. What they are saying is
that "The major and minor version number of the types package will match the version of the
underlying package, with the patch version tracking the version of the definition file", so
you can request typings for any particular version of plugin.

Also, there are already some definitions for cordova plugins published under this namespace:
[2]

--
[1] https://blogs.msdn.microsoft.com/typescript/2016/06/15/the-future-of-declaration-files/
[2] https://www.npmjs.com/search?q=%40types%2Fcordova

-
Best regards, Vladimir

-----Original Message-----
From: Jimmy Thomson [mailto:jithomso@microsoft.com] 
Sent: Tuesday, August 2, 2016 8:50 PM
To: dev@cordova.apache.org
Subject: Managing typescript typings for Cordova and plugins

Hello,

I'm looking at improving our vscode extension for Cordova development. Currently we bundle
a set of typings for Cordova and some plugins with the extension, and we use these typings
to provide intellisense even for plain javascript projects. I would like to improve this by
using the correct typings for the actual version of Cordova and the plugins that are being
used with the project. Right now the only typings that I am aware of are in the definitelytyped
git repository, and they reflect the "latest as of when they were made" version of Cordova
/ the plugins. The "typings" tool for typescript typings can access these typings, but it
has no knowledge of what version the typings are for, and I also don't believe it supports
referencing a particular commit from definitelytyped either.

In an ideal world (from my perspective at least) typings for Cordova and the plugins would
be migrated to other npm packages and referenced by the plugin/cordovan pm packages, or otherwise
added to the typings ecosystem. That would allow someone to simply "typings install cordova@6.1.0<mailto:cordova@6.1.0>
cordova-plugin-geolocation@1.0.1<mailto:cordova-plugin-geolocation@1.0.1> --global"
and know that the typings reflect the particular versions that they are using.  Are there
any plans to do this going forwards? Or if not, would there be objections to someone else
registering the typings with https://github.com/typings/registry ?

Thanks,
Jimmy



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message