-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: copy constructors should use spread operator
In order to prevent bugs in our config copy constructors, we should use the spread operator over `this`. Previously in the copy constuctors we built a copy of the corresponding properties by hand. Because some properties are optional, and because we add new properties over time, we introduced drift between the new properties and various copy constructors. That is, when we added new properties, some copy constructors were out of date and hence falling back to defaults instead of copying those new properties over. We can fix this across the board by: 1. aligning the field names in each config class with the corresponding property name, and 2. building the props copy using a spread over `this` followed by the new value.
- Loading branch information
Showing
11 changed files
with
100 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.