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

Default export of the module has or is using private name 'RefType'. #1222

Closed
zhiyuanzmj opened this issue Apr 21, 2022 · 1 comment
Closed
Labels

Comments

@zhiyuanzmj
Copy link
Contributor

zhiyuanzmj commented Apr 21, 2022

I get the error Default export of the module has or is using private name 'RefType'.
When I run vue-tsc --declaration --emitDeclarationOnly --outDir dist

https://stackblitz.com/edit/vitejs-vite-grf6ym?file=src%2Fcomponents%2FHelloWorld.vue

@johnsoncodehk
Copy link
Member

Getting same error in .ts, please report to vue repo.

test.ts

import { defineComponent } from 'vue';

// Default export of the module has or is using private name 'RefType'.ts(4082)
export default defineComponent({
  setup() {
    const count = $ref(0);

    function getCount() {
      // Is error, use `$$(count).value` can fix. but I think it should be allowed.
      return count;
    }

    return {
      getCount,
      count: $$(count),
    };
  },
});

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