Skip to content

ValidPath without const assertion?#119

Description

@asgerhallas

馃 Question

I'm new to this library, and am still trying to get my head around it. It's very impressive! :)

In this sample https://pirix-gh.github.io/ts-toolbelt/modules/_object_pathvalid_.html there's the following code:

const test0 = getAt(state,          ['case', 'name'] as const) // {c: number}

Why is const needed? And is there a way to make it work without the const assertion?

Hope you can help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionMore info is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions