diff --git a/src/index.html b/src/index.html
index 4c788c3..0cf89c8 100644
--- a/src/index.html
+++ b/src/index.html
@@ -5,9 +5,6 @@
-
-
-
diff --git a/src/index.ts b/src/index.ts
index af15a20..0132c78 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -28,10 +28,10 @@ module tagIt {
});
function chromeUrlTranslator(relativeUrl : string) {
- if(chrome && chrome.extension) {
- return chrome.extension.getURL(relativeUrl);
- } else {
+ if(typeof chrome === 'undefined' ) {
return relativeUrl;
+ } else {
+ return chrome.extension.getURL(relativeUrl);
}
}
}
diff --git a/src/load-menu-for-web-testing.js b/src/load-menu-for-web-testing.js
index 2ce73fc..6d66116 100644
--- a/src/load-menu-for-web-testing.js
+++ b/src/load-menu-for-web-testing.js
@@ -15,31 +15,16 @@ document.addEventListener("DOMContentLoaded", function(event) {
function injectScripts () {
- // Save a copy of existing angular js and jquery
- // Source: http://www.mattburkedev.com/multiple-angular-versions-on-the-same-page/
- var existingWindowDotAngular = window['angular'];
- // create a new window.angular and a closure variable for
- // angular.js to load itself into
- var angular = (window.angular = {});
-
console.log('loading dependencies');
loadScript('vendor/vendor.js', loadPluginCode);
function loadPluginCode () {
console.log('loading tagit');
loadScript('bundle.js', function () {
- tagIt.init(restoreOldAngularAndJquery);
+ tagIt.init(function () {console.log('tagIt init!')});
});
}
- function restoreOldAngularAndJquery () {
- // restore old angular
- if (existingWindowDotAngular) {
- window.angular = existingWindowDotAngular; // restore the old angular version
- }
- $.noConflict();
- }
-
function loadScript (relativeScriptPath, callback) {
var s = document.createElement('script');
s.src = relativeScriptPath;
diff --git a/src/services/webpage.service.ts b/src/services/webpage.service.ts
index b7ccee3..a847c7a 100644
--- a/src/services/webpage.service.ts
+++ b/src/services/webpage.service.ts
@@ -8,7 +8,6 @@ module tagIt {
declare var rangy: any;
declare var uuid: any;
- declare var _: any;
export class WebPageService {
@@ -106,15 +105,15 @@ module tagIt {
readdTagsToPage(tagsToLoad: ISenseTag[]) {
this.$log.debug('readdTagsToPage()');
-
+
//first deselect before we go to work
window.getSelection().removeAllRanges();
-
+
//deserialize ranges
_.map(tagsToLoad, deserializeRange);
this.$log.debug('finished deserializing tags');
-
+
//sort tags by ascending so that they can be properly inserted
tagsToLoad = _.sortBy(tagsToLoad, (tag: ISenseTag) => {
return tag.deserializedRange.startOffset;
@@ -148,7 +147,7 @@ module tagIt {
}
}
}
-
+
private updateSavedSelection() {
if (this.savedSelection) {
rangy.removeMarkers(this.savedSelection);
diff --git a/tsd.json b/tsd.json
index 211fbc2..2e530de 100644
--- a/tsd.json
+++ b/tsd.json
@@ -25,6 +25,9 @@
},
"chrome/chrome.d.ts": {
"commit": "3191f6e0088eee07c4d8fd24e4d27a40a60d9eb9"
+ },
+ "lodash/lodash.d.ts": {
+ "commit": "e5a27ea95e47b95333784f1f0d590127b4e39a89"
}
}
}
diff --git a/typings/lodash/lodash.d.ts b/typings/lodash/lodash.d.ts
new file mode 100644
index 0000000..ed8d724
--- /dev/null
+++ b/typings/lodash/lodash.d.ts
@@ -0,0 +1,13535 @@
+// Type definitions for Lo-Dash
+// Project: http://lodash.com/
+// Definitions by: Brian Zengel , Ilya Mochalov
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+declare var _: _.LoDashStatic;
+
+declare module _ {
+ interface LoDashStatic {
+ /**
+ * Creates a lodash object which wraps the given value to enable intuitive method chaining.
+ *
+ * In addition to Lo-Dash methods, wrappers also have the following Array methods:
+ * concat, join, pop, push, reverse, shift, slice, sort, splice, and unshift
+ *
+ * Chaining is supported in custom builds as long as the value method is implicitly or
+ * explicitly included in the build.
+ *
+ * The chainable wrapper functions are:
+ * after, assign, bind, bindAll, bindKey, chain, chunk, compact, compose, concat, countBy,
+ * createCallback, curry, debounce, defaults, defer, delay, difference, filter, flatten,
+ * forEach, forEachRight, forIn, forInRight, forOwn, forOwnRight, functions, groupBy,
+ * indexBy, initial, intersection, invert, invoke, keys, map, max, memoize, merge, min,
+ * object, omit, once, pairs, partial, partialRight, pick, pluck, pull, push, range, reject,
+ * remove, rest, reverse, sample, shuffle, slice, sort, sortBy, splice, tap, throttle, times,
+ * toArray, transform, union, uniq, unshift, unzip, values, where, without, wrap, and zip
+ *
+ * The non-chainable wrapper functions are:
+ * clone, cloneDeep, contains, escape, every, find, findIndex, findKey, findLast,
+ * findLastIndex, findLastKey, has, identity, indexOf, isArguments, isArray, isBoolean,
+ * isDate, isElement, isEmpty, isEqual, isFinite, isFunction, isNaN, isNull, isNumber,
+ * isObject, isPlainObject, isRegExp, isString, isUndefined, join, lastIndexOf, mixin,
+ * noConflict, parseInt, pop, random, reduce, reduceRight, result, shift, size, some,
+ * sortedIndex, runInContext, template, unescape, uniqueId, and value
+ *
+ * The wrapper functions first and last return wrapped values when n is provided, otherwise
+ * they return unwrapped values.
+ *
+ * Explicit chaining can be enabled by using the _.chain method.
+ **/
+ (value: number): LoDashImplicitWrapper;
+ (value: string): LoDashImplicitStringWrapper;
+ (value: boolean): LoDashImplicitWrapper;
+ (value: Array): LoDashImplicitNumberArrayWrapper;
+ (value: Array): LoDashImplicitArrayWrapper;
+ (value: T): LoDashImplicitObjectWrapper;
+ (value: any): LoDashImplicitWrapper;
+
+ /**
+ * The semantic version number.
+ **/
+ VERSION: string;
+
+ /**
+ * An object used to flag environments features.
+ **/
+ support: Support;
+
+ /**
+ * By default, the template delimiters used by Lo-Dash are similar to those in embedded Ruby
+ * (ERB). Change the following template settings to use alternative delimiters.
+ **/
+ templateSettings: TemplateSettings;
+ }
+
+ /**
+ * By default, the template delimiters used by Lo-Dash are similar to those in embedded Ruby
+ * (ERB). Change the following template settings to use alternative delimiters.
+ **/
+ interface TemplateSettings {
+ /**
+ * The "escape" delimiter.
+ **/
+ escape?: RegExp;
+
+ /**
+ * The "evaluate" delimiter.
+ **/
+ evaluate?: RegExp;
+
+ /**
+ * An object to import into the template as local variables.
+ **/
+ imports?: Dictionary;
+
+ /**
+ * The "interpolate" delimiter.
+ **/
+ interpolate?: RegExp;
+
+ /**
+ * Used to reference the data object in the template text.
+ **/
+ variable?: string;
+ }
+
+ /**
+ * Creates a cache object to store key/value pairs.
+ */
+ interface MapCache {
+ /**
+ * Removes `key` and its value from the cache.
+ * @param key The key of the value to remove.
+ * @return Returns `true` if the entry was removed successfully, else `false`.
+ */
+ delete(key: string): boolean;
+
+ /**
+ * Gets the cached value for `key`.
+ * @param key The key of the value to get.
+ * @return Returns the cached value.
+ */
+ get(key: string): any;
+
+ /**
+ * Checks if a cached value for `key` exists.
+ * @param key The key of the entry to check.
+ * @return Returns `true` if an entry for `key` exists, else `false`.
+ */
+ has(key: string): boolean;
+
+ /**
+ * Sets `value` to `key` of the cache.
+ * @param key The key of the value to cache.
+ * @param value The value to cache.
+ * @return Returns the cache object.
+ */
+ 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 { }
+
+ interface LoDashExplicitWrapperBase extends LoDashWrapperBase { }
+
+ interface LoDashImplicitWrapper extends LoDashImplicitWrapperBase> { }
+
+ interface LoDashExplicitWrapper extends LoDashExplicitWrapperBase> { }
+
+ interface LoDashImplicitStringWrapper extends LoDashImplicitWrapper { }
+
+ interface LoDashExplicitStringWrapper extends LoDashExplicitWrapper { }
+
+ interface LoDashImplicitObjectWrapper extends LoDashImplicitWrapperBase> { }
+
+ interface LoDashExplicitObjectWrapper extends LoDashExplicitWrapperBase> { }
+
+ interface LoDashImplicitArrayWrapper extends LoDashImplicitWrapperBase> {
+ join(seperator?: string): string;
+ pop(): T;
+ push(...items: T[]): LoDashImplicitArrayWrapper;
+ shift(): T;
+ sort(compareFn?: (a: T, b: T) => number): LoDashImplicitArrayWrapper;
+ splice(start: number): LoDashImplicitArrayWrapper;
+ splice(start: number, deleteCount: number, ...items: any[]): LoDashImplicitArrayWrapper;
+ unshift(...items: T[]): LoDashImplicitArrayWrapper;
+ }
+
+ interface LoDashExplicitArrayWrapper extends LoDashExplicitWrapperBase> { }
+
+ interface LoDashImplicitNumberArrayWrapper extends LoDashImplicitArrayWrapper { }
+
+ interface LoDashExplicitNumberArrayWrapper extends LoDashExplicitArrayWrapper { }
+
+ /*********
+ * Array *
+ *********/
+
+ //_.chunk
+ interface LoDashStatic {
+ /**
+ * Creates an array of elements split into groups the length of size. If collection can’t be split evenly, the
+ * final chunk will be the remaining elements.
+ *
+ * @param array The array to process.
+ * @param size The length of each chunk.
+ * @return Returns the new array containing chunks.
+ */
+ chunk(
+ array: List,
+ size?: number
+ ): T[][];
+ }
+
+ interface LoDashImplicitArrayWrapper {
+ /**
+ * @see _.chunk
+ */
+ chunk(size?: number): LoDashImplicitArrayWrapper;
+ }
+
+ interface LoDashImplicitObjectWrapper {
+ /**
+ * @see _.chunk
+ */
+ chunk(size?: number): LoDashImplicitArrayWrapper;
+ }
+
+ interface LoDashExplicitArrayWrapper {
+ /**
+ * @see _.chunk
+ */
+ chunk(size?: number): LoDashExplicitArrayWrapper;
+ }
+
+ interface LoDashExplicitObjectWrapper {
+ /**
+ * @see _.chunk
+ */
+ chunk(size?: number): LoDashExplicitArrayWrapper;
+ }
+
+ //_.compact
+ interface LoDashStatic {
+ /**
+ * Creates an array with all falsey values removed. The values false, null, 0, "", undefined, and NaN are
+ * falsey.
+ *
+ * @param array The array to compact.
+ * @return (Array) Returns the new array of filtered values.
+ */
+ compact(array?: List): T[];
+ }
+
+ interface LoDashImplicitArrayWrapper {
+ /**
+ * @see _.compact
+ */
+ compact(): LoDashImplicitArrayWrapper;
+ }
+
+ interface LoDashImplicitObjectWrapper {
+ /**
+ * @see _.compact
+ */
+ compact(): LoDashImplicitArrayWrapper;
+ }
+
+ interface LoDashExplicitArrayWrapper {
+ /**
+ * @see _.compact
+ */
+ compact(): LoDashExplicitArrayWrapper;
+ }
+
+ interface LoDashExplicitObjectWrapper {
+ /**
+ * @see _.compact
+ */
+ compact(): LoDashExplicitArrayWrapper;
+ }
+
+ //_.difference
+ interface LoDashStatic {
+ /**
+ * Creates an array of unique array values not included in the other provided arrays using SameValueZero for
+ * equality comparisons.
+ *
+ * @param array The array to inspect.
+ * @param values The arrays of values to exclude.
+ * @return Returns the new array of filtered values.
+ */
+ difference(
+ array: T[]|List,
+ ...values: (T[]|List)[]
+ ): T[];
+ }
+
+ interface LoDashImplicitArrayWrapper {
+ /**
+ * @see _.difference
+ */
+ difference(...values: (T[]|List)[]): LoDashImplicitArrayWrapper;
+ }
+
+ interface LoDashImplicitObjectWrapper {
+ /**
+ * @see _.difference
+ */
+ difference(...values: (TValue[]|List)[]): LoDashImplicitArrayWrapper;
+ }
+
+ interface LoDashExplicitArrayWrapper {
+ /**
+ * @see _.difference
+ */
+ difference(...values: (T[]|List)[]): LoDashExplicitArrayWrapper;
+ }
+
+ interface LoDashExplicitObjectWrapper {
+ /**
+ * @see _.difference
+ */
+ difference(...values: (TValue[]|List)[]): LoDashExplicitArrayWrapper;
+ }
+
+ //_.drop
+ interface LoDashStatic {
+ /**
+ * Creates a slice of array with n elements dropped from the beginning.
+ *
+ * @param array The array to query.
+ * @param n The number of elements to drop.
+ * @return Returns the slice of array.
+ */
+ drop(array: T[]|List, n?: number): T[];
+ }
+
+ interface LoDashImplicitArrayWrapper {
+ /**
+ * @see _.drop
+ */
+ drop(n?: number): LoDashImplicitArrayWrapper;
+ }
+
+ interface LoDashImplicitObjectWrapper {
+ /**
+ * @see _.drop
+ */
+ drop(n?: number): LoDashImplicitArrayWrapper;
+ }
+
+ interface LoDashExplicitArrayWrapper {
+ /**
+ * @see _.drop
+ */
+ drop(n?: number): LoDashExplicitArrayWrapper;
+ }
+
+ interface LoDashExplicitObjectWrapper {
+ /**
+ * @see _.drop
+ */
+ drop(n?: number): LoDashExplicitArrayWrapper;
+ }
+
+ //_.dropRight
+ interface LoDashStatic {
+ /**
+ * Creates a slice of array with n elements dropped from the end.
+ *
+ * @param array The array to query.
+ * @param n The number of elements to drop.
+ * @return Returns the slice of array.
+ */
+ dropRight(
+ array: List,
+ n?: number
+ ): T[];
+ }
+
+ interface LoDashImplicitArrayWrapper {
+ /**
+ * @see _.dropRight
+ */
+ dropRight(n?: number): LoDashImplicitArrayWrapper;
+ }
+
+ interface LoDashImplicitObjectWrapper {
+ /**
+ * @see _.dropRight
+ */
+ dropRight(n?: number): LoDashImplicitArrayWrapper;
+ }
+
+ interface LoDashExplicitArrayWrapper {
+ /**
+ * @see _.dropRight
+ */
+ dropRight(n?: number): LoDashExplicitArrayWrapper;
+ }
+
+ interface LoDashExplicitObjectWrapper {
+ /**
+ * @see _.dropRight
+ */
+ dropRight(n?: number): LoDashExplicitArrayWrapper;
+ }
+
+ //_.dropRightWhile
+ interface LoDashStatic {
+ /**
+ * Creates a slice of array excluding elements dropped from the end. Elements are dropped until predicate
+ * returns falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array).
+ *
+ * If a property name is provided for predicate the created _.property style callback returns the property
+ * value of the given element.
+ *
+ * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
+ * elements that have a matching property value, else false.
+ *
+ * If an object is provided for predicate the created _.matches style callback returns true for elements that
+ * match the properties of the given object, else false.
+ *
+ * @param array The array to query.
+ * @param predicate The function invoked per iteration.
+ * @param thisArg The this binding of predicate.
+ * @return Returns the slice of array.
+ */
+ dropRightWhile(
+ array: List,
+ predicate?: ListIterator,
+ thisArg?: any
+ ): TValue[];
+
+ /**
+ * @see _.dropRightWhile
+ */
+ dropRightWhile(
+ array: List,
+ predicate?: string,
+ thisArg?: any
+ ): TValue[];
+
+ /**
+ * @see _.dropRightWhile
+ */
+ dropRightWhile(
+ array: List,
+ predicate?: TWhere
+ ): TValue[];
+ }
+
+ interface LoDashImplicitArrayWrapper {
+ /**
+ * @see _.dropRightWhile
+ */
+ dropRightWhile(
+ predicate?: ListIterator,
+ thisArg?: any
+ ): LoDashImplicitArrayWrapper;
+
+ /**
+ * @see _.dropRightWhile
+ */
+ dropRightWhile(
+ predicate?: string,
+ thisArg?: any
+ ): LoDashImplicitArrayWrapper;
+
+ /**
+ * @see _.dropRightWhile
+ */
+ dropRightWhile(
+ predicate?: TWhere
+ ): LoDashImplicitArrayWrapper;
+ }
+
+ interface LoDashImplicitObjectWrapper {
+ /**
+ * @see _.dropRightWhile
+ */
+ dropRightWhile(
+ predicate?: ListIterator,
+ thisArg?: any
+ ): LoDashImplicitArrayWrapper;
+
+ /**
+ * @see _.dropRightWhile
+ */
+ dropRightWhile(
+ predicate?: string,
+ thisArg?: any
+ ): LoDashImplicitArrayWrapper;
+
+ /**
+ * @see _.dropRightWhile
+ */
+ dropRightWhile(
+ predicate?: TWhere
+ ): LoDashImplicitArrayWrapper;
+ }
+
+ interface LoDashExplicitArrayWrapper {
+ /**
+ * @see _.dropRightWhile
+ */
+ dropRightWhile(
+ predicate?: ListIterator,
+ thisArg?: any
+ ): LoDashExplicitArrayWrapper;
+
+ /**
+ * @see _.dropRightWhile
+ */
+ dropRightWhile(
+ predicate?: string,
+ thisArg?: any
+ ): LoDashExplicitArrayWrapper;
+
+ /**
+ * @see _.dropRightWhile
+ */
+ dropRightWhile(
+ predicate?: TWhere
+ ): LoDashExplicitArrayWrapper;
+ }
+
+ interface LoDashExplicitObjectWrapper {
+ /**
+ * @see _.dropRightWhile
+ */
+ dropRightWhile(
+ predicate?: ListIterator,
+ thisArg?: any
+ ): LoDashExplicitArrayWrapper;
+
+ /**
+ * @see _.dropRightWhile
+ */
+ dropRightWhile(
+ predicate?: string,
+ thisArg?: any
+ ): LoDashExplicitArrayWrapper;
+
+ /**
+ * @see _.dropRightWhile
+ */
+ dropRightWhile(
+ predicate?: TWhere
+ ): LoDashExplicitArrayWrapper;
+ }
+
+ //_.dropWhile
+ interface LoDashStatic {
+ /**
+ * Creates a slice of array excluding elements dropped from the beginning. Elements are dropped until predicate
+ * returns falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array).
+ *
+ * If a property name is provided for predicate the created _.property style callback returns the property
+ * value of the given element.
+ *
+ * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
+ * elements that have a matching property value, else false.
+ *
+ * If an object is provided for predicate the created _.matches style callback returns true for elements that
+ * have the properties of the given object, else false.
+ *
+ * @param array The array to query.
+ * @param predicate The function invoked per iteration.
+ * @param thisArg The this binding of predicate.
+ * @return Returns the slice of array.
+ */
+ dropWhile(
+ array: List,
+ predicate?: ListIterator,
+ thisArg?: any
+ ): TValue[];
+
+ /**
+ * @see _.dropWhile
+ */
+ dropWhile(
+ array: List,
+ predicate?: string,
+ thisArg?: any
+ ): TValue[];
+
+ /**
+ * @see _.dropWhile
+ */
+ dropWhile(
+ array: List,
+ predicate?: TWhere
+ ): TValue[];
+ }
+
+ interface LoDashImplicitArrayWrapper {
+ /**
+ * @see _.dropWhile
+ */
+ dropWhile(
+ predicate?: ListIterator,
+ thisArg?: any
+ ): LoDashImplicitArrayWrapper;
+
+ /**
+ * @see _.dropWhile
+ */
+ dropWhile(
+ predicate?: string,
+ thisArg?: any
+ ): LoDashImplicitArrayWrapper;
+
+ /**
+ * @see _.dropWhile
+ */
+ dropWhile(
+ predicate?: TWhere
+ ): LoDashImplicitArrayWrapper;
+ }
+
+ interface LoDashImplicitObjectWrapper {
+ /**
+ * @see _.dropWhile
+ */
+ dropWhile(
+ predicate?: ListIterator,
+ thisArg?: any
+ ): LoDashImplicitArrayWrapper;
+
+ /**
+ * @see _.dropWhile
+ */
+ dropWhile(
+ predicate?: string,
+ thisArg?: any
+ ): LoDashImplicitArrayWrapper;
+
+ /**
+ * @see _.dropWhile
+ */
+ dropWhile(
+ predicate?: TWhere
+ ): LoDashImplicitArrayWrapper;
+ }
+
+ interface LoDashExplicitArrayWrapper {
+ /**
+ * @see _.dropWhile
+ */
+ dropWhile(
+ predicate?: ListIterator,
+ thisArg?: any
+ ): LoDashExplicitArrayWrapper;
+
+ /**
+ * @see _.dropWhile
+ */
+ dropWhile(
+ predicate?: string,
+ thisArg?: any
+ ): LoDashExplicitArrayWrapper;
+
+ /**
+ * @see _.dropWhile
+ */
+ dropWhile(
+ predicate?: TWhere
+ ): LoDashExplicitArrayWrapper;
+ }
+
+ interface LoDashExplicitObjectWrapper {
+ /**
+ * @see _.dropWhile
+ */
+ dropWhile(
+ predicate?: ListIterator,
+ thisArg?: any
+ ): LoDashExplicitArrayWrapper;
+
+ /**
+ * @see _.dropWhile
+ */
+ dropWhile(
+ predicate?: string,
+ thisArg?: any
+ ): LoDashExplicitArrayWrapper;
+
+ /**
+ * @see _.dropWhile
+ */
+ dropWhile(
+ predicate?: TWhere
+ ): LoDashExplicitArrayWrapper;
+ }
+
+ //_.fill
+ interface LoDashStatic {
+ /**
+ * Fills elements of array with value from start up to, but not including, end.
+ *
+ * Note: This method mutates array.
+ *
+ * @param array The array to fill.
+ * @param value The value to fill array with.
+ * @param start The start position.
+ * @param end The end position.
+ * @return Returns array.
+ */
+ fill(
+ array: any[],
+ value: T,
+ start?: number,
+ end?: number
+ ): T[];
+
+ /**
+ * @see _.fill
+ */
+ fill(
+ array: List,
+ value: T,
+ start?: number,
+ end?: number
+ ): List;
+ }
+
+ interface LoDashImplicitArrayWrapper {
+ /**
+ * @see _.fill
+ */
+ fill(
+ value: T,
+ start?: number,
+ end?: number
+ ): LoDashImplicitArrayWrapper;
+ }
+
+ interface LoDashImplicitObjectWrapper {
+ /**
+ * @see _.fill
+ */
+ fill(
+ value: T,
+ start?: number,
+ end?: number
+ ): LoDashImplicitObjectWrapper>;
+ }
+
+ interface LoDashExplicitArrayWrapper {
+ /**
+ * @see _.fill
+ */
+ fill(
+ value: T,
+ start?: number,
+ end?: number
+ ): LoDashExplicitArrayWrapper;
+ }
+
+ interface LoDashExplicitObjectWrapper {
+ /**
+ * @see _.fill
+ */
+ fill(
+ value: T,
+ start?: number,
+ end?: number
+ ): LoDashExplicitObjectWrapper>;
+ }
+
+ //_.findIndex
+ interface LoDashStatic {
+ /**
+ * This method is like _.find except that it returns the index of the first element predicate returns truthy
+ * for instead of the element itself.
+ *
+ * If a property name is provided for predicate the created _.property style callback returns the property
+ * value of the given element.
+ *
+ * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
+ * elements that have a matching property value, else false.
+ *
+ * If an object is provided for predicate the created _.matches style callback returns true for elements that
+ * have the properties of the given object, else false.
+ *
+ * @param array The array to search.
+ * @param predicate The function invoked per iteration.
+ * @param thisArg The this binding of predicate.
+ * @return Returns the index of the found element, else -1.
+ */
+ findIndex(
+ array: List,
+ predicate?: ListIterator,
+ thisArg?: any
+ ): number;
+
+ /**
+ * @see _.findIndex
+ */
+ findIndex(
+ array: List,
+ predicate?: string,
+ thisArg?: any
+ ): number;
+
+ /**
+ * @see _.findIndex
+ */
+ findIndex(
+ array: List,
+ predicate?: W
+ ): number;
+ }
+
+ interface LoDashImplicitArrayWrapper {
+ /**
+ * @see _.findIndex
+ */
+ findIndex(
+ predicate?: ListIterator,
+ thisArg?: any
+ ): number;
+
+ /**
+ * @see _.findIndex
+ */
+ findIndex(
+ predicate?: string,
+ thisArg?: any
+ ): number;
+
+ /**
+ * @see _.findIndex
+ */
+ findIndex(
+ predicate?: W
+ ): number;
+ }
+
+ interface LoDashImplicitObjectWrapper {
+ /**
+ * @see _.findIndex
+ */
+ findIndex(
+ predicate?: ListIterator,
+ thisArg?: any
+ ): number;
+
+ /**
+ * @see _.findIndex
+ */
+ findIndex(
+ predicate?: string,
+ thisArg?: any
+ ): number;
+
+ /**
+ * @see _.findIndex
+ */
+ findIndex(
+ predicate?: W
+ ): number;
+ }
+
+ interface LoDashExplicitArrayWrapper {
+ /**
+ * @see _.findIndex
+ */
+ findIndex(
+ predicate?: ListIterator,
+ thisArg?: any
+ ): LoDashExplicitWrapper;
+
+ /**
+ * @see _.findIndex
+ */
+ findIndex(
+ predicate?: string,
+ thisArg?: any
+ ): LoDashExplicitWrapper;
+
+ /**
+ * @see _.findIndex
+ */
+ findIndex(
+ predicate?: W
+ ): LoDashExplicitWrapper;
+ }
+
+ interface LoDashExplicitObjectWrapper {
+ /**
+ * @see _.findIndex
+ */
+ findIndex(
+ predicate?: ListIterator,
+ thisArg?: any
+ ): LoDashExplicitWrapper;
+
+ /**
+ * @see _.findIndex
+ */
+ findIndex(
+ predicate?: string,
+ thisArg?: any
+ ): LoDashExplicitWrapper;
+
+ /**
+ * @see _.findIndex
+ */
+ findIndex(
+ predicate?: W
+ ): LoDashExplicitWrapper;
+ }
+
+ //_.findLastIndex
+ interface LoDashStatic {
+ /**
+ * This method is like _.findIndex except that it iterates over elements of collection from right to left.
+ *
+ * If a property name is provided for predicate the created _.property style callback returns the property
+ * value of the given element.
+ *
+ * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
+ * elements that have a matching property value, else false.
+ *
+ * If an object is provided for predicate the created _.matches style callback returns true for elements that
+ * have the properties of the given object, else false.
+ *
+ * @param array The array to search.
+ * @param predicate The function invoked per iteration.
+ * @param thisArg The function invoked per iteration.
+ * @return Returns the index of the found element, else -1.
+ */
+ findLastIndex(
+ array: List,
+ predicate?: ListIterator,
+ thisArg?: any
+ ): number;
+
+ /**
+ * @see _.findLastIndex
+ */
+ findLastIndex(
+ array: List,
+ predicate?: string,
+ thisArg?: any
+ ): number;
+
+ /**
+ * @see _.findLastIndex
+ */
+ findLastIndex(
+ array: List,
+ predicate?: W
+ ): number;
+ }
+
+ interface LoDashImplicitArrayWrapper {
+ /**
+ * @see _.findLastIndex
+ */
+ findLastIndex(
+ predicate?: ListIterator,
+ thisArg?: any
+ ): number;
+
+ /**
+ * @see _.findLastIndex
+ */
+ findLastIndex(
+ predicate?: string,
+ thisArg?: any
+ ): number;
+
+ /**
+ * @see _.findLastIndex
+ */
+ findLastIndex(
+ predicate?: W
+ ): number;
+ }
+
+ interface LoDashImplicitObjectWrapper {
+ /**
+ * @see _.findLastIndex
+ */
+ findLastIndex(
+ predicate?: ListIterator,
+ thisArg?: any
+ ): number;
+
+ /**
+ * @see _.findLastIndex
+ */
+ findLastIndex(
+ predicate?: string,
+ thisArg?: any
+ ): number;
+
+ /**
+ * @see _.findLastIndex
+ */
+ findLastIndex(
+ predicate?: W
+ ): number;
+ }
+
+ interface LoDashExplicitArrayWrapper {
+ /**
+ * @see _.findLastIndex
+ */
+ findLastIndex(
+ predicate?: ListIterator,
+ thisArg?: any
+ ): LoDashExplicitWrapper;
+
+ /**
+ * @see _.findLastIndex
+ */
+ findLastIndex(
+ predicate?: string,
+ thisArg?: any
+ ): LoDashExplicitWrapper;
+
+ /**
+ * @see _.findLastIndex
+ */
+ findLastIndex(
+ predicate?: W
+ ): LoDashExplicitWrapper;
+ }
+
+ interface LoDashExplicitObjectWrapper {
+ /**
+ * @see _.findLastIndex
+ */
+ findLastIndex(
+ predicate?: ListIterator,
+ thisArg?: any
+ ): LoDashExplicitWrapper;
+
+ /**
+ * @see _.findLastIndex
+ */
+ findLastIndex(
+ predicate?: string,
+ thisArg?: any
+ ): LoDashExplicitWrapper;
+
+ /**
+ * @see _.findLastIndex
+ */
+ findLastIndex(
+ predicate?: W
+ ): LoDashExplicitWrapper;
+ }
+
+ //_.first
+ interface LoDashStatic {
+ /**
+ * Gets the first element of array.
+ *
+ * @alias _.head
+ *
+ * @param array The array to query.
+ * @return Returns the first element of array.
+ */
+ first(array: List): T;
+ }
+
+ interface LoDashImplicitArrayWrapper {
+ /**
+ * @see _.first
+ */
+ first(): T;
+ }
+
+ interface LoDashImplicitObjectWrapper {
+ /**
+ * @see _.first
+ */
+ first(): TResult;
+ }
+
+ interface MaybeNestedList extends List> { }
+ interface RecursiveArray extends Array> { }
+ interface ListOfRecursiveArraysOrValues extends List