Consume canonical TypeScript API exports - #1430
Draft
Adam Ratzman (adamint) wants to merge 2 commits into
Draft
Conversation
Validates schema version 1 documents produced by `aspire sdk export` before the site reads them: unknown schema versions, the wrong language, missing package identity, duplicate stable IDs, declaration IDs that disagree on content, and blank signatures are all rejected at the input rather than surfacing as empty code blocks on a published page. The fixtures are unedited CLI output for one core and one integration package. Their combined declaration fragments type-check with noEmit and skipLibCheck disabled, which is what lets the site stop authoring shims. No signature conversion here; consumers still read the existing data. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 819baaf4-91c3-44ce-8004-3dbc9110f810
Regenerated with the producer fixes: augmentation item IDs now carry the contributing package so two integrations extending DistributedApplicationBuilder cannot collide, and CreateBuilderOptions gained the client-only throwOnPendingRejections property the module has always shipped. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 819baaf4-91c3-44ce-8004-3dbc9110f810
Contributor
Frontend HTML artifact readyThe latest frontend build uploaded the This comment updates automatically when a new frontend build artifact is uploaded. |
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.
Draft. Consumer half of microsoft/aspire#19032 — tracking #17608.
Today
AtsJsonGeneratorreconstructs TypeScript signatures on the site side: options-overload synthesis, C# inheritance borrowing, container-base inference, missing-declaration stubs. It's a second implementation of the TypeScript projection that lives in the wrong repo, and it drifts from what the generator actually emits. That's the bug behind #17608.The plan is for the CLI to hand us the API surface for an exact
Name@Versionand for this repo to do nothing but validate, sort, dedupe, and write.What's in the draft so far
The schema v1 contract and the fixtures, so the switchover has something to land against:
src/schemas/typescript-api-export.ts— parser/validator, typed loader,concatenateDeclarationstests/fixtures/typescript-api-export/*.json— uneditedaspire sdk exportoutput forAspire.HostingandAspire.Hosting.Redistsc --noEmit --strictwithskipLibCheckoffThe fixtures are deliberately raw CLI output, not hand-tidied — if the producer drifts, these tests are what catches it. That already paid off once: the augmentation ownership test here caught
addRedisshipping asinterface:DistributedApplicationBuilderowned byAspire.Hosting.Redis, which collides with core's item ID. Fixed on the producer side.Still to come on this branch
update-ts-api.tsontoaspire sdk exportand deleteAtsJsonGeneratorgenerate-twoslash-types.tsto validation + dedupe + writenormalize-generated-api-data.tsKeeping it a draft until microsoft/aspire#19032 is in and there's a CLI on a feed CI can restore — the refresh workflow can't run against a
sdk exportthat isn't published yet.Testing
328/328 unit tests, eslint clean.