Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .changeset/apiurl-return-type-rationale.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
10 changes: 5 additions & 5 deletions packages/shared/src/apiUrlFromPublishableKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import {
} from './constants';
import { parsePublishableKey } from './keys';

// The return type is annotated explicitly so the declaration emit stays
// deterministic. An inferred union's member order comes from TypeScript's
// global type-id assignment, which shifts as unrelated code changes and made
// break-check report phantom diffs for this export. These literals mirror the
// *_API_URL constants returned below; tsc errors here if a value ever drifts.
// Explicit return type per the repo TypeScript guideline for public APIs,
// written as literals because `typeof CONST` would pull a hashed `_chunks/*`
// import into the published d.ts. The literals mirror the *_API_URL constants
// returned below (tsc errors here if a value drifts), and the pinned order
// keeps the declaration emit deterministic where inference is not.
/**
* Get the correct API url based on the publishable key.
*
Expand Down
Loading