<commit_before>import { IModel } from '../model';
import { AnySchema, IAnyOptions } from './any';
import { ArraySchema, IArrayOptions } from './array';
// import { BooleanSchema, IBooleanOptions } from './boolean';
// import { DateSchema, IDateOptions } from './date';
// import { IModelOptions, ModelSchema } from './model';
// import { INumberOptions, NumberSchema } from './number';
import { IObjectOptions, ObjectSchema } from './object';
// import { IReferenceOptions, ReferenceSchema } from './reference';
import { IStringOptions, StringSchema } from './string';
import { ISanitizeOptions, ISchema } from './value';

export function getSchemaDecorator(createSchema: () => ISchema): PropertyDecorator {
  return (target: IModel, key: string) => target.constructor.setSchema(key, createSchema());
}

/* tslint:disable:variable-name */
export const Property = {
  Any: (options: IAnyOptions = {}) => getSchemaDecorator(() => new AnySchema(options)),
  Array: (options: IArrayOptions) => getSchemaDecorator(() => new ArraySchema(options)),
  // Boolean: (options: IBooleanOptions = {}) => getSchemaDecorator(() => new BooleanSchema(options)),
  // Date: (options: IDateOptions = {}) => getSchemaDecorator(() => new DateSchema(options)),
  // Model: (options: IModelOptions) => getSchemaDecorator(() => new ModelSchema(options)),
  // Number: (options: INumberOptions = {}) => getSchemaDecorator(() => new NumberSchema(options)),
  Object: (options: IObjectOptions) => getSchemaDecorator(() => new ObjectSchema(options)),
  // Reference: (options: IReferenceOptions) => getSchemaDecorator(() => new ReferenceSchema(options)),
  String: (options: IStringOptions = {}) => getSchemaDecorator(() => new StringSchema(options)),
};

export const Schema = {
  Any: AnySchema,
  Array: ArraySchema,
  // Boolean: BooleanSchema,
  // Date: DateSchema,
  // Model: ModelSchema,
  // Number: NumberSchema,
  Object: ObjectSchema,
  // Reference: ReferenceSchema,
  String: StringSchema,
};
/* tslint:enable:variable-name */
<commit_msg>schema: add ModelSchema<commit_after>import { IModel, Model } from '../model';
import { AnySchema, IAnyOptions } from './any';
import { ArraySchema, IArrayOptions } from './array';
// import { BooleanSchema, IBooleanOptions } from './boolean';
// import { DateSchema, IDateOptions } from './date';
import { IModelOptions, ModelSchema } from './model';
// import { INumberOptions, NumberSchema } from './number';
import { IObjectOptions, ObjectSchema } from './object';
// import { IReferenceOptions, ReferenceSchema } from './reference';
import { IStringOptions, StringSchema } from './string';
import { ISanitizeOptions, ISchema } from './value';

export function getSchemaDecorator(createSchema: () => ISchema): PropertyDecorator {
  return (target: IModel, key: string) => target.constructor.setSchema(key, createSchema());
}

/* tslint:disable:variable-name */
export const Property = {
  Any: (options: IAnyOptions = {}) => getSchemaDecorator(() => new AnySchema(options)),
  Array: (options: IArrayOptions) => getSchemaDecorator(() => new ArraySchema(options)),
  // Boolean: (options: IBooleanOptions = {}) => getSchemaDecorator(() => new BooleanSchema(options)),
  // Date: (options: IDateOptions = {}) => getSchemaDecorator(() => new DateSchema(options)),
  Model: (options: IModelOptions) => getSchemaDecorator(() => new ModelSchema(options)),
  // Number: (options: INumberOptions = {}) => getSchemaDecorator(() => new NumberSchema(options)),
  Object: (options: IObjectOptions) => getSchemaDecorator(() => new ObjectSchema(options)),
  // Reference: (options: IReferenceOptions) => getSchemaDecorator(() => new ReferenceSchema(options)),
  String: (options: IStringOptions = {}) => getSchemaDecorator(() => new StringSchema(options)),
};

export const Schema = {
  Any: AnySchema,
  Array: ArraySchema,
  // Boolean: BooleanSchema,
  // Date: DateSchema,
  Model: ModelSchema,
  // Number: NumberSchema,
  Object: ObjectSchema,
  // Reference: ReferenceSchema,
  String: StringSchema,
};
/* tslint:enable:variable-name */

{'fraction_non_alphanumeric': 0.16453201970443349, 'fraction_numerical': 0.0, 'mean_word_length': 5.238095238095238, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 43, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1440181', 'n_tokens_mistral': 1124, 'n_tokens_neox': 1139, 'n_words': 295}