Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update eslint unsafe rule #887

Merged
merged 10 commits into from
May 9, 2024
6 changes: 3 additions & 3 deletions ext/js/language/translator.js
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ export class Translator {
/** @type {import('translation-internal').DatabaseDeinflection[]} */
const deinflections = [];
const used = new Set();
/** @type {Map<string, Map<string, Map<string, string>>>} */
/** @type {Map<string, Map<any, Map<any, string>>>} */
StefanVukovic99 marked this conversation as resolved.
Show resolved Hide resolved
const sourceCache = new Map(); // For reusing text processors' outputs

for (
Expand Down Expand Up @@ -502,12 +502,12 @@ export class Translator {
* @param {import('language').TextProcessorWithId<unknown>[]} textProcessors
* @param {Map<string, unknown>} processorVariant
* @param {string} text
* @param {Map<string, Map<string, Map<string, string>>>} textCache
* @param {Map<string, Map<any, Map<any, string>>>} textCache
* @returns {string}
*/
_applyTextProcessors(textProcessors, processorVariant, text, textCache) {
for (const {id, textProcessor: {process}} of textProcessors) {
const setting = String(processorVariant.get(id));
const setting = processorVariant.get(id);

let level1 = textCache.get(text);
if (!level1) {
Expand Down