Comparing version 1.1.2 to 1.1.3
@@ -11,5 +11,5 @@ import type * as React from 'react'; | ||
* | ||
* @param {...Array<Function|object>} inputRefs Array of refs | ||
* @returns {Function} Merged refs | ||
* @param {(React.Ref<T> | undefined)[]} inputRefs Array of refs | ||
* @returns {React.Ref<T> | React.RefCallback<T>} Merged refs | ||
*/ | ||
export default function mergeRefs<T>(...inputRefs: React.Ref<T>[]): React.Ref<T> | React.RefCallback<T>; | ||
export default function mergeRefs<T>(...inputRefs: (React.Ref<T> | undefined)[]): React.Ref<T> | React.RefCallback<T>; |
@@ -12,4 +12,4 @@ "use strict"; | ||
* | ||
* @param {...Array<Function|object>} inputRefs Array of refs | ||
* @returns {Function} Merged refs | ||
* @param {(React.Ref<T> | undefined)[]} inputRefs Array of refs | ||
* @returns {React.Ref<T> | React.RefCallback<T>} Merged refs | ||
*/ | ||
@@ -16,0 +16,0 @@ function mergeRefs() { |
@@ -11,5 +11,5 @@ import type * as React from 'react'; | ||
* | ||
* @param {...Array<Function|object>} inputRefs Array of refs | ||
* @returns {Function} Merged refs | ||
* @param {(React.Ref<T> | undefined)[]} inputRefs Array of refs | ||
* @returns {React.Ref<T> | React.RefCallback<T>} Merged refs | ||
*/ | ||
export default function mergeRefs<T>(...inputRefs: React.Ref<T>[]): React.Ref<T> | React.RefCallback<T>; | ||
export default function mergeRefs<T>(...inputRefs: (React.Ref<T> | undefined)[]): React.Ref<T> | React.RefCallback<T>; |
@@ -10,4 +10,4 @@ /** | ||
* | ||
* @param {...Array<Function|object>} inputRefs Array of refs | ||
* @returns {Function} Merged refs | ||
* @param {(React.Ref<T> | undefined)[]} inputRefs Array of refs | ||
* @returns {React.Ref<T> | React.RefCallback<T>} Merged refs | ||
*/ | ||
@@ -14,0 +14,0 @@ export default function mergeRefs() { |
{ | ||
"name": "merge-refs", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "A function that merges React refs into one.", | ||
@@ -15,8 +15,8 @@ "main": "dist/cjs/index.js", | ||
"clean": "rimraf dist", | ||
"jest": "jest", | ||
"lint": "eslint src --ext .js,.jsx,.ts,.tsx", | ||
"lint": "eslint . --ext .js,.jsx,.ts,.tsx", | ||
"prepack": "yarn clean && yarn build", | ||
"prettier": "prettier --check . --cache", | ||
"test": "yarn lint && yarn tsc && yarn prettier && yarn jest", | ||
"tsc": "tsc --noEmit" | ||
"test": "yarn lint && yarn tsc && yarn prettier && yarn unit", | ||
"tsc": "tsc --noEmit", | ||
"unit": "vitest run" | ||
}, | ||
@@ -38,15 +38,7 @@ "keywords": [ | ||
"devDependencies": { | ||
"@babel/core": "^7.15.0", | ||
"@babel/preset-env": "^7.15.0", | ||
"@babel/preset-react": "^7.14.0", | ||
"@babel/preset-typescript": "^7.18.6", | ||
"@testing-library/react": "^13.4.0", | ||
"@types/jest": "^29.0.0", | ||
"@typescript-eslint/eslint-plugin": "^5.41.0", | ||
"@typescript-eslint/parser": "^5.44.0", | ||
"@testing-library/react": "^14.0.0", | ||
"eslint": "^8.26.0", | ||
"eslint-config-wojtekmaj": "^0.7.1", | ||
"eslint-config-wojtekmaj": "^0.8.2", | ||
"husky": "^8.0.0", | ||
"jest": "^29.0.0", | ||
"jest-environment-jsdom": "^29.0.0", | ||
"jsdom": "^21.1.0", | ||
"prettier": "^2.7.0", | ||
@@ -57,7 +49,5 @@ "pretty-quick": "^3.1.0", | ||
"rimraf": "^3.0.0", | ||
"typescript": "^4.9.4" | ||
"typescript": "^5.0.2", | ||
"vitest": "^0.29.2" | ||
}, | ||
"resolutions": { | ||
"semver@7.0.0": "^7.0.0" | ||
}, | ||
"files": [ | ||
@@ -64,0 +54,0 @@ "dist", |
@@ -1,2 +0,2 @@ | ||
[![npm](https://img.shields.io/npm/v/merge-refs.svg)](https://www.npmjs.com/package/merge-refs) ![downloads](https://img.shields.io/npm/dt/merge-refs.svg) [![CI](https://github.com/wojtekmaj/merge-refs/workflows/CI/badge.svg)](https://github.com/wojtekmaj/merge-refs/actions) [![tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest) | ||
[![npm](https://img.shields.io/npm/v/merge-refs.svg)](https://www.npmjs.com/package/merge-refs) ![downloads](https://img.shields.io/npm/dt/merge-refs.svg) [![CI](https://github.com/wojtekmaj/merge-refs/workflows/CI/badge.svg)](https://github.com/wojtekmaj/merge-refs/actions) | ||
@@ -3,0 +3,0 @@ # Merge-Refs |
@@ -12,7 +12,7 @@ import type * as React from 'react'; | ||
* | ||
* @param {...Array<Function|object>} inputRefs Array of refs | ||
* @returns {Function} Merged refs | ||
* @param {(React.Ref<T> | undefined)[]} inputRefs Array of refs | ||
* @returns {React.Ref<T> | React.RefCallback<T>} Merged refs | ||
*/ | ||
export default function mergeRefs<T>( | ||
...inputRefs: React.Ref<T>[] | ||
...inputRefs: (React.Ref<T> | undefined)[] | ||
): React.Ref<T> | React.RefCallback<T> { | ||
@@ -19,0 +19,0 @@ const filteredInputRefs = inputRefs.filter(Boolean); |
Sorry, the diff of this file is not supported yet
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
12
174
9736