diff --git a/packages/transformers/ajsttil/CHANGELOG.md b/packages/transformers/ajsttil/CHANGELOG.md index 6bbf1cf..b7ea636 100644 --- a/packages/transformers/ajsttil/CHANGELOG.md +++ b/packages/transformers/ajsttil/CHANGELOG.md @@ -21,5 +21,22 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [UNRELEASED] +### Added +- Added `TypeMetadata`. +- Added `AndTypeMetadata` +- Added `AnyTypeMetadata` +- Added `ArrayTypeMetadata` +- Added `BooleanTypeMetadata` +- Added `FloatTypeMetadata` +- Added `IndexSignatureType` +- Added `IntegerTypeMetadata` +- Added `LiteralTypeMetadata` +- Added `NoneTypeMetadata` +- Added `ObjectTypeMetadata` +- Added `OrTypeMetadata` +- Added `PropertyTypeMetadata` +- Added `StringTypeMetadata` +- Added `XorTypeMetadata` + diff --git a/packages/transformers/ajsttil/src/index.ts b/packages/transformers/ajsttil/src/index.ts index f5db5e0..ac000ba 100644 --- a/packages/transformers/ajsttil/src/index.ts +++ b/packages/transformers/ajsttil/src/index.ts @@ -6,9 +6,11 @@ export enum TypeMetadataKind { arrayType, booleanType, floatType, + indexSignatureType, integerType, literalType, noneType, + objectType, or, propertyType, stringType, @@ -29,7 +31,7 @@ export interface ManyChildrenTypeMetadata< TKind extends TypeMetadataKind, TChildren extends TypeMedatata[] = TypeMedatata[], > extends BaseTypeMetadata { - children: TChildren[]; + children: TChildren; } export type AndTypeMetadata = ManyChildrenTypeMetadata; @@ -39,6 +41,8 @@ export type ArrayTypeMetadata = export type BooleanTypeMetadata = BaseTypeMetadata; export type FloatTypeMetadata = BaseTypeMetadata; +export type IndexSignatureType = + OneChildTypeMetadata; export type IntegerTypeMetadata = BaseTypeMetadata; export interface LiteralTypeMetadata @@ -46,9 +50,11 @@ export interface LiteralTypeMetadata literal: JsonValue; } export type NoneTypeMetadata = BaseTypeMetadata; +export type ObjectTypeMetadata = BaseTypeMetadata; export type OrTypeMetadata = ManyChildrenTypeMetadata; export interface PropertyTypeMetadata extends OneChildTypeMetadata { + isOptional: boolean; property: string; } export type StringTypeMetadata = BaseTypeMetadata; @@ -60,9 +66,11 @@ export type TypeMedatata = | ArrayTypeMetadata | BooleanTypeMetadata | FloatTypeMetadata + | IndexSignatureType | IntegerTypeMetadata | LiteralTypeMetadata | NoneTypeMetadata + | ObjectTypeMetadata | OrTypeMetadata | PropertyTypeMetadata | StringTypeMetadata