Skip to content

TS2345 type error when passing undefined to a HTML prop/attribute #6

Description

@btakita
import van from 'mini-van-plate'
const { a }  = van.tags
a({ id: undefined })

results in a TS2345 error

TS2345: Argument of type  { id:undefined; }  is not assignable to parameter of type  ChildDom<Element, Text>|Props 
Type  { id:undefined; }  is not assignable to type  undefined

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions