ビルドシステムとクライアントサイドのパッケージマネージャとしてaurelia-cliとnpmを使用して、Aureliaにtypescriptを使用しています。私の目標は、私の.TSファイルの1つにjqueryのを使用することですので、私は私が使用タイピングのためAureliaのTypescriptでJqueryを使用する
npm install [email protected] --save
を通って、それの後にjqueryのを追加しました:
typings install dt~jquery --global --save
私もaurelia.jsonファイルで構成されましたベンダーバンドル依存としての "jquery"
import * as jq from 'jquery';
をが、プロジェクトには、次のエラーでビルドに失敗しました:
使用
Starting 'readProjectConfiguration'... Finished 'readProjectConfiguration' Starting 'processMarkup'... Starting 'processCSS'... Starting 'configureEnvironment'... Finished 'processCSS' Finished 'processMarkup' Finished 'configureEnvironment' Starting 'buildTypeScript'... typings/globals/jquery/index.d.ts(3218,13): error TS2403: Subsequent variable declarations must have the same type. Variable '$' must be of type 'cssSelectorHelper', but here has type 'JQueryStatic'. [17:45:00] gulp-notify: [Error running Gulp] Error: typings/globals/jquery/index.d.ts(3218,13): error TS2403: Subsequent variable declarations must have the same type. Variable '$' must be of type 'cssSelectorHelper', but here has type 'JQueryStatic'.
ので、自分のコードが間違って何ですか?