mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-31 18:49:43 +08:00
feat(taptic-engine): add missing functions and types
This commit is contained in:
parent
c0d8c99e8d
commit
a6bcc9affd
@ -1,5 +1,5 @@
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Taptic Engine
|
||||
@ -33,30 +33,63 @@ import { Injectable } from '@angular/core';
|
||||
})
|
||||
@Injectable()
|
||||
export class TapticEngine extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Use selection feedback generators to indicate a change in selection.
|
||||
* @returns {Promise<any>} Returns a promise that resolves on success and rejects on error
|
||||
*/
|
||||
@Cordova()
|
||||
selection(): Promise<any> { return; }
|
||||
selection(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this to indicate success/failure/warning to the user.
|
||||
* @param options {Object} should be of the type { type: 'success' } (or 'warning'/'error')
|
||||
* @param options.type {string}
|
||||
* @param {'success' | 'warning' | 'error'} options.type
|
||||
* @returns {Promise<any>} Returns a promise that resolves on success and rejects on error
|
||||
*/
|
||||
@Cordova()
|
||||
notification(options: { type: string }): Promise<any> { return; }
|
||||
notification(options: {
|
||||
type: 'success' | 'warning' | 'error';
|
||||
}): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this to indicate success/failure/warning to the user.
|
||||
* @param options {Object} should be of the type { style: 'light' } (or 'medium'/'heavy')
|
||||
* @param options.type {string}
|
||||
* @param {'light' | 'medium' | 'heavy'} options.type
|
||||
* @returns {Promise<any>} Returns a promise that resolves on success and rejects on error
|
||||
*/
|
||||
@Cordova()
|
||||
impact(options: { style: string }): Promise<any> { return; }
|
||||
impact(options: { style: 'light' | 'medium' | 'heavy' }): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tell the taptic engine that a gesture for a selection change is starting.
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
gestureSelectionStart(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tell the taptic engine that a selection changed during a gesture.
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
gestureSelectionChanged(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tell the taptic engine we are done with a gesture. This needs to be called lest resources are not properly recycled.
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
gestureSelectionEnd(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user