remove deprecated utilities

Summary: Remove `$Subtype` and `$Supertype` utilities. Replacement was done on a best-effort basis. In many cases it sufficed to replace `$Supertype<T>` and `$Subtype<T>` with `T`, but when this was not possible `any | T` and `any & T` were used instead.

Reviewed By: jbrown215

Differential Revision: D13624765

fbshipit-source-id: 82ee9d43cfc318ed4bd2d84e0f4c5c1d8f488a9c
This commit is contained in:
Daniel Sainati 2019-01-15 13:07:54 -08:00 committed by Facebook Github Bot
parent 7fbccdea22
commit 2a479a6953
3 changed files with 3 additions and 1 deletions

View File

@ -85,6 +85,7 @@ sketchy-null-mixed=warn
# This is noisy for now. We *do* still want to warn on importing types
# from untyped files, which is covered by untyped-type-import
untyped-import=off
deprecated-utility=error
[strict]
deprecated-type

View File

@ -85,6 +85,7 @@ sketchy-null-mixed=warn
# This is noisy for now. We *do* still want to warn on importing types
# from untyped files, which is covered by untyped-type-import
untyped-import=off
deprecated-utility=error
[strict]
deprecated-type

View File

@ -38,7 +38,7 @@ declare module 'prop-types' {
declare var shape: React$PropType$Shape;
declare function checkPropTypes<V>(
propTypes: $Subtype<{[_: $Keys<V>]: $npm$propTypes$ReactPropsCheckType}>,
propTypes: {[_: $Keys<V>]: $npm$propTypes$ReactPropsCheckType},
values: V,
location: string,
componentName: string,