# \[CCI\] fix type errors run\_i18n\_check.ts

**URL:** <https://forum.opensearch.org/t/cci-fix-type-errors-run-i18n-check-ts/13040>\
**Category:** OpenSearch Dashboards\
**Tags:** discuss, troubleshoot\
**Created:** [March 9, 2023, 12:16pm UTC](https://forum.opensearch.org/t/cci-fix-type-errors-run-i18n-check-ts/13040 "2023-03-09T12:16:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Orbulon](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/orbulon/32/5002_2.png) [@Orbulon](https://forum.opensearch.org/u/Orbulon)\
**Post date:** [March 9, 2023, 12:16pm UTC](https://forum.opensearch.org/t/cci-fix-type-errors-run-i18n-check-ts/13040/1 "2023-03-09T12:16:58Z")

</div>

**Versions** (relevant - OpenSearch/Dashboard/Server OS/Browser):  
OSD latest version

**Describe the issue** :

src\dev\run\_i18n\_check.ts

I decided to fix the types in

> <https://github.com/opensearch-project/OpenSearch-Dashboards/issues/3027>
>
> Task for https://github.com/opensearch-project/OpenSearch-Dashboards/issues/1660…
> 
> (inherited from previous project)
> 
> \`\`\`
> $tsc --noEmit
> ...
> 
> src/dev/i18n/utils/verify\_icu\_message.ts:43:15 - error TS2351: This expression is not constructable.
> Type 'Error' has no construct signatures.
> 
> 43 throw new parser.SyntaxError(
> ~~~~~~~~~~~~~~~~~~
> 
> src/dev/i18n/utils/verify\_icu\_message.ts:54:19 - error TS2351: This expression is not constructable.
> Type 'Error' has no construct signatures.
> 
> 54 throw new parser.SyntaxError(
> ~~~~~~~~~~~~~~~~~~
> 
> src/dev/run\_i18n\_check.ts:92:23 - error TS2322: Type 'Listr\<{ reporter: ErrorReporter; }\>' is not assignable to type 'void | ListrTaskResult\<{ config: I18nConfig; }\>'.
> Type 'Listr\<{ reporter: ErrorReporter; }\>' is not assignable to type 'Listr\<{ config: I18nConfig; }\>'.
> Types of property 'tasks' are incompatible.
> Type 'readonly ListrTaskWrapper\<{ reporter: ErrorReporter; }\>\[\]' is not assignable to type 'readonly ListrTaskWrapper\<{ config: I18nConfig; }\>\[\]'.
> Type 'ListrTaskWrapper\<{ reporter: ErrorReporter; }\>' is not assignable to type 'ListrTaskWrapper\<{ config: I18nConfig; }\>'.
> Type '{ reporter: ErrorReporter; }' is not assignable to type '{ config: I18nConfig; }'.
> 
> 92 task: () =\> new Listr(checkConfigs(includeConfig), { exitOnError: true }),
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> node\_modules/@types/listr/index.d.ts:33:15
> 33 task: (ctx: Ctx, task: ListrTaskWrapper\<Ctx\>) =\> void | ListrTaskResult\<Ctx\>;
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> The expected type comes from the return type of this signature.
> src/dev/run\_i18n\_check.ts:92:17
> 92 task: () =\> new Listr(checkConfigs(includeConfig), { exitOnError: true }),
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Did you mean to mark this function as 'async'?
> 
> src/dev/run\_i18n\_check.ts:96:23 - error TS2322: Type 'Listr\<{ reporter: ErrorReporter; config?: I18nConfig | undefined; }\>' is not assignable to type 'void | ListrTaskResult\<{ config: I18nConfig; }\>'.
> Type 'Listr\<{ reporter: ErrorReporter; config?: I18nConfig | undefined; }\>' is not assignable to type 'Listr\<{ config: I18nConfig; }\>'.
> Types of property 'tasks' are incompatible.
> Type 'readonly ListrTaskWrapper\<{ reporter: ErrorReporter; config?: I18nConfig | undefined; }\>\[\]' is not assignable to type 'readonly ListrTaskWrapper\<{ config: I18nConfig; }\>\[\]'.
> Type 'ListrTaskWrapper\<{ reporter: ErrorReporter; config?: I18nConfig | undefined; }\>' is not assignable to type 'ListrTaskWrapper\<{ config: I18nConfig; }\>'.
> Type '{ reporter: ErrorReporter; config?: I18nConfig | undefined; }' is not assignable to type '{ config: I18nConfig; }'.
> 
> 96 task: () =\> new Listr(mergeConfigs(includeConfig), { exitOnError: true }),
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> node\_modules/@types/listr/index.d.ts:33:15
> 33 task: (ctx: Ctx, task: ListrTaskWrapper\<Ctx\>) =\> void | ListrTaskResult\<Ctx\>;
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> The expected type comes from the return type of this signature.
> src/dev/run\_i18n\_check.ts:96:17
> 96 task: () =\> new Listr(mergeConfigs(includeConfig), { exitOnError: true }),
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Did you mean to mark this function as 'async'?
> 
> src/dev/run\_i18n\_check.ts:103:13 - error TS2322: Type 'Listr\<{ reporter: ErrorReporter; config: I18nConfig; }\>' is not assignable to type 'void | ListrTaskResult\<{ config: I18nConfig; }\>'.
> Type 'Listr\<{ reporter: ErrorReporter; config: I18nConfig; }\>' is not assignable to type 'Listr\<{ config: I18nConfig; }\>'.
> Types of property 'setRenderer' are incompatible.
> Type '(value: ListrRendererValue\<{ reporter: ErrorReporter; config: I18nConfig; }\>) =\> void' is not assignable to type '(value: ListrRendererValue\<{ config: I18nConfig; }\>) =\> void'.
> Types of parameters 'value' and 'value' are incompatible.
> Type 'ListrRendererValue\<{ config: I18nConfig; }\>' is not assignable to type 'ListrRendererValue\<{ reporter: ErrorReporter; config: I18nConfig; }\>'.
> Type 'ListrRendererClass\<{ config: I18nConfig; }\>' is not assignable to type 'ListrRendererValue\<{ reporter: ErrorReporter; config: I18nConfig; }\>'.
> Type 'ListrRendererClass\<{ config: I18nConfig; }\>' is not assignable to type 'ListrRendererClass\<{ reporter: ErrorReporter; config: I18nConfig; }\>'.
> Types of parameters 'tasks' and 'tasks' are incompatible.
> Type 'readonly ListrTaskObject\<{ reporter: ErrorReporter; config: I18nConfig; }\>\[\]' is not assignable to type 'readonly ListrTaskObject\<{ config: I18nConfig; }\>\[\]'.
> Type 'ListrTaskObject\<{ reporter: ErrorReporter; config: I18nConfig; }\>' is not assignable to type 'ListrTaskObject\<{ config: I18nConfig; }\>'.
> Types of property 'task' are incompatible.
> Type '(ctx: { reporter: ErrorReporter; config: I18nConfig; }, task: ListrTaskWrapper\<{ reporter: ErrorReporter; config: I18nConfig; }\>) =\> void | ListrTaskResult\<{ reporter: ErrorReporter; config: I18nConfig; }\>' is not assignable to type '(ctx: { config: I18nConfig; }, task: ListrTaskWrapper\<{ config: I18nConfig; }\>) =\> void | ListrTaskResult\<{ config: I18nConfig; }\>'.
> Types of parameters 'ctx' and 'ctx' are incompatible.
> Type '{ config: I18nConfig; }' is not assignable to type '{ reporter: ErrorReporter; config: I18nConfig; }'.
> 
> 103 new Listr(extractUntrackedMessages(srcPaths), { exitOnError: true }),
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> node\_modules/@types/listr/index.d.ts:33:15
> 33 task: (ctx: Ctx, task: ListrTaskWrapper\<Ctx\>) =\> void | ListrTaskResult\<Ctx\>;
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> The expected type comes from the return type of this signature.
> src/dev/run\_i18n\_check.ts:102:17
> 102 task: ({ config }) =\>
> ~~~~~~~~~~~~~~~
> 103 new Listr(extractUntrackedMessages(srcPaths), { exitOnError: true }),
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Did you mean to mark this function as 'async'?
> 
> src/dev/run\_i18n\_check.ts:109:13 - error TS2322: Type 'Listr\<{ messages: Map\<string, { message: string; }\>; reporter: ErrorReporter; }\>' is not assignable to type 'void | ListrTaskResult\<{ config: I18nConfig; }\>'.
> Type 'Listr\<{ messages: Map\<string, { message: string; }\>; reporter: ErrorReporter; }\>' is not assignable to type 'Listr\<{ config: I18nConfig; }\>'.
> Types of property 'tasks' are incompatible.
> Type 'readonly ListrTaskWrapper\<{ messages: Map\<string, { message: string; }\>; reporter: ErrorReporter; }\>\[\]' is not assignable to type 'readonly ListrTaskWrapper\<{ config: I18nConfig; }\>\[\]'.
> Type 'ListrTaskWrapper\<{ messages: Map\<string, { message: string; }\>; reporter: ErrorReporter; }\>' is not assignable to type 'ListrTaskWrapper\<{ config: I18nConfig; }\>'.
> Type '{ messages: Map\<string, { message: string; }\>; reporter: ErrorReporter; }' is not assignable to type '{ config: I18nConfig; }'.
> 
> 109 new Listr(extractDefaultMessages(config, srcPaths), { exitOnError: true }),
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> node\_modules/@types/listr/index.d.ts:33:15
> 33 task: (ctx: Ctx, task: ListrTaskWrapper\<Ctx\>) =\> void | ListrTaskResult\<Ctx\>;
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> The expected type comes from the return type of this signature.
> src/dev/run\_i18n\_check.ts:108:17
> 108 task: ({ config }) =\>
> ~~~~~~~~~~~~~~~
> 109 new Listr(extractDefaultMessages(config, srcPaths), { exitOnError: true }),
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Did you mean to mark this function as 'async'?
> 
> src/dev/run\_i18n\_check.ts:115:13 - error TS2322: Type 'Listr\<{ messages: Map\<string, { message: string; }\>; }\>' is not assignable to type 'void | ListrTaskResult\<{ config: I18nConfig; }\>'.
> Type 'Listr\<{ messages: Map\<string, { message: string; }\>; }\>' is not assignable to type 'Listr\<{ config: I18nConfig; }\>'.
> Types of property 'tasks' are incompatible.
> Type 'readonly ListrTaskWrapper\<{ messages: Map\<string, { message: string; }\>; }\>\[\]' is not assignable to type 'readonly ListrTaskWrapper\<{ config: I18nConfig; }\>\[\]'.
> Type 'ListrTaskWrapper\<{ messages: Map\<string, { message: string; }\>; }\>' is not assignable to type 'ListrTaskWrapper\<{ config: I18nConfig; }\>'.
> Type '{ messages: Map\<string, { message: string; }\>; }' is not assignable to type '{ config: I18nConfig; }'.
> 
> 115 new Listr(
> ~~~~~~~~~~
> 116 checkCompatibility(
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ... 
> 127 { exitOnError: true }
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 128 ),
> ~~~~~~~~~~~~~
> 
> node\_modules/@types/listr/index.d.ts:33:15
> 33 task: (ctx: Ctx, task: ListrTaskWrapper\<Ctx\>) =\> void | ListrTaskResult\<Ctx\>;
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> The expected type comes from the return type of this signature.
> src/dev/run\_i18n\_check.ts:114:17
> 114 task: ({ config }) =\>
> ~~~~~~~~~~~~~~~
> 115 new Listr(
> ~~~~~~~~~~~~~~~~~~~~~~
> ... 
> 127 { exitOnError: true }
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 128 ),
> ~~~~~~~~~~~~~
> Did you mean to mark this function as 'async'?
> 
> src/dev/run\_i18n\_check.ts:140:24 - error TS2345: Argument of type '{ messages: Map\<string, { message: string; }\>; reporter: any; }' is not assignable to parameter of type '{ config: I18nConfig; }'.
> Object literal may only specify known properties, and 'messages' does not exist in type '{ config: I18nConfig; }'.
> 
> 140 await list.run({ messages, reporter });
> ~~~~~~~~
> 
> src/dev/run\_i18n\_extract.ts:62:18 - error TS2769: No overload matches this call.
> Overload 1 of 2, '(tasks?: readonly ListrTask\<{ reporter: ErrorReporter; config?: I18nConfig | undefined; }\>\[\] | undefined, options?: ListrOptions\<{ reporter: ErrorReporter; config?: I18nConfig | undefined; }\> | undefined): Listr\<...\>', gave the following error.
> Type 'Listr\<{ messages: Map\<string, { message: string; }\>; reporter: ErrorReporter; }\>' is not assignable to type 'void | ListrTaskResult\<{ reporter: ErrorReporter; config?: I18nConfig | undefined; }\>'.
> Type 'Listr\<{ messages: Map\<string, { message: string; }\>; reporter: ErrorReporter; }\>' is not assignable to type 'Listr\<{ reporter: ErrorReporter; config?: I18nConfig | undefined; }\>'.
> Types of property 'setRenderer' are incompatible.
> Type '(value: ListrRendererValue\<{ messages: Map\<string, { message: string; }\>; reporter: ErrorReporter; }\>) =\> void' is not assignable to type '(value: ListrRendererValue\<{ reporter: ErrorReporter; config?: I18nConfig | undefined; }\>) =\> void'.
> Types of parameters 'value' and 'value' are incompatible.
> Type 'ListrRendererValue\<{ reporter: ErrorReporter; config?: I18nConfig | undefined; }\>' is not assignable to type 'ListrRendererValue\<{ messages: Map\<string, { message: string; }\>; reporter: ErrorReporter; }\>'.
> Type 'ListrRendererClass\<{ reporter: ErrorReporter; config?: I18nConfig | undefined; }\>' is not assignable to type 'ListrRendererValue\<{ messages: Map\<string, { message: string; }\>; reporter: ErrorReporter; }\>'.
> Type 'ListrRendererClass\<{ reporter: ErrorReporter; config?: I18nConfig | undefined; }\>' is not assignable to type 'ListrRendererClass\<{ messages: Map\<string, { message: string; }\>; reporter: ErrorReporter; }\>'.
> Types of parameters 'tasks' and 'tasks' are incompatible.
> Type 'readonly ListrTaskObject\<{ messages: Map\<string, { message: string; }\>; reporter: ErrorReporter; }\>\[\]' is not assignable to type 'readonly ListrTaskObject\<{ reporter: ErrorReporter; config?: I18nConfig | undefined; }\>\[\]'.
> Type 'ListrTaskObject\<{ messages: Map\<string, { message: string; }\>; reporter: ErrorReporter; }\>' is not assignable to type 'ListrTaskObject\<{ reporter: ErrorReporter; config?: I18nConfig | undefined; }\>'.
> Types of property 'task' are incompatible.
> Type '(ctx: { messages: Map\<string, { message: string; }\>; reporter: ErrorReporter; }, task: ListrTaskWrapper\<{ messages: Map\<string, { message: string; }\>; reporter: ErrorReporter; }\>) =\> void | ListrTaskResult\<...\>' is not assignable to type '(ctx: { reporter: ErrorReporter; config?: I18nConfig | undefined; }, task: ListrTaskWrapper\<{ reporter: ErrorReporter; config?: I18nConfig | undefined; }\>) =\> void | ListrTaskResult\<...\>'.
> Types of parameters 'ctx' and 'ctx' are incompatible.
> Type '{ reporter: ErrorReporter; config?: I18nConfig | undefined; }' is not assignable to type '{ messages: Map\<string, { message: string; }\>; reporter: ErrorReporter; }'.
> Overload 2 of 2, '(options?: ListrOptions\<any\> | undefined): Listr\<any\>', gave the following error.
> Type '({ title: string; task: () =\> Listr\<{ reporter: ErrorReporter; config?: I18nConfig | undefined; }\>; } | { title: string; task: ({ config }: { reporter: ErrorReporter; config?: I18nConfig | undefined; }) =\> Listr\<...\>; } | { ...; })\[\]' has no properties in common with type 'ListrOptions\<any\>'.
> 
> 62 const list = new Listr(\[
> ~~~~~~~~~~~
> 63 {
> ~~~~~~~
> ... 
> 86 },
> ~~~~~~~~
> 87 \]);
> ~~~~~~
> 
> node\_modules/@types/listr/index.d.ts:33:15
> 33 task: (ctx: Ctx, task: ListrTaskWrapper\<Ctx\>) =\> void | ListrTaskResult\<Ctx\>;
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> The expected type comes from the return type of this signature.
> src/dev/run\_i18n\_extract.ts:69:15
> 69 task: ({ config }) =\>
> ~~~~~~~~~~~~~~~
> 70 new Listr(extractDefaultMessages(config, srcPaths), { exitOnError: true }),
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Did you mean to mark this function as 'async'?
> 
> src/dev/run\_i18n\_extract.ts:70:44 - error TS2345: Argument of type 'I18nConfig | undefined' is not assignable to parameter of type 'I18nConfig'.
> Type 'undefined' is not assignable to type 'I18nConfig'.
> 
> 70 new Listr(extractDefaultMessages(config, srcPaths), { exitOnError: true }),
> ~~~~~~
> 
> src/dev/run\_i18n\_extract.ts:74:44 - error TS2339: Property 'messages' does not exist on type '{ reporter: ErrorReporter; config?: I18nConfig | undefined; }'.
> 
> 74 enabled: (ctx) =\> outputDir && ctx.messages.size,
> ~~~~~~~~
> 
> src/dev/run\_i18n\_extract.ts:76:42 - error TS2339: Property 'messages' does not exist on type '{ reporter: ErrorReporter; config?: I18nConfig | undefined; }'.
> 
> 76 const sortedMessages = \[...ctx.messages\].sort((\[key1\], \[key2\]) =\>
> ~~~~~~~~
> 
> src/dev/run\_i18n\_extract.ts:92:24 - error TS2345: Argument of type '{ messages: Map\<string, { message: string; }\>; reporter: any; }' is not assignable to parameter of type '{ reporter: ErrorReporter; config?: I18nConfig | undefined; }'.
> Object literal may only specify known properties, and 'messages' does not exist in type '{ reporter: ErrorReporter; config?: I18nConfig | undefined; }'.
> 
> 92 await list.run({ messages, reporter });
> ~~~~~~~~
> 
> src/dev/run\_i18n\_integrate.ts:93:18 - error TS2769: No overload matches this call.
> Overload 1 of 2, '(tasks?: readonly ListrTask\<{ reporter: ErrorReporter; config?: I18nConfig | undefined; }\>\[\] | undefined, options?: ListrOptions\<{ reporter: ErrorReporter; config?: I18nConfig | undefined; }\> | undefined): Listr\<...\>', gave the following error.
> Type 'Listr\<{ messages: Map\<string, { message: string; }\>; reporter: ErrorReporter; }\>' is not assignable to type 'void | ListrTaskResult\<{ reporter: ErrorReporter; config?: I18nConfig | undefined; }\>'.
> Overload 2 of 2, '(options?: ListrOptions\<any\> | undefined): Listr\<any\>', gave the following error.
> Type '({ title: string; task: () =\> Listr\<{ reporter: ErrorReporter; config?: I18nConfig | undefined; }\>; } | { title: string; task: ({ config }: { reporter: ErrorReporter; config?: I18nConfig | undefined; }) =\> Listr\<...\>; } | { ...; })\[\]' has no properties in common with type 'ListrOptions\<any\>'.
> 
> 93 const list = new Listr(\[
> ~~~~~~~~~~~
> 94 {
> ~~~~~~~
> ... 
> 118 },
> ~~~~~~~~
> 119 \]);
> ~~~~~~
> 
> node\_modules/@types/listr/index.d.ts:33:15
> 33 task: (ctx: Ctx, task: ListrTaskWrapper\<Ctx\>) =\> void | ListrTaskResult\<Ctx\>;
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> The expected type comes from the return type of this signature.
> src/dev/run\_i18n\_integrate.ts:100:15
> 100 task: ({ config }) =\>
> ~~~~~~~~~~~~~~~
> 101 new Listr(extractDefaultMessages(config, srcPaths), { exitOnError: true }),
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Did you mean to mark this function as 'async'?
> 
> src/dev/run\_i18n\_integrate.ts:101:44 - error TS2345: Argument of type 'I18nConfig | undefined' is not assignable to parameter of type 'I18nConfig'.
> Type 'undefined' is not assignable to type 'I18nConfig'.
> 
> 101 new Listr(extractDefaultMessages(config, srcPaths), { exitOnError: true }),
> ~~~~~~
> 
> src/dev/run\_i18n\_integrate.ts:105:24 - error TS2339: Property 'messages' does not exist on type '{ reporter: ErrorReporter; config?: I18nConfig | undefined; }'.
> 
> 105 task: async ({ messages, config }) =\> {
> ~~~~~~~~
> 
> src/dev/run\_i18n\_integrate.ts:114:13 - error TS2322: Type 'I18nConfig | undefined' is not assignable to type 'I18nConfig'.
> Type 'undefined' is not assignable to type 'I18nConfig'.
> 
> 114 config,
> ~~~~~~
> 
> src/dev/i18n/integrate\_locale\_files.ts:59:3
> 59 config: I18nConfig;
> ~~~~~~
> The expected type comes from property 'config' which is declared here on type 'IntegrateOptions'
> 
> src/dev/run\_i18n\_integrate.ts:124:24 - error TS2345: Argument of type '{ messages: Map\<string, { message: string; }\>; reporter: any; }' is not assignable to parameter of type '{ reporter: ErrorReporter; config?: I18nConfig | undefined; }'.
> Object literal may only specify known properties, and 'messages' does not exist in type '{ reporter: ErrorReporter; config?: I18nConfig | undefined; }'.
> 
> 124 await list.run({ messages, reporter });
> 
> 
> \`\`\`

But I don’t understand why there is no config itself, what paths, exclude, translations should I specify in the config? I’m still not very familiar with the project, so I don’t know if I’m thinking correctly about the lack of config  
@ashwinpc

**Relevant Logs or Screenshots** :

 ![изображение](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/a/af066e2f3878466b64c7d461e9598f3e361333f8.png)  
 ![изображение](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/c/cb35eb863e26ae639580a6631e34cd51b3652be7.png)

---

<div class="post-metadata">

**Author:** ![Orbulon](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/orbulon/32/5002_2.png) [@Orbulon](https://forum.opensearch.org/u/Orbulon)\
**Post date:** [March 9, 2023, 4:58pm UTC](https://forum.opensearch.org/t/cci-fix-type-errors-run-i18n-check-ts/13040/2 "2023-03-09T16:58:31Z")

</div>

**in addition** :  
Is it acceptable to solve import problems at the expense of **`// @ts-ignore`**  
if the ts config is configured differently in the project? Seen in the directory often such fixes

 ![изображение](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/9/951e81a17f0ce11c3bbaeb07bc0d6a9b6a22bd0b.png)

---

<div class="post-metadata">

**Author:** ![ashwinpc](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/ashwinpc/32/4948_2.png) [@ashwinpc](https://forum.opensearch.org/u/ashwinpc)\
**Post date:** [March 9, 2023, 7:29pm UTC](https://forum.opensearch.org/t/cci-fix-type-errors-run-i18n-check-ts/13040/3 "2023-03-09T19:29:07Z")

</div>

@Orbulon can we move the conversation about the i18n check to the issue itself? I have added my comments there: [Fix type errors in i18n · Issue #3027 · opensearch-project/OpenSearch-Dashboards · GitHub](https://github.com/opensearch-project/OpenSearch-Dashboards/issues/3027#issuecomment-1462668968)

As for using **`// @ts-ignore`** , This is generally frowned up. There are certain instances where it makes sense to add that and is usually handled on a case by case basis. Do you have an example where you want to solve an import warning using that ignore flag?

---

<div class="post-metadata">

**Author:** ![Orbulon](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/orbulon/32/5002_2.png) [@Orbulon](https://forum.opensearch.org/u/Orbulon)\
**Post date:** [March 9, 2023, 7:52pm UTC](https://forum.opensearch.org/t/cci-fix-type-errors-run-i18n-check-ts/13040/4 "2023-03-09T19:52:20Z")

</div>

Yes, no problem. Thanks for the answer! At the expense of ignoring - I saw that the declared modules (as in the screenshot) that are imported from eui are ignored. Therefore, I want to know how such modules are typed in the project

---

<div class="post-metadata">

**Author:** ![ashwinpc](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/ashwinpc/32/4948_2.png) [@ashwinpc](https://forum.opensearch.org/u/ashwinpc)\
**Post date:** [March 9, 2023, 8:12pm UTC](https://forum.opensearch.org/t/cci-fix-type-errors-run-i18n-check-ts/13040/5 "2023-03-09T20:12:18Z")

</div>

Yeah you are looking at one such instance where we had to make an exception. eui as a whole is not ignored, but `findTestSubject` is. There are other eui imports that are correctly typed. Since we are moving from eui to oui, we will just ignore the typings for eui that are missing right now with the ignore flag and use the oui types in future.

This being said you bring up an intresting issue. even though we refer to eui here, we are already usig oui under the hood and should be updating the types there so that these imports do not need to be ignored anymore. I’ve opened an issue for it here: [[BUG] Export types for `/lib/test` · Issue #583 · opensearch-project/oui · GitHub](https://github.com/opensearch-project/oui/issues/583)
