-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consistently use this.dex in TeamValidator
Additionally allows Dex to optionally be provided as a constructor arg for clients which do not rely on a global Dex object
- Loading branch information
Showing
1 changed file
with
7 additions
and
7 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
8744ada
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the correct solution here is to import
Dex
. Do you have a use case for the optional pass-in or can I switch this to importing?8744ada
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can certainly import the Dex type as well instead of leaving it global, but I do have a use case for being able to inject the dependency for the implementation: pkmn/ps#3 (comment)
8744ada
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand what that achieves that passing the format doesn't achieve.
8744ada
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually we do in fact correctly
import Dex
. I don't understand your problem at all.8744ada
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be able to use the TeamValidator with a Dex implementation that is not the Dex implementation in this repository.