I use react/lib/update method with typescript.
I write a definition file for it, like this:
declare module 'react/lib/update' {
export default function update<S>(value: S, spec: any): S;
}
and, use it like this:
import * as update from 'react/lib/update';
but tsc give me an error:
Cannot invoke an expression whose type lacks a call signature. Type 'typeof 'react/lib/update'' has no compatible call signatures.
It seems my definition file not correct. How to solve this?