Skip to content

is.const() and assert.const() #213

Open
@mfulton26

Description

@mfulton26

Maybe it is already here under a different name but I want to assert that a value is a specific value (strict equals).

e.g.

// formula.type is "number" | "string"
assert.const(formula.type, "number");
// formula.type is now narrowed down to "number"

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