Skip to content

Instantly share code, notes, and snippets.

@crutchcorn
Created February 10, 2021 02:32
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 crutchcorn/002ed7f2f7914613a3a50bc614fd9948 to your computer and use it in GitHub Desktop.
Save crutchcorn/002ed7f2f7914613a3a50bc614fd9948 to your computer and use it in GitHub Desktop.
/**
* @typedef {'github' | 'bitbucket' | 'gitlab'} ServiceType
*/
/**
* @param {string} path
* @param {number} depth
* @param {{username: string | null, token: string | null, service: ServiceType}} userData
* @returns {Promise<number>}
*/
function testThis(path, depth, userData) {
/**
* @type {string}
*/
const test = path + depth;
switch (userData.service) {
case "github":
return 2;
case "bitbucket":
default:
return 1;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment