MCPcopy Index your code
hub / github.com/vuejs/core / withDefaults

Function withDefaults

packages/runtime-core/src/apiSetupHelpers.ts:401–413  ·  view source on GitHub ↗
(
  props: DefineProps<T, BKeys>,
  defaults: Defaults,
)

Source from the content-addressed store, hash-verified

399 * @see {@link https://vuejs.org/guide/typescript/composition-api.html#typing-component-props}
400 */
401export function withDefaults<
402 T,
403 BKeys extends keyof T,
404 Defaults extends InferDefaults<T>,
405>(
406 props: DefineProps<T, BKeys>,
407 defaults: Defaults,
408): PropsWithDefaults<T, Defaults, BKeys> {
409 if (__DEV__) {
410 warnRuntimeUsage(`withDefaults`)
411 }
412 return null as any
413}
414
415export function useSlots(): SetupContext['slots'] {
416 return getContext('useSlots').slots

Callers 2

Calls 1

warnRuntimeUsageFunction · 0.85

Tested by

no test coverage detected