Skip to content

extend api wrong typings #79

@climba03003

Description

@climba03003

🐛 Bug Report

After the Schema extend other Schema, some of the api will be missing.

To Reproduce

Steps to reproduce the behavior:

const Base = S.object()
  .prop('foo', S.string())

const Extend = S.object()
  .prop('bar', S.string())
  .extend(Base)
  .required(['foo', 'bar']) // missing endpoint here

Expected behavior

const Base = S.object()
  .prop('foo', S.string())

const Extend = S.object()
  .prop('bar', S.string())
  .extend(Base)
  .required(['foo', 'bar']) // without error

Your Environment

  • node version: 14
  • fastify version: >=2.0.0
  • os: Linux
  • any other relevant information

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