Skip to content

Instantly share code, notes, and snippets.

@MikyStar
Last active November 22, 2018 19:18
Show Gist options
  • Save MikyStar/6f6b46ea184d0b1e0aec014037cf08b9 to your computer and use it in GitHub Desktop.
Save MikyStar/6f6b46ea184d0b1e0aec014037cf08b9 to your computer and use it in GitHub Desktop.
// Defining the structure of a JSON
/**
* @typedef TestType
* @property { string } fonctional
* @property { number } unitaire
* @property { 'left' | 'right' | 'nowhere' } direction - Makes autosuggestion on direction
*/
/*************************************************************************************
Then we just have to import the file where this JSDoc is to get access to its JSDoc
and do something like
*************************************************************************************/
/**
* @param { TestType } test
*/
const test = test => test;
test( { fonctional : 'nothing', direction : 'nowhere', unitaire : 2 } )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment