Commit 6fc9c03
committed
Simplify the transports cast in /passkeys/registration/begin
The cast on `p.transports` was a multi-line conditional-types
expression that fished the element type out of
buildRegistrationOptions' parameter shape via `Parameters<...>`
and `infer T`. The element type is just
AuthenticatorTransportFuture from @simplewebauthn/server, which
the same file already imports transitively, so import it
directly and cast to AuthenticatorTransportFuture[]. Runtime is
identical; the call site fits on one line again.
#487 (comment)
Assisted-by: Claude Code:claude-opus-4-71 parent c41a7a8 commit 6fc9c03
1 file changed
Lines changed: 2 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
| 120 | + | |
126 | 121 | | |
127 | 122 | | |
128 | 123 | | |
| |||
0 commit comments