react-modal-promise
Advanced tools
Comparing version 0.7.6 to 1.0.0
@@ -17,11 +17,11 @@ /// <reference types="react" /> | ||
} | ||
export interface InstanceProps<Result> extends InstanceOptions { | ||
export interface InstanceProps<Resolve, Reject = Resolve> extends InstanceOptions { | ||
isOpen: boolean; | ||
instanceId: Hex; | ||
onReject: (reason?: Result) => void; | ||
onResolve: (result?: Result) => void; | ||
onReject: (rej?: Reject) => void; | ||
onResolve: (res?: Resolve) => void; | ||
/** @deprecated **/ | ||
open: boolean; | ||
/** @deprecated **/ | ||
close: (result?: Result) => void; | ||
close: (res?: Resolve) => void; | ||
} | ||
@@ -51,4 +51,4 @@ export interface Instance extends InstanceOptions { | ||
export interface CreateInstance { | ||
<T extends InstanceProps<Result>, Result = any>(Component: InstanceComponent<T>, options?: InstanceOptions): (props?: Omit<T, keyof InstanceProps<Result>> & Partial<InstanceProps<Result>>) => Promise<Result>; | ||
<T extends InstanceProps<Resolve, Reject>, Resolve = any, Reject = Resolve>(Component: InstanceComponent<T>, options?: InstanceOptions): (props?: Omit<T, keyof InstanceProps<Resolve, Reject>> & Partial<InstanceProps<Resolve, Reject>>) => Promise<Resolve>; | ||
} | ||
export declare type InstanceCreator = <T, Result>(Component: InstanceComponent<T>, options?: InstanceOptions, props?: Omit<T, keyof InstanceProps<Result>> & Partial<InstanceProps<Result>>) => Promise<Result>; | ||
export declare type InstanceCreator = <T, Resolve, Reject = Resolve>(Component: InstanceComponent<T>, options?: InstanceOptions, props?: Omit<T, keyof InstanceProps<Resolve, Reject>> & Partial<InstanceProps<Resolve, Reject>>) => Promise<Resolve>; |
{ | ||
"name": "react-modal-promise", | ||
"version": "0.7.6", | ||
"version": "1.0.0", | ||
"description": "Promise wrapper for React components", | ||
@@ -47,17 +47,17 @@ "keywords": [ | ||
"@babel/preset-react": "^7.0.0", | ||
"@commitlint/cli": "^12.1.1", | ||
"@commitlint/config-conventional": "^12.1.1", | ||
"@commitlint/cli": "^13.1.0", | ||
"@commitlint/config-conventional": "^13.1.0", | ||
"@types/enzyme": "^3.10.3", | ||
"@types/enzyme-adapter-react-16": "^1.0.5", | ||
"@types/jest": "^26.0.19", | ||
"@types/node": "^14.14.17", | ||
"@types/node": "^16.4.9", | ||
"@types/react": "^17.0.0", | ||
"@types/react-dom": "^17.0.3", | ||
"babel-jest": "^26.6.3", | ||
"babel-jest": "^27.0.6", | ||
"enzyme": "^3.10.0", | ||
"enzyme-adapter-react-16": "^1.14.0", | ||
"enzyme-to-json": "^3.4.0", | ||
"husky": "^6.0.0", | ||
"jest": "^24.9.0", | ||
"lint-staged": "^10.5.3", | ||
"husky": "^7.0.1", | ||
"jest": "^27.1.1", | ||
"lint-staged": "^11.1.1", | ||
"prettier": "^2.2.1", | ||
@@ -69,3 +69,3 @@ "react": "^16.9.0", | ||
"rollup-plugin-typescript": "^1.0.1", | ||
"ts-jest": "^24.0.2", | ||
"ts-jest": "^27.0.0-next.12", | ||
"tslib": "^2.2.0", | ||
@@ -72,0 +72,0 @@ "tslint": "^6.1.3", |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
58331
0