diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 8fd70fc496..9952113daa 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -18,7 +18,7 @@ TODO: - [x] Removed _.where in favor of _.filter with iteratee shorthand - [x] Removed _.pluck in favor of _.map with iteratee shorthand -- [ ] Renamed _.first to _.head +- [x] Renamed _.first to _.head - [ ] Renamed _.indexBy to _.keyBy - [ ] Renamed _.invoke to _.invokeMap - [ ] Renamed _.modArgs to _.overArgs @@ -152,7 +152,7 @@ added collection method: Added 3 aliases - [ ] _.extend as an alias of _.assignIn - [ ] _.extendWith as an alias of _.assignInWith -- [ ] _.first as an alias of _.head +- [x] _.first as an alias of _.head Removed 17 aliases - [ ] _.all, _.any, _.backflow, _.callback, _.collect, _.compose, _.contains, _.detect, _.foldl, _.foldr, _.include, _.inject, _.methods, _.object, _.#run, _.select, & _.unique @@ -311,89 +311,6 @@ declare module _ { set(key: string, value: any): _.Dictionary; } - /** - * An object used to flag environments features. - **/ - interface Support { - /** - * Detect if an arguments object's [[Class]] is resolvable (all but Firefox < 4, IE < 9). - **/ - argsClass: boolean; - - /** - * Detect if arguments objects are Object objects (all but Narwhal and Opera < 10.5). - **/ - argsObject: boolean; - - /** - * Detect if name or message properties of Error.prototype are enumerable by default. - * (IE < 9, Safari < 5.1) - **/ - enumErrorProps: boolean; - - /** - * Detect if prototype properties are enumerable by default. - * - * Firefox < 3.6, Opera > 9.50 - Opera < 11.60, and Safari < 5.1 (if the prototype or a property on the - * prototype has been set) incorrectly set the [[Enumerable]] value of a function’s prototype property to true. - **/ - enumPrototypes: boolean; - - /** - * Detect if Function#bind exists and is inferred to be fast (all but V8). - **/ - fastBind: boolean; - - /** - * Detect if functions can be decompiled by Function#toString (all but PS3 and older Opera - * mobile browsers & avoided in Windows 8 apps). - **/ - funcDecomp: boolean; - - /** - * Detect if Function#name is supported (all but IE). - **/ - funcNames: boolean; - - /** - * Detect if arguments object indexes are non-enumerable (Firefox < 4, IE < 9, PhantomJS, - * Safari < 5.1). - **/ - nonEnumArgs: boolean; - - /** - * Detect if properties shadowing those on Object.prototype are non-enumerable. - * - * In IE < 9 an objects own properties, shadowing non-enumerable ones, are made - * non-enumerable as well (a.k.a the JScript [[DontEnum]] bug). - **/ - nonEnumShadows: boolean; - - /** - * Detect if own properties are iterated after inherited properties (all but IE < 9). - **/ - ownLast: boolean; - - /** - * Detect if Array#shift and Array#splice augment array-like objects correctly. - * - * Firefox < 10, IE compatibility mode, and IE < 9 have buggy Array shift() and splice() - * functions that fail to remove the last element, value[0], of array-like objects even - * though the length property is set to 0. The shift() method is buggy in IE 8 compatibility - * mode, while splice() is buggy regardless of mode in IE < 9 and buggy in compatibility mode - * in IE 9. - **/ - spliceObjects: boolean; - - /** - * Detect lack of support for accessing string characters by index. - * - * IE < 8 can't access characters by index and IE 8 can only access characters by index on - * string literals. - **/ - unindexedChars: boolean; - } - interface LoDashWrapperBase { } interface LoDashImplicitWrapperBase extends LoDashWrapperBase { } @@ -1296,27 +1213,22 @@ declare module _ { //_.first interface LoDashStatic { - /** - * Gets the first element of array. - * - * @alias _.head - * - * @param array The array to query. - * @return Returns the first element of array. + /** + * @see _.head */ first(array: List): T; } interface LoDashImplicitArrayWrapper { /** - * @see _.first + * @see _.head */ first(): T; } interface LoDashImplicitObjectWrapper { /** - * @see _.first + * @see _.head */ first(): TResult; } @@ -1445,7 +1357,12 @@ declare module _ { //_.head interface LoDashStatic { /** - * @see _.first + * Gets the first element of array. + * + * @alias _.first + * + * @param array The array to query. + * @return Returns the first element of array. */ head(array: List): T; }