Skip to content

Typescript not recognize .ts file and commons instance on template. #28761

@mrc-bsllt

Description

@mrc-bsllt

Environment


  • Operating System: Darwin
  • Node Version: v22.3.0
  • Nuxt Version: 3.13.0
  • CLI Version: 3.13.1
  • Nitro Version: 2.9.7
  • Package Manager: yarn@1.22.22
  • Builder: -
  • User Config: devtools, app, runtimeConfig, css, modules, i18n, primevue, image, nuxt-jsonld, mapbox, compatibilityDate
  • Runtime Modules: @nuxt/eslint@0.4.0, @nuxtjs/tailwindcss@6.12.1, @nuxtjs/i18n@8.5.1, @primevue/nuxt-module@4.0.3, @nuxt/image@1.8.0, @nuxtjs/strapi@1.12.0, nuxt-icons@3.2.1, @pinia/nuxt@0.5.4, nuxt-jsonld@2.0.8, nuxt-mapbox@1.6.0
  • Build Modules: -

Reproduction

I can't reproduce it

Describe the bug

Typescript throws me an error in common inline instances within the template, such as $route or $t (nuxtI18n).
Example $route:
template route
Example $t:
template t

I also noticed that within the setup script, when I try, for example, to do an import of an interface that is in a .ts file, it does not recognise it, and tells me that all the files are in .js format.
import

I cannot reproduce the problem, does anyone have an idea what the problem might be?
Thanks

Additional context

No response

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions