Open skybrian opened 1 month ago
I don't know if this is the right way, but I worked around this by putting all my entrypoints in a subdirectory and checking them at once:
deno doc --lint ./src/entrypoints/*.ts
Or at least, I don't seem to be getting any errors that way.
https://github.com/denoland/deno/issues/25188#issuecomment-2318498834
I have the same issue. When I run `deno doc --lint main.ts` with this TS file, it says this. ```ts import type { UserAgent } from "jsr:@std/http/user-agent"; /** * This function causes an error * * @param userAgent Why this is not detected */ export function foo(userAgent: UserAgent) { console.log(userAgent); } ``` ``` error[private-type-ref]: public type 'foo' references private type 'UserAgent' --> /Users/5ouma/Temp/main.ts:8:1 | 8 | export function foo(userAgent: UserAgent) { | ^ = hint: make the referenced type public or remove the reference | 982 | export class UserAgent { | - this is the referenced type | info: to ensure documentation is complete all types that are exposed in the public API must be public error: Found 1 documentation lint error. ```
@5ouma that doesn't seem like a bug. The code needs to export the UserAgent
type because it's used in the public api of foo
:
export type { UserAgent } from "jsr:@std/http/user-agent";
In the future we'll add a way to disable these errors if you don't want to do that. (I think currently the only way to do it is to create an intermediary type and mark it as internal:
// something like this
/** @internal */
type UserAgent = import("jsr:@std/http/user-agent").UserAgent;
I'm able to reproduce the original issue. Strange.
Version: Deno 1.46.2
To reproduce:
Sometimes it reports no errors, but other times it does. Here's is example output when it reports errors: