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

@eva/inspector-decorator

Package Overview
Dependencies
Maintainers
4
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eva/inspector-decorator - npm Package Compare versions

Comparing version 0.1.0-alpha.0 to 0.1.0-alpha.1

17

dist/inspector-decorator.d.ts

@@ -0,1 +1,3 @@

declare type AnyOptions = Record<string, any>;
export declare interface ClassType<T = any> {

@@ -15,2 +17,4 @@ new (...args: any): T;

export declare function Field(returnTypeFunction?: ReturnTypeFunc | FieldOptions, maybeOptions?: FieldOptions): PropertyDecorator;
export declare type FieldMetadata<T extends Record<string, any>> = {

@@ -20,3 +24,3 @@ [K in keyof T]: FieldMetadataInner<T[K]>;

export declare interface FieldMetadataInner<T> extends NumberOptions {
export declare interface FieldMetadataInner<T> extends NumberOptions, FillterOptions, FilltersOptions, AnyOptions {
type: T extends number ? 'number' : T extends string ? 'string' : T extends boolean ? 'boolean' : T extends Record<string, any> ? FieldMetadata<T> : string;

@@ -26,5 +30,14 @@ isArray: boolean;

export declare interface FieldOptions extends NumberOptions {
export declare interface FieldOptions extends NumberOptions, FillterOptions, FilltersOptions, AnyOptions {
type?: string;
}
export declare interface FillterOptions {
filter?(val: any): any;
}
export declare interface FilltersOptions {
filters?: ((val: any) => any)[];
}
export declare function getPropertiesOf<T extends ClassType<any> & {

@@ -31,0 +44,0 @@ getProperties?: StaticGetProperties<T>;

@@ -55,2 +55,4 @@ 'use strict';

if (Array.isArray(returnType)) {
isArray = true;
// not support Tuples yet
type = returnType[0];

@@ -57,0 +59,0 @@ }

2

dist/plugin.cjs.prod.js

@@ -1,1 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("tslib"),e=function(e){function r(){var t=this.constructor,r=e.call(this,"Symbol keys are not supported yet!")||this;return Object.setPrototypeOf(r,t.prototype),r}return t.__extends(r,e),r}(Error),r=function(e){function r(){var t=this.constructor,r=e.call(this,"getProperties is not a function!")||this;return Object.setPrototypeOf(r,t.prototype),r}return t.__extends(r,e),r}(Error);function n(t){return t===String?"string":t===Number?"number":t===Boolean?"boolean":"unknown"}exports.Field=function(r,o){return function(i,u){if("symbol"==typeof u)throw new e;var s=function(t,e){return"function"==typeof t?{returnTypeFunc:t,options:e||{}}:{options:t||{}}}(r,o);!function(e,r,o,i){var u=Reflect.getMetadata("design:type",e,r),s=u===Array,c=n(u);if("unknown"!==c&&(u=c),i){var a=i();u=Array.isArray(a)?a[0]:a}var f=Reflect.getMetadata("IDE_PROPERTY_METADATA",e.constructor)||{};f[r]=t.__assign({type:u,isArray:s},o),Reflect.defineMetadata("IDE_PROPERTY_METADATA",f,e.constructor)}(i,u,s.options,s.returnTypeFunc)}},exports.getPropertiesOf=function t(e){if("getProperties"in e){if("function"!=typeof e.getProperties)throw new r;return e.getProperties()}var o=Reflect.getMetadata("IDE_PROPERTY_METADATA",e)||{};return Object.keys(o).forEach((function(e){if("function"==typeof o[e].type){var r=n(o[e].type);o[e].type="unknown"!==r?r:t(o[e].type)}})),o};
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("tslib"),e=function(e){function r(){var t=this.constructor,r=e.call(this,"Symbol keys are not supported yet!")||this;return Object.setPrototypeOf(r,t.prototype),r}return t.__extends(r,e),r}(Error),r=function(e){function r(){var t=this.constructor,r=e.call(this,"getProperties is not a function!")||this;return Object.setPrototypeOf(r,t.prototype),r}return t.__extends(r,e),r}(Error);function n(t){return t===String?"string":t===Number?"number":t===Boolean?"boolean":"unknown"}exports.Field=function(r,o){return function(i,u){if("symbol"==typeof u)throw new e;var s=function(t,e){return"function"==typeof t?{returnTypeFunc:t,options:e||{}}:{options:t||{}}}(r,o);!function(e,r,o,i){var u=Reflect.getMetadata("design:type",e,r),s=u===Array,c=n(u);if("unknown"!==c&&(u=c),i){var a=i();Array.isArray(a)?(s=!0,u=a[0]):u=a}var f=Reflect.getMetadata("IDE_PROPERTY_METADATA",e.constructor)||{};f[r]=t.__assign({type:u,isArray:s},o),Reflect.defineMetadata("IDE_PROPERTY_METADATA",f,e.constructor)}(i,u,s.options,s.returnTypeFunc)}},exports.getPropertiesOf=function t(e){if("getProperties"in e){if("function"!=typeof e.getProperties)throw new r;return e.getProperties()}var o=Reflect.getMetadata("IDE_PROPERTY_METADATA",e)||{};return Object.keys(o).forEach((function(e){if("function"==typeof o[e].type){var r=n(o[e].type);o[e].type="unknown"!==r?r:t(o[e].type)}})),o};

@@ -51,2 +51,4 @@ import { __extends, __assign } from 'tslib';

if (Array.isArray(returnType)) {
isArray = true;
// not support Tuples yet
type = returnType[0];

@@ -53,0 +55,0 @@ }

{
"name": "@eva/inspector-decorator",
"version": "0.1.0-alpha.0",
"version": "0.1.0-alpha.1",
"scripts": {

@@ -5,0 +5,0 @@ "build": "node ./scripts/build.js",

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