UNPKG

1.28 kBTypeScriptView 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> = (babel: typeof import('@babel/core')) => {
11 customOptions?(
12 this: import('webpack').loader.LoaderContext,
13 loaderOptions: Record<string, unknown>,
14 loaderArguments: { source: string; map?: unknown },
15 ): Promise<{ custom?: T; loader: Record<string, unknown> }>;
16 config?(
17 this: import('webpack').loader.LoaderContext,
18 configuration: import('@babel/core').PartialConfig,
19 loaderArguments: { source: string; map?: unknown; customOptions: T },
20 ): import('@babel/core').TransformOptions;
21 result?(
22 this: import('webpack').loader.LoaderContext,
23 result: import('@babel/core').BabelFileResult,
24 context: {
25 source: string;
26 map?: unknown;
27 customOptions: T;
28 configuration: import('@babel/core').PartialConfig;
29 options: import('@babel/core').TransformOptions;
30 },
31 ): import('@babel/core').BabelFileResult;
32 };
33 function custom<T>(customizer: BabelLoaderCustomizer<T>): import('webpack').loader.Loader;
34}