DefinitelyTyped/types/jquery-truncate-html/index.d.ts
Leonard Thieu 1c3565933c :(
2017-06-13 13:00:42 -04:00

24 lines
590 B
TypeScript

// Type definitions for jQuery-truncate-html.js
// Project: https://github.com/kbwood/timeentry
// Definitions by: Abraão Alves <https://github.com/abraaoalves>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
// TypeScript Version: 2.3
/// <reference types="jquery"/>
interface TruncateOptions{
length?: number;
stripTags?: boolean;
words?: boolean;
noBreaks?: boolean;
ellipsis?: string;
}
interface JQuery{
truncate(options: TruncateOptions) : JQuery;
}
interface JQueryStatic {
truncate(html: string, options: TruncateOptions) : string;
}