diff --git a/README.md b/README.md index ad62b49ab1..843ef64487 100644 --- a/README.md +++ b/README.md @@ -141,6 +141,7 @@ List of Definitions * [Teechart](http://www.steema.com) (by [Steema](http://www.steema.com)) * [three.js](http://mrdoob.github.com/three.js/) (by [Kon](http://phyzkit.net/)) * [Toastr](https://github.com/CodeSeven/toastr) (by [Boris Yankov](https://github.com/borisyankov)) +* [trunk8](https://github.com/rviscomi/trunk8) (by [Blake Niemyjski](https://github.com/niemyjski)) * [TweenJS](http://www.createjs.com/#!/TweenJS) (by [Pedro Ferreira](https://bitbucket.org/drk4)) * [tween.js](https://github.com/sole/tween.js/) (by [Adam R. Smith](https://github.com/sunetos)) * [twitter-bootstrap-wizard](https://github.com/VinceG/twitter-bootstrap-wizard) (by [Blake Niemyjski](https://github.com/niemyjski)) diff --git a/trunk8/trunk8.d.ts b/trunk8/trunk8.d.ts new file mode 100644 index 0000000000..2e821796a6 --- /dev/null +++ b/trunk8/trunk8.d.ts @@ -0,0 +1,50 @@ +// Type definitions for trunk8 +// Project: https://github.com/rviscomi/trunk8 +// Definitions by: Blake Niemyjski +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +interface Trunk8Options { + /** + (Default: '…') The string to insert in place of the omitted text. This value may include HTML. + @param {string} fill + */ + fill?: string; + /** + (Default: 1) The number of lines of text-wrap to tolerate before truncating. This value must be an integer greater than or equal to 1. + @param {number} lines + */ + lines?: number; + /** + (Default: 'right') The side of the text from which to truncate. Valid values include 'center', 'left', and 'right'. + @param {string} side + */ + side?: string; + /** + (Default: true) When true, the title attribute of the targeted HTML element will be set to the original, untruncated string. Valid values include true and false. + @param {bool} tooltip + */ + tooltip?: bool; + /** + (Default: 'auto') The width, in characters, of the desired text. When set to 'auto', trunk8 will maximize the amount of text without spilling over. + @param {string} width + */ + width?: string; +} + +interface JQuery { + /** + Creates a trunk8 instance and calls a method. + @constructor + @param {Trunk8Options} options + */ + trunk8(method: string, value?: string): any; + + /** + Creates a trunk8 instance with default options. + @constructor + @param {Trunk8Options} options + */ + trunk8(options?: Trunk8Options): any; +} \ No newline at end of file