2.0.1 • Published 1 year ago
@types/esm-utils v2.0.1
Installation
npm install --save @types/esm-utils
Summary
This package contains type definitions for esm-utils (https://github.com/fisker/esm-utils).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/esm-utils.
index.d.ts
// Type definitions for esm-utils 2.0
// Project: https://github.com/fisker/esm-utils
// Definitions by: Richie Bendall <https://github.com/Richienb>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
export type JsonObject = {[Key in string]?: JsonValue};
export type JsonArray = JsonValue[];
export type JsonPrimitive = string | number | boolean | null;
export type JsonValue = JsonPrimitive | JsonObject | JsonArray;
export default function create(importMeta: ImportMeta): {
filename: string;
dirname: string;
require: typeof require;
json: {
load(file: string): Promise<JsonValue>;
loadSync(file: string): JsonValue;
};
__filename: string;
__dirname: string;
};
Additional Details
- Last updated: Thu, 04 Nov 2021 01:01:22 GMT
- Dependencies: @types/node
- Global values: none
Credits
These definitions were written by Richie Bendall.