Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix some TS things #2559

Merged
merged 9 commits into from
Apr 19, 2022
Merged

Fix some TS things #2559

merged 9 commits into from
Apr 19, 2022

Conversation

emmatown
Copy link
Member

Some misc fixes to things:

  • The unitless thing shouldn't be as const, the keys aren't what you want from the types.
  • Running tsc on CI
  • The native package isn't part of the root TS project since @types/react-native conflicts with DOM types
    • If we convert the native package, that'll need it's own TS config (but only the native package, no other packages should need their own TS configs)
  • The type tests aren't part of the root TS config, tbh I kinda think we should just remove DTSLint and use @ts-expect-error for when we expect errors and probably just a function like <T>(t: T) => void to assert types (i know that's not really correct but it's probably good enough for our cases)

@changeset-bot
Copy link

changeset-bot bot commented Nov 20, 2021

⚠️ No Changeset found

Latest commit: 0652f74

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 20, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 0652f74:

Sandbox Source
Emotion Configuration

@codecov
Copy link

codecov bot commented Nov 20, 2021

Codecov Report

Merging #2559 (0652f74) into ts-migration (4c56bcb) will not change coverage.
The diff coverage is 100.00%.

Impacted Files Coverage Δ
packages/unitless/src/index.ts 100.00% <100.00%> (ø)

Comment on lines +17 to +18
"packages/*/types/test/*",
"packages/*/types/test*",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what the second one is doing here? 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not all of the type tests are in a test directory, maybe the first one is unnecessary, idk how TS's globs work

@Andarist
Copy link
Member

Andarist commented Nov 23, 2021

The type tests aren't part of the root TS config, tbh I kinda think we should just remove DTSLint and use @ts-expect-error for when we expect errors and probably just a function like (t: T) => void to assert types (i know that's not really correct but it's probably good enough for our cases)

The main reason I see to stick with dtslint is to test types against multiple TS versions - and to test them against next version. Since some of our types are a little bit more advanced the latter seems especially nice.

I'm using the strategy that you have mentioned in other repos but mostly because I was too lazy to set up dtslint - since that is already done here, what's the cost of keeping it around?

@emmatown
Copy link
Member Author

since that is already done here, what's the cost of keeping it around?

If we can easily upgrade, sure I guess

@Andarist Andarist merged commit 17fee4b into ts-migration Apr 19, 2022
@Andarist Andarist deleted the fix-ts-tooling-things branch April 19, 2022 08:47
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants