MCPcopy Create free account
hub / github.com/arktypeio/arktype / isUnsureRead

Function isUnsureRead

ark/aot/graph.ts:6376–6387  ·  view source on GitHub ↗
(
	read: unknown,
	kind: KindBits,
	lacked: ReadonlySet<string>
)

Source from the content-addressed store, hash-verified

6374// build has no source for, like `res.json`, only what composes a Type or a
6375// build drops is read
6376const isUnsureRead = (
6377 read: unknown,
6378 kind: KindBits,
6379 lacked: ReadonlySet<string>
6380): boolean =>
6381 typeof read === "string" &&
6382 isUnavailableTypeMember(read, lacked) &&
6383 (kind & kinds.type ? !isOnlyType(kind)
6384 : kind & kinds.unknown ? !isContainerMethod(read)
6385 : !!(kind & kinds.opaque) &&
6386 !isContainerMethod(read) &&
6387 !includes(introspectionMembers, read))
6388
6389// e.g. `in`, which reads a Type off any Type
6390export const isTypeOnlyMember = (name: PropertyKey): boolean =>

Callers 1

unavailableReadOfMethod · 0.85

Calls 4

includesFunction · 0.90
isUnavailableTypeMemberFunction · 0.85
isOnlyTypeFunction · 0.85
isContainerMethodFunction · 0.85

Tested by

no test coverage detected