Skip to content

Commit 0de9c9a

Browse files
committed
chore(utils): proper typings
Adds typings to utils, still in the quest for switching the TS config to `strict` Also removes the apparently unused utils method `isString`
1 parent 656adc2 commit 0de9c9a

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/utils.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import { GlobalMountOptions } from './types'
2-
3-
const isString = (val: unknown): val is string => typeof val === 'string'
4-
5-
function mergeStubs(target, source) {
2+
import { AppConfig } from 'vue'
3+
function mergeStubs(target: Record<string, any>, source: GlobalMountOptions) {
64
if (source.stubs) {
75
if (Array.isArray(source.stubs)) {
86
source.stubs.forEach((x) => (target[x] = true))
@@ -30,9 +28,12 @@ function mergeGlobalProperties(
3028
components: { ...configGlobal.components, ...mountGlobal.components },
3129
provide: { ...configGlobal.provide, ...mountGlobal.provide },
3230
mocks: { ...configGlobal.mocks, ...mountGlobal.mocks },
33-
config: { ...configGlobal.config, ...mountGlobal.config },
31+
config: { ...configGlobal.config, ...mountGlobal.config } as Omit<
32+
AppConfig,
33+
'isNativeTag'
34+
>,
3435
directives: { ...configGlobal.directives, ...mountGlobal.directives }
3536
}
3637
}
3738

38-
export { isString, mergeGlobalProperties }
39+
export { mergeGlobalProperties }

0 commit comments

Comments
 (0)