wip: pass attrs fallthrough tests

This commit is contained in:
Evan You
2019-08-22 22:07:51 -04:00
parent 7fae3ebaf3
commit daf67397ae
5 changed files with 191 additions and 155 deletions

View File

@@ -7,6 +7,16 @@ export const reservedPropRE = /^(?:key|ref|slots)$|^vnode/
export const isOn = (key: string) => key[0] === 'o' && key[1] === 'n'
export const extend = <T extends object, U extends object>(
a: T,
b: U
): T & U => {
for (const key in b) {
;(a as any)[key] = b[key]
}
return a as any
}
export const isArray = Array.isArray
export const isFunction = (val: any): val is Function =>
typeof val === 'function'