File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -14,21 +14,17 @@ export const hasSymbol =
14
14
15
15
export const noopFn : any = ( _ : any ) => _
16
16
17
- const sharedPropertyDefinition = {
18
- enumerable : true ,
19
- configurable : true ,
20
- get : noopFn ,
21
- set : noopFn ,
22
- }
23
-
24
17
export function proxy (
25
18
target : any ,
26
19
key : string ,
27
20
{ get, set } : { get ?: Function ; set ?: Function }
28
21
) {
29
- sharedPropertyDefinition . get = get || noopFn
30
- sharedPropertyDefinition . set = set || noopFn
31
- Object . defineProperty ( target , key , sharedPropertyDefinition )
22
+ Object . defineProperty ( target , key , {
23
+ enumerable : true ,
24
+ configurable : true ,
25
+ get : get || noopFn ,
26
+ set : set || noopFn ,
27
+ } )
32
28
}
33
29
34
30
export function def ( obj : Object , key : string , val : any , enumerable ?: boolean ) {
You can’t perform that action at this time.
0 commit comments