Skip to content

Commit

Permalink
Working version - 0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
becousae committed Dec 31, 2017
1 parent 4efd4f8 commit d999029
Show file tree
Hide file tree
Showing 6 changed files with 2,239 additions and 1,162 deletions.
8 changes: 2 additions & 6 deletions lib/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';

interface Action<T> {
export interface Action<T> {
type: T;
}

Expand All @@ -16,16 +16,12 @@ export function fsm<Props, State, Status, ActionType>(
commands: any,
initialStatus: Status
) {
interface WrapperState {
status: Status;
}

type CAction = Action<ActionType>;
type CProps = InjectedProps<Status, CAction>;

// tslint:disable-next-line: no-any
return (Component: React.ComponentClass<any>) => {
return class extends React.Component<Props, WrapperState> {
return class extends React.Component<Props, { status: Status }> {
static displayName = 'FSM';

constructor(props: Props) {
Expand Down
Loading

0 comments on commit d999029

Please sign in to comment.