-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Merge pull request #31 from Lazy-work/core/rename_switch_to_match
refactor(core): rename switch to match
Showing
7 changed files
with
96 additions
and
95 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@unisonjs/core': patch | ||
'@unisonjs/vue': patch | ||
--- | ||
|
||
Rename $switch to $match |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
import LogicalEvaluation from "./LogicalEvaluation"; | ||
import MatchingEvaluation from "./SwitchEvaluation"; | ||
import IfEvaluation from "./IfEvaluation"; | ||
import MatchingEvaluation from "./MatchEvaluation"; | ||
|
||
export function $if(bool: boolean) { | ||
return new LogicalEvaluation(bool); | ||
return new IfEvaluation(bool); | ||
} | ||
|
||
export function $switch<T>(input: T) { | ||
export function $match<T>(input: T) { | ||
return new MatchingEvaluation(input); | ||
} | ||
|
||
export function v<T>(value: T) { | ||
return { value }; | ||
} | ||
|
||
export type { LogicalEvaluation, MatchingEvaluation }; | ||
export type { IfEvaluation, MatchingEvaluation }; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ export { | |
createReactHook, | ||
useUnison, | ||
$if, | ||
$switch, | ||
$match, | ||
v, | ||
nextTick, | ||
getCurrentInstance, | ||
|
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