Auto-fix 7 TypeScript warnings (prefer-readonly, no-confusing-void-expression)

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-06 20:39:37 +00:00
parent b1124d265b
commit 16635c5eb7
5 changed files with 7 additions and 7 deletions

View File

@@ -18,7 +18,7 @@ export class AuthStore {
isLoading: false,
}
private listeners = new Set<() => void>()
private readonly listeners = new Set<() => void>()
private sessionCheckPromise: Promise<void> | null = null
getState(): AuthState {
@@ -34,7 +34,7 @@ export class AuthStore {
private setState(newState: AuthState): void {
this.state = newState
this.listeners.forEach(listener => listener())
this.listeners.forEach(listener => { listener(); })
}
async ensureSessionChecked(): Promise<void> {

View File

@@ -11,7 +11,7 @@ export function useAuth(): UseAuthReturn {
const [state, setState] = useState<AuthState>(authStore.getState())
useEffect(() => {
const unsubscribe = authStore.subscribe(() => setState({ ...authStore.getState() }))
const unsubscribe = authStore.subscribe(() => { setState({ ...authStore.getState() }); })
void authStore.ensureSessionChecked()
return unsubscribe
}, [])

View File

@@ -13,7 +13,7 @@ export interface ComponentCatalogEntry {
* TODO: Implement full component catalog functionality
*/
export class ComponentCatalog {
private components = new Map<string, ComponentCatalogEntry>()
private readonly components = new Map<string, ComponentCatalogEntry>()
register(name: string, entry: ComponentCatalogEntry): void {
this.components.set(name, entry)

View File

@@ -14,7 +14,7 @@ export interface ComponentMetadata {
* TODO: Implement full component registry functionality
*/
export class ComponentRegistry {
private registry = new Map<string, ComponentMetadata>()
private readonly registry = new Map<string, ComponentMetadata>()
register(id: string, metadata: ComponentMetadata): void {
this.registry.set(id, metadata)

View File

@@ -7,7 +7,7 @@ import { readFileSync, writeFileSync, existsSync } from 'fs'
import { join } from 'path'
export class SchemaRegistry {
private schemas: Map<string, ModelSchema> = new Map()
private readonly schemas: Map<string, ModelSchema> = new Map()
packages: Record<string, unknown> = {}
register(schema: ModelSchema): void {
@@ -40,7 +40,7 @@ export function loadSchemaRegistry(path?: string): SchemaRegistry {
const { schemas, packages } = parsed as { schemas?: unknown; packages?: unknown }
if (Array.isArray(schemas)) {
schemas.forEach((schema: ModelSchema) => schemaRegistry.register(schema))
schemas.forEach((schema: ModelSchema) => { schemaRegistry.register(schema); })
}
if (packages !== null && packages !== undefined && typeof packages === 'object') {