Setup eslint and enforce rules
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import {Factory} from "./Factory";
|
||||
import {Instantiable} from "../types";
|
||||
import {Factory} from './Factory'
|
||||
import {Instantiable} from '../types'
|
||||
|
||||
/**
|
||||
* Container factory that produces an instance of the token, however the token
|
||||
* is identified by a string name rather than a class reference.
|
||||
* @extends Factory
|
||||
*/
|
||||
export default class NamedFactory extends Factory {
|
||||
export default class NamedFactory<T> extends Factory<T> {
|
||||
constructor(
|
||||
/**
|
||||
* The name identifying this factory in the container.
|
||||
@@ -18,12 +18,12 @@ export default class NamedFactory extends Factory {
|
||||
* The token to be instantiated.
|
||||
* @type {Instantiable}
|
||||
*/
|
||||
protected token: Instantiable<any>,
|
||||
protected token: Instantiable<T>,
|
||||
) {
|
||||
super(token)
|
||||
}
|
||||
|
||||
match(something: any) {
|
||||
match(something: unknown): boolean {
|
||||
return something === this.name
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user