chore: add type for import by eslint (#253)

This commit is contained in:
云游君 2021-12-16 03:29:24 +08:00 committed by GitHub
parent 0f56f15197
commit 475a769137
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 6 deletions

View File

@ -1,5 +1,5 @@
import { createI18n } from 'vue-i18n'
import { UserModule } from '~/types'
import type { UserModule } from '~/types'
// Import i18n resources
// https://vitejs.dev/guide/features.html#glob-import

View File

@ -1,5 +1,5 @@
import NProgress from 'nprogress'
import { UserModule } from '~/types'
import type { UserModule } from '~/types'
export const install: UserModule = ({ isClient, router }) => {
if (isClient) {

View File

@ -1,5 +1,5 @@
import { createPinia } from 'pinia'
import { UserModule } from '~/types'
import type { UserModule } from '~/types'
// Setup Pinia
// https://pinia.esm.dev/

View File

@ -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
export const install: UserModule = ({ isClient, router }) => {

2
src/shims.d.ts vendored
View File

@ -4,7 +4,7 @@ declare interface Window {
// with vite-plugin-md, markdowns can be treat as Vue components
declare module '*.md' {
import { ComponentOptions } from 'vue'
import type { ComponentOptions } from 'vue'
const component: ComponentOptions
export default component
}

View File

@ -1,3 +1,3 @@
import { ViteSSGContext } from 'vite-ssg'
import type { ViteSSGContext } from 'vite-ssg'
export type UserModule = (ctx: ViteSSGContext) => void