import { parseCodeFrontmatter } from '../utils'; import type { ExampleBlockAsset } from 'dumi-assets-types'; import type { sync } from 'enhanced-resolve'; import { IDumiTechStack } from '../types'; export interface IParsedBlockAsset { asset: ExampleBlockAsset; /** * resolveMap: { * '@/constants': '/path/to/constants.ts', * 'antd/es/button': '/path/to/antd/es/button/index.jsx', * } */ resolveMap: Record; /** Resolved ordinary styles requested exclusively by side-effect imports. */ sideEffectStyles?: string[]; frontmatter: ReturnType['frontmatter']; } interface IParseBlockAssetOptions { fileAbsPath: string; fileLocale?: string; id: string; refAtomIds: string[]; entryPointCode?: string; resolver: typeof sync; techStack: IDumiTechStack; cacheable?: boolean; collectSideEffectStyles?: boolean; } declare function parseBlockAsset(opts: IParseBlockAssetOptions): Promise; export default parseBlockAsset;