-
Notifications
You must be signed in to change notification settings - Fork 64
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
Update rescript-schema up to V8 #1271
Conversation
@@ -55,16 +55,15 @@ | |||
"jointz": "7.0.4", | |||
"json-decoder": "1.4.1", | |||
"mol_data_all": "1.1.1123", | |||
"@mondrian-framework/model": "2.0.43", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was duplicated
cases/rescript-schema.ts
Outdated
// To bypass the "Assertions require every name in the call target to be declared with an explicit type annotation.ts(2775)" | ||
// when using assert | ||
type Data = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please clarify this requirement?
Re-declaring types go against the ideals of this test repository.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a TS thing. I've managed to work around it by adding !
after assert
. The effect-schema
lib uses the same approach, so probably it's fine. Not super experienced with TS hacks :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just FYI: the issue seems to be that you cannot use a generic assert arg is T
as a method without explicit type annotations: microsoft/TypeScript#34596
Your hack with the exclamation mark disables the type-assertion, data
after the assertion is still unknown
.
Other libraries either do not use an asserts type method at all or they are using a asserts function.
@hoeck I'm interested in seeing the performance changes for v8. Could you merge the PR, please? 👀 |
@DZakh thanks for pinging me, the mail from github somehow slipped off my radar 😅 sorry |
Btw, node v22 runner did break https://github.com/moltar/typescript-runtime-type-benchmarks/actions/runs/10008222868/job/27664468375 |
Yeah noticed this too, the |
Ok, this seems to be a bug in the latest NPM version used by nodejs 22: npm/cli#7672 If I am reading this right, waiting for actions/node-versions#182 should give us a fixed node/npm version the next time we run the action (maybe delete the action cache before, don't know). |
Now it went through. |
No description provided.