Skip to content

Incorrect Optional (Patch?) results on types which look like Error #338

@koloboid

Description

@koloboid

🐞 Bug Report

Describe the bug

Incorrect Optional (Patch?) results on types which look like Error

Reproduce the bug

type A = O.Optional<{ name: string; message: string }, 'some'>;

Expected behavior

A should be like

{ name: string; message: string }

Actual behavior

A is an empty object - {}

Possible Solution

I think it's related to ignoring built-in types in PatchFlat. But I have no competence in toolbelt's internals.

@millsp and co-authors: so many thanks to you for this kit! Everyday tool for years!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions