@dlghq/dialog-utils
Advanced tools
Comparing version 0.10.3 to 0.10.4
{ | ||
"name": "@dlghq/dialog-utils", | ||
"version": "0.10.3", | ||
"version": "0.10.4", | ||
"description": "A collection of utility libraries used by Dialog projects.", | ||
@@ -34,3 +34,3 @@ "main": "src/index.js", | ||
"devDependencies": { | ||
"@babel/core": "7.5.4", | ||
"@babel/core": "7.5.5", | ||
"@dlghq/babel-preset-dialog": "4.4.0", | ||
@@ -37,0 +37,0 @@ "@dlghq/eslint-config-dialog": "3.4.0", |
@@ -1,4 +0,3 @@ | ||
/* | ||
/** | ||
* Copyright 2018 Dialog LLC <info@dlg.im> | ||
* @flow strict | ||
*/ | ||
@@ -8,34 +7,3 @@ | ||
type EventHandler = (event: Event) => mixed; | ||
type EventListener = { handleEvent: EventHandler } | EventHandler; | ||
type EventListenerOptionsOrUseCapture = { | ||
capture?: boolean, | ||
passive?: boolean, | ||
}; | ||
interface ListenFn { | ||
( | ||
target: EventTarget, | ||
type: string, | ||
listener: EventListener, | ||
optionsOrUseCapture: EventListenerOptionsOrUseCapture, | ||
): { | ||
remove: () => mixed, | ||
}; | ||
} | ||
/** | ||
* Adds DOM event listener. | ||
* | ||
* @param {Element} target | ||
* @param {string} eventType - A string representing the event type to listen for. | ||
* @param {EventListener} listener - The function that receives a notification. | ||
* @param {Object} options - An options object that specifies characteristics about the event listener | ||
* @param {boolean} [options.capture=false] - Indicating that events will be dispatched | ||
* before being dispatched to any EventTarget it in the DOM tree. | ||
* @param {boolean} [options.passive=false] - Indicating that the listener will never call `event.preventDefault()`. | ||
* @returns {Listener} | ||
*/ | ||
export const listen: ListenFn = function listen( | ||
export const listen = function listen( | ||
target, | ||
@@ -42,0 +10,0 @@ eventType, |
/* | ||
* Copyright 2018 Dialog LLC <info@dlg.im> | ||
* @flow strict | ||
* @flow | ||
*/ | ||
@@ -5,0 +5,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32670
31
1085