improved type inference for localePrefix
in defineRouting
#1766
stefanprobst
started this conversation in
Ideas
Replies: 1 comment 4 replies
-
I agree that the returned This function was quite tricky to get right though:
Do you have a practical case where the current behavior is problematic? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
see https://www.typescriptlang.org/es/play/?#code/JYWwDg9gTgLgBAbzgEwKYDNgDtUCUICuM2A5nAL5zpQQhwBEOAHjALTYwA2A9DUafQDcAKGEBjCFgDO8PsSxkAvCgzY8heSQAUCYXDicIYgIadUUgFxwA2vTSsAggBV6AGgaosrAOIAhegC6rnoq6MYEnDAAMkamqFb0nj7+wfqGJmYAClCqTFa6+vogEGgJpgDuxgCeUm4h+mA5mEzm+fWFdqiOLgncaHWFHUl+9L2eA4XkqRTB5ACUIuKSMgaxWU3ATHDKcqQAdOlx2bnt+tzccAB6APxL0vCNuebbcLsKB2uox817j83mpzg5yutyAA
when i provide a
localePrefix
config object todefineRouting
it would be cool ifdefineRouting
would return the shape of that object instead of an optionalLocalePrefix
type (see the typescript playground above)Beta Was this translation helpful? Give feedback.
All reactions