@types/rivets
TypeScript icon, indicating that this package has built-in type declarations

0.9.5 • Public • Published

Installation

npm install --save @types/rivets

Summary

This package contains type definitions for rivets (http://rivetsjs.com/).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/rivets.

index.d.ts

/// <reference types="jquery" />

export namespace Rivets {
    interface View {
        build(): void;
        bind(): void;
        unbind(): void;
    }

    interface Rivets {
        // Global binders.
        binders: object;

        // Global components.
        components: object;

        // Global formatters.
        formatters: object;

        // Global sightglass adapters.
        adapters: object;

        // Default attribute prefix.
        prefix: string;

        // Default template delimiters.
        templateDelimiters: string[];

        // Default sightglass root interface.
        rootInterface: string;

        // Preload data by default.
        preloadData: boolean;

        handler(context: any, ev: Event, biding: any): void;

        configure(options?: {
            // Attribute prefix in templates
            prefix?: string | undefined;

            // Preload templates with initial data on bind
            preloadData?: boolean | undefined;

            // Root sightglass interface for keypaths
            rootInterface?: string | undefined;

            // Template delimiters for text bindings
            templateDelimiters?: string[] | undefined;

            // Augment the event handler of the on-* binder
            handler?(context: any, ev: Event, biding: any): void;
        }): void;

        bind(element: HTMLElement | HTMLElement[] | JQuery, models: object, options?: object): View;
    }
}

export const Rivets: Rivets.Rivets;

Additional Details

  • Last updated: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: @types/jquery

Credits

These definitions were written by Trevor Baron, and Jakub Matjanowski.

Dependents (1)

Package Sidebar

Install

npm i @types/rivets

Weekly Downloads

55

Version

0.9.5

License

MIT

Unpacked Size

5.77 kB

Total Files

5

Last publish

Collaborators

  • types