refactor(runtime-core): make setup attrs proxy dev only

This commit is contained in:
Evan You
2020-04-06 17:57:27 -04:00
parent ec4a4c1e06
commit c5f0f63b91
5 changed files with 30 additions and 8 deletions

View File

@@ -120,8 +120,12 @@ export const toDisplayString = (val: unknown): string => {
: String(val)
}
export function invokeArrayFns(fns: Function[], arg?: any) {
export const invokeArrayFns = (fns: Function[], arg?: any) => {
for (let i = 0; i < fns.length; i++) {
fns[i](arg)
}
}
export const def = (obj: object, key: string | symbol, value: any) => {
Object.defineProperty(obj, key, { value })
}