mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
docs(brightness): add correct types
This commit is contained in:
parent
f11be24f74
commit
447f00a202
@ -1,6 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Brightness
|
||||
@ -31,15 +30,16 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
})
|
||||
@Injectable()
|
||||
export class Brightness extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Sets the brightness of the display.
|
||||
*
|
||||
* @param {value} Floating number between 0 and 1 in which case 1 means 100% brightness and 0 means 0% brightness.
|
||||
* @param value {number} Floating number between 0 and 1 in which case 1 means 100% brightness and 0 means 0% brightness.
|
||||
* @returns {Promise<any>} Returns a Promise that resolves if setting brightness was successful.
|
||||
*/
|
||||
@Cordova()
|
||||
setBrightness(value: number): Promise<any> { return; }
|
||||
setBrightness(value: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads the current brightness of the device display.
|
||||
@ -48,12 +48,13 @@ export class Brightness extends IonicNativePlugin {
|
||||
* brightness value of the device display (floating number between 0 and 1).
|
||||
*/
|
||||
@Cordova()
|
||||
getBrightness(): Promise<any> { return; }
|
||||
getBrightness(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Keeps the screen on. Prevents the device from setting the screen to sleep.
|
||||
*/
|
||||
* Keeps the screen on. Prevents the device from setting the screen to sleep.
|
||||
*/
|
||||
@Cordova()
|
||||
setKeepScreenOn(value: boolean): void { }
|
||||
|
||||
setKeepScreenOn(value: boolean): void {}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user