Skip to content

Commit

Permalink
Bump @types/react to to get the new React.Context API and remove our …
Browse files Browse the repository at this point in the history
…manual type definitions
  • Loading branch information
keithamoss committed May 20, 2018
1 parent 7cf2e54 commit 1ccab8b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 32 deletions.
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-openlayers",
"version": "0.2.5",
"version": "0.2.6",
"description": "OpenLayer React Components",
"license": "MIT",
"main": "dist/index.js",
Expand All @@ -16,7 +16,7 @@
"build:app": "cross-env NODE_ENV=production webpack --config app/webpack.config",
"types": "dts-generator --name react-openlayers --project . --out dist/index.d.ts",
"copy:static": "cp src/map.css dist/map.css && cp src/custom/popup.css dist/custom/popup.css",
"packy": "npm pack && mv react-openlayers-0.2.1.tgz /Users/keithmoss/Downloads/react-openlayers-0.2.1.tgz",
"packy": "npm pack && mv react-openlayers-0.2.6.tgz /Users/keithmoss/Downloads/react-openlayers-0.2.6.tgz",
"wml:add": "wml add ./ /Users/keithmoss/Documents/Work/GitHub/ealgis-yarn/frontend/node_modules/react-openlayers",
"wml:start": "wml start",
"upgrade": "npm-check-updates -a/--upgradeAll && npm i"
Expand All @@ -34,7 +34,7 @@
"devDependencies": {
"@types/googlemaps": "^3.26.4",
"@types/ol": "^4.6.1",
"@types/react": "^16.3.1",
"@types/react": "^16.3.11",
"@types/react-dom": "^16.0.4",
"awesome-typescript-loader": "^5.0.0",
"babel-cli": "^6.26.0",
Expand Down
20 changes: 0 additions & 20 deletions src/@types/index.d.ts
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
}

0 comments on commit 1ccab8b

Please sign in to comment.