tsbuffer-schema
Advanced tools
Comparing version 2.1.1 to 2.2.0-dev.0
/*! | ||
* TSBuffer Schema v2.1.1 | ||
* TSBuffer Schema v2.2.0-dev.0 | ||
* ----------------------------------------- | ||
* MIT LICENSE | ||
* KingWorks (C) Copyright 2021 | ||
* KingWorks (C) Copyright 2022 | ||
* https://github.com/k8w/tsbuffer-schema | ||
*/ | ||
/** | ||
@@ -108,7 +109,2 @@ * TypeScript `any` type | ||
decodeJSON?: (json: any) => any; | ||
/** | ||
* JSON Schema | ||
* This is used to generate API docs. | ||
*/ | ||
jsonSchema?: any; | ||
} | ||
@@ -255,2 +251,28 @@ | ||
/** | ||
* TypeScript `keyof` feature, to get keys of an interface. | ||
* | ||
* @remarks | ||
* Type: | ||
* ```ts | ||
* interface ABC { a: string; b: string } | ||
* type Keys = keyof ABC; | ||
* ``` | ||
* | ||
* Schema: | ||
* ```json | ||
* { | ||
* type: "keys", | ||
* target: { | ||
* type: "Reference", | ||
* target: "ABC" | ||
* } | ||
* } | ||
* ``` | ||
*/ | ||
declare interface KeyofTypeSchema { | ||
type: 'Keyof'; | ||
target: InterfaceReference; | ||
} | ||
/** | ||
* TypeScript literal type | ||
@@ -455,2 +477,3 @@ * | ||
Reference = "Reference", | ||
Keyof = "Keyof", | ||
Union = "Union", | ||
@@ -507,3 +530,3 @@ Intersection = "Intersection", | ||
*/ | ||
export declare type TSBufferSchema = (BooleanTypeSchema | NumberTypeSchema | StringTypeSchema | ArrayTypeSchema | TupleTypeSchema | EnumTypeSchema | AnyTypeSchema | LiteralTypeSchema | ObjectTypeSchema | InterfaceTypeSchema | BufferTypeSchema | IndexedAccessTypeSchema | ReferenceTypeSchema | UnionTypeSchema | IntersectionTypeSchema | PickTypeSchema | PartialTypeSchema | OmitTypeSchema | OverwriteTypeSchema | NonNullableTypeSchema | DateTypeSchema | CustomTypeSchema) & { | ||
export declare type TSBufferSchema = (BooleanTypeSchema | NumberTypeSchema | StringTypeSchema | ArrayTypeSchema | TupleTypeSchema | EnumTypeSchema | AnyTypeSchema | LiteralTypeSchema | ObjectTypeSchema | InterfaceTypeSchema | BufferTypeSchema | IndexedAccessTypeSchema | ReferenceTypeSchema | KeyofTypeSchema | UnionTypeSchema | IntersectionTypeSchema | PickTypeSchema | PartialTypeSchema | OmitTypeSchema | OverwriteTypeSchema | NonNullableTypeSchema | DateTypeSchema | CustomTypeSchema) & { | ||
comment?: string; | ||
@@ -526,3 +549,3 @@ }; | ||
export declare type TypeReference = ReferenceTypeSchema | IndexedAccessTypeSchema; | ||
export declare type TypeReference = ReferenceTypeSchema | IndexedAccessTypeSchema | KeyofTypeSchema; | ||
@@ -529,0 +552,0 @@ /** Encoded as {@link https://developers.google.com/protocol-buffers/docs/encoding#varints | Varint} */ |
/*! | ||
* TSBuffer Schema v2.1.1 | ||
* TSBuffer Schema v2.2.0-dev.0 | ||
* ----------------------------------------- | ||
* MIT LICENSE | ||
* KingWorks (C) Copyright 2021 | ||
* KingWorks (C) Copyright 2022 | ||
* https://github.com/k8w/tsbuffer-schema | ||
@@ -31,2 +31,3 @@ */ | ||
SchemaType["Reference"] = "Reference"; | ||
SchemaType["Keyof"] = "Keyof"; | ||
SchemaType["Union"] = "Union"; | ||
@@ -33,0 +34,0 @@ SchemaType["Intersection"] = "Intersection"; |
{ | ||
"name": "tsbuffer-schema", | ||
"version": "2.1.1", | ||
"version": "2.2.0-dev.0", | ||
"description": "TSBuffer schema declarations", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20065
620
1