Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jun 26, 2024
Merged

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

merged 1 commit into from
Jun 26, 2024

Conversation

mcous
Copy link
Collaborator

@mcous mcous commented May 28, 2024

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

  • Move JSDoc comments from types/index.d.ts to src/**
  • Add types build step with tsc and enableJs

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

@mcous mcous force-pushed the build-types branch 5 times, most recently from 5643c59 to 5192455 Compare May 28, 2024 02:42
.github/workflows/release.yml Outdated Show resolved Hide resolved
@mcous mcous changed the base branch from main to testing-core-mod June 9, 2024 18:39
@mcous mcous force-pushed the build-types branch 2 times, most recently from 22bd3d5 to 2fcc251 Compare June 9, 2024 19:00
@mcous mcous force-pushed the testing-core-mod branch 2 times, most recently from 70f6d81 to 18b118b Compare June 9, 2024 19:02
@mcous mcous force-pushed the testing-core-mod branch 3 times, most recently from ba6f67f to 6533bb3 Compare June 19, 2024 18:31
Base automatically changed from testing-core-mod to next June 20, 2024 15:17
@mcous mcous force-pushed the build-types branch 2 times, most recently from 979431a to a2a5039 Compare June 22, 2024 16:30
@mcous mcous marked this pull request as ready for review June 22, 2024 16:32
@mcous mcous force-pushed the build-types branch 3 times, most recently from 5df1128 to 06644b9 Compare June 26, 2024 00:11
@mcous mcous changed the title refactor(types): build types from JS source fix(types): build types from JS source Jun 26, 2024
@mcous mcous merged commit a8f21f8 into next Jun 26, 2024
24 checks passed
@mcous mcous deleted the build-types branch June 26, 2024 01:42
Copy link

🎉 This PR is included in version 5.2.0-next.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link

🎉 This PR is included in version 5.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant