arktype icon indicating copy to clipboard operation
arktype copied to clipboard

Investigate symbols for metadata

Open ssalbdivad opened this issue 1 year ago • 2 comments

E.g. could be used as a way to indicate that the keys of an object are exact inline:

import { exact } from "arktype";

const t = type({
  [exact]: "true",
});

ssalbdivad avatar Jun 17 '23 18:06 ssalbdivad

Instead of using the separate metadata object?

thetayloredman avatar Aug 01 '23 22:08 thetayloredman

It would be an alternate syntax for adding metadata to object types. There would still be a standard tuple expression/chained syntax as well.

ssalbdivad avatar Aug 01 '23 22:08 ssalbdivad