Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

incorrect type generation #355

Open
rrd108 opened this issue Sep 11, 2024 · 0 comments
Open

incorrect type generation #355

rrd108 opened this issue Sep 11, 2024 · 0 comments

Comments

@rrd108
Copy link

rrd108 commented Sep 11, 2024

What happens?

My module.ts

import type { LogEntry } from "./runtime/server/types/LogEntry";

export interface ModuleOptions {
  delayOnBan: boolean;
  log: false | LogEntry;
}

export default defineNuxtModule<ModuleOptions>({
  meta: {
    name: "nuxt-api-shield",
    configKey: "nuxtApiShield",
  },
  defaults: {
    delayOnBan: true,
    log: false,
  },

After running yarn dev:prepare I get the following in .nuxt/types/schema.d.ts

interface PublicRuntimeConfig {
   nuxtApiShield: {
      delayOnBan: boolean,
      log: boolean,
   },
  }

What is expected?

log type should be false | LogEntry

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant