Skip to content

Union types aren't unwrapped #3990

Closed
@jods4

Description

@jods4

Version

3.1.1

Reproduction link

https://github.com/jods4/volar-starter/tree/issue-260

Steps to reproduce

Expose a ComputedRef<number> | undefined to a template.
Look a the type of that variable in template (e.g. with Volar)

What is expected?

The variable should be typed as number | undefined because of automatic unwrapping.

What is actually happening?

It's still ComputedRef<number> | number


See original issue at vuejs/language-tools#260 for full context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions