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

@rbxts/reflex-class

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rbxts/reflex-class - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

13

out/source/class-producer.d.ts
import { Janitor } from "@rbxts/janitor";
import { Producer } from "@rbxts/reflex";
export type InferClassProducerState<T> = T extends ClassProducer<infer S> ? S : never;
export declare abstract class ClassProducer<S extends object = object> {
export interface IClassProducer<S extends object = object> {
GetState(): S;
Subscribe(listener: (state: S, previousState: S) => void): () => void;
Subscribe<T>(selector: (state: S) => T, listener: (state: T, previousState: T) => void): () => void;
Subscribe<T>(selector: (state: S) => T, predicate: ((state: T, previousState: T) => boolean) | undefined, listener: (state: T, previousState: T) => void): () => void;
Subscribe<T>(...args: unknown[]): () => void;
Dispatch(newState: S): void;
Destroy(): void;
}
export declare abstract class ClassProducer<S extends object = object> implements IClassProducer {
protected abstract state: S;

@@ -16,2 +25,3 @@ protected producer: Producer<S>;

__GetJanitor(): Janitor<void>;
Destroy(): void;
private initProducer;

@@ -22,3 +32,2 @@ /** @internal @hidden */

private subscribeToInitialState;
Destroy(): void;
}

4

out/source/decorators/action.d.ts

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

import { ClassProducer } from "../class-producer";
import { IClassProducer } from "../class-producer";
/**
* Decorator for creating an Action inside a class producer.
*/
export declare const Action: () => <S extends object, T extends ClassProducer<S>>(target: T, propertyKey: string, descriptor: TypedPropertyDescriptor<(this: T, ...args: unknown[]) => S>) => TypedPropertyDescriptor<(this: T, ...args: unknown[]) => S>;
export declare const Action: () => <S extends object, T extends IClassProducer<S>>(target: T, propertyKey: string, descriptor: TypedPropertyDescriptor<(this: T, ...args: unknown[]) => S>) => TypedPropertyDescriptor<(this: T, ...args: unknown[]) => S>;

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

import { ClassProducer, InferClassProducerState } from "../class-producer";
export declare const Subscribe: <T extends ClassProducer<InferClassProducerState<T>>, R>(selector: (state: InferClassProducerState<T>) => R, predicate?: ((state: R, previousState: R) => boolean) | undefined) => (target: T, propertyKey: string, descriptor: TypedPropertyDescriptor<(this: T, state?: R | undefined, previousState?: R | undefined) => void>) => void;
import { IClassProducer, InferClassProducerState } from "../class-producer";
export declare const Subscribe: <T extends IClassProducer<InferClassProducerState<T>>, R>(selector: (state: InferClassProducerState<T>) => R, predicate?: ((state: R, previousState: R) => boolean) | undefined) => (target: T, propertyKey: string, descriptor: TypedPropertyDescriptor<(this: T, state?: R | undefined, previousState?: R | undefined) => void>) => void;
{
"name": "@rbxts/reflex-class",
"version": "1.0.3",
"version": "1.0.4",
"description": "",

@@ -5,0 +5,0 @@ "main": "out/init.lua",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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