Merge pull request #14414 from larrybahr/master

[cordova-plugin-device-name] new definitions, v1.0
This commit is contained in:
Arthur Ozga
2017-02-09 15:34:04 -08:00
committed by GitHub
5 changed files with 82 additions and 21 deletions
+21 -21
View File
@@ -1,23 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"cordova-plugin-app-version-tests.ts"
]
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"cordova-plugin-app-version-tests.ts"
]
}
+8
View File
@@ -0,0 +1,8 @@
# Installation
> `npm install --save @types/cordova-plugin-device-name`
# Summary
This package contains type definitions for cordova-plugin-device-name (https://www.npmjs.com/package/cordova-plugin-device-name)
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/cordova-plugin-device-name
@@ -0,0 +1,4 @@
/// <reference types="cordova" />
var deviceName = cordova.plugins.deviceName;
console.log(deviceName.name) // e.g: Becvert's iPad
+26
View File
@@ -0,0 +1,26 @@
// Type definitions for cordova-plugin-device-name v1.1.0
// Project: https://www.npmjs.com/package/cordova-plugin-device-name
// Definitions by: Larry Bahr <https://github.com/larrybahr>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
//
// Licensed under the MIT license.
interface CordovaPlugins {
/**
* cordova-plugin-device-name interface
*/
deviceName: CordovaPluginDeviceName.CordovaPluginDeviceName;
}
/**
* Keep the type global namespace clean by using a module
*/
declare module CordovaPluginDeviceName {
interface CordovaPluginDeviceName {
/**
* User-friendly name of the device.
* @example cordova.plugins.deviceName.name // e.g: Larry's Android
*/
name: string;
}
}
+23
View File
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"cordova-plugin-device-name-tests.ts"
]
}