-
Couldn't load subscription status.
- Fork 205
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Environment
- Operating System: Windows_NT
- Node Version: v23.9.0
- Nuxt Version: 3.14.1592
- CLI Version: 3.16.0
- Nitro Version: 2.10.4
- Package Manager: [email protected]
Reproduction
import { useLogger } from '@nuxt/kit'
import type { ConsolaInstance } from 'consola/core'
export const logger: ConsolaInstance = useLogger('nuxt:storybook')
Describe the bug
The above code yields
src/logger.ts(7,14): error TS2719: Type 'import("D:/Programming/nuxt-storybook/node_modules/.pnpm/[email protected]/node_modules/cons…
│ Type 'ConsolaInstance' is not assignable to type 'Consola'.
│ The types of 'options.reporters' are incompatible between these types.
│ Type 'import("D:/Programming/nuxt-storybook/node_modules/.pnpm/[email protected]/node_modules/consola/dist/core").ConsolaReport…
│ Type 'import("D:/Programming/nuxt-storybook/node_modules/.pnpm/[email protected]/node_modules/consola/dist/core").ConsolaRepo…
│ Types of property 'log' are incompatible.
│ Type '(logObj: import("D:/Programming/nuxt-storybook/node_modules/.pnpm/[email protected]/node_modules/consola/dist/core"…
│ Types of parameters 'ctx' and 'ctx' are incompatible.
│ Type '{ options: import("D:/Programming/nuxt-storybook/node_modules/.pnpm/[email protected]/node_modules/consola/dist…
│ The types of 'options.prompt' are incompatible between these types.
│ Type '(<_ = any, __ = any, T extends PromptOptions = import("D:/Programming/nuxt-storybook/node_modules/.pnpm…
│ Type '<_ = any, __ = any, T extends PromptOptions = import("D:/Programming/nuxt-storybook/node_modules/.pnp…
│ Type 'Promise<inferPromptReturnType<T> | inferPromptCancalReturnType<T>>' is not assignable to type 'Prom…
│ Type 'inferPromptReturnType<T> | inferPromptCancalReturnType<T>' is not assignable to type 'inferPrompt…
│ Type 'inferPromptCancalReturnType<T>' is not assignable to type 'inferPromptReturnType<T> | inferProm…
│ Type 'string | boolean | SelectOption | (string | SelectOption)[] | unique symbol | null | undefine…
│ Type 'undefined' is not assignable to type 'inferPromptReturnType<T> | inferPromptCancalReturnTyp…
while using import type { ConsolaInstance } from 'consola' (without /core) works perfectly fine.
Additional context
Context:
nuxt-modules/storybook#880
nuxt-modules/storybook#870 (comment)
nuxt-modules/tailwindcss#972
Logs
danielroe
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working