import { Ref } from 'vue'; /** * Module for general types only, not module-specific ones */ export type Absence = undefined | null; export type Nothing = Absence | void; export type Value = boolean | string | number; export type Thing = Value | object | ObjectType | Record | symbol; export type Any = Nothing | Thing; export type Property = string | number | symbol; export type Json = string | number | boolean | { [x: string]: Json | null; } | Array; export type ObjectType = { [key: Property]: Any; }; export type Comparable = { [key: Property]: Exclude; }; export type Index = string | number | symbol; export type Indexable = ObjectType | Array | Record; export type ValueOf = T[keyof T]; export type UnionOf> = T[number]; export type Runner = () => void; export type WatchedRunner = Runner & { running?: Ref; }; export type Callback = () => T; export type AsyncCallback = () => Promise; export type Handler = (o: T) => Any; export type Filter = (o: T) => boolean; export type Sorter = (a: T, b: T) => number; export type Mapper = (i: I) => O; export type Getter = () => T | Absence; export type Setter = (o: T) => Any; export type Valuer = (o: T) => Value;