mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-04 17:20:09 +00:00
[use-deep-compare-effect] Add package (#40353)
* Feat: add useDeepCompareEffect * Fix: change requests and wrong export
This commit is contained in:
committed by
Pranav Senthilnathan
parent
3a9e538b43
commit
52e8f1fad6
12
types/use-deep-compare-effect/index.d.ts
vendored
Normal file
12
types/use-deep-compare-effect/index.d.ts
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
// Type definitions for use-deep-compare-effect 1.2
|
||||
// Project: https://github.com/kentcdodds/use-deep-compare-effect#readme
|
||||
// Definitions by: JPeer264 <https://github.com/JPeer264>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import { useEffect } from 'react';
|
||||
|
||||
export const useDeepCompareEffectNoCheck: typeof useEffect;
|
||||
|
||||
declare const useDeepCompareEffect: typeof useEffect;
|
||||
|
||||
export default useDeepCompareEffect;
|
||||
23
types/use-deep-compare-effect/tsconfig.json
Normal file
23
types/use-deep-compare-effect/tsconfig.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"use-deep-compare-effect-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/use-deep-compare-effect/tslint.json
Normal file
1
types/use-deep-compare-effect/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
@@ -0,0 +1,15 @@
|
||||
import useDeepCompareEffect, { useDeepCompareEffectNoCheck } from 'use-deep-compare-effect';
|
||||
|
||||
useDeepCompareEffect(() => {
|
||||
return () => { };
|
||||
});
|
||||
|
||||
useDeepCompareEffect(() => {
|
||||
});
|
||||
|
||||
useDeepCompareEffectNoCheck(() => {
|
||||
return () => { };
|
||||
});
|
||||
|
||||
useDeepCompareEffectNoCheck(() => {
|
||||
});
|
||||
Reference in New Issue
Block a user