diff --git a/src/cmd-login.ts b/src/cmd-login.ts index debe3017..701361c9 100644 --- a/src/cmd-login.ts +++ b/src/cmd-login.ts @@ -83,6 +83,11 @@ export const login = async function ( return 0; }; +/** + * The result of a login attempt. Either success with the token, or failure. + */ +type LoginResult = { code: 0; token: string } | { code: 1 }; + /** * Return npm login token */ @@ -91,7 +96,7 @@ const npmLogin = async function ( password: string, email: string, registry: RegistryUrl -) { +): Promise { const client = getNpmClient(); try { const data = await client.adduser(registry, {