diff --git a/autosize/autosize-tests.ts b/autosize/autosize-tests.ts index 74be703a94..a7eea57a62 100644 --- a/autosize/autosize-tests.ts +++ b/autosize/autosize-tests.ts @@ -8,3 +8,21 @@ autosize(document.querySelector('textarea')); // from a single element autosize(document.getElementById('my-textarea')); + +// update a NodeList +autosize.update(document.querySelectorAll('textarea')); + +// update a single Node +autosize.update(document.querySelector('textarea')); + +// update a single element +autosize.update(document.getElementById('my-textarea')); + +// destroy a NodeList +autosize.destroy(document.querySelectorAll('textarea')); + +// destroy a single Node +autosize.destroy(document.querySelector('textarea')); + +// destroy a single element +autosize.destroy(document.getElementById('my-textarea')); diff --git a/autosize/index.d.ts b/autosize/index.d.ts index 5ea76d0472..0886904e3f 100644 --- a/autosize/index.d.ts +++ b/autosize/index.d.ts @@ -1,12 +1,16 @@ // Type definitions for jquery.autosize 3.0.7 // Project: http://www.jacklmoore.com/autosize/ -// Definitions by: Aaron T. King +// Definitions by: Aaron T. King , keika299 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace autosize { interface AutosizeStatic { (el: Element): void; (el: NodeList): void; + update(el: Element): void; + update(el: NodeList): void; + destroy(el: Element): void; + destroy(el: NodeList): void; } }