mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-18 18:41:52 +08:00
chore: merge blocksuite source code (#9213)
This commit is contained in:
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
declare module 'y-protocols/awareness.js' {
|
||||
import { Awareness as _Awareness } from 'y-protocols/awareness';
|
||||
type UnknownRecord = Record<string, unknown>;
|
||||
export class Awareness<
|
||||
State extends UnknownRecord = UnknownRecord,
|
||||
> extends _Awareness {
|
||||
constructor<State extends UnknownRecord = UnknownRecord>(
|
||||
doc: Y.Doc
|
||||
): Awareness<State>;
|
||||
|
||||
getLocalState(): State;
|
||||
getStates(): Map<number, State>;
|
||||
setLocalState(state: State): void;
|
||||
setLocalStateField<Field extends keyof State>(
|
||||
field: Field,
|
||||
value: State[Field]
|
||||
): void;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user