forked from allenhwkim/react-openlayers
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump @types/react to to get the new React.Context API and remove our …
…manual type definitions
- Loading branch information
1 parent
7cf2e54
commit 1ccab8b
Showing
3 changed files
with
12 additions
and
32 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +0,0 @@ | ||
// Needed until @types/react supports the new React 16.3.0 Context API | ||
// https://github.com/DefinitelyTyped/DefinitelyTyped/pull/24509 | ||
|
||
import * as React from "react" | ||
declare module "react" { | ||
type Provider<T> = React.ComponentType<{ | ||
value: T | ||
children?: ReactNode | ||
}> | ||
type Consumer<T> = ComponentType<{ | ||
children: (value: T) => ReactNode | ||
unstable_observedBits?: number | ||
}> | ||
interface Context<T> { | ||
Provider: Provider<T> | ||
Consumer: Consumer<T> | ||
} | ||
function createContext<T>(defaultValue: T, calculateChangedBits?: (prev: T, next: T) => number): Context<T> | ||
function createRef<T>(): any | ||
} | ||