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

Function objectDomainOf

ark/type/parser/objectLiteral.ts:188–195  ·  view source on GitHub ↗
($: BaseScope)

Source from the content-addressed store, hash-verified

186const objectDomains = new WeakMap<BaseScope, Domain.Node>()
187
188const objectDomainOf = ($: BaseScope): Domain.Node => {
189 let domain = objectDomains.get($)
190 if (!domain) {
191 domain = $.node("domain", { domain: "object" })
192 objectDomains.set($, domain)
193 }
194 return domain
195}
196
197const appendNamedProp = <kind extends Prop.Kind>(
198 structure: MutableStructureSchema,

Callers 1

parseObjectLiteralFunction · 0.85

Calls 3

nodeMethod · 0.80
getMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected