Skip to content
This repository has been archived by the owner on Dec 31, 2020. It is now read-only.

Commit

Permalink
Remove this when not needed
Browse files Browse the repository at this point in the history
Fix error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation
  • Loading branch information
tkrotoff committed Jan 11, 2017
1 parent 138d8bb commit cb33466
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/ts/compile-ts.tsx
Expand Up @@ -23,10 +23,10 @@ const T2 = observer(React.createClass({
}));

const T3 = observer((props: { hamburger: number }) => {
return <T2 cake={this.props.hamburger} />;
return <T2 cake={props.hamburger} />;
});

const T4 = ({sandwich}: { sandwich: number }) => <div><T3 hamburger={this.props.sandwich} /></div>;
const T4 = ({sandwich}: { sandwich: number }) => <div><T3 hamburger={sandwich} /></div>;

const T5 = observer(() => {
return <T3 hamburger={17} />;
Expand Down Expand Up @@ -75,7 +75,7 @@ const T9 = observer(["stores"], React.createClass({
}));

const T10 = observer(["stores"], (props: { hamburger: number }) => {
return <T2 cake={this.props.hamburger} />;
return <T2 cake={props.hamburger} />;
});

React.createElement(observer(T8), { pizza: 4 });
Expand Down

0 comments on commit cb33466

Please sign in to comment.