Skip to content

fix: exclude all /_* and /api/_* routes from NitroFetchRequest type #231

Closed

Description

@didavid61202

Environment

  • Node version: 16.13.0
  • Nitro version: 0.4.4

Reproduction

git clone https://github.com/unjs/nitro.git
cd nitro
pnpm install
pnpm dev
// after .nitro folder is created, go to playground, create a `_internalRoute.ts` route.
then use $fetch in other file:
$fetch(`/** typescript should not show type hints with '/_internalRoute' */`)  

Describe the bug

type NitroFetchRequest should exclude all /_* and /api/_* routes as they are for internal use and should not show type hints/auto-complete to end users

Additional context

No response

Logs

No response

corresponding PR: #232

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions