Commit 607dc8b
committed
basic: Add tryCast method
A small helper method for casting an object to a specific type,
or returning `null` if that's not successfull.
This will become handy in the following commits where we want to cast
a `ZulipStream` object to a `Subscription` object.1 parent 5a6b96a commit 607dc8b
1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
0 commit comments