denoland / deno_doc

Documentation generator for Deno
MIT License
263 stars 59 forks source link

`deno doc` shows getter/setter pairs as methods #666

Open nicolo-ribaudo opened 3 weeks ago

nicolo-ribaudo commented 3 weeks ago

Version: Deno 2.0.4

My code:

interface Foo {
  get value(): string;
  set value(value: string);

  get cursorPosition(): number | null;
  set cursorPosition(position: number);
}

deno doc generates the following:

image

and, if I open the details:

image

From this generated output, it's impossible to tell that they are a getter and a setter.

Ideally deno doc should show value and cursorPosition as properties (being careful about showing their types, because cursorPosition has different types for get and for set). If not possible, it should at least show somehow that they are a getter and a setter.

lucacasonato commented 4 days ago

example: https://jsr.io/@dunno/jsr-registry-bindings/doc/~/Package.prototype.firstFetch