Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanVukovic99 committed Feb 3, 2024
1 parent d6b4708 commit 5abd90c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ext/js/language/language-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ export class LanguageUtil {
/** @type {import('language').Language[]} */
const languages = await fetchJson('/js/language/languages/index.json');
for (const {iso, name, flag, exampleText} of languages) {
this.languages.set(iso, {...languageFeatures.get(iso), iso, name, flag, exampleText});
const features = /** @type {import('language').LanguageFeatures}*/ (languageFeatures.get(iso));
this.languages.set(iso, {...features, iso, name, flag, exampleText});
}
}

Expand Down
2 changes: 1 addition & 1 deletion types/ext/language.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export type TextTransformation<T = unknown> = {
};

export type LanguageFeatures = {
textTransformations?: TextTransformation[];
textTransformations: TextTransformation[];
};

export type Language = LanguageProperties & LanguageFeatures;
Expand Down

0 comments on commit 5abd90c

Please sign in to comment.