Merge pull request #4860 from styfle/autosize-update

Updating jquery.autosize to the new API in 3.0.7
This commit is contained in:
Masahiro Wakame
2015-07-15 02:23:39 +09:00
2 changed files with 24 additions and 13 deletions
+13
View File
@@ -0,0 +1,13 @@
/// <reference path="jquery.autosize.d.ts" />
// from a NodeList
autosize(document.querySelectorAll('textarea'));
// from a single Node
autosize(document.querySelector('textarea'));
// from a jQuery collection
autosize($('textarea'));
// from a single element
autosize(document.getElementById('my-textarea'));
+11 -13
View File
@@ -1,21 +1,19 @@
// Type definitions for jquery.autosize (un-versioned)
// Type definitions for jquery.autosize 3.0.7
// Project: http://www.jacklmoore.com/autosize/
// Definitions by: Aaron T. King <https://github.com/kingdango>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts" />
interface AutosizeOptions {
className?: string;
append?: string;
callback?: Function;
declare module autosize {
interface AutosizeStatic {
(el: Element): void;
(el: NodeList): void;
(el: JQuery): void;
}
}
interface Autosize {
(): JQuery;
(options: AutosizeOptions): JQuery;
}
declare var autosize: autosize.AutosizeStatic;
interface JQuery {
autosize: Autosize;
}
declare module 'autosize' {
export = autosize;
}