Sign in

David Blass

@ssalbdivad.dev
1.3K followers 86 following 282 posts

author @arktype.io, cocreator Standard Schema, cofounder pullfrog.com ⛵🐸🌱

PostsRepliesMedia
David Blass @ssalbdivad.dev · 16/12/2025
Standard JSON Schema is already being adopted by AI SDK, Tanstack AI, and MCP SDK. Shout out to @lgrammel.bsky.social for day 1 support and this clean example featuring @arktype.io 🙌
120
David Blass @ssalbdivad.dev · 16/12/2025
🎉Announcing Standard JSON Schema🎉 The next spec in the Standard Schema family is here to bring library-agnostic JSON Schema to TS. Let's make sure everyone sees it🔁
1211
David Blass @ssalbdivad.dev · 10/12/2025
Just tag Pullfrog or setup auto-triggers to... 🐸plan, review, or implement PRs 🐸handle chores like issue triage and labeling 🐸address feedback and CI failures on its own PRs and it just gets better as your agents do.
130
David Blass @ssalbdivad.dev · 10/12/2025
sounds fake but I'm starting a company with my nemesis Colin P. Zod and our first hire is @AndaristRake and our first product is now in beta
1402
David Blass @ssalbdivad.dev · 30/10/2025
cursory investigation in checker.ts seems to suggest this problem would not apply since it looks for delimiters first
110
David Blass @ssalbdivad.dev · 29/10/2025
the cases that begin with `${string}${string}` should be avoidable I'm interested to double check why that's going on. unfortunately for a case like this, I tested doing the check that would be necessary to avoid `${string}${string}` an it's a huge performance hit
110
David Blass @ssalbdivad.dev · 29/10/2025
yeah generally that is avoided but there are some cases where if you already have `prefix${string}` there's no way to performantly check that appending another `${string}` is a no-op so it's irrelevant
110
David Blass @ssalbdivad.dev · 28/10/2025
when I was this I was like "no way it's way too long" but it actually worked instantly 🤯 obviously the inference is going to be less useful for clarity with this number of branches but the capture groups seem like they work?
120
David Blass @ssalbdivad.dev · 07/09/2025
JSON Schema: Making illegal states representable since 2007
072
David Blass @ssalbdivad.dev · 03/09/2025
you haven't lived until you've seen autocomplete for "string | n" try it in-browser 🛝🔗👇
151
David Blass @ssalbdivad.dev · 29/08/2025
🌶️hover clarity is a huge part of typescript dx
1162
David Blass @ssalbdivad.dev · 18/08/2025
@arktype.io schemas 👉👈 JSON-serializable TypeScript
3201
David Blass @ssalbdivad.dev · 28/07/2025
when they see you're still .chaining() in 2025
040
David Blass @ssalbdivad.dev · 24/07/2025
Yes! Everything in the repo is MIT licensed github.com/arktypeio/arktype
020
David Blass @ssalbdivad.dev · 23/07/2025
@ark/attest is the only assertion library that can snapshot TypeScript autocomplete results 📷
4262
David Blass @ssalbdivad.dev · 17/07/2025
Love great error messages but hate writing them? Out of the box, @arktype.io errors are... 1️⃣clear and concise 2️⃣readable for developers and end users 3️⃣deeply customizable to your needs
161
David Blass @ssalbdivad.dev · 12/07/2025
If you can type it with TypeScript, you can validate it with @arktype.io 🤝
1121
David Blass @ssalbdivad.dev · 23/06/2025
As far as why? For the same reason you'd want anything to be typed. It makes the intent of the regex clearer and gives you narrowed string types for stricter checks passing specific string values around.
030
David Blass @ssalbdivad.dev · 02/05/2025
Actually I just used it to get back the source of the example I deleted for you🤣
010
David Blass @ssalbdivad.dev · 02/05/2025
bonus round- choose your def
361
David Blass @ssalbdivad.dev · 15/04/2025
pro tip for library authors: save yourself a ton of headaches by adding a type error for this in your main API
2286
David Blass @ssalbdivad.dev · 11/03/2025
The TypeScript rewrite would never have worked in Rust. Learn why in 30 seconds.
1100
David Blass @ssalbdivad.dev · 08/03/2025
Managing when to inline vs. when to define a reference exactly mirrors the same problem in TS.
010
David Blass @ssalbdivad.dev · 28/02/2025
ArkType is actually the first validator with the goal of introspectability the way TS has it w/ stuff like extends, so really does seek to bridge that gap as well (this works even for very complex types).
210
David Blass @ssalbdivad.dev · 28/02/2025
Would be cool in some cases, but when you start to break down the problems ArkType and other runtime validators actually solve it kind of falls apart.
210
David Blass @ssalbdivad.dev · 08/02/2025
Ever wished you could just use your TypeScript types at runtime? With @arktype.io, you finally can. All the power of the type system, fully introspectable from native JS- the possibilities are endless🔥
2182
David Blass @ssalbdivad.dev · 01/02/2025
Imagine a schema library having better types than the language it's written for @arktype.io ☠️
3141
David Blass @ssalbdivad.dev · 24/01/2025
If your team is struggling with... ☠️tsserver lag in editor 🧩complex types 🧪type testing or benchmarking I consult and can fix your problems! @arktype.io relies on me getting this work- referrals and retweets help a ton 🙏
2178
David Blass @ssalbdivad.dev · 16/01/2025
It's ready.
0253
David Blass @ssalbdivad.dev · 09/01/2025
As expected, redeclaring `isArray` with the safer + more accurate `readonly unknown[]` as a type predicate would allow narrowing here. I realize the ship has probably set sail on that kind of breaking change, but I still don't see how that makes it "correct."
040
David Blass @ssalbdivad.dev · 09/01/2025
I didn't know about this behavior, but in what sense do you mean it is correct? I see why it doesn't work in TypeScript's type system, but you could safely narrow to string here, right?
140
David Blass @ssalbdivad.dev · 07/01/2025
And btw for anyone worried I'm getting sidetracked from @arktype.io docs... well I mean I kinda you're right but the reason I wrote it was for docs, so only one degree of procrastination😛
131
David Blass @ssalbdivad.dev · 07/01/2025
Adding type-safe grouping to `flatMorph` from @ark/util 🔥 Already using it everywhere, now it will be even everywherer.
120
David Blass @ssalbdivad.dev · 20/12/2024
The only exception to this was when I added the logic for parsing generic instantiations, I had to disambiguate them from bounds in cases like `Array<number > 0>`. So I implemented this lookaheadIsFinalizing check to determine how to parse it. At most, it needs two characters after the lookahead.
010
David Blass @ssalbdivad.dev · 20/12/2024
In case people were curious how to write an efficient type-level string parser like @arktype.io's, I implemented today's #AdventOfTypescript using the same approach: www.adventofts.com/events/2024/...
The implementation (see link)
3102
David Blass @ssalbdivad.dev · 20/11/2024
Without delving in too much, one thing you have to pay close attention to is caching. Depending on what you're importing or instantiating outside `bench` calls, if TS can reuse cached types when evaluating your benchmark, it will affect the results.
// this is incorrect because this top-level type will be cached,
// affecting the results of the benchmarks (could also occur based on what you import)

type({
	foo: "0 | (1 | (2 | (3 | 4) ) )"
})

bench("foo", () => {
	type({
		foo: "0 | (1 | (2 | (3 | 4) ) )"
	})
}).types([1811, "instantiations"])

bench("bar", () => {
	type({
		foo: "0 | (1 | (2 | (3 | 4) ) )"
	})
}).types([1811, "instantiations"])
// this is safe because the cached types are only in bench calls

bench("foo", () => {
	type({
		foo: "0 | (1 | (2 | (3 | 4) ) )"
	})
}).types([6361, "instantiations"])

bench("bar", () => {
	type({
		foo: "0 | (1 | (2 | (3 | 4) ) )"
	})
}).types([6361, "instantiations"])
100
David Blass @ssalbdivad.dev · 19/11/2024
When validating the function input, TS can look at the current string and based on that, suggest suffixes that result in a valid path. This is what allows @arktype.io to efficiently given completions for arbitrary expressions that would be impossible to precompute
010
David Blass @ssalbdivad.dev · 15/11/2024
So apparently if you subclass Array, methods like `map` will construct an empty array, then assign all the values to it 🫠
170
David Blass @ssalbdivad.dev · 14/11/2024
Do have the receipt though
031
David Blass @ssalbdivad.dev · 13/11/2024
Whoops, this should have included the hover for the second result ^^
000
David Blass @ssalbdivad.dev · 13/11/2024
Conditional types *kind of* work like this by default depending on the situation. All the edge cases make implicit distribution really unintuitive and you end up wanting to opt-out fairly often with the tuple wrapping trick, i.e. `[t] extends [string]`.
310
David Blass @ssalbdivad.dev · 07/11/2024
new least favorite thing about JS
new Array("js")
["js"]

new Array(100, 200)
[100, 200]

new Array(100)
[<100 empty slots>]
1181
David Blass @ssalbdivad.dev · 07/11/2024
How has this man not been hired by the TypeScript team yet? If this is what @andarist.bsky.social can do in his off hours, imagine his productivity if he could work on TS full-time🤯
2483
David Blass @ssalbdivad.dev · 31/10/2024
I'm looking for TypeScript consulting to support my full-time open-source work on @arktype.io! If your team struggles with... 🧩 Writing complex types to optimize DX ☠️ tsserver lag in editor 🧪 Type testing or benchmarking I can help! If not, retweets also really help💖
An editor blowing up while trying to provide autocomplete suggestions
191