diff --git a/definitions/npm/body-scroll-lock-upgrade_v1.x.x/flow_v0.83.x-/body-scroll-lock-upgrade_v1.x.x.js b/definitions/npm/body-scroll-lock-upgrade_v1.x.x/flow_v0.83.x-/body-scroll-lock-upgrade_v1.x.x.js index f8c2667a6c..0a7765bb5b 100644 --- a/definitions/npm/body-scroll-lock-upgrade_v1.x.x/flow_v0.83.x-/body-scroll-lock-upgrade_v1.x.x.js +++ b/definitions/npm/body-scroll-lock-upgrade_v1.x.x/flow_v0.83.x-/body-scroll-lock-upgrade_v1.x.x.js @@ -1,4 +1,4 @@ -declare module 'body-scroll-lock' { +declare module 'body-scroll-lock-upgrade' { declare type BodyScrollOptions = {| reserveScrollBarGap?: boolean, allowTouchMove?: (el: any) => boolean, diff --git a/definitions/npm/body-scroll-lock-upgrade_v1.x.x/flow_v0.83.x-/test_body-scroll-lock-upgrade_v1.x.x.js b/definitions/npm/body-scroll-lock-upgrade_v1.x.x/flow_v0.83.x-/test_body-scroll-lock-upgrade_v1.x.x.js index 86f6a7311f..a30a13f5f0 100644 --- a/definitions/npm/body-scroll-lock-upgrade_v1.x.x/flow_v0.83.x-/test_body-scroll-lock-upgrade_v1.x.x.js +++ b/definitions/npm/body-scroll-lock-upgrade_v1.x.x/flow_v0.83.x-/test_body-scroll-lock-upgrade_v1.x.x.js @@ -4,7 +4,7 @@ import { disableBodyScroll, enableBodyScroll, clearAllBodyScrollLocks, -} from 'body-scroll-lock'; +} from 'body-scroll-lock-upgrade'; declare var element: HTMLElement; declare var inputElement: HTMLInputElement; diff --git a/definitions/npm/use-debounce_v9.x.x/flow_v0.83.x-/test_use-debounce_v9.x.x.js b/definitions/npm/use-debounce_v9.x.x/flow_v0.83.x-/test_use-debounce_v9.x.x.js index 2ef45ff641..a5784d57fe 100644 --- a/definitions/npm/use-debounce_v9.x.x/flow_v0.83.x-/test_use-debounce_v9.x.x.js +++ b/definitions/npm/use-debounce_v9.x.x/flow_v0.83.x-/test_use-debounce_v9.x.x.js @@ -31,11 +31,15 @@ describe('use-debounce', () => { 1000 ); + debounced('test'); + // $FlowExpectedError[incompatible-call] it matches the type of the callback + debounced(123); + debounced.cancel(); debounced.flush(); debounced.isPending(); - // $FlowExpectedError[prop-missing] + // $FlowExpectedError[incompatible-call] debounced.foo(); }); @@ -51,11 +55,15 @@ describe('use-debounce', () => { 1000 ); + debounced('test'); + // $FlowExpectedError[incompatible-call] it matches the type of the callback + debounced(123); + debounced.cancel(); debounced.flush(); debounced.isPending(); - // $FlowExpectedError[prop-missing] + // $FlowExpectedError[incompatible-call] debounced.foo(); }); }); diff --git a/definitions/npm/use-debounce_v9.x.x/flow_v0.83.x-/use-debounce_v9.x.x.js b/definitions/npm/use-debounce_v9.x.x/flow_v0.83.x-/use-debounce_v9.x.x.js index 962c34b6ef..ae01c99028 100644 --- a/definitions/npm/use-debounce_v9.x.x/flow_v0.83.x-/use-debounce_v9.x.x.js +++ b/definitions/npm/use-debounce_v9.x.x/flow_v0.83.x-/use-debounce_v9.x.x.js @@ -37,10 +37,7 @@ declare module 'use-debounce' { * Subsequent calls to the debounced function `debounced.callback` return the result of the last func invocation. * Note, that if there are no previous invocations it's mean you will get undefined. You should check it in your code properly. */ - declare type DebouncedState R> = {| - ...ControlFunctions, - (...args: Parameters): R | void, - |}; + declare type DebouncedState R> = ControlFunctions & ((...args: Parameters) => R | void); declare module.exports: {| useDebounce: (value: T, delay: number, options?: {|