I am trying to write a typescript module which make use of React.addons.update. However, I couldn't find a way to make it compile.
I have a folder with the following files:
- https://github.com/borisyankov/DefinitelyTyped/blob/master/react/react.d.ts
test.ts containing:
/// <reference path="react.d.ts"/> React.addons.update({}, {test : {$set : "foo" }});
I run the following commands:
node <pathtotsc>\tsc -v
=> message TS6029: Version 1.3.0.0
node <pathtotsc>\tsc react.d.ts test.ts
=> test.ts(2,1): error TS2304: Cannot find name 'React'.
What I am missing? How to reference correctly the react definition?
edit
node <pathtotsc>\tsc test.ts
test.ts(2,1): error TS2304: Cannot find name 'React'.