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

Function isReadOnlyArg

ark/aot/graph.ts:1056–1057  ·  view source on GitHub ↗
(arg: Node, kind: KindBits)

Source from the content-addressed store, hash-verified

1054
1055// e.g. `"a"` or a Type, which a method can't call back with what it holds
1056const isReadOnlyArg = (arg: Node, kind: KindBits): boolean =>
1057 arg.type === "Literal" || arg.type === "TemplateLiteral" || isOnlyArk(kind)
1058
1059export const isOnlyType = (kind: KindBits): boolean =>
1060 (kind & (kinds.type | kinds.otherArk | kinds.data)) === kinds.type

Callers 1

mayWriteInCallbackMethod · 0.85

Calls 1

isOnlyArkFunction · 0.85

Tested by

no test coverage detected