mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Updating jquery.autosize to the new API in 3.0.7
This commit is contained in:
parent
304a251979
commit
5ce60e032b
13
jquery.autosize/jquery.autosize-tests.ts
Executable file
13
jquery.autosize/jquery.autosize-tests.ts
Executable 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'));
|
||||
24
jquery.autosize/jquery.autosize.d.ts
vendored
24
jquery.autosize/jquery.autosize.d.ts
vendored
@ -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;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user