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

vue-tsc create unexpect declaration file from js #4051

Closed
FoundTheWOUT opened this issue Mar 8, 2024 · 1 comment
Closed

vue-tsc create unexpect declaration file from js #4051

FoundTheWOUT opened this issue Mar 8, 2024 · 1 comment
Labels

Comments

@FoundTheWOUT
Copy link

input

// .js
import { defineComponent } from "vue";

export const Foo = defineComponent({
	props: {
		foo: String
	}
})

output

export const Comp: import('vue').DefineComponent<
  {
    foo: StringConstructor;
  },
  any, // should be unknown
  any, // should be unknown
  {},
  {},
  import('vue').ComponentOptionsMixin,
  import('vue').ComponentOptionsMixin,
  {},
  string,
  import('vue').PublicProps,
  Readonly<
    import('vue').ExtractPropTypes<{
      foo: StringConstructor;
    }>
  >,
  {},
  {}
>;

using any would broke the type infer.
vuejs/core@6aa2256

do we have any craft except migrating to typescript for preventing this, if this is a tsc problem

@so1ve
Copy link
Member

so1ve commented Mar 8, 2024

vuejs/core#9296

@so1ve so1ve closed this as completed Mar 8, 2024
@so1ve so1ve added the upstream label Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants