You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Strip optional/default type-level attributes on .required() #1160
// https://github.com/arktypeio/arktype/issues/1156it("with default",()=>{constt=type({foo: "string = 'bar'"}).required();constexpected=type({foo: "string",});// currently the types do not match because the default is not removedattest<typeofexpected.t,typeoft.t>();attest(t.expression).equals(expected.expression);});
Should also add cases for optionality on the value
Activity
fix(type): drop defaults from the inferred type of .required()
docs: add CHANGELOG entries for #1445 and #1160
docs(repo): mark #1445 and #1160 fixed in issueAudit.md
ssalbdivad commentedon Nov 18, 2026
Fixed in 3.0.0-beta.0 (#1728). Try it with
npm i arktype@next.