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 =
1414
1515export const noopFn : any = ( _ : any ) => _
1616
17- const sharedPropertyDefinition = {
18- enumerable : true ,
19- configurable : true ,
20- get : noopFn ,
21- set : noopFn ,
22- }
23-
2417export function proxy (
2518 target : any ,
2619 key : string ,
2720 { get, set } : { get ?: Function ; set ?: Function }
2821) {
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+ } )
3228}
3329
3430export function def ( obj : Object , key : string , val : any , enumerable ?: boolean ) {
You can’t perform that action at this time.
0 commit comments