How to use the @tsed/core.descriptorOf function in @tsed/core

To help you get started, we’ve selected a few @tsed/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TypedProject / ts-express-decorators / test / units / swagger / decorators / returns.spec.ts View on Github external
before(() => {
      Returns({
        description: "Success",
        type: Test
      })(Test, "test4", descriptorOf(Test, "test4"));
      this.store = Store.fromMethod(Test, "test4");
    });
    it("should set the responses", () => {
github TypedProject / ts-express-decorators / test / units / swagger / decorators / produces.spec.ts View on Github external
before(() => {
      Produces("text/html")(Test, "test", descriptorOf(Test, "test"));
      this.store = Store.from(Test, "test", descriptorOf(Test, "test"));
    });
    it("should set the produces", () => {
github TypedProject / ts-express-decorators / test / units / core / decorators / enumerable.spec.ts View on Github external
it("should set attribut as not enumerable", () => {
    NotEnumerable()(Test, "test");
    expect(descriptorOf(Test, "test").enumerable).to.eq(false);
  });
});
github TypedProject / ts-express-decorators / test / units / mvc / decorators / method / authenticated.spec.ts View on Github external
it("should create middleware", () => {
    UseBefore.should.be.calledWithExactly(AuthenticatedMiddleware);
    middleware.should.be.calledWithExactly(Test, "test", descriptorOf(Test, "test"));
  });
});
github TypedProject / ts-express-decorators / test / units / core / decorators / configurable.spec.ts View on Github external
it("should set attribut as not configurable", () => {
    NotConfigurable()(Test, "test");
    expect(descriptorOf(Test, "test").configurable).to.eq(false);
  });
});
github TypedProject / ts-express-decorators / test / units / swagger / decorators / consumes.spec.ts View on Github external
before(() => {
      Consumes("text/html")(Test.prototype, "test", descriptorOf(Test, "test"));
      this.store = Store.from(Test.prototype, "test", descriptorOf(Test, "test"));
    });
    it("should set the produces", () => {
github TypedProject / ts-express-decorators / test / units / mongoose / decorators / indexed.spec.ts View on Github external
before(() => {
    Indexed()(Test, "test", descriptorOf(Test, "test"));
    this.store = Store.from(Test, "test", descriptorOf(Test, "test"));
  });
github TypedProject / ts-express-decorators / test / units / mongoose / decorators / ref.spec.ts View on Github external
before(() => {
      Store.from(RefTest).set(MONGOOSE_MODEL_NAME, "RefTest");
      Ref(RefTest)(Test, "test", descriptorOf(Test, "test"));
      this.store = Store.from(Test, "test", descriptorOf(Test, "test"));
    });
github TypedProject / ts-express-decorators / test / units / core / class / Store.spec.ts View on Github external
before(() => {
      this.parameters = [FakeMetadata, "test", descriptorOf(FakeMetadata, "test")];
      this.cbStub = Sinon.stub();
      this.fnStub = Sinon.stub().returns(this.cbStub);
      Store.decorate(this.fnStub)(...this.parameters);
    });
github TypedProject / ts-express-decorators / packages / common / src / mvc / registries / EndpointRegistry.ts View on Github external
static store(target: any, propertyKey: string): Store {
    return Store.from(target, propertyKey, descriptorOf(target, propertyKey));
  }