From 7018a1beb675d3df97c327cc6d117ef05a020349 Mon Sep 17 00:00:00 2001 From: Theodore Brown Date: Sun, 11 Aug 2013 22:48:01 -0500 Subject: [PATCH] Added el property, return types, and documentation --- spin/spin.d.ts | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/spin/spin.d.ts b/spin/spin.d.ts index becf2f58e3..e92e42ca9e 100644 --- a/spin/spin.d.ts +++ b/spin/spin.d.ts @@ -1,6 +1,6 @@ // Type definitions for Spin.js 1.3 // Project: http://fgnass.github.com/spin.js/ -// Definitions by: Boris Yankov +// Definitions by: Boris Yankov and Theodore Brown // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -25,9 +25,22 @@ interface SpinnerOptions { declare class Spinner { - constructor (options?: SpinnerOptions); - spin(target?: any); - stop(); + /** The Spinner's HTML element - can be used to manually insert the spinner into the DOM */ + public el: HTMLElement; + constructor(options?: SpinnerOptions); + + /** + * Adds the spinner to the given target element. If this instance is already + * spinning, it is automatically removed from its previous target by calling + * stop() internally. + */ + spin(target?: any): Spinner; + + /** + * Stops and removes the Spinner. + * Stopped spinners may be reused by calling spin() again. + */ + stop(): Spinner; lines(el, o); opacity(el, i, val); }