···11# typed-lexicon
2233> [!WARNING]
44-> this project is in the middle of active initial development and not ready for use. there will be updates posted [here](https://bsky.app/profile/tylur.dev) if you'd like to follow along!
44+> this project is in the middle of active initial development and not ready for use. there will be updates posted [here](https://bsky.app/profile/tylur.dev) if you'd like to follow along! or checkout the [todo.md](./todo.md)
5566this will be a toolkit for writing lexicon json schema's in typescript and providing types for lexicon data shape. it will:
77···1010- infer the typescript type definitions for the data shape to avoid duplication and skew
1111- methods and a cli for generating json
12121313-With each of the above finished, i'll plan to write a `validate` method that will be published alongside this that takes any lexicon json definition and validates payloads off that.
1313+With each of the above finished, i'll plan to write a `validate` method that will be published alongside this that takes any lexicon json definition and validates payloads off that.
14141515My working hypothesis: it will be easier to write lexicons in typescript with a single api, then validate based off the json definition, than it would be to start with validation library types (standard-schema style) and attempt to use those as the authoring and validation tools.
1616
lib.ts
src/lib.ts
+1-1
tests/base-case.test.ts
···11import { assertEquals } from "@std/assert";
22-import { lx } from "../lib.ts";
22+import { lx } from "../src/lib.ts";
3344Deno.test("app.bsky.actor.profile", () => {
55 const profileNamespace = lx.namespace("app.bsky.actor.profile", {