Skip to content

Commit

Permalink
Bump Prettier (#17811)
Browse files Browse the repository at this point in the history
* Bump Prettier

* Reformat

* Use non-deprecated option
  • Loading branch information
gaearon authored Jan 9, 2020
1 parent f71d9c3 commit 9ec4453
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/ReactShallowRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,10 @@ class ReactShallowRenderer {
first: null,
dispatch: null,
});
const dispatch: Dispatch<
A,
> = (queue.dispatch = (this._dispatchAction.bind(this, queue): any));
const dispatch: Dispatch<A> = (queue.dispatch = (this._dispatchAction.bind(
this,
queue,
): any));
return [workInProgressHook.memoizedState, dispatch];
}
};
Expand Down Expand Up @@ -529,7 +530,7 @@ class ReactShallowRenderer {
'ReactShallowRenderer render(): Invalid component element.%s',
typeof element === 'function'
? ' Instead of passing a component class, make sure to instantiate ' +
'it by passing it to React.createElement.'
'it by passing it to React.createElement.'
: '',
);
element = ((element: any): ReactElement);
Expand All @@ -543,14 +544,15 @@ class ReactShallowRenderer {
);
invariant(
isForwardRef(element) ||
(typeof element.type === 'function' || isMemo(element)),
typeof element.type === 'function' ||
isMemo(element),
'ReactShallowRenderer render(): Shallow rendering works only with custom ' +
'components, but the provided element type was `%s`.',
Array.isArray(element.type)
? 'array'
: element.type === null
? 'null'
: typeof element.type,
? 'null'
: typeof element.type,
);

if (this._rendering) {
Expand Down

0 comments on commit 9ec4453

Please sign in to comment.