update code for header

This commit is contained in:
yhpnorra
2017-12-19 17:57:15 +08:00
parent 296fcf388e
commit 9d9ff815dd
2 changed files with 9 additions and 10 deletions

View File

@@ -1,4 +1,4 @@
// Type definitions for mirrorjs 0.2.10
// Type definitions for mirrorx 0.2.10
// Project: https://github.com/mirrorjs/mirror
// Definitions by: Aaronphy <https://github.com/aaronphy>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -11,9 +11,6 @@ import * as React from 'react';
import { Connect } from 'react-redux';
import { match } from "react-router";
export = mirror;
export as namespace mirror;
declare namespace mirror {
type Diff<T extends string, U extends string> = ({[P in T]: P } & {[P in U]: never } & { [x: string]: never })[T];
@@ -191,3 +188,5 @@ declare namespace mirror {
function withRouter<P extends RouteComponentProps<any>>(component: React.ComponentType<P>): React.ComponentClass<Omit<P, keyof RouteComponentProps<any>>>;
function withRouter<P, TFunction extends React.ComponentClass<P>>(target: TFunction): TFunction;
}
export = mirror;

View File

@@ -1,9 +1,9 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import mirror = require('mirrorx');
/**
* add mirror.model.tests
*/
/**
* add mirror.model.tests
*/
mirror.model({
name: 'app',
initialState: 0,
@@ -14,9 +14,9 @@ mirror.model({
effects: {
async incrementAsync() {
await new Promise((resolve, reject) => {
setTimeout(() => {
resolve();
}, 1000);
setTimeout(() => {
resolve();
}, 1000);
});
mirror.actions.app.increment();
}