Skip to content

ReactEngine

@tsed/engines

Usage

typescript
import { ReactEngine } from "@tsed/engines";

See /packages/engines/src/types/components/ReactEngine.ts.

Overview

ts
class ReactEngine extends Engine {
    constructor(name: string, options: ViewEngineOptions);
    $onInit(): Promise<void>;
    get babel(): any;
    get reactDOM(): any;
    protected patchRequire(): void;
    protected configure(options: EngineOptions): {
        base: any;
        enableCache: boolean | undefined;
        isNonStatic: any;
    };
    protected $compile(template: string, options: EngineOptions): () => any;
    protected $compileFile(file: string, options: EngineOptions): Promise<() => any>;
    protected renderWithBase(key: string, base: any, enableCache: undefined | boolean, options: EngineOptions): any;
    protected transformFileSync(filename: string): any;
    protected transform(src: string): any;
    protected requireReact(module: any, filename: string): any;
    protected requireReactString(src: string, filename?: string): any;
    protected reactBaseTmpl(data: any, options: any): any;
}

$onInit

ts
$onInit(): Promise<void>;

get babel

ts
get babel(): any;

get reactDOM

ts
get reactDOM(): any;

protected patchRequire

ts
protected patchRequire(): void;

protected configure

ts
protected configure(options: EngineOptions): {
     base: any;
     enableCache: boolean | undefined;
     isNonStatic: any;
 };

protected $compile

ts
protected $compile(template: string, options: EngineOptions): () => any;

protected $compileFile

ts
protected $compileFile(file: string, options: EngineOptions): Promise<() => any>;

protected renderWithBase

ts
protected renderWithBase(key: string, base: any, enableCache: undefined | boolean, options: EngineOptions): any;

protected transformFileSync

ts
protected transformFileSync(filename: string): any;

protected transform

ts
protected transform(src: string): any;

protected requireReact

ts
protected requireReact(module: any, filename: string): any;

protected requireReactString

ts
protected requireReactString(src: string, filename?: string): any;

protected reactBaseTmpl

ts
protected reactBaseTmpl(data: any, options: any): any;

Released under the MIT License.