Remove the experimental flag that's used to include thunks in wp.data (https://github.com/woocommerce/woocommerce-blocks/pull/7617)
* Remove the experimental flag that's used to include thunks in wp.data * bot: update checkstyle.xml * Fix ts error from previous PR * bot: update checkstyle.xml Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
9a7f1e17e1
commit
fc44b9fc4d
|
@ -16,10 +16,6 @@ export const config = {
|
||||||
reducer,
|
reducer,
|
||||||
selectors,
|
selectors,
|
||||||
actions,
|
actions,
|
||||||
// TODO: Gutenberg with Thunks was released in WP 6.0. Once 6.1 is released, remove the experimental flag here
|
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
||||||
// @ts-ignore We pass this in case there is an older version of Gutenberg running.
|
|
||||||
__experimentalUseThunks: true,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const store = createReduxStore( STORE_KEY, config );
|
const store = createReduxStore( STORE_KEY, config );
|
||||||
|
|
|
@ -20,10 +20,6 @@ export const config = {
|
||||||
actions,
|
actions,
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
controls: { ...dataControls, ...sharedControls } as any,
|
controls: { ...dataControls, ...sharedControls } as any,
|
||||||
// TODO: Gutenberg with Thunks was released in WP 6.0. Once 6.1 is released, remove the experimental flag here
|
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
||||||
// @ts-ignore We pass this in case there is an older version of Gutenberg running.
|
|
||||||
__experimentalUseThunks: true,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const store = createReduxStore( STORE_KEY, config );
|
const store = createReduxStore( STORE_KEY, config );
|
||||||
|
|
|
@ -16,10 +16,6 @@ export const config = {
|
||||||
reducer,
|
reducer,
|
||||||
selectors,
|
selectors,
|
||||||
actions,
|
actions,
|
||||||
// TODO: Gutenberg with Thunks was released in WP 6.0. Once 6.1 is released, remove the experimental flag here
|
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
||||||
// @ts-ignore We pass this in case there is an older version of Gutenberg running.
|
|
||||||
__experimentalUseThunks: true,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const store = createReduxStore( STORE_KEY, config );
|
const store = createReduxStore( STORE_KEY, config );
|
||||||
|
|
|
@ -20,6 +20,7 @@ export interface ProductResponseItemBaseData {
|
||||||
value: string;
|
value: string;
|
||||||
display?: string;
|
display?: string;
|
||||||
hidden?: boolean;
|
hidden?: boolean;
|
||||||
|
className?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductResponseItemData = ProductResponseItemBaseData &
|
export type ProductResponseItemData = ProductResponseItemBaseData &
|
||||||
|
|
|
@ -647,7 +647,7 @@
|
||||||
<error line="164" column="25" severity="error" message="Property 'SET_PRISTINE' does not exist on type '{ readonly SET_IDLE: "SET_IDLE"; readonly SET_REDIRECT_URL: "SET_REDIRECT_URL"; readonly SET_COMPLETE: "SET_CHECKOUT_COMPLETE"; readonly SET_BEFORE_PROCESSING: "SET_BEFORE_PROCESSING"; ... 11 more ...; readonly SET_IS_CART: "SET_IS_CART"; }'." source="TS2339" />
|
<error line="164" column="25" severity="error" message="Property 'SET_PRISTINE' does not exist on type '{ readonly SET_IDLE: "SET_IDLE"; readonly SET_REDIRECT_URL: "SET_REDIRECT_URL"; readonly SET_COMPLETE: "SET_CHECKOUT_COMPLETE"; readonly SET_BEFORE_PROCESSING: "SET_BEFORE_PROCESSING"; ... 11 more ...; readonly SET_IS_CART: "SET_IS_CART"; }'." source="TS2339" />
|
||||||
</file>
|
</file>
|
||||||
<file name="assets/js/data/checkout/index.ts">
|
<file name="assets/js/data/checkout/index.ts">
|
||||||
<error line="25" column="44" severity="error" message="Argument of type '{ reducer: (state: CheckoutState | undefined, action: actions.CheckoutAction) => CheckoutState; selectors: typeof selectors; actions: typeof actions; __experimentalUseThunks: boolean; }' is not assignable to parameter of type 'StoreConfig<CheckoutState>'.
|
<error line="21" column="44" severity="error" message="Argument of type '{ reducer: (state: CheckoutState | undefined, action: actions.CheckoutAction) => CheckoutState; selectors: typeof selectors; actions: typeof actions; }' is not assignable to parameter of type 'StoreConfig<CheckoutState>'.
|
||||||
Types of property 'actions' are incompatible.
|
Types of property 'actions' are incompatible.
|
||||||
Type 'typeof import("/home/runner/work/woocommerce-blocks/woocommerce-blocks/assets/js/data/checkout/actions")' is not assignable to type '{ [k: string]: (...args: readonly any[]) => AnyAction | Generator<any, any, unknown>; }'.
|
Type 'typeof import("/home/runner/work/woocommerce-blocks/woocommerce-blocks/assets/js/data/checkout/actions")' is not assignable to type '{ [k: string]: (...args: readonly any[]) => AnyAction | Generator<any, any, unknown>; }'.
|
||||||
Property '__internalProcessCheckoutResponse' is incompatible with index signature.
|
Property '__internalProcessCheckoutResponse' is incompatible with index signature.
|
||||||
|
@ -700,7 +700,7 @@
|
||||||
<error line="162" column="27" severity="error" message="Binding element 'dispatch' implicitly has an 'any' type." source="TS7031" />
|
<error line="162" column="27" severity="error" message="Binding element 'dispatch' implicitly has an 'any' type." source="TS7031" />
|
||||||
</file>
|
</file>
|
||||||
<file name="assets/js/data/payment/index.ts">
|
<file name="assets/js/data/payment/index.ts">
|
||||||
<error line="29" column="44" severity="error" message="Argument of type '{ reducer: Reducer<PaymentMethodDataState, AnyAction>; selectors: typeof selectors; actions: typeof actions; controls: any; __experimentalUseThunks: boolean; }' is not assignable to parameter of type 'StoreConfig<PaymentMethodDataState>'.
|
<error line="25" column="44" severity="error" message="Argument of type '{ reducer: Reducer<PaymentMethodDataState, AnyAction>; selectors: typeof selectors; actions: typeof actions; controls: any; }' is not assignable to parameter of type 'StoreConfig<PaymentMethodDataState>'.
|
||||||
Types of property 'actions' are incompatible.
|
Types of property 'actions' are incompatible.
|
||||||
Type 'typeof import("/home/runner/work/woocommerce-blocks/woocommerce-blocks/assets/js/data/payment/actions")' is not assignable to type '{ [k: string]: (...args: readonly any[]) => AnyAction | Generator<any, any, unknown>; }'.
|
Type 'typeof import("/home/runner/work/woocommerce-blocks/woocommerce-blocks/assets/js/data/payment/actions")' is not assignable to type '{ [k: string]: (...args: readonly any[]) => AnyAction | Generator<any, any, unknown>; }'.
|
||||||
Property '__internalUpdateAvailablePaymentMethods' is incompatible with index signature.
|
Property '__internalUpdateAvailablePaymentMethods' is incompatible with index signature.
|
||||||
|
|
Loading…
Reference in New Issue