Skip to content

fix infer to be a close match of what's simplified from the json given #20

fix infer to be a close match of what's simplified from the json given

fix infer to be a close match of what's simplified from the json given #20

Triggered via pull request October 14, 2025 07:13
Status Failure
Total duration 27s
Artifacts

ci.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

23 errors
Benchmark Types
Process completed with exit code 1.
Type Check
Process completed with exit code 2.
Type Check: tests/primitives.test.ts#L619
Type '{ type: "object"; properties: { uri: { type: "string"; }; cid: { type: "string"; }; }; required: ["cid", "uri"]; }' is not assignable to type 'ObjectResult<ObjectProperties, never, never>'.
Type Check: tests/primitives.test.ts#L567
Type '{ type: "object"; properties: { uri: { type: "string"; }; cid: { type: "string"; }; }; required: ["cid", "uri"]; }' is not assignable to type 'ObjectResult<ObjectProperties, never, never>'.
Type Check: tests/primitives.test.ts#L464
Type '{ type: "object"; properties: { cursor: { type: "string"; format?: "at-identifier" | "at-uri" | "cid" | "datetime" | "did" | "handle" | "nsid" | "tid" | "record-key" | "uri" | "language" | undefined; ... 7 more ...; const?: string | undefined; }; hitsTotal: { ...; }; posts: { ...; }; }; required: [...]; }' is not assignable to type 'ObjectResult<ObjectProperties, never, never>'.
Type Check: tests/primitives.test.ts#L415
Type '{ type: "object"; properties: { posts: { type: "array"; items: LexiconItemCommonOptions & { type: "ref"; ref: "app.bsky.feed.defs#postView"; }; }; cursor: { type: "string"; ... 8 more ...; const?: string | undefined; }; }; required: [...]; }' is not assignable to type 'ObjectResult<ObjectProperties, never, never>'.
Type Check: tests/infer.test.ts#L602
Argument of type '{ type: "object"; properties: { id: { type: "string"; }; name: { type: "string"; }; }; required: ["name", "id"]; }' is not assignable to parameter of type 'LexiconItem'.
Type Check: src/lib.ts#L516
Property 'nullable' does not exist on type 'ObjectResult<T, RequiredKeys<T>, NullableKeys<T>>'.
Type Check: src/lib.ts#L513
Property 'required' does not exist on type 'ObjectResult<T, RequiredKeys<T>, NullableKeys<T>>'.
Type Check: src/lib.ts#L508
Type '{ type: "object"; properties: T; }' is not assignable to type 'ObjectResult<T, RequiredKeys<T>, NullableKeys<T>>'.
Prettier
Process completed with exit code 1.
Lint
Process completed with exit code 1.
Lint: src/lib.ts#L3
'GetRequired' is defined but never used
Lint: src/lib.ts#L3
'GetNullable' is defined but never used
Test
Process completed with exit code 1.
tests/infer.test.ts > InferObject handles complex nested structure: tests/infer.test.ts#L676
AssertionError: Expected values to be strictly equal: + actual - expected '{\n' + ' main: {\n' + + ' id?: string | undefined\n' + - ' author?: {\n' + - ' avatar?: string | undefined\n' + - ' did: string\n' + - ' handle: string\n' + - ' } | undefined\n' + - ' content?: {\n' + - ' $type: "com.example.text"\n' + - ' [key: string]: unknown\n' + - ' } | {\n' + - ' $type: "com.example.image"\n' + - ' [key: string]: unknown\n' + - ' } | undefined\n' + ' tags?: string[] | undefined\n' + + ' content?:\n' + + ' | {\n' + + ' [key: string]: unknown\n' + + ' $type: "com.example.text"\n' + + ' }\n' + + ' | {\n' + + ' [key: string]: unknown\n' + + ' $type: "com.example.image"\n' + + ' }\n' + + ' | undefined\n' + + ' author?:\n' + + ' | {\n' + + ' avatar?: string | undefined\n' + + ' did: string\n' + + ' handle: string\n' + + ' }\n' + + ' | undefined\n' + + ' metadata?:\n' + + ' | {\n' + + ' likes?: number | undefined\n' + + ' views?: number | undefined\n' + + ' shares?: number | undefined\n' + + ' }\n' + + ' | undefined\n' + - ' metadata?: {\n' + - ' views?: number | undefined\n' + - ' likes?: number | undefined\n' + - ' shares?: number | undefined\n' + - ' } | undefined\n' + - ' id: string\n' + ' }\n' + '}' - Expected + Received { main: { - author?: { - avatar?: string | undefined + id?: string | undefined - did: string - handle: string - } | undefined + tags?: string[] | undefined - content?: { - $type: "com.example.text" + content?: + | { + [key: string]: unknown + $type: "com.example.text" - [key: string]: unknown + } + | { + [key: string]: unknown - } | { - $type: "com.example.image" + $type: "com.example.image" - [key: string]: unknown - } | undefined + } + | undefined + author?: + | { + avatar?: string | undefined - tags?: string[] | undefined + did: string + handle: string + } + | undefined - metadata?: { + metadata?: + | { - views?: number | undefined + likes?: number | undefined - likes?: number | undefined + views?: number | undefined - shares?: number | undefined + shares?: number | undefined - } | undefined - id: string + } + | undefined } } ❯ tests/infer.test.ts:676:2
tests/infer.test.ts > InferArray handles arrays of objects: tests/infer.test.ts#L610
AssertionError: Expected values to be strictly equal: + actual - expected + '{ main: { users?: never[] | undefined } }' - '{\n' + - ' main: {\n' + - ' users?: {\n' + - ' id: string\n' + - ' name: string\n' + - ' }[] | undefined\n' + - ' }\n' + - '}' - Expected + Received - { - main: { - users?: { - id: string - name: string - }[] | undefined - } - } + { main: { users?: never[] | undefined } } ❯ tests/infer.test.ts:610:2
tests/infer.test.ts > InferParams handles required params: tests/infer.test.ts#L514
AssertionError: Expected values to be strictly equal: + actual - expected + '{ main: {} }' - '{\n main: {\n limit?: number | undefined\n query: string\n }\n}' - Expected + Received - { - main: { - limit?: number | undefined - query: string - } - } + { main: {} } ❯ tests/infer.test.ts:514:2
tests/infer.test.ts > InferParams handles basic params: tests/infer.test.ts#L498
AssertionError: Expected values to be strictly equal: + actual - expected + '{ main: {} }' - '{\n' + - ' main: {\n' + - ' limit?: number | undefined\n' + - ' offset?: number | undefined\n' + - ' }\n' + - '}' - Expected + Received - { - main: { - limit?: number | undefined - offset?: number | undefined - } - } + { main: {} } ❯ tests/infer.test.ts:498:2
tests/infer.test.ts > InferObject handles mixed nullable, required, and optional: tests/infer.test.ts#L328
AssertionError: Expected values to be strictly equal: + actual - expected '{\n' + ' main: {\n' + + ' required?: string | undefined\n' + - ' optionalNullable?: string | null | undefined\n' + ' optional?: string | undefined\n' + + ' requiredNullable?: string | undefined\n' + + ' optionalNullable?: string | undefined\n' + - ' required: string\n' + - ' requiredNullable: string | null\n' + ' }\n' + '}' - Expected + Received { main: { - optionalNullable?: string | null | undefined + required?: string | undefined optional?: string | undefined - required: string - requiredNullable: string | null + requiredNullable?: string | undefined + optionalNullable?: string | undefined } } ❯ tests/infer.test.ts:328:2
tests/infer.test.ts > InferObject handles nullable and required field: tests/infer.test.ts#L313
AssertionError: Expected values to be strictly equal: + actual - expected + '{ main: { value: string } }' - '{ main: { value: string | null } }' ^ Expected: "{ main: { value: string | null } }" Received: "{ main: { value: string } }" ❯ tests/infer.test.ts:313:2
tests/infer.test.ts > InferObject handles multiple nullable fields: tests/infer.test.ts#L297
AssertionError: Expected values to be strictly equal: + actual - expected '{\n' + ' main: {\n' + + ' field1?: string | undefined\n' + + ' field2?: number | undefined\n' + + ' field3?: boolean | undefined\n' + - ' field1?: string | null | undefined\n' + - ' field2?: number | null | undefined\n' + - ' field3?: boolean | null | undefined\n' + ' }\n' + '}' - Expected + Received { main: { - field1?: string | null | undefined + field1?: string | undefined - field2?: number | null | undefined + field2?: number | undefined - field3?: boolean | null | undefined + field3?: boolean | undefined } } ❯ tests/infer.test.ts:297:2
tests/infer.test.ts > InferObject handles nullable optional field: tests/infer.test.ts#L283
AssertionError: Expected values to be strictly equal: + actual - expected + '{ main: { description?: string | undefined } }' - '{ main: { description?: string | null | undefined } }' Expected: "{ main: { description?: string | null | undefined } }" Received: "{ main: { description?: string | undefined } }" ❯ tests/infer.test.ts:283:2