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

Method requiredValue

ark/schema/structure/optional.ts:102–107  ·  view source on GitHub ↗

* its value where its key is required, which without * exactOptionalPropertyTypes drops the undefined its key allowed, as * TS's `-?` does

()

Source from the content-addressed store, hash-verified

100 * TS's `-?` does
101 */
102 get requiredValue(): BaseRoot {
103 return (this._requiredValue ??=
104 this.$.cfg.exactOptionalPropertyTypes === false ?
105 withoutUndefined(this.value)
106 : this.value)
107 }
108
109 private _outProp: Prop.Node | undefined
110 // a default replaces undefined where it's allowed, so it's not output

Callers

nothing calls this directly

Calls 1

withoutUndefinedFunction · 0.70

Tested by

no test coverage detected