
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@typemon/reflection
Advanced tools
$ npm install @typemon/reflection reflect-metadata
3.5 or later is required.{
"emitDecoratorMetadata": true,
"experimentalDecorators": true
}
import 'reflect-metadata';
Reflection.hasOwnMetadata(metadataKey, target, propertyKey?): boolean;
Reflection.hasNotOwnMetadata(metadataKey, target, propertyKey?): boolean;
Reflection.hasMetadata(metadataKey, target, propertyKey?): boolean;
Reflection.hasMetadata(metadataKey, target, propertyKey?): boolean;
Reflection.getOwnMetadata(metadataKey, target, propertyKey?): any;
Reflection.getMetadata(metadataKey, target, propertyKey?): any;
Reflection.setMetadata(metadataKey, metadataValue, target, propertyKey?): void;
Reflection.deleteMetadata(metadataKey, target, propertyKey?): void;
Reflection.decorate(decorators, {
target,
propertyKey?,
parameterIndex?
}): void;
Reflection.DefineMetadata(metadataKey, metadataValue): ClassDecorator & PropertyDecorator & MethodDecorator;
Metadata.of({
target,
propertyKey?,
parameterIndex?
}): Metadata;
Metadata.hasOwn(metadataKey, {
target,
propertyKey?,
parameterIndex?
}): boolean;
Metadata.hasNotOwn(metadataKey, {
target,
propertyKey?,
parameterIndex?
}): boolean;
Metadata.has(metadataKey, {
target,
propertyKey?,
parameterIndex?
}): boolean;
Metadata.hasNot(metadataKey, {
target,
propertyKey?,
parameterIndex?
}): boolean;
Metadata.getOwn(metadataKey, {
target,
propertyKey?,
parameterIndex?
}): any;
Metadata.get(metadataKey, {
target,
propertyKey?,
parameterIndex?
}): any;
Metadata.set(metadataKey, metadataValue, {
target,
propertyKey?,
parameterIndex?
}): void;
Metadata.delete(metadataKey, {
target,
propertyKey?,
parameterIndex?
}): void;
You can easily set metadata using the Metadata.Define decorator.
@Metadata.Define(metadataKey, metadataValue)
class Target {
@Metadata.Define(metadataKey, metadataValue)
public static staticProperty: unknown;
@Metadata.Define(metadataKey, metadataValue)
public static staticMethod(
@Metadata.Define(metadataKey, metadataValue)
staticMethodParameter: unknown
): void { }
@Metadata.Define(metadataKey, metadataValue)
public instanceProperty: unknown;
public constructor(
@Metadata.Define(metadataKey, metadataValue)
constructorParameter: unknown
) { }
@Metadata.Define(metadataKey, metadataValue)
public instanceMethod(
@Metadata.Define(metadataKey, metadataValue)
instanceMethodParameter: unknown
): void { }
}
You can create and use custom decorators as needed.
function CustomDecorator(): Metadata.Decorator {
return Metadata.Decorator.create((metadata: Metadata): void => {
. . .
});
}
FAQs
Reflection for TypeScript
The npm package @typemon/reflection receives a total of 0 weekly downloads. As such, @typemon/reflection popularity was classified as not popular.
We found that @typemon/reflection demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.