Last active
June 30, 2019 17:11
-
-
Save psteiger/ed18d08ebf2d1f9cf90e8d608acea071 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| inline fun <reified T> DataSnapshot.getTypedValue(): T { | |
| val genericTypeIndicator = object : GenericTypeIndicator<T>() {} | |
| return getValue(genericTypeIndicator)!! | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment