elysia
elysia copied to clipboard
Drop `schema` method and update the docs
What version of Elysia.JS is running?
latest
What platform is your computer?
MacOS Darwin 23.2.0 x86_64 i386
What steps can reproduce the bug?
What is the expected behavior?
The schema
method has been renamed to guard
sometime ago. So we should remove that method from showing up on Elysia instance and also update the docs here: https://elysiajs.com/essential/schema#global-schema
What do you see instead?
The schema
method is still popping up next to guard
, even though we've changed its name to guard
.
Additional information
Discord thread: https://discord.com/channels/1044804142461362206/1202502724911112242
Thanks for reporting.
What do you mean by showing up on Elysia instance
? schema
no longer exists on the object. This is what the typescript error tells you.
In future, please open issues relating to documentation in the elysia documentation repository: https://github.com/elysiajs/documentation
@bogeychan Sorry for the confusion, but what I mean is, the schema method still pops up in the suggestions.
As shown in the screenshot, schema is not a method, but instead a property of the Elysia instance. Your original expression is not callable
/has no call signatures
Typescript error was thrown because you were attempting to call a property as if it were a method.
@Nmans01, just checked with SaltyAom. The schema
is out, it's guard
now.