fix: Add TypeScript type definitions for SelectRecipe

- Update Window interface in types.ts to include SelectRecipe method
- Change chrome and webview to optional properties (chrome?, webview?)
- Add non-null assertions (!) to all window.chrome.webview accesses
- Remove LoadRecipe (replaced with SelectRecipe)
- Fix TypeScript strict null checking errors

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-24 23:04:37 +09:00
parent 82cf4b8fd0
commit 83a9a63de4
2 changed files with 12 additions and 12 deletions

View File

@@ -52,14 +52,14 @@ export interface ConfigItem {
declare global {
interface Window {
chrome: {
webview: {
chrome?: {
webview?: {
hostObjects: {
machine: {
MoveAxis(axis: string, value: number): Promise<void>;
SetIO(id: number, isInput: boolean, state: boolean): Promise<void>;
SystemControl(command: string): Promise<void>;
LoadRecipe(recipeId: string): Promise<void>;
SelectRecipe(recipeId: string): Promise<string>;
GetConfig(): Promise<string>;
GetIOList(): Promise<string>;
GetRecipeList(): Promise<string>;