Skip to content

[F] listAllServiceNamespaces

function listAllServiceNamespaces(context): Namespace[];

Currently, listServices can only be called from a program instance. This doesn’t work well if we’re doing mutation, because we want to just mutate the global namespace once, then find all of the services in the program, since we aren’t able to explicitly tell listServices to iterate over our specific mutated global namespace. We’re going to use this function instead to list all of the services in the global namespace.

See https://github.com/microsoft/typespec/issues/6247

ParameterTypeDescription
contextTCGCContext

Namespace[]