Refactor options page to use Typescript
Also, I've added and ran eslint, and fixed several minor issues accross
the Typescript codebase.
Bug: translateselectedtext:15
Change-Id: I8cfd67697f9bfb22f6de93b64fd750de66bab863
diff --git a/src/options/tsCredits.ts b/src/options/tsCredits.ts
new file mode 100644
index 0000000..cbbcc4b
--- /dev/null
+++ b/src/options/tsCredits.ts
@@ -0,0 +1,26 @@
+import creditsRaw from './credits.json5';
+import i18nCreditsRaw from './i18n-credits.json5';
+
+interface Credit {
+ name: string;
+ url?: string;
+ author?: string;
+ license?: string;
+}
+
+type Credits = Credit[]
+
+interface CrowdinLang {
+ id: string;
+ name: string;
+}
+
+interface IntCredit {
+ name: string;
+ languages: CrowdinLang[];
+}
+
+type IntCredits = IntCredit[];
+
+export const credits: Credits = creditsRaw;
+export const i18nCredits: IntCredits = i18nCreditsRaw;