@os-design/use-forwarded-state
Advanced tools
Comparing version 1.0.22 to 1.0.23
{ | ||
"name": "@os-design/use-forwarded-state", | ||
"version": "1.0.22", | ||
"version": "1.0.23", | ||
"license": "UNLICENSED", | ||
"repository": "git@gitlab.com:os-team/libs/os-design.git", | ||
"main": "dist/cjs/index.js", | ||
"module": "dist/esm/index.js", | ||
"types": "dist/types/index.d.ts", | ||
"react-native": "src/index.ts", | ||
"type": "module", | ||
"main": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"react-native": "./src/index.ts", | ||
"files": [ | ||
@@ -24,5 +24,4 @@ "dist", | ||
"clean": "rimraf dist", | ||
"build:esm": "cross-env BABEL_ENV=esm babel src --root-mode upward --extensions .ts,.tsx --out-dir dist/esm --source-maps", | ||
"build:cjs": "cross-env BABEL_ENV=cjs babel src --root-mode upward --extensions .ts,.tsx --out-dir dist/cjs --source-maps", | ||
"build:types": "tsc --emitDeclarationOnly --declaration --declarationDir dist/types", | ||
"build:esm": "cross-env BABEL_ENV=esm babel src --root-mode upward --extensions .ts,.tsx --out-dir dist", | ||
"build:types": "tsc -p tsconfig.build.json --emitDeclarationOnly --declaration --declarationDir dist", | ||
"build": "yarn clean && npm-run-all 'build:*'", | ||
@@ -37,3 +36,3 @@ "ncu": "ncu -u" | ||
}, | ||
"gitHead": "1f17189e344a56fd6347dd6b896d6e7ef6e7b35d" | ||
"gitHead": "86a83e87297a07afe132782ca2c95023b7139276" | ||
} |
import { | ||
Dispatch, | ||
SetStateAction, | ||
type Dispatch, | ||
type SetStateAction, | ||
useCallback, | ||
@@ -17,5 +17,5 @@ useEffect, | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any,@typescript-eslint/ban-types | ||
const isFunction = (value: any): value is Function => | ||
typeof value === 'function'; | ||
const isFunction = <T>( | ||
value: SetStateAction<T> | ||
): value is (prevState: T) => T => typeof value === 'function'; | ||
@@ -22,0 +22,0 @@ const useForwardedState = <T>({ |
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
Yes
6204
8
78