Created
February 10, 2021 02:32
-
-
Save crutchcorn/002ed7f2f7914613a3a50bc614fd9948 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @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