2.9.5 • Published 6 months ago

@types/idyll-document v2.9.5

Weekly downloads
2
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/idyll-document

Summary

This package contains type definitions for idyll-document (https://github.com/idyll-lang/idyll/tree/master/packages/idyll-document).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/idyll-document.

index.d.ts

// Type definitions for idyll-document 2.9
// Project: https://github.com/idyll-lang/idyll/tree/master/packages/idyll-document
// Definitions by: Thanh Ngo <https://github.com/iocat>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8

import { ElementType, PureComponent } from "react";
import { Options as CompilerOptions, AST } from "idyll-compiler";

export interface IdyllDocumentProps {
    /**
     * Components to be rendered with
     */
    components: any;
    /**
     * the AST to be rendered on the page
     * If provided, this will be used insteaed of
     * the markup
     */
    ast?: AST | undefined;
    /**
     * The Idyll markup to be compiled into AST
     */
    markup?: string | undefined;
    /**
     * Initial data set
     */
    datasets?: object | undefined;

    /**
     * The theme for idyll document
     * Will correspond to one theme in idyll-theme package
     */
    theme?: string | undefined;
    /**
     * The layout for idyll document
     * Will correspond to one one layout in idyll-layouts package
     */
    layout?: string | undefined;
    /**
     * Callback function if error happens during compilation
     */
    onError?: ((err: Error) => void) | undefined;
    /**
     * The React component rendered when an error occurs
     */
    errorComponent?: ElementType<{
        className?: string | undefined;
        children: Error["message"] | null;
    }> | undefined;
    /**
     * Compiler option for Idyll compiler when compiling markup
     */
    compilerOptions?: CompilerOptions | undefined;

    context?: ((context: any) => void) | undefined;
    initialState?: any;
}

declare class IdyllDocument extends PureComponent<IdyllDocumentProps, any> {}

export default IdyllDocument;

Additional Details

Credits

These definitions were written by Thanh Ngo.

2.9.4

7 months ago

2.9.3

8 months ago

2.9.5

6 months ago

2.9.2

3 years ago

2.9.1

3 years ago

2.9.0

6 years ago