Skip to content

Commit

Permalink
fix: petite-vue-i18n type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
TPORL committed Sep 12, 2024
1 parent a6df42c commit 3923a27
Showing 1 changed file with 29 additions and 30 deletions.
59 changes: 29 additions & 30 deletions packages/petite-vue-i18n/src/vue.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import type { Path, NamedValue } from '@intlify/core-base'
import type { NamedValue, JsonPaths } from '@intlify/core-base'
import type {
TranslateOptions,
IsNever,
IsEmptyObject,
PickupPaths
IsEmptyObject
} from '@intlify/core-base'
import type { CustomBlocks } from '../../vue-i18n-core/src/composer'
import type {
Expand Down Expand Up @@ -80,13 +79,13 @@ declare module 'vue' {
DefinedLocaleMessage extends
RemovedIndexResources<DefineLocaleMessage> = RemovedIndexResources<DefineLocaleMessage>,
Keys = IsEmptyObject<DefinedLocaleMessage> extends false
? PickupPaths<{
? JsonPaths<{
[K in keyof DefinedLocaleMessage]: DefinedLocaleMessage[K]
}>
: never,
ResourceKeys extends Keys = IsNever<Keys> extends false ? Keys : never
>(
key: Key | ResourceKeys | Path
key: Key | ResourceKeys
): TranslateResult
/**
* Locale message translation
Expand All @@ -104,13 +103,13 @@ declare module 'vue' {
DefinedLocaleMessage extends
RemovedIndexResources<DefineLocaleMessage> = RemovedIndexResources<DefineLocaleMessage>,
Keys = IsEmptyObject<DefinedLocaleMessage> extends false
? PickupPaths<{
? JsonPaths<{
[K in keyof DefinedLocaleMessage]: DefinedLocaleMessage[K]
}>
: never,
ResourceKeys extends Keys = IsNever<Keys> extends false ? Keys : never
>(
key: Key | ResourceKeys | Path,
key: Key | ResourceKeys,
plural: number
): TranslateResult
/**
Expand All @@ -130,13 +129,13 @@ declare module 'vue' {
DefinedLocaleMessage extends
RemovedIndexResources<DefineLocaleMessage> = RemovedIndexResources<DefineLocaleMessage>,
Keys = IsEmptyObject<DefinedLocaleMessage> extends false
? PickupPaths<{
? JsonPaths<{
[K in keyof DefinedLocaleMessage]: DefinedLocaleMessage[K]
}>
: never,
ResourceKeys extends Keys = IsNever<Keys> extends false ? Keys : never
>(
key: Key | ResourceKeys | Path,
key: Key | ResourceKeys,
plural: number,
options: TranslateOptions
): TranslateResult
Expand All @@ -156,13 +155,13 @@ declare module 'vue' {
DefinedLocaleMessage extends
RemovedIndexResources<DefineLocaleMessage> = RemovedIndexResources<DefineLocaleMessage>,
Keys = IsEmptyObject<DefinedLocaleMessage> extends false
? PickupPaths<{
? JsonPaths<{
[K in keyof DefinedLocaleMessage]: DefinedLocaleMessage[K]
}>
: never,
ResourceKeys extends Keys = IsNever<Keys> extends false ? Keys : never
>(
key: Key | ResourceKeys | Path,
key: Key | ResourceKeys,
defaultMsg: string
): TranslateResult
/**
Expand All @@ -182,13 +181,13 @@ declare module 'vue' {
DefinedLocaleMessage extends
RemovedIndexResources<DefineLocaleMessage> = RemovedIndexResources<DefineLocaleMessage>,
Keys = IsEmptyObject<DefinedLocaleMessage> extends false
? PickupPaths<{
? JsonPaths<{
[K in keyof DefinedLocaleMessage]: DefinedLocaleMessage[K]
}>
: never,
ResourceKeys extends Keys = IsNever<Keys> extends false ? Keys : never
>(
key: Key | ResourceKeys | Path,
key: Key | ResourceKeys,
defaultMsg: string,
options: TranslateOptions
): TranslateResult
Expand All @@ -208,13 +207,13 @@ declare module 'vue' {
DefinedLocaleMessage extends
RemovedIndexResources<DefineLocaleMessage> = RemovedIndexResources<DefineLocaleMessage>,
Keys = IsEmptyObject<DefinedLocaleMessage> extends false
? PickupPaths<{
? JsonPaths<{
[K in keyof DefinedLocaleMessage]: DefinedLocaleMessage[K]
}>
: never,
ResourceKeys extends Keys = IsNever<Keys> extends false ? Keys : never
>(
key: Key | ResourceKeys | Path,
key: Key | ResourceKeys,
list: unknown[]
): TranslateResult
/**
Expand All @@ -234,13 +233,13 @@ declare module 'vue' {
DefinedLocaleMessage extends
RemovedIndexResources<DefineLocaleMessage> = RemovedIndexResources<DefineLocaleMessage>,
Keys = IsEmptyObject<DefinedLocaleMessage> extends false
? PickupPaths<{
? JsonPaths<{
[K in keyof DefinedLocaleMessage]: DefinedLocaleMessage[K]
}>
: never,
ResourceKeys extends Keys = IsNever<Keys> extends false ? Keys : never
>(
key: Key | ResourceKeys | Path,
key: Key | ResourceKeys,
list: unknown[],
plural: number
): TranslateResult
Expand All @@ -261,16 +260,16 @@ declare module 'vue' {
DefinedLocaleMessage extends
RemovedIndexResources<DefineLocaleMessage> = RemovedIndexResources<DefineLocaleMessage>,
Keys = IsEmptyObject<DefinedLocaleMessage> extends false
? PickupPaths<{
? JsonPaths<{
[K in keyof DefinedLocaleMessage]: DefinedLocaleMessage[K]
}>
: never,
ResourceKeys extends Keys = IsNever<Keys> extends false ? Keys : never
>(
key: Key | ResourceKeys | Path,
key: Key | ResourceKeys,
list: unknown[],
defaultMsg: string
): string
): TranslateResult
/**
* Locale message translation
*
Expand All @@ -288,13 +287,13 @@ declare module 'vue' {
DefinedLocaleMessage extends
RemovedIndexResources<DefineLocaleMessage> = RemovedIndexResources<DefineLocaleMessage>,
Keys = IsEmptyObject<DefinedLocaleMessage> extends false
? PickupPaths<{
? JsonPaths<{
[K in keyof DefinedLocaleMessage]: DefinedLocaleMessage[K]
}>
: never,
ResourceKeys extends Keys = IsNever<Keys> extends false ? Keys : never
>(
key: Key | ResourceKeys | Path,
key: Key | ResourceKeys,
list: unknown[],
options: TranslateOptions
): TranslateResult
Expand All @@ -314,13 +313,13 @@ declare module 'vue' {
DefinedLocaleMessage extends
RemovedIndexResources<DefineLocaleMessage> = RemovedIndexResources<DefineLocaleMessage>,
Keys = IsEmptyObject<DefinedLocaleMessage> extends false
? PickupPaths<{
? JsonPaths<{
[K in keyof DefinedLocaleMessage]: DefinedLocaleMessage[K]
}>
: never,
ResourceKeys extends Keys = IsNever<Keys> extends false ? Keys : never
>(
key: Key | ResourceKeys | Path,
key: Key | ResourceKeys,
named: NamedValue
): TranslateResult
/**
Expand All @@ -340,13 +339,13 @@ declare module 'vue' {
DefinedLocaleMessage extends
RemovedIndexResources<DefineLocaleMessage> = RemovedIndexResources<DefineLocaleMessage>,
Keys = IsEmptyObject<DefinedLocaleMessage> extends false
? PickupPaths<{
? JsonPaths<{
[K in keyof DefinedLocaleMessage]: DefinedLocaleMessage[K]
}>
: never,
ResourceKeys extends Keys = IsNever<Keys> extends false ? Keys : never
>(
key: Key | ResourceKeys | Path,
key: Key | ResourceKeys,
named: NamedValue,
plural: number
): TranslateResult
Expand All @@ -367,13 +366,13 @@ declare module 'vue' {
DefinedLocaleMessage extends
RemovedIndexResources<DefineLocaleMessage> = RemovedIndexResources<DefineLocaleMessage>,
Keys = IsEmptyObject<DefinedLocaleMessage> extends false
? PickupPaths<{
? JsonPaths<{
[K in keyof DefinedLocaleMessage]: DefinedLocaleMessage[K]
}>
: never,
ResourceKeys extends Keys = IsNever<Keys> extends false ? Keys : never
>(
key: Key | ResourceKeys | Path,
key: Key | ResourceKeys,
named: NamedValue,
defaultMsg: string
): TranslateResult
Expand All @@ -394,13 +393,13 @@ declare module 'vue' {
DefinedLocaleMessage extends
RemovedIndexResources<DefineLocaleMessage> = RemovedIndexResources<DefineLocaleMessage>,
Keys = IsEmptyObject<DefinedLocaleMessage> extends false
? PickupPaths<{
? JsonPaths<{
[K in keyof DefinedLocaleMessage]: DefinedLocaleMessage[K]
}>
: never,
ResourceKeys extends Keys = IsNever<Keys> extends false ? Keys : never
>(
key: Key | ResourceKeys | Path,
key: Key | ResourceKeys,
named: NamedValue,
options: TranslateOptions
): TranslateResult
Expand Down

0 comments on commit 3923a27

Please sign in to comment.