Using a generic without a schema #998
-
Checks before posting an issue
Description of the issueThe documentation states, that schema is optional, so the signature for generic watch should not force usage of schema. So please change |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello, The The I invite you to read again the "Validation" documentation, and especially the "Why a schema and a cast?" section for a longer description of the behavior. Converting this to a discussion as it is not a bug. |
Beta Was this translation helpful? Give feedback.
Hello,
The
watch()
signature is the same as theget()
signature and is working as intended.The
schema
is optional, but then anObservable<unknown>
is returned, which is the intended behavior. Because if a runtime time check was not done with aschema
, it is not right to rely on a compilation cast: indeed, it is client-side storage, so the data could have been forged, which could lead to bugs and security issues.I invite you to read again the "Validation" documentation, and especially the "Why a schema and a cast?" section for a longer description of the behavior.
Converting this to a discussion as it is not a bug.