Skip to content

Fix/prevent overwriting default values and parameters#165

Merged
ishiko732 merged 8 commits intomainfrom
Fix/default-params-may-be-overwritten
Apr 7, 2025
Merged

Fix/prevent overwriting default values and parameters#165
ishiko732 merged 8 commits intomainfrom
Fix/default-params-may-be-overwritten

Conversation

@ishiko732 ishiko732 requested review from Luc-Mcgrady and Copilot April 5, 2025 12:02
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • package.json: Language not supported

@codecov
Copy link

codecov bot commented Apr 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (b137a1a) to head (30e7aeb).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #165   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           15        15           
  Lines          735       735           
  Branches        85        85           
=========================================
  Hits           735       735           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@Luc-Mcgrady Luc-Mcgrady left a comment

Choose a reason for hiding this comment

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

👍

ishiko732 and others added 4 commits April 5, 2025 22:16
Co-authored-by: Luc Mcgrady <lucmcgrady@gmail.com>
Co-authored-by: Luc Mcgrady <lucmcgrady@gmail.com>
Co-authored-by: Luc Mcgrady <lucmcgrady@gmail.com>
Co-authored-by: Luc Mcgrady <lucmcgrady@gmail.com>
@ishiko732 ishiko732 requested a review from Luc-Mcgrady April 5, 2025 14:19
Copy link
Member

@Luc-Mcgrady Luc-Mcgrady left a comment

Choose a reason for hiding this comment

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

LGTM! (So long as the typescript doesn't block stuff from compiling) (sorry 😭)

@ishiko732 ishiko732 requested a review from L-M-Sherlock April 5, 2025 18:03
@ishiko732
Copy link
Member Author

ishiko732 commented Apr 5, 2025

LGTM! (So long as the typescript doesn't block stuff from compiling) (sorry 😭)

If you use TSX( non-strict mode ), since it doesn’t check runtime TypeScript errors, you’ll find that it won’t throw an error, and the value won’t be modified successfully. However, if you run the project using ts-node, it will throw an error to notify the user.

const weights = default_w
weights[3] = 100
console.log(weights[3])
console.log(default_w[3])

image

@ishiko732 ishiko732 merged commit da455aa into main Apr 7, 2025
5 checks passed
@ishiko732 ishiko732 deleted the Fix/default-params-may-be-overwritten branch April 7, 2025 12:47
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.

5 participants