ecmarkup
Version:
Custom element definitions and core utilities for markup that specifies ECMAScript and related technologies.
23 lines (22 loc) • 1.02 kB
TypeScript
import type { ElementLocation } from 'parse5';
import type Spec from './Spec';
export declare function warnEmdFailure(report: Spec['warn'], node: Element | Text, e: SyntaxError & {
line?: number;
column?: number;
}): void;
export declare function wrapEmdFailure(src: string): string;
export declare function offsetToLineAndColumn(string: string, offset: number): {
line: number;
column: number;
};
export declare function attrLocation(source: string | undefined, loc: ElementLocation, attr: string): {
line: number;
column: number;
};
export declare function attrValueLocation(source: string | undefined, loc: ElementLocation, attr: string): {
line: number;
column: number;
};
export declare function validateEffects(spec: Spec, effectsRaw: string[], node: Element): string[];
export declare function doesEffectPropagateToParent(node: Element, effect: string): boolean;
export declare function zip<A, B>(as: Iterable<A>, bs: Iterable<B>, allowMismatchedLengths?: boolean): Iterable<[A, B]>;