@thednp/shorty 2.0.0-alpha16 → 2.0.0-alpha18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (260) hide show
  1. package/.eslintrc.cjs +0 -0
  2. package/.lgtm.yml +0 -0
  3. package/.prettierrc.json +0 -0
  4. package/LICENSE +0 -0
  5. package/README.md +4 -4
  6. package/cypress/e2e/att.cy.ts +0 -0
  7. package/cypress/e2e/boolean.cy.ts +0 -0
  8. package/cypress/e2e/class.cy.ts +0 -0
  9. package/cypress/e2e/event.cy.ts +0 -0
  10. package/cypress/e2e/get.cy.ts +0 -0
  11. package/cypress/e2e/is.cy.ts +0 -0
  12. package/cypress/e2e/misc.cy.ts +0 -0
  13. package/cypress/e2e/selectors.cy.ts +0 -0
  14. package/cypress/fixtures/custom-elem.js +0 -0
  15. package/cypress/plugins/esbuild-istanbul.ts +0 -0
  16. package/cypress/plugins/tsCompile.ts +0 -0
  17. package/cypress/support/commands.ts +0 -0
  18. package/cypress/support/e2e.ts +0 -0
  19. package/cypress/support/index.js +0 -0
  20. package/cypress/test.html +0 -0
  21. package/cypress.config.ts +0 -0
  22. package/dist/shorty.cjs +1 -1
  23. package/dist/shorty.cjs.map +1 -1
  24. package/dist/shorty.d.ts +200 -4
  25. package/dist/shorty.js +1 -1
  26. package/dist/shorty.js.map +1 -1
  27. package/dist/shorty.mjs +191 -179
  28. package/dist/shorty.mjs.map +1 -1
  29. package/dts.config.ts +0 -0
  30. package/package.json +71 -66
  31. package/src/attr/getAttribute.ts +0 -0
  32. package/src/attr/getAttributeNS.ts +0 -0
  33. package/src/attr/hasAttribute.ts +0 -0
  34. package/src/attr/hasAttributeNS.ts +0 -0
  35. package/src/attr/removeAttribute.ts +0 -0
  36. package/src/attr/removeAttributeNS.ts +0 -0
  37. package/src/attr/setAttribute.ts +0 -0
  38. package/src/attr/setAttributeNS.ts +0 -0
  39. package/src/blocks/documentBody.ts +0 -0
  40. package/src/blocks/documentElement.ts +0 -0
  41. package/src/blocks/documentHead.ts +0 -0
  42. package/src/boolean/isApple.ts +0 -0
  43. package/src/boolean/isFirefox.ts +0 -0
  44. package/src/boolean/isMobile.ts +0 -0
  45. package/src/boolean/support3DTransform.ts +0 -0
  46. package/src/boolean/supportAnimation.ts +0 -0
  47. package/src/boolean/supportPassive.ts +0 -0
  48. package/src/boolean/supportTouch.ts +0 -0
  49. package/src/boolean/supportTransform.ts +0 -0
  50. package/src/boolean/supportTransition.ts +0 -0
  51. package/src/class/addClass.ts +0 -0
  52. package/src/class/hasClass.ts +0 -0
  53. package/src/class/removeClass.ts +0 -0
  54. package/src/event/off.ts +6 -4
  55. package/src/event/on.ts +6 -4
  56. package/src/event/one.ts +26 -8
  57. package/src/get/getBoundingClientRect.ts +0 -0
  58. package/src/get/getDocument.ts +0 -0
  59. package/src/get/getDocumentBody.ts +0 -0
  60. package/src/get/getDocumentElement.ts +0 -0
  61. package/src/get/getDocumentHead.ts +0 -0
  62. package/src/get/getElementAnimationDelay.ts +0 -0
  63. package/src/get/getElementAnimationDuration.ts +0 -0
  64. package/src/get/getElementStyle.ts +0 -0
  65. package/src/get/getElementTransitionDelay.ts +0 -0
  66. package/src/get/getElementTransitionDuration.ts +0 -0
  67. package/src/get/getNodeScroll.ts +0 -0
  68. package/src/get/getParentNode.ts +0 -0
  69. package/src/get/getRectRelativeToOffsetParent.ts +0 -0
  70. package/src/get/getUID.ts +0 -0
  71. package/src/get/getWindow.ts +0 -0
  72. package/src/index.ts +4 -0
  73. package/src/interface/boundingClientRect.d.ts +0 -0
  74. package/src/interface/css4Declaration.d.ts +0 -0
  75. package/src/interface/customElement.d.ts +0 -0
  76. package/src/interface/event.d.ts +337 -0
  77. package/src/interface/navigatorUA.d.ts +0 -0
  78. package/src/interface/offsetRect.d.ts +0 -0
  79. package/src/interface/originalEvent.d.ts +0 -0
  80. package/src/is/isArray.ts +0 -0
  81. package/src/is/isCanvas.ts +0 -0
  82. package/src/is/isCustomElement.ts +0 -0
  83. package/src/is/isDocument.ts +0 -0
  84. package/src/is/isElement.ts +0 -0
  85. package/src/is/isElementInScrollRange.ts +0 -0
  86. package/src/is/isElementInViewport.ts +0 -0
  87. package/src/is/isElementsArray.ts +0 -0
  88. package/src/is/isFunction.ts +0 -0
  89. package/src/is/isHTMLCollection.ts +0 -0
  90. package/src/is/isHTMLElement.ts +0 -0
  91. package/src/is/isHTMLImageElement.ts +0 -0
  92. package/src/is/isJSON.ts +0 -0
  93. package/src/is/isMap.ts +0 -0
  94. package/src/is/isMedia.ts +0 -0
  95. package/src/is/isNode.ts +0 -0
  96. package/src/is/isNodeList.ts +0 -0
  97. package/src/is/isNumber.ts +0 -0
  98. package/src/is/isObject.ts +0 -0
  99. package/src/is/isRTL.ts +0 -0
  100. package/src/is/isSVGElement.ts +0 -0
  101. package/src/is/isScaledElement.ts +0 -0
  102. package/src/is/isShadowRoot.ts +0 -0
  103. package/src/is/isString.ts +0 -0
  104. package/src/is/isTableElement.ts +0 -0
  105. package/src/is/isWeakMap.ts +0 -0
  106. package/src/is/isWindow.ts +0 -0
  107. package/src/misc/ArrayFrom.ts +0 -0
  108. package/src/misc/Float32ArrayFrom.ts +0 -0
  109. package/src/misc/Float64ArrayFrom.ts +0 -0
  110. package/src/misc/ObjectAssign.ts +0 -0
  111. package/src/misc/ObjectEntries.ts +0 -0
  112. package/src/misc/ObjectFromEntries.ts +11 -0
  113. package/src/misc/ObjectHasOwn.ts +0 -0
  114. package/src/misc/ObjectKeys.ts +0 -0
  115. package/src/misc/ObjectValues.ts +0 -0
  116. package/src/misc/createCustomEvent.ts +0 -0
  117. package/src/misc/createElement.ts +0 -0
  118. package/src/misc/createElementNS.ts +0 -0
  119. package/src/misc/data.ts +0 -0
  120. package/src/misc/dispatchEvent.ts +0 -0
  121. package/src/misc/distinct.ts +0 -0
  122. package/src/misc/emulateAnimationEnd.ts +0 -0
  123. package/src/misc/emulateTransitionEnd.ts +0 -0
  124. package/src/misc/focus.ts +0 -0
  125. package/src/misc/getInstance.ts +0 -0
  126. package/src/misc/noop.ts +0 -0
  127. package/src/misc/normalizeOptions.ts +0 -0
  128. package/src/misc/normalizeValue.ts +0 -0
  129. package/src/misc/passiveHandler.ts +0 -0
  130. package/src/misc/reflow.ts +0 -0
  131. package/src/misc/setElementStyle.ts +0 -0
  132. package/src/misc/timer.ts +0 -0
  133. package/src/misc/toLowerCase.ts +0 -0
  134. package/src/misc/toUpperCase.ts +0 -0
  135. package/src/selectors/closest.ts +0 -0
  136. package/src/selectors/getCustomElements.ts +0 -0
  137. package/src/selectors/getElementById.ts +0 -0
  138. package/src/selectors/getElementsByClassName.ts +0 -0
  139. package/src/selectors/getElementsByTagName.ts +0 -0
  140. package/src/selectors/matches.ts +0 -0
  141. package/src/selectors/querySelector.ts +0 -0
  142. package/src/selectors/querySelectorAll.ts +0 -0
  143. package/src/strings/DOMContentLoadedEvent.ts +0 -0
  144. package/src/strings/DOMMouseScrollEvent.ts +0 -0
  145. package/src/strings/abortEvent.ts +0 -0
  146. package/src/strings/addEventListener.ts +0 -0
  147. package/src/strings/animationDelay.ts +0 -0
  148. package/src/strings/animationDuration.ts +0 -0
  149. package/src/strings/animationEndEvent.ts +0 -0
  150. package/src/strings/animationName.ts +0 -0
  151. package/src/strings/ariaChecked.ts +0 -0
  152. package/src/strings/ariaDescribedBy.ts +0 -0
  153. package/src/strings/ariaDescription.ts +0 -0
  154. package/src/strings/ariaExpanded.ts +0 -0
  155. package/src/strings/ariaHasPopup.ts +0 -0
  156. package/src/strings/ariaHidden.ts +0 -0
  157. package/src/strings/ariaLabel.ts +0 -0
  158. package/src/strings/ariaLabelledBy.ts +0 -0
  159. package/src/strings/ariaModal.ts +0 -0
  160. package/src/strings/ariaPressed.ts +0 -0
  161. package/src/strings/ariaSelected.ts +0 -0
  162. package/src/strings/ariaValueMax.ts +0 -0
  163. package/src/strings/ariaValueMin.ts +0 -0
  164. package/src/strings/ariaValueNow.ts +0 -0
  165. package/src/strings/ariaValueText.ts +0 -0
  166. package/src/strings/beforeunloadEvent.ts +0 -0
  167. package/src/strings/bezierEasings.ts +0 -0
  168. package/src/strings/blurEvent.ts +0 -0
  169. package/src/strings/changeEvent.ts +0 -0
  170. package/src/strings/contextmenuEvent.ts +0 -0
  171. package/src/strings/dragEvent.ts +0 -0
  172. package/src/strings/dragendEvent.ts +0 -0
  173. package/src/strings/dragenterEvent.ts +0 -0
  174. package/src/strings/dragleaveEvent.ts +0 -0
  175. package/src/strings/dragoverEvent.ts +0 -0
  176. package/src/strings/dragstartEvent.ts +0 -0
  177. package/src/strings/errorEvent.ts +0 -0
  178. package/src/strings/focusEvent.ts +0 -0
  179. package/src/strings/focusEvents.ts +0 -0
  180. package/src/strings/focusinEvent.ts +0 -0
  181. package/src/strings/focusoutEvent.ts +0 -0
  182. package/src/strings/gesturechangeEvent.ts +0 -0
  183. package/src/strings/gestureendEvent.ts +0 -0
  184. package/src/strings/gesturestartEvent.ts +0 -0
  185. package/src/strings/keyAlt.ts +0 -0
  186. package/src/strings/keyArrowDown.ts +0 -0
  187. package/src/strings/keyArrowLeft.ts +0 -0
  188. package/src/strings/keyArrowRight.ts +0 -0
  189. package/src/strings/keyArrowUp.ts +0 -0
  190. package/src/strings/keyBackspace.ts +0 -0
  191. package/src/strings/keyCapsLock.ts +0 -0
  192. package/src/strings/keyControl.ts +0 -0
  193. package/src/strings/keyDelete.ts +0 -0
  194. package/src/strings/keyEnter.ts +0 -0
  195. package/src/strings/keyEscape.ts +0 -0
  196. package/src/strings/keyInsert.ts +0 -0
  197. package/src/strings/keyMeta.ts +0 -0
  198. package/src/strings/keyNumpadEnter.ts +7 -0
  199. package/src/strings/keyPause.ts +0 -0
  200. package/src/strings/keyScrollLock.ts +0 -0
  201. package/src/strings/keyShift.ts +0 -0
  202. package/src/strings/keySpace.ts +0 -0
  203. package/src/strings/keyTab.ts +0 -0
  204. package/src/strings/keyboardEventKeys.ts +0 -0
  205. package/src/strings/keydownEvent.ts +0 -0
  206. package/src/strings/keypressEvent.ts +0 -0
  207. package/src/strings/keyupEvent.ts +0 -0
  208. package/src/strings/loadEvent.ts +0 -0
  209. package/src/strings/loadstartEvent.ts +0 -0
  210. package/src/strings/mouseClickEvents.ts +0 -0
  211. package/src/strings/mouseHoverEvents.ts +0 -0
  212. package/src/strings/mouseSwipeEvents.ts +0 -0
  213. package/src/strings/mouseclickEvent.ts +0 -0
  214. package/src/strings/mousedblclickEvent.ts +0 -0
  215. package/src/strings/mousedownEvent.ts +0 -0
  216. package/src/strings/mouseenterEvent.ts +0 -0
  217. package/src/strings/mousehoverEvent.ts +0 -0
  218. package/src/strings/mouseinEvent.ts +0 -0
  219. package/src/strings/mouseleaveEvent.ts +0 -0
  220. package/src/strings/mousemoveEvent.ts +0 -0
  221. package/src/strings/mouseoutEvent.ts +0 -0
  222. package/src/strings/mouseoverEvent.ts +0 -0
  223. package/src/strings/mouseupEvent.ts +0 -0
  224. package/src/strings/mousewheelEvent.ts +0 -0
  225. package/src/strings/moveEvent.ts +0 -0
  226. package/src/strings/nativeEvents.ts +0 -0
  227. package/src/strings/offsetHeight.ts +0 -0
  228. package/src/strings/offsetWidth.ts +0 -0
  229. package/src/strings/orientationchangeEvent.ts +0 -0
  230. package/src/strings/pointercancelEvent.ts +0 -0
  231. package/src/strings/pointerdownEvent.ts +0 -0
  232. package/src/strings/pointerleaveEvent.ts +0 -0
  233. package/src/strings/pointermoveEvent.ts +0 -0
  234. package/src/strings/pointerupEvent.ts +0 -0
  235. package/src/strings/readystatechangeEvent.ts +0 -0
  236. package/src/strings/removeEventListener.ts +0 -0
  237. package/src/strings/resetEvent.ts +0 -0
  238. package/src/strings/resizeEvent.ts +0 -0
  239. package/src/strings/scrollEvent.ts +0 -0
  240. package/src/strings/scrollHeight.ts +0 -0
  241. package/src/strings/scrollWidth.ts +0 -0
  242. package/src/strings/selectEvent.ts +0 -0
  243. package/src/strings/selectendEvent.ts +0 -0
  244. package/src/strings/selectstartEvent.ts +0 -0
  245. package/src/strings/submitEvent.ts +0 -0
  246. package/src/strings/tabindex.ts +0 -0
  247. package/src/strings/touchEvents.ts +0 -0
  248. package/src/strings/touchcancelEvent.ts +0 -0
  249. package/src/strings/touchendEvent.ts +0 -0
  250. package/src/strings/touchmoveEvent.ts +0 -0
  251. package/src/strings/touchstartEvent.ts +0 -0
  252. package/src/strings/transitionDelay.ts +0 -0
  253. package/src/strings/transitionDuration.ts +0 -0
  254. package/src/strings/transitionEndEvent.ts +0 -0
  255. package/src/strings/transitionProperty.ts +0 -0
  256. package/src/strings/unloadEvent.ts +0 -0
  257. package/src/strings/userAgent.ts +0 -0
  258. package/src/strings/userAgentData.ts +0 -0
  259. package/tsconfig.json +1 -1
  260. package/vite.config.ts +0 -0
package/dts.config.ts CHANGED
File without changes
package/package.json CHANGED
@@ -1,66 +1,71 @@
1
- {
2
- "name": "@thednp/shorty",
3
- "version": "2.0.0alpha16",
4
- "description": "TypeScript shorties for the web",
5
- "source": "./src/index.ts",
6
- "main": "./dist/shorty.js",
7
- "module": "./dist/shorty.mjs",
8
- "exports": {
9
- ".": {
10
- "types": "./dist/shorty.d.ts",
11
- "require": "./dist/shorty.cjs",
12
- "import": "./dist/shorty.mjs"
13
- }
14
- },
15
- "scripts": {
16
- "pre-test": "npm run clean-coverage",
17
- "test": "npm run pre-test && npx cypress run",
18
- "clean-coverage": "rimraf coverage .nyc_output",
19
- "cypress": "npm run pre-test && npx cypress open",
20
- "coverage:report": "nyc report --reporter=lcov --reporter=json --reporter=text --reporter=json-summary",
21
- "format": "prettier --write \"src/**/*.ts\"",
22
- "lint:ts": "eslint -c .eslintrc.cjs --ext .ts src",
23
- "fix:ts": "eslint -c .eslintrc.cjs --ext .ts src --fix",
24
- "build": "npm run lint:ts && vite build && npm run dts",
25
- "dts": "dts-bundle-generator --config ./dts.config.ts"
26
- },
27
- "publishConfig": {
28
- "access": "public",
29
- "registry": "https://registry.npmjs.org/"
30
- },
31
- "repository": {
32
- "type": "git",
33
- "url": "git+https://github.com/thednp/shorty.git"
34
- },
35
- "keywords": [
36
- "shorty",
37
- "javascript",
38
- "typescript"
39
- ],
40
- "author": "dnp_theme",
41
- "license": "MIT",
42
- "bugs": {
43
- "url": "https://github.com/thednp/shorty/issues"
44
- },
45
- "homepage": "https://github.com/thednp/shorty",
46
- "devDependencies": {
47
- "@bahmutov/cypress-esbuild-preprocessor": "^2.2.0",
48
- "@cypress/code-coverage": "^3.10.8",
49
- "@types/istanbul-lib-instrument": "^1.7.4",
50
- "@typescript-eslint/eslint-plugin": "^5.61.0",
51
- "@typescript-eslint/parser": "^5.61.0",
52
- "cypress": "^12.16.0",
53
- "dts-bundle-generator": "^8.0.1",
54
- "eslint": "^8.44.0",
55
- "eslint-plugin-jsdoc": "^46.4.3",
56
- "eslint-plugin-prefer-arrow": "^1.2.3",
57
- "eslint-plugin-prettier": "^4.2.1",
58
- "istanbul-lib-coverage": "^3.2.0",
59
- "istanbul-lib-instrument": "^5.2.1",
60
- "nyc": "^15.1.0",
61
- "prettier": "^2.8.8",
62
- "rimraf": "^5.0.1",
63
- "typescript": "^5.1.6",
64
- "vite": "^4.3.9"
65
- }
66
- }
1
+ {
2
+ "name": "@thednp/shorty",
3
+ "version": "2.0.0alpha18",
4
+ "description": "TypeScript shorties for the web",
5
+ "source": "./src/index.ts",
6
+ "main": "./dist/shorty.js",
7
+ "module": "./dist/shorty.mjs",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/shorty.d.ts",
11
+ "require": "./dist/shorty.cjs",
12
+ "import": "./dist/shorty.mjs"
13
+ }
14
+ },
15
+ "publishConfig": {
16
+ "access": "public",
17
+ "registry": "https://registry.npmjs.org/"
18
+ },
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/thednp/shorty.git"
22
+ },
23
+ "keywords": [
24
+ "shorty",
25
+ "javascript",
26
+ "typescript"
27
+ ],
28
+ "author": "thednp",
29
+ "license": "MIT",
30
+ "bugs": {
31
+ "url": "https://github.com/thednp/shorty/issues"
32
+ },
33
+ "homepage": "https://github.com/thednp/shorty",
34
+ "devDependencies": {
35
+ "@bahmutov/cypress-esbuild-preprocessor": "^2.2.0",
36
+ "@cypress/code-coverage": "^3.12.0",
37
+ "@types/istanbul-lib-instrument": "^1.7.4",
38
+ "@typescript-eslint/eslint-plugin": "^5.62.0",
39
+ "@typescript-eslint/parser": "^5.62.0",
40
+ "cypress": "^12.17.4",
41
+ "dts-bundle-generator": "^8.0.1",
42
+ "eslint": "^8.48.0",
43
+ "eslint-plugin-jsdoc": "^46.5.1",
44
+ "eslint-plugin-prefer-arrow": "^1.2.3",
45
+ "eslint-plugin-prettier": "^4.2.1",
46
+ "istanbul-lib-coverage": "^3.2.0",
47
+ "istanbul-lib-instrument": "^5.2.1",
48
+ "nyc": "^15.1.0",
49
+ "prettier": "^2.8.8",
50
+ "rimraf": "^5.0.1",
51
+ "typescript": "^5.2.2",
52
+ "vite": "^4.4.9"
53
+ },
54
+ "packageManager": "pnpm@8.6.12",
55
+ "engines": {
56
+ "node": ">=16",
57
+ "pnpm": ">=8.6.0"
58
+ },
59
+ "scripts": {
60
+ "pre-test": "pnpm clean-coverage",
61
+ "test": "pnpm pre-test && npx cypress run",
62
+ "clean-coverage": "rimraf coverage .nyc_output",
63
+ "cypress": "pnpm pre-test && npx cypress open",
64
+ "coverage:report": "nyc report --reporter=lcov --reporter=json --reporter=text --reporter=json-summary",
65
+ "format": "prettier --write \"src/**/*.ts\"",
66
+ "lint:ts": "eslint -c .eslintrc.cjs --ext .ts src",
67
+ "fix:ts": "eslint -c .eslintrc.cjs --ext .ts src --fix",
68
+ "build": "pnpm lint:ts && vite build && pnpm dts",
69
+ "dts": "dts-bundle-generator --config ./dts.config.ts"
70
+ }
71
+ }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/src/event/off.ts CHANGED
@@ -1,10 +1,12 @@
1
+ import { NativeEventTypes, PossibleEventTarget, SupportedEventHandler } from '../interface/event';
2
+
1
3
  /**
2
4
  * Remove eventListener from an `EventTarget` object.
3
5
  */
4
- const off = (
5
- element: EventTarget,
6
- eventName: string,
7
- listener: EventListener,
6
+ const off = <T extends PossibleEventTarget>(
7
+ element: T,
8
+ eventName: NativeEventTypes,
9
+ listener: EventListenerObject & SupportedEventHandler<T>,
8
10
  options?: AddEventListenerOptions,
9
11
  ) => {
10
12
  const ops = options || false;
package/src/event/on.ts CHANGED
@@ -1,10 +1,12 @@
1
+ import { NativeEventTypes, PossibleEventTarget, SupportedEventHandler } from '../interface/event';
2
+
1
3
  /**
2
4
  * Add eventListener to an `EventTarget` object.
3
5
  */
4
- const on = (
5
- element: EventTarget,
6
- eventName: string,
7
- listener: EventListener,
6
+ const on = <T extends PossibleEventTarget>(
7
+ element: T,
8
+ eventName: NativeEventTypes,
9
+ listener: EventListenerObject & SupportedEventHandler<T>,
8
10
  options?: AddEventListenerOptions,
9
11
  ) => {
10
12
  const ops = options || false;
package/src/event/one.ts CHANGED
@@ -1,3 +1,11 @@
1
+ import {
2
+ EventHandler,
3
+ NativeEvent,
4
+ NativeEventTypes,
5
+ PossibleEventTarget,
6
+ SupportedEventHandler,
7
+ } from '../interface/event';
8
+
1
9
  import on from './on';
2
10
  import off from './off';
3
11
 
@@ -5,21 +13,31 @@ import off from './off';
5
13
  * Add an `eventListener` to an `EventTarget`
6
14
  * element and remove it once callback is called.
7
15
  */
8
- const one = (
9
- element: EventTarget,
10
- eventName: string,
11
- listener: EventListener,
16
+ const one = <T extends PossibleEventTarget>(
17
+ element: T,
18
+ eventName: NativeEventTypes,
19
+ listener: SupportedEventHandler<T>,
12
20
  options?: AddEventListenerOptions,
13
21
  ) => {
14
22
  /** Wrap the listener for easy on -> off */
15
- const handlerWrapper = (e: Event): void => {
23
+ const handlerWrapper = (e: NativeEvent): void => {
16
24
  /* istanbul ignore else */
17
25
  if (e.target === element || e.currentTarget === element) {
18
- listener.apply(element, [e]);
19
- off(element, eventName, handlerWrapper, options);
26
+ (listener as EventHandler<typeof e>).apply(element, [e]);
27
+ off(
28
+ element,
29
+ eventName,
30
+ handlerWrapper as unknown as EventListenerObject & SupportedEventHandler<T>,
31
+ options,
32
+ );
20
33
  }
21
34
  };
22
- on(element, eventName, handlerWrapper, options);
35
+ on(
36
+ element,
37
+ eventName,
38
+ handlerWrapper as unknown as EventListenerObject & SupportedEventHandler<T>,
39
+ options,
40
+ );
23
41
  };
24
42
 
25
43
  export default one;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/src/get/getUID.ts CHANGED
File without changes
File without changes
package/src/index.ts CHANGED
@@ -96,6 +96,7 @@ import keyCapsLock from './strings/keyCapsLock';
96
96
  import keyControl from './strings/keyControl';
97
97
  import keyDelete from './strings/keyDelete';
98
98
  import keyEnter from './strings/keyEnter';
99
+ import keyNumpadEnter from './strings/keyNumpadEnter';
99
100
  import keyEscape from './strings/keyEscape';
100
101
  import keyInsert from './strings/keyInsert';
101
102
  import keyMeta from './strings/keyMeta';
@@ -185,6 +186,7 @@ import ObjectEntries from './misc/ObjectEntries';
185
186
  import ObjectHasOwn from './misc/ObjectHasOwn';
186
187
  import ObjectKeys from './misc/ObjectKeys';
187
188
  import ObjectValues from './misc/ObjectValues';
189
+ import ObjectFromEntries from './misc/ObjectFromEntries';
188
190
  import createCustomEvent from './misc/createCustomEvent';
189
191
  import passiveHandler from './misc/passiveHandler';
190
192
  import reflow from './misc/reflow';
@@ -361,6 +363,7 @@ export {
361
363
  keyControl,
362
364
  keyDelete,
363
365
  keyEnter,
366
+ keyNumpadEnter,
364
367
  keyEscape,
365
368
  keyInsert,
366
369
  keyMeta,
@@ -455,6 +458,7 @@ export {
455
458
  ObjectEntries,
456
459
  ObjectKeys,
457
460
  ObjectValues,
461
+ ObjectFromEntries,
458
462
  getBoundingClientRect,
459
463
  getDocument,
460
464
  getDocumentBody,
File without changes
File without changes
File without changes