Documentation
Preparing search index...
object/base
hasProperty
Function hasProperty
hasProperty
<
T
extends
object
,
K
extends
string
|
number
|
symbol
>
(
obj
:
T
,
name
:
K
|
string
&
{}
|
(
K
|
string
&
{}
)
[]
,
strict
?:
boolean
,
)
:
boolean
判断对象中是否包含某些字段
Type Parameters
T
extends
object
K
extends
string
|
number
|
symbol
Parameters
obj
:
T
name
:
K
|
string
&
{}
|
(
K
|
string
&
{}
)
[]
strict
:
boolean
= true
严格模式,包含的字段必须全部存在,默认 true
Returns
boolean
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
Documentation
Loading...
判断对象中是否包含某些字段