hypothesis / frontend-testing

Common utilities for testing frontend UI code
0 stars 0 forks source link

Emit type declaration files when building library #9

Closed acelaya closed 1 year ago

acelaya commented 1 year ago

This PR introduces these changes:

  1. Makes sure type declaration files are generated when building the library.
  2. Defines the types entry point in package.json, so that consumers con discover those type declarations.
  3. Adds a comment in the accessibility Scenario type, recommending returning a VNode when possible and explaining why.

Point 3 was the initial motivation for this PR, but then I realized that would not be available to consumers without publishing type declarations.

Our projects still don't use TS in tests, so the benefits this provides are limited at the moment, but I think it makes sense anyway as that's the direction we want to eventually go.