@types/mdv
TypeScript icon, indicating that this package has built-in type declarations

1.3.3 • Public • Published

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

/**
 * 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: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: none

Credits

These definitions were written by Piotr Błażejewicz.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/mdv

Weekly Downloads

3

Version

1.3.3

License

MIT

Unpacked Size

4.93 kB

Total Files

5

Last publish

Collaborators

  • types