UNPKG

vuestic-ui

Version:
16 lines (15 loc) 738 B
import { PropType } from 'vue'; import { I18NKey, I18NKnownKey } from '../services/i18n'; import { StringWithAutocomplete } from '../utils/types/prop-type'; type Stringable = number | string | boolean | undefined; export type TranslationKey = `$t:${I18NKnownKey}`; export type TranslationProp = StringWithAutocomplete<TranslationKey>; export declare const useTranslationProp: (defaultValue: TranslationProp) => { type: PropType<TranslationProp>; default: TranslationProp; }; export declare const useTranslation: () => { tp: <Key extends TranslationProp | undefined>(key: Key, values?: Record<string, Stringable>) => string; t: <Key_1 extends I18NKey>(key: Key_1, values?: Record<string, Stringable>) => any; }; export {};