Skip to content

Use Zod for validation and parsing #6

Use Zod for validation and parsing

Use Zod for validation and parsing #6

Triggered via pull request October 2, 2024 14:55
Status Failure
Total duration 33s
Artifacts

main.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

10 errors
build: src/client/index.ts#L23
Type '{ params: { progressToken: string | number; progress: number; total?: number | undefined; }; method: "notifications/progress"; } | { method: "notifications/resources/list_changed"; params?: objectOutputType<...> | undefined; } | { ...; } | { ...; } | { ...; }' does not satisfy the constraint 'ZodObject<{ method: ZodString; params: ZodOptional<ZodObject<{ _meta: ZodOptional<ZodObject<{}, "passthrough", ZodTypeAny, objectOutputType<{}, ZodTypeAny, "passthrough">, objectInputType<...>>>; }, "passthrough", ZodTypeAny, objectOutputType<...>, objectInputType<...>>>; }, "strip", ZodTypeAny, { ...; }, { ...; }> ...'.
build: src/client/index.ts#L42
Expected 2-3 arguments, but got 1.
build: src/server/index.ts#L23
Type '{ method: "notifications/initialized"; params?: objectOutputType<{ _meta: ZodOptional<ZodObject<{}, "passthrough", ZodTypeAny, objectOutputType<{}, ZodTypeAny, "passthrough">, objectInputType<...>>>; }, ZodTypeAny, "passthrough"> | undefined; } | { ...; }' does not satisfy the constraint 'ZodObject<{ method: ZodString; params: ZodOptional<ZodObject<{ _meta: ZodOptional<ZodObject<{}, "passthrough", ZodTypeAny, objectOutputType<{}, ZodTypeAny, "passthrough">, objectInputType<...>>>; }, "passthrough", ZodTypeAny, objectOutputType<...>, objectInputType<...>>>; }, "strip", ZodTypeAny, { ...; }, { ...; }> ...'.
build: src/server/index.ts#L43
Argument of type 'string' is not assignable to parameter of type '{ params: { protocolVersion: number; capabilities: { experimental?: objectOutputType<{}, ZodTypeAny, "passthrough"> | undefined; sampling?: objectOutputType<{}, ZodTypeAny, "passthrough"> | undefined; }; clientInfo: { ...; }; }; method: "initialize"; } | ... 10 more ... | { ...; }'.
build: src/server/index.ts#L46
Argument of type 'string' is not assignable to parameter of type '{ method: "notifications/initialized"; params?: objectOutputType<{ _meta: ZodOptional<ZodObject<{}, "passthrough", ZodTypeAny, objectOutputType<{}, ZodTypeAny, "passthrough">, objectInputType<...>>>; }, ZodTypeAny, "passthrough"> | undefined; } | { ...; }'.
build: src/shared/protocol.ts#L37
Required type parameters may not follow optional type parameters.
build: src/shared/protocol.ts#L39
Required type parameters may not follow optional type parameters.
build: src/shared/protocol.ts#L40
Required type parameters may not follow optional type parameters.
build: src/shared/protocol.ts#L41
Required type parameters may not follow optional type parameters.
build: src/shared/protocol.ts#L42
Required type parameters may not follow optional type parameters.