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

test(types/defineProps): add failing tests for runtime declaration to align with type declaration #9757

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

DrJume
Copy link
Contributor

@DrJume DrJume commented Dec 5, 2023

Currently the types returned by defineProps() with a runtime declaration don't match the ones from the type declaration.

This PR adds failings tests for the types from the runtime declaration to align with the type declaration. The type declaration types were updated in the following PR:

It uses a new OptionalKeys utility type to check that the internal props type does not have optional keys.

Also adding a test for ExtractDefaultPropTypes.

…gn with type declaration

* add tests for Extract*PropTypes

ref: vuejs#6421
Copy link

github-actions bot commented Dec 5, 2023

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 86.7 kB 33 kB 29.8 kB
vue.global.prod.js 133 kB 49.8 kB 44.7 kB

Usages

Name Size Gzip Brotli
createApp 48.2 kB 19 kB 17.3 kB
createSSRApp 51.5 kB 20.3 kB 18.5 kB
defineCustomElement 50.6 kB 19.7 kB 18 kB
overall 61.6 kB 23.8 kB 21.7 kB

@DrJume
Copy link
Contributor Author

DrJume commented Dec 5, 2023

Is the prefix test(types/defineProps): of the PR ok? Or should I change it to test(dts-test): ?

@DrJume DrJume changed the title test(types/defineProps): add failing runtime declaration tests to align with type declaration test(types/defineProps): add failing tests for runtime declaration to align with type declaration Dec 5, 2023
@yyx990803
Copy link
Member

/cc @pikax

@pikax
Copy link
Member

pikax commented Jun 12, 2024

More tests are always welcomed, the tests look good, but when I merge the #8486 into this branch it still fails
image

I think this should be merged into #8486 first and then it can be merged with main

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

3 participants