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

[spec] Add resolveType tests #50

Open
phoenix-ru opened this issue Nov 1, 2024 · 0 comments
Open

[spec] Add resolveType tests #50

phoenix-ru opened this issue Nov 1, 2024 · 0 comments
Labels
compat: spec Compatibility with official compiler

Comments

@phoenix-ru
Copy link
Owner

Spec file: https://github.com/vuejs/core/blob/main/packages/compiler-sfc/__tests__/compileScript/resolveType.spec.ts

This was mostly implemented in #40, the missing ones include:

  • supporting @vue-ignore:
    #[test]
    fn intersection_type_with_ignore() {
    let resolved = resolve(
    "
    type Foo = { foo: number }
    type Bar = { bar: string }
    defineProps<Foo & /* @vue-ignore */ Bar>()",
    );
    assert_eq!(
    resolved.props.get(&fervid_atom!("foo")),
    Some(&FlagSet::from(Types::Number))
    );
    // TODO Support @vue-ignore
    // assert_eq!(
    // resolved.props.get(&fervid_atom!("bar")),
    // None
    // );
    }
  • supporting imports (probably a future TODO);
@phoenix-ru phoenix-ru added the compat: spec Compatibility with official compiler label Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compat: spec Compatibility with official compiler
Projects
None yet
Development

No branches or pull requests

1 participant