From 08620066d4d3654e4070471f638e9b7a90f887f8 Mon Sep 17 00:00:00 2001 From: Sergey Zarouski Date: Wed, 2 Jul 2014 22:20:58 -0400 Subject: [PATCH 1/3] Add amd property to define Add static amd property to define function. --- requirejs/require.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/requirejs/require.d.ts b/requirejs/require.d.ts index 8623de8d6..3b6639626 100644 --- a/requirejs/require.d.ts +++ b/requirejs/require.d.ts @@ -342,6 +342,8 @@ interface RequireDefine { * callback return module definition **/ (name: string, ready: Function): void; + + amd: Object; } // Ambient declarations for 'require' and 'define' From 90240e975b19fc6a9d0c5841403ae1c0698bbaef Mon Sep 17 00:00:00 2001 From: Sergey Zarouski Date: Wed, 2 Jul 2014 23:05:31 -0400 Subject: [PATCH 2/3] Add comments for define.amd property Add comments for define.amd property --- requirejs/require.d.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/requirejs/require.d.ts b/requirejs/require.d.ts index 3b6639626..47c754c60 100644 --- a/requirejs/require.d.ts +++ b/requirejs/require.d.ts @@ -343,6 +343,14 @@ interface RequireDefine { **/ (name: string, ready: Function): void; + /** + * Used to allow a clear indicator that a global define function (as needed for script src browser loading) conforms + * to the AMD API, any global define function SHOULD have a property called "amd" whose value is an object. + * This helps avoid conflict with any other existing JavaScript code that could have defined a define() function + * that does not conform to the AMD API. + * define.amd.jQuery is specific to jQuery and indicates that the loader is able to account for multiple version + * of jQuery being loaded simultaneously. + */ amd: Object; } From ae63871fe94109447cc1a4083ea64ae41aa58ad5 Mon Sep 17 00:00:00 2001 From: Sergey Zarouski Date: Wed, 2 Jul 2014 23:10:14 -0400 Subject: [PATCH 3/3] Add _.noop to lodash Add static _.noop function to lodash. --- lodash/lodash.d.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index f90397a37..a4de09279 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -6201,6 +6201,14 @@ declare module _ { **/ uniqueId(prefix?: string): string; } + + //_.noop + interface LoDashStatic { + /** + * A no-operation function. + **/ + noop(): void; + } interface ListIterator { (value: T, index: number, list: T[]): TResult;