UNPKG
servertap-js
Version:
latest (0.0.1-dev)
0.0.1
0.0.1-dev
A TypeScript library for working with the ServerTap API
servertap-js
/
src
/
utils.ts
11 lines
•
391 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
export
function
applyMixins
(
derivedCtor
:
any
,
baseCtors
:
any
[]
) { baseCtors.
forEach
(
baseCtor
=>
{
Object
.
getOwnPropertyNames
(baseCtor.
prototype
).
forEach
(
name
=>
{
Object
.
defineProperty
( derivedCtor.
prototype
, name,
Object
.
getOwnPropertyDescriptor
(baseCtor.
prototype
, name) ); }); }); }