revivek / oy

Render HTML emails on the server with React.
MIT License
834 stars 47 forks source link

Update OyElementAttributes TS type to match React type #89

Closed swac closed 5 years ago

swac commented 5 years ago

The type definition for OyElementAttributes does not match React's TS definitions for TdHTMLAttributes<HTMLTableDataCellElement> as of @types/react 16.9. This causes errors like:

node_modules/oy-vey/index.d.ts:51:13 - error TS2320: Interface 'OyTDElementAttributes' cannot simultaneously extend types 'TdHTMLAttributes<HTMLTableDataCellElement>' and 'OyElementAttributes'.
  Named property 'valign' of types 'TdHTMLAttributes<HTMLTableDataCellElement>' and 'OyElementAttributes' are not identical.

51   interface OyTDElementAttributes
               ~~~~~~~~~~~~~~~~~~~~~

This PR updates Oy's type definition to satisfy React's expectations.

harisiva commented 4 years ago

@revivek: I'd like to pick up these changes to get around build failures in our repo.

Could you publish a new version into npm please? Would be much appreciated.

Thanks, Hari.

revivek commented 4 years ago

Sure thing—done! It's at version 0.11.2

harisiva commented 4 years ago

Great thanks @revivek. Works now.