intlify / vue-i18n

Vue I18n for Vue 3

Home Page:https://vue-i18n.intlify.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect tm return type

MalkovVladimir opened this issue · comments

Reporting a bug?

Example from documentation not working correctly. tm - returns numer type when you try to iterate via array

image

Expected behavior

content variable type should be

type Example = {
  title: 'Title1',
  paragraphs: Array[...],
}

Reproduction

To reproduce it, go to stackblitz and run yarn build

image

System Info

System:
    OS: macOS 12.5
    CPU: (10) arm64 Apple M1 Pro
    Memory: 136.16 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.2.0 - /usr/local/bin/node
    Yarn: 1.22.21 - /usr/local/bin/yarn
    npm: 8.9.0 - /usr/local/bin/npm
    bun: 1.0.18 - ~/.bun/bin/bun
  Browsers:
    Chrome: 123.0.6312.59
    Safari: 15.6
  npmPackages:
    @vitejs/plugin-basic-ssl: ^1.1.0 => 1.1.0 
    @vitejs/plugin-vue: ^5.0.3 => 5.0.4 
    vite: ^5.1.0 => 5.1.3 
    vite-svg-loader: ^5.1.0 => 5.1.0 
    vue: ^3.4.15 => 3.4.19 
    vue-i18n: ^9.10.2 => 9.10.2 
    vue-router: ^4.2.5 => 4.2.5 
    vue-tg: ^0.4.0 => 0.4.0 
    vue-tsc: ^1.8.27 => 1.8.27

Screenshot

No response

Additional context

No response

Validations

Thank you!
This issue has duplicate #1686, so close

Thanks!