rangle / rangle-starter

48 stars 23 forks source link

change typings.json system to @types #206

Open radziksh opened 7 years ago

radziksh commented 7 years ago

Hi, again me:) as typescript 2.0 is used in starter, then there is new typing system for definitions from https://github.com/DefinitelyTyped/DefinitelyTyped project. so instead code in typing.json:

"classnames": "registry:dt/classnames#0.0.0+20160316155526",
    "enzyme": "registry:dt/enzyme#2.4.1+20160709041153",
    "jasmine": "registry:dt/jasmine#2.2.0+20160621224255",
    "node": "registry:dt/node#6.0.0+20160801161248",
    "react": "registry:dt/react#0.14.0+20160801203155",
    "react-dom": "registry:dt/react-dom#0.14.0+20160412154040",
    "whatwg-fetch": "registry:dt/whatwg-fetch#0.0.0+20160728142841"
  },
  "dependencies": {
    "react-router": "registry:npm/react-router#2.4.0+20160628165748",
    "react-router-redux": "registry:npm/react-router-redux#4.0.0+20160602212457",
    "redux-thunk": "r

can be used code in `package.json':

"devDependencies": {
    "@types/classnames": "version",
    "@types/enzyme": "version",
    "@types/jasmine": "version",
    "@types/node": "version",
    "@types/react": "version",
    "@types/react-dom": "version",
    "@types/whatwg-fetch": "version"
    "@typesr/eact-router": "version",
    "@types/react-router-redux": "version",
    "@types/redux-thunk": "version"
  },

and typescript 2.0 will automatically handle it. https://blogs.msdn.microsoft.com/typescript/2016/06/15/the-future-of-declaration-files/

SethDavenport commented 7 years ago

Yes you're totally right. We've done this for our other example apps but the react one needs some attention. Feel like making a PR? :)

radziksh commented 7 years ago

well, ok. You have saved my time. I will save yours ;)

radziksh commented 7 years ago

I added @types and application works but there is some error with npm test: 21 01 2017 22:38:19.957:ERROR [karma]: Error: Invalid store [fslookup], allowed values are at Object.create (C:\typescript-react-redux-example\node_modules\remap-istanbul\node_modules\istanbul\lib\util\factory.js:47:28) at new HtmlReport (C:\typescript-react-redux-example\node_modules\remap-istanbul\node_modules\istanbul\lib\report\html.js:350:15) at C:\typescript-react-redux-example\node_modules\remap-istanbul\lib\writeReport.js:76:20 at C:\typescript-react-redux-example\node_modules\remap-istanbul\node_modules\amdefine\amdefine.js:125:34 at _combinedTickCallback (internal/process/next_tick.js:67:7) at process._tickCallback (internal/process/next_tick.js:98:9) npm ERR! Test failed. See above for more details.