From a001fdcc00f2d261fac999a913541eecceb13ece Mon Sep 17 00:00:00 2001 From: Chandrajeet Maurya Date: Tue, 1 Oct 2019 12:29:36 +0700 Subject: [PATCH] Add typedef shorthand in jsdoc --- jsdoc.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/jsdoc.md b/jsdoc.md index 2eb368ca1..6f0ae3528 100644 --- a/jsdoc.md +++ b/jsdoc.md @@ -80,6 +80,27 @@ function play (song) { See: +### Typedef Shorthand + +```js +/** + * A song + * @typedef {{title: string, artist: string, year: number}} Song + */ +``` + +```js +/** + * Plays a song + * @param {Song} song - The {@link Song} to be played + */ + +function play (song) { +} +``` + +See: + ### Importing types ```js