Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type safe improvements #489

Merged
merged 25 commits into from
May 25, 2021
Merged

Type safe improvements #489

merged 25 commits into from
May 25, 2021

Conversation

kazupon
Copy link
Member

@kazupon kazupon commented May 2, 2021

Summary

  • Type safety for i18n resources in strict mode
    • Resource schema with Type annotation
  • Completion of i18n resources keys

Target APIs

  • Low-level intlify APIs: packages/core-base/*.ts
  • Composition APIs: packages/vue-i18n/src/composer.ts
  • Legacy APIs:
    • packages/vue-i18n/src/legacy.ts
    • packafes/vue-i18n/src/vue.d.ts
  • General vue-i18n APIs: packages/vue-i18n/src/i18n.ts
    • createI18n
    • useI18n

Notes

This PR is breaking change.
The API I/F provided by vue-i18n is unchanged, but the TypeScript type definition I/F has some breaking change.
If you are using TypeScript in your project, you will need to fix some things in 9.2 or later.

Resolve issues

closes #407
closes #382

@kazupon kazupon added the Type: Improvement Includes backwards-compatible fixes label May 2, 2021
@kazupon kazupon changed the title improvement: Type safe improvements WIP: Type safe improvements May 2, 2021
@kazupon kazupon added the Type: Breaking Includes backwards-incompatible fixes label May 2, 2021
@kazupon kazupon force-pushed the improvement/typesafe branch from 1361a77 to 0bec188 Compare May 9, 2021 19:00
@kazupon kazupon mentioned this pull request May 24, 2021
@kazupon kazupon changed the title WIP: Type safe improvements Type safe improvements May 25, 2021
@kazupon kazupon marked this pull request as ready for review May 25, 2021 10:00
@kazupon kazupon merged commit 632f078 into master May 25, 2021
@kazupon kazupon deleted the improvement/typesafe branch May 25, 2021 10:15
@kazupon
Copy link
Member Author

kazupon commented May 25, 2021

remaining tasks

  • interface CustomLocaleMessage
  • docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Breaking Includes backwards-incompatible fixes Type: Improvement Includes backwards-compatible fixes
Projects
None yet
1 participant