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

1.0.3 • Public • Published

Installation

npm install --save @types/quotesy

Summary

This package contains type definitions for quotesy (https://github.com/dwyl/quotes#readme).

Details

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

index.d.ts

/**
 * Returns an Array of Quote Objects
 */
export function parse_json(): Quote[];

/**
 * Returns a random quote from the list
 */
export function random(): Quote;

/**
 * Returns a random quote for a specific tag
 * @param tag the tag to search for
 */
export function random_by_tag(tag: string): Quote;

/** A single quote from the database */
export interface Quote {
    /** The author of the quote */
    author: string;
    /** The text of the quote */
    text: string;
    /** Comma-separated list of words associated with the quote */
    tags?: string | undefined;
    /** A URL where the origin of the quote can be verified */
    source?: string | undefined;
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: none

Credits

These definitions were written by Nate Silva.

/@types/quotesy/

    Package Sidebar

    Install

    npm i @types/quotesy

    Weekly Downloads

    81

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    3.87 kB

    Total Files

    5

    Last publish

    Collaborators

    • types