UNPKG

intlayer

Version:

Manage internationalization i18n in a simple way, through TypeScript, declaration file, declare your multilingual content every where in your code.

70 lines 2.88 kB
import { RewriteObject } from "@intlayer/types/config"; import { StrictModeLocaleMap } from "@intlayer/types/module_augmentation"; //#region src/routing/index.d.ts /** * Formatter for Next.js style rewrites. * Patterns use Next.js dynamic routing syntax: * - Slug: `[slug]` * - Catch-all: `[...slug]` (1+) * - Optional catch-all: `[[...slug]]` (0+) * - Locale: `[locale]` */ declare const nextjsRewrite: <T extends string = string>(rules: Record<T, Partial<StrictModeLocaleMap<string>>>) => RewriteObject; /** * Formatter for SvelteKit style rewrites. * Patterns use SvelteKit dynamic routing syntax: * - Slug: `[slug]` * - Catch-all: `[...slug]` (0+) * - Locale: `[locale]` */ declare const svelteKitRewrite: <T extends string = string>(rules: Record<T, Partial<StrictModeLocaleMap<string>>>) => RewriteObject; /** * Formatter for React Router style rewrites. * Patterns use React Router dynamic routing syntax: * - Slug: `:slug` * - Optional slug: `:slug?` * - Catch-all: `*` * - Locale: `:locale` */ declare const reactRouterRewrite: <T extends string = string>(rules: Record<T, Partial<StrictModeLocaleMap<string>>>) => RewriteObject; /** * Formatter for Vue style rewrites. * Patterns use Vue Router 4 dynamic routing syntax: * - Slug: `:slug` * - Optional slug: `:slug?` * - Catch-all: `:slug*` or `:slug+` * - Locale: `:locale` */ declare const vueRouterRewrite: <T extends string = string>(rules: Record<T, Partial<StrictModeLocaleMap<string>>>) => RewriteObject; /** * Formatter for Solid Router style rewrites. * Patterns use Solid Router dynamic routing syntax: * - Slug: `:slug` * - Catch-all: `*slug` * - Locale: `:locale` */ declare const solidRouterRewrite: <T extends string = string>(rules: Record<T, Partial<StrictModeLocaleMap<string>>>) => RewriteObject; /** * Formatter for Nuxt style rewrites. * Patterns use Nuxt 3 dynamic routing syntax: * - Slug: `[slug]` * - Catch-all: `[...slug]` (0+) * - Locale: `[locale]` */ declare const nuxtRewrite: <T extends string = string>(rules: Record<T, Partial<StrictModeLocaleMap<string>>>) => RewriteObject; /** * Formatter for TanStack Router style rewrites. * Patterns use TanStack Router dynamic routing syntax: * - Slug: `$slug` * - Catch-all: `*` * - Locale: `$locale` */ declare const tanstackRouterRewrite: <T extends string = string>(rules: Record<T, Partial<StrictModeLocaleMap<string>>>) => RewriteObject; /** * Generic formatter for Vite-based projects. * Supports most dynamic routing syntaxes and normalizes them for the Vite proxy. */ declare const viteRewrite: <T extends string = string>(rules: Record<T, Partial<StrictModeLocaleMap<string>>>) => RewriteObject; //#endregion export { nextjsRewrite, nuxtRewrite, reactRouterRewrite, solidRouterRewrite, svelteKitRewrite, tanstackRouterRewrite, viteRewrite, vueRouterRewrite }; //# sourceMappingURL=index.d.ts.map