I have a class defined like: class Person { @OneToOne() pet: Animal; } Is there a way to get a modified type which looks like this? (Adding ...
I have a class defined like: class Person { @OneToOne() pet: Animal; } Is there a way to get a modified type which looks like this? (Adding ...
I am using angular, trying to pass an object to the web worker for the background process. the class is Because in the web worker thread, I want ...
I want to write a sanitizer decorator which I can put on all user-input string fields. This simply replaces the standard .set(newValue) with .set( san ...
I recently came up with a new pure JS web app running on Node.js (not importing anything about TypeScript), having Next.js@12.0.10 as the framework an ...
In this repo you can clearly see that both of the classes have metadata design:type on the properties. Only one of them though shows when I try to pro ...
import "reflect-metadata" function validate(target: any) { let paramtypes = Reflect.getMetadata("design:paramtypes", target); console.log(paramty ...
I can create custom decorator using reflect-metadata and it work fine. Problem is, that I don`t know how to get all instance decorators. I would l ...
Consider a class decorator with one argument: And the decorator defined as: I expect now to get the @TableName value "Orders". How can I retriev ...
I'm trying to create a custom decorator for tsyringe to inject through properties. My code: Service Calling Class Console Output Current ...
I'm trying to attach a metadata key-value pair to an object key (method in a TS class), but no action is actually being performed on the element. S ...
Given the following entity definition: @Entity() export class User extends BaseEntity { @Column({ nullable: true }) name!: string | null; @C ...
I want to create an abstraction with the help of Typescript decorators and reflect-metadata. But when I invoke the function I pass into the metadata, ...
I am able to get a method's parameter types easily with ReflectAPI: but, when I try to get a function's parameter types it is always returning unde ...
Iam playing around with Typescript decorators and everything is quite good working when I have instanciated a class. With the following code, my Class ...
I am writing an Angular library. An object wraps an Angular component instance, and this object has to subscribe to all subjects marked with Output de ...
I have a relatively simple setup with three classes. I am using inversify for dependency injection. But when injecting the class MessageBroker into th ...
I have a class decorator (fooAnnotation) and method decorator (barDecorator). My need is that barAnnotation must use the value of fooAnnotation, bu ...
I get an error when running docker-compose on the production server. Although I have successfully run it on a local machine, I really find it diff ...
Question I get a circular loader exception. This is may caused by the compiler option "emitDecoratorMetadata":true. How can I fix it? Thanks for help ...
I'm currently implementing a dependency injector to use in a VUE js project. I have created an Inject decorator and I want to be able to access a pr ...