JsonPropertyStore
@tsed/schema
Usage
typescript
import { JsonPropertyStore } from "@tsed/schema";
See /packages/specs/schema/src/types/domain/JsonPropertyStore.ts.
Overview
ts
class JsonPropertyStore extends JsonEntityStore {
readonly parent: JsonClassStore;
get required(): boolean;
set required(value: boolean);
get allowedRequiredValues(): any[];
discriminatorKey(): this;
isDiscriminatorKey(): boolean;
isRequired(value: any): boolean;
protected build(): void;
static get(target: Type<any>, propertyKey: string | symbol): JsonPropertyStore;
}
readonly parent
ts
readonly parent: JsonClassStore;
get required
ts
get required(): boolean;
Return the required state.
set required
ts
set required(value: boolean);
Change the state of the required data.
get allowedRequiredValues
ts
get allowedRequiredValues(): any[];
discriminatorKey
ts
discriminatorKey(): this;
isDiscriminatorKey
ts
isDiscriminatorKey(): boolean;
isRequired
ts
isRequired(value: any): boolean;
Check precondition between value, required and allowedRequiredValues to know if the entity is required.
protected build
ts
protected build(): void;
static get
ts
static get(target: Type<any>, propertyKey: string | symbol): JsonPropertyStore;