Skip to content

Commit 94225dc

Browse files
committed
Add Types::asUnion
1 parent b8bb91d commit 94225dc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Toolkit/Types.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@
5353

5454
final class Types
5555
{
56+
public function asUnion(Atomic $atomic): Union
57+
{
58+
return new Union([$atomic]);
59+
}
60+
5661
public function isTypeContainedByType(Union $input_type, Union $container_type): bool
5762
{
5863
return PsalmApi::$codebase->isTypeContainedByType($input_type, $container_type);

0 commit comments

Comments
 (0)