···11-// Generated by prototypey - DO NOT EDIT
22-// Source: app.bsky.actor.defs
33-import type { Infer } from "prototypey";
44-import schema from "../../../../../samples/actor-namespace.json" with { type: "json" };
55-66-/**
77- * Type-inferred from lexicon schema: app.bsky.actor.defs
88- */
99-export type Defs = Infer<typeof schema>;
1010-1111-/**
1212- * The lexicon schema object
1313- */
1414-export const DefsSchema = schema;
1515-1616-/**
1717- * Type guard to check if a value is a Defs
1818- */
1919-export function isDefs(v: unknown): v is Defs {
2020- return (
2121- typeof v === "object" &&
2222- v !== null &&
2323- "$type" in v &&
2424- v.$type === "app.bsky.actor.defs"
2525- );
2626-}
-26
generated/inferred/app/bsky/actor/profile.ts
···11-// Generated by prototypey - DO NOT EDIT
22-// Source: app.bsky.actor.profile
33-import type { Infer } from "prototypey";
44-import schema from "../../../../../samples/profile-namespace.json" with { type: "json" };
55-66-/**
77- * Type-inferred from lexicon schema: app.bsky.actor.profile
88- */
99-export type Profile = Infer<typeof schema>;
1010-1111-/**
1212- * The lexicon schema object
1313- */
1414-export const ProfileSchema = schema;
1515-1616-/**
1717- * Type guard to check if a value is a Profile
1818- */
1919-export function isProfile(v: unknown): v is Profile {
2020- return (
2121- typeof v === "object" &&
2222- v !== null &&
2323- "$type" in v &&
2424- v.$type === "app.bsky.actor.profile"
2525- );
2626-}
-23
generated/test-generated-types.ts
···11-// Test file to verify generated types work correctly
22-import type { Profile } from "./inferred/app/bsky/actor/profile.js";
33-import type { Defs } from "./inferred/app/bsky/actor/defs.js";
44-import { isProfile } from "./inferred/app/bsky/actor/profile.js";
55-import { isDefs } from "./inferred/app/bsky/actor/defs.js";
66-77-// Test that the types are inferred correctly
88-const profile: Profile = {
99- $type: "app.bsky.actor.profile",
1010- displayName: "Tyler",
1111- description: "Building cool stuff",
1212-};
1313-1414-// Test type guard
1515-const unknownValue: unknown = { $type: "app.bsky.actor.defs" };
1616-if (isDefs(unknownValue)) {
1717- // Type should be narrowed to Defs
1818- const defs: Defs = unknownValue;
1919- console.log("Is Defs:", defs.$type);
2020-}
2121-2222-console.log("Types work! ✓");
2323-console.log("Profile:", profile);