Skip to content

feat: enhanced request object typing #122

feat: enhanced request object typing

feat: enhanced request object typing #122

Triggered via pull request May 26, 2024 15:29
Status Failure
Total duration 26s
Artifacts

ci.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

3 errors
test/request-body.test-d.ts > Given an OpenAPI schema endpoint with request content > When a request is expected to contain content, Then the content is strict-typed: test/request-body.test-d.ts#L14
TypeCheckError: Type 'StrictRequest<{ name string; value number; }>' does not satisfy the constraint '{ headers { get (name string) => string | null; delete (name string) => void; forEach (callbackfn (value string, key string, parent Headers) => void, thisArg? any) => void; has (name string) => boolean; set (name string, value string) => void; append (name string, value string) => void; getSetCook...'. Types of property 'text' are incompatible. Type '() => Promise<string>' is not assignable to type '"Expected function, Actual never"'. ❯ test/request-body.test-d.ts:14:27
test/request-body.test-d.ts > Given an OpenAPI schema endpoint with request content > When a request is not expected to contain content, Then the content is undefined: test/request-body.test-d.ts#L32
TypeCheckError: Type 'StrictRequest<undefined>' does not satisfy the constraint '{ headers { get (name string) => string | null; delete (name string) => void; forEach (callbackfn (value string, key string, parent Headers) => void, thisArg? any) => void; has (name string) => boolean; set (name string, value string) => void; append (name string, value string) => void; getSetCook...'. Types of property 'json' are incompatible. Type '() => Promise<undefined>' is not assignable to type '"Expected function, Actual never"'. ❯ test/request-body.test-d.ts:32:27
build
Process completed with exit code 1.