As shown in the figure:
From the prompt, ElementPlus seems to be a
{
version: string;
install: (
app: App<any>,
options?: Partial<ConfigProviderProps> | undefined,
) => void;
}
type, but how should this type adapt to the plugin: Plugin<Options> in the 'use' function?
Although 'ElementPlus as any' can solve the problem, it may not be a good solution.
I hope to describe the types of objects like "ElementPlus" correctly and use precise formats to adapt the formal parameter lists of different functions.
My project relevant dependences are:
{
"dependencies": {
"vue": "^3.3.11",
"element-plus": "^2.4.4"
},
"devDependencies": {
"@tsconfig/node18": "^18.2.2",
"@types/jsdom": "^21.1.6",
"@types/node": "^18.19.3",
"@vue/tsconfig": "^0.5.0",
"typescript": "~5.3.0",
"vue-tsc": "^1.8.25"
}
}
