mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-02-24 17:52:45 +00:00
ad files
This commit is contained in:
parent
55c750ace8
commit
1ea67ceea4
5
jquery-truncate-html/jquery-truncate-html-tests.ts
Normal file
5
jquery-truncate-html/jquery-truncate-html-tests.ts
Normal file
@ -0,0 +1,5 @@
|
||||
/// <reference path="./jquery-truncate-html.d.ts" />
|
||||
|
||||
jQuery('<p>Stuff and <i>Nonsense</i></p>').truncate({
|
||||
length: 13
|
||||
}).html();
|
||||
22
jquery-truncate-html/jquery-truncate-html.d.ts
vendored
Normal file
22
jquery-truncate-html/jquery-truncate-html.d.ts
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
// 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
|
||||
|
||||
/// <reference path="../jquery/jquery.d.ts"/>
|
||||
|
||||
interface ITruncateOptions{
|
||||
length?: number;
|
||||
stripTags?: boolean;
|
||||
words?: boolean;
|
||||
noBreaks?: boolean;
|
||||
ellipsis?: string;
|
||||
}
|
||||
|
||||
interface jQuery{
|
||||
truncate(options: ITruncateOptions) : jQuery;
|
||||
}
|
||||
|
||||
interface JQueryStatic {
|
||||
truncate(html: string, options: ITruncateOptions) : string;
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user