mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
24 lines
511 B
TypeScript
24 lines
511 B
TypeScript
//// [tests/cases/compiler/cloduleTest1.ts] ////
|
|
|
|
//// [cloduleTest1.ts]
|
|
declare function $(selector: string): $;
|
|
interface $ {
|
|
addClass(className: string): $;
|
|
}
|
|
namespace $ {
|
|
export interface AjaxSettings {
|
|
}
|
|
export function ajax(options: AjaxSettings) { }
|
|
}
|
|
var it: $ = $('.foo').addClass('bar');
|
|
|
|
|
|
//// [cloduleTest1.js]
|
|
"use strict";
|
|
var $;
|
|
(function ($) {
|
|
function ajax(options) { }
|
|
$.ajax = ajax;
|
|
})($ || ($ = {}));
|
|
var it = $('.foo').addClass('bar');
|