1.1.5 • Published 6 months ago
@types/adobe__es-modules-middleware v1.1.5
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
- Last updated: Wed, 07 Jul 2021 21:44:02 GMT
- Dependencies: @types/karma, @types/connect
- Global values: none
Credits
These definitions were written by Piotr Błażejewicz.