Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@travetto/schema

Package Overview
Dependencies
Maintainers
1
Versions
324
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@travetto/schema - npm Package Compare versions

Comparing version 3.3.3 to 3.3.4

2

package.json
{
"name": "@travetto/schema",
"version": "3.3.3",
"version": "3.3.4",
"description": "Data type registry for runtime validation, reflection and binding.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -87,2 +87,3 @@ <!-- This file was generated by @travetto/doc and should not be modified directly -->

* [@Specifier](https://github.com/travetto/travetto/tree/main/module/schema/src/decorator/field.ts#L206) attributes additional specifiers to a field, allowing for more specification beyond just the field's type.
* [@SubTypeField](https://github.com/travetto/travetto/tree/main/module/schema/src/decorator/field.ts#L212) allows for promoting a given field as the owner of the sub type discriminator (defaults to `type`).
Additionally, schemas can be nested to form more complex data structures that are able to bound and validated.

@@ -89,0 +90,0 @@

@@ -206,2 +206,12 @@ import { ClassInstance } from '@travetto/base';

*/
export function Specifier(...specifiers: string[]): PropType<unknown> { return prop({ specifiers }); }
export function Specifier(...specifiers: string[]): PropType<unknown> { return prop({ specifiers }); }
/**
* Sets the subtype field via a property decorator
* @augments `@travetto/schema:Field`
*/
export function SubTypeField(): ((t: ClassInstance, k: string) => void) {
return (t: ClassInstance, k: string): void => {
SchemaRegistry.register(t.constructor, { subTypeField: k });
};
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc