Created
July 5, 2021 21:35
-
-
Save tomaspietravallo/cb6bf63dd2abfef310f01b90ec7aa7e7 to your computer and use it in GitHub Desktop.
Type for objects composed of Scalar/String/Boolean signals, that get snapshot'ed to their vanilla counterparts
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
type ReactiveToVanilla<Obj> = { | |
[Property in keyof Obj]: | |
Obj[Property] extends ScalarSignal ? number : | |
Obj[Property] extends StringSignal ? string : | |
Obj[Property] extends BoolSignal ? boolean | |
: any | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment