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

Upgrade to TypeScript 5.6 #28

Merged
merged 2 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"querystring-es3": "^0.2.1",
"stream-browserify": "^3.0.0",
"ts-node": "^10.9.1",
"typescript": "5.5.4",
"typescript": "~5.6",
tchajed marked this conversation as resolved.
Show resolved Hide resolved
"url": "^0.11.0",
"util": "^0.12.3",
"vm-browserify": "^1.1.2",
Expand Down
4 changes: 2 additions & 2 deletions src/js/randomizer/history.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ export type SetHistory = Dispatch<
>;

export function pureHistoryApply<T>(
setHistory: Dispatch<SetStateAction<History<T>>>,
a: PureHistoryAction<T>,
setHistory: Dispatch<SetStateAction<History<Partial<T>>>>,
a: PureHistoryAction<Partial<T>>,
Copy link
Author

@jthemphill jthemphill Oct 14, 2024

Choose a reason for hiding this comment

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

Could also remove the generic and make it

export function pureHistoryApply(
  setHistory: SetHistory,
  a: PureHistoryAction<Partial<ScriptState>>,
) { /* ... */ }

Copy link
Owner

Choose a reason for hiding this comment

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

Let's go with that. In principle having it generic is nice but there's only type of history in this project so let's just have it reflect that. I'd prefer having it be monomorphic than generic-but-not-as-generic-as-possible.

) {
setHistory((h) => historyStep(h, a).h);
}
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6795,10 +6795,10 @@ typedarray-to-buffer@^3.1.5:
dependencies:
is-typedarray "^1.0.0"

typescript@5.5.4:
version "5.5.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.4.tgz#d9852d6c82bad2d2eda4fd74a5762a8f5909e9ba"
integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==
typescript@~5.6:
version "5.6.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.3.tgz#5f3449e31c9d94febb17de03cc081dd56d81db5b"
integrity sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==

unbox-primitive@^1.0.2:
version "1.0.2"
Expand Down