Skip to content

[docs] TypeScript withEnvironment: add ExternalServiceResource to union type example#1048

Merged
sebastienros merged 1 commit into
release/13.4from
docs/ts-withenvironment-external-service-17393-2cf4327d83f20c3e
May 23, 2026
Merged

[docs] TypeScript withEnvironment: add ExternalServiceResource to union type example#1048
sebastienros merged 1 commit into
release/13.4from
docs/ts-withenvironment-external-service-17393-2cf4327d83f20c3e

Conversation

@aspire-repo-bot
Copy link
Copy Markdown
Contributor

Documents changes from microsoft/aspire#17393 by @maddymontaquila.

Targeting release/13.4 based on the source PR milestone 13.4 (exact match on microsoft/aspire.dev).

Why this PR is needed

Aspire 13.4 extended the TypeScript withEnvironment dispatcher to accept IResourceBuilder<ExternalServiceResource> as a value, matching the long-standing C# WithEnvironment(name, externalService) overload. Previously the generated TypeScript union omitted ExternalServiceResource, causing type-checking failures when users tried to pass an external service resource. For example, this pattern now works:

const externalSvc = await builder.addExternalService("api", "(api.example.com/redacted)
builder.addViteApp("web", "./web")
    .withEnvironment("VITE_API_URL", externalSvc);

The documentation's Union types section showed the withEnvironment example without ExternalServiceResource in the [AspireUnion] declaration. This PR corrects that example.

Changes

  • Updated src/frontend/src/content/docs/extensibility/multi-language-integration-authoring.mdx — added IResourceBuilder<ExternalServiceResource> to the [AspireUnion] example in the Union types section.

Files modified

  • src/frontend/src/content/docs/extensibility/multi-language-integration-authoring.mdx (updated)

Generated by PR Documentation Check for issue #17393 · ● 82.7M ·

Documents microsoft/aspire#17393 — TypeScript withEnvironment now accepts
IResourceBuilder<ExternalServiceResource>, matching the C# overload.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@aspire-repo-bot aspire-repo-bot Bot added the docs-from-code Copilot initiated issue from dotnet/aspire repo label May 23, 2026
@aspire-repo-bot aspire-repo-bot Bot requested a review from sebastienros May 23, 2026 00:35
@IEvangelist IEvangelist marked this pull request as ready for review May 23, 2026 01:23
@IEvangelist IEvangelist self-requested a review as a code owner May 23, 2026 01:23
Copilot AI review requested due to automatic review settings May 23, 2026 01:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the integration authoring documentation to reflect Aspire 13.4’s expanded TypeScript withEnvironment union support by including IResourceBuilder<ExternalServiceResource> in the [AspireUnion] example.

Changes:

  • Added typeof(IResourceBuilder<ExternalServiceResource>) to the [AspireUnion] declaration in the Union types documentation example.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sebastienros sebastienros merged commit 8c4a211 into release/13.4 May 23, 2026
10 checks passed
@sebastienros sebastienros deleted the docs/ts-withenvironment-external-service-17393-2cf4327d83f20c3e branch May 23, 2026 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-from-code Copilot initiated issue from dotnet/aspire repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants