Repository navigation
Exports evaluateTagged's result type by name - #202
Merged
Merged
Conversation
evaluateTagged answered ProjectedEvaluation, a type the ./tagged subpath did not export, so a host could name it only through the function's return type. The subpath now re-exports it under the name the source already uses. It is the main entry point's EvaluateResult without the ParseError arm, so every value of it is also an EvaluateResult. No answer changes. The export-surface list pins the name, and a test annotates an evaluateTagged result with it and widens it to EvaluateResult, so the typecheck stage reads both through the entries a host imports. Sabotage, each run and restored from a copy: dropping the re-export turns the export-surface pin red on its assertion and the typecheck stage red on the test's import. Refs: pts-r69a
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
evaluateTaggedansweredProjectedEvaluation, a type the./taggedsubpath did not export, so a host could name its result only through the function's return type. The same gap was closed forexecuteTagged's result type,TaggedExecution, before this.src/tagged.ts: the subpath re-exportsProjectedEvaluation(declared insrc/evaluator.ts) under the name the source already uses, with a doc comment saying how it relates to the main entry point's result type.test/export-surface.json: the name is pinned in the./taggedlist.test/tagged.test.ts: a test annotates anevaluateTaggedresult with the new name and widens it toEvaluateResult, so the typecheck stage reads both through the entries a host imports.changelog.d/pts-r69a.md: an Added line.No answer changes; the type gains an export and nothing else.
How the two names relate
The main entry point does not export
ProjectedEvaluation. ItsEvaluateResultisProjectedEvaluationwith aParseErrorarm added, the arm a source text fails on.evaluateTaggedtakes a compiled instruction list only, so it answers no parse failure, and every value ofProjectedEvaluationis also anEvaluateResult. The new test pins that assignment.Provenance
./taggedsubpath's full export list, so no record Note rides this change. ADR-0002 saysTaggedEvaluateOptionsis exported from that subpath and from no other entry point, which still holds. ADR-0005's Note on its acceptance commit list mentionsTaggedExecutiononly as part of that commit, which is unchanged.Checks
./taggedexport-surface pin went red on its assertion;