【发布时间】:2017-09-22 22:51:26
【问题描述】:
Summernote 是一个 jQuery 插件,我不需要为它定义类型。我只想修改对象,但 TS 不断抛出错误。下面这行仍然给我:“属性 'summernote' 不存在于类型 'jQueryStatic'。” 错误。
(function ($) {
/* tslint:disable */
delete $.summernote.options.keyMap.pc.TAB;
delete $.summernote.options.keyMap.mac.TAB;
/* tslint:enable */
})(jQuery)
编辑:
这是我的 tsconfig.json
{
"compilerOptions": {
"outDir": "./dist/",
"sourceMap": true,
"noImplicitAny": true,
"module": "commonjs",
"target": "es5",
"allowJs": true,
"noUnusedParameters": true
},
"include": [
"js/**/*"
],
"exclude": [
"node_modules",
"**/*.spec.ts"
]
}
【问题讨论】:
标签: javascript jquery typescript summernote