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

Support nodenext #1056

Merged
merged 1 commit into from
Dec 13, 2023
Merged

Conversation

jonnydgreen
Copy link
Contributor

Closes: #1047

  • I have taken the code as is (to de-risk) and just moved the root level types into the declared namespace, other key bits are detailed as follows:
type Mercurius = typeof mercurius

declare namespace mercurius {
  // ...
  
  export const mercurius: Mercurius
  export { mercurius as default }
}

declare module "fastify" {
  // ...
}

declare function mercurius
  (
    instance: FastifyInstance,
    opts: mercurius.MercuriusOptions
  ): void;

export = mercurius;

@jonnydgreen jonnydgreen self-assigned this Nov 26, 2023
@jonnydgreen
Copy link
Contributor Author

Opening an early PR to get your initial thoughts! Essentially, it's just a lift and shift - but keen to get feedback :)

Copy link
Collaborator

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, this should be good to go

@jonnydgreen jonnydgreen marked this pull request as ready for review November 27, 2023 20:25
@jonnydgreen
Copy link
Contributor Author

Cool - thanks! Just ran some final testing and all good to go :)

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

Successfully merging this pull request may close these issues.

Types issue with Typescript module resolution node16
2 participants