Skip to content

v2.1.4 reports error on global properties although properly augmented  #4793

Closed
@douglasg14b

Description

@douglasg14b

Vue - Official extension or vue-tsc version

v2.1.4

VSCode version

1.92.2

Vue version

3.4.38

TypeScript version

5.4.5

System Info

No response

package.json dependencies

{
    "dependencies": {
        "@mdi/font": "7.4.47",
        "@sentry/vite-plugin": "^2.16.1",
        "@sentry/vue": "^8.13.0",
        "@stripe/connect-js": "^3.3.6",
        "@stripe/stripe-js": "^3.5.0",
        "@types/cookie": "^0.6.0",
        "@vueuse/core": "^10.9.0",
        "approximate-number": "^2.1.1",
        "client-zip": "^2.4.5",
        "color-convert": "^2.0.1",
        "cookie": "^0.6.0",
        "dayjs": "^1.11.10",
        "file-type": "^19.0.0",
        "floating-vue": "^5.2.2",
        "form-data": "^4.0.0",
        "geojson": "^0.5.0",
        "grid-layout-plus": "^1.0.5",
        "just-clone": "^6.2.0",
        "maplibre-gl": "^3.6.2",
        "markdown-it": "^14.1.0",
        "maska": "^2.1.11",
        "pinia": "^2.0.23",
        "roboto-fontface": "*",
        "uuid": "^9.0.1",
        "vee-validate": "^4.12.2",
        "vue": "^3.4.0",
        "vue-i18n": "^9.8.0",
        "vue-markdown-render": "^2.1.1",
        "vue-query": "^1.26.0",
        "vue-router": "^4.4.3",
        "vue3-easy-data-table": "^1.5.47",
        "vue3-perfect-scrollbar": "^1.6.1",
        "vuetify": "^3.7.1",
        "vuetify-sonner": "^0.3.12"
    },
    "devDependencies": {
        "@babel/types": "^7.21.4",
        "@types/color-convert": "^2.0.3",
        "@types/markdown-it": "^14.0.1",
        "@types/node": "^18.15.0",
        "@types/uuid": "^9.0.7",
        "@typescript-eslint/eslint-plugin": "^6.13.1",
        "@typescript-eslint/parser": "^6.13.1",
        "@vitejs/plugin-vue": "^4.0.0",
        "@vitejs/plugin-vue-jsx": "^3.1.0",
        "@vue/eslint-config-typescript": "^11.0.0",
        "dotenv": "^16.3.1",
        "dotenv-cli": "^7.3.0",
        "dprint": "^0.43.1",
        "eslint": "^8.54.0",
        "eslint-import-resolver-alias": "^1.1.2",
        "eslint-import-resolver-typescript": "^3.6.1",
        "eslint-plugin-import": "^2.29.1",
        "eslint-plugin-vue": "^9.19.2",
        "sass": "^1.69.5",
        "stripe": "^15.10.0",
        "type-fest": "^4.9.0",
        "typescript": "^5.4.5",
        "unplugin-fonts": "^1.0.3",
        "vite": "^5.0.11",
        "vite-plugin-checker": "^0.6.4",
        "vite-plugin-vuetify": "^2.0.1",
        "vue-tsc": "^1.2.0"
    }
}

Steps to reproduce

Upgrade extension to v2.1.4

What is expected?

That global augmented propeties work

What is actually happening?

They don't.

image

Link to minimal reproduction

No response

Any additional comments?

declare module 'vue' {
   export interface ComponentCustomProperties {
        $filters: {
            number: typeof formatNumber;
            percent: typeof formatPercent;
            currency: typeof formatCurrency;
            pluralize: typeof pluralize;
            abbreviate: typeof abbreviateNumber;
            date: typeof formatDate;
            bytes: typeof prettyBytes;
            timeSpan: typeof formatTimespan;
            timeDays: typeof formatTimespanDays;
        };
        $can: UserAbility['can'];
        $canExclusive: UserAbility['canExclusive'];
        $hasAtLeastRole: UserAbility['hasAtLeastRole'];
        $notImplemented: (name: string) => void;
        $triggerDialog: typeof dialogsEventBus.emit;
    }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions