fix(eventbus): add missing type declarations for EventBus subpath exports#8423
Open
YevheniiKotyrlo wants to merge 1 commit intoprimefaces:masterfrom
Open
Conversation
eb27848 to
ad1e7ab
Compare
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.
Defect Fixes
Fixes #8422
The four EventBus subpath exports (
primevue/toasteventbus,primevue/overlayeventbus,primevue/confirmationeventbus,primevue/dynamicdialogeventbus) ship JavaScript but no.d.tstype declarations. Projects usingskipLibCheck: falseget TS7016 errors — every other PrimeVue subpath export (100+ modules) includes type declarations except these four.Problem
After this fix, all event bus operations are fully typed:
Root cause
The source directories for these four modules only contain
.jsandpackage.jsonfiles — no.d.ts— so the build pipeline (copyDependenciesinpostbuild.mjs) has nothing to copy todist/.Changes
index.d.tsfor each EventBus module with typed overloads foron,off,emit, andclear"types": "./index.d.ts"to each module'spackage.jsonToastMessageOptions,ConfirmationOptions,DynamicDialogInstance)TerminalService.d.tsScope / Impact
anytypesfield)Verification
tsc --noEmitwithskipLibCheck: false