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

Namespace examples not typechecked #87

Open
vecerek opened this issue Nov 6, 2024 · 0 comments · May be fixed by #88
Open

Namespace examples not typechecked #87

vecerek opened this issue Nov 6, 2024 · 0 comments · May be fixed by #88
Labels
bug Something isn't working

Comments

@vecerek
Copy link
Contributor

vecerek commented Nov 6, 2024

What version of Effect is running?

No response

What steps can reproduce the bug?

  1. Set enforceExamples: true in the config
  2. Have an exported namespace with JSDoc (no @example)
  3. Run docgen

With the above configuration, you will get the expected Missing @example tag in ... error message.

  1. Add @example to your namespace JSDoc, but make sure it has a compilation error in it, something like:
    const a: number = "42"
  2. Run docgen

What is the expected behavior?

Docgen should fail with a compilation error on the added @example under the namespace JSDoc.

What do you see instead?

Docgen succeeds, rendering an invalid TS example.

Additional information

Either typecheck examples under namespaces, too, or do not enforce examples on namespaces regardless of the configuration.

@vecerek vecerek added the bug Something isn't working label Nov 6, 2024
vecerek added a commit to vecerek/docgen that referenced this issue Nov 6, 2024
@vecerek vecerek linked a pull request Nov 6, 2024 that will close this issue
5 tasks
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

Successfully merging a pull request may close this issue.

1 participant