Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
CI / CI OK (push) Has been cancelled
Deploy Website on push / Rerun on failure (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
Close stale issues / stale (push) Has been cancelled
36 lines
892 B
TypeScript
36 lines
892 B
TypeScript
import type { Preferences } from './types';
|
|
|
|
import { preferencesManager } from './preferences';
|
|
|
|
// 偏好设置(带有层级关系)
|
|
const preferences: Preferences =
|
|
preferencesManager.getPreferences.apply(preferencesManager);
|
|
|
|
// 更新偏好设置
|
|
const updatePreferences =
|
|
preferencesManager.updatePreferences.bind(preferencesManager);
|
|
|
|
// 重置偏好设置
|
|
const resetPreferences =
|
|
preferencesManager.resetPreferences.bind(preferencesManager);
|
|
|
|
const clearPreferencesCache =
|
|
preferencesManager.clearCache.bind(preferencesManager);
|
|
|
|
// 初始化偏好设置
|
|
const initPreferences =
|
|
preferencesManager.initPreferences.bind(preferencesManager);
|
|
|
|
export {
|
|
clearPreferencesCache,
|
|
initPreferences,
|
|
preferences,
|
|
preferencesManager,
|
|
resetPreferences,
|
|
updatePreferences,
|
|
};
|
|
|
|
export * from './constants';
|
|
export type * from './types';
|
|
export * from './use-preferences';
|