mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-05-02 00:07:23 +08:00
chore(tslint): add tslint & clean up code
This commit is contained in:
@@ -12,37 +12,37 @@ import {Plugin, Cordova} from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
plugin: 'cordova-plugin-globalization',
|
||||
pluginRef: 'navigator.globalization',
|
||||
repo: 'https://github.com/apache/cordova-plugin-globalization'
|
||||
plugin: 'cordova-plugin-globalization',
|
||||
pluginRef: 'navigator.globalization',
|
||||
repo: 'https: //github.com/apache/cordova-plugin-globalization'
|
||||
})
|
||||
export class Globalization {
|
||||
|
||||
/**
|
||||
* Returns the BCP-47 compliant language identifier tag to the successCallback with a properties object as a parameter. That object should have a value property with a String value.
|
||||
* @return {Promise<{value:string}>}
|
||||
* @return {Promise<{value: string}>}
|
||||
*/
|
||||
@Cordova()
|
||||
static getPreferredLanguage() : Promise<{value:string}> {return}
|
||||
static getPreferredLanguage(): Promise<{value: string}> {return; }
|
||||
|
||||
/**
|
||||
* Returns the BCP 47 compliant locale identifier string to the successCallback with a properties object as a parameter.
|
||||
* @return {Promise<{value:string}>}
|
||||
* @return {Promise<{value: string}>}
|
||||
*/
|
||||
@Cordova()
|
||||
static getLocaleName() : Promise<{value:string}> {return}
|
||||
static getLocaleName(): Promise<{value: string}> {return; }
|
||||
|
||||
/**
|
||||
* Converts date to string
|
||||
* @param date
|
||||
* @param options
|
||||
* @return {Promise<{value:string}>}
|
||||
* @return {Promise<{value: string}>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2
|
||||
successIndex: 1,
|
||||
errorIndex: 2
|
||||
})
|
||||
static dateToString(date : Date, options : {formatLength:string, selector:string}) : Promise<{value:string}> {return}
|
||||
static dateToString(date: Date, options: {formatLength: string, selector: string}): Promise<{value: string}> {return; }
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -50,10 +50,10 @@ export class Globalization {
|
||||
* @param options
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2
|
||||
successIndex: 1,
|
||||
errorIndex: 2
|
||||
})
|
||||
static stringToDate(dateString:string, options:{formatLength:string, selector:string}) : Promise<{year : number, month : number, day:number, hour:number, minute:number, second:number, millisecond:number}> {return}
|
||||
static stringToDate(dateString: string, options: {formatLength: string, selector: string}): Promise<{year: number, month: number, day: number, hour: number, minute: number, second: number, millisecond: number}> {return; }
|
||||
|
||||
|
||||
/**
|
||||
@@ -61,9 +61,9 @@ export class Globalization {
|
||||
* @param options
|
||||
*/
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
static getDatePattern(options:{formatLength:string, selector:string}) : Promise<{pattern:string}> {return}
|
||||
static getDatePattern(options: {formatLength: string, selector: string}): Promise<{pattern: string}> {return; }
|
||||
|
||||
|
||||
/**
|
||||
@@ -71,58 +71,58 @@ export class Globalization {
|
||||
* @param options
|
||||
*/
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
static getDateNames(options:{type:string,item:string}) : Promise<{value:Array<string>}> {return}
|
||||
static getDateNames(options: {type: string, item: string}): Promise<{value: Array<string>}> {return; }
|
||||
|
||||
/**
|
||||
* Check if day light saving is active
|
||||
* @param date
|
||||
*/
|
||||
@Cordova()
|
||||
static isDayLightSavingsTime(date:Date) : Promise<{dst:string}> {return}
|
||||
static isDayLightSavingsTime(date: Date): Promise<{dst: string}> {return; }
|
||||
|
||||
/**
|
||||
* Get first day of week
|
||||
*/
|
||||
@Cordova()
|
||||
static getFirstDayOfWeek() : Promise<{value:string}> {return}
|
||||
static getFirstDayOfWeek(): Promise<{value: string}> {return; }
|
||||
|
||||
/**
|
||||
*
|
||||
* @param options
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2
|
||||
successIndex: 1,
|
||||
errorIndex: 2
|
||||
})
|
||||
static numberToString(options:{type:string}) : Promise<{value:string}> {return}
|
||||
static numberToString(options: {type: string}): Promise<{value: string}> {return; }
|
||||
|
||||
/**
|
||||
*
|
||||
* @param string
|
||||
* @param stringToConvert
|
||||
* @param options
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2
|
||||
successIndex: 1,
|
||||
errorIndex: 2
|
||||
})
|
||||
static stringToNumber(string:string, options:{type:string}) :Promise<{value}> {return}
|
||||
static stringToNumber(stringToConvert: string, options: {type: string}): Promise<{value}> {return; }
|
||||
|
||||
/**
|
||||
*
|
||||
* @param options
|
||||
*/
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
static getNumberPattern(options:{type:string}) : Promise<{pattern:string, symbol:string, fraction:number, rounding:number, positive:string, negative:string, decimal:string, grouping:string}> {return}
|
||||
static getNumberPattern(options: {type: string}): Promise<{pattern: string, symbol: string, fraction: number, rounding: number, positive: string, negative: string, decimal: string, grouping: string}> {return; }
|
||||
|
||||
/**
|
||||
*
|
||||
* @param currencyCode
|
||||
*/
|
||||
@Cordova()
|
||||
static getCurrencyPattern(currencyCode:string) : Promise<{pattern:string, code:string, fraction:number, rounding:number, decimal:number, grouping:string}> {return}
|
||||
static getCurrencyPattern(currencyCode: string): Promise<{pattern: string, code: string, fraction: number, rounding: number, decimal: number, grouping: string}> {return; }
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user