Files
repomix-mirror/browser/types.d.ts
Kazuki Yamada e1ffdc540a fix(browser): Replace any types with proper TypeScript definitions
Fixed linting warnings by replacing 'any' return types in WXT function
declarations with proper TypeScript interfaces. This improves type safety
without affecting functionality.

Changes:
- Added BackgroundDefinition and ContentScriptDefinition interfaces
- Updated defineBackground and defineContentScript return types
- Resolves 2 lint/suspicious/noExplicitAny warnings

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-30 23:03:35 +09:00

18 lines
465 B
TypeScript

/// <reference types="chrome" />
// WXT type imports
interface BackgroundDefinition {
main(): void;
}
interface ContentScriptDefinition {
matches: string[];
runAt?: 'document_start' | 'document_end' | 'document_idle';
allFrames?: boolean;
main: () => void;
}
// WXT global functions
declare function defineBackground(fn: () => void): BackgroundDefinition;
declare function defineContentScript(config: ContentScriptDefinition): ContentScriptDefinition;