1.1.5 • Published 6 months ago

@types/adobe__es-modules-middleware v1.1.5

Weekly downloads
2
License
MIT
Repository
github
Last release
6 months ago

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

// Type definitions for @adobe/es-modules-middleware 1.1
// Project: https://github.com/adobe/es-modules-middleware#readme
// Definitions by: Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.2

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.

1.1.5

6 months ago

1.1.4

7 months ago

1.1.3

8 months ago

1.1.2

3 years ago

1.1.1

4 years ago

1.1.0

4 years ago