mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-18 20:27:27 +00:00
fix: format issues and lint error in oauth.ts
This commit is contained in:
@@ -19,8 +19,10 @@ const OAUTH_PROVIDER_IDS = new Set<OAuthProvider>(
|
||||
getOAuthProviders().map((provider) => provider.id),
|
||||
);
|
||||
|
||||
const isOAuthProvider = (provider: string): provider is OAuthProvider =>
|
||||
OAUTH_PROVIDER_IDS.has(provider as OAuthProvider);
|
||||
function isOAuthProvider(provider: string): provider is OAuthProvider {
|
||||
// biome-ignore lint/suspicious/noExplicitAny: type guard needs runtime check
|
||||
return OAUTH_PROVIDER_IDS.has(provider as any);
|
||||
}
|
||||
|
||||
const resolveOAuthProvider = (provider: string): OAuthProvider | null =>
|
||||
isOAuthProvider(provider) ? provider : null;
|
||||
|
||||
Reference in New Issue
Block a user