Skip to content

updating from 2.4.15 to 2.4.16 breaks type augmentation #274

@OlliL

Description

@OlliL

I updated my npm dependencies and started getting compilation errors referring to vue-i18n like the following one:

src/components/DivFilter.vue:11:16 - error TS2339: Property '$t' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<ExtractPropTypes<{ placeholder: { type: StringConstructor; default: string; }; modelValue: { 
type: StringConstructor; required: true; }; showValidToggle: { type: BooleanConstructor; default: boolean; }; }>, { ...; }>, ... 24 more ..., { ...; }>'.

11             {{ $t("General.new") }}

I traced it down to updating volar from 2.4.15 to 2.4.16.

> npm install @volar/language-core@2.4.16 @volar/source-map@2.4.16 @volar/typescript@2.4.16

changed 3 packages, and audited 594 packages in 4s

192 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

------> npm run build will start raising those errors now.

Switching those 3 volar dependencies back to 2.4.15 the makes the issue disappear again.

Installing 2.4.16 and manually rolling back the 2.4.16 changes in proxyCreateProgram.js makes the error disappear as well.
So it must have to do with adding containingSourceFile to theresolveModuleName function arguments.

> node --version
v23.11.1
> npm --version
10.9.2
> uname -srm
FreeBSD 14.3-RELEASE amd64

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions