Skip to content

Commit 2e1ad4c

Browse files
committed
🧑‍💻 Add Class reference to Translation
1 parent 11783e5 commit 2e1ad4c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/script/translation.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ import { stringArray } from '@APF/lib/helper';
55
export default class Translation {
66
i18next: i18n;
77

8+
//#region Class reference helpers
9+
// Can be overridden in children classes
10+
get Class() { return (this.constructor as typeof Translation); }
11+
//#endregion
12+
813
constructor(namespaces: string|string[] = [], language: string = 'en') {
914
namespaces = stringArray(namespaces);
1015
this.i18next = i18next;

0 commit comments

Comments
 (0)