diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2023-12-20 00:37:34 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-20 05:37:34 +0000 |
commit | e8b4c488dd5955bafa3fbdbd71cb125f67486415 (patch) | |
tree | f3e5ed3ec5de4d5d33f4c5902eb4d0961cdd42e9 /ext/js/language/deinflector.js | |
parent | e56f03901f21fa8f44725b6a68d3d0dca1e9cd34 (diff) |
Declare static fields using modern JavaScript syntax (#400)
Diffstat (limited to 'ext/js/language/deinflector.js')
-rw-r--r-- | ext/js/language/deinflector.js | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/ext/js/language/deinflector.js b/ext/js/language/deinflector.js index 26cc6b18..f0e02f6f 100644 --- a/ext/js/language/deinflector.js +++ b/ext/js/language/deinflector.js @@ -17,6 +17,19 @@ */ export class Deinflector { + /* eslint-disable no-multi-spaces */ + /** @type {Map<string, import('translation-internal').DeinflectionRuleFlags>} @readonly */ + static _ruleTypes = new Map([ + ['v1', /** @type {import('translation-internal').DeinflectionRuleFlags} */ (0b00000001)], // Verb ichidan + ['v5', /** @type {import('translation-internal').DeinflectionRuleFlags} */ (0b00000010)], // Verb godan + ['vs', /** @type {import('translation-internal').DeinflectionRuleFlags} */ (0b00000100)], // Verb suru + ['vk', /** @type {import('translation-internal').DeinflectionRuleFlags} */ (0b00001000)], // Verb kuru + ['vz', /** @type {import('translation-internal').DeinflectionRuleFlags} */ (0b00010000)], // Verb zuru + ['adj-i', /** @type {import('translation-internal').DeinflectionRuleFlags} */ (0b00100000)], // Adjective i + ['iru', /** @type {import('translation-internal').DeinflectionRuleFlags} */ (0b01000000)] // Intermediate -iru endings for progressive or perfect tense + ]); + /* eslint-enable no-multi-spaces */ + /** * @param {import('deinflector').ReasonsRaw} reasons * @example @@ -112,18 +125,3 @@ export class Deinflector { return value; } } - - -/* eslint-disable no-multi-spaces */ -/** @type {Map<string, import('translation-internal').DeinflectionRuleFlags>} */ -// eslint-disable-next-line no-underscore-dangle -Deinflector._ruleTypes = new Map([ - ['v1', /** @type {import('translation-internal').DeinflectionRuleFlags} */ (0b00000001)], // Verb ichidan - ['v5', /** @type {import('translation-internal').DeinflectionRuleFlags} */ (0b00000010)], // Verb godan - ['vs', /** @type {import('translation-internal').DeinflectionRuleFlags} */ (0b00000100)], // Verb suru - ['vk', /** @type {import('translation-internal').DeinflectionRuleFlags} */ (0b00001000)], // Verb kuru - ['vz', /** @type {import('translation-internal').DeinflectionRuleFlags} */ (0b00010000)], // Verb zuru - ['adj-i', /** @type {import('translation-internal').DeinflectionRuleFlags} */ (0b00100000)], // Adjective i - ['iru', /** @type {import('translation-internal').DeinflectionRuleFlags} */ (0b01000000)] // Intermediate -iru endings for progressive or perfect tense -]); -/* eslint-enable no-multi-spaces */ |