fix: TS diagnostic in events middleware and TextField prop binding order#52
Open
enricopolanski wants to merge 1 commit into
Open
fix: TS diagnostic in events middleware and TextField prop binding order#52enricopolanski wants to merge 1 commit into
enricopolanski wants to merge 1 commit into
Conversation
- events middleware: suppress effect/returnEffectInGen so makeEvents returns the SSE Effect (callers yield* it). Removing the diagnostic fixes the TS2345 at router.ts where handleEvents.pipe(Effect.tapCause) required an Effect, not a bare HttpServerResponse. - TextField.vue: bind v-bind="$props" before :type so the computed number/text type is not overridden by an incoming $props.type.
patroza
reviewed
Jun 2, 2026
| <v-text-field | ||
| :type="field.type === 'float' || field.type === 'int' ? 'number' : 'text'" | ||
| v-bind="$props" | ||
| :type="field.type === 'float' || field.type === 'int' ? 'number' : 'text'" |
Member
There was a problem hiding this comment.
The issue is that the original is the correct one; the default should be set by us and optional props should override it when set. However the types of the props are wrong; they don’t show up as optional but always set to X | undefined, I reckon, hence the warning.
The better workaround short of fixing the actual issue in the original typings or vue-tsc or whichever is the culprit, is to manually merge the properties on the v bind level: { …$props, type: $props.type ?? field.type === …
Contributor
Author
There was a problem hiding this comment.
I thought $props was there only to allow passing vuetify's own props.
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.
What
Two small fixes found while getting the boilerplate to compile cleanly.
api/src/lib/middleware/events.ts—makeEventsis meant to return the SSEEffect<HttpServerResponse>so callersyield*it in their own gen (seerouter.ts, wherehandleEvents.pipe(Effect.tapCause(...))needs anEffect). Theeffect/returnEffectInGendiagnostic flags this intentional pattern; suppressing it keepsreturn makeSSE(...)and fixes theTS2345atrouter.ts:74(a bareHttpServerResponsewas being piped throughEffect.tapCause).frontend/components/TextField.vue— movev-bind="$props"before the explicit:typebinding so the computednumber/texttype wins instead of being overridden by an incoming$props.type.No changeset included — the repo has no
.changeset/setup; happy to add one if preferred.