After 18 years at Microsoft, with roughly a decade of that time working on TypeScript, I have unfortunately been let go in the latest round of layoffs. I need to take a few days to process before I start looking for work. Thanks to everyone who's been part of my journey so far.
LinkedIn locked my account for some reason and it's going to take several days to sort out. If you're trying to reach me there, you may want to try on here or on bluesky instead.
Today the TypeScript team is releasing a new VS Code extension named Deopt Explorer!
This tool can help find polymorphism and deoptimizations in your code, and it's already helped us speed up TypeScript itself. Check out what we've built!
devblogs.microsoft.com/types…
After taking some time off and spending the summer with my kids before they go back to college, I'm happy to announce that I'll be starting a new role at @F5 next week! Thanks to everyone that reached out over the past few months. I'm very much looking forward to what's next!
I'm happy to announce that Explicit Resource Management has (conditionally) advanced to Stage 4 at TC39 today.
Advancement is pending final PR approvals on the spec text and a few outstanding Test262 tests.
github.com/tc39/proposal-exp…
I and a few other TC39 delegates have been thinking for awhile on what a native implementation of enums might look like, as well as possibly expanding enums to include ADT enums, similar to Rust. I'm curious what thoughts you might have on that. github.com/rbuckton/proposal…
Today marks 15 years at Microsoft. In that time I've worked on a bunch of great projects including product feedback tools, MSDN, VS Online, the IE F12 Dev Tools, and TypeScript, and I've worked with some amazing people along the way!
Class `static` initialization blocks achieved Stage 4 consensus today at #TC39!
🚀🚀🚀
Provides access to private state and multi-step field initialization inside of a `class` declaration.
Thanks to all the reviewers and everyone else involved!
github.com/tc39/proposal-cla…
We introduced the `intrinsic` keyword used by type aliases like `Uppercase<T>` long after `keyof`, though I think having type operators like `keyof` is necessary to have the building blocks needed to create more advanced type aliases.
Last day in Seattle! Wife, kids, and I are moving back east to be closer to family (and to get away from the dreary weather 🌧️).
Don't worry though, I'm still working on TypeScript for MS. The only thing that will change is I'll be more awake for early morning TC39 meetings.
There's an obvious @AviationGin product placement in Red Notice and I'm not even mad. I pretty much expected it. Wouldn't be surprised if the whole movie is just an extended @VancityReynolds commercial.
...which, if I'm being honest, I still probably would have watched.
I'm doing some research for future @TC39 proposals to add additional features to regular expressions. I'm putting together feature comparisons for all major RegExp engines at rbuckton.github.io/regexp-fe… and you can help. PRs to add new engines and fix mistakes are welcome!
I imagine it's easier to explain `<font>` than dig into CSS at what seems to be a fairly high level course. Then again, they could have just left changing color out of the class until they *were* at the point of introducing CSS...
I've been trying to push F#-style since the initial proposal (which *was* F#-style), and I proposed partial application at around the same time. (I'd intended to propose `|>` along with partial application, but @littledan beat me to it 😊).
This documentary is amazing and reminds me why I love working on this project. The community is outstanding! It's been an honor to have been part of all of the hard work and effort that got us to where we are right now.
Have you been reading too much "He Who Fights With Monsters"? Main character is isekai'd to a fantasy world of magic and monsters and everyone has mostly normal sounding names like Neil or Amanda, and there's an Apocalypse Beast named Colin.
Can you even read Dune "casually"?
Some have tried... "so many, but none have succeeded."
"They tried and failed, all of them?"
"Oh, no." She shook her head. "They tried and died."
In addition, we implemented the `readonly` type operator for arrays (and tuples) *after* `Readonly<T>` because otherwise you could still push/pop an array. Having `Readonly<T>` special-case arrays using a conditional would have made the type unusable.
My first TC39, I'd been invited by @lukehoban to talk to @wycats about my version of the Decorators proposal. Between myself, Yehuda, @jntrnr, the Angular folks, @littledan, @pzuraq, and everyone else who worked on it, it's so great to see it so close to the finish line.
I'd still favor `keyof T` over `Keyof<T>` were we to do it over again. `intrinsic` isn't actually very flexible in the type system right now anyways (it only works for `string -> string` transformations).
Unfortunately I won't be at @TypeScriptConf this year, but I'm excited that I'll be helping my daughter move into her dorm for her first year at college! Enjoy the conference everyone.
For most things, yes. For state ID, no. I'd be concerned about this scenario:
Officer: "I need to see your ID"
Person: *unlocks phone, opens wallet app to show ID*
Officer: *takes phone to verify ID, now has unfettered access to device w/o pesky 5th amendment issues*
Also, `import {Direction} from...` is arguably better than hard coding values as package authors can make changes to enums and hang deprecation comments on outdated members.
I've thought it might be cool to be @premiumbusiness, but given the new policy I'm not sure I'll qualify. Maybe we can start a compiler development esport and register @typescript as a competitive team?
If you want to send me a DM I'd be happy to discuss my current thinking on the proposal. I've been working on an updated version that I hope to post soon.
Congrats to my middle daughter who graduated today with both her high-school diploma *and* an Associates Degree in Arts & Sciences with high distinction!
There are some types, like `Awaited<T>`, `Exclude<T>`, and `Extract<T>`, that would be better as a type operator. Conditional types like those can often be a pain due to limitations with comparability.
My RegExp Match Indices proposal (github.com/tc39/proposal-reg…) is now shipping in nightly builds for 3 major browsers!
- Chrome Canary 91
- Firefox Nightly 88
- Safari Tech Preview 122
🚀🚀🚀
Thanks to everyone who helped made this a reality. Now on to more RegExp features!
A union of literals provides little to no support for quick info/documentation in an editor. Enums give you a place to hang documentation as well as a logical grouping of related values.
Enum + decorators + JSON replacer/reviver=flexible serialization. Or just use string values.
Ah yes, cloud autosave. Especially useful when you paste unicode characters into an app that cause it to crash, but only after they've been synced to the cloud so that every time you open the app it crashes.
On. Every. Machine.
ALT Quote from Jurassic Park - "Your sciientists were so preoccupied with whether they could they didn't stop to think if they should." - Dr. Ian Malcolm
Last night my daughter was accepted into her dream college. In her excitement she danced around like @Lin_Manuel in @HamiltonMusical getting invited to the Constitutional Convention, pantomiming the coat-tail flip and all.
I don't have a StreamDeck, but I've been playing around with obs-websocket and an electron app that essentially does the same thing running on a Surface Pro (pictured below). One of these days I'll get around to putting the sources on GitHub...
ALT Streaming setup with Surface Pro as a StreamDeck stand-in
`object` is the non-primitive type. `{}` isn't non-primitive, since it uses structural typing. There's some oddity between `typeof` and types, since `null` is typeof "object" but type `null`, and function is typeof "function" but is in the domain of type `object`.
Proud of my 17 year old daughter.
Friday: she played viola at Benaroya Hall in Seattle as part of a professional symphony orchestra.
Saturday: she won a gold medal at The Revolution BJJ competition in the adult women's blue-belt division.
She's a bit of an overachiever. 🙂
One of my early goals with github.com/rbuckton/proposal… was to look at ways to codify reverse lookup so that we didn't conflate the enum declaration itself with its inverse mappings. i.e., use `Enum.getName(AlbumStatus, 0)` or `Enum.getName(AlbumStatus, "new_release")` instead.
If getConnection itself is async, you await getConnection. If it's *cleanup* is async, you use `await using`.
Also, neither `using` nor `await using` support destructuring, so if both parts are async it's:
await using connection = await getConnection();
I think the trick is, if you're going to go with run of the mill, everyday names in your epic fantasy or sci-fi series, just go all in with it. Make a few in-jokes about the absurdity of naming the God Emperor "Tim", and you're good.
One of the reasons I started following was because my daughter does BJJ, a.k.a. "The Martial Art of folding clothes while people are still wearing them". She's always been an amazing competitor, so pandemic restrictions have been hard on her the last year.
As an Influencer? I looked into it and I guess I need a Wikipedia article about me or something. Championing a proposal to Stage 4 at TC39 doesn't seem newsworthy enough to get on Google trends.
You should only use .d.ts to represent other people's code (runtimes, packages, etc.), never your own code, and you publish your .d.ts outputs so that others can do the same. The split between .ts and .d.ts should be the package boundary.
Alright, I did it! I finally got around to publishing this after a lot of cleanup and dependency updates. Only building for Windows in nightly, but hope to change that soon. Give it a try if you use OBS studio and have a spare tablet lying around:
github.com/rbuckton/obs-remo…
Screenshot of the app in demo mode. The current scene updates multiple times a second, can show/hide scenes, has a light/dark mode, and quick access to mute audio inputs.
ALT Screenshot of work-in-progress OBS remote control app
Weekend project: Replacing the head unit on my car with an Android system w/navigation.
Dont know much else about cars, but I at least know how to do this.
Reserved functionality, there wasn't a clear idea of how best to handle it and they didn't want to repeat the necessity of `this` type checking in the constructor that ES5-style "classes" had. You could use Decorators to makwle a class callable, but that's not well typed in TS.
The decorators proposal for JavaScript is heavily influenced by Python decorators, C# Attributes, and Java annotations. These are exactly the kind of use cases I imagined when we added expirmental support for decorators to TypeScript.
Because you can't call a class, even with new.target? You sort of could when you down level to ES5, but actual classes in ES2015 and up throw when you call them as functions.
It's more that it only tests *own* properties, so if an object has an *inherited* property with the provided name, hasOwnProperty would return false and we would incorrectly narrow as we make no distinction between own vs. Inherited in the type system.
Christmas #tabletop gaming haul. This is just the stuff my wife and kids got me, or that my wife and I got for the family and doesn't include the games we got just for them.
We like our games in this house.
ALT The following games are shown:
- Zombie Kittens (standalone/expansion to Exploding Kittens)
- Call To Adventure: Brandon Sanderson's The Stormlight Archive
- Magic: the Gathering Universes Beyond Dr. Who themed Commander Decks (The original series Doctors and the 9th, 10th, and 11th Doctors)
- Here to Slay
- The Mind
- A Little Wordy
- A playmat featuring a map of the world of Roshar from The Stormlight Archive
I imagine ADT enums and Extractors/pattern matching would be a good fit for this. I'll weigh in on the issue later, but Array/iterator destructuring is considerably slower than object destructuring since, IIRC, no runtimes currently optimize Array destructuring.