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

app.onStart() types and documentation does not match and does not work #621

Open
touhidurrr opened this issue Apr 25, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@touhidurrr
Copy link

What version of Elysia.JS is running?

1.0.13

What platform is your computer?

Microsoft Windows NT 10.0.22631.0 x64

What steps can reproduce the bug?

When I hover over app.onStart(), I see:
image
However, copy pasting the code gives you:
image
As you can see from this image, even when I copy paste the documented code, I do not get the types.

What is the expected behavior?

Types should be available.

What do you see instead?

Types cannot be found.

Additional information

Also, string formatting is not done properly in example. The example has:

new Elysia()
  .onStart(({ url, port }) => {
    console.log('Running at ${url}:${port}');
  })

However, it should be:

new Elysia()
  .onStart(({ url, port }) => {
    console.log(`Running at ${url}:${port}`);
  })
@touhidurrr touhidurrr added the bug Something isn't working label Apr 25, 2024
@touhidurrr
Copy link
Author

Also, after running the code:
image

@touhidurrr touhidurrr changed the title app.onStart() types and documentation does not match. app.onStart() types and documentation does not match and does not work Apr 25, 2024
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

1 participant