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

@cfcs/react

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

@cfcs/react - npm Package Compare versions

Comparing version 0.0.11 to 0.0.12

11

declaration/reactive/types.d.ts
import { ReactiveAdapter, ReactiveEventParameters } from "@cfcs/core";
export declare type ReactReactiveEvents<Events extends Record<string, any>> = {
export declare type ReactiveEvents<Events extends Record<string, any>> = {
[key in keyof Events as `on${Capitalize<string & key>}`]: (effect: ((...args: ReactiveEventParameters<Events, key & string>) => void), deps?: readonly any[]) => void;
};
export declare type ReactReactiveResult<Instance, State extends Record<string, any> = {}, Methods extends keyof Partial<Instance> = any, Events extends Record<string, any> = {}> = State & {
export declare type ReactiveResult<Instance, State extends Record<string, any> = {}, Methods extends keyof Partial<Instance> = any, Events extends Record<string, any> = {}> = State & {
[key in Methods]: Instance[key];
} & ReactReactiveEvents<Events>;
export declare type ReactReactiveAdapterResult<Adapter extends ReactiveAdapter<any, any, any, any, any>> = Adapter extends ReactiveAdapter<infer Instance, infer State, infer Methods, any, infer Events> ? ReactReactiveResult<Instance, State, Methods, Events> : {};
} & ReactiveEvents<Events>;
export declare type ReactiveAdapterResult<Adapter extends ReactiveAdapter<any, any, any, any, any>> = Adapter extends ReactiveAdapter<infer Instance, infer State, infer Methods, any, infer Events> ? ReactiveResult<Instance, State, Methods, Events> : {};
export declare type ReactReactiveEvents<Events extends Record<string, any>> = ReactiveEvents<Events>;
export declare type ReactReactiveResult<Instance, State extends Record<string, any> = {}, Methods extends keyof Partial<Instance> = any, Events extends Record<string, any> = {}> = ReactiveResult<Instance, State, Methods, Events>;
export declare type ReactReactiveAdapterResult<Adapter extends ReactiveAdapter<any, any, any, any, any>> = ReactiveAdapterResult<Adapter>;

@@ -7,3 +7,3 @@ /*

repository: https://github.com/naver/egjs-conveyer
version: 0.0.11
version: 0.0.12
*/

@@ -10,0 +10,0 @@ 'use strict';

@@ -7,3 +7,3 @@ /*

repository: https://github.com/naver/egjs-conveyer
version: 0.0.11
version: 0.0.12
*/

@@ -10,0 +10,0 @@ import { adaptReactive, keys, camelize } from '@cfcs/core';

{
"name": "@cfcs/react",
"version": "0.0.11",
"version": "0.0.12",
"description": "Cross Framework Components",

@@ -35,3 +35,3 @@ "main": "dist/cfcs.cjs.js",

"dependencies": {
"@cfcs/core": "~0.0.10"
"@cfcs/core": "~0.0.12"
},

@@ -38,0 +38,0 @@ "devDependencies": {

import { ReactiveAdapter, ReactiveEventParameters } from "@cfcs/core";
export type ReactReactiveEvents<
export type ReactiveEvents<
Events extends Record<string, any>
> = {
> = {
[key in keyof Events as `on${Capitalize<string & key>}`]: (effect: ((...args: ReactiveEventParameters<Events, key & string>) => void), deps?: readonly any[]) => void;
};
export type ReactReactiveResult<
export type ReactiveResult<
Instance,

@@ -14,8 +14,26 @@ State extends Record<string, any> = {},

Events extends Record<string, any> = {},
> = State & { [key in Methods]: Instance[key] } & ReactReactiveEvents<Events>;
> = State & { [key in Methods]: Instance[key] } & ReactiveEvents<Events>;
export type ReactReactiveAdapterResult<
export type ReactiveAdapterResult<
Adapter extends ReactiveAdapter<any, any, any, any, any>,
>
>
= Adapter extends ReactiveAdapter<infer Instance, infer State, infer Methods, any, infer Events>
? ReactReactiveResult<Instance, State, Methods, Events> : {};
? ReactiveResult<Instance, State, Methods, Events> : {};
// Names using framework prefix
export type ReactReactiveEvents<Events extends Record<string, any>> = ReactiveEvents<Events>;
export type ReactReactiveResult<Instance,
State extends Record<string, any> = {},
Methods extends keyof Partial<Instance> = any,
Events extends Record<string, any> = {},
> = ReactiveResult<
Instance,
State,
Methods,
Events
>;
export type ReactReactiveAdapterResult<
Adapter extends ReactiveAdapter<any, any, any, any, any>
> = ReactiveAdapterResult<Adapter>;

@@ -17,5 +17,5 @@ import { ReactiveSubscribe, ReactiveAdapter, keys, camelize, adaptReactive } from "@cfcs/core";

const [states] = useState<Record<string, {
getter: boolean,
value: any,
set: (value: any) => void,
getter: boolean;
value: any;
set: (value: any) => void;
}>>({});

@@ -22,0 +22,0 @@ for (const name in reactiveState) {

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