Skip to content

Instantly share code, notes, and snippets.

@carpben
Last active September 8, 2020 15:26
Show Gist options
  • Save carpben/396e175d056bfdd25e23f1a978c589f6 to your computer and use it in GitHub Desktop.
Save carpben/396e175d056bfdd25e23f1a978c589f6 to your computer and use it in GitHub Desktop.
/** Original */
import DR from "general/types"
interface IScrollLockProps {
accountForScrollbars?: boolean
touchScrollTarget?: HTMLElement
}
declare module "react-scrolllock" {
const ScrollLock: new () => React.SFC<IScrollLockProps>
export = ScrollLock
}
declare module "emotion" {
export const css: (...args: DR<Array<Interpolation>>) => string
}
/** Updated */
import { _DeepReadonlyArray } from "utility-types/dist/mapped-types"
interface IScrollLockProps {
accountForScrollbars?: boolean
touchScrollTarget?: HTMLElement
}
declare module "react-scrolllock" {
const ScrollLock: new () => React.SFC<IScrollLockProps>
export = ScrollLock
}
declare module "emotion" {
export const css: (...args: _DeepReadonlyArray<Interpolation>) => string
}
@carpben
Copy link
Author

carpben commented Sep 8, 2020

original caused the following errors:

image

@carpben
Copy link
Author

carpben commented Sep 8, 2020

Updated caused the following error:
image

@carpben
Copy link
Author

carpben commented Sep 8, 2020

Library is latest version of Emotion 9 (not 10)
https://www.npmjs.com/package/emotion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment