From 09d6c1153b2f2d3c1671ff72eb817c81ddf8666e Mon Sep 17 00:00:00 2001 From: Bartosz Dotryw Date: Tue, 6 Nov 2018 12:31:56 +0100 Subject: [PATCH] Lint fixes --- .../expo-localization/expo-localization-tests.ts | 6 ++---- types/expo-localization/index.d.ts | 16 ++++++++-------- types/expo-localization/tsconfig.json | 1 + 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/types/expo-localization/expo-localization-tests.ts b/types/expo-localization/expo-localization-tests.ts index 0bf0756855..053c4bfe71 100644 --- a/types/expo-localization/expo-localization-tests.ts +++ b/types/expo-localization/expo-localization-tests.ts @@ -1,6 +1,4 @@ import { Localization } from "expo-localization"; -Localization.getLocalizationAsync().then(localization => { - localization.locale -}); -Localization.locale; \ No newline at end of file +Localization.getLocalizationAsync().then(localization => localization.locale); +Localization.locale; diff --git a/types/expo-localization/index.d.ts b/types/expo-localization/index.d.ts index 453be2b388..7db0a9355a 100644 --- a/types/expo-localization/index.d.ts +++ b/types/expo-localization/index.d.ts @@ -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; + function getLocalizationAsync(): Promise; } diff --git a/types/expo-localization/tsconfig.json b/types/expo-localization/tsconfig.json index 76ed37a779..d024122421 100644 --- a/types/expo-localization/tsconfig.json +++ b/types/expo-localization/tsconfig.json @@ -7,6 +7,7 @@ "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, + "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ "../"