MCPcopy Index your code
hub / github.com/Effect-TS/effect / f2

Function f2

packages/effect/dtslint/Schema/Generic.tst.ts:27–36  ·  view source on GitHub ↗
(schema: Schema.Schema<T>)

Source from the content-addressed store, hash-verified

25type Model = { id: string } & Record<string, unknown>
26
27export const f2 = <T extends Model>(schema: Schema.Schema<T>) => {
28 type Patch = Pick<T, "id"> & Partial<Omit<T, "id">>
29
30 const patch: Schema.Schema<Patch> = schema.pipe(
31 Schema.pick("id"),
32 Schema.extend(schema.pipe(Schema.omit("id"), Schema.partial))
33 )
34
35 return patch
36}

Callers

nothing calls this directly

Calls 3

pipeMethod · 0.65
pickMethod · 0.65
omitMethod · 0.65

Tested by

no test coverage detected