From 6a02cedcf0a68b7d46c45f588427a6a4965f4ba4 Mon Sep 17 00:00:00 2001 From: Alvaro Dias Date: Sun, 13 Sep 2015 04:49:18 -0700 Subject: [PATCH] Add bundles, skipDataMain and onNodeCreated --- requirejs/require.d.ts | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/requirejs/require.d.ts b/requirejs/require.d.ts index 58fb4f6f12..113ead6356 100644 --- a/requirejs/require.d.ts +++ b/requirejs/require.d.ts @@ -1,4 +1,4 @@ -// Type definitions for RequireJS 2.1.8 +// Type definitions for RequireJS 2.1.20 // Project: http://requirejs.org/ // Definitions by: Josh Baldwin // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -88,6 +88,10 @@ interface RequireConfig { // baseUrl. paths?: { [key: string]: any; }; + // Allows configuring multiple module IDs to be found in + // another script. + bundles?: { [key: string]: any; }; + // Dictionary of Shim's. // does not cover case of key->string[] shim?: { [key: string]: RequireShim; }; @@ -182,6 +186,20 @@ interface RequireConfig { **/ scriptType?: string; + /** + * If set to true, skips the data-main attribute scanning done + * to start module loading. Useful if RequireJS is embedded in + * a utility library that may interact with other RequireJS + * library on the page, and the embedded version should not do + * data-main loading. + **/ + skipDataMain?: boolean; + + /** + * Allow extending requirejs to support Subresource Integrity + * (SRI). + **/ + onNodeCreated?: (node: HTMLScriptElement, config: RequireConfig, moduleName: string, url: string) => void; } // todo: not sure what to do with this guy