Skip to content
Docs Try Aspire

getRequiredService

Function
📦 Aspire.Hosting v13.2.0-preview.1.26159.1
interface IServiceProvider {
// ... omitted for brevity
getRequiredService(typeId: string): any;
}

Signature

method getRequiredService
Gets a required service by ATS type ID
getRequiredService(typeId: string): any
typeId string
any

Applies to

This function is an extension method on the following types: