Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop schema method and update the docs #486

Open
yeganathan18 opened this issue Feb 15, 2024 · 4 comments
Open

Drop schema method and update the docs #486

yeganathan18 opened this issue Feb 15, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@yeganathan18
Copy link

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?

code-sample

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

@yeganathan18 yeganathan18 added the bug Something isn't working label Feb 15, 2024
@bogeychan
Copy link
Contributor

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

@yeganathan18
Copy link
Author

@bogeychan Sorry for the confusion, but what I mean is, the schema method still pops up in the suggestions.

Screenshot 2024-02-15 at 7 30 23 PM

@Nmans01
Copy link

Nmans01 commented Mar 11, 2024

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.

@yeganathan18
Copy link
Author

@Nmans01, just checked with SaltyAom. The schema is out, it's guard now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants