Within my project, I have a file named shims-vue.d.ts
located in the src
folder:
declare module '*.vue' {
import type { DefineComponent } from 'vue'
const component: DefineComponent<{}, {}, any>
export default component
}
Interestingly, even after renaming shims-vue.d.ts
to foo.d.ts
, the declarations continue to function as expected. This makes me question if there is any specific significance to using the .d.ts
extension apart from enhancing readability.
Regardless of what I rename the file to, the declarations still take effect without the need for manually importing the revised .d.ts
file.