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
I'm working with Typescript and I'm wondering which is the proper way to deal with type specifications. Let me propose an example to better explain myself.
// index.tstypeAddress={street: string;city: string};typeEmail={email: string};typePhone={phone: string};/** * My User lorem ipsum */exporttypeUser={name: string;address: Address;contacts: Email&Phone;};/** * An example of person lorem ipsum */exportinterfacePerson{name: string;surname: string;address: Address;}
I receive the following output (in my README.md file):
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->#### Table of Contents*[User](#user)*[Properties](#properties)*[Person](#person)### User
My User lorem ipsum
Type: {name: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), address: Address, contacts: any}
#### Properties*`name`**[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** *`address`**Address** *`contacts`**any** ### Person
An example of person
Expectations
I spotted some issues in the outcome. I don't know if they are because of a misuse by myself, a known bug, a missing feature, or a feature documentation.js won't support at all. I read the docs and I found no clues about the will to support Typescript types and any known issues.
Person members aren't listed just because it's written as an interface instead of a type
User.address is of type Address, which is not meant to be exposed; Shouldn't it be expanded in the property definition?
User.contacts isn't resolved because of the intersection &
How can I add a description text for each property?
Apologize if any of these issues were already documented.
Activity