woocommerce/plugins/woocommerce-blocks/docs/blocks
Raluca Stan 615b939383 Add Typescript to /blocks-registry/payment-methods (https://github.com/woocommerce/woocommerce-blocks/pull/4702)
* Type payment method under /block-registry

* Type assertions and add them back to PaymentMethodConfig

* Type ExpressPaymentMethodConfig

* Fix comment on payments types

* Fix CanMakePayment type

* Fix assertion for payment methods and the savedTokenComponent property

Because class properties come from the config object, they will never be null except if somebody explicitly adds them the the object with a value of null.
Which is not the case for savedTokenComponent for example, because it's optional and that's why we check it like this paymentMethods[ activePaymentMethod ]?.savedTokenComponent

* Add the complete CanMakePaymentReturnType and account for null for PaymentMethod.icons

- canMakePayment can also return a Promise and this was not included in the type definition
- in PaymentMethodConfig's constructor we also need to account for extensions passing {icons: null}.

* Revert Fix assertion for payment methods and the savedTokenComponent property

* Fix failing tests because of savedTokenComponent

I've reverted my changes and left the initialization of savedTokenComponent as it was.

* Rename types for more clarity

* Fix ExtensionNamespace and PaymentMethodName types

* Rename Supports and *PaymentMethodOptions type for better clarity
2021-09-15 18:36:02 +02:00
..
README.md Add new doc referencing feature flags and experimental interfaces. (https://github.com/woocommerce/woocommerce-blocks/pull/3348) 2020-10-30 10:35:50 -04:00
checkout.jpg Update documentation indexes and add checkout docs (https://github.com/woocommerce/woocommerce-blocks/pull/2720) 2020-06-16 16:50:09 +01:00
feature-flags-and-experimental-interfaces.md Add Typescript to /blocks-registry/payment-methods (https://github.com/woocommerce/woocommerce-blocks/pull/4702) 2021-09-15 18:36:02 +02:00
reserve-stock.jpg Update documentation indexes and add checkout docs (https://github.com/woocommerce/woocommerce-blocks/pull/2720) 2020-06-16 16:50:09 +01:00
stock-reservation.md Update documentation indexes and add checkout docs (https://github.com/woocommerce/woocommerce-blocks/pull/2720) 2020-06-16 16:50:09 +01:00

README.md

WooCommerce Blocks Handbook

This folder contains documentation for specific Blocks and Blocks functionality.

Document Description
Stock Reservation during Checkout This doc covers the Checkout Stock Reservation system.
Features Flags and Experimental interfaces This doc outlines all the current features that are gated behind a feature or experimental flag as well as any interfaces that are experimental