プロジェクトにdebounce
ライブラリproperliをインポートする際に問題があります。reactJs + typescript + debounce - 正しくデバウンスをインポートできません。
は、私が行っている:私のファイルに
npm install debounce --save
typings install dt~debounce --save --global
- 、輸入デバウンスとして:
import debounce from 'debounce';
- 使用デバウンスのように:これらのコードに私のコードでは
debounce(function(){ console.log('testtt'); })();
コンパイルは合格ですが、私が実行しようとしているときbsideは、私はエラーを取得:
Uncaught TypeError: debounce_1.default is not a function
私は間違って何をしているのですか?
おかげ