tsdiagram icon indicating copy to clipboard operation
tsdiagram copied to clipboard

Add a description

Open RikudouSage opened this issue 1 year ago • 2 comments

Any chance you'd consider adding a description to the fields? Could be implemented for example using decorators, would look like this:

interface SomeType {
  fieldWithNoDescription: string;

  @Description("some description")
  fieldWithDescription: string;
}

RikudouSage avatar Nov 28 '24 15:11 RikudouSage

Yes, any suggestions on how to render the descriptions? I think comment blocks might be better for multi-line, maybe with a special prefix ex ///

3rd avatar Nov 28 '24 18:11 3rd

I think multiline could work with template strings:

@Description(`
     Some
  multiline
description
`)

But yeah, comments are fine as well.


I was thinking of rendering them as a 3rd column, but I'm not great at UX, so maybe it's a bad idea.

RikudouSage avatar Nov 28 '24 21:11 RikudouSage