Skip to content
This repository was archived by the owner on Feb 18, 2026. It is now read-only.

Refactor: Mark internal methods as private#19

Open
ThisIsMissEm wants to merge 1 commit into
skyware-js:mainfrom
ThisIsMissEm:refactor/mark-internal-methods-as-private
Open

Refactor: Mark internal methods as private#19
ThisIsMissEm wants to merge 1 commit into
skyware-js:mainfrom
ThisIsMissEm:refactor/mark-internal-methods-as-private

Conversation

@ThisIsMissEm
Copy link
Copy Markdown
Contributor

This cleans up the documentation a bit, here's the existing:
Screenshot 2025-11-08 at 22 04 58 Screenshot 2025-11-08 at 22 06 15

And the new:

Screenshot 2025-11-08 at 22 06 37

Whilst one could argue this is a breaking change, by making app private, it didn't currently work correctly for registering additional routes due to the issues described in #8

@ThisIsMissEm
Copy link
Copy Markdown
Contributor Author

ThisIsMissEm commented Nov 8, 2025

I'm unsure if it actually makes sense to expose the methods formatLabel, labelIsSigned and signLabel, since the signing of labels is internal to the labeler service. Removing these from the public API would allow a refactoring of the types that would make the documentation clearer:

We could have a Label type, where CreateLabelData and SavedLabel is:

// Assumes Label has `sig: Bytes; src: Did; uri: Did | CanonicalResourceUri;`
type CreateLabelData = MakeOptional<Omit<Label, "$type" | "ver" | "sig"> & { src: string, uri: string }, "cts" | "src">
type SavedLabel = Label & { id: number; }

Which would get us down to just three exported types for the public API for labels, which would be more understandable from a public API documentation perspective.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant