Repository navigation
refactor(plugin-gateway): move resolvable types to types.ts and helpers to util - #156
Merged
Merged
Conversation
Mirrors discord.js's layout: the Resolvable types live in src/types.ts, Colors in util/Colors.ts and resolveColor in util/Util.ts.
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Pure mechanical follow-up to #154, splitting util/resolvables.ts to mirror discord.js's src/typings layout. No behavioral change; the changeset is correctly empty.
src/types.ts(new, tracked by git as a rename ofutil/resolvables.ts): holds every*Resolvabletype alias/interface plusColorResolvable/HexColorString; import paths adjusted from../to./since the file moved up one directory.src/util/Colors.ts(new): theColorsconst object, unchanged.src/util/Util.ts(new):resolveColor, unchanged, importingColorsand theColorResolvabletype from their new locations.src/index.ts:export * from "./util/resolvables.js"replaced withexport * from "./util/Colors.js",export * from "./util/Util.js", andexport type * from "./types.js"— the public export surface (runtimeColors/resolveColor, everything else type-only) is preserved.tests/util.test.ts: renamed fromtests/resolvables.test.ts, imports updated to match.
Verified: repo-wide grep for resolvables turns up zero remaining references, tsc --noEmit -p packages/plugin-gateway/tsconfig.json is clean (after building @wolfstar/plugin-cache so its declarations resolve), and vitest run tests/util.test.ts passes 8/8.
Claude Sonnet | 𝕏
This was referenced Sep 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

🔗 Linked issue
Follow-up to #154.
📚 Description
#154 put the resolvable types,
ColorsandresolveColorin oneutil/resolvables.ts. This splits them the way discord.js does: the types move tosrc/types.ts(itstypings/index.d.ts),Colorstoutil/Colors.tsandresolveColortoutil/Util.ts, matchingsrc/utilin 14.27.0.Everything is still exported from the package root, so nothing changes for consumers and the changeset is empty.
Open question:
Util.jsin discord.js also hasparseEmojiandresolvePartialEmoji. We have two copies of that logic (ReactionEmoji.resolvePartialand a private helper inMessagePayload.ts) that behave slightly differently. I left them alone here. They could move intoutil/Util.tsin a separate PR.Type of Change
Pre-flight Checklist
pnpm changeset(orpnpm changeset add --emptyif no release is needed). See .changeset/README.md.