Skip to content

Commit

Permalink
chore: integrate types files
Browse files Browse the repository at this point in the history
  • Loading branch information
TinsFox committed Dec 3, 2024
1 parent 9fa2bea commit 6abde0d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 27 deletions.
3 changes: 0 additions & 3 deletions apps/admin/src/env.d.ts

This file was deleted.

14 changes: 0 additions & 14 deletions apps/admin/src/types/i18next.d.ts

This file was deleted.

File renamed without changes.
17 changes: 7 additions & 10 deletions apps/admin/types/i18next.d.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
// import the original type declarations
import "i18next"

// import all namespaces (for the default language, only)
import type en from "@/i18n/locales/en.json"
import type zhCN from "@/i18n/locales/zh-CN.json"
import type { resources } from "@/i18n"

declare module "i18next" {
// Extend CustomTypeOptions
interface CustomTypeOptions {
// custom namespace type, if you changed it
defaultNS: "en"
// custom resources type
defaultNS: "common"
resources: {
en: typeof en
zhCN: typeof zhCN
common: typeof resources.en.common
auth: typeof resources.en.auth
forms: typeof resources.en.forms
settings: typeof resources.en.settings
navigation: typeof resources.en.navigation
}
}
}
3 changes: 3 additions & 0 deletions apps/admin/types/vite-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/// <reference types="vite/client" />

declare const APP_VERSION: string
declare const APP_NAME: string

interface ImportMetaEnv {
VITE_APP_NAME: string
VITE_WEB_URL: string
Expand Down

0 comments on commit 6abde0d

Please sign in to comment.