Skip to content

Instantly share code, notes, and snippets.

@coolaj86
Last active August 25, 2022 21:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coolaj86/aaaf1a5c469a47d40f5f57d37ea4484f to your computer and use it in GitHub Desktop.
Save coolaj86/aaaf1a5c469a47d40f5f57d37ea4484f to your computer and use it in GitHub Desktop.
/**
* @param {import('foo/types.js').Foo} foo
*/
function bazzer(foo) {
return {
baz: foo.name,
qux: foo.flavor,
};
}
/**
* @typedef {Object} Foo
* @property {String} name
* @property {"vanilla"|"chocolate"|"strawberry"} flavor
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment