import { ExtensionAPI } from "../../extension.api" ; export type APIUnavailableReason = 'version-unknown' | 'version-removed' ; export interface APIUnavailable { readonly available : false ; readonly reason : APIUnavailableReason ; } export interface APIAvailable < T > { readonly available : true ; readonly api : T ; } export type API < T > = APIAvailable < T > | APIUnavailable ; export interface APIBroker extends ExtensionAPI { get ( component , version ) : API < any > ; }