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

Method at

ark/type/match.ts:498–503  ·  view source on GitHub ↗
(key: Key, cases?: InternalCases)

Source from the content-addressed store, hash-verified

496 }
497
498 at(key: Key, cases?: InternalCases): InternalChainedMatchParser | Match {
499 if (this.key !== undefined) throwParseError(doubleAtMessage)
500 if (this.branches.length) throwParseError(chainedAtMessage)
501 this.key = key
502 return cases ? this.match(cases) : this
503 }
504
505 case(def: unknown, resolver: Morph): InternalChainedMatchParser {
506 return this.caseEntry(this.$.parse(def), resolver)

Callers

nothing calls this directly

Calls 2

matchMethod · 0.95
throwParseErrorFunction · 0.90

Tested by

no test coverage detected