unplugin-preprocessor-directives
Version:
<img src="assets/logo.svg" alt="logo" width="100" height="100" align="right" />
32 lines (23 loc) • 2.01 kB
TypeScript
import { C as Comment, S as SimpleToken, a as SimpleNode, D as Directive, b as DefineToken, c as DefineStatement, I as IfToken, d as IfStatement, M as MessageToken, e as MessageStatement, U as UserOptions, P as ProgramNode } from './types-BCZBkOKx.js';
export { j as CodeStatement, k as CodeToken, f as Context, F as FunctionDirective, G as Generate, h as Lex, L as Lexer, O as ObjectDirective, l as Options, i as Parse, g as Parser, T as Transform, r as resolveOptions, s as sortUserDirectives } from './types-BCZBkOKx.js';
import * as _unplugin from 'unplugin';
import { UnpluginFactory } from 'unplugin';
import 'magic-string';
import 'vite';
declare const comments: Comment[];
declare function defineDirective<T extends SimpleToken, N extends SimpleNode>(directive: Directive<T, N>): Directive<T, N>;
declare const theDefineDirective: Directive<DefineToken, DefineStatement>;
declare function resolveConditional(test: string, env?: NodeJS.ProcessEnv): boolean;
declare const ifDirective: Directive<IfToken, IfStatement>;
declare const MessageDirective: Directive<MessageToken, MessageStatement>;
declare const unpluginFactory: UnpluginFactory<UserOptions | undefined>;
declare const unplugin: _unplugin.UnpluginInstance<UserOptions | undefined, boolean>;
declare function simpleMatchToken<T = SimpleToken>(comment: string, regex: RegExp): T | undefined;
declare function createProgramNode(body?: SimpleNode[]): ProgramNode;
declare function isComment(line: string): boolean;
declare function parseComment(line: string): {
type: string | undefined;
content: string;
};
declare function findComment(type: string): Comment;
export { Comment, DefineStatement, DefineToken, Directive, IfStatement, IfToken, MessageDirective, MessageStatement, MessageToken, ProgramNode, SimpleNode, SimpleToken, UserOptions, comments, createProgramNode, defineDirective, findComment, ifDirective, isComment, parseComment, resolveConditional, simpleMatchToken, theDefineDirective, unplugin, unpluginFactory };