@rbxts/reflex-class
Advanced tools
Comparing version 1.1.7 to 1.2.0
export * from "./source/class-producer"; | ||
export * from "./source/decorators"; | ||
export * from "./source/custom-broadcaster/broadcaster"; | ||
export * from "./source/custom-broadcaster/broadcast-receiver"; |
@@ -0,3 +1,4 @@ | ||
/// <reference types="charm" /> | ||
import { Atom } from "@rbxts/charm"; | ||
import { Janitor } from "@rbxts/janitor"; | ||
import { Producer } from "@rbxts/reflex"; | ||
export type InferClassProducerState<T> = T extends IClassProducer<infer S> ? S : never; | ||
@@ -8,4 +9,3 @@ export interface IClassProducer<S extends object = object> { | ||
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; | ||
Subscribe(...args: unknown[]): () => void; | ||
Dispatch(newState: S): void; | ||
@@ -16,3 +16,3 @@ Destroy(): void; | ||
protected abstract state: S; | ||
protected producer: Producer<S>; | ||
protected atom: Atom<S>; | ||
private __janitor; | ||
@@ -23,12 +23,11 @@ constructor(); | ||
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; | ||
Dispatch(newState: S): S; | ||
Dispatch(newState: S): void; | ||
/** @internal @hidden */ | ||
__GetJanitor(): Janitor<void>; | ||
Destroy(): void; | ||
private initProducer; | ||
/** @internal @hidden */ | ||
private deferInitProducer; | ||
private initStateProperty; | ||
/** @internal @hidden */ | ||
private subscribeToInitialState; | ||
} |
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; | ||
export declare const Subscribe: <T extends IClassProducer<InferClassProducerState<T>>, R>(selector: (state: InferClassProducerState<T>) => R) => (target: T, propertyKey: string, descriptor: TypedPropertyDescriptor<(this: T, state?: R | undefined, previousState?: R | undefined) => void>) => void; |
{ | ||
"name": "@rbxts/reflex-class", | ||
"version": "1.1.7", | ||
"version": "1.2.0", | ||
"description": "", | ||
@@ -39,2 +39,3 @@ "main": "out/init.lua", | ||
"dependencies": { | ||
"@rbxts/charm": "^0.2.0", | ||
"@rbxts/immut": "^0.4.4-ts.0", | ||
@@ -41,0 +42,0 @@ "@rbxts/janitor": "^1.15.7-ts.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
7154
7
13
44
+ Added@rbxts/charm@^0.2.0
+ Added@rbxts/charm@0.2.1(transitive)