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

1.2.3 • Public • Published

Installation

npm install --save @types/require-from-string

Summary

This package contains type definitions for require-from-string (https://github.com/floatdrop/require-from-string).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/require-from-string.

index.d.ts

/**
 * Load module from string in Node.
 */
declare function requireFromString(code: string, options?: requireFromString.Options): any;
declare function requireFromString(code: string, filename?: string, options?: requireFromString.Options): any;

declare namespace requireFromString {
    interface Options {
        /**
         * List of `paths`, that will be appended to module `paths`.
         * Useful when you want to be able require modules from these paths.
         */
        appendPaths?: string[] | undefined;
        /**
         * List of `paths`, that will be preppended to module `paths`.
         * Useful when you want to be able require modules from these paths.
         */
        prependPaths?: string[] | undefined;
    }
}

export = requireFromString;

Additional Details

  • Last updated: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: none

Credits

These definitions were written by Ika.

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @types/require-from-string

      Weekly Downloads

      22,269

      Version

      1.2.3

      License

      MIT

      Unpacked Size

      4.16 kB

      Total Files

      5

      Last publish

      Collaborators

      • types