TypeScript extend JQuery under Namespace
问题 I'm trying to extend the default JQuery interface and the default object jQuery by a function in TypeScript Code /// <reference path="jquery.d.ts" /> namespace MyNameSpace { var $ = jQuery; export interface JQuery { test(options: Object): JQuery; } $.fn.test = function(options: Object): JQuery { if (this.length === 0) { console.log('Error!'); return this; } console.log(options); return this; } export var testBody = function() { jQuery('body').test({ 'HELLO': 'TEST' }); } } The Problem Now I'm