Repository navigation
Scribe v2.1.1 - Type Accessor Fixes
A types and tooling release. Three members of the server API were missing from the type
Scribe.Server hands back, so calling them from a strict-mode script was a type error even though
they worked at runtime. It also raises the template size at which Luau gives up type-checking your
game entirely.
Added
Scribe.ExchangeableSpecis exported, and theExchangeableoption is now declared on
ScribeOptions. The option always worked, and Luau never rejected it because it does not check
extra keys in an options literal, but naming the type means a game can build the allowlist as a
typed table separately from the options table and get completion onPath,Kind,Count,
IdentityandIgnore.
Fixed
Data.PromptPurchase,Data.ExchangeandData.Stopwere missing from the typeScribe.Server
returns, so a strict-mode script calling any of them reported the key as not found in the Data
table while the call itself worked at runtime.Data.Exchangeis now typed in full, including
whatOpenhands back.Data.PromptPurchaseandData.Exchangewere new in 2.1.0;Data.Stop
had been missing since before 2.0.0.
Changed
-
A template can now be roughly three times larger before Luau reports "Code is too complex to
typecheck" at theScribe(...)call and silently stops checking the file. The accessor type is
built once per distinct shape instead of once per field, which matters because a template repeats
declarators heavily and Luau treats each one as a separate type. Measured on a template of mixed
records and containers, the limit moved from 12 roots to over 32; a template whose roots are all
structurally different still gains about half again. Nothing about the types changes: every
diagnostic is identical, across every declarator. -
Scribe.OpenExchangedeclaresStateas"Claimed" | "Staked" | "Delivering"rather than
string, so a game can narrow on it. Assigning whatData.Exchange.Openreturns to a
{ Scribe.OpenExchange }did not type-check before this.
Documentation
-
The leaderboards guide covers Roblox's built-in leaderboard UI, which renders a persistent
leaderboard with no UI code by reading an OrderedDataStore directly. It needs a store name of
LB_<BoardName>and a key template of{UserId}. AScribe.Bigboard cannot be shown that
way, because it stores a packed integer rather than the score, and the guide says so. -
The big numbers and containers guides record that a
Scribe.Bigdeclared as a field of a
container's element shape puts a template past the Luau type solver's budget, so the file stops
being type-checked. It is a type-checking limit only and the code runs correctly either way. The
guides give the shapes that do fit, including a container whose element is the big itself.
Full Changelog: v2.1.0...v2.1.1