fix: Add WNW_CONFIG type definitions and fix TypeScript errors
This commit is contained in:
28
admin-spa/src/types/window.d.ts
vendored
28
admin-spa/src/types/window.d.ts
vendored
@@ -16,11 +16,39 @@ interface WNW_WC_MENUS {
|
||||
items?: any[];
|
||||
}
|
||||
|
||||
interface WNW_CONFIG {
|
||||
standaloneMode?: boolean;
|
||||
restUrl?: string;
|
||||
wpAdminUrl?: string;
|
||||
siteUrl?: string;
|
||||
siteName?: string;
|
||||
isAuthenticated?: boolean;
|
||||
currentUser?: {
|
||||
id: number;
|
||||
name: string;
|
||||
email: string;
|
||||
};
|
||||
user?: {
|
||||
id: number;
|
||||
name: string;
|
||||
email: string;
|
||||
};
|
||||
store?: {
|
||||
currency: string;
|
||||
currencySymbol: string;
|
||||
currencyPosition: string;
|
||||
thousandSeparator: string;
|
||||
decimalSeparator: string;
|
||||
decimals: number;
|
||||
};
|
||||
}
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
WNW_API?: WNW_API_Config;
|
||||
wnw?: WNW_Config;
|
||||
WNW_WC_MENUS?: WNW_WC_MENUS;
|
||||
WNW_CONFIG?: WNW_CONFIG;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user