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

@cerebral/inferno

Package Overview
Dependencies
Maintainers
5
Versions
270
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cerebral/inferno - npm Package Compare versions

Comparing version 3.2.0-1521141520687 to 3.2.0-1521491486243

64

index.d.ts

@@ -1,16 +0,22 @@

import { InfernoChildren, VNode, Component } from 'inferno';
import { InfernoChildren, VNode, Component } from 'inferno'
/* eslint-disable-next-line no-unused-vars */
import { BaseControllerClass, Sequence } from 'cerebral'
// TODO: Replace these type with Inferno JSX support
type ComponentState = {};
type Validator<T> = (object: T, key: string, componentName: string, ...rest: any[]) => Error | null;
type ValidationMap<T> = {[K in keyof T]?: Validator<T> };
type ComponentState = {}
type Validator<T> = (
object: T,
key: string,
componentName: string,
...rest: any[]
) => Error | null
type ValidationMap<T> = { [K in keyof T]?: Validator<T> }
interface ComponentClass<P = {}> {
new (props?: P, context?: any): Component<P, ComponentState>;
propTypes?: ValidationMap<P>;
contextTypes?: ValidationMap<any>;
childContextTypes?: ValidationMap<any>;
defaultProps?: Partial<P>;
displayName?: string;
new (props?: P, context?: any): Component<P, ComponentState>
propTypes?: ValidationMap<P>
contextTypes?: ValidationMap<any>
childContextTypes?: ValidationMap<any>
defaultProps?: Partial<P>
displayName?: string
}

@@ -20,19 +26,21 @@

interface StatelessComponent<P = {}> {
(props: P & { children?: InfernoChildren }, context?: any): InfernoJSXElement<any> | null;
propTypes?: ValidationMap<P>;
contextTypes?: ValidationMap<any>;
defaultProps?: Partial<P>;
displayName?: string;
(props: P & { children?: InfernoChildren }, context?: any): InfernoJSXElement<
any
> | null
propTypes?: ValidationMap<P>
contextTypes?: ValidationMap<any>
defaultProps?: Partial<P>
displayName?: string
}
type ComponentType<P = {}> = ComponentClass<P> | StatelessComponent<P>;
type ComponentType<P = {}> = ComponentClass<P> | StatelessComponent<P>
declare global {
namespace JSX {
interface Element extends InfernoJSXElement<any> {}
namespace JSX {
interface Element extends InfernoJSXElement<any> {}
interface IntrinsicElements {
[elemName: string]: any;
}
interface IntrinsicElements {
[elemName: string]: any
}
}
}

@@ -42,13 +50,17 @@

interface SignalsMap {
[signalName: string]: Sequence
[signalName: string]: Sequence
}
export const StateContainer: ComponentClass<{state: any, signals: SignalsMap}>
export const Container: ComponentClass<{controller: BaseControllerClass}>
export const StateContainer: ComponentClass<{ state: any; signals: SignalsMap }>
export const Container: ComponentClass<{ controller: BaseControllerClass }>
/* eslint-disable-next-line no-unused-vars */
type PropsMap<T> = {
[P in keyof T]: any; // TODO: use correct type than Tag<any>
[P in keyof T]: any // TODO: use correct type than Tag<any>
}
// Props are signal/state props, EProps are external props
export function connect<Props, EProps = {}>(props: Props, comp: ComponentType<PropsMap<Props> & EProps>): ComponentClass<EProps>
export function connect<Props, EProps = {}>(
props: Props,
comp: ComponentType<PropsMap<Props> & EProps>
): ComponentClass<EProps>
{
"name": "@cerebral/inferno",
"version": "3.2.0-1521141520687",
"version": "3.2.0-1521491486243",
"description": "Inferno view for Cerebral",

@@ -18,3 +18,3 @@ "main": "index.js",

"dependencies": {
"cerebral": "^4.2.0-1521141520687"
"cerebral": "^4.2.0-1521491486243"
},

@@ -25,3 +25,3 @@ "scripts": {

"prepublish": "npm run build",
"test": "mocha -r test/setup --compilers js:babel-register \"src/**/*.test.js\" \"test/**/*.test.js\"",
"test": "mocha -r test/setup --require babel-register \"src/**/*.test.js\" \"test/**/*.test.js\"",
"test:watch": "npm run test -- --watch"

@@ -28,0 +28,0 @@ },

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