mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-13 08:31:10 +08:00
Start ionic-cordova package and add keyboard plugin as a start
This commit is contained in:
10
cordova-ionic/cordova-ionic-tests.ts
Normal file
10
cordova-ionic/cordova-ionic-tests.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/// <reference path="../cordova/cordova.d.ts" />
|
||||
/// <reference path="./cordova-ionic.d.ts" />
|
||||
|
||||
// Keyboard
|
||||
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
|
||||
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(false);
|
||||
cordova.plugins.Keyboard.close();
|
||||
cordova.plugins.Keyboard.disableScroll(true);
|
||||
cordova.plugins.Keyboard.disableScroll(false);
|
||||
console.log(cordova.plugins.Keyboard.isVisible);
|
||||
14
cordova-ionic/cordova-ionic.d.ts
vendored
Normal file
14
cordova-ionic/cordova-ionic.d.ts
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
// Type definitions for Ionic Corodva plugins.
|
||||
// Project: https://github.com/driftyco
|
||||
// Definitions by: Hendrik Maus <hendrik@aidentailor.net>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="./plugins/keyboard.d.ts" />
|
||||
|
||||
interface Cordova {
|
||||
plugins:Plugins;
|
||||
}
|
||||
|
||||
interface Plugins {
|
||||
Keyboard:Ionic.Keyboard;
|
||||
}
|
||||
33
cordova-ionic/plugins/keyboard.d.ts
vendored
Normal file
33
cordova-ionic/plugins/keyboard.d.ts
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
// Type definitions for Cordova Keyboard plugin.
|
||||
// Project: https://github.com/driftyco/ionic-plugins-keyboard
|
||||
// Definitions by: Hendrik Maus <hendrik@aidentailor.net>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module Ionic {
|
||||
interface Keyboard {
|
||||
|
||||
/**
|
||||
* Hide the keyboard accessory bar with the next, previous and done buttons.
|
||||
*
|
||||
* @param hide
|
||||
*/
|
||||
hideKeyboardAccessoryBar(hide:boolean): void;
|
||||
|
||||
/**
|
||||
* Close the keyboard if it is open.
|
||||
*/
|
||||
close(): void;
|
||||
|
||||
/**
|
||||
* Disable native scrolling, useful if you are using JavaScript to scroll
|
||||
*
|
||||
* @param disbale
|
||||
*/
|
||||
disableScroll(disbale:boolean): void;
|
||||
|
||||
/**
|
||||
* Whether or not the keyboard is currently visible.
|
||||
*/
|
||||
isVisible: boolean;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user