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

chore: Correct some internal test types #4588

Merged
merged 5 commits into from
Nov 30, 2024
Merged

chore: Correct some internal test types #4588

merged 5 commits into from
Nov 30, 2024

Conversation

rschristian
Copy link
Member

In a (perhaps futile) desire to reduce the number of files that light up my editor like a Christmas tree, this PR tries to correct a couple hundred or so of our type errors. Switching this line over to just jsconfig.json produces 1501 TS errors, which this PR brings down to 1292. Only corrects a small fraction of the type errors, and mostly the quick ones at that, but it's a chunk I suppose.

The only non-comment/type changes should be in adding an initial param to createContext() calls & passing {}/null to h()/createElement().

@@ -37,7 +37,6 @@
"$_args": "__H",
"$_factory": "__h",
"$_depth": "__b",
"$_nextDom": "__d",
Copy link
Member Author

Choose a reason for hiding this comment

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

We should be able to remove post #4553, no?

Comment on lines -239 to -253
/** @type {(vnode: import('../../src/internal').VNode) => void} */
function verifyVNodeTree(vnode) {
if (vnode._nextDom) {
expect.fail('vnode should not have _nextDom:' + vnode._nextDom);
}

if (vnode._children) {
for (let child of vnode._children) {
if (child) {
verifyVNodeTree(child);
}
}
}
}

Copy link
Member Author

Choose a reason for hiding this comment

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

Same here

@coveralls
Copy link

coveralls commented Nov 30, 2024

Coverage Status

coverage: 99.617%. remained the same
when pulling 190250d on chore/test-types
into 65b4f6b on main.

@JoviDeCroock
Copy link
Member

This is awesome! Also good spot on nextDom

@rschristian rschristian merged commit f7ac8dc into main Nov 30, 2024
5 checks passed
@rschristian rschristian deleted the chore/test-types branch November 30, 2024 08:59
@JoviDeCroock JoviDeCroock mentioned this pull request Dec 1, 2024
# 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.

3 participants