36 ms·
TypeScripting the technical interview
- mrlkts 4y agoI've got a CS related degree, but I'm a mostly self-taught dev, and not understanding 90% of the code really makes me reevaluate my career choices. Where and how can I learn this stuff?
- cben 4y agoThere are 2 components here. One is the "type metaprogramming" - (mis)use of the type system to implement to do compile-time computation, mainly by using parametrized types as kinda-functions + type inference for kinda-pattern-matching. The other is building up basic "data types" by pretty standard lambda calculus > LISP route. "Understanding Computation" book has a great chapter 6 on that, which is available in blog & video forms on https://computationbook.com/extras https://computationbook.com/extras - Here, Church numerals were used to represent numbers. - booleans & conditionals here didn't resort to the lambda representation you'll see in the book, but relied on type conditionals builtin to TypeScript. - The names "Cons" & "nil" are a ringer for LISP-like building of lists, and recursive processing of lists, from a "pair" data type.
- cben 4y agoSorry, i misspoke about "Church numerals". The book uses them to represent non-negative integers by lambdas but here that wasn't necessary, TypeScript allowed a simpler representation of N as a the type of an N-deep nested list. What's common to both approaches to building arithmetic is starting from zero + a "successor" function T. That approach is called "Peano arithmetic". I still recommend that post/video (and the book in general) but I have to admit there is no 1:1 correspondence to the TypeScript going on here. Still, it'll teach you some general maneuvers for bootstrapping computation out of almost nothing , qnd once you're comfortable with those, you can read things like this TypeScript post, or aphyr's original Haskell post, which bootstrap computation out of sjighly different" almost nothings" and without following the details still have a high-level idea of where it's going (like the poor interviewer in the story ;-)
- lcrz 4y agoJust do some basic functional programming. And/or do some of these challenges and don't feel like a cheater if you look at other peoples solutions: https://github.com/type-challenges/type-challenges https://github.com/type-challenges/type-challenges
- physicles 4y agoDo you want to learn it because it looks interesting, or because you think it's important for a Real Programmer to know? If it's the former, go for it. If it's the latter, don't worry about it. I have a CS degree, did 6 years on a team writing C++ at Microsoft, and only briefly flirted with understanding this stuff. A couple of the wizard devs on the (very large) team could do it, but they also knew that code needed to be simple above all else, so it was effectively banned in our code base.
- mrlkts 4y agoYes it's mostly because it looks interesting and fun. I definitely agree these type-golf-esque solutions are not ideal in an enterprise project especially where we have juniors and fullstack devs committing a lot of FE code.
- siva7 4y agoDon't worry. I assure you that many senior devs can't follow this article either without some further digging. This is a puzzle interview task, not something that matters in most peoples daily work.
- sincerelyjules3 4y ago[dead]
- ycitm 4y agoYou can also play around with the code in the TypeScript playground: https://www.typescriptlang.org/play?#code/PTAEEkDsAsEMBsCmAaUBLSBnAxgJzQEaIB0AsAFDYD2WALqIH1ooAvKAMoCeAtgVfABQBKCtTqhAU2gt23XgOGUameoC20KZx58hIxfUB7aGpmb5FEOwCuXLjVC1oiUADcqaACbpamRPABmqWJDcCDDc0egB3UOgbO1BETE9IbHsqb1AAAwY04lAAOUREF1RIKlsMAHNIOMxUW3tvXDMlXFhaAtB4GjLymypQImouEgpaDgAHexy0eCkR8ZTGChMwNi4p7tFWyFaXeA5QFuj7QatcPfmANVcGyFQB0aRWw-aMAGs2+DQlMnJZ+wBhRQAHgAHqhgZgAHxSADaoNA4IAuotyKYACoNWyobxoXAofagTBmSDZABCVCJbgitgk31MABk0HEsQhPNAqFRCk8XIhRrZMKB5rB2rA3qTyQFQFSospvr9QOizPZWL95uJhmN7AAxFlKmwa+bKZFynIlQEEACMUNYFtiwM2Ln5CvsAH5QNr4J5QAAuPrm232-nuz2up3e0CVByIXDq8agADyuDN5tQBAATFbff7EAFHQ0XfK82G01mcwXFaAQ4WfUHEMjTOB+bVcftIHtaBjoK6AJrkglUQa0NCDflhGjc3CyjWgACCradgI+Sgzi-oiDt2YdoABWEBGG8UfhqD3B-BUNdwJLm9DlfLPtnHHnp7DNbry1osFw9AIe2zmEgH+6AAvKMqGyXQahiFxYD2a4SFAABVT0hWA3BeigvZ-DcbAP1OJ4UNAmN7AALRAmZ9VSXQjSnNhAUgDNoUgJFyEI+NKlAdjWBokjUIhFjUVHdi1EBONKl4n4p1RaBcV1Gj+KoMS5U1clcA49hAUk6SFKnTU0EjVSaKUsxcC02M2DQC99MBHTIxM+w2EQSNICEszgTEpZQAAUQARzMBBQg4VAXDQbx91xRI4PALhRioT9-HoUQkl5fkMHxO5-D2D43miT5J1jbzfI9QFYBTDMhTXAM1OPFTYAAfTEwSKz6S9+Roqq+jqigGoa118pZIqapTDryC6wTqx1TrRqa8qN35biqAmkab1rYaRufcbmPE2NpwITAABFgu8IqSqkMr11LVrIFC-Yhu6qazs3C6roIG7Vtdba9oO-rBvq1afVgBai2atT0p+xa+gBhqfTmqjYwAJX8MpEE1VCuDm1EqFosF+VYSZ4AzJzpvO3dLoPSAXvY114cgRHkf7NGMbJ1Bt0wTH4UhUGw2ZwE5qxtyUTAXbEGxNihR8-JiRnVtQDF7MBVSDhlNAbB4H8SVyXgNxKjaE57G5XkolsVWACtGnoC9MNAAL3IIMx6DeHl3AJId7iGTb7AARUVbMQVQDh6LhDgmPcv5cRaewhVQsI5elr2sGydHelsUPNm6WheiIAUnNqAlYEGUBI78ehs8wXP7EHQZkHclLi9L0AiV0qNPHjuw9gieBpjgPS076XXdNcNpYDwKh4ieLgzHgQdI1wJv5WgT53LT3o4H5OBRnGSpOWrmI56UGKznlxWXmCXL7FhqgwjjbxPfFlnqA9VBI4zO-+UJzcubau+jxJlTn-Jxquevt7AuSs+AQlQGfC+V9Y63z4JgAa+dz4Qg5j6Z+r5QA9jMAAcj0pgMIuc67RSzpBByUxMH8hVm8FMttwwOSjEUWhuB6FTyYVGbIGDMHtxoVPdyXARRlxiCXPOqwlB8OyCaFhjCuF0KkROPiUlEBhx3MVPopUgaAMgMTK6sA4RtWgmeO6FV1GaIPAQHR38+h+wBq6BMwlEy9UKtolMrlUD2JZtBFMfswGeR8n1d6+0QpFThKYrxfjPruIsUg5BMiwwRijDDewGkFEp2puolm9xB4FFSagGWdEpDpKSC4VJQN37mPyZk2OX8rplMKdAv+rouaJMUWklWBT1HZNjl4xpySyipMBNU1J8CclIIBj6XGLE2CwH3H0lp5Sb7tPFhmE0tBAT3nnF07M5Ren9OgfM7MkT4luimK0XAEz9y9OwgEVwYdqigG2TfJ+mErmtBfvdfkJSrpeUqQeLykIrHsEmYgaZGSalzOllCV+uZFQQ0EvUoEnzDkTyjKcxAvSfmoDub+YZK0RrViOUigFqKbkYqwFEsZG1jTlUBMA4l2NchTAzDpRFJyCXQMBBAy+vSqY0xRvTQEOQvGP3RTMkFmK0FyXaFQKeNzaitwQLQQCYiSixCnnsJQDtvAxTwbgB0VCvyDxeO2fV5RUCYFGBgSAxrQCIy2LsfYHwyjQEHNTTOTx-C4IPAcE2Sgnj4AdfQKwgwtgn3YHwSMeQ7QQKpefIVwLUkZjYKGwF4blk0UFbc4VcbUCpsQTG1p0DbIhvgJGQEFygpQWeQ-aN6bY35qkK4qNYRUD8qBk6P5panlxGKUCNqcIQbQopluIEcIaUc0hnS+AIylaPPLZ2iFg6dw9q+SpU8-bGoJqLYgZNkbgFc2HRm-N4LXnjtXbdddxbwSVsbdWvN9yT2TTPZu8q26q27tzbMzFo7JpkvcpJewmB1aDhoCxHIahzLjL4LbNA1hOKJr5ZSuaXiebjr5qYJSP8aCOUZOFVA5VmjYCLjEaKmBQhQacvMbOwQ+4uAKjHG+LEoDcmBAuT4tAijLhY12hd5izFXRXdixqBMj2PVJn-W6DG1wghuWTT97EfTAknd+t20sAAMUhxNMfXZBmgqAEMsS8n6Vg6nASacAzcViiAC1eVTGpgIEmTOkdQHJSzABmGzjHjMQdM45+RFm9MABY3N2c8w5t0ylLMAFZAsaeC9pw5Nk9MADYosefgFpszLkIRAA https://www.typescriptlang.org/play?#code/PTAEEkDsAsEMBsCmAa...
- jonorsi 4y agoSo beautiful and horrific at the same time :D.
- dec0dedab0de 4y agoSo he wrote all that for the typescript lsp to respond with the answer, but when it compiles down it's nothing? And we're using runes as variables just because? That is pretty neat, and silly. I also think it highlights my natural aversion to static type checking in dynamic languages. I know that I could get sucked into writing a bunch of code for the checker, instead of using my energy for making the application work.
- ycitm 4y agoThe runes are mostly "just because", but there is a reason. Ideally, I would have written: type Nil = unique symbol Which would ensure the Nil type wouldn't match with anything but itself. Unfortunately, the compiler doesn't allow unique symbol other than on const variables initialised with Symbol(). So I needed some meaningless symbols. I could also have done type Nil = "nil" But then it would have looked like the string meant something.
- 8n4vidtmkvmk 4y agothis is why i love ts when not working for a megacorp. when the ts gets too cray i just nope out. throw an any or as in there and get on with my day. wouldn't pass a code review but i don't care
- trhr 4y ago[flagged]
- 8n4vidtmkvmk 4y agonone? is this a jab?
- rexpop 4y agoThis is a jab (insult), and I've flagged it, but I am also curious. If you could, please describe the qualities of a "bootcamp" grad by which you recognize them? Edit: especially pertaining to type inference, I guess?
- nicolas-siplis 4y agoI remember reading the original version and thinking "Ah, this would be so much more grokkable if only I knew Haskell"... Delusions of grandeur are a marvelous thing!
- Aeolun 4y agoWell, it certainly feels more grokkable than the haskell one. It’s like understanding is at the tip of my tongue instead of forever out of reach. Still don’t understand anything though.
- deleted 4y ago[deleted]
- joenot443 4y agoWell written and super funny. Reminded me a bit of Scott’s writing, particularly the descriptions of the horrified interviewer. I’ve never worked in a Typescript shop, is there any truth to the satire here? The sea of confusing types to solve any problem?
- xsmasher 4y agoThis is "stunt programming," similar to shooting an arrow into a target from horseback in a rodeo. It has little to do with the real-life business of real-life cowboys. In this case it's using the type system to calculate the answer to a problem, which is not useful because the type system can't output anything to the console or do other IO. The "answer" will only be visible in your IDE. The type system is powerful and extremely capable because it had to support existing javascript patterns, like "this function takes a parameter that might be a string or might be a number or might be an array" and make them type-safe.
- AgentOrange1234 4y agoIt’s a very beautiful language even despite being compatible with Javascript. The code here is delightfully absurd, please don’t think it is representative.
- nayroclade 4y agoI’d say generally the opposite is true. Most commercial software I’ve worked on typically contained only simple typing—discriminated unions are about as complex as it gets—and it’s more of a problem that people get lazy and start using “any” too much than they go overboard. Where complex types can be a problem is when working with open source libraries, especially when the types are community-developed, separate to the library itself. The library API may not be particularly amenable to easy typing, and the community types can end up being rather confusing, especially to people who developed neither the types nor the original library.
- TheCleric 4y agoI tell my fellow developers at work: "Any is banned. If you want any, use JavaScript, and we don't use JavaScript here. Perhaps you haven't heard about unknown?" In my experience, 90% of the time when a developer uses any, they just don't know about unknown. 9% it's because they are lazy. 1% is because you are implementing something from an imported library, and they fell into the other 99%.
- gardenhedge 4y agoA good example of how TypeScript can be done so incredibly wrong.
- magnio 4y agoThis is a delightful read, which reminds me of two other articles. The first is also a caricature of the technical interview, solving FizzBuz with Tensorflow: https://joelgrus.com/2016/05/23/fizz-buzz-in-tensorflow/ https://joelgrus.com/2016/05/23/fizz-buzz-in-tensorflow/ The second is a explanatory story, or "discovery fiction" as the article classifies itself: https://paulbutler.org/2022/what-does-it-mean-to-listen-on-a-port/ https://paulbutler.org/2022/what-does-it-mean-to-listen-on-a... I love these humorous yet pedagogic technical writings, woven with a bit of literary eloquence and down-to-earth narrative. Thank you for this.
- higeorge13 4y agoThe fizzbuzz tensorflow must be one of the funnier posts ever.
- Espressosaurus 4y agoFizz-buzz in Tensorflow is a delight. The ending is perfect.
- stevekemp 4y agoI think you would enjoy this too https://aphyr.com/posts/353-rewriting-the-technical-interview https://aphyr.com/posts/353-rewriting-the-technical-intervie...
- codetrotter 4y agoAnd of course, the original. https://aphyr.com/posts/342-typing-the-technical-interview https://aphyr.com/posts/342-typing-the-technical-interview (Also linked I the first paragraph of the link you posted, as well as in the intro of the OP.)
- implicit 4y agoRichard has a whole series of these. I was going to try to pick out one of my favourites from this series, but I really can't. Every last one is a treasure. EDIT: Oops! This is based on Aphyr's work. My bad!
- orf 4y agoCan you link them? I couldn’t find them on his blog.
- MatthiasPortzel 4y agoThe series is actually by Aphyr, and the first one is here. https://aphyr.com/posts/340-reversing-the-technical-interview https://aphyr.com/posts/340-reversing-the-technical-intervie... This post translates one of them from Haskell to typescript (very well IMO).
- ycitm 4y agoThe series is actually by Aphyr: https://aphyr.com/tags/interviews https://aphyr.com/tags/interviews This post is a pastiche of https://aphyr.com/posts/342-typing-the-technical-interview https://aphyr.com/posts/342-typing-the-technical-interview
- orf 4y agoThanks! I was aware of the Aphyr series, but he said Richard also had a series.
- golergka 4y agoAnother reminder that Typescript type system is Turning complete.
- teaearlgraycold 4y agoNot yet complete, but will soon turn complete!
- cjbprime 4y agoIn case folks miss the link at the top of the article, this is translated from an old 2017 post by Aphyr. That post was in Haskell, where it's not too surprising that you can do serious computation inside the type system. This new post translates the ideas to TypeScript, which is more widely known, and which I once heard described as having "accidentally Turing-complete" types: https://github.com/microsoft/TypeScript/issues/14833 https://github.com/microsoft/TypeScript/issues/14833
- MatthiasPortzel 4y agoAphyr has a series of posts in this style, all of which are excellent.
- faitswulff 4y agoThis post also mentions "Vidrun," which features heavily in Aphyr's posts. And the interviewer in this post recognizing the situation they were in had me literally laughing out loud!
- dabreegster 4y agoI love this series. It also reminds me a bit of https://unsongbook.com https://unsongbook.com -- another beautiful work of creative writing combining technology and magic.
- eyelidlessness 4y agoHere[0] is the open issue about TypeScript being Turing complete. The current most recent comment[1] is showing the type system parsing its own type syntax. Of course there have been many parsers written in the type system since template literal types landed, but I found this one particularly amusing. 0: https://github.com/microsoft/TypeScript/issues/14833 https://github.com/microsoft/TypeScript/issues/14833 1: https://github.com/microsoft/TypeScript/issues/14833#issuecomment-1454306600 https://github.com/microsoft/TypeScript/issues/14833#issueco...
- hnfong 4y agoI'd say it's "inspired" rather than "translated". The part about using the typescript language server to compute the solution, and the protagonist claiming the code is "concise" because only 4 lines of javascript were generated, was absolutely brilliant. Cracked me up at least. Glancing at the actual code, I admit I'm with Criss in my ability to follow the logic, but it doesn't look like a direct translation from Haskel types to Typescript types either. At any rate, very well done.
- borissk 4y agoTypeScript has the most complicated type system ever. Don't know why Anders&Co needed to go that far.
- cwalv 4y agoIt aims to be able to express the typing used in a bunch of pre-existing javascript libraries. Many/most of these were written in a "how would I solve this if the type system just let me do whatever I wanted" style (since that's what runtime dynamic typing actually does).
- evilduck 4y agoThis is a joke post. Day to day life using TS doesn't resemble this at all.
- eyelidlessness 4y agoAs much as people complain about the TS type system’s complexity, it is just modeling real world JS. The vast majority of its complexity is hardly used in TS that doesn’t interop with existing JS, because you generally won’t write such highly dynamic code when you have to define its types. But it does allow for safer interop. Even so, JS itself being so dynamic, TS still can’t claim full type safety. And as much as people complain about the type system’s verbosity, many newer features are designed specifically to allow you to be much more terse while improving expressivity and safety. A great example: the satisfies operator lets you narrow a value’s type to conform to whatever it satisfies, and simultaneously widen it to whatever it adds (including anything optional in the narrower type). This is great for composition, only takes two words to accomplish. And its meaning should be immediately obvious at a glance once you know about the operator.
- heisenbit 4y ago> TS that doesn’t interop with existing JS which tends to happen at the edge of the application where it interacts with the outside world and all the interesting things happen.
- idontwantthis 4y ago
- iampims 4y agoMake sure you read till the end. Brilliant.
- irrational 4y agoIs this really what technical interviews are like in Silicon Valley? I’ve never seen anything like it in the “real” world.
- tantalor 4y agoUm, which part?
- irrational 4y agoAsking about setting a Queen on a chess board. Unless I’m being hired at a company that programs chess sets, it is a nonsense question. If you want to test someone’s problem solving skills, test them with a problem that actually reflects the real work they will be doing at your company.
- tantalor 4y ago> N-Queens is a classic backtracking problem that gets asked a lot during interviews. https://fizzbuzzed.com/top-interview-questions-3/ https://fizzbuzzed.com/top-interview-questions-3/
- siriusfeynman 4y agoWhich is exactly the point, it's a leetcode question that tests whether you've memorised a bunch of leetcode interview questions
- bruce343434 4y agoyou're supposed to be able to come up with the solution by yourself
- wiseowise 4y ago> classic backtracking problem Literally in the parent post.
- jitl 4y agoIf you want to see some more legs on TypeScript type-level logic, check out this SQL database as Typescript types: https://github.com/codemix/ts-sql https://github.com/codemix/ts-sql: import { Query } from "@codemix/ts-sql"; const db = { things: [ { id: 1, name: "a", active: true }, { id: 2, name: "b", active: false }, { id: 3, name: "c", active: true }, ], } as const; type ActiveThings = Query< "SELECT id, name AS nom FROM things WHERE active = true", typeof db >; // ActiveThings is now equal to the following type: type Expected = [{ id: 1; nom: "a" }, { id: 3; nom: "c" }];
- Buttons840 4y agoWhy did they only solve for 7 Queens and not 8 Queens? I'm reminded of https://github.com/type-challenges/type-challenges https://github.com/type-challenges/type-challenges -- I've only looked at some of the more challenging problems, but one involves writing a JSON parser in the type system. The easy problems look reasonably useful to solve.
- ycitm 4y agoI wondered if anyone would spot this :) There's a recursion depth limit of 500 on the TypeScript compiler, which prevents this solution working for N > 7 Even Aphyr's original Haskell solution only demonstrates N = 6, so in some sense this is an improvement on the state of the art for type-level N Queens solutions /s
- davidmurdoch 4y agoI don't really know what it means, but I've seen it used to work around depth issues in Typescript, but can this use a "trampoline"?
- ycitm 4y agoI don't think there's any way to do iteration in the type system (other than recursion), so there's no way around it. I considered forking the compiler to set a deeper limit, but at some point Typescript itself is going to stack overflow. Also that probably goes a bit beyond what Criss is expecting in an interview...
- planede 4y agoI don't know about the typescript compiler, but the way around template recursion limits in "classic" C++ template metaprogramming is to figure out a way to make it O(log N) depth instead of O(N) (for some value of N). Like instead of linearly iterating through a range of types through recursion, you divide and conquer. Easier said than done, but possible in some cases.
- ex3xu 4y agoLong ago, on Svalbard, when you were a young witch of forty-three, your mother took your unscarred wrists in her hands, and spoke: Vidrun, born of the sea-wind through the spruce Vidrun, green-tinged offshoot of my bough, joy and burden of my life Vidrun, fierce and clever, may our clan’s wisdom be yours: Never read Hacker News But Hacker News has read of you, in their snicker-slithing susurrential warrens, and word has spread... https://aphyr.com/posts/341-hexing-the-technical-interview https://aphyr.com/posts/341-hexing-the-technical-interview
- forgotusername6 4y agoThe word "susurrential" returns only two Google results. One is for this post. Does anyone know what this word is supposed to mean?
- antonyt 4y agoMost likely a corruption of susurrant. From susurrus, meaning a murmuring or whispering sound.
- deleted 4y ago[deleted]
- stevula 4y agosusurrus or susurration is a very literary word for a whisper/whispering. The usual adjective would be susurrous or susurrant, rather than susurrential, but in any case it would mean “full of whispering sounds”.
- ex3xu 4y agoI think it's a portmanteau of susurrus and torrential, which serves to invoke the force and volume of a torrential downpour to the description.
- deleted 4y ago[deleted]
- 4y ago
- davidmurdoch 4y agoThis is what I mean when I search for "How to ______ in TypeScript": types! Too many blogs and Stack Overflow questions say "TypeScript" when they mean JavaScript, making it harder to find information on actual type problems.
- deleted 4y ago[deleted]
- btbuildem 4y agoVery nice read. I would not hire nor want to work with this developer.
- thih9 4y agoWould you ask the same questions as the interviewer though? I feel like both deserved each other.
- jupp0r 4y agoPretty sad that computations on types look like C++98 in Typescript when C++ itself has moved on to have much more concise ways of performing computations on types in C++11 and 14 (see boost hana).
- mmoskal 4y agoInterestingly TypeScript compiler doesn't use types for compilation (that's why you can have esbuild that compiles Typescript without understanding the type system). That is the end result of type computation is... Nothing, always, just like in OP. Template metaprogramming is all about code generation. You would expect them to look different.
- jupp0r 4y agoThe way I think about this is that type computations can be used both for type constraint checking and for code generation. In that sense, C++s template metaprogramming system is a superset of TypeScript's, which can only do checks as you pointed out correctly.
- ht85 4y agoYou can take me out of the Haskell—
- draw_down 4y ago[dead]
- game_the0ry 4y agoI am a 6-figure front end developer, work with typescript daily for the last 3 years. I didn't follow any of that shit. The fuck is an 'n-queen'? I don't think I learned that in my coding bootcamp. Is that a bad sign?
- consilient 4y agoIt's "N-(queens)", not "(N-queen)s"
- danbrooks 4y agoThe N queens puzzle is a well known mathematical problem. https://en.wikipedia.org/wiki/Eight_queens_puzzle https://en.wikipedia.org/wiki/Eight_queens_puzzle
- winrid 4y agoWell written. I laughed hard at "he asserts, wrongly". I wish TS didn't evolve into this complexity. Library types that should be simple turn into a machine you have to understand (for no good reason).
- hmcamp 4y agoThanks @ycitm. I learned a lot from this post!
- dusted 4y agoNext time someone asks me if I know TypeScript, I'll tell them "No, I don't even know JavaScript, in fact I don't know anything."
- jtinder 4y agoAn amazing read, and almost perfect! There's a bug in the Solve "function" due to which you'll get the right answer only for 1x1, 5x5 and 7x7 (I checked till 8x8). The base case makes a wrong assumption that there will always be a candidate available for the last row. If there are no candidates available, it should return Nil, and backtrack. Basically, replace Concat<candidates, placedQueens> with candidates extends Cons<infer x, any> ? Cons<x, placedQueens> : Nil
- ycitm 4y agoAh, thank you so much! Great spot. I've corrected this, and credited you in the errata - https://www.richard-towers.com/2023/03/11/typescripting-the-technical-interview.html#errata https://www.richard-towers.com/2023/03/11/typescripting-the-...
- thih9 4y agoI’m unfamiliar with TS. Could someone explain this part? > Invoke the compiler $ tsc *.ts --lib esnext --outFile /dev/stdout var ᚾ = Symbol(); var ᛊ = Symbol(); var ᛚ = Symbol(); var ᛞ = Symbol(); Why is there so little output? Is that because the compiler removed the unneeded types? And the author is implying that the task was boilerplate and pointless?
- agmyintmyatoo 4y agoEverything is only in type system providing developer type-hints. When compiled, it all boiled down to plain js.
- foodieforever10 4y ago[dead]
- deadofwrite09 4y ago[dead]
- inkandfable2 4y ago[dead]
- weworewhat 4y ago[dead]
- trueliving4 4y ago[dead]
- chillhouse 4y ago[dead]
- iamwellandgood 4y ago[dead]
- babynative4 4y ago[dead]
- thedad56 4y ago[dead]
- wearelivingart2 4y ago[dead]
- deleted 4y ago[deleted]
- diet_prada1 4y ago[dead]
- drunkbetch45 4y ago[dead]