Skip to content

Commit

Permalink
Merge pull request #21 from motea927/dev
Browse files Browse the repository at this point in the history
fix: declare vue & @vue/runtime-core module type, prevent some editor…
  • Loading branch information
motea927 authored Jun 19, 2023
2 parents 89072cf + 55b5c98 commit b78bfbb
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions packages/core/main.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
import type { BindingObj, BindingI18nObj } from './shared'

declare module '@vue/runtime-core' {
export { setGlobalOptions } from './shared'
export { createI18nHtml, createSafeHtml } from './plugins'

export {}
declare module 'vue' {
export interface ComponentCustomProperties {
$i18nHtml: (binding: string | BindingI18nObj) => string
$safeHtml: (binding: string | BindingObj) => string
}
}

export { setGlobalOptions } from './shared'
export { createI18nHtml, createSafeHtml } from './plugins'
declare module '@vue/runtime-core' {
export interface ComponentCustomProperties {
$i18nHtml: (binding: string | BindingI18nObj) => string
$safeHtml: (binding: string | BindingObj) => string
}
}

0 comments on commit b78bfbb

Please sign in to comment.