import type { LegalInventory, ShippedPackageLegalRecord } from './license-util.js'; export type ModuleType = 'connection' | 'surface'; export interface LicensePolicyIssue { packageName: string; packageVersion?: string; packageKind: ShippedPackageLegalRecord['kind']; message: string; } type LicensePolicyOutput = Pick; export declare class LicensePolicyError extends Error { readonly issues: LicensePolicyIssue[]; constructor(issues: LicensePolicyIssue[]); } /** Licenses a module may be declared as, each allowing a different set of dependency licenses */ export type ProjectLicense = 'MIT' | 'GPL-2.0-only' | 'GPL-3.0-only'; export declare const SUPPORTED_PROJECT_LICENSES: ProjectLicense[]; /** Resolve the license the packaged module is distributed under, which selects the policy applied to its dependencies */ export declare function resolveProjectLicense(inventory: LegalInventory): { declaration: string; license: ProjectLicense | undefined; }; export declare function createLicensePolicyIssues(inventory: LegalInventory): LicensePolicyIssue[]; export declare function enforceLicensePolicy(inventory: LegalInventory, options?: { ignoreLicenseRules?: boolean; stderr?: LicensePolicyOutput; }): void; export {};