From 1ccab8b811b39be0bd9b3d3c865546675724e6fa Mon Sep 17 00:00:00 2001 From: Keith Moss Date: Sun, 20 May 2018 10:53:19 +0800 Subject: [PATCH] Bump @types/react to to get the new React.Context API and remove our manual type definitions --- package-lock.json | 18 +++++++++--------- package.json | 6 +++--- src/@types/index.d.ts | 20 -------------------- 3 files changed, 12 insertions(+), 32 deletions(-) diff --git a/package-lock.json b/package-lock.json index fc461bb..e4b49cf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "react-openlayers", - "version": "0.2.1", + "version": "0.2.5", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -52,12 +52,12 @@ "dev": true }, "@types/react": { - "version": "16.3.5", - "resolved": "https://registry.npmjs.org/@types/react/-/react-16.3.5.tgz", - "integrity": "sha512-hjdnnTrogK++yHd/eRLieGqITd0gZcd+NxYSbgdy6E/jQwq9QlXKIHleKGwgU0cYlL1KWNgCVfFpqmMUwVgniA==", + "version": "16.3.11", + "resolved": "https://registry.npmjs.org/@types/react/-/react-16.3.11.tgz", + "integrity": "sha512-F0ZqVldV6l7FObRPfkgXg4GwWJa4tGrh1glydmx+OMOdU4K5lUnh2rlj/4uO6RnuN2OBVCzo2XiyIifEZPkCXw==", "dev": true, "requires": { - "csstype": "2.1.1" + "csstype": "2.5.2" } }, "@types/react-dom": { @@ -67,7 +67,7 @@ "dev": true, "requires": { "@types/node": "9.6.2", - "@types/react": "16.3.5" + "@types/react": "16.3.11" } }, "JSV": { @@ -2588,9 +2588,9 @@ } }, "csstype": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.1.1.tgz", - "integrity": "sha512-YsNVkaQtmsauSmlwqr/3EhJamZIObOcqfOgOmPuQxEXhsSvt/1/4M+bqN9xpsSEJqT2TWfTs2mPWrmwp0iQX6g==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.5.2.tgz", + "integrity": "sha512-epoHrKPywwUhFTXadQNA5PPx4GChtkM03SkBeFZTaFtJcn6QfXpBkX2IAc4J9Oe18nha5NrTOo2OMOge+qH1mw==", "dev": true }, "currently-unhandled": { diff --git a/package.json b/package.json index 7aa4e9b..6ae220b 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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" @@ -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", diff --git a/src/@types/index.d.ts b/src/@types/index.d.ts index 43d6539..e69de29 100644 --- a/src/@types/index.d.ts +++ b/src/@types/index.d.ts @@ -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 = React.ComponentType<{ - value: T - children?: ReactNode - }> - type Consumer = ComponentType<{ - children: (value: T) => ReactNode - unstable_observedBits?: number - }> - interface Context { - Provider: Provider - Consumer: Consumer - } - function createContext(defaultValue: T, calculateChangedBits?: (prev: T, next: T) => number): Context - function createRef(): any -}