Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Commit 55cd214

Browse files
Alex Floriscagithub-actions[bot]
andauthored
Remove the experimental flag that's used to include thunks in wp.data (#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>
1 parent d9f0aa8 commit 55cd214

File tree

5 files changed

+3
-14
lines changed

5 files changed

+3
-14
lines changed

assets/js/data/checkout/index.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ export const config = {
1616
reducer,
1717
selectors,
1818
actions,
19-
// TODO: Gutenberg with Thunks was released in WP 6.0. Once 6.1 is released, remove the experimental flag here
20-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
21-
// @ts-ignore We pass this in case there is an older version of Gutenberg running.
22-
__experimentalUseThunks: true,
2319
};
2420

2521
const store = createReduxStore( STORE_KEY, config );

assets/js/data/payment/index.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ export const config = {
2020
actions,
2121
// eslint-disable-next-line @typescript-eslint/no-explicit-any
2222
controls: { ...dataControls, ...sharedControls } as any,
23-
// TODO: Gutenberg with Thunks was released in WP 6.0. Once 6.1 is released, remove the experimental flag here
24-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
25-
// @ts-ignore We pass this in case there is an older version of Gutenberg running.
26-
__experimentalUseThunks: true,
2723
};
2824

2925
const store = createReduxStore( STORE_KEY, config );

assets/js/data/validation/index.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ export const config = {
1616
reducer,
1717
selectors,
1818
actions,
19-
// TODO: Gutenberg with Thunks was released in WP 6.0. Once 6.1 is released, remove the experimental flag here
20-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
21-
// @ts-ignore We pass this in case there is an older version of Gutenberg running.
22-
__experimentalUseThunks: true,
2319
};
2420

2521
const store = createReduxStore( STORE_KEY, config );

assets/js/types/type-defs/product-response.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export interface ProductResponseItemBaseData {
2020
value: string;
2121
display?: string;
2222
hidden?: boolean;
23+
className?: string;
2324
}
2425

2526
export type ProductResponseItemData = ProductResponseItemBaseData &

checkstyle.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@
647647
<error line="164" column="25" severity="error" message="Property &apos;SET_PRISTINE&apos; does not exist on type &apos;{ readonly SET_IDLE: &quot;SET_IDLE&quot;; readonly SET_REDIRECT_URL: &quot;SET_REDIRECT_URL&quot;; readonly SET_COMPLETE: &quot;SET_CHECKOUT_COMPLETE&quot;; readonly SET_BEFORE_PROCESSING: &quot;SET_BEFORE_PROCESSING&quot;; ... 11 more ...; readonly SET_IS_CART: &quot;SET_IS_CART&quot;; }&apos;." source="TS2339" />
648648
</file>
649649
<file name="assets/js/data/checkout/index.ts">
650-
<error line="25" column="44" severity="error" message="Argument of type &apos;{ reducer: (state: CheckoutState | undefined, action: actions.CheckoutAction) =&gt; CheckoutState; selectors: typeof selectors; actions: typeof actions; __experimentalUseThunks: boolean; }&apos; is not assignable to parameter of type &apos;StoreConfig&lt;CheckoutState&gt;&apos;.
650+
<error line="21" column="44" severity="error" message="Argument of type &apos;{ reducer: (state: CheckoutState | undefined, action: actions.CheckoutAction) =&gt; CheckoutState; selectors: typeof selectors; actions: typeof actions; }&apos; is not assignable to parameter of type &apos;StoreConfig&lt;CheckoutState&gt;&apos;.
651651
Types of property &apos;actions&apos; are incompatible.
652652
Type &apos;typeof import(&quot;/home/runner/work/woocommerce-blocks/woocommerce-blocks/assets/js/data/checkout/actions&quot;)&apos; is not assignable to type &apos;{ [k: string]: (...args: readonly any[]) =&gt; AnyAction | Generator&lt;any, any, unknown&gt;; }&apos;.
653653
Property &apos;__internalProcessCheckoutResponse&apos; is incompatible with index signature.
@@ -700,7 +700,7 @@
700700
<error line="162" column="27" severity="error" message="Binding element &apos;dispatch&apos; implicitly has an &apos;any&apos; type." source="TS7031" />
701701
</file>
702702
<file name="assets/js/data/payment/index.ts">
703-
<error line="29" column="44" severity="error" message="Argument of type &apos;{ reducer: Reducer&lt;PaymentMethodDataState, AnyAction&gt;; selectors: typeof selectors; actions: typeof actions; controls: any; __experimentalUseThunks: boolean; }&apos; is not assignable to parameter of type &apos;StoreConfig&lt;PaymentMethodDataState&gt;&apos;.
703+
<error line="25" column="44" severity="error" message="Argument of type &apos;{ reducer: Reducer&lt;PaymentMethodDataState, AnyAction&gt;; selectors: typeof selectors; actions: typeof actions; controls: any; }&apos; is not assignable to parameter of type &apos;StoreConfig&lt;PaymentMethodDataState&gt;&apos;.
704704
Types of property &apos;actions&apos; are incompatible.
705705
Type &apos;typeof import(&quot;/home/runner/work/woocommerce-blocks/woocommerce-blocks/assets/js/data/payment/actions&quot;)&apos; is not assignable to type &apos;{ [k: string]: (...args: readonly any[]) =&gt; AnyAction | Generator&lt;any, any, unknown&gt;; }&apos;.
706706
Property &apos;__internalUpdateAvailablePaymentMethods&apos; is incompatible with index signature.

0 commit comments

Comments
 (0)