mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-27 02:42:25 +08:00
feat(core): add public user service (#10695)
This commit is contained in:
@@ -5,8 +5,9 @@ import type { Signal } from '@preact/signals-core';
|
||||
import type { AffineUserInfo } from './types';
|
||||
|
||||
export interface UserService {
|
||||
getCurrentUser(): AffineUserInfo;
|
||||
getUserInfo(id: string): Signal<AffineUserInfo | null>;
|
||||
getCurrentUser(): AffineUserInfo | null;
|
||||
userInfo$(id: string): Signal<AffineUserInfo | null>;
|
||||
revalidateUserInfo(id: string): void;
|
||||
}
|
||||
|
||||
export const UserProvider = createIdentifier<UserService>(
|
||||
|
||||
Reference in New Issue
Block a user