astro-ghostcms/.pnpm-store/v3/files/ee/78dc2f7fd87f9feef433e578cb6...

28 lines
797 B
Plaintext
Raw Normal View History

2024-02-14 14:10:47 +00:00
import type { ParseOptions, ParseResult, Point } from '@astrojs/compiler/types';
import type { LSPTSXRanges } from './astro2tsx.js';
export type AstroMetadata = ParseResult & {
frontmatter: FrontmatterStatus;
tsxRanges: LSPTSXRanges;
};
export declare function getAstroMetadata(fileName: string, input: string, options?: ParseOptions): Omit<AstroMetadata, 'tsxRanges'>;
interface FrontmatterOpen {
status: 'open';
position: {
start: Point;
end: undefined;
};
}
interface FrontmatterClosed {
status: 'closed';
position: {
start: Point;
end: Point;
};
}
interface FrontmatterNull {
status: 'doesnt-exist';
position: undefined;
}
export type FrontmatterStatus = FrontmatterOpen | FrontmatterClosed | FrontmatterNull;
export {};