You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
deno doc does not take JSDoc into account when it encounters interface-like type alias.
using type alias for documenting can be beneficial when the library owner does not intend to 'patch' interface globally.
Steps to reproduce
create interface and type.
// example.tsexportinterfaceFoo{/** * @param x - The number to do something with * @returns The number after doing something */foo: (x: number)=>number}exporttypeBar={/** * @param x - The number to do something with * @returns The number after doing something */bar: (x: number)=>number}
run deno doc.
$ deno doc example.ts
Defined in file:///home/scarf/repo/etc/typed_regex/example.ts:1:1
interface Foo
foo: (x: number) => number
@param x
- The number to do something with
@return
The number after doing something
Defined in file:///home/scarf/repo/etc/typed_regex/example.ts:9:1
type Bar = { bar: (x: number) => number; }
Expected Outcome
type Bar
bar: (x: number) => number
@param x
- The number to do something with
@return
The number after doing something
The topic on discord was slightly different: the topic was about rendering of individual properties of interface-like type aliases to be like the interface view
scarf005
changed the title
Support JSDoc for interface-like type alias
Render properties of interface-like type aliases to be like the interface
Dec 3, 2023
Summary
deno doc does not take JSDoc into account when it encounters interface-like type alias.
using type alias for documenting can be beneficial when the library owner does not intend to 'patch' interface globally.
Steps to reproduce
deno doc
.Expected Outcome
Others
i thought #302 was already opened, but was confirmed at discord that they weren't the same
The text was updated successfully, but these errors were encountered: