Skip to content

Export nameable procedure definition types - #408

Closed
replitom wants to merge 2 commits into
mainfrom
nexus/nameable-procedure-types
Closed

Export nameable procedure definition types#408
replitom wants to merge 2 commits into
mainfrom
nexus/nameable-procedure-types

Conversation

@replitom

@replitom replitom commented Sep 5, 2026

Copy link
Copy Markdown

Why

River's procedure constructors return a branded type whose public inferred declarations can expose the internal __BRAND_DO_NOT_USE property. Downstream packages with declaration emit enabled therefore cannot give exported procedure definitions and instantiated service maps stable public names without manually widening them.

What changed

  • Add public ProcedureDefinition and exact ProcedureDefinitionMap aliases while preserving the existing brand representation and constructor assignability.
  • Export the existing schema-map and instantiated service-map types from the package root.
  • Add a consumer declaration-emit regression test covering constructor assignability, exact procedure keys, payload preservation, public service-map naming, and absence of the internal brand name in the consumer declaration.

Downstream use depends on publishing a new @replit/river release and then bumping the consuming package's River version. This PR does not patch any consumer's node_modules.

Versioning

  • Breaking protocol change
  • Breaking ts/js API change

~ written by Replit ჻

@replitom

replitom commented Sep 5, 2026

Copy link
Copy Markdown
Author

Closing after measuring the result: this did not produce a large enough improvement in the developer experience to keep.

@replitom replitom closed this Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant