-
-
Notifications
You must be signed in to change notification settings - Fork 486
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use generated tsconfig and virtual file augmentations (#3112)
- Loading branch information
1 parent
68c9ee9
commit 6296331
Showing
24 changed files
with
163 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
# enable TypeScript bundler module resolution - https://www.typescriptlang.org/docs/handbook/modules/reference.html#bundler | ||
experimental.typescriptBundlerResolution=true | ||
|
||
future.typescriptBundlerResolution=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
declare module '#build/i18n.options.mjs' { | ||
import type { DeepRequired } from 'ts-essentials' | ||
/** | ||
* stub type definition for @nuxtjs/i18n internally | ||
*/ | ||
|
||
type VueI18nConfig = import('./dist/types').VueI18nConfig | ||
type NuxtI18nOptions = import('./dist/types').NuxtI18nOptions | ||
type LocaleObject = import('./dist/types').LocaleObject | ||
|
||
type LocaleLoader = { | ||
key: string | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
load: () => Promise<any> | ||
cache: boolean | ||
} | ||
|
||
export const localeLoaders: Record<string, LocaleLoader[]> | ||
|
||
export const vueI18nConfigs: VueI18nConfig[] | ||
|
||
export const localeCodes: string[] | ||
export const nuxtI18nOptions: DeepRequired<NuxtI18nOptions<Context>> | ||
export const normalizedLocales: LocaleObject[] | ||
export const isSSG = false | ||
export const parallelPlugin: boolean | ||
|
||
export const NUXT_I18N_MODULE_ID = '' | ||
export const DEFAULT_DYNAMIC_PARAMS_KEY: string | ||
export const DEFAULT_COOKIE_KEY: string | ||
export const SWITCH_LOCALE_PATH_LINK_IDENTIFIER: string | ||
} | ||
|
||
declare module '#internal/i18n/options.mjs' { | ||
import type { DeepRequired } from 'ts-essentials' | ||
|
||
type VueI18nConfig = import('./dist/types').VueI18nConfig | ||
type NuxtI18nOptions = import('./dist/types').NuxtI18nOptions | ||
type LocaleObject = import('./dist/types').LocaleObject | ||
|
||
/** | ||
* stub type definition for @nuxtjs/i18n internally | ||
*/ | ||
|
||
type LocaleLoader = { | ||
key: string | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
load: () => Promise<any> | ||
cache: boolean | ||
} | ||
|
||
export const localeLoaders: Record<string, LocaleLoader[]> | ||
|
||
export const vueI18nConfigs: VueI18nConfig[] | ||
|
||
export const localeCodes: string[] | ||
export const nuxtI18nOptions: DeepRequired<NuxtI18nOptions<Context>> | ||
export const normalizedLocales: LocaleObject[] | ||
export const isSSG = false | ||
export const parallelPlugin: boolean | ||
|
||
export const NUXT_I18N_MODULE_ID = '' | ||
export const DEFAULT_DYNAMIC_PARAMS_KEY: string | ||
export const DEFAULT_COOKIE_KEY: string | ||
export const SWITCH_LOCALE_PATH_LINK_IDENTIFIER: string | ||
} | ||
|
||
declare module '#internal/i18n/locale.detector.mjs' { | ||
export const localeDetector: import('./dist/runtime/composables/server').LocaleDetector | ||
} | ||
|
||
declare module 'virtual:nuxt-i18n-logger' { | ||
import type { ConsolaInstance } from 'consola' | ||
|
||
export function createLogger(label: string): ConsolaInstance | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.