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

@@ -1,11 +1,11 @@
import {DependencyRequirement, PropertyDependency} from "../types";
import { Collection } from "../../util";
import {DependencyKey, DependencyRequirement, PropertyDependency} from '../types'
import { Collection } from '../../util'
/**
* Abstract base class for dependency container factories.
* @abstract
*/
export abstract class AbstractFactory {
export abstract class AbstractFactory<T> {
protected constructor(
/**
* Token that was registered for this factory. In most cases, this is the static
@@ -13,7 +13,7 @@ export abstract class AbstractFactory {
* @var
* @protected
*/
protected token: any
protected token: DependencyKey,
) {}
/**
@@ -21,14 +21,14 @@ export abstract class AbstractFactory {
* @param {Array} dependencies - the resolved dependencies, in order
* @param {Array} parameters - the bound constructor parameters, in order
*/
abstract produce(dependencies: any[], parameters: any[]): any
abstract produce(dependencies: any[], parameters: any[]): T
/**
* Should return true if the given identifier matches the token for this factory.
* @param something
* @return boolean
*/
abstract match(something: any): boolean
abstract match(something: unknown): boolean
/**
* Get the dependency requirements required by this factory's token.