Upgrade invariant types
Summary: The new type defs make use of TypeScript 3.7 assertion functions which means they actually have a semantic effect on the rest of the lexical unit, which is quite neat. Reviewed By: mweststrate Differential Revision: D19348035 fbshipit-source-id: 3c7a21b5bece091c32f8879fed12d8e46e205ea4
This commit is contained in:
committed by
Facebook Github Bot
parent
5ea4c2211e
commit
b2c3125a1a
@@ -332,8 +332,8 @@ export default class Client extends EventEmitter {
|
||||
} else if (method === 'refreshPlugins') {
|
||||
this.refreshPlugins();
|
||||
} else if (method === 'execute') {
|
||||
const params: Params = data.params as Params;
|
||||
invariant(params, 'expected params');
|
||||
invariant(data.params, 'expected params');
|
||||
const params: Params = data.params;
|
||||
|
||||
const device = this.getDeviceSync();
|
||||
if (device) {
|
||||
|
||||
Reference in New Issue
Block a user