You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For context: This is a zero types specific issue (we augment the match function with types). We add both a string type and a return type, e.g. export const match = (param) => param === 'apple' || param === 'orange'; becomes export const match = (param: string): boolean => param === 'apple' || param === 'orange';, which is why inference does not work.
This is so that the return type is also checked for correctness.
What we can do is to use satisfies instead when using the export const match = ... variant, but we cannot change it for the function variant (export function match(... because then we wouldn't be able to check the return type anymore.
Describe the bug
param: string
is required for inferred type predicates to workReproduction
hyunbinseo/svelte-kit-13279@ae0d717
Logs
No response
System Info
Severity
annoyance
Additional Information
No response
The text was updated successfully, but these errors were encountered: