mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-01 15:50:13 +00:00
requirejs.RequireConfig
Add a missing signature for urlArgs property of the RequireConfig object.
This commit is contained in:
22
requirejs/require.d.ts
vendored
22
requirejs/require.d.ts
vendored
@@ -185,8 +185,28 @@ interface RequireConfig {
|
||||
*
|
||||
* @example
|
||||
* urlArgs: "bust= + (new Date()).getTime()
|
||||
*
|
||||
* As of RequireJS 2.2.0, urlArgs can be a function. If a
|
||||
* function, it will receive the module ID and the URL as
|
||||
* parameters, and it should return a string that will be added
|
||||
* to the end of the URL. Return an empty string if no args.
|
||||
* Be sure to take care of adding the '?' or '&' depending on
|
||||
* the existing state of the URL.
|
||||
*
|
||||
* @example
|
||||
|
||||
* requirejs.config({
|
||||
* urlArgs: function(id, url) {
|
||||
* var args = 'v=1';
|
||||
* if (url.indexOf('view.html') !== -1) {
|
||||
* args = 'v=2'
|
||||
* }
|
||||
*
|
||||
* return (url.indexOf('?') === -1 ? '?' : '&') + args;
|
||||
* }
|
||||
* });
|
||||
**/
|
||||
urlArgs?: string;
|
||||
urlArgs?: string | { (id: string, url: string): string; };
|
||||
|
||||
/**
|
||||
* Specify the value for the type="" attribute used for script
|
||||
|
||||
Reference in New Issue
Block a user