Open
Description
Reporting a bug?
When I implemented a function to globally switch locale as follows:
The type definition for i18n.global.locale
is wrong:
By printing out the console, I was able to see that i18n.global.locale
should be a computed value
Expected behavior
TypeScript not throw error
Reproduction
Type definition problem
System Info
System:
OS: macOS 12.3.1
CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
Memory: 171.65 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.13.2 - ~/.nvm/versions/node/v16.13.2/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 8.6.0 - ~/.nvm/versions/node/v16.13.2/bin/npm
Watchman: 2021.10.18.00 - /usr/local/bin/watchman
Browsers:
Brave Browser: 91.1.26.77
Chrome: 101.0.4951.54
Safari: 15.4
"vue": "^3.2.25",
"vue-i18n": "^9.1.10",
"@intlify/vite-plugin-vue-i18n": "^3.4.0",
"@vitejs/plugin-vue": "^2.3.1",
Screenshot
No response
Additional context
No response
Validations
- Read the Contributing Guidelines
- Read the Documentation
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion
- The provided reproduction is a minimal reproducible example of the bug.