Interface: IBaseObjectConstructor<T>
A BaseObject subclass creating objects of type T: the type of the classes given to the container (getObject(TheClass), @Inject(TheClass)).
Extends
BaseObjectConstructor
Type Parameters
T
T = any
Constructors
Constructor
new IBaseObjectConstructor(...
args):T
Parameters
args
...any[]
Returns
T
Inherited from
BaseObjectConstructor.constructor
Constructor
new IBaseObjectConstructor(
cradleProxy):BaseObject
Called by the container only: an object is created through a container (see the class description), never with new.
Parameters
cradleProxy
Record<string | symbol, any>
The container's resolution proxy.
Returns
Inherited from
BaseObjectConstructor.constructor
Properties
prototype
prototype:
BaseObject
Inherited from
BaseObjectConstructor.prototype
Accessors
className
Get Signature
get className():
string
The name of the class.
Returns
string
Inherited from
BaseObjectConstructor.className
Methods
acceptsOption()
acceptsOption(
name,value):boolean
Whether the class accepts an option which is not one of its @Configurable properties (an option it reads with getConfigurableRecords()): the modules check the options of the objects they declare and warn of the options the classes do not accept. Override it in the classes reading options without configurable properties.
Parameters
name
string
The option name.
value
unknown
The option value.
Returns
boolean
true when the option is accepted; false by default.
Inherited from
BaseObjectConstructor.acceptsOption
assign()
Call Signature
assign<
T,U>(target,source):T&U
Copy the values of all of the enumerable own properties from one or more source objects to a target object. Returns the target object.
Type Parameters
T
T extends object
U
U
Parameters
target
T
The target object to copy to.
source
U
The source object from which to copy properties.
Returns
T & U
Inherited from
BaseObjectConstructor.assign
Call Signature
assign<
T,U,V>(target,source1,source2):T&U&V
Copy the values of all of the enumerable own properties from one or more source objects to a target object. Returns the target object.
Type Parameters
T
T extends object
U
U
V
V
Parameters
target
T
The target object to copy to.
source1
U
The first source object from which to copy properties.
source2
V
The second source object from which to copy properties.
Returns
T & U & V
Inherited from
BaseObjectConstructor.assign
Call Signature
assign<
T,U,V,W>(target,source1,source2,source3):T&U&V&W
Copy the values of all of the enumerable own properties from one or more source objects to a target object. Returns the target object.
Type Parameters
T
T extends object
U
U
V
V
W
W
Parameters
target
T
The target object to copy to.
source1
U
The first source object from which to copy properties.
source2
V
The second source object from which to copy properties.
source3
W
The third source object from which to copy properties.
Returns
T & U & V & W
Inherited from
BaseObjectConstructor.assign
Call Signature
assign(
target, ...sources):any
Copy the values of all of the enumerable own properties from one or more source objects to a target object. Returns the target object.
Parameters
target
object
The target object to copy to.
sources
...any[]
One or more source objects from which to copy properties
Returns
any
Inherited from
BaseObjectConstructor.assign
create()
Call Signature
create(
o):any
Creates an object that has the specified prototype or that has null prototype.
Parameters
o
object | null
Object to use as a prototype. May be null.
Returns
any
Inherited from
BaseObjectConstructor.create
Call Signature
create(
o,properties):any
Creates an object that has the specified prototype, and that optionally contains specified properties.
Parameters
o
object | null
Object to use as a prototype. May be null
properties
PropertyDescriptorMap & ThisType<any>
JavaScript object that contains one or more property descriptors.
Returns
any
Inherited from
BaseObjectConstructor.create
defineProperties()
defineProperties<
T>(o,properties):T
Adds one or more properties to an object, and/or modifies attributes of existing properties.
Type Parameters
T
T
Parameters
o
T
Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object.
properties
PropertyDescriptorMap & ThisType<any>
JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property.
Returns
T
Inherited from
BaseObjectConstructor.defineProperties
defineProperty()
defineProperty<
T>(o,p,attributes):T
Adds a property to an object, or modifies attributes of an existing property.
Type Parameters
T
T
Parameters
o
T
Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object.
p
PropertyKey
The property name.
attributes
PropertyDescriptor & ThisType<any>
Descriptor for the property. It can be for a data property or an accessor property.
Returns
T
Inherited from
BaseObjectConstructor.defineProperty
entries()
Call Signature
entries<
T>(o): [string,T][]
Returns an array of key/values of the enumerable own properties of an object
Type Parameters
T
T
Parameters
o
{[s: string]: T; } | ArrayLike<T>
Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
Returns
[string, T][]
Inherited from
BaseObjectConstructor.entries
Call Signature
entries(
o): [string,any][]
Returns an array of key/values of the enumerable own properties of an object
Parameters
o
{ }
Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
Returns
[string, any][]
Inherited from
BaseObjectConstructor.entries
freeze()
Call Signature
freeze<
T>(f):T
Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
Type Parameters
T
T extends Function
Parameters
f
T
Object on which to lock the attributes.
Returns
T
Inherited from
BaseObjectConstructor.freeze
Call Signature
freeze<
T,U>(o):Readonly<T>
Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
Type Parameters
T
T extends object
U
U extends string | number | bigint | boolean | symbol
Parameters
o
T
Object on which to lock the attributes.
Returns
Readonly<T>
Inherited from
BaseObjectConstructor.freeze
Call Signature
freeze<
T>(o):Readonly<T>
Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
Type Parameters
T
T
Parameters
o
T
Object on which to lock the attributes.
Returns
Readonly<T>
Inherited from
BaseObjectConstructor.freeze
fromEntries()
Call Signature
fromEntries<
T>(entries):object
Returns an object created by key-value entries for properties and methods
Type Parameters
T
T = any
Parameters
entries
Iterable<readonly [PropertyKey, T]>
An iterable object that contains key-value entries for properties and methods.
Returns
object
Inherited from
BaseObjectConstructor.fromEntries
Call Signature
fromEntries(
entries):any
Returns an object created by key-value entries for properties and methods
Parameters
entries
Iterable<readonly any[]>
An iterable object that contains key-value entries for properties and methods.
Returns
any
Inherited from
BaseObjectConstructor.fromEntries
getOwnPropertyDescriptor()
getOwnPropertyDescriptor(
o,p):PropertyDescriptor|undefined
Gets the own property descriptor of the specified object. An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.
Parameters
o
any
Object that contains the property.
p
PropertyKey
Name of the property.
Returns
PropertyDescriptor | undefined
Inherited from
BaseObjectConstructor.getOwnPropertyDescriptor
getOwnPropertyDescriptors()
getOwnPropertyDescriptors<
T>(o): { [P in string | number | symbol]: TypedPropertyDescriptor<T[P]> } &object
Returns an object containing all own property descriptors of an object
Type Parameters
T
T
Parameters
o
T
Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
Returns
{ [P in string | number | symbol]: TypedPropertyDescriptor<T[P]> } & object
Inherited from
BaseObjectConstructor.getOwnPropertyDescriptors
getOwnPropertyNames()
getOwnPropertyNames(
o):string[]
Returns the names of the own properties of an object. The own properties of an object are those that are defined directly on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions.
Parameters
o
any
Object that contains the own properties.
Returns
string[]
Inherited from
BaseObjectConstructor.getOwnPropertyNames
getOwnPropertySymbols()
getOwnPropertySymbols(
o):symbol[]
Returns an array of all symbol properties found directly on object o.
Parameters
o
any
Object to retrieve the symbols from.
Returns
symbol[]
Inherited from
BaseObjectConstructor.getOwnPropertySymbols
getPrototypeOf()
getPrototypeOf(
o):any
Returns the prototype of an object.
Parameters
o
any
The object that references the prototype.
Returns
any
Inherited from
BaseObjectConstructor.getPrototypeOf
hasOwn()
hasOwn(
o,v):boolean
Determines whether an object has a property with the specified name.
Parameters
o
object
An object.
v
PropertyKey
A property name.
Returns
boolean
Inherited from
BaseObjectConstructor.hasOwn
is()
is(
value1,value2):boolean
Returns true if the values are the same value, false otherwise.
Parameters
value1
any
The first value.
value2
any
The second value.
Returns
boolean
Inherited from
BaseObjectConstructor.is
isExtensible()
isExtensible(
o):boolean
Returns a value that indicates whether new properties can be added to an object.
Parameters
o
any
Object to test.
Returns
boolean
Inherited from
BaseObjectConstructor.isExtensible
isFrozen()
isFrozen(
o):boolean
Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object.
Parameters
o
any
Object to test.
Returns
boolean
Inherited from
BaseObjectConstructor.isFrozen
isSealed()
isSealed(
o):boolean
Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.
Parameters
o
any
Object to test.
Returns
boolean
Inherited from
BaseObjectConstructor.isSealed
keys()
Call Signature
keys(
o):string[]
Returns the names of the enumerable string properties and methods of an object.
Parameters
o
object
Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
Returns
string[]
Inherited from
BaseObjectConstructor.keys
Call Signature
keys(
o):string[]
Returns the names of the enumerable string properties and methods of an object.
Parameters
o
{ }
Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
Returns
string[]
Inherited from
BaseObjectConstructor.keys
preventExtensions()
preventExtensions<
T>(o):T
Prevents the addition of new properties to an object.
Type Parameters
T
T
Parameters
o
T
Object to make non-extensible.
Returns
T
Inherited from
BaseObjectConstructor.preventExtensions
seal()
seal<
T>(o):T
Prevents the modification of attributes of existing properties, and prevents the addition of new properties.
Type Parameters
T
T
Parameters
o
T
Object on which to lock the attributes.
Returns
T
Inherited from
BaseObjectConstructor.seal
setPrototypeOf()
setPrototypeOf(
o,proto):any
Sets the prototype of a specified object o to object proto or null. Returns the object o.
Parameters
o
any
The object to change its prototype.
proto
object | null
The value of the new prototype or null.
Returns
any
Inherited from
BaseObjectConstructor.setPrototypeOf
values()
Call Signature
values<
T>(o):T[]
Returns an array of values of the enumerable own properties of an object
Type Parameters
T
T
Parameters
o
{[s: string]: T; } | ArrayLike<T>
Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
Returns
T[]
Inherited from
BaseObjectConstructor.values
Call Signature
values(
o):any[]
Returns an array of values of the enumerable own properties of an object
Parameters
o
{ }
Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
Returns
any[]
Inherited from
BaseObjectConstructor.values