eslint-mdx
Version:
ESLint Parser for MDX
21 lines (20 loc) • 958 B
TypeScript
/// <reference types="node" />
import type { Position } from 'acorn';
import type { Point } from 'unist';
import type { NormalPosition } from './types';
export declare const last: <T>(items: T[] | readonly T[]) => T;
export declare const arrayify: <T, R = T extends (infer S)[] ? S : T>(...args: T[]) => R[];
export declare const getPhysicalFilename: (filename: string, child?: string) => string;
export declare const loadEsmModule: <T>(modulePath: URL | string) => Promise<T>;
export declare const getPositionAtFactory: (text: string) => (offset: number) => Position;
export declare const normalizePosition: ({ start, end, text, }: {
start: Point | {
offset: number;
};
end: Point | {
offset: number;
};
text?: string;
}) => NormalPosition;
export declare const prevCharOffsetFactory: (text: string) => (offset: number) => number;
export declare const nextCharOffsetFactory: (text: string) => (offset: number) => number;