software-mansion-labs / expo-maps

81 stars 3 forks source link

Add documentation for JS side of `Expo Maps` #46

Closed szdziedzic closed 2 years ago

szdziedzic commented 2 years ago

Closes one task in #34.

Zwatotem commented 2 years ago

Just an overall suggestion. I think we should comment each field individually, like this:

/**
 * Type comment
 */
export type SomeType {
  /**
   * Length of some type
   */
  length: number;
  /**
   * Color of some type
   */
  color: string;
}

instead of

/**
 * Type comment
 * @field length - Length of some type
 * @field color - Color of some type
 */
export type SomeType {
  length: number;
  color: string;
}

Tooltips in VSCode seem to support this syntax better. Also I suggest use of @example, @required, @see and possibly other JSDoc tags. In the "see" section it's useful to put the type name in {@link SomeType} to make resulting documentation better traversable.