Skip to content

can I convert textContent to number? #165

@ericandrewscott

Description

@ericandrewscott

In a lot of our components, specifically those like numeric input or step input, we have a text layer that we want to grab and convert to a number, but {"0"} from a text node's content is not the same as {0}. Typescript of course yells at me, as that's not what the component expects. Is there a way to do any soft conversion in the props to get around this?

  • Code Connect CLI version 1.1.3
  • OSX Operating system

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions