Skip to content

Commit a538e8d

Browse files
committed
Add missing apispec property for routes
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.
1 parent 192443f commit a538e8d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

library/agent/api/Event.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { APISpec } from "../api-discovery/getApiInfo";
12
import { Kind } from "../Attack";
23
import { Source } from "../Source";
34

@@ -117,6 +118,7 @@ type Heartbeat = {
117118
method: string;
118119
hits: number;
119120
graphql?: { type: "query" | "mutation"; name: string };
121+
apispec: APISpec;
120122
}[];
121123
users: {
122124
id: string;

0 commit comments

Comments
 (0)