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
The behaviour of default_type_replacements seems unintuitive.
I have data with UploadedFile and I thought the default_type_replacements could be a good place to define a custom type.
But it generates any. It does the same if I set "number" as a type.
Digging further, I understood that this config expect a PHP type, but it can complicate things if we want to cast to a specific TypeScript type.
Suggestion
To keep backward compatibility, the library could add a new object to define native types
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The behaviour of
default_type_replacementsseems unintuitive.I have data with
UploadedFileand I thought thedefault_type_replacementscould be a good place to define a custom type.But it generates
any. It does the same if I set "number" as a type.Digging further, I understood that this config expect a PHP type, but it can complicate things if we want to cast to a specific TypeScript type.
Suggestion
To keep backward compatibility, the library could add a new object to define native types
Beta Was this translation helpful? Give feedback.
All reactions