Skip to content

Commit

Permalink
Fixed typescript error
Browse files Browse the repository at this point in the history
ERROR in ./src/types/intercept-utils.ts
(30,29): error TS2345: Argument of type 'T | null' is not assignable to
parameter of type 'T'.
  Type 'null' is not assignable to type 'T'.
  webpack: Failed to compile.
  • Loading branch information
Andrey Kogut committed Mar 17, 2017
1 parent 3562722 commit 8b1c450
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/types/intercept-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function registerInterceptor<T>(interceptable: IInterceptable<T>, handler
});
}

export function interceptChange<T>(interceptable: IInterceptable<T>, change: T): T {
export function interceptChange<T>(interceptable: IInterceptable<T | null>, change: T | null): T | null {
const prevU = untrackedStart();
try {
const interceptors = interceptable.interceptors;
Expand Down

0 comments on commit 8b1c450

Please sign in to comment.