Merge branch 'master' into body-parser

This commit is contained in:
Tomek Łaziuk
2017-03-07 08:19:23 +01:00
6 changed files with 76 additions and 1 deletions
+8
View File
@@ -0,0 +1,8 @@
# Installation
> `npm install --save-dev @types/cordova_app_version_plugin`
# Summary
This package contains type definitions for cordova_app_version_plugin (https://www.npmjs.com/package/cordova_app_version_plugin)
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/cordova_app_version_plugin
@@ -0,0 +1,3 @@
/// <reference types="cordova" />
var appVersion = window.cordova.plugins.version.getAppVersion(); // e.g. "1.5.0"
+26
View File
@@ -0,0 +1,26 @@
// Type definitions for cordova_app_version_plugin v0.2.6
// Project: https://www.npmjs.com/package/cordova_app_version_plugin
// Definitions by: Larry Bahr <https://github.com/larrybahr>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
//
// Licensed under the MIT license.
interface CordovaPlugins {
/**
* cordova_app_version_plugin interface
*/
version: CordovaAppVersionPlugin.CordovaAppVersionPlugin;
}
/**
* Keep the type global namespace clean by using a module
*/
declare module CordovaAppVersionPlugin {
interface CordovaAppVersionPlugin {
/**
* App version from config.xml's version (e.g. <widget id="my.app.id" version="1.5.0">)
* @example window.cordova.plugins.version.getAppVersion() // e.g: "1.5.0"
*/
getAppVersion(): string;
}
}
+23
View File
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"cordova_app_version_plugin-tests.ts"
]
}
+15
View File
@@ -39,3 +39,18 @@ class TestController implements Controller {
const server = new hapi.Server();
server.route(new TestController().routes());
@controller('/test')
class SimpleTestController implements Controller {
foo: string;
constructor(foo: string) {
this.foo = foo;
}
baseUrl: string;
routes: () => hapi.IRouteConfiguration[];
}
server.route(new SimpleTestController('bar').routes());
+1 -1
View File
@@ -5,7 +5,7 @@
import * as hapi from 'hapi';
interface ControllerStatic {
new (): Controller;
new (...args: any[]): Controller;
}
export interface Controller {
baseUrl: string;