object-shape-tester - v5.1.6
Preparing search index...
ShapeToRuntimeType
Type Alias ShapeToRuntimeType<Shape, IsExact, IsReadonly>
ShapeToRuntimeType
:
Shape
extends
AnyFunction
?
Shape
:
Shape
extends
CustomSpecifier
<
infer
T
>
?
T
:
Shape
extends
object
?
Shape
extends
ShapeDefinition
<
infer
InnerShape
,
any
>
?
ShapeToRuntimeType
<
InnerShape
,
IsExact
,
IsReadonly
>
:
Shape
extends
ShapeSpecifier
<
any
,
any
>
?
Shape
extends
ShapeSpecifier
<
any
,
Exact
>
?
SpecifierToRuntimeType
<
Shape
,
true
,
IsReadonly
>
:
SpecifierToRuntimeType
<
Shape
,
IsExact
,
IsReadonly
>
:
Shape
extends
any
[]
?
OptionallyReadonly
<
IsReadonly
,
{
[
Prop
in
keyof
Shape
]
:
Shape
[
Prop
]
extends
ShapeSpecifier
<
any
,
Exact
,
>
?
ShapeToRuntimeType
<
(...)
[
(...)
]
,
true
,
IsReadonly
>
:
ShapeToRuntimeType
<
(...)
[
(...)
]
,
IsExact
,
IsReadonly
>
}
,
>
:
OptionallyReadonly
<
IsReadonly
,
Simplify
<
{
[
Prop
in
keyof
(...)
as
(...)
extends
(...)
?
(...)
:
(...)
]
:
(
...
)
extends
(...)
?
(...)
:
(...)
}
&
{
[
Prop
in
keyof
(...)
as
(...)
extends
(...)
?
(...)
:
(...)
]
?:
(
...
)
extends
(...)
?
(...)
:
(...)
}
,
>
,
>
:
IsEqual
<
IsExact
,
true
>
extends
true
?
Shape
:
IsNever
<
LiteralToPrimitive
<
Shape
>
>
extends
true
?
Shape
:
LiteralToPrimitive
<
Shape
>
Converts a shape definition to a runtime type.
Type Parameters
Shape
IsExact
extends
boolean
IsReadonly
extends
boolean
Settings
Member Visibility
Protected
Inherited
Theme
OS
Light
Dark
object-shape-tester - v5.1.6
Loading...
Converts a shape definition to a runtime type.