1.3.3 • Published 6 months ago
@types/mdv v1.3.3
Installation
npm install --save @types/mdv
Summary
This package contains type definitions for mdv (https://github.com/Mermade/mdv#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mdv.
index.d.ts
// Type definitions for mdv 1.3
// Project: https://github.com/Mermade/mdv#readme
// Definitions by: Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* A tiny markdown validator
*/
export function validate(
s: string,
options: Options & {
warnings: true;
},
): ValidateResults & Warnings;
export function validate(s: string, options?: Options): ValidateResults;
export interface Options {
/**
* markdown document path
*/
source?: string | undefined;
/**
* enable warnings
* @default false
*/
warnings?: boolean | undefined;
/**
* save intermediary html
* @default false
*/
save?: boolean | undefined;
}
export interface Anchor {
name: string;
defined: number;
emptyText: number;
localRefNoHash: boolean;
seen: number;
}
export interface NonParsedEntry {
extension: string;
lineEnd: number;
lineStart: number;
message: string;
}
export interface ValidateResults {
anchorsWithEmptyText: Anchor[];
anchorsWithHash: Anchor[];
duplicatedAnchors: Anchor[];
imagesWithMissingAlt: number;
localRefNoHash: Anchor[];
missingAnchors: Anchor[];
nonParsingExamples: NonParsedEntry[];
source: string;
}
export interface Warnings {
anchorsWithNoLinks: Anchor[];
codeBlocksWithNoLanguage: number;
}
Additional Details
- Last updated: Thu, 08 Jul 2021 16:24:07 GMT
- Dependencies: none
- Global values: none
Credits
These definitions were written by Piotr Błażejewicz.