novx
Preparing search index...
core/src
ClassType
Class ClassType
this constraint class adds specific checks for a specific class instances.
Hierarchy (
View Summary
)
Type
<
any
>
ClassType
Index
Constructors
constructor
Properties
base
Type
message?
name?
tests
cache
Methods
check
error
Message
is
Valid
nullable
optional
params4
required
test
to
JSON
to
String
validate
create
get
get
Constraints
get
Types
patch
register
register
Factory
Constructors
constructor
new
ClassType
(
type
:
_Type
<
any
>
,
name
?:
string
)
:
ClassType
Parameters
type
:
_Type
<
any
>
Optional
name
:
string
Returns
ClassType
Properties
base
Type
baseType
:
string
= "string"
Optional
message
message
?:
string
Optional
name
name
?:
string
tests
tests
:
Test
<
any
>
[]
= []
Static
cache
cache
:
{}
= {}
Methods
check
check
(
object
:
any
,
context
:
ValidationContext
)
:
void
Parameters
object
:
any
context
:
ValidationContext
Returns
void
error
Message
errorMessage
(
message
:
string
)
:
Type
<
any
>
Parameters
message
:
string
Returns
Type
<
any
>
is
Valid
isValid
(
object
:
any
)
:
boolean
Parameters
object
:
any
Returns
boolean
nullable
nullable
()
:
Type
<
any
>
Returns
Type
<
any
>
optional
optional
()
:
Type
<
any
>
Returns
Type
<
any
>
params4
params4
(
constraint
:
string
)
:
any
Parameters
constraint
:
string
Returns
any
required
required
()
:
Type
<
any
>
Returns
Type
<
any
>
test
test
(
test
:
Test
<
any
>
)
:
Type
<
any
>
Parameters
test
:
Test
<
any
>
Returns
Type
<
any
>
to
JSON
toJSON
()
:
Record
<
string
,
any
>
Returns
Record
<
string
,
any
>
to
String
toString
()
:
string
Returns
string
validate
validate
(
object
:
any
)
:
void
Parameters
object
:
any
Returns
void
Static
create
create
(
typeName
:
string
,
constraints
?:
Record
<
string
,
any
>
)
:
Type
<
any
>
Parameters
typeName
:
string
Optional
constraints
:
Record
<
string
,
any
>
Returns
Type
<
any
>
Static
get
get
(
type
:
string
)
:
Type
<
any
>
|
undefined
Parameters
type
:
string
Returns
Type
<
any
>
|
undefined
Static
get
Constraints
getConstraints
(
typeName
:
string
)
:
ConstraintMethodDescriptor
[]
Parameters
typeName
:
string
Returns
ConstraintMethodDescriptor
[]
Static
get
Types
getTypes
()
:
string
[]
Returns
string
[]
Static
patch
patch
(
object
:
any
,
property
:
string
,
evaluate
:
()
=>
any
)
:
void
Parameters
object
:
any
property
:
string
evaluate
:
()
=>
any
Returns
void
Static
register
register
(
constraint
:
Type
<
any
>
)
:
typeof
Type
Parameters
constraint
:
Type
<
any
>
Returns
typeof
Type
Static
register
Factory
registerFactory
(
typeName
:
string
,
typeClass
:
new
()
=>
Type
<
any
>
)
:
void
Parameters
typeName
:
string
typeClass
:
new
()
=>
Type
<
any
>
Returns
void
Settings
Member Visibility
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
base
Type
message
name
tests
cache
Methods
check
error
Message
is
Valid
nullable
optional
params4
required
test
to
JSON
to
String
validate
create
get
get
Constraints
get
Types
patch
register
register
Factory
novx
Loading...
this constraint class adds specific checks for a specific class instances.