嗨我想安装cordova的InAppBrowser typings。离子2科尔多瓦,安装科尔多瓦插件typings
使用
分型安装DT〜科尔多瓦--save --global
莫名其妙条(默认)所有其他引用,不安装插件。
如何手动安装它们?我试过
分型安装DT〜科尔多瓦/插件/ InAppBrowser --save --global
,并说
无法找到 “科尔多瓦/插件/ InAppBrowser” (“dt”)在注册表中。
嗨我想安装cordova的InAppBrowser typings。离子2科尔多瓦,安装科尔多瓦插件typings
使用
分型安装DT〜科尔多瓦--save --global
莫名其妙条(默认)所有其他引用,不安装插件。
如何手动安装它们?我试过
分型安装DT〜科尔多瓦/插件/ InAppBrowser --save --global
,并说
无法找到 “科尔多瓦/插件/ InAppBrowser” (“dt”)在注册表中。
你必须为typings install dt~cordova/plugins/inappbrowser --global
使用小写,而不是安装为“inappbrowser” “InAppBrowser”
使用小写:
typings install dt~cordova/plugins/inappbrowser --save --global
随着打字稿2.0,您可以使用
npm install @types/cordova-plugins-inappbrowser --save-dev
参见:
https://github.com/DefinitelyTyped/DefinitelyTyped#definitelytyped-
要打字稿用科尔多瓦离子2.2.0 -----
npm i -g typings // update typings, it might needed
typings install dt~cordova --global --save
并取消其在分型/ index.d.ts
的感谢!你知道为什么window.cordova.InAppBrowser为什么不能编译? –
Typescript无法理解JavaScript。所以我们需要安装类型编译。如果您使用的是ionic2,那么您可以使用离子本地,而不是添加类型。 – AishApp