UNPKG

@npmstuff/argdown-core

Version:

A pluggable parser for the Argdown argumentation syntax

33 lines (32 loc) 909 B
import { IArgdownPlugin, IRequestHandler } from "../IArgdownPlugin"; import { IArgdownRequest } from "../index"; import { ISection } from "../model/model"; export interface ISectionConfig extends ISection { statements?: string[]; arguments?: string[]; } export interface IGroupSettings { groupDepth?: number; regroup?: ISectionConfig[]; sections?: { [key: string]: { isGroup?: boolean; isClosed?: boolean; }; }; ignoreIsClosed?: boolean; ignoreIsGroup?: boolean; } declare module "../index" { interface IArgdownRequest { group?: IGroupSettings; } } export declare class GroupPlugin implements IArgdownPlugin { name: string; defaults: IGroupSettings; constructor(config?: IGroupSettings); getSettings: (request: IArgdownRequest) => IGroupSettings; prepare: IRequestHandler; run: IRequestHandler; }