UNPKG
@boost/decorators
Version:
latest (5.0.0)
next (5.0.0-alpha.2)
5.0.0
5.0.0-alpha.2
5.0.0-alpha.1
4.0.0
4.0.0-alpha.1
3.0.0
2.1.4
2.1.3
2.1.2
2.1.1
2.1.0
2.0.0
Experimental decorators for common patterns.
github.com/milesj/boost
milesj/boost
@boost/decorators
/
src
/
helpers
/
isMethod.ts
14 lines
(13 loc)
•
298 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
export
function
isMethod
(
target
:
Function
|
Object
,
property
?:
string
|
symbol
,
descriptor
?:
unknown
,
):
boolean
{
return
Boolean
( property && descriptor &&
typeof
descriptor ===
'object'
&& !(
'initializer'
in
descriptor) && (
'value'
in
descriptor ||
'get'
in
descriptor), ); }