chore: add type for import by eslint (#253)
This commit is contained in:
parent
0f56f15197
commit
475a769137
@ -1,5 +1,5 @@
|
|||||||
import { createI18n } from 'vue-i18n'
|
import { createI18n } from 'vue-i18n'
|
||||||
import { UserModule } from '~/types'
|
import type { UserModule } from '~/types'
|
||||||
|
|
||||||
// Import i18n resources
|
// Import i18n resources
|
||||||
// https://vitejs.dev/guide/features.html#glob-import
|
// https://vitejs.dev/guide/features.html#glob-import
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import NProgress from 'nprogress'
|
import NProgress from 'nprogress'
|
||||||
import { UserModule } from '~/types'
|
import type { UserModule } from '~/types'
|
||||||
|
|
||||||
export const install: UserModule = ({ isClient, router }) => {
|
export const install: UserModule = ({ isClient, router }) => {
|
||||||
if (isClient) {
|
if (isClient) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { createPinia } from 'pinia'
|
import { createPinia } from 'pinia'
|
||||||
import { UserModule } from '~/types'
|
import type { UserModule } from '~/types'
|
||||||
|
|
||||||
// Setup Pinia
|
// Setup Pinia
|
||||||
// https://pinia.esm.dev/
|
// https://pinia.esm.dev/
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { UserModule } from '~/types'
|
import type { UserModule } from '~/types'
|
||||||
|
|
||||||
// https://github.com/antfu/vite-plugin-pwa#automatic-reload-when-new-content-available
|
// https://github.com/antfu/vite-plugin-pwa#automatic-reload-when-new-content-available
|
||||||
export const install: UserModule = ({ isClient, router }) => {
|
export const install: UserModule = ({ isClient, router }) => {
|
||||||
|
2
src/shims.d.ts
vendored
2
src/shims.d.ts
vendored
@ -4,7 +4,7 @@ declare interface Window {
|
|||||||
|
|
||||||
// with vite-plugin-md, markdowns can be treat as Vue components
|
// with vite-plugin-md, markdowns can be treat as Vue components
|
||||||
declare module '*.md' {
|
declare module '*.md' {
|
||||||
import { ComponentOptions } from 'vue'
|
import type { ComponentOptions } from 'vue'
|
||||||
const component: ComponentOptions
|
const component: ComponentOptions
|
||||||
export default component
|
export default component
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
import { ViteSSGContext } from 'vite-ssg'
|
import type { ViteSSGContext } from 'vite-ssg'
|
||||||
|
|
||||||
export type UserModule = (ctx: ViteSSGContext) => void
|
export type UserModule = (ctx: ViteSSGContext) => void
|
||||||
|
Loading…
x
Reference in New Issue
Block a user