UNPKG

908 BTypeScriptView Raw
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8
9declare module 'babel-loader' {
10 type BabelLoaderCustomizer<T> = (
11 babel: typeof import('@babel/core'),
12 ) => {
13 customOptions?(
14 this: import('webpack').loader.LoaderContext,
15 loaderOptions: Record<string, unknown>,
16 loaderArguments: { source: string; map?: unknown },
17 ): Promise<{ custom?: T; loader: Record<string, unknown> }>;
18 config?(
19 this: import('webpack').loader.LoaderContext,
20 configuration: import('@babel/core').PartialConfig,
21 loaderArguments: { source: string; map?: unknown; customOptions: T },
22 ): import('@babel/core').TransformOptions;
23 };
24 function custom<T>(customizer: BabelLoaderCustomizer<T>): import('webpack').loader.Loader;
25}