@types/require-from-string
@types/require-from-string
npm i @types/require-from-string
@types/require-from-string

@types/require-from-string

The repository for high quality TypeScript type definitions.

by DefinitelyTyped

1.2.1 (see all)License:MITTypeScript:Built-In
npm i @types/require-from-string
Readme

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

// Type definitions for require-from-string 1.2
// Project: https://github.com/floatdrop/require-from-string
// Definitions by: Ika <https://github.com/ikatyang>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/**
 * 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: Wed, 07 Jul 2021 18:02:24 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Ika.

Downloads/wk

30.6K

GitHub Stars

40.9K

LAST COMMIT

7mos ago

MAINTAINERS

1

CONTRIBUTORS

17,572

OPEN ISSUES

635

OPEN PRs

204
VersionTagPublished
1.2.1
latest
1yr ago
1.2.1
ts4.7
1yr ago
1.2.1
ts4.6
1yr ago
1.2.1
ts4.8
1yr ago
No alternatives found
No tutorials found
Add a tutorial

Rate & Review

100
No reviews found
Be the first to rate