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

Use narrowed down variable within if's body #585

Merged
merged 1 commit into from
Jan 10, 2024
Merged

Conversation

Andarist
Copy link
Member

@Andarist Andarist commented Jan 9, 2024

No description provided.

@Andarist Andarist requested a review from emmatown January 9, 2024 14:10
Copy link

changeset-bot bot commented Jan 9, 2024

⚠️ No Changeset found

Latest commit: fbf0799

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

Copy link

codecov bot commented Jan 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2dd112b) 92.16% compared to head (fbf0799) 92.16%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #585   +/-   ##
=======================================
  Coverage   92.16%   92.16%           
=======================================
  Files          39       39           
  Lines        1953     1953           
  Branches      571      571           
=======================================
  Hits         1800     1800           
  Misses        143      143           
  Partials       10       10           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -352,7 +352,7 @@ export async function testdir(dir: Fixture) {
const output = dir[filename];
const fullPath = path.join(temp, filename);
if (typeof output === "string") {
await fs.outputFile(fullPath, dir[filename]);
await fs.outputFile(fullPath, output);
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the same value, it just uses the narrowed-down variable. After using this code in another project I noticed that this line errored with certain TS settings/TS versions.

@emmatown emmatown merged commit 31539f7 into main Jan 10, 2024
8 of 9 checks passed
@emmatown emmatown deleted the Andarist-patch-1 branch January 10, 2024 05:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants