Lint fixes

This commit is contained in:
Bartosz Dotryw 2018-11-06 12:31:56 +01:00
parent 4e88afacba
commit 09d6c1153b
3 changed files with 11 additions and 12 deletions

View File

@ -1,6 +1,4 @@
import { Localization } from "expo-localization";
Localization.getLocalizationAsync().then(localization => {
localization.locale
});
Localization.locale;
Localization.getLocalizationAsync().then(localization => localization.locale);
Localization.locale;

View File

@ -35,39 +35,39 @@ export interface LocalizationProps {
isRTL: boolean;
}
export class Localization {
export namespace Localization {
/**
* Native device language, returned in standard format. ex: `en-US`, `es-US`
*/
static locale: string;
const locale: string;
/**
* List of all the native languages provided by the user settings. These are returned in the order the user defines in their native settings
*/
static locales: string[];
const locales: string[];
/**
* Country code for your device
*/
static country: string | undefined;
const country: string | undefined;
/**
* A list of all the supported ISO codes
*/
static isoCurrencyCodes: string[] | undefined;
const isoCurrencyCodes: string[] | undefined;
/**
* The current time zone in display format. ex: `America/Los_Angeles`
*/
static timezone: string;
const timezone: string;
/**
* This will return `true` if the current language is Right-to-Left
*/
static isRTL: boolean;
const isRTL: boolean;
/**
* Android only, on iOS changing the locale settings will cause all the apps to reset
*/
static getLocalizationAsync(): Promise<LocalizationProps>;
function getLocalizationAsync(): Promise<LocalizationProps>;
}

View File

@ -7,6 +7,7 @@
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"