mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 15:57:13 +00:00
Merge branch 'master' into body-parser
This commit is contained in:
@@ -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
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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"
|
||||
]
|
||||
}
|
||||
@@ -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());
|
||||
|
||||
Vendored
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
import * as hapi from 'hapi';
|
||||
interface ControllerStatic {
|
||||
new (): Controller;
|
||||
new (...args: any[]): Controller;
|
||||
}
|
||||
export interface Controller {
|
||||
baseUrl: string;
|
||||
|
||||
Reference in New Issue
Block a user