forked from jsnbuchanan/crowd-funder-for-time-pwa
fix: improve error handling in photo upload
- Add proper unknown type for error handling in PhotoDialog - Remove any type in favor of unknown for better type safety - Fix error message access with type guards
This commit is contained in:
@@ -2,19 +2,19 @@ import { ImageResult, PlatformService } from "../PlatformService";
|
||||
import { logger } from "../../utils/logger";
|
||||
|
||||
export class PyWebViewPlatformService implements PlatformService {
|
||||
async readFile(path: string): Promise<string> {
|
||||
async readFile(_path: string): Promise<string> {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
async writeFile(path: string, content: string): Promise<void> {
|
||||
async writeFile(_path: string, _content: string): Promise<void> {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
async deleteFile(path: string): Promise<void> {
|
||||
async deleteFile(_path: string): Promise<void> {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
async listFiles(directory: string): Promise<string[]> {
|
||||
async listFiles(_directory: string): Promise<string[]> {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ export class PyWebViewPlatformService implements PlatformService {
|
||||
return false;
|
||||
}
|
||||
|
||||
async handleDeepLink(url: string): Promise<void> {
|
||||
async handleDeepLink(_url: string): Promise<void> {
|
||||
logger.error("handleDeepLink not implemented in PyWebView platform");
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user