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

Method intersect

ark/type/variants/base.ts:614–614  ·  view source on GitHub ↗

* #### intersect the parsed Type, returning an introspectable Disjoint if the result is unsatisfiable * * @example * import { Type } from "arktype" * * // Type<{ foo: number; bar: string }> | Disjoint * const T = type({ foo: "number" }).intersect({ bar: "string" }) * const Bad

(
		def: type.validate<def, $>
	)

Source from the content-addressed store, hash-verified

612 * if (!(Bad instanceof Type)) console.log(Bad.summary)
613 */
614 intersect<
615 const def,
616 r = instantiateType<inferIntersection<t, inferDefinition<def, $>>, $>
617 >(

Callers 15

chained.tsFile · 0.80
buildStructureArbitraryFunction · 0.80
effectiveElementFunction · 0.80
applyIndexConstraintFunction · 0.80
scanSelectiveIndexesFunction · 0.80
indexedValueOfFunction · 0.80
sequenceArbitraryForFunction · 0.80
getMorphInversesFunction · 0.80
buildMorphArbitraryFunction · 0.80
range.test.tsFile · 0.80
isDisjointFunction · 0.80
intersectFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected