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

1.1.5 • Public • Published

Installation

npm install --save @types/adobe__es-modules-middleware

Summary

This package contains type definitions for @adobe/es-modules-middleware (https://github.com/adobe/es-modules-middleware#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/adobe__es-modules-middleware.

index.d.ts

import "karma";
import { NextHandleFunction } from "connect";

declare module "karma" {
    interface ConfigOptions {
        /**
         * used in Karma to aid in testing es-modules in the browser
         * see {@link https://github.com/adobe/es-modules-middleware}
         */
        esModulesMiddleware?: MiddlewareOptions | undefined;
    }
}

/**
 * used as a connect middleware by providing it with a map of url base path to file system path from which to serve files.
 * Any files served through the middleware will be processed to resolve import/export paths properly.
 */
export interface MiddlewareOptions {
    /** a map of url base path to file system path from which to serve files */
    paths: {
        [path: string]: string;
    };
}
export function middleware(options?: MiddlewareOptions): NextHandleFunction;

Additional Details

Credits

These definitions were written by Piotr Błażejewicz.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/adobe__es-modules-middleware

Weekly Downloads

2

Version

1.1.5

License

MIT

Unpacked Size

4.58 kB

Total Files

5

Last publish

Collaborators

  • types