UNPKG

marko

Version:

Optimized runtime for Marko templates.

19 lines (18 loc) • 837 B
import { types as t } from "@marko/compiler"; declare const kModuleRead: unique symbol; declare module "@marko/compiler/dist/types" { interface NodeExtra { [kModuleRead]?: ModuleRead | null; } } /** A read of an import binding (`styles.box`), set once its module loads. */ export interface ModuleRead { /** The binding's name, then the member names read from it. */ read: string[]; /** The import's source; none for a `<style/name>` tag's own stylesheet module. */ request: string | undefined; } /** A module read of a stylesheet module, whose reads are class name strings. */ export declare function getStyleImportRead(path: t.NodePath, expr: t.Expression): string[] | undefined; export declare function toModuleReadExpression([name, ...members]: string[]): t.Identifier | t.MemberExpression; export {};