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
@@ -68,7 +68,7 @@
|
||||
"@types/expand-tilde": "^2.0.0",
|
||||
"@types/fb-watchman": "^2.0.0",
|
||||
"@types/fs-extra": "^8.0.0",
|
||||
"@types/invariant": "^2.2.30",
|
||||
"@types/invariant": "^2.2.31",
|
||||
"@types/jest": "^24.0.16",
|
||||
"@types/lodash.debounce": "^4.0.6",
|
||||
"@types/lodash.isequal": "^4.5.5",
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -147,8 +147,8 @@ class TableHeadColumn extends PureComponent<{
|
||||
const {parentElement} = this.ref;
|
||||
invariant(parentElement, 'expected there to be parentElement');
|
||||
|
||||
const parentWidth = parentElement!.clientWidth;
|
||||
const {childNodes} = parentElement!;
|
||||
const parentWidth = parentElement.clientWidth;
|
||||
const {childNodes} = parentElement;
|
||||
|
||||
const lastElem = childNodes[childNodes.length - 1];
|
||||
const right =
|
||||
|
||||
@@ -1233,10 +1233,10 @@
|
||||
"@types/react" "*"
|
||||
hoist-non-react-statics "^3.3.0"
|
||||
|
||||
"@types/invariant@^2.2.30":
|
||||
version "2.2.30"
|
||||
resolved "https://registry.yarnpkg.com/@types/invariant/-/invariant-2.2.30.tgz#20efa342807606ada5483731a8137cb1561e5fe9"
|
||||
integrity sha512-98fB+yo7imSD2F7PF7GIpELNgtLNgo5wjivu0W5V4jx+KVVJxo6p/qN4zdzSTBWy4/sN3pPyXwnhRSD28QX+ag==
|
||||
"@types/invariant@^2.2.31":
|
||||
version "2.2.31"
|
||||
resolved "https://registry.yarnpkg.com/@types/invariant/-/invariant-2.2.31.tgz#4444c03004f215289dbca3856538434317dd28b2"
|
||||
integrity sha512-jMlgg9pIURvy9jgBHCjQp/CyBjYHUwj91etVcDdXkFl2CwTFiQlB+8tcsMeXpXf2PFE5X2pjk4Gm43hQSMHAdA==
|
||||
|
||||
"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0":
|
||||
version "2.0.1"
|
||||
|
||||
Reference in New Issue
Block a user