import type { OutputOptions as RollupOutputOptions, RollupOptions } from 'rollup'; import type { TransformOptions as BabelOptions } from '@babel/core'; import type { PackageStructure } from '@boost/common'; import type { Options as SwcOptions } from '@swc/core'; declare global { const __DEV__: boolean; const __TEST__: boolean; } export type Platform = 'browser' | 'electron' | 'native' | 'node'; export type Support = 'current' | 'experimental' | 'legacy' | 'stable'; export type Environment = `${Platform}:${Support}`; export type CommonFormat = 'lib'; export type BrowserFormat = CommonFormat | 'esm' | 'umd'; export type ElectronFormat = CommonFormat | 'esm'; export type NativeFormat = CommonFormat | 'esm'; export type NodeFormat = CommonFormat | 'cjs' | 'mjs'; export type Format = BrowserFormat | NodeFormat; export type ApiType = 'private' | 'public'; export type InputMap = Record; export interface PackemonPackageFeatures { cjsTypesCompat?: boolean; helpers?: 'bundled' | 'external' | 'inline' | 'runtime'; swc?: boolean; } export interface PackemonPackageConfig { api?: ApiType; bundle?: boolean; externals?: string[] | string; features?: PackemonPackageFeatures; format?: Format | Format[]; inputs?: InputMap; namespace?: string; platform?: Platform | Platform[]; support?: Support; } export interface PackemonPackage extends PackageStructure { packemon: PackemonPackageConfig | PackemonPackageConfig[]; release?: string; } export interface PackageConfig { api: ApiType; bundle: boolean; externals: string[]; features: PackemonPackageFeatures; formats: Format[]; inputs: InputMap; namespace: string; platform: Platform; support: Support; } export type PackageExportConditions = 'asset' | 'browser' | 'default' | 'deno' | 'development' | 'electron' | 'import' | 'module' | 'node-addons' | 'node' | 'production' | 'react-native' | 'require' | 'script' | 'solid' | 'style' | 'types'; export type PackageExportPaths = { [K in PackageExportConditions]?: PackageExportPaths | string; }; export type PackageExports = Record; export type ArtifactState = 'building' | 'failed' | 'passed' | 'pending'; export interface FilterOptions { filter?: string; filterFormats?: string; filterPlatforms?: string; skipPrivate?: boolean; } export interface BuildOptions extends FilterOptions { addEngines?: boolean; addEntries?: boolean; addExports?: boolean; addFiles?: boolean; concurrency?: number; declaration?: boolean; loadConfigs?: boolean; stamp?: boolean; timeout?: number; quiet?: boolean; } export interface BuildParams { features: FeatureFlags; format: Format; platform: Platform; support: Support; } export interface BuildResultFile { code: string; file: string; } export interface BuildResult { files: BuildResultFile[]; time: number; } export interface Build { declaration?: boolean; format: Format; stats?: { size: number; }; } export interface ValidateOptions { deps?: boolean; engines?: boolean; entries?: boolean; license?: boolean; links?: boolean; meta?: boolean; people?: boolean; quiet?: boolean; skipPrivate?: boolean; repo?: boolean; } export interface FeatureFlags { decorators?: boolean; flow?: boolean; react?: 'automatic' | 'classic'; solid?: boolean; strict?: boolean; typescript?: boolean; typescriptComposite?: boolean; } declare module 'rollup' { interface OutputOptions { originalFormat?: Format; } } export type InfraType = 'monorepo' | 'polyrepo'; export type TemplateType = 'monorepo-package' | 'monorepo' | 'polyrepo-package' | 'polyrepo'; export interface ScaffoldParams { author: string; template: TemplateType; projectName: string; packageName: string; packagePath?: string; repoUrl: string; year: number; } export type ConfigMutator = (config: T) => void; export type ConfigMutatorWithBuild = (config: T, build: BuildParams) => void; export interface ConfigFile { babelInput?: ConfigMutator; babelOutput?: ConfigMutatorWithBuild; rollupInput?: ConfigMutator; rollupOutput?: ConfigMutatorWithBuild; swc?: boolean; swcInput?: ConfigMutator; swcOutput?: ConfigMutatorWithBuild; } export type Awaitable = Promise | void; export interface TSConfigStructure { options: { declarationDir?: string; composite?: boolean; experimentalDecorators?: boolean; outDir?: string; strict?: boolean; }; projectReferences?: readonly unknown[]; } //# sourceMappingURL=types.d.ts.map