Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Style: Use cleaner form for type detection switch #123

Merged
merged 1 commit into from
Jan 6, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions PSKoans/DummyTypes.ps1
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Only attempt to load dummy types if they're not already present in the session

switch ($true) {
{ -not ('FillerType' -as [type]) } {
switch ($null) {
('FillerType' -as [type]) {
class FillerType {}
}
{ -not ('__' -as [type]) } {
('__' -as [type]) {
class __ : FillerType {}
}
}