0.3.2 • Published 1 year ago

@ts2doc/storybook-addon v0.3.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@ts2doc/storybook-addon

Storybook addon to document exported declarations from ts files

Installation

Yarn

yarn add -D @ts2doc/storybook-addon

NPM

npm install --save-dev @ts2doc/storybook-addon

Example

Interface example

Is displayed from the following TypeScript interface:

/**
 * A movie is a piece of media that is intended to be viewed as a film.
 * @link https://wikipedia.org/wiki/Film | Useful link
 */
export interface Movie extends Media {
    /**
     * The title of the movie
     */
    readonly title: string;
    /**
     * The year the movie was released
     * @type {Date}
     */
    year: number;
    /**
     * The rating of the movie
     * @link https://wikipedia.org/wiki/Film_rating_system Film rating system
     * @default 0
     */
    rating?: number;
    genres: string[];
    /**
     * The actors in the movie
     */
    cast: Actor[];
    /**
     * @deprecated
     */
    director: Director;
}

Usage

See @ts2doc documentation.