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

maishu-chitu-react

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

maishu-chitu-react - npm Package Compare versions

Comparing version 1.0.11 to 1.0.12

4

out/index.d.ts

@@ -10,6 +10,6 @@ import React = require("react");

export declare class Page extends chitu.Page {
component: React.Component;
component: React.Component | null;
}
export declare class Application extends chitu.Application {
protected createDefaultAction(url: string, loadjs: (path: string) => Promise<any>): (page: Page) => Promise<React.FunctionComponentElement<PageProps>>;
protected createDefaultAction(url: string, loadjs: (path: string) => Promise<any>): chitu.Action;
}

@@ -24,2 +24,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

class Page extends chitu.Page {
constructor() {
super(...arguments);
this.component = null;
}
}

@@ -38,8 +42,6 @@ exports.Page = Page;

let action;
if (chitu.PageMaster.isClass(_action)) {
action = _action;
if (!chitu.PageMaster.isClass(_action)) {
return _action(page, this);
}
else {
action = _action;
}
action = _action;
let app = this;

@@ -57,3 +59,2 @@ let props = {

page.component = component;
return element;
});

@@ -60,0 +61,0 @@ }

{
"name": "maishu-chitu-react",
"version": "1.0.11",
"version": "1.0.12",
"description": "",

@@ -5,0 +5,0 @@ "main": "out/index.js",

@@ -6,3 +6,3 @@ import React = require("react");

type LoadJS = (path: string) => Promise<{
defalut: (props: any, app: chitu.PageMaster) => React.ReactElement<any> | {
default: (props: any, app: chitu.PageMaster) => React.ReactElement<any> | {
new(props: any, app: chitu.PageMaster): React.ReactElement<any>;

@@ -20,8 +20,8 @@ };

export class Page extends chitu.Page {
component: React.Component
component: React.Component | null = null
}
export class Application extends chitu.Application {
protected createDefaultAction(url: string, loadjs: (path: string) => Promise<any>) {
return async (page: Page) => {
protected createDefaultAction(url: string, loadjs: (path: string) => Promise<any>): chitu.Action {
return async (page: chitu.Page) => {
let actionExports = await (loadjs as LoadJS)(url);

@@ -38,5 +38,5 @@ if (!actionExports)

if (!chitu.PageMaster.isClass(_action)) {
return _action(page)
return _action(page, this)
}
action = _action as any

@@ -54,3 +54,3 @@ let app = this as Application

let component = ReactDOM.render(element, page.element) as any as React.Component
page.component = component
(page as Page).component = component
}

@@ -57,0 +57,0 @@ }

@@ -12,4 +12,5 @@ {

]
}
},
"strict": true
}
}
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