WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

[v2.0.0] InstanceType<typeof NuxtImg> no longer works #2021

@NamesMT

Description

@NamesMT

I'm using InstanceType to create a custom NuxtImg component with some default configs that still pass-through all props of NuxtImg:

type NuxtImgProps = InstanceType<typeof NuxtImg>['$props']
interface Props extends /* @vue-ignore */ NuxtImgProps {}
defineProps<Props>()

in v2.0.0, typeof NuxtImg is no longer a valid type to be passed into InstanceType

Image

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