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
After updating to v1, i'm confused about how i should go about implementing generic functions when using TSchema type. For example, the code below worked great in v0.34 - the return type was inferred correctly, however after updating to v1 it's no longer the case - now i get a type error of "Unsafe return of type any from function with return type Static<T>". Is such type inferring still possible in v1?
Also, in v1 the TSchema no longer extends SchemaOptions so it's not possible to access such schema properties as title etc. How should i go about correctly inferring types and accessing schema options?
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.
-
Hi!
After updating to v1, i'm confused about how i should go about implementing generic functions when using
TSchematype. For example, the code below worked great in v0.34 - the return type was inferred correctly, however after updating to v1 it's no longer the case - now i get a type error of "Unsafe return of typeanyfrom function with return typeStatic<T>". Is such type inferring still possible in v1?Also, in v1 the
TSchemano longer extendsSchemaOptionsso it's not possible to access such schema properties astitleetc. How should i go about correctly inferring types and accessing schema options?Thank you in advance for any suggestions!
Beta Was this translation helpful? Give feedback.
All reactions