@vocab/types
Advanced tools
Comparing version 1.0.0 to 1.0.1
# @vocab/types | ||
## 1.0.1 | ||
### Patch Changes | ||
- [`3ec6dba`](https://github.com/seek-oss/vocab/commit/3ec6dbaad590299cc33e2d9d4a877576eb05853a) [#63](https://github.com/seek-oss/vocab/pull/63) Thanks [@jahredhope](https://github.com/jahredhope)! - Migrate to new @formatjs/icu-messageformat-parser as intl-messageformat-parser has been deprecated | ||
## 1.0.0 | ||
@@ -4,0 +10,0 @@ |
{ | ||
"name": "@vocab/types", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"main": "dist/vocab-types.cjs.js", | ||
@@ -9,4 +9,4 @@ "module": "dist/vocab-types.esm.js", | ||
"dependencies": { | ||
"intl-messageformat": "^9.3.18" | ||
"intl-messageformat": "^9.9.0" | ||
} | ||
} |
@@ -113,3 +113,3 @@ # Vocab | ||
### Step 6: [Optional] Setup Webpack plugin | ||
### Step 6: [Optional] Set up Webpack plugin | ||
@@ -175,4 +175,6 @@ Right now every language is loaded into your web application all the time, which could lead to a large bundle size. Ideally you will want to switch out the Node/default runtime for web runtime that will load only the active language. | ||
```tsx | ||
t('my key with param', {name: 'Vocab'}); | ||
t('my key with component', {Link: children => (<a href="/foo">{children}</Link>)}); | ||
t('my key with param', { name: 'Vocab' }); | ||
t('my key with component', { | ||
Link: (children) => <a href="/foo">{children}</a> | ||
}); | ||
``` | ||
@@ -199,3 +201,3 @@ | ||
*/ | ||
projectRoot: ['./example/']; | ||
projectRoot: './example/'; | ||
/** | ||
@@ -202,0 +204,0 @@ * A custom suffix to name vocab translation directories |
@@ -34,3 +34,3 @@ export { FormatXMLElementFn } from 'intl-messageformat'; | ||
Language extends LanguageName, | ||
FormatFnByKey extends ParsedFormatFnByKey | ||
FormatFnByKey extends ParsedFormatFnByKey, | ||
> = Record<Language, TranslationModule<FormatFnByKey>>; | ||
@@ -43,3 +43,3 @@ | ||
Language extends LanguageName, | ||
FormatFnByKey extends ParsedFormatFnByKey | ||
FormatFnByKey extends ParsedFormatFnByKey, | ||
> = { | ||
@@ -103,9 +103,7 @@ /** | ||
>; | ||
export type TranslationMessagesByKey< | ||
Key extends TranslationKey = string | ||
> = Record<Key, TranslationMessage>; | ||
export type TranslationMessagesByKey<Key extends TranslationKey = string> = | ||
Record<Key, TranslationMessage>; | ||
export type TranslationsByLanguage< | ||
Key extends TranslationKey = string | ||
> = Record<LanguageName, TranslationsByKey<Key>>; | ||
export type TranslationsByLanguage<Key extends TranslationKey = string> = | ||
Record<LanguageName, TranslationsByKey<Key>>; | ||
@@ -112,0 +110,0 @@ export type LoadedTranslation<Key extends TranslationKey = string> = { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22619
301
207
Updatedintl-messageformat@^9.9.0