import type * as esbuild from 'esbuild';
export { _BuildUserError, _BuildSystemError } from './errors.js';
declare const _brand: unique symbol;
/**
 * Pre-computed analysis result from `_analyzeForDispatch`. Treat as opaque —
 * pass directly to `_createPlatformDispatchPlugin` without inspecting or
 * constructing.
 * @internal
 */
export interface _DispatchAnalysis {
    /** Nominal brand that prevents construction outside this module. */
    readonly [_brand]: never;
}
/**
 * Analyzes the extension entry point to determine if a full platform dispatch
 * shim can be built. Returns opaque analysis data when all conditions are met:
 *
 * - The entry point has a named default export
 * - The export implements a recognised extension interface
 * - The installed SDK version provides `$platformWrap*` factories
 *
 * Returns `null` if any condition is not met (old SDK, unrecognised interface,
 * no named default export, or non-extension script). The caller should treat
 * `null` as "build without the plugin".
 *
 * Throws `_BuildUserError` if a reserved identifier collision is detected in
 * the source (only checked when a shim would otherwise be installed).
 * @internal
 */
export declare function _analyzeForDispatch(entryPoint: string): _DispatchAnalysis | null;
/**
 * Creates an esbuild plugin that appends a proxy dispatch table export
 * (`__stripe_platform_dispatch__`) to the extension entry point.
 *
 * Requires pre-computed analysis from `_analyzeForDispatch`. The plugin uses
 * the cached source and descriptor data directly, avoiding redundant file
 * reads and SDK introspection during the build.
 * @internal
 */
export declare function _createPlatformDispatchPlugin(analysis: _DispatchAnalysis): esbuild.Plugin;
//# sourceMappingURL=plugin.d.ts.map