Tried to rework type safety

This commit is contained in:
squidfunk
2017-02-19 23:33:52 +01:00
parent af4db15a27
commit 07e2eb4f85
24 changed files with 436 additions and 260 deletions

View File

@@ -30,6 +30,10 @@ export default class Lock {
* Lock body for full-screen search modal
*
* @constructor
*
* @property {HTMLInputElement} el_ - TODO
* @property {number} offset_ - TODO
*
* @param {(string|HTMLElement)} el - Selector or HTML element
*/
constructor(el) {

View File

@@ -32,8 +32,13 @@ export default class Result {
* Perform search and update results on keyboard events
*
* @constructor
*
* @property {HTMLElement} el_ - TODO
* @property {(Object|Array<Object>|Function)} data_ - TODO (very dirty)
* @property {React$Element|HTMLElement} meta_ - TODO
*
* @param {(string|HTMLElement)} el - Selector or HTML element
* @param {(Array.<object>|Function)} data - Promise or array providing data
* @param {(Array<Object>|Function)} data - Promise or array providing data // TODO ????
*/
constructor(el, data) {
this.el_ = (typeof el === "string")