Skip to content

Instantly share code, notes, and snippets.

@colinhacks
Last active April 5, 2025 23:40
Show Gist options
  • Save colinhacks/5d9ab8a86709e9942981d9c10ccb211e to your computer and use it in GitHub Desktop.
Save colinhacks/5d9ab8a86709e9942981d9c10ccb211e to your computer and use it in GitHub Desktop.

Revisions

  1. colinhacks revised this gist Apr 5, 2025. 1 changed file with 0 additions and 48 deletions.
    48 changes: 0 additions & 48 deletions index.ts
    Original file line number Diff line number Diff line change
    @@ -100,52 +100,4 @@ export const q = p.extend({
    a: z.string(),
    b: z.string(),
    c: z.string(),
    });

    export const r = q.omit({
    a: true,
    b: true,
    c: true,
    });

    export const s = r.extend({
    a: z.string(),
    b: z.string(),
    c: z.string(),
    });

    export const t = s.omit({
    a: true,
    b: true,
    c: true,
    });

    export const u = t.extend({
    a: z.string(),
    b: z.string(),
    c: z.string(),
    });

    export const v = u.omit({
    a: true,
    b: true,
    c: true,
    });

    export const w = v.extend({
    a: z.string(),
    b: z.string(),
    c: z.string(),
    });

    export const x = w.omit({
    a: true,
    b: true,
    c: true,
    });

    export const y = x.extend({
    a: z.string(),
    b: z.string(),
    c: z.string(),
    });
  2. colinhacks created this gist Apr 5, 2025.
    151 changes: 151 additions & 0 deletions index.ts
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,151 @@
    import * as z from "zod";

    export const a = z.object({
    a: z.string(),
    b: z.string(),
    c: z.string(),
    });

    export const b = a.omit({
    a: true,
    b: true,
    c: true,
    });

    export const c = b.extend({
    a: z.string(),
    b: z.string(),
    c: z.string(),
    });

    export const d = c.omit({
    a: true,
    b: true,
    c: true,
    });

    export const e = d.extend({
    a: z.string(),
    b: z.string(),
    c: z.string(),
    });

    export const f = e.omit({
    a: true,
    b: true,
    c: true,
    });

    export const g = f.extend({
    a: z.string(),
    b: z.string(),
    c: z.string(),
    });

    export const h = g.omit({
    a: true,
    b: true,
    c: true,
    });

    export const i = h.extend({
    a: z.string(),
    b: z.string(),
    c: z.string(),
    });

    export const j = i.omit({
    a: true,
    b: true,
    c: true,
    });

    export const k = j.extend({
    a: z.string(),
    b: z.string(),
    c: z.string(),
    });

    export const l = k.omit({
    a: true,
    b: true,
    c: true,
    });

    export const m = l.extend({
    a: z.string(),
    b: z.string(),
    c: z.string(),
    });

    export const n = m.omit({
    a: true,
    b: true,
    c: true,
    });

    export const o = n.extend({
    a: z.string(),
    b: z.string(),
    c: z.string(),
    });

    export const p = o.omit({
    a: true,
    b: true,
    c: true,
    });

    export const q = p.extend({
    a: z.string(),
    b: z.string(),
    c: z.string(),
    });

    export const r = q.omit({
    a: true,
    b: true,
    c: true,
    });

    export const s = r.extend({
    a: z.string(),
    b: z.string(),
    c: z.string(),
    });

    export const t = s.omit({
    a: true,
    b: true,
    c: true,
    });

    export const u = t.extend({
    a: z.string(),
    b: z.string(),
    c: z.string(),
    });

    export const v = u.omit({
    a: true,
    b: true,
    c: true,
    });

    export const w = v.extend({
    a: z.string(),
    b: z.string(),
    c: z.string(),
    });

    export const x = w.omit({
    a: true,
    b: true,
    c: true,
    });

    export const y = x.extend({
    a: z.string(),
    b: z.string(),
    c: z.string(),
    });