New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@produck/charon-options

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@produck/charon-options - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

2

index.d.ts

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

export { define } from './types/Options';
export { define, OptionsConstructorProvider } from './types/Options';
{
"name": "@produck/charon-options",
"version": "0.3.0",
"version": "0.3.1",
"description": "Reactive options accessor provider.",

@@ -38,3 +38,3 @@ "keywords": [

},
"gitHead": "f0d1dcb07889386e99dde086c09b691d734807ee"
"gitHead": "93b24e7a364849657dd0e72f24147572f1017907"
}

@@ -1,48 +0,51 @@

interface BaseAccessor {}
interface Accessor {}
export interface AccessorConstructor<
Descriptor extends BaseDescriptor = {},
ChildrenAccessorConstructorMap extends AccessorConstructorMap = {},
> {
new <
Context = any
>(
context: Context
): MixinedAccessor<Descriptor, ChildrenAccessorConstructorMap>;
interface PropertyDescriptorObject<Value = any> {
value: Value;
set?(newValue?: any, oldValue?: any): any;
validate?: (value: Value) => any;
[key: string]: any;
}
appendChild(name: string, ChildAccessor: AccessorConstructor): void;
type ThisTypedPropertyDescriptorObject<Context = any> = PropertyDescriptorObject & ThisType<Context>;
type SimplePropertyDescriptor = number | boolean | string | symbol | null | Function;
type SimpleType<T> = T extends boolean ? boolean : T;
merge(
accessor: MixinedAccessor<Descriptor, ChildrenAccessorConstructorMap>,
options: object
): void;
interface PropertyDescriptorMap<Context = any> {
[propertyName: string]: ThisTypedPropertyDescriptorObject<Context> | SimplePropertyDescriptor;
}
interface PropertyDescriptorObject<
Value = any
type ThisTypedPropertyDescriptorMap<
Context = any,
CustomPropertyDescriptorMap extends PropertyDescriptorMap<Context> = {},
> = CustomPropertyDescriptorMap & ThisType<Context>;
interface AccessorConstructor<
Context = any,
CustomPropertyDescriptorMap extends PropertyDescriptorMap<Context> = {},
ChildrenAccessorConstructorMap extends AccessorConstructorMap = {},
> {
value: Value;
set?(newValue?: any, oldValue?: any): any;
validate?(value?: any): any;
[key: string]: any;
}
new (context: Context): MixinedAccessor<CustomPropertyDescriptorMap, ChildrenAccessorConstructorMap>;
type SimpleProperty = number | boolean | string | symbol;
type PropertyDescriptor = PropertyDescriptorObject | SimpleProperty;
appendChild(name: string, ChildAccessor: AccessorConstructor): void;
interface BaseDescriptor {
[key: string]: PropertyDescriptor;
merge<
CustomAccessor = MixinedAccessor<CustomPropertyDescriptorMap, ChildrenAccessorConstructorMap>
>(
accessor: CustomAccessor,
options: CustomAccessor
): void;
}
interface AccessorConstructorMap {
[key: string]: AccessorConstructor;
[propertyName: string]: AccessorConstructor
}
type MixinedAccessor<
Descriptor extends BaseDescriptor = {},
CustomPropertyDescriptorMap extends PropertyDescriptorMap = {},
ChildrenAccessorConstructorMap extends AccessorConstructorMap = {}
> = BaseAccessor & {
[SelfProperty in keyof Descriptor]:
Descriptor[SelfProperty] extends PropertyDescriptorObject<infer R>
? R : Descriptor[SelfProperty]
> = Accessor & {
[SelfProperty in keyof CustomPropertyDescriptorMap]:
CustomPropertyDescriptorMap[SelfProperty] extends PropertyDescriptorObject<infer R>
? R : SimpleType<CustomPropertyDescriptorMap[SelfProperty]>;
} & {

@@ -57,10 +60,11 @@ [ChildProperty in keyof ChildrenAccessorConstructorMap]:

<
CustomDescriptor extends BaseDescriptor = {},
CustomPropertyDescriptorMap extends PropertyDescriptorMap<Context> = {},
ChildrenAccessorConstructorMap extends AccessorConstructorMap = {}
> (
descriptor?: CustomDescriptor,
children?: ChildrenAccessorConstructorMap
): AccessorConstructor<CustomDescriptor, ChildrenAccessorConstructorMap>;
>(
descriptor?: ThisTypedPropertyDescriptorMap<Context, CustomPropertyDescriptorMap>,
children?: ChildrenAccessorConstructorMap,
eachSet?: (this: Context) => void
): AccessorConstructor<Context, CustomPropertyDescriptorMap, ChildrenAccessorConstructorMap>;
}
export const define: OptionsConstructorProvider;
export const define: OptionsConstructorProvider<any>
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