INNER CODE UNIT · TypeScript

genId

mohammed-bahumaish/prisma-editor · src/hooks/use-toast.ts:27

function genId() {
  count = (count + 1) % Number.MAX_VALUE;
  return count.toString();
}

type ActionType = typeof actionTypes;

type Action =
  | {
      type: ActionType["ADD_TOAST"];
      toast: ToasterToast;
    }
  | {
      type: ActionType["UPDATE_TOAST"];
      toast: Partial<ToasterToast>;
    }
  | {
      type: ActionType["DISMISS_TOAST"];

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…