UNPKG

marko

Version:

Optimized runtime for Marko templates.

21 lines (20 loc) • 927 B
import { types as t } from "@marko/compiler"; import type { LoadTrigger } from "../../html/assets"; declare module "@marko/compiler/dist/types" { interface ImportDeclarationExtra { tagImport?: string; loadImport?: LoadImportConfig; } } export type LoadImportConfig = { render: true; triggers?: never; } | { render: false; triggers: LoadTrigger[]; }; export declare function importOrSelfReferenceName(file: t.BabelFile, request: string, name: string, nameHint?: string): t.Identifier; export declare function isCircularRequest(file: t.BabelFile, request: string): boolean; export declare function trackTagImport(tagImport: string): void; export declare function getImportFacts(importDecl: t.NodePath<t.ImportDeclaration>): t.ImportDeclarationExtra & t.NodeExtra; export declare function getLoadAttr(importDecl: t.NodePath<t.ImportDeclaration>): t.NodePath<t.ImportAttribute> | undefined;