Skip to content

Commit 8224577

Browse files
committed
Build version 2.0.0
1 parent ffa7657 commit 8224577

8 files changed

+36
-21
lines changed

dist/useCurrentCallback.d.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
declare type CallbackState = {
2-
isCurrent: boolean;
3-
};
4-
export declare function useCurrentCallback<T extends (...args: any[]) => any>(callbackFactory: (callbackState: CallbackState) => T, deps?: []): (args: any) => void;
1+
import { DependencyList } from "react";
2+
declare type CheckCurrent = () => boolean;
3+
export declare function useCurrentCallback<T extends (...args: any[]) => any>(callbackFactory: (isCurrent: CheckCurrent) => T, deps?: DependencyList): (args: any) => void;
54
export {};

dist/useCurrentCallback.js

+6-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/useCurrentCallback.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/useCurrentEffect.d.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
declare type EffectState = {
2-
isCurrent: boolean;
3-
};
4-
export declare function useCurrentEffect(callback: ((effectState: EffectState) => void) | ((effectState: EffectState) => () => void), deps?: []): void;
1+
import { DependencyList } from "react";
2+
declare type CheckCurrent = () => boolean;
3+
export declare function useCurrentEffect(callback: ((isCurrent: CheckCurrent) => void) | ((isCurrent: CheckCurrent) => () => void), deps?: DependencyList): void;
54
export {};

dist/useCurrentEffect.js

+4-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/useCurrentEffect.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tsconfig.jest.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"compilerOptions": {
3+
"module": "commonjs",
4+
"esModuleInterop": true,
5+
"noImplicitAny": true,
6+
"removeComments": true,
7+
"preserveConstEnums": true,
8+
"sourceMap": true,
9+
"declaration": true,
10+
"declarationDir": "./dist",
11+
"outDir": "./dist",
12+
"lib": ["es2015","dom"],
13+
"jsx": "react"
14+
},
15+
"include": ["src/**/*"],
16+
"exclude": ["./node_modules/**/*"]
17+
}

tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
"jsx": "react"
1414
},
1515
"include": ["src/**/*"],
16-
"exclude": ["./node_modules/**/*"]
16+
"exclude": ["./node_modules/**/*", "src/**/*.test.tsx"]
1717
}

0 commit comments

Comments
 (0)