Skip to content

Add missing apispec property type for routes#613

Merged
hansott merged 1 commit intomainfrom
missing-type
May 19, 2025
Merged

Add missing apispec property type for routes#613
hansott merged 1 commit intomainfrom
missing-type

Conversation

@hansott
Copy link
Member

@hansott hansott commented May 19, 2025

Additional properties don't throw errors in TypeScript, if the type shape matches, it's fine for TypeScript.

There's a proposal for exact types: microsoft/TypeScript#12936

Some people suggested this utility type:

type Exact<A, B> = A extends B ? (B extends A ? A : never) : never;

But I find it a bit cumbersome: Exact<Event, Event>

So I left it out.

Additional properties don't throw errors in TypeScript, if the type
shape matches, it's fine for TypeScript.

There's a proposal for exact types: microsoft/TypeScript#12936

Some people suggested this utility type:

```ts
type Exact<A, B> = A extends B ? (B extends A ? A : never) : never;
```

But I find it a bit cumbersome: `Exact<Event, Event>`

So I left it out.
@hansott hansott changed the title Add missing apispec property for routes Add missing apispec property type for routes May 19, 2025
@hansott hansott merged commit 0d31cd9 into main May 19, 2025
13 checks passed
@hansott hansott deleted the missing-type branch May 19, 2025 14:46
@codecov
Copy link

codecov bot commented May 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants