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

JSDoc types not supported #27590

Open
johndeighan opened this issue Jan 8, 2025 · 1 comment
Open

JSDoc types not supported #27590

johndeighan opened this issue Jan 8, 2025 · 1 comment
Labels
needs info needs further information to be properly triaged

Comments

@johndeighan
Copy link

$ deno --version
deno 2.1.4 (stable, release, x86_64-pc-windows-msvc)
v8 13.0.245.12-rusty
typescript 5.6.2

JSDoc allows you to specify the type of parameters or the return value in JavaScript code like:

/**
 * Represents a book.
 * @param {string} title - The title of the book.
 * @param {string} author - The author of the book.
 * @returns {boolean}
 */
function Book(title, author) {
}

However, though Deno 2 claims to support both TypeScript and JavaScript development, it doesn't support this method of specifying types. To be more specific, when I include JSDoc like the above, the {string} and {boolean} strings are ignored and the documentation produced doesn't include the type of parameters or return values.

@dsherret
Copy link
Member

dsherret commented Jan 8, 2025

Can you show a full reproduction (What does your file look like? What command are you running?)? Does that javascript file have // @ts-check at the top?

@dsherret dsherret added the needs info needs further information to be properly triaged label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs info needs further information to be properly triaged
Projects
None yet
Development

No branches or pull requests

2 participants