File tree Expand file tree Collapse file tree 2 files changed +3
-13
lines changed
packages/firestore/src/util Expand file tree Collapse file tree 2 files changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -46,12 +46,8 @@ export function makeConstructorPrivate<T extends Function>(
46
46
PublicConstructor . prototype = cls . prototype ;
47
47
48
48
// Copy any static methods/members
49
- for ( const staticProperty in cls ) {
50
- if ( cls . hasOwnProperty ( staticProperty ) ) {
51
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
52
- ( PublicConstructor as any ) [ staticProperty ] = ( cls as any ) [ staticProperty ] ;
53
- }
54
- }
49
+ Object . assign ( PublicConstructor , cls ) ;
50
+
55
51
// eslint-disable-next-line @typescript-eslint/no-explicit-any
56
52
return PublicConstructor as any ;
57
53
}
Original file line number Diff line number Diff line change @@ -105,11 +105,5 @@ export function shallowCopy<V>(obj: Dict<V>): Dict<V> {
105
105
obj && typeof obj === 'object' ,
106
106
'shallowCopy() expects object parameter.'
107
107
) ;
108
- const result : Dict < V > = { } ;
109
- for ( const key in obj ) {
110
- if ( Object . prototype . hasOwnProperty . call ( obj , key ) ) {
111
- result [ key ] = obj [ key ] ;
112
- }
113
- }
114
- return result ;
108
+ return { ...obj } ;
115
109
}
You can’t perform that action at this time.
0 commit comments