MCPcopy Index your code
hub / github.com/anomalyco/opencode / optional

Function optional

packages/schema/src/schema.ts:12–18  ·  view source on GitHub ↗
(schema: S)

Source from the content-addressed store, hash-verified

10export type AbsolutePath = typeof AbsolutePath.Type
11
12export const optional = <S extends Schema.Top>(schema: S) =>
13 Schema.optionalKey(schema).pipe(
14 Schema.decodeTo(Schema.optional(Schema.toType(schema)), {
15 decode: SchemaGetter.passthrough({ strict: false }),
16 encode: SchemaGetter.transformOptional(Option.filter((value) => value !== undefined)),
17 }),
18 )
19
20export const statics =
21 <S extends object, M extends Record<string, unknown>>(methods: (schema: S) => M) =>

Callers 15

directories.tsFile · 0.90
session.tsFile · 0.90
provider.tsFile · 0.90
auth.tsFile · 0.90
MethodClass · 0.90
vcs-event.tsFile · 0.90
credential.tsFile · 0.90
project-copy.tsFile · 0.90
location.tsFile · 0.90
InfoClass · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected