Skip to content

vue.d.ts has bad reference to module 'v3-component-public-instance' #12666

@sandersn

Description

@sandersn

Version

2.7.6

Reproduction link

dev.azure.com

Steps to reproduce

Install vue@2.7.6 and try to compile with typescript:

$ mkdir fresh; cd fresh
$ npm i vue@2.7.6
$ echo "import * as v from 'vue'" >index.ts
$ tsc index.ts --target esnext --moduleResolution node

What is expected?

No errors

What is actually happening?

Error from tsc:
node_modules/vue/types/vue.d.ts(17,41): error TS2307: Cannot find module 'v3-component-public-instance' or its corresponding type declarations.


Found in various vue 2 dependents on Definitely Typed's overnight test run.

'v3-component-public-instance' is a local module, so the reference should be './v3-component-public-instance'

When editing vue.d.ts inside the vue repo, tsconfig is set up such that 'v3-component-public-instance' also resolves, but this doesn't work when vue is imported normally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions