mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 12:55:00 +00:00
fix: add prefer-readonly rule (#5122)
This commit is contained in:
@@ -5,8 +5,8 @@ import type { Map as YMap } from 'yjs';
|
||||
import { Doc as YDoc } from 'yjs';
|
||||
export class UserSetting {
|
||||
constructor(
|
||||
private workspace: Workspace,
|
||||
private userId: string
|
||||
private readonly workspace: Workspace,
|
||||
private readonly userId: string
|
||||
) {}
|
||||
|
||||
get setting(): YDoc {
|
||||
|
||||
@@ -13,7 +13,7 @@ const COLLECTIONS_TRASH_KEY = 'collections_trash';
|
||||
const SETTING_KEY = 'setting';
|
||||
|
||||
export class WorkspaceSetting {
|
||||
constructor(private workspace: Workspace) {}
|
||||
constructor(private readonly workspace: Workspace) {}
|
||||
|
||||
get doc() {
|
||||
return this.workspace.doc;
|
||||
|
||||
Reference in New Issue
Block a user