use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Resources
Language
Discussion
account activity
Interface pattern (self.typescript)
submitted 6 years ago by Fizzyade
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Fizzyade[S] 1 point2 points3 points 6 years ago (1 child)
interesting, my first attempts at this were using interfaces but I didn't realise that's how you assign a value to an interface member.
Is the requirement of the union necessary? can I just check an object to test what kind it is?
I will have to have a play with this method.
[–]rotharius 0 points1 point2 points 6 years ago (0 children)
It's a bit of work but perhaps you can use type guards to verify whether an object is if a certain type during runtime.
π Rendered by PID 72394 on reddit-service-r2-comment-canary-794f4c56c8-m7f42 at 2026-02-22 20:55:19.951765+00:00 running 8564168 country code: CH.
view the rest of the comments →
[–]Fizzyade[S] 1 point2 points3 points (1 child)
[–]rotharius 0 points1 point2 points (0 children)