Skip to content

Missing types for the fastifyInstance.addresses() method #4523

@Baptiste-Garcin

Description

@Baptiste-Garcin

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the bug has not already been reported

Fastify version

4.1.0

Plugin version

No response

Node.js version

18.x

Operating system

macOS

Operating system version (i.e. 20.04, 11.3, 10)

13.0

Description

The .addresses() server method is not present in the types for the fastify instance but this method is present in the documentation and in the instance.

Steps to Reproduce

Simply create a fastify instance and call .addresses()

import fastify from 'fastify';

const fastifyInstance = fastify();
const addresses = fastifyInstance.addresses();
//  Property 'addresses' does not exist on type 'FastifyInstance  & PromiseLike  >'.

The tsconfig.json I use:

{
  "compilerOptions": {
    "module": "commonjs",
    "target": "es5",
    "sourceMap": true
  },
  "exclude": [
    "node_modules"
  ]
}

Expected Behavior

The fastifyInstance.addresses() method should be in the FastifyInstance type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions