Skip to content

Instantly share code, notes, and snippets.

@zavr-1
Last active December 26, 2019 12:10
Show Gist options
  • Save zavr-1/b99818e85c9381e9b6bbc4dbecbe5eae to your computer and use it in GitHub Desktop.
Save zavr-1/b99818e85c9381e9b6bbc4dbecbe5eae to your computer and use it in GitHub Desktop.
/**
* @type {_idio.session}
*/
function Session(opts = {}) {
formatOpts(opts)
/**
* @type {!_idio.Middleware}
*/
async function session(ctx, next) {
const sess = extendContext(ctx, /** @type {!_idio.SessionConfig} */ (opts))
// ...
}
return /** @type {!_goa.Middleware} */ (session)
}
export default Session
/**
* @suppress {nonStandardJsDocs}
* @typedef {import('..').session} _idio.session
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment