diff --git a/dva/dva-tests.tsx b/dva/dva-tests.tsx deleted file mode 100644 index 467be594ab..0000000000 --- a/dva/dva-tests.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import dva from 'dva'; -import { connect } from 'dva'; -import { Router, Route } from 'dva/router'; -import * as React from "react"; - -// 1. Initialize -const app = dva(); - -// 2. Model -app.model({ - namespace: 'count', - state: 0, - reducers: { - add(count: number) { - return count + 1 - }, - minus(count: number) { - return count - 1 - }, - }, -}); - -// 3. View -const App = connect(({ count }: any) => ({ - count -}))(function ({ count, dispatch }: any) { - return ( -
-

{ count }

- - -
- ); -}); - -// 4. Router -app.router(({ history }: any) => - - - -); - -// 5. Start -const countApp = app.start(); diff --git a/dva/index.d.ts b/dva/index.d.ts deleted file mode 100644 index 7f7651c2f4..0000000000 --- a/dva/index.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -// Type definitions for dva v1.0.0 -// Project: https://github.com/dvajs/dva -// Definitions by: nikogu -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// -declare module 'dva' { - /** connecting Container Components */ - export function connect(maps:Object):Function; - - export default function dva(opts?:Object):{ - - /** dva plugin */ - use: (hooks:Object)=>void, - - /** dva bootstrap */ - start: (selector?:String|HTMLElement)=>void, - - /** dva add model */ - model: (model:Object)=>void, - - /** dva setting router */ - router: (router:Object)=>Object|JSX.Element, - }; -} - -/** - * https://github.com/reactjs/react-router - */ -declare module 'dva/router' { - interface RouterProps { - history?: Object - } - export class Router extends React.Component { - render():JSX.Element - } - - - interface RouteProps { - path?: string, - component?: React.ReactNode - } - export class Route extends React.Component { - render():JSX.Element - } - - /** - * https://github.com/reactjs/react-router-redux - */ - export class routerRedux {} - -} - -/** - * https://github.com/fis-components/whatwg-fetch - */ -declare module 'dva/fetch' { - export default Function; -} diff --git a/dva/tsconfig.json b/dva/tsconfig.json deleted file mode 100644 index fab9f2794b..0000000000 --- a/dva/tsconfig.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "target": "es6", - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": false, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true, - "jsx": "react" - }, - "files": [ - "index.d.ts", - "dva-tests.tsx" - ] -} \ No newline at end of file diff --git a/notNeededPackages.json b/notNeededPackages.json index d5a2b2301c..92e1a708ed 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -226,6 +226,12 @@ "typingsPackageName": "Facebook's Immutable", "sourceRepoURL": "https://github.com/facebook/immutable-js", "asOfVersion": "3.8.7" + }, + { + "libraryName": "dva", + "typingsPackageName": "dva", + "sourceRepoURL": "https://github.com/dvajs/dva", + "asOfVersion": "1.1.0" } ] } \ No newline at end of file