Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 476 Bytes

to-maybe-ref-or-getters.md

File metadata and controls

22 lines (16 loc) · 476 Bytes
category
Reactive

ToMaybeRefOrGetters

Mark the object's property type as MaybeRefOrGetters.

Usage

import type { ToMaybeRefOrGetters } from "@utype/vue";

type Prop = {
  name: string;
  age: number;
};
// Expect: { name: MaybeRefOrGetters<string>; age: MaybeRefOrGetters<number>; } // [!code highlight]
type MyProp = ToMaybeRefOrGetters<Prop>;