Twitter | Search | |
bterlson.d.ts
JavaScript, TypeScript, Azure, editor of the ECMAScript standard. Microsoft employee but my opinions are my own.
3,176
Tweets
554
Following
6,442
Followers
Tweets
bterlson.d.ts Feb 17
Seems fine to me! I did similar tricks for strict-event-emitter-types. KnownKeys is pretty clever; wish I knew a for straightforward approach.
Reply Retweet Like
bterlson.d.ts Feb 15
Replying to @jalbertbowdenii
I suppose Occam's razor points to "robots are paying customers too". Regardless, what a disaster.
Reply Retweet Like
bterlson.d.ts Feb 15
Replying to @jalbertbowdenii
My experience is 5% real calls (maybe a couple per week), 90% "Jenny from account services"-type robocall scams, and 5% Walgreens telling me my prescriptions are ready. But who, exactly, does the status quo benefit? Don't phone companies want people to pay for phone service?
Reply Retweet Like
bterlson.d.ts Feb 15
How is it that we've allowed our telephone service to be rendered nearly useless by bad actors? I feel like this should be a major scandal. In the meantime, don't call me and especially don't leave a voicemail. I won't get it.
Reply Retweet Like
bterlson.d.ts Feb 13
Replying to @domenic @stefanpenner
Reply Retweet Like
bterlson.d.ts Feb 13
Replying to @domenic @stefanpenner
Yep! (Also totally agreed)
Reply Retweet Like
bterlson.d.ts Feb 13
I recently did a s/npm/npm/gi and s/Node/node/g across numerous docs I'm working on so you'd think I'd be on this.
Reply Retweet Like
bterlson.d.ts Feb 13
Oh, how embarrassing.
Reply Retweet Like
bterlson.d.ts Feb 13
Tree, yesterday: I will *literally* explode if I have to deal with one more day. Tree, today:
Reply Retweet Like
bterlson.d.ts Feb 12
Replying to @getify @_joshburgess
Agree with the original error message being too specific! But enums are no substitute for literal types. Maybe `keyof` is a better example - it's very useful to declare that a string is actually a key of another object. This can't be done with an enum.
Reply Retweet Like
bterlson.d.ts Feb 12
Replying to @getify @_joshburgess
One specific value, yeah, use a const. But what about two or more specific values?
Reply Retweet Like
bterlson.d.ts Feb 12
Replying to @_joshburgess @getify
Sames. I want RegExp literal types. `let dateStr: /\d\d-\d\d-\d\d\d\d/ = '12-07-2019'`. Combined with conditional and map types it lets you do some pretty awesome things like typing dynamic proxy behavior.
Reply Retweet Like
bterlson.d.ts Feb 12
Replying to @getify @_joshburgess
Literal types underpin many features in TS. They're why e.g. ObjectType["foo"] gets you the type of the "foo" property of ObjectType. But maybe its most commonly useful for literal unions like in `function move(dir: "up" | "down") { }`.
Reply Retweet Like
bterlson.d.ts Feb 12
Replying to @SeaRyanC
I'll take an npm link that doesn't create duplicate copies of shared dependencies, in case you find one of those in your travels.
Reply Retweet Like
bterlson.d.ts Feb 12
Reply Retweet Like
bterlson.d.ts Feb 12
I HAVE STRONG OPINIONS. (Answer: probably not what you're shipping in NPM)
Reply Retweet Like
bterlson.d.ts Feb 12
Replying to @alephnaught2tog
AMQP over websockets talking directly to the Service Bus websocket endpoint (note that websockets aren't supported by the official client yet, but working on a PR for that as we speak ;))
Reply Retweet Like
bterlson.d.ts Feb 12
Replying to @jswalden @Azure
Yeah that's how storage rolls I guess. I could click the custom domain button but then my hosting costs go from millicents to dollars...
Reply Retweet Like
bterlson.d.ts Feb 12
I built the worst chat app! Incoming messages are sent to only one other person (maybe yourself). But it's serverless, so automatically awesome, even if it's mostly an XSS factory. Anyway have fun until I take it down in a bit. View page source for code.
Reply Retweet Like
bterlson.d.ts Feb 12
Replying to @MylesBorins @mathias
Bonjour, Myles!! Est-ce que tu aimes la glace?
Reply Retweet Like