refactor(conformance): introduce StoryboardStepHintBase for kind+message invariant#951
Closed
bokelley wants to merge 1 commit into
Closed
refactor(conformance): introduce StoryboardStepHintBase for kind+message invariant#951bokelley wants to merge 1 commit into
bokelley wants to merge 1 commit into
Conversation
Contributor
Author
|
Superseded by #959 — landed there as part of the structured StoryboardStepHint taxonomy. |
Contributor
Author
|
Superseded by #959 — |
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.
Closes #950
Summary
StoryboardStepHintBase<K extends string>interface (no= stringdefault) tosrc/lib/testing/storyboard/types.tsContextValueRejectedHintextendsStoryboardStepHintBase<'context_value_rejected'>, removing the duplicatekindandmessagedeclarationsStoryboardStepHintBasefromstoryboard/index.tsandsrc/lib/testing/index.tsalongsideStoryboardStepHintandContextValueRejectedHintWhat was tested
tsc --noEmiton the lib tsconfig shows only pre-existing environment errors (@types/nodemissing, deprecatedmoduleResolution); zero new type errors introducedContextValueRejectedHintextends the base with a concrete literal — discriminated union narrowing confirmed unaffectedbuildHintobject literal inrejection-hints.tscontinues to typecheck (explicitkind: 'context_value_rejected'satisfies the base + concrete fields)Notes
StoryboardStepHintBase<string>is the recommended supertype for fallback renderers (see JSDoc on the interface)= stringdefault was intentionally omitted: callers must supply the literal type argument, preventing future kinds from accidentally inheritingkind: stringand losing discriminant narrowingPre-PR review:
typekeyword in inner barrel unfounded (already insideexport type {block)StoryboardStepHintBase<string>supertype pattern is sound; two nits (inline JSDoc example, comment explaining absent default) noted for follow-upSession: https://claude.ai/code/session_01P4h7SnRH8N5djMswLnFzf7
Generated by Claude Code