import { Extension } from 'sourcegraph/module/client/extension'; import { ErrorLike } from '../errors'; import { ExtensionManifest } from '../schema/extension.schema'; import * as GQL from '../schema/graphqlschema'; import { Settings } from '../settings'; /** * Describes a configured extension. * * @template S the configuration subject type * @template C the type of the extension's settings (overlaid on the base settings JSON Schema-derived type) * @template RX the registry extension type */ export interface ConfiguredExtension = Pick> extends Extension { /** The parsed extension manifest, null if there is none, or a parse error. */ manifest: ExtensionManifest | null | ErrorLike; /** The raw extension manifest (JSON), or null if there is none. */ rawManifest: string | null; /** The corresponding extension on the registry, if any. */ registryExtension?: RX; } /** Reports whether the given extension is enabled in the settings. */ export declare function isExtensionEnabled(settings: Settings | ErrorLike | null, extensionID: string): boolean; /** Reports whether the given extension is mentioned (enabled or disabled) in the settings. */ export declare function isExtensionAdded(settings: Settings | ErrorLike | null, extensionID: string): boolean; /** * Shows a modal confirmation prompt to the user confirming whether to add an extension. */ export declare function confirmAddExtension(extensionID: string, extensionManifest?: ConfiguredExtension['manifest']): boolean;