mirror of
https://github.com/Terncode/pixel.horse.git
synced 2026-09-25 22:25:53 +02:00
tslint changes
This commit is contained in:
+31
-31
@@ -1,12 +1,12 @@
|
||||
type List<T> = ArrayLike<T>;
|
||||
type PartialDeep<T> = {
|
||||
[P in keyof T]?: PartialDeep<T[P]>;
|
||||
[P in keyof T]?: PartialDeep<T[P]>;
|
||||
};
|
||||
interface Dictionary<T> {
|
||||
[index: string]: T;
|
||||
[index: string]: T;
|
||||
}
|
||||
interface NumericDictionary<T> {
|
||||
[index: number]: T;
|
||||
[index: number]: T;
|
||||
}
|
||||
type NotVoid = {} | null | undefined;
|
||||
type ListIteratee<T> = ListIterator<T, NotVoid> | string | [string, any] | PartialDeep<T>;
|
||||
@@ -16,33 +16,33 @@ type ObjectIterator<TObject, TResult> = (value: TObject[keyof TObject], key: str
|
||||
type Many<T> = T | T[];
|
||||
|
||||
interface FlatMap {
|
||||
<T>(
|
||||
collection: List<Many<T>> | Dictionary<Many<T>> | NumericDictionary<Many<T>> | null | undefined
|
||||
): T[];
|
||||
<T>(
|
||||
collection: List<Many<T>> | Dictionary<Many<T>> | NumericDictionary<Many<T>> | null | undefined
|
||||
): T[];
|
||||
|
||||
(
|
||||
collection: object | null | undefined
|
||||
): any[];
|
||||
(
|
||||
collection: object | null | undefined
|
||||
): any[];
|
||||
|
||||
<T, TResult>(
|
||||
collection: List<T> | null | undefined,
|
||||
iteratee: ListIterator<T, Many<TResult>>
|
||||
): TResult[];
|
||||
<T, TResult>(
|
||||
collection: List<T> | null | undefined,
|
||||
iteratee: ListIterator<T, Many<TResult>>
|
||||
): TResult[];
|
||||
|
||||
<T extends object, TResult>(
|
||||
collection: T | null | undefined,
|
||||
iteratee: ObjectIterator<T, Many<TResult>>
|
||||
): TResult[];
|
||||
<T extends object, TResult>(
|
||||
collection: T | null | undefined,
|
||||
iteratee: ObjectIterator<T, Many<TResult>>
|
||||
): TResult[];
|
||||
|
||||
(
|
||||
collection: object | null | undefined,
|
||||
iteratee: string
|
||||
): any[];
|
||||
(
|
||||
collection: object | null | undefined,
|
||||
iteratee: string
|
||||
): any[];
|
||||
|
||||
(
|
||||
collection: object | null | undefined,
|
||||
iteratee: object
|
||||
): boolean[];
|
||||
(
|
||||
collection: object | null | undefined,
|
||||
iteratee: object
|
||||
): boolean[];
|
||||
}
|
||||
|
||||
type PropertyName = string | number | symbol;
|
||||
@@ -55,8 +55,8 @@ export const escapeRegExp: (string?: string) => string = require('lodash/escapeR
|
||||
export const escape: (string?: string) => string = require('lodash/escape');
|
||||
export const sample = require('lodash/sample');
|
||||
export const findLastIndex:
|
||||
<T>(array: List<T> | null | undefined, predicate?: ListIterateeCustom<T, boolean>, fromIndex?: number) => number =
|
||||
require('lodash/findLastIndex');
|
||||
<T>(array: List<T> | null | undefined, predicate?: ListIterateeCustom<T, boolean>, fromIndex?: number) => number =
|
||||
require('lodash/findLastIndex');
|
||||
export const times: <TResult>(n: number, iteratee: (num: number) => TResult) => TResult[] = require('lodash/times');
|
||||
export const isNumber: (value?: any) => value is number = require('lodash/isNumber');
|
||||
export const isString: (value?: any) => value is string = require('lodash/isString');
|
||||
@@ -65,7 +65,7 @@ export const isFunction: (value?: any) => value is (...args: any[]) => any = req
|
||||
export const clamp: (number: number, lower: number, upper: number) => number = require('lodash/clamp');
|
||||
export const merge: <TObject, TSource>(object: TObject, source: TSource) => TObject & TSource = require('lodash/merge');
|
||||
export const mapValues: <T extends object, TResult>(obj: T | null | undefined, callback: ObjectIterator<T, TResult>) =>
|
||||
{ [P in keyof T]: TResult } = require('lodash/mapValues');
|
||||
{ [P in keyof T]: TResult } = require('lodash/mapValues');
|
||||
export const zip: <T>(...arrays: (List<T> | null | undefined)[]) => (T | undefined)[][] = require('lodash/zip');
|
||||
export const assignWith = require('lodash/assignWith');
|
||||
export const isMatchWith = require('lodash/isMatchWith');
|
||||
@@ -88,10 +88,10 @@ export const uniq: <T>(array: List<T> | null | undefined) => T[] = require('loda
|
||||
export const flatMap: FlatMap = require('lodash/flatMap');
|
||||
export const without: <T>(array: List<T> | null | undefined, ...values: T[]) => T[] = require('lodash/without');
|
||||
export const compact: <T>(array: List<T | null | undefined | false | '' | 0> | null | undefined) => T[] =
|
||||
require('lodash/compact');
|
||||
require('lodash/compact');
|
||||
export const isEqual = require('lodash/isEqual');
|
||||
export const dropRightWhile: <T>(array: List<T> | null | undefined, predicate?: ListIteratee<T>) => T[] =
|
||||
require('lodash/dropRightWhile');
|
||||
require('lodash/dropRightWhile');
|
||||
export const fromPairs = require('lodash/fromPairs');
|
||||
export const camelCase = require('lodash/camelCase');
|
||||
export const truncate = require('lodash/truncate');
|
||||
@@ -99,4 +99,4 @@ export const findIndex = require('lodash/findIndex');
|
||||
export const last = require('lodash/last');
|
||||
export const toPairs: <T>(object?: Dictionary<T> | NumericDictionary<T>) => [string, T][] = require('lodash/toPairs');
|
||||
export const groupBy: <T>(collection: List<T> | null | undefined, iteratee?: ValueIteratee<T>) => Dictionary<T[]> =
|
||||
require('lodash/groupBy');
|
||||
require('lodash/groupBy');
|
||||
|
||||
Reference in New Issue
Block a user