import type { TypeScriptLanguageHost, VueCompilerOptions } from '@vue/language-core'; import type ts from 'typescript/lib/tsserverlibrary'; import { type ComponentLibraryMeta, type MetaCheckerOptions, type MetaTransformer, type SingleComponentMeta } from '../types'; import type { Repo } from './repo'; /** * Provide component metadata checker services * @group project.service */ export declare class TypeCheckService { private readonly ts; private vueCompilerOptions; private globalComponentName; private repo; private langService; private globalPropNames?; private options; constructor(ts: typeof import('typescript/lib/tsserverlibrary'), checkerOptions: MetaCheckerOptions, vueCompilerOptions: VueCompilerOptions, globalComponentName: string, _host: TypeScriptLanguageHost, repo: Repo); get $tsLs(): ts.LanguageService; private getType; private getProps; private getEvents; private getSlots; private shouldPublic; private shouldIgnore; private getExposed; /** * only get value export */ getExportNames(componentPath: string): string[]; /** * Get the export * @param componentPath * @param exportedTypes Whether to export all types */ getExported(componentPath: string, exportedTypes?: boolean): { symbolNode: ts.Expression; exports: ts.Symbol[]; exportedTypes: ts.Type[]; }; private createComponentMeta; /** * Get component metadata through the entry file, * this method will automatically filter vue components * @param entry Entry file, export all components and types * @returns ComponentLibraryMeta * @example * ```ts * import { dumiTransfomer, createProject } from '@dumijs/vue-meta'; * const project = createProject({ * tsconfigPath: '/tsconfig.json', * checkerOptions, * }); * // `dumiTransfomer` will convert the original metadata into metadata adapted to dumi * project.service.getComponentLibraryMeta(entry, dumiTransfomer); * ``` */ getComponentLibraryMeta(entry: string, transformer?: MetaTransformer): T; private getFunctionMeta; private getSingleComponentMeta; /** * Get metadata of single component * If the component to be obtained is not a vue component, an error will be thrown * @param componentPath The file path where the component is located * @param exportName Component export name, the default is to get `export default` */ getComponentMeta(componentPath: string, exportName?: string): SingleComponentMeta; /** * Close the Type checker service */ close(): void; }