Commit 2ee7e715 by Vladislav Lagunov

Правка тайпингов для ES-модулей

parent a1e69b44
...@@ -10,7 +10,7 @@ const CONTEXT_DELIMITER = String.fromCharCode(4); ...@@ -10,7 +10,7 @@ const CONTEXT_DELIMITER = String.fromCharCode(4);
// Translations // Translations
export type TranslationsData = Record<string, Record<string, string[]|string>>; export type TranslationsData = Record<string, Record<string, string[]|string>>;
export type POData = Record<string, string[]|string>; export type POData = Record<string, string[]|string>;
export type ES6Module<T> = { default: T }; export type ES6Module<T> = { default: T, __esModule };
// Хелпер для перевода // Хелпер для перевода
...@@ -35,7 +35,7 @@ export class Translations { ...@@ -35,7 +35,7 @@ export class Translations {
return Array.prototype.concat.apply([], xs.map(x => { return Array.prototype.concat.apply([], xs.map(x => {
if ('__esModule' in x) x = x.default; if ('__esModule' in x) x = x.default;
return Array.isArray(x) ? flattenModules(x) : [x] return Array.isArray(x) ? flattenModules(x) : [x]
})); }));
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment