forked from trent_larson/crowd-funder-for-time-pwa
refactor(types): improve type safety and eliminate type assertions
- Replace type assertions with proper type guards in ProfileService - Add isAxiosError type guard and improve error handling - Clean up formatting and improve type safety in deepLinks service - Remove type assertions in AccountViewView Vue component - Improve code formatting and consistency across services
This commit is contained in:
@@ -199,8 +199,10 @@ export class DeepLinkHandler {
|
||||
}
|
||||
|
||||
// Continue with parameter validation as before...
|
||||
const pathSchema = deepLinkPathSchemas[path as keyof typeof deepLinkPathSchemas];
|
||||
const querySchema = deepLinkQuerySchemas[path as keyof typeof deepLinkQuerySchemas];
|
||||
const pathSchema =
|
||||
deepLinkPathSchemas[path as keyof typeof deepLinkPathSchemas];
|
||||
const querySchema =
|
||||
deepLinkQuerySchemas[path as keyof typeof deepLinkQuerySchemas];
|
||||
|
||||
let validatedPathParams: Record<string, string> = {};
|
||||
let validatedQueryParams: Record<string, string> = {};
|
||||
@@ -235,7 +237,7 @@ export class DeepLinkHandler {
|
||||
await this.router.replace({
|
||||
name: routeName,
|
||||
params: validatedPathParams,
|
||||
query: validatedQueryParams
|
||||
query: validatedQueryParams,
|
||||
});
|
||||
} catch (error) {
|
||||
logger.error(
|
||||
|
||||
Reference in New Issue
Block a user