refac: dx: Created shared types package to eliminate type duplication#283
refac: dx: Created shared types package to eliminate type duplication#283Chongai-Cli wants to merge 1 commit into
Conversation
Xhristin3
left a comment
There was a problem hiding this comment.
Thanks for the refactor — consolidating types into @xstreamroll/types is a great move. Holding on merge because the quality CI is red:\n\nnpx tsc --noEmit is failing with TS6059 in the api workspace. The new package lives at packages/types/src/, but api/tsconfig.json's rootDir is still ./src, so the compiler treats those files as 'outside of rootDir'.\n\nFix options (pick one):\n- expand api/tsconfig.json rootDir to include ../packages/types/src (and add it to include), or\n- build @xstreamroll/types first and point paths/baseUrl at its dist instead of src, or\n- mark @xstreamroll/types as composite + references and use project references.\n\nRe-request review once tsc --noEmit is green on the api workspace. 🙏
Xhristin3
left a comment
There was a problem hiding this comment.
Thanks for taking on this refactor — looks like a solid step toward de-duplicating types. Unfortunately the CI quality check is failing on this branch. Could you take a look at the failing logs and push a fix? Happy to merge once it's green.
|
Hey @Chongai-Cli \u2014 great refactor idea; consolidating shared types into @xstreamroll/types will pay off across the workspace. CI is currently red on |
Summary
Provide a short description of the changes in this PR and the motivation/why.
Modified files:
@xstreamroll/types: "*" dependency
definitions with re-exports from @xstreamroll/types;
StreamConfig stays local (SDK-specific)
dependency
AdminStats from @xstreamroll/types instead of
defining it
DB shape (number IDs, Date), re-exports shared
stream helper types
shape, re-exports PagedTags
dependency
definitions, re-exports from @xstreamroll/types
definition, re-exports from @xstreamroll/types
Notification/NotificationsPage definitions,
re-exports from @xstreamroll/types
xstreamroll-sdk/tsconfig.json — added paths alias
for @xstreamroll/types →
../packages/types/src/index.ts
Related issues
Link any related issues. Use
Closes #<id>to close issues automatically.Closes #206
Type of change
Match the PR title to Conventional Commits:
<type>(<scope>): <summary>.Testing performed
Describe how you tested this change. Include commands, environment, and any setup steps.
Example:
Screenshots (if applicable)
Attach screenshots or animated GIFs for UI changes.
Checklist — author
origin/mainand resolved conflicts.npm run lint,npm run build,npm test.Checklist — reviewer guidance
Follow the full PR process in CONTRIBUTING.md — particularly: sync with
main, run quality gates, request a CODEOWNER review, and use squash-and-merge with a Conventional Commit-style squash message.