Skip to content

Commit 92c4dff

Browse files
committed
🐛 bug: split vue-template-compiler shim definition from index.d.ts (#24)
1 parent 36c2b2e commit 92c4dff

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

src/infuser.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
import { SFCDescriptor, SFCBlock } from 'vue-template-compiler'
1+
/* eslint-disable-next-line */
2+
/// <reference path="../types/shims-vue-template-compiler.d.ts"/>
3+
import { SFCBlock, SFCDescriptor } from 'vue-template-compiler'
24
import { Locale, MetaLocaleMessage, SFCI18nBlock, SFCFileInfo, FormatOptions } from '../types'
35

46
import { escape, reflectSFCDescriptor, parseContent, stringifyContent } from './utils'

types/index.d.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { SFCDescriptor } from 'vue-template-compiler'
2-
31
/**
42
* Locale Message Recursive Structure
53
* e.g.
@@ -195,13 +193,3 @@ export interface ProviderConfiguration<T = {}> {
195193
}
196194

197195
export type ProviderConfigurationValue<T = {}> = T & { [prop: string]: unknown }
198-
199-
// extend for vue-i18n-locale-message
200-
declare module 'vue-template-compiler' {
201-
interface SFCDescriptor {
202-
raw: string
203-
contentPath: string
204-
component: string
205-
hierarchy: string[]
206-
}
207-
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { SFCDescriptor } from 'vue-template-compiler'
2+
3+
// extend for vue-i18n-locale-message
4+
declare module 'vue-template-compiler/types/index' {
5+
export interface SFCDescriptor {
6+
raw: string
7+
contentPath: string
8+
component: string
9+
hierarchy: string[]
10+
}
11+
}

0 commit comments

Comments
 (0)