Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

345 B
Raw Blame
import type { Accessor } from 'solid-js';

/** A fixed value or a reactive accessor that returns it. */
export type MaybeAccessor<T> = T | Accessor<T>;

/** Reads a fixed value or invokes its reactive accessor. */
export function access<T>(value: MaybeAccessor<T>): T {
  return typeof value === 'function' ? (value as Accessor<T>)() : value;
}