Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
T
typed-reflector
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
3rdeye
typed-reflector
Commits
86c42fd0
Commit
86c42fd0
authored
Dec 04, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
72acb9bc
Pipeline
#7366
passed with stages
in 44 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
package.json
package.json
+2
-1
src/utility/utility.ts
src/utility/utility.ts
+3
-3
No files found.
package.json
View file @
86c42fd0
...
...
@@ -6,7 +6,8 @@
"typings"
:
"dist/index.d.ts"
,
"scripts"
:
{
"lint"
:
"eslint --fix ."
,
"build"
:
"tsc"
"build"
:
"tsc"
,
"test"
:
"jest"
},
"repository"
:
{
"type"
:
"git"
,
...
...
src/utility/utility.ts
View file @
86c42fd0
...
...
@@ -2,10 +2,10 @@ export function isClass(target: any) {
if
(
typeof
target
!==
'
function
'
)
{
return
false
;
}
const
proto
=
target
.
prototype
;
return
proto
!==
Function
&&
proto
!==
Object
;
const
proto
=
target
.
constructor
;
return
proto
===
Function
;
}
export
function
getClass
(
target
:
any
):
Function
{
return
isClass
(
target
)
?
target
:
target
.
constructor
;
return
isClass
(
target
)
?
target
:
getClass
(
target
.
constructor
)
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment