DefinitelyTyped/types/textversionjs/index.d.ts
Aaron Osher 1c8d97fc7a Add textversionjs
Update textversionjs

Add test
Add tsconfig
Add tslint
Update textversionjs

Fixed linting errors
2018-06-26 16:46:58 +01:00

30 lines
1013 B
TypeScript

// Type definitions for textversionjs 1.1
// Project: https://github.com/EDMdesigner/textversionjs
// Definitions by: Aaron Osher <https://github.com/aaronosher>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/* =================== USAGE ===================
import * as textVersion from "textversionjs";
=============================================== */
declare function textversionjs(html: string, styleConfig?: textversionjs.styleConfig): string;
declare namespace textversionjs {
type linkProcess = (href: string, linkText: string) => string;
type imgProcess = (src: string, alt: string) => string;
interface styleConfig {
linkProcess?: linkProcess;
imgProcess?: imgProcess;
headingStyle?: 'underline' | 'linebreak' | 'hashify';
listStyle?: 'indentation' | 'linebreak';
uIndentionChar?: string;
oIndentionChar?: string;
listIndentionTabs?: number;
keepNbsps?: boolean;
}
}
export = textversionjs;