ts-fortress
Preparing search index...
record/record
record
Function record
record
<
const
S
extends
UnknownShape
,
const
EP
extends
ExcessPropertyOption
=
"allow"
,
>
(
shape
:
S
,
options
?:
Partial
<
Readonly
<
{
excessProperty
:
EP
;
typeName
:
string
}
>
>
,
)
:
Readonly
<
{
assertIs
:
(
a
:
unknown
,
)
=>
asserts
a
is
RecordTypeFromShapeImplSub
<
S
,
OptionalTypeKeys
<
S
>
>
;
cast
:
(
a
:
unknown
)
=>
RecordTypeFromShapeImplSub
;
defaultValue
:
RecordTypeFromShapeImplSub
;
fill
:
(
a
:
unknown
)
=>
RecordTypeFromShapeImplSub
;
is
:
(
a
:
unknown
,
)
=>
a
is
RecordTypeFromShapeImplSub
<
S
,
OptionalTypeKeys
<
S
>
>
;
prune
:
<
B
extends
|
Readonly
<
{
[
key
in
string
|
number
|
symbol
]
:
TypeOf
<
S
[
key
]
>
}
>
|
MergeIntersection
<
Readonly
<
{
[
key
in
string
|
number
|
symbol
]
?:
TypeOf
<
(...)
[
(...)
]
>
}
,
>
,
>
|
MergeIntersection
<
Readonly
<
{
[
key
in
string
|
number
|
symbol
]
?:
TypeOf
<
(...)
>
}
&
{
[
key
in
string
|
number
|
symbol
]
:
TypeOf
<
(...)
[
(...)
]
>
}
,
>
,
>
,
>
(
a
:
B
,
)
=>
RecordTypeFromShapeImplSub
;
typeName
:
string
;
validate
:
(
a
:
unknown
,
)
=>
Result
<
RecordTypeFromShapeImplSub
<
S
,
OptionalTypeKeys
<
S
>
>
,
readonly
Readonly
<
{
actualValue
:
unknown
;
details
?:
ValidationErrorDetails
;
expectedType
:
string
;
path
:
readonly
string
[]
;
typeName
:
string
;
}
,
>
[]
,
>
;
}
,
>
&
Readonly
<
{
shape
:
S
}
>
Type Parameters
const
S
extends
UnknownShape
const
EP
extends
ExcessPropertyOption
=
"allow"
Parameters
shape
:
S
Optional
options
:
Partial
<
Readonly
<
{
excessProperty
:
EP
;
typeName
:
string
}
>
>
Returns
Readonly
<
{
assertIs
:
(
a
:
unknown
,
)
=>
asserts
a
is
RecordTypeFromShapeImplSub
<
S
,
OptionalTypeKeys
<
S
>
>
;
cast
:
(
a
:
unknown
)
=>
RecordTypeFromShapeImplSub
;
defaultValue
:
RecordTypeFromShapeImplSub
;
fill
:
(
a
:
unknown
)
=>
RecordTypeFromShapeImplSub
;
is
:
(
a
:
unknown
,
)
=>
a
is
RecordTypeFromShapeImplSub
<
S
,
OptionalTypeKeys
<
S
>
>
;
prune
:
<
B
extends
|
Readonly
<
{
[
key
in
string
|
number
|
symbol
]
:
TypeOf
<
S
[
key
]
>
}
>
|
MergeIntersection
<
Readonly
<
{
[
key
in
string
|
number
|
symbol
]
?:
TypeOf
<
(...)
[
(...)
]
>
}
,
>
,
>
|
MergeIntersection
<
Readonly
<
{
[
key
in
string
|
number
|
symbol
]
?:
TypeOf
<
(...)
>
}
&
{
[
key
in
string
|
number
|
symbol
]
:
TypeOf
<
(...)
[
(...)
]
>
}
,
>
,
>
,
>
(
a
:
B
,
)
=>
RecordTypeFromShapeImplSub
;
typeName
:
string
;
validate
:
(
a
:
unknown
,
)
=>
Result
<
RecordTypeFromShapeImplSub
<
S
,
OptionalTypeKeys
<
S
>
>
,
readonly
Readonly
<
{
actualValue
:
unknown
;
details
?:
ValidationErrorDetails
;
expectedType
:
string
;
path
:
readonly
string
[]
;
typeName
:
string
;
}
,
>
[]
,
>
;
}
,
>
&
Readonly
<
{
shape
:
S
}
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
ts-fortress
Loading...