Commit Graph

2 Commits

Author SHA1 Message Date
Raluca Stan e187b9ef88 Update/typescript checkout shipping (https://github.com/woocommerce/woocommerce-blocks/pull/3925)
* Type shipping related hooks and packages

* Move component interface from shared shipping types file

* Fix Typescript import errors

* Type FormattedMonetaryAmountProps

* Change FormattedMonetaryAmountProps's value prop type

Looks like TotalsItem was the only on sending '-' as a value and it looks like it’s no longer passed through.

* Move `displayType` as a prop on FormattedMonetaryAmount

* Spacing

* Spacing

Co-authored-by: Mike Jolley <mike.jolley@me.com>
2021-03-09 10:55:24 +00:00
Albert Juhé Lluveras 0e1b1e3579 Add types to packages directory (https://github.com/woocommerce/woocommerce-blocks/pull/3914)
* Add Typescript to Panel and Icon

* Fix Icon component import

* Convert packages/checkout/utils/validation/index to TypeScript

* Convert checkout registry to TypeScript

* Add return type to mustContain

* Add TypeScript to Totals components from @woocommerce/blocks-checkout

* Add TypeScript to @woocommerce/price-format

* Use types from @woocommerce/type-defs when possible

* Allow empty objects when loading

* Fix formatting in payment-method-data-context.js

* Add missing return types

* Fix up price warnings

* Fix more warnings in FormattedMonetaryAmount

Co-authored-by: Raluca Stan <ralucastn@gmail.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
2021-03-05 14:03:48 +00:00