Skip to content

Add TypeFactory feature to the readme #62

@JoseLion

Description

@JoseLion

One of the features that makes assertive-ts different is the TypeFactory feature. We should highlight this on the README.md and add some examples in the Usage section. Code examples will also make visible the exported TypeFactories object which provides some basic factories.

Additionally, we should explain what to do when the expected value is of type any. Because of the function overload, we hit a TypeScript limitation, and the first overload matches (because any does extend from the first overload's type). The best approach for these cases is to use the .asType(TypeFactory) method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or requestreleased

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions