testing-library / svelte-testing-library

:chipmunk: Simple and complete Svelte DOM testing utilities that encourage good testing practices
https://testing-library.com/docs/svelte-testing-library/intro
MIT License
620 stars 33 forks source link

fix(types): build types from JS source #376

Closed mcous closed 5 months ago

mcous commented 6 months ago

Overview

This PR moves the source of truth for typing from a separately maintained types/index.d.ts file to JSDoc comments in src. I'm hopeful this will ease the maintenance burden of types, especially as we're supporting three major versions of Svelte.

Svelte itself is undergoing some major-ish typing changes, so I'm keeping this as a draft for now

Change log

Future work

For now, I think vanilla JS is the best fit for this project, so I don't see any compelling reason to do anything drastic like switch to TS and introduce a build step. That being said, I do see this as a potential first step in introducing type-checking to the codebase via TS's checkJs option

github-actions[bot] commented 5 months ago

:tada: This PR is included in version 5.2.0-next.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] commented 5 months ago

:tada: This PR is included in version 5.2.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: