feat(shell): add authData svc

This commit is contained in:
Il Harper 2024-03-04 00:31:41 +08:00
parent 434d7ce7a3
commit d05928ddba
No known key found for this signature in database
GPG Key ID: 4B71FCA698E7E8EC

View File

@ -0,0 +1,22 @@
declare const authData: {
uin: string
}
const task = new Promise<typeof authData>((res) => {
const interval: NodeJS.Timeout = setInterval(() => {
if ('authData' in globalThis && authData?.uin) {
clearInterval(interval)
res(authData)
}
}, 500)
})
/**
* {@link authData}
*
* {@link authData}
* {@link authData}
*
* @returns {@link authData}
*/
export const getAuthData = () => task