style(core): 统一代码风格并强化命名规范

This commit is contained in:
YHH
2025-10-31 18:29:53 +08:00
parent 6778ccace4
commit 3e037f4ae0
106 changed files with 2054 additions and 1967 deletions

View File

@@ -9,17 +9,17 @@ export type {
WorkerCreationOptions,
PlatformConfig,
PlatformDetectionResult
} from './IPlatformAdapter';
} from "./IPlatformAdapter";
// 平台检测器
export { PlatformDetector } from './PlatformDetector';
export {PlatformDetector} from "./PlatformDetector";
// 平台管理器
export { PlatformManager } from './PlatformManager';
export {PlatformManager} from "./PlatformManager";
// 内部导入用于便利函数
import { PlatformManager } from './PlatformManager';
import type { IPlatformAdapter } from './IPlatformAdapter';
import {PlatformManager} from "./PlatformManager";
import type {IPlatformAdapter} from "./IPlatformAdapter";
// 便利函数
export function registerPlatformAdapter(adapter: IPlatformAdapter) {
@@ -38,10 +38,10 @@ export function getFullPlatformConfig() {
return PlatformManager.getInstance().getFullPlatformConfig();
}
export function supportsFeature(feature: 'worker' | 'shared-array-buffer' | 'transferable-objects' | 'module-worker') {
export function supportsFeature(feature: "worker" | "shared-array-buffer" | "transferable-objects" | "module-worker") {
return PlatformManager.getInstance().supportsFeature(feature);
}
export function hasAdapter() {
return PlatformManager.getInstance().hasAdapter();
}
}