• Vue <script setup> compiler macro for providing props default values when using type-based defineProps declaration.

    Example usage:

    size?: number
    labels?: string[]
    }>(), {
    size: 3,
    labels: () => ['default label']

    This is only usable inside <script setup>, is compiled away in the output and should not be actually called at runtime.

    Type Parameters

    • T

    • BKeys extends string | number | symbol

    • Defaults extends InferDefaults<T>


    • props: DefineProps<T, BKeys>
    • defaults: Defaults

    Returns PropsWithDefaults<T, Defaults, BKeys>

Generated using TypeDoc