diff --git a/gulpfile.babel.js b/gulpfile.babel.js
new file mode 100644
index 0000000..430b819
--- /dev/null
+++ b/gulpfile.babel.js
@@ -0,0 +1,22 @@
+import gulp from 'gulp';
+import tsb from 'gulp-tsb';
+import rimraf from 'rimraf';
+import { compilerOptions } from './tsconfig.json';
+
+const compilation = tsb.create(compilerOptions);
+const src = [
+ 'src/**/*.ts',
+ 'typings/**/*.d.ts'
+];
+
+gulp.task('clean', cb => rimraf('out', cb));
+
+gulp.task('compile', ['clean'], () => {
+ return gulp.src(src, { base: 'src' })
+ .pipe(compilation())
+ .pipe(gulp.dest('out'));
+});
+
+gulp.task('watch', ['compile'], () => {
+ return gulp.watch(src, ['compile']);
+});
diff --git a/jsconfig.json b/jsconfig.json
new file mode 100644
index 0000000..563b19e
--- /dev/null
+++ b/jsconfig.json
@@ -0,0 +1,5 @@
+{
+ "compilerOptions": {
+ "target": "ES6"
+ }
+}
\ No newline at end of file
diff --git a/package.json b/package.json
index 5451dcf..44b405e 100644
--- a/package.json
+++ b/package.json
@@ -4,5 +4,15 @@
"description": "VSCode Extension Manager",
"main": "index.js",
"author": "Microsoft Corporation",
- "license": "MIT"
+ "license": "MIT",
+ "dependencies": {
+ "lodash": "^3.10.1",
+ "yazl": "^2.2.2"
+ },
+ "devDependencies": {
+ "babel": "^5.8.23",
+ "gulp": "^3.9.0",
+ "gulp-tsb": "^1.6.0",
+ "rimraf": "^2.4.3"
+ }
}
diff --git a/resources/[Content_Types].xml b/resources/[Content_Types].xml
new file mode 100644
index 0000000..bf9e7ee
--- /dev/null
+++ b/resources/[Content_Types].xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/resources/extension.vsixmanifest.template b/resources/extension.vsixmanifest
similarity index 100%
rename from resources/extension.vsixmanifest.template
rename to resources/extension.vsixmanifest
diff --git a/src/main.ts b/src/main.ts
new file mode 100644
index 0000000..f8ebef5
--- /dev/null
+++ b/src/main.ts
@@ -0,0 +1,25 @@
+import * as fs from 'fs';
+import * as path from 'path';
+import * as _ from 'lodash';
+import * as yazl from 'yazl';
+
+var templatePath = path.join(__dirname, 'resources', 'extension.vsixmanifest');
+var vsixmanifest = fs.readFileSync(templatePath, 'utf8');
+var template = _.template(vsixmanifest);
+var result = template({
+ id: 'uuid',
+ displayName: 'UUID',
+ version: '0.2.0',
+ publisher: 'joaomoreno2',
+ description: 'This is a UUID extension',
+ tags: 'VSCode'
+});
+
+var zip = new yazl.ZipFile();
+zip.addBuffer(new Buffer(result, 'utf8'), 'extension.vsixmanifest');
+zip.addFile(path.join(__dirname, 'resources', '[Content_Types].xml'), '[Content_Types].xml');
+zip.addBuffer(new Buffer('hello world', 'utf8'), 'hello.txt');
+zip.end();
+
+var zipStream = fs.createWriteStream(path.join(__dirname, 'uuid.vsix'));
+zip.outputStream.pipe(zipStream);
diff --git a/tsconfig.json b/tsconfig.json
new file mode 100644
index 0000000..4e24fd5
--- /dev/null
+++ b/tsconfig.json
@@ -0,0 +1,6 @@
+{
+ "compilerOptions": {
+ "target": "ES5",
+ "module": "commonjs"
+ }
+}
\ No newline at end of file
diff --git a/tsd.json b/tsd.json
new file mode 100644
index 0000000..bbe2fe1
--- /dev/null
+++ b/tsd.json
@@ -0,0 +1,15 @@
+{
+ "version": "v4",
+ "repo": "borisyankov/DefinitelyTyped",
+ "ref": "master",
+ "path": "typings",
+ "bundle": "typings/tsd.d.ts",
+ "installed": {
+ "node/node.d.ts": {
+ "commit": "6f6e5c7dd9effe21fee14eb65fe340ecbbc8580a"
+ },
+ "lodash/lodash.d.ts": {
+ "commit": "6f6e5c7dd9effe21fee14eb65fe340ecbbc8580a"
+ }
+ }
+}
diff --git a/typings/lodash/lodash.d.ts b/typings/lodash/lodash.d.ts
new file mode 100644
index 0000000..db24055
--- /dev/null
+++ b/typings/lodash/lodash.d.ts
@@ -0,0 +1,8680 @@
+// 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): LoDashWrapper;
+ (value: string): LoDashStringWrapper;
+ (value: boolean): LoDashWrapper;
+ (value: Array): LoDashNumberArrayWrapper;
+ (value: Array): LoDashArrayWrapper;
+ (value: T): LoDashObjectWrapper;
+ (value: any): LoDashWrapper;
+
+ /**
+ * 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 {
+ /**
+ * Produces the toString result of the wrapped value.
+ * @return Returns the string result.
+ **/
+ toString(): string;
+
+ /**
+ * Executes the chained sequence to extract the unwrapped value.
+ * @return Returns the resolved unwrapped value.
+ **/
+ value(): T;
+
+ /**
+ * @see _.value
+ **/
+ run(): T;
+
+ /**
+ * @see _.value
+ **/
+ toJSON(): T;
+
+ /**
+ * @see _.value
+ **/
+ valueOf(): T;
+
+ /**
+ * @see _.toPlainObject
+ */
+ toPlainObject(): Object;
+ }
+
+ interface LoDashWrapper extends LoDashWrapperBase> { }
+
+ interface LoDashStringWrapper extends LoDashWrapper { }
+
+ interface LoDashObjectWrapper extends LoDashWrapperBase> { }
+
+ interface LoDashArrayWrapper extends LoDashWrapperBase> {
+ concat(...items: Array>): LoDashArrayWrapper;
+ join(seperator?: string): string;
+ pop(): T;
+ push(...items: T[]): LoDashArrayWrapper;
+ reverse(): LoDashArrayWrapper;
+ shift(): T;
+ slice(start: number, end?: number): LoDashArrayWrapper;
+ sort(compareFn?: (a: T, b: T) => number): LoDashArrayWrapper;
+ splice(start: number): LoDashArrayWrapper;
+ splice(start: number, deleteCount: number, ...items: any[]): LoDashArrayWrapper;
+ unshift(...items: T[]): LoDashArrayWrapper;
+ }
+
+ interface LoDashNumberArrayWrapper extends LoDashArrayWrapper { }
+
+ //_.chain
+ interface LoDashStatic {
+ /**
+ * Creates a lodash object that wraps the given value with explicit method chaining enabled.
+ * @param value The value to wrap.
+ * @return The wrapper object.
+ **/
+ chain(value: number): LoDashWrapper;
+ chain(value: string): LoDashWrapper;
+ chain(value: boolean): LoDashWrapper;
+ chain(value: Array): LoDashArrayWrapper;
+ chain(value: T): LoDashObjectWrapper;
+ chain(value: any): LoDashWrapper;
+ }
+
+ interface LoDashWrapperBase {
+ /**
+ * Enables explicit method chaining on the wrapper object.
+ * @see _.chain
+ * @return The wrapper object.
+ **/
+ chain(): TWrapper;
+ }
+
+ //_.tap
+ interface LoDashStatic {
+ /**
+ * Invokes interceptor with the value as the first argument and then returns value. The
+ * purpose of this method is to "tap into" a method chain in order to perform operations on
+ * intermediate results within the chain.
+ * @param value The value to provide to interceptor
+ * @param interceptor The function to invoke.
+ * @return value
+ **/
+ tap(
+ value: T,
+ interceptor: (value: T) => void): T;
+ }
+
+ interface LoDashWrapperBase {
+ /**
+ * @see _.tap
+ **/
+ tap(interceptor: (value: T) => void): TWrapper;
+ }
+
+ /*********
+ * Arrays *
+ **********/
+
+ //_.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: Array, size?: number): T[][];
+
+ /**
+ * @see _.chunk
+ **/
+ chunk(array: List, size?: number): T[][];
+ }
+
+ interface LoDashArrayWrapper {
+ /**
+ * @see _.chunk
+ **/
+ chunk(size?: number): LoDashArrayWrapper;
+ }
+
+ //_.compact
+ interface LoDashStatic {
+ /**
+ * Returns a copy of the array with all falsy values removed. In JavaScript, false, null, 0, "",
+ * undefined and NaN are all falsy.
+ * @param array Array to compact.
+ * @return (Array) Returns a new array of filtered values.
+ **/
+ compact(array?: Array): T[];
+
+ /**
+ * @see _.compact
+ **/
+ compact(array?: List): T[];
+ }
+
+ interface LoDashArrayWrapper {
+ /**
+ * @see _.compact
+ **/
+ compact(): LoDashArrayWrapper;
+ }
+
+ //_.difference
+ interface LoDashStatic {
+ /**
+ * Creates an array excluding all values of the provided arrays using strict equality for comparisons
+ * , i.e. ===.
+ * @param array The array to process
+ * @param others The arrays of values to exclude.
+ * @return Returns a new array of filtered values.
+ **/
+ difference(
+ array?: Array,
+ ...others: Array[]): T[];
+ /**
+ * @see _.difference
+ **/
+ difference(
+ array?: List,
+ ...others: List[]): T[];
+ }
+
+ interface LoDashArrayWrapper {
+ /**
+ * @see _.difference
+ **/
+ difference(
+ ...others: Array[]): LoDashArrayWrapper;
+ /**
+ * @see _.difference
+ **/
+ difference(
+ ...others: List[]): LoDashArrayWrapper;
+ }
+
+ //_.findIndex
+ interface LoDashStatic {
+ /**
+ * This method is like _.find except that it returns the index of the first element that passes
+ * the callback check, instead of the element itself.
+ * @param array The array to search.
+ * @param {(Function|Object|string)} callback The function called per iteration. If a property name or object is provided it will be
+ * used to create a ".pluck" or ".where" style callback, respectively.
+ * @param thisArg The this binding of callback.
+ * @return Returns the index of the found element, else -1.
+ **/
+ findIndex(
+ array: Array,
+ callback: ListIterator,
+ thisArg?: any): number;
+
+ /**
+ * @see _.findIndex
+ **/
+ findIndex(
+ array: List,
+ callback: ListIterator,
+ thisArg?: any): number;
+
+ /**
+ * @see _.findIndex
+ **/
+ findIndex(
+ array: Array,
+ pluckValue: string): number;
+
+ /**
+ * @see _.findIndex
+ **/
+ findIndex(
+ array: List,
+ pluckValue: string): number;
+
+ /**
+ * @see _.findIndex
+ **/
+ findIndex(
+ array: Array,
+ whereDictionary: W): number;
+
+ /**
+ * @see _.findIndex
+ **/
+ findIndex(
+ array: List,
+ whereDictionary: W): number;
+ }
+
+ //_.findLastIndex
+ interface LoDashStatic {
+ /**
+ * This method is like _.findIndex except that it iterates over elements of a collection from right to left.
+ * @param array The array to search.
+ * @param {(Function|Object|string)} callback The function called per iteration. If a property name or object is provided it will be
+ * used to create a ".pluck" or ".where" style callback, respectively.
+ * @param thisArg The this binding of callback.
+ * @return Returns the index of the found element, else -1.
+ **/
+ findLastIndex(
+ array: Array,
+ callback: ListIterator,
+ thisArg?: any): number;
+
+ /**
+ * @see _.findLastIndex
+ **/
+ findLastIndex(
+ array: List,
+ callback: ListIterator,
+ thisArg?: any): number;
+
+ /**
+ * @see _.findLastIndex
+ **/
+ findLastIndex(
+ array: Array,
+ pluckValue: string): number;
+
+ /**
+ * @see _.findLastIndex
+ **/
+ findLastIndex(
+ array: List,
+ pluckValue: string): number;
+
+ /**
+ * @see _.findLastIndex
+ **/
+ findLastIndex(
+ array: Array,
+ whereDictionary: Dictionary): number;
+
+ /**
+ * @see _.findLastIndex
+ **/
+ findLastIndex(
+ array: List,
+ whereDictionary: Dictionary): number;
+ }
+
+ //_.first
+ interface LoDashStatic {
+ /**
+ * Gets the first element or first n elements of an array. If a callback is provided
+ * elements at the beginning of the array are returned as long as the callback returns
+ * truey. The callback is bound to thisArg and invoked with three arguments; (value,
+ * index, array).
+ *
+ * If a property name is provided for callback the created "_.pluck" style callback
+ * will return the property value of the given element.
+ *
+ * If an object is provided for callback the created "_.where" style callback will return ]
+ * true for elements that have the properties of the given object, else false.
+ * @param array Retrieves the first element of this array.
+ * @return Returns the first element of `array`.
+ **/
+ first(array?: Array): T;
+
+ /**
+ * @see _.first
+ **/
+ first(array?: List): T;
+
+ /**
+ * @see _.first
+ * @param n The number of elements to return.
+ **/
+ first(
+ array: Array,
+ n: number): T[];
+
+ /**
+ * @see _.first
+ * @param n The number of elements to return.
+ **/
+ first(
+ array: List,
+ n: number): T[];
+
+ /**
+ * @see _.first
+ * @param callback The function called per element.
+ * @param [thisArg] The this binding of callback.
+ **/
+ first(
+ array: Array,
+ callback: ListIterator,
+ thisArg?: any): T[];
+
+ /**
+ * @see _.first
+ * @param callback The function called per element.
+ * @param [thisArg] The this binding of callback.
+ **/
+ first(
+ array: List,
+ callback: ListIterator,
+ thisArg?: any): T[];
+
+ /**
+ * @see _.first
+ * @param pluckValue "_.pluck" style callback value
+ **/
+ first(
+ array: Array,
+ pluckValue: string): T[];
+
+ /**
+ * @see _.first
+ * @param pluckValue "_.pluck" style callback value
+ **/
+ first(
+ array: List,
+ pluckValue: string): T[];
+
+ /**
+ * @see _.first
+ * @param whereValue "_.where" style callback value
+ **/
+ first(
+ array: Array,
+ whereValue: W): T[];
+
+ /**
+ * @see _.first
+ * @param whereValue "_.where" style callback value
+ **/
+ first(
+ array: List,
+ whereValue: W): T[];
+
+ /**
+ * @see _.first
+ **/
+ head(array: Array): T;
+
+ /**
+ * @see _.first
+ **/
+ head(array: List): T;
+
+ /**
+ * @see _.first
+ **/
+ head(
+ array: Array,
+ n: number): T[];
+
+ /**
+ * @see _.first
+ **/
+ head(
+ array: List,
+ n: number): T[];
+
+ /**
+ * @see _.first
+ **/
+ head(
+ array: Array,
+ callback: ListIterator,
+ thisArg?: any): T[];
+
+ /**
+ * @see _.first
+ **/
+ head(
+ array: List,
+ callback: ListIterator,
+ thisArg?: any): T[];
+
+ /**
+ * @see _.first
+ **/
+ head(
+ array: Array,
+ pluckValue: string): T[];
+
+ /**
+ * @see _.first
+ **/
+ head(
+ array: List,
+ pluckValue: string): T[];
+
+ /**
+ * @see _.first
+ **/
+ head(
+ array: Array,
+ whereValue: W): T[];
+
+ /**
+ * @see _.first
+ **/
+ head(
+ array: List,
+ whereValue: W): T[];
+
+ /**
+ * @see _.first
+ **/
+ take(array: Array): T[];
+
+ /**
+ * @see _.first
+ **/
+ take(array: List): T[];
+
+ /**
+ * @see _.first
+ **/
+ take(
+ array: Array,
+ n: number): T[];
+
+ /**
+ * @see _.first
+ **/
+ take(
+ array: List,
+ n: number): T[];
+
+ /**
+ * Takes the first items from an array or list based on a predicate
+ * @param array The array or list of items on which the result set will be based
+ * @param predicate A predicate function to determine whether a value will be taken. Optional; defaults to identity.
+ * @param [thisArg] The this binding of predicate.
+ */
+ takeWhile(
+ array: (Array|List),
+ predicate?: ListIterator,
+ thisArg?: any
+ ): T[];
+
+ /**
+ * Takes the first items from an array or list based on a predicate
+ * @param array The array or list of items on which the result set will be based
+ * @param pluckValue Uses a _.property style callback to return the property value of the given element
+ */
+ takeWhile(
+ array: (Array|List),
+ pluckValue: string
+ ): any[];
+
+ /**
+ * Takes the first items from an array or list based on a predicate
+ * @param array The array or list of items on which the result set will be based
+ * @param whereValue Uses a _.matches style callback to return the first elements that match the given value
+ */
+ takeWhile(
+ array: (Array|List),
+ whereValue: W
+ ): T[];
+ }
+
+ interface LoDashArrayWrapper {
+ /**
+ * @see _.first
+ **/
+ first(): T;
+
+ /**
+ * @see _.first
+ * @param n The number of elements to return.
+ **/
+ first(n: number): LoDashArrayWrapper;
+
+ /**
+ * @see _.first
+ * @param callback The function called per element.
+ * @param [thisArg] The this binding of callback.
+ **/
+ first(
+ callback: ListIterator,
+ thisArg?: any): LoDashArrayWrapper;
+
+ /**
+ * @see _.first
+ * @param pluckValue "_.pluck" style callback value
+ **/
+ first(pluckValue: string): LoDashArrayWrapper;
+
+ /**
+ * @see _.first
+ * @param whereValue "_.where" style callback value
+ **/
+ first(whereValue: W): LoDashArrayWrapper;
+
+ /**
+ * @see _.first
+ **/
+ head(): T;
+
+ /**
+ * @see _.first
+ * @param n The number of elements to return.
+ **/
+ head(n: number): LoDashArrayWrapper;
+
+ /**
+ * @see _.first
+ * @param callback The function called per element.
+ * @param [thisArg] The this binding of callback.
+ **/
+ head(
+ callback: ListIterator,
+ thisArg?: any): LoDashArrayWrapper;
+
+ /**
+ * @see _.first
+ * @param pluckValue "_.pluck" style callback value
+ **/
+ head(pluckValue: string): LoDashArrayWrapper;
+
+ /**
+ * @see _.first
+ * @param whereValue "_.where" style callback value
+ **/
+ head(whereValue: W): LoDashArrayWrapper;
+
+ /**
+ * @see _.first
+ **/
+ take(): LoDashArrayWrapper;
+
+ /**
+ * @see _.first
+ * @param n The number of elements to return.
+ **/
+ take(n: number): LoDashArrayWrapper;
+
+ /**
+ * Takes the first items based on a predicate
+ * @param predicate The function called per element.
+ * @param [thisArg] The this binding of callback.
+ **/
+ takeWhile(
+ predicate: ListIterator,
+ thisArg?: any): LoDashArrayWrapper;
+
+ /**
+ * Takes the first items based on a predicate
+ * @param pluckValue Uses a _.property style callback to return the property value of the given element
+ **/
+ takeWhile(
+ pluckValue: string): LoDashArrayWrapper;
+
+ /**
+ * Takes the first items based on a predicate
+ * @param whereValue Uses a _.matches style callback to return the first elements that match the given value
+ **/
+ takeWhile(
+ whereValue: W): LoDashArrayWrapper;
+
+ }
+
+ interface MaybeNestedList extends List> { }
+ interface RecursiveList extends List> { }
+
+ //_.flatten
+ interface LoDashStatic {
+ /**
+ * Flattens a nested array a single level.
+ *
+ * _.flatten(x) is equivalent to _.flatten(x, false);
+ *
+ * @param array The array to flatten.
+ * @return `array` flattened.
+ **/
+ flatten(array: MaybeNestedList): T[];
+
+ /**
+ * Flattens a nested array. If isDeep is true the array is recursively flattened, otherwise it is only
+ * flattened a single level.
+ *
+ * If you know whether or not this should be recursively at compile time, you typically want to use a
+ * version without a boolean parameter (i.e. `_.flatten(x)` or `_.flattenDeep(x)`).
+ *
+ * @param array The array to flatten.
+ * @param deep Specify a deep flatten.
+ * @return `array` flattened.
+ **/
+ flatten(array: RecursiveList, isDeep: boolean): List | RecursiveList;
+
+ /**
+ * Recursively flattens a nested array.
+ *
+ * _.flattenDeep(x) is equivalent to _.flatten(x, true);
+ *
+ * @param array The array to flatten
+ * @return `array` recursively flattened
+ */
+ flattenDeep(array: RecursiveList): List
+ }
+
+ interface LoDashArrayWrapper {
+ /**
+ * @see _.flatten
+ **/
+ flatten(): LoDashArrayWrapper;
+
+ /**
+ * @see _.flatten
+ **/
+ flatten(isShallow: boolean): LoDashArrayWrapper;
+
+ /**
+ * @see _.flattenDeep
+ */
+ flattenDeep(): LoDashArrayWrapper;
+ }
+
+ //_.indexOf
+ interface LoDashStatic {
+ /**
+ * Gets the index at which the first occurrence of value is found using strict equality
+ * for comparisons, i.e. ===. If the array is already sorted providing true for fromIndex
+ * will run a faster binary search.
+ * @param array The array to search.
+ * @param value The value to search for.
+ * @param fromIndex The index to search from.
+ * @return The index of `value` within `array`.
+ **/
+ indexOf(
+ array: Array,
+ value: T): number;
+
+ /**
+ * @see _.indexOf
+ **/
+ indexOf(
+ array: List,
+ value: T): number;
+
+ /**
+ * @see _.indexOf
+ * @param fromIndex The index to search from
+ **/
+ indexOf(
+ array: Array,
+ value: T,
+ fromIndex: number): number;
+
+ /**
+ * @see _.indexOf
+ * @param fromIndex The index to search from
+ **/
+ indexOf(
+ array: List,
+ value: T,
+ fromIndex: number): number;
+
+ /**
+ * @see _.indexOf
+ * @param isSorted True to perform a binary search on a sorted array.
+ **/
+ indexOf(
+ array: Array,
+ value: T,
+ isSorted: boolean): number;
+
+ /**
+ * @see _.indexOf
+ * @param isSorted True to perform a binary search on a sorted array.
+ **/
+ indexOf(
+ array: List,
+ value: T,
+ isSorted: boolean): number;
+ }
+
+ //_.initial
+ interface LoDashStatic {
+ /**
+ * Gets all but the last element or last n elements of an array. If a callback is provided
+ * elements at the end of the array are excluded from the result as long as the callback
+ * returns truey. The callback is bound to thisArg and invoked with three arguments;
+ * (value, index, array).
+ *
+ * If a property name is provided for callback the created "_.pluck" style callback will
+ * return the property value of the given element.
+ *
+ * If an object is provided for callback the created "_.where" style callback will return
+ * true for elements that have the properties of the given object, else false.
+ * @param array The array to query.
+ * @param n Leaves this many elements behind, optional.
+ * @return Returns everything but the last `n` elements of `array`.
+ **/
+ initial(
+ array: Array): T[];
+
+ /**
+ * @see _.initial
+ **/
+ initial(
+ array: List): T[];
+
+ /**
+ * @see _.initial
+ * @param n The number of elements to exclude.
+ **/
+ initial(
+ array: Array,
+ n: number): T[];
+
+ /**
+ * @see _.initial
+ * @param n The number of elements to exclude.
+ **/
+ initial(
+ array: List,
+ n: number): T[];
+
+ /**
+ * @see _.initial
+ * @param callback The function called per element
+ **/
+ initial(
+ array: Array,
+ callback: ListIterator): T[];
+
+ /**
+ * @see _.initial
+ * @param callback The function called per element
+ **/
+ initial(
+ array: List,
+ callback: ListIterator): T[];
+
+ /**
+ * @see _.initial
+ * @param pluckValue _.pluck style callback
+ **/
+ initial(
+ array: Array,
+ pluckValue: string): T[];
+
+ /**
+ * @see _.initial
+ * @param pluckValue _.pluck style callback
+ **/
+ initial(
+ array: List,
+ pluckValue: string): T[];
+
+ /**
+ * @see _.initial
+ * @param whereValue _.where style callback
+ **/
+ initial(
+ array: Array,
+ whereValue: W): T[];
+
+ /**
+ * @see _.initial
+ * @param whereValue _.where style callback
+ **/
+ initial(
+ array: List,
+ whereValue: W): T[];
+ }
+
+ //_.intersection
+ interface LoDashStatic {
+ /**
+ * Creates an array of unique values present in all provided arrays using strict
+ * equality for comparisons, i.e. ===.
+ * @param arrays The arrays to inspect.
+ * @return Returns an array of composite values.
+ **/
+ intersection(...arrays: Array[]): T[];
+
+ /**
+ * @see _.intersection
+ **/
+ intersection(...arrays: List[]): T[];
+ }
+
+ //_.last
+ interface LoDashStatic {
+ /**
+ * Gets the last element of an array.
+ * @param array The array to query.
+ * @return Returns the last element of array.
+ **/
+ last(array: Array): T;
+ }
+
+ interface LoDashArrayWrapper {
+ /**
+ * @see _.last
+ **/
+ last(): T;
+ }
+
+ //_.lastIndexOf
+ interface LoDashStatic {
+ /**
+ * Gets the index at which the last occurrence of value is found using strict equality
+ * for comparisons, i.e. ===. If fromIndex is negative, it is used as the offset from the
+ * end of the collection.
+ * @param array The array to search.
+ * @param value The value to search for.
+ * @param fromIndex The index to search from.
+ * @return The index of the matched value or -1.
+ **/
+ lastIndexOf(
+ array: Array,
+ value: T,
+ fromIndex?: number): number;
+
+ /**
+ * @see _.lastIndexOf
+ **/
+ lastIndexOf(
+ array: List,
+ value: T,
+ fromIndex?: number): number;
+ }
+
+ //_.pull
+ interface LoDashStatic {
+ /**
+ * Removes all provided values from the given array using strict equality for comparisons,
+ * i.e. ===.
+ * @param array The array to modify.
+ * @param values The values to remove.
+ * @return array.
+ **/
+ pull(
+ array: Array,
+ ...values: T[]): T[];
+
+ /**
+ * @see _.pull
+ **/
+ pull(
+ array: List,
+ ...values: T[]): T[];
+ }
+
+ interface LoDashStatic {
+ /**
+ * Removes all provided values from the given array using strict equality for comparisons,
+ * i.e. ===.
+ * @param array The array to modify.
+ * @param values The values to remove.
+ * @return array.
+ **/
+ pullAt(
+ array: Array,
+ ...values: any[]): any[];
+
+ /**
+ * @see _.pull
+ **/
+ pullAt(
+ array: List,
+ ...values: any[]): any[];
+ }
+
+ //_.remove
+ interface LoDashStatic {
+ /**
+ * Removes all elements from an array that the callback returns truey for and returns
+ * an array of removed elements. The callback is bound to thisArg and invoked with three
+ * arguments; (value, index, array).
+ *
+ * If a property name is provided for callback the created "_.pluck" style callback will
+ * return the property value of the given element.
+ *
+ * If an object is provided for callback the created "_.where" style callback will return
+ * true for elements that have the properties of the given object, else false.
+ * @param array The array to modify.
+ * @param callback The function called per iteration.
+ * @param thisArg The this binding of callback.
+ * @return A new array of removed elements.
+ **/
+ remove(
+ array: Array,
+ callback?: ListIterator,
+ thisArg?: any): T[];
+
+ /**
+ * @see _.remove
+ **/
+ remove(
+ array: List