Commit 5a32a1b
committed
fix(drive-record-traces): eliminate bare as-cast in parsePayload
Factor the object-shape check into an isRecord type predicate so
TypeScript narrows parsed to Record<string,unknown> without a cast.
Keeps identical behaviour and error messages.
Signed-off-by: Will Madden <madden@prisma.io>1 parent 87143c2 commit 5a32a1b
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
71 | 75 | | |
72 | 76 | | |
73 | 77 | | |
74 | 78 | | |
75 | 79 | | |
76 | 80 | | |
77 | 81 | | |
78 | | - | |
| 82 | + | |
79 | 83 | | |
80 | 84 | | |
81 | | - | |
| 85 | + | |
82 | 86 | | |
83 | 87 | | |
84 | 88 | | |
| |||
0 commit comments