Skip to content

22.4.5 broke the types #1894

@falsandtru

Description

@falsandtru

🐛 Bug Report

Updating from 22.4.4 to 22.4.5 broke the following code.

To Reproduce

      interface TransDataMap {
        'Greeting': { name: string; };
      }
      function trans<K extends keyof TransDataMap>(el: HTMLElement, key: K, data: TransDataMap[K]) {
        i18next.init((err, t) =>
          el.textContent = err
            ? ''
            : t(key, data) ?? ``);
      }

Expected behavior

pass

Your Environment

  • runtime version: v19
  • i18next version: 22.4.5
  • os: Windows

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions