mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge branch 'master' of https://github.com/borisyankov/DefinitelyTyped
This commit is contained in:
@@ -2302,3 +2302,17 @@ $.when("asdf", "jkl;").done(x => x.length, x=> x.length);
|
||||
var f1 = $.when("fetch"); // Is type JQueryPromise<string>
|
||||
var f2: JQueryPromise<string[]> = f1.then(s => [s, s]);
|
||||
var f3: JQueryPromise<number> = f2.then(v => 3);
|
||||
|
||||
// ISSUE: https://github.com/borisyankov/DefinitelyTyped/issues/742
|
||||
// http://stackoverflow.com/questions/5392344/sending-multipart-formdata-with-jquery-ajax#answer-5976031
|
||||
$.ajax({
|
||||
url: 'php/upload.php',
|
||||
data: {},
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
type: 'POST',
|
||||
success: function (data) {
|
||||
alert(data);
|
||||
}
|
||||
});
|
||||
Vendored
+3
-1
@@ -25,7 +25,9 @@ interface JQueryAjaxSettings {
|
||||
cache?: boolean;
|
||||
complete? (jqXHR: JQueryXHR, textStatus: string);
|
||||
contents?: { [key: string]: any; };
|
||||
contentType?: string;
|
||||
//According to jQuery.ajax source code, ajax's option actually allows contentType to set to "false"
|
||||
// https://github.com/borisyankov/DefinitelyTyped/issues/742
|
||||
contentType?: any;
|
||||
context?: any;
|
||||
converters?: { [key: string]: any; };
|
||||
crossDomain?: boolean;
|
||||
|
||||
@@ -36,4 +36,9 @@ require(['main'], (main, $, _, Backbone) => {
|
||||
var app = main.AppMain();
|
||||
app.run();
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
// ISSUE: https://github.com/borisyankov/DefinitelyTyped/issues/764
|
||||
var recOne = requirejs.config({ baseUrl: 'js' });
|
||||
recOne(['core'], function (core) {/*some code*/});
|
||||
|
||||
|
||||
Vendored
+2
-2
@@ -126,8 +126,8 @@ interface RequireMap {
|
||||
|
||||
interface Require {
|
||||
|
||||
// Configure require.js
|
||||
config(config: RequireConfig): void;
|
||||
// Configure require.js
|
||||
config(config: RequireConfig): Require;
|
||||
|
||||
// Start the main app logic.
|
||||
// Callback is optional.
|
||||
|
||||
Reference in New Issue
Block a user