Add API for propagating cursor locations #61
4 changed files with 7 additions and 3 deletions
Formatting
commit
22cafda53f
|
|
@ -18,7 +18,7 @@ import { registerConsoleForLogging } from "./utils/register-console-for-logging"
|
||||||
import { updateEditorStatusDisplay } from "./views/editor-sync-line/editor-sync-line";
|
import { updateEditorStatusDisplay } from "./views/editor-sync-line/editor-sync-line";
|
||||||
|
|
||||||
export default class VaultLinkPlugin extends Plugin {
|
export default class VaultLinkPlugin extends Plugin {
|
||||||
private readonly disposables: (() => void)[] = [];
|
private readonly disposables: (() => unknown)[] = [];
|
||||||
private settingsTab: SyncSettingsTab | undefined;
|
private settingsTab: SyncSettingsTab | undefined;
|
||||||
private client!: SyncClient;
|
private client!: SyncClient;
|
||||||
private readonly rateLimitedUpdatesPerFile = new Map<
|
private readonly rateLimitedUpdatesPerFile = new Map<
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ export class StatusDescription {
|
||||||
private lastRemaining: number | undefined;
|
private lastRemaining: number | undefined;
|
||||||
private lastConnectionState: NetworkConnectionStatus | undefined;
|
private lastConnectionState: NetworkConnectionStatus | undefined;
|
||||||
|
|
||||||
private statusChangeListeners: (() => void)[] = [];
|
private statusChangeListeners: (() => unknown)[] = [];
|
||||||
|
|
||||||
public constructor(private readonly syncClient: SyncClient) {
|
public constructor(private readonly syncClient: SyncClient) {
|
||||||
void this.updateConnectionState();
|
void this.updateConnectionState();
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,7 @@
|
||||||
|
/**
|
||||||
|
* A type-safe utility function to create a Promise with resolve and reject functions.
|
||||||
|
* @returns A tuple containing a Promise, a resolve function, and a reject function.
|
||||||
|
*/
|
||||||
export function createPromise<T = void>(): [
|
export function createPromise<T = void>(): [
|
||||||
Promise<T>,
|
Promise<T>,
|
||||||
(value: T) => void,
|
(value: T) => void,
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import type { Logger } from "../tracing/logger";
|
||||||
// Locks are granted in a first-in-first-out order.
|
// Locks are granted in a first-in-first-out order.
|
||||||
export class Locks<T> {
|
export class Locks<T> {
|
||||||
private readonly locked = new Set<T>();
|
private readonly locked = new Set<T>();
|
||||||
private readonly waiters = new Map<T, (() => void)[]>();
|
private readonly waiters = new Map<T, (() => unknown)[]>();
|
||||||
|
|
||||||
public constructor(private readonly logger: Logger) {}
|
public constructor(private readonly logger: Logger) {}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue