woocommerce/plugins/woocommerce-blocks/docs
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
..
block-client-apis Update notices documentation to reflect changes to Snackbar Notices (https://github.com/woocommerce/woocommerce-blocks/pull/4455) 2021-07-12 12:49:47 +01:00
blocks Add Typescript to /blocks-registry/payment-methods (https://github.com/woocommerce/woocommerce-blocks/pull/4702) 2021-09-15 18:36:02 +02:00
contributors Update getting-started.md (https://github.com/woocommerce/woocommerce-blocks/pull/4499) 2021-07-26 14:25:24 +02:00
extensibility Experimental newsletter subscription checkbox block POC and Store API supporting changes (https://github.com/woocommerce/woocommerce-blocks/pull/4607) 2021-08-30 15:35:20 +01:00
testing Release: 5.9.0 (https://github.com/woocommerce/woocommerce-blocks/pull/4731) 2021-09-14 15:01:29 +01:00
theming Update Panel component class names to follow guidelines (https://github.com/woocommerce/woocommerce-blocks/pull/3860) 2021-02-17 14:48:53 +01:00
readme.md Update Release Template and Docs (https://github.com/woocommerce/woocommerce-blocks/pull/3524) 2020-12-09 11:32:16 +00:00

readme.md

WooCommerce Blocks Handbook

The WooCommerce Blocks Handbook provides documentation for designers and developers on how to extend or contribute to blocks, and how internal developers should handle new releases.

Document Description
Contributing These documents explain how you can contribute to the development of the blocks plugin, development best practices, and how to help with testing.
Blocks This documentation covers functionality specific to certain Blocks.
Block Client APIs This documentation covers API interfaces within Blocks. In most cases, these docs describe APIs and interfaces that are internal only, and thus are provided to assist with developing the blocks in this repository. Documentation will tend to focus on high level overviews.
Store API (REST API) These documents cover the Store API used to get product data on the frontend.
Extensibility These documents cover extensibility of WooCommerce Blocks.
Theming These documents cover theming for blocks, styles, CSS classnames and other theming best practices.