I'm writing a Vue.js application using ts and Vuetify.
I want to add a new prototype to all objects.
declare global {
interface Object {
toOneObject(): object;
}
}
export default () => {
Object.prototype.toOneObject = function () {
return this
}
}
As soon as I import it no matter where, an error occurs in Vuetify.
Uncaught TypeError: iconSet[key].split is not a function
at convertToComponentDeclarations (fa-svg.js?1845:9)
at eval (fa-svg.js?1845:16)
at Module../node_modules/vuetify/lib/services/icons/presets/fa-svg.js (chunk-vendors.js:8658)
at __webpack_require__ (app.js:854)
at fn (app.js:151)
at eval (index.js?6eb1:1)
at Module../node_modules/vuetify/lib/services/icons/presets/index.js (chunk-vendors.js:8694)
at __webpack_require__ (app.js:854)
at fn (app.js:151)
at eval (index.js?2e02:1)
I don't quite understand how this error occurs and how it is related.
Before that I made a prototype for all arrays and it works fine
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…