Created
May 30, 2020 14:50
-
-
Save Taytay/7c0f79115e3055cc0f8a234e395d8679 to your computer and use it in GitHub Desktop.
Riffing on StackOverflow answer
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
https://www.typescriptlang.org/play?#code/PTAEHkCcEsHNoHYEMA2oDGB7AJgU1AGaSYC2oAFgC6UAOAzgFwh2VLoDWmAbrpASpgDuAOiwlgAVzq86wAIwA2BQE4ATHODskJaCgC0dAF6ZKAKBCgAYpkihK5aHVBIEdQbwYVq9JsBZtOHj4BETFgJGAFVQAGZQAOAHYAZiTgAFYAFgy5JOjTczAASWcyJGxsRFhQOlJ8MRJcBEonSkxnBAQTJEp8SgBPGlwnF2w7SD67NoI4CUh8TAlKUEFyCeglwRt2Jxrl3BQ0BgBKUD09UAAVJD7WCYAKKlpGZlYObl5+IVFSSWlIWUy2VywFutyO+XQKCQdCcABFMFUAN6mUCo0A0CQAIxQ0HQoGwCIActpcJ4WDAEFUALygABEtJRaIx2NxoEQ6zuNCQkG0jFA8NgAAVubyTojQABfUxSyHQpwAYW6oGRaPRWJxePQ3WJDTJlAp1LpDNVzI1bIQHK5PJIfMVlGF1roYsl0tMsph-IRDt5yrVLLxBNgADVUBIhp4EBISJjeKAadEXe6Fd1vTbfabWVrKCGUGGI1GY7Z41LTI0o6AANKIUYqtECqsIUY0gDk9erzYANIzUXaG03QM3e+2uyWsK4luxqwBZJA0OPK7ugADafeEbcbAF1PAKu6qV9XhEPN547SOANymfqDSvT2fzq+4TAEUCTxszmgXt2YcfokU29-zrWqL7o2a4In2W6ekKf50LuaIgdgh7dBBJ4pjBI6XgM+CpnQAE0g+T6-o676fg+lwSDQKBDAAPBcAB884XKAuAAB49I2Th9qAAD8y4XB2oCFOOLjoLgFxYdRfbvkuFwbnRAlCf4CCieJgzUTh0myXRG6gBGuBBBeZEAMqVFRfZ0NRACCDE0lxrHsdgTiWTxoAIPpsaeJZhl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sAKDhEQ6x4Eww7LGpEZ5qQ8YQRp7mlorlTRH2ZyQFFkrVFDGXCNEjEl5N7TGJadEpb2zV6FG16DHZZU6jF479Huyt4M7t4whM7lanrJyLEz58jAlrFPZNbFybEVyRm4DT57Gc6r6C7nFzZv73ZODDFgkCka4TLICP7UF-j66lmXFpmgkwTgloi55GQQZoAgF87m5QFonjHzyuj-TyjfiQhSC8w7BTDcieD-RyDSyEkoB5I3ZOAEg6okASAWrqbUCxgABWmAmI12WAypUI8M9hDBbh-4d4rhDpbJqhG0V5YgzBsYcwqA0AhgQwAktIhQz4Zh+SR0AkLufMYm5J3BvB-BghohDxNoDIFgqgF01wxh+JhprU8qySwS4wxhC+6AokHo0pc4ZqOqXuuY8wzZ+AXq8SpBnxqqQwmAKAPAuuEmrpa6W23QcmiBggKhxQmw98owlqTFrEgwCUCiiGQAA |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment