Setup eslint and enforce rules
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-06-02 22:36:25 -05:00
parent 82e7a1f299
commit 1d5056b753
149 changed files with 6104 additions and 3114 deletions

View File

@@ -45,15 +45,15 @@ export class Pipe<T> {
* Return a new Pipe containing the given subject.
* @param subject
*/
static wrap<subject_t>(subject: subject_t) {
return new Pipe<subject_t>(subject)
static wrap<subjectType>(subject: subjectType): Pipe<subjectType> {
return new Pipe<subjectType>(subject)
}
constructor(
/**
* The item being operated on.
*/
private subject: T
private subject: T,
) {}
/**
@@ -68,7 +68,7 @@ export class Pipe<T> {
*
* @param op
*/
tap<T2>(op: PipeOperator<T, T2>) {
tap<T2>(op: PipeOperator<T, T2>): Pipe<T2> {
return new Pipe(op(this.subject))
}
@@ -79,7 +79,7 @@ export class Pipe<T> {
* @param check
* @param op
*/
when(check: boolean, op: ReflexivePipeOperator<T>) {
when(check: boolean, op: ReflexivePipeOperator<T>): Pipe<T> {
if ( check ) {
return Pipe.wrap(op(this.subject))
}
@@ -94,7 +94,7 @@ export class Pipe<T> {
* @param check
* @param op
*/
unless(check: boolean, op: ReflexivePipeOperator<T>) {
unless(check: boolean, op: ReflexivePipeOperator<T>): Pipe<T> {
return this.when(!check, op)
}
@@ -103,7 +103,7 @@ export class Pipe<T> {
* @param check
* @param op
*/
whenNot(check: boolean, op: ReflexivePipeOperator<T>) {
whenNot(check: boolean, op: ReflexivePipeOperator<T>): Pipe<T> {
return this.unless(check, op)
}