Improved Angular types support

This commit is contained in:
Francisco Hodge
2018-12-02 14:48:46 -05:00
parent 7753bc5ba3
commit 6ffd2e77ad
7 changed files with 13 additions and 12 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
/*!
*
* simple-keyboard v2.11.6
* simple-keyboard v2.11.7
* https://github.com/hodgef/simple-keyboard
*
* Copyright (c) Francisco Hodge (https://github.com/hodgef)
File diff suppressed because one or more lines are too long
+4 -3
View File
@@ -99,12 +99,12 @@ declare module 'simple-keyboard' {
/**
* Executes the callback function on key press. Returns button layout name (i.e.: "{shift}").
*/
onKeyPress?: (button: string) => string;
onKeyPress?: (button: string) => any;
/**
* Executes the callback function on input change. Returns the current input's string.
*/
onChange?: (input: string) => string;
onChange?: (input: string) => any;
/**
* Executes the callback function every time simple-keyboard is rendered (e.g: when you change layouts).
@@ -122,9 +122,10 @@ declare module 'simple-keyboard' {
onChangeAll?: (inputs: any) => any;
}
export class Keyboard {
class Keyboard {
constructor(selector: string, options: KeyboardOptions);
constructor(options: KeyboardOptions);
options: KeyboardOptions;
/**
* Adds/Modifies an entry to the `buttonTheme`. Basically a way to add a class to a button.
+1 -1
View File
@@ -1,6 +1,6 @@
/*!
*
* simple-keyboard v2.11.6
* simple-keyboard v2.11.7
* https://github.com/hodgef/simple-keyboard
*
* Copyright (c) Francisco Hodge (https://github.com/hodgef)
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "simple-keyboard",
"version": "2.11.6",
"version": "2.11.7",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
+1 -2
View File
@@ -1,6 +1,6 @@
{
"name": "simple-keyboard",
"version": "2.11.6",
"version": "2.11.7",
"description": "On-screen Javascript Virtual Keyboard",
"main": "build/index.js",
"types": "build/index.d.ts",
@@ -101,7 +101,6 @@
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
],
+4 -3
View File
@@ -99,12 +99,12 @@ declare module 'simple-keyboard' {
/**
* Executes the callback function on key press. Returns button layout name (i.e.: "{shift}").
*/
onKeyPress?: (button: string) => string;
onKeyPress?: (button: string) => any;
/**
* Executes the callback function on input change. Returns the current input's string.
*/
onChange?: (input: string) => string;
onChange?: (input: string) => any;
/**
* Executes the callback function every time simple-keyboard is rendered (e.g: when you change layouts).
@@ -122,9 +122,10 @@ declare module 'simple-keyboard' {
onChangeAll?: (inputs: any) => any;
}
export class Keyboard {
class Keyboard {
constructor(selector: string, options: KeyboardOptions);
constructor(options: KeyboardOptions);
options: KeyboardOptions;
/**
* Adds/Modifies an entry to the `buttonTheme`. Basically a way to add a class to a button.