Skip to content

Type infer error if interface has "value" property #157

@404157386

Description

@404157386

define an interface A:

interface A {
	id:string
	...
	value:string
}

if using with toRefs

toRefs(reactive({a:<A[]>[]}))

as an export use function:

function useValue(){
	return toRefs(reactive({a:<A[]>[]}))
}
const { a } = useValue()

here, type infer is error, a is to be Ref<string[]>, not be Ref<A[]>
if A has no property value, it works ok.

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