Subscribe on changes!

`ShallowRef` should be exported

avatar
Nov 30th 2021

Version

3.2.23

Reproduction link

github.com

Steps to reproduce

import { defineComponent, shallowRef } from 'vue';

const App = defineComponent({
  setup() {
    const foo = shallowRef('bar');
    return {
      foo,
    };
  },
});

export { App };
  • export shallowRef in setup
  • generate dts
  • it emits errors.

(There is no problem with ref.)

What is expected?

emit no error.

What is actually happening?

src/main.ts:3:7 - error TS4023: Exported variable 'App' has or is using name 'ShallowRefMarker' from external module "~/path/vue-types-issue/node_modules/.pnpm/@vue+reactivity@3.2.23/node_modules/@vue/reactivity/dist/reactivity" but cannot be named.

3 const App = defineComponent({
        ~~~


Found 1 error.